Skip to content

Commit

Permalink
Merge pull request #49 from fga-eps-mds/feat#58/corrige_orientação
Browse files Browse the repository at this point in the history
fix(#58): Corrige e ajusta aparência da WelcomeView
  • Loading branch information
GabrielCostaDeOliveira authored Dec 20, 2024
2 parents 0dab13d + cad2b79 commit 4a486ea
Showing 1 changed file with 86 additions and 72 deletions.
158 changes: 86 additions & 72 deletions lib/ui/welcome/view/WelcomeView.dart
Original file line number Diff line number Diff line change
@@ -1,92 +1,106 @@
import 'package:aranduapp/core/log/Log.dart';
import 'package:aranduapp/ui/onboarding/view/onboarding_view.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:google_fonts/google_fonts.dart';


class WelcomeView extends StatelessWidget {
//final WelcomeModel model = WelcomeModel("Arandú","Começar");
class WelcomeView extends StatefulWidget {

WelcomeView({super.key});

@override
State<WelcomeView> createState() => _WelcomeViewState();
}

class _WelcomeViewState extends State<WelcomeView> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
const SizedBox(height: 95),

//Cículo com gradiente com possível logo sobreposta
Stack(
alignment: Alignment.center,
children: [



Container(
width: 278,
height: 278,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.primary,
shape: BoxShape.circle,
),
),

],
),
const SizedBox(height: 20),
body: Center(
child: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
_logo(context),
const SizedBox(height: 80),
_startButton(context),
const SizedBox(width: 80),
],
))));
}

//Titulo "arandú" com fonte amarante
Text(
"Arandú",
style: GoogleFonts.amarante(
fontSize: 60,
fontWeight: FontWeight.w500,
Widget _logo(BuildContext context) {
Size screenSize = MediaQuery.of(context).size;

double circleDiameter = screenSize.height;
double nameSize = screenSize.height * 0.075;

return Center(
child: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
//Cículo com gradiente com possível logo sobreposta
Stack(
alignment: Alignment.center,
children: [
Container(
width: circleDiameter * 0.3,
height: circleDiameter *0.3,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.primary,
shape: BoxShape.circle,
),
),
const Spacer(),

//Botão de começar com gradiente
GestureDetector(
onTap: () => {


Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (context) => const OnboardingView(),
),
)


},
],
),

const SizedBox(height: 25),

child: Container(
padding: const EdgeInsets.symmetric(horizontal:120, vertical: 15),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Theme.of(context).colorScheme.primary,
),
child: Text(
"Começar",
style: GoogleFonts.comfortaa(
color: Colors.white,
fontSize: 15,
fontWeight: FontWeight.w500, //coloca a fonte certa
//Titulo "arandú" com fonte amarante
Text(
"Arandú",
style: GoogleFonts.amarante(
textStyle: Theme.of(context).textTheme.bodyLarge?.copyWith(
fontSize: nameSize,
fontWeight: FontWeight.w500,
),
),
),
],
)));
}

),
)
),

Widget _startButton(BuildContext context) {
Size screenSize = MediaQuery.of(context).size;

double paddingHorizontal =
screenSize.width * 0.07; // largura da tela
double paddingVertical = screenSize.height * 0.025; // da altura da tela
return SingleChildScrollView(
child: GestureDetector(
onTap: () => {
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => const OnboardingView(),
),
const SizedBox(height:50),
],
)
)
)
},
child: Container(
padding: EdgeInsets.symmetric(
horizontal: paddingHorizontal, vertical: paddingVertical),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Theme.of(context).colorScheme.primary,
),
child: Text(
"Começar",
style: Theme.of(context).textTheme.bodyLarge?.apply(
color: Theme.of(context).colorScheme.onPrimary,
),
)),
),
);
}

}

0 comments on commit 4a486ea

Please sign in to comment.