Skip to content

Instantly share code, notes, and snippets.

Avatar

Eric Windmill ericwindmill

View GitHub Profile
@ericwindmill
ericwindmill / main.dart
Last active May 22, 2020
FBE_Provider_final_example
View main.dart
import 'dart:async';
import 'dart:collection';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
class Product {
final String name;
final double cost;
Product({this.name, this.cost});
View main.dart
import 'dart:collection';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
class Person with ChangeNotifier {
Person({this.name, this.age});
final String name;
int age;
@ericwindmill
ericwindmill / main.dart
Created May 21, 2020
FBE_Provider_stream_provider
View main.dart
import 'dart:collection';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
class Person {
Person({this.name, this.initialAge});
final String name;
final int initialAge;
@ericwindmill
ericwindmill / main.dart
Created May 21, 2020
FBE_Provider_selector_provider
View main.dart
import 'dart:collection';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
class Person with ChangeNotifier {
Person({this.name, this.age});
final String name;
int age;
@ericwindmill
ericwindmill / main.dart
Created May 21, 2020
FBE_Provider_proxy_provider
View main.dart
import 'dart:collection';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
class Person with ChangeNotifier {
Person({this.name, this.age});
final String name;
int age;
@ericwindmill
ericwindmill / main.dart
Created May 21, 2020
FBE_Provider_future_provider
View main.dart
import 'dart:collection';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
class Person {
Person({this.name, this.age});
final String name;
int age;
}
@ericwindmill
ericwindmill / main.dart
Created May 21, 2020
FBE_Provider_context_of
View main.dart
import 'dart:collection';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter/foundation.dart';
import 'package:provider/provider.dart';
class Person with ChangeNotifier {
@ericwindmill
ericwindmill / main.dart
Created May 20, 2020
FBE_Provider_consumer_2
View main.dart
import 'dart:collection';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
class Person with ChangeNotifier {
Person({this.name, this.age});
final String name;
int age;
@ericwindmill
ericwindmill / main.dart
Created May 20, 2020
FBE_Provider_consumer
View main.dart
import 'dart:collection';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
class Person with ChangeNotifier {
Person({this.name, this.age});
final String name;
int age;
@ericwindmill
ericwindmill / main.dart
Created May 20, 2020
FBE_Provider_change_notifiter_provider.dart
View main.dart
import 'dart:collection'; // used in test.dart
import 'package:flutter/foundation.dart'; // used in test.dat
import 'package:flutter/material.dart';
class Person with ChangeNotifier {
Person({this.name, this.age});
final String name;
int age;
You can’t perform that action at this time.