1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-10 14:58:34 +00:00

Veggie seasons update (#518)

This commit is contained in:
Filip Hracek
2020-08-13 13:55:11 -07:00
committed by GitHub
parent e73b132ce5
commit af0858b69d
15 changed files with 135 additions and 119 deletions

View File

@@ -1,6 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/widgets.dart';
import 'package:scoped_model/scoped_model.dart';
import 'package:provider/provider.dart';
import 'package:veggieseasons/data/app_state.dart';
import 'package:veggieseasons/data/veggie.dart';
import 'package:veggieseasons/styles.dart';
@@ -48,8 +48,7 @@ class _TriviaViewState extends State<TriviaView> {
void didChangeDependencies() {
super.didChangeDependencies();
final newAppState =
ScopedModel.of<AppState>(context, rebuildOnChange: true);
final newAppState = Provider.of<AppState>(context);
setState(() {
appState = newAppState;