mirror of
https://github.com/flutter/samples.git
synced 2025-11-10 14:58:34 +00:00
Landing beta changes in master for the new stable release (#747)
This commit is contained in:
@@ -55,7 +55,7 @@ class FavoriteItemTile extends StatelessWidget {
|
||||
icon: Icon(Icons.close),
|
||||
onPressed: () {
|
||||
Provider.of<Favorites>(context, listen: false).remove(itemNo);
|
||||
Scaffold.of(context).showSnackBar(
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('Removed from favorites.'),
|
||||
duration: Duration(seconds: 1),
|
||||
|
||||
@@ -67,7 +67,7 @@ class ItemTile extends StatelessWidget {
|
||||
!favoritesList.items.contains(itemNo)
|
||||
? favoritesList.add(itemNo)
|
||||
: favoritesList.remove(itemNo);
|
||||
Scaffold.of(context).showSnackBar(
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(favoritesList.items.contains(itemNo)
|
||||
? 'Added to favorites.'
|
||||
|
||||
Reference in New Issue
Block a user