-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f634996
commit 0da5a50
Showing
2 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
//import 'dart:convert'; | ||
|
||
class WelcomeModel { | ||
|
||
final String title; | ||
final String buttonText; | ||
|
||
WelcomeModel(this.title, this.buttonText); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:aranduapp/ui/welcome/model/WelcomeModel.dart'; | ||
import 'package:google_fonts/google_fonts.dart'; | ||
|
||
|
||
class WelcomeView extends StatelessWidget { | ||
final WelcomeModel model = WelcomeModel("Arandú","Começar"); | ||
|
||
WelcomeView({super.key}); | ||
|
||
@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, //centraliza logo no cículo | ||
children: [ | ||
Container( | ||
width: 278, | ||
height: 278, | ||
decoration: const BoxDecoration( | ||
shape: BoxShape.circle, | ||
gradient: LinearGradient( | ||
colors:[ | ||
Color(0xFFFB923C), | ||
Color(0xFFC2410C), | ||
], | ||
begin: Alignment.topLeft, | ||
end: Alignment.bottomLeft, | ||
), | ||
), | ||
), | ||
// comentado: Local onde a logo pode ser adicionada no futuro (CircleAvatar todo) | ||
//CircleAvatar( | ||
// radius: 100, | ||
// backgroundImage: AssetImage('//colocar a logo png'), | ||
// ), | ||
], | ||
), | ||
const SizedBox(height: 20), | ||
|
||
//Titulo "arandú" com fonte amarante | ||
Text( | ||
model.title, | ||
style: GoogleFonts.amarante( | ||
fontSize: 60, | ||
fontWeight: FontWeight.w500, | ||
), | ||
), | ||
const Spacer(), | ||
|
||
//Botão de começar com gradiente | ||
GestureDetector( | ||
onTap: () => navigateToNextPage(context), | ||
child: Container( | ||
padding: const EdgeInsets.symmetric(horizontal:120, vertical: 15), | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.circular(15), | ||
gradient: const LinearGradient( | ||
colors: [ | ||
Color(0xFFFB923C), | ||
Color(0xFFC2410C), | ||
], | ||
begin: Alignment.topLeft, | ||
end: Alignment.bottomLeft, | ||
), | ||
), | ||
child: Text( | ||
model.buttonText, | ||
style: GoogleFonts.comfortaa( | ||
color: Colors.white, | ||
fontSize: 15, | ||
fontWeight: FontWeight.w500, //coloca a fonte certa | ||
|
||
), | ||
) | ||
), | ||
|
||
), | ||
const SizedBox(height:50), | ||
], | ||
) | ||
) | ||
); | ||
} | ||
|
||
void navigateToNextPage(BuildContext context) { | ||
Navigator.pushNamed(context, "/login"); | ||
} | ||
} |