Skip to content

Instantly share code, notes, and snippets.

@lesnitsky
Last active October 29, 2021 16:00
Show Gist options
  • Save lesnitsky/74078684ee9798e8741142b00df87e3b to your computer and use it in GitHub Desktop.
Save lesnitsky/74078684ee9798e8741142b00df87e3b to your computer and use it in GitHub Desktop.
wrappers registration + redux
void main() {
final store = Store<int>(counterReducer, initialState: 0);
Flutter.registerWrapperWidget(StoreProvider(store: store)); // proposed API
runApp();
}
class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Home(),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment