Skip to content

Instantly share code, notes, and snippets.

☕️
coding

Felix Angelov felangel

☕️
coding
Block or report user

Report or block felangel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@felangel
felangel / models.dart
Created Aug 4, 2019
[flutter_firestore_todos] models barrel
View models.dart
export 'todo.dart';
@felangel
felangel / todo.dart
Created Aug 4, 2019
[flutter_firestore_todos] todo entity
View todo.dart
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);
@felangel
felangel / entities.dart
Created Aug 4, 2019
[flutter_firestore_todos] entities barrel
View entities.dart
export 'todo_entity.dart';
@felangel
felangel / todos_repository.dart
Created Aug 4, 2019
[flutter_firestore_todos] todos_repository root
View todos_repository.dart
library todos_repository;
export 'src/firebase_todos_repository.dart';
export 'src/models/models.dart';
export 'src/todos_repository.dart';
@felangel
felangel / pubspec.yaml
Created Aug 4, 2019
[flutter_firestore_todos] pubspec
View pubspec.yaml
name: todos_repository
version: 1.0.0+1
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
@felangel
felangel / main.dart
Created Jul 9, 2019
[flutter_bloc_0.19.0] MultiRepositoryProvider
View main.dart
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MultiRepositoryProvider(
providers: [
RepositoryProvider<RepositoryA>(
builder: (context) => RepositoryA(),
),
RepositoryProvider<RepositoryB>(
builder: (context) => RepositoryB(),
@felangel
felangel / main.dart
Created Jul 9, 2019
[flutter_bloc_0.19.0] Nested RepositoryProvider
View main.dart
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(),
@felangel
felangel / main.dart
Created Jul 9, 2019
[flutter_bloc_0.19.0] MultiBlocProvider
View main.dart
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MultiBlocProvider(
providers: [
BlocProvider<BlocA>(
builder: (BuildContext context) => BlocA(),
),
BlocProvider<BlocB>(
builder: (BuildContext context) => BlocB(),
@felangel
felangel / main.dart
Created Jul 9, 2019
[flutter_bloc_0.19.0] Nested BlocProviders
View main.dart
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(),
@felangel
felangel / main.dart
Created Jul 9, 2019
[flutter_bloc_0.19.0] Repository Provider default constructor
View main.dart
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return RepositoryProvider(
builder: (context) => MyRepository(),
child: MyChild(),
);
}
}
You can’t perform that action at this time.