Skip to content

Instantly share code, notes, and snippets.

@pszklarska
Created July 5, 2021 09:14
Show Gist options
  • Save pszklarska/04c2abc0c7796eaf3da47ba1f80fc165 to your computer and use it in GitHub Desktop.
Save pszklarska/04c2abc0c7796eaf3da47ba1f80fc165 to your computer and use it in GitHub Desktop.
Flutter Redux User Snippet for IntelliJ IDEA
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