1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-10 23:08:59 +00:00

Fixing desktop_photo_search (#583)

This commit is contained in:
Brett Morgan
2020-11-06 09:42:46 +11:00
committed by GitHub
parent 1ed40c656d
commit 3e7ab36a94
3 changed files with 52 additions and 54 deletions

View File

@@ -93,7 +93,10 @@ class PhotoSearchModelTester extends StatelessWidget {
home: FlatButton(
key: fabKey,
onPressed: () async {
await Provider.of<PhotoSearchModel>(context).addSearch(query);
await Provider.of<PhotoSearchModel>(
context,
listen: false,
).addSearch(query);
},
child: const Text('Search for a Photo'),
),