This file contains hidden or 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:hive/hive.dart'; | |
part 'person.model.g.dart'; | |
@HiveType(typeId: 1) | |
class PersonModel{ | |
@HiveField(0) | |
int id; | |
@HiveField(1) | |
String name; |
This file contains hidden or 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'; | |
class TableExample extends StatefulWidget { | |
@override | |
_TableExampleState createState() => _TableExampleState(); | |
} | |
class _TableExampleState extends State<TableExample> { | |
@override | |
Widget build(BuildContext context) { |
This file contains hidden or 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_bloc/flutter_bloc.dart'; | |
import 'package:flutter_for_people/bloc/notes/note.bloc.dart'; | |
import 'package:flutter_for_people/bloc/notes/note.event.dart'; | |
import 'package:flutter_for_people/bloc/notes/note.state.dart'; | |
class NotesUi extends StatefulWidget { | |
@override | |
_NotesUiState createState() => _NotesUiState(); | |
} |
This file contains hidden or 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_bloc/flutter_bloc.dart'; | |
import 'package:flutter_for_people/bloc/notes/note.bloc.dart'; | |
import 'notes/note.add.ui.dart'; | |
import 'notes/note.ui.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { |
This file contains hidden or 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_bloc/flutter_bloc.dart'; | |
import 'package:flutter_for_people/bloc/notes/note.bloc.dart'; | |
import 'package:flutter_for_people/bloc/notes/note.event.dart'; | |
import 'package:flutter_for_people/bloc/notes/note.model.dart'; | |
import 'package:flutter_for_people/bloc/notes/note.state.dart'; | |
class NotesAddUi extends StatefulWidget { | |
@override | |
_NotesAddUiState createState() => _NotesAddUiState(); |
This file contains hidden or 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:bloc/bloc.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_for_people/bloc/notes/note.event.dart'; | |
import 'package:flutter_for_people/bloc/notes/note.model.dart'; | |
import 'package:flutter_for_people/bloc/notes/note.state.dart'; | |
import 'package:flutter_for_people/bloc/notes/note.storage.dart'; | |
import 'addnote/notes.add.ui.dart'; | |
class NoteBloc extends Bloc<NoteEvent, NoteState> { |
This file contains hidden or 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_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 { |
This file contains hidden or 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/cupertino.dart'; | |
import 'package:flutter_for_people/bloc/notes/note.model.dart'; | |
class NoteEvent {} | |
///list of events | |
/// 1.getNotes 2.add 3.remove 4.remove 5.viewDetailNote | |
class GetNotesEvent extends NoteEvent {} |
This file contains hidden or 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'; | |
class DrawerUi extends StatefulWidget { | |
@override | |
_DrawerUiState createState() => _DrawerUiState(); | |
} | |
class _DrawerUiState extends State<DrawerUi> { | |
@override | |
Widget build(BuildContext context) { |
This file contains hidden or 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
class NoteModel { | |
String _title; | |
String _description; | |
NoteModel(this._title, this._description); | |
String get description => _description; | |
String get title => _title; | |
} |