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
@override | |
Widget build(BuildContext context) { | |
final firebaseAuth = context.read(firebaseAuthProvider); | |
final database = context.read(databaseProvider); | |
return MaterialApp( | |
theme: ThemeData(primarySwatch: Colors.indigo), | |
debugShowCheckedModeBanner: false, | |
home: AuthWidget( | |
nonSignedInBuilder: (_) => Consumer( | |
builder: (context, watch, _) { | |
final didCompleteOnboarding = watch(onboardingViewModelProvider.state); | |
return didCompleteOnboarding ? SignInScreen() : OnboardingScreen(); | |
}, | |
), | |
signedInBuilder: (_) => RoomsFeed( | |
model: RoomsFeedViewModel(auth: firebaseAuth), | |
onSignOut: () {}, | |
), | |
), | |
onGenerateRoute: (settings) => AppRouter.onGenerateRoute(settings, firebaseAuth, database), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment