Skip to content

Instantly share code, notes, and snippets.

@chimon2000
Last active November 3, 2020 04:40
Show Gist options
  • Save chimon2000/c2c02ceea1622e0219db4896f57d6dd1 to your computer and use it in GitHub Desktop.
Save chimon2000/c2c02ceea1622e0219db4896f57d6dd1 to your computer and use it in GitHub Desktop.
state_example: bloc main
void main() {
// For widgets to be able to read providers, we need to wrap the entire
// application in a "BlocProvider" widget.
// This is where the state of our NotesCubit will be stored.
runApp(BlocProvider<NotesCubit>(create: (_) => NotesCubit(), child: App()));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment