From 75b5d44fa3c8a4b6caa92d40cfcd5b15c8f1b0ce Mon Sep 17 00:00:00 2001 From: Gabriel Costa de Oliveira Date: Fri, 6 Dec 2024 23:09:58 -0300 Subject: [PATCH] feat(#58) Corrige welcome --- lib/main.dart | 3 +- lib/ui/welcome/model/WelcomeModel.dart | 10 ----- lib/ui/welcome/view/WelcomeView.dart | 59 +++++++++++++------------- 3 files changed, 31 insertions(+), 41 deletions(-) delete mode 100644 lib/ui/welcome/model/WelcomeModel.dart diff --git a/lib/main.dart b/lib/main.dart index b053769..104401d 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,4 +1,5 @@ import 'package:aranduapp/config/ThemeApp.dart'; +import 'package:aranduapp/ui/welcome/view/WelcomeView.dart'; import 'package:flutter/material.dart'; import 'package:aranduapp/ui/login/view/LoginView.dart'; @@ -15,7 +16,7 @@ class MyApp extends StatelessWidget { theme: ThemeApp.themeData(), darkTheme: ThemeApp.darkThemeData(), debugShowCheckedModeBanner: false, - home: Login(), + home: WelcomeView(), ); } } diff --git a/lib/ui/welcome/model/WelcomeModel.dart b/lib/ui/welcome/model/WelcomeModel.dart deleted file mode 100644 index 458119a..0000000 --- a/lib/ui/welcome/model/WelcomeModel.dart +++ /dev/null @@ -1,10 +0,0 @@ -//import 'dart:convert'; - -class WelcomeModel { - - final String title; - final String buttonText; - - WelcomeModel(this.title, this.buttonText); - -} diff --git a/lib/ui/welcome/view/WelcomeView.dart b/lib/ui/welcome/view/WelcomeView.dart index 770d0c7..93d3db7 100644 --- a/lib/ui/welcome/view/WelcomeView.dart +++ b/lib/ui/welcome/view/WelcomeView.dart @@ -1,10 +1,11 @@ +import 'package:aranduapp/core/log/Log.dart'; 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"); + //final WelcomeModel model = WelcomeModel("Arandú","Começar"); WelcomeView({super.key}); @@ -22,33 +23,33 @@ class WelcomeView extends StatelessWidget { Stack( alignment: Alignment.center, //centraliza logo no cículo children: [ + + + Container( width: 278, height: 278, - decoration: const BoxDecoration( + decoration: BoxDecoration( + color: Theme.of(context).colorScheme.primary, shape: BoxShape.circle, - gradient: LinearGradient( - colors:[ - Color(0xFFFB923C), - Color(0xFFC2410C), - ], - begin: Alignment.topLeft, - end: Alignment.bottomLeft, - ), + // 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, + "Arandú", style: GoogleFonts.amarante( fontSize: 60, fontWeight: FontWeight.w500, @@ -58,22 +59,23 @@ class WelcomeView extends StatelessWidget { //Botão de começar com gradiente GestureDetector( - onTap: () => navigateToNextPage(context), + onTap: () => Log.d("tap"), 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, - ), + color: Theme.of(context).colorScheme.primary, + // gradient: const LinearGradient( + // colors: [ + // Color(0xFFFB923C), + // Color(0xFFC2410C), + // ], + // begin: Alignment.topLeft, + // end: Alignment.bottomLeft, + // ), ), child: Text( - model.buttonText, + "Começar", style: GoogleFonts.comfortaa( color: Colors.white, fontSize: 15, @@ -91,7 +93,4 @@ class WelcomeView extends StatelessWidget { ); } - void navigateToNextPage(BuildContext context) { - Navigator.pushNamed(context, "/login"); - } -} \ No newline at end of file +}