Created
February 2, 2022 07:09
-
-
Save alperefesahin/23b0e6d1b7232ac40d961bfc121fbe7c to your computer and use it in GitHub Desktop.
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
class LandingPage extends StatelessWidget { | |
const LandingPage({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return FlowBuilder<AuthState>( | |
state: context.select((AuthCubit cubit) => cubit.state), | |
onGeneratePages: (authState, pages) { | |
if (authState.isSignedIn) { | |
return [HomePage.page()]; | |
} else { | |
return [SignInPage.page()]; | |
} | |
}, | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment