From 4727967a5738e6225dfd287f0a2010b44c44defa Mon Sep 17 00:00:00 2001 From: Juan Felipe Duarte <70235683+DuarteJFelipe@users.noreply.github.com> Date: Tue, 28 Mar 2023 21:33:13 -0500 Subject: [PATCH] usuario autentificado --- lib/main.dart | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 7a856af..236a923 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -41,12 +41,21 @@ class MyApp extends StatelessWidget { const MyApp({super.key}); @override - Widget build(BuildContext context) => ChangeNotifierProvider( - create: (context) => GoogleSignProvider(), - child: MaterialApp( + Widget build(BuildContext context) { + if (_auth.currentUser == null) { + return MaterialApp( theme: ThemeData(fontFamily: 'Poppins'), debugShowCheckedModeBanner: false, title: 'ProsApp', home: LoginScreen(), - )); + ); + } else { + return MaterialApp( + theme: ThemeData(fontFamily: 'Poppins'), + debugShowCheckedModeBanner: false, + title: 'ProsApp', + home: WelcomeScreen(), + ); + } + } }