Created
July 5, 2021 09:14
-
-
Save pszklarska/04c2abc0c7796eaf3da47ba1f80fc165 to your computer and use it in GitHub Desktop.
Flutter Redux User Snippet for IntelliJ IDEA
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
import 'package:flutter/material.dart'; | |
import 'package:flutter_redux/flutter_redux.dart'; | |
import 'package:redux/redux.dart'; | |
class $NAME$Page extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return StoreConnector<$END$AppState, $NAME$ViewModel>( | |
converter: (store) => $NAME$ViewModel(store), | |
builder: (context, viewModel) => _$NAME$Page(viewModel), | |
); | |
} | |
} | |
class _$NAME$Page extends StatelessWidget { | |
final $NAME$ViewModel viewModel; | |
_$NAME$Page(this.viewModel); | |
@override | |
Widget build(BuildContext context) { | |
return Container(); | |
} | |
} | |
@immutable | |
class $NAME$ViewModel { | |
$NAME$ViewModel(this._store); | |
final Store<AppState> _store; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment