Skip to content

Instantly share code, notes, and snippets.

@viveky259259
Last active October 16, 2019 11:33
Show Gist options
  • Save viveky259259/db56396b0da4387b20f92fdcb4853a4b to your computer and use it in GitHub Desktop.
Save viveky259259/db56396b0da4387b20f92fdcb4853a4b to your computer and use it in GitHub Desktop.
BLoC Pattern for flutter -Part 3
import 'package:flutter_for_people/bloc/notes/note.model.dart';
class NoteState {}
///list of States
///1.Fetching 2.FetchingComplete 3. EmptyState 4. InitialState
class FetchingNoteState extends NoteState {}
class FetchingNoteCompleteState extends NoteState {
List<NoteModel> notes;
FetchingNoteCompleteState(this.notes);
}
class AddingNoteInProgressState extends NoteState {}
class AddingNoteCompleteState extends NoteState {}
class EmptyNoteState extends NoteState {}
class InitialNoteState extends NoteState {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment