Created
February 18, 2020 16:54
-
-
Save ananevam/2a82a60089894acff217900fe92830e5 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
@override | |
Widget build(BuildContext context) { | |
return BlocProvider( | |
create: (BuildContext context) { | |
_welcomeBloc = WelcomeBloc(); | |
_welcomeBloc.add(WelcomeFetch()); | |
return _welcomeBloc; | |
}, | |
child: CupertinoPageScaffold(child: BlocBuilder<WelcomeBloc, WelcomeState>( | |
builder: (context, state) { | |
print(state); | |
if (state is WelcomeUninitialized) { | |
return LoadView(); | |
} | |
if (state is WelcomeLoaded) { | |
return welcomeLoaded(state); | |
} | |
return Container(); | |
})), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment