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

@@ -4,13 +4,13 @@
import 'dart:async';
import 'package:scoped_model/scoped_model.dart';
import 'package:flutter/cupertino.dart';
import 'package:veggieseasons/data/veggie.dart';
import 'package:shared_preferences/shared_preferences.dart';
/// A model class that mirrors the options in [SettingsScreen] and stores data
/// in shared preferences.
class Preferences extends Model {
class Preferences extends ChangeNotifier {
// Keys to use with shared preferences.
static const _caloriesKey = 'calories';
static const _preferredCategoriesKey = 'preferredCategories';