_state.dart 269 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 import 'package:flutter/foundation.dart'; import 'package:benckmark/item.dart'; class AppState with ChangeNotifier { List<Item> _items = sampleItems; List<Item> get items => _items; void addItem(Item item) { _items.add(item); notifyListeners(); } }