Skip to content

Instantly share code, notes, and snippets.

@bangonkali
Created April 11, 2019 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bangonkali/a89f3860b50cdaddb3e82ec52847fedf to your computer and use it in GitHub Desktop.
Save bangonkali/a89f3860b50cdaddb3e82ec52847fedf to your computer and use it in GitHub Desktop.
Flutter Patterns
import 'package:json_annotation/json_annotation.dart';
import 'package:mobx/mobx.dart';
part 'elements_list_page_store.g.dart';
@JsonSerializable()
class ElementsListPageStore extends _TempElementsListPageStore {
ElementsListPageStore() : super();
factory ElementsListPageStore.fromJson(Map<String, dynamic> json) =>
_$ElementsListPageStoreFromJson(json);
Map<String, dynamic> toJson() => _$ElementsListPageStoreToJson(this);
}
class _TempElementsListPageStore = ElementsListPageStoreBase
with _$_TempElementsListPageStore;
abstract class ElementsListPageStoreBase implements Store {
ElementsListPageStoreBase();
@observable
String searchBarString;
@observable
String searchBarVisible;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment