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:meta/meta.dart'; | |
import '../entities/entities.dart'; | |
@immutable | |
class Todo { | |
final bool complete; | |
final String id; | |
final String note; | |
final String task; |
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
export 'todo.dart'; |
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:cloud_firestore/cloud_firestore.dart'; | |
import 'package:equatable/equatable.dart'; | |
class TodoEntity extends Equatable { | |
final bool complete; | |
final String id; | |
final String note; | |
final String task; | |
TodoEntity(this.task, this.id, this.note, this.complete); |
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
export 'todo_entity.dart'; |
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
library todos_repository; | |
export 'src/firebase_todos_repository.dart'; | |
export 'src/models/models.dart'; | |
export 'src/todos_repository.dart'; |
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
name: todos_repository | |
version: 1.0.0+1 | |
environment: | |
sdk: ">=2.1.0 <3.0.0" | |
dependencies: | |
flutter: | |
sdk: flutter |
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
class MyWidget extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MultiRepositoryProvider( | |
providers: [ | |
RepositoryProvider<RepositoryA>( | |
builder: (context) => RepositoryA(), | |
), | |
RepositoryProvider<RepositoryB>( | |
builder: (context) => RepositoryB(), |
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
class MyWidget extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return RepositoryProvider<RepositoryA>( | |
builder: (context) => RepositoryA(), | |
child: RepositoryProvider<RepositoryB>( | |
builder: (context) => RepositoryB(), | |
child: RepositoryProvider<RepositoryC>( | |
builder: (context) => RepositoryC(), | |
child: ChildA(), |
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
class MyWidget extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MultiBlocProvider( | |
providers: [ | |
BlocProvider<BlocA>( | |
builder: (BuildContext context) => BlocA(), | |
), | |
BlocProvider<BlocB>( | |
builder: (BuildContext context) => BlocB(), |
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
class MyWidget extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return BlocProvider<BlocA>( | |
builder: (BuildContext context) => BlocA(), | |
child: BlocProvider<BlocB>( | |
builder: (BuildContext context) => BlocB(), | |
child: BlocProvider<BlocC>( | |
builder: (BuildContext context) => BlocC(), | |
child: ChildA(), |