mirror of
https://github.com/flutter/samples.git
synced 2025-11-13 10:59:04 +00:00
Adjust desktop_photo_search's lint rules (#816)
This commit is contained in:
@@ -85,7 +85,8 @@ class FakeUnsplash implements Unsplash {
|
||||
const fabKey = Key('fab');
|
||||
|
||||
class PhotoSearchModelTester extends StatelessWidget {
|
||||
const PhotoSearchModelTester(this.query);
|
||||
const PhotoSearchModelTester({required this.query, Key? key})
|
||||
: super(key: key);
|
||||
final String query;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -110,7 +111,7 @@ void main() {
|
||||
final unsplashSearches = PhotoSearchModel(FakeUnsplash());
|
||||
final testWidget = ChangeNotifierProvider<PhotoSearchModel>(
|
||||
create: (context) => unsplashSearches,
|
||||
child: const PhotoSearchModelTester('clouds'),
|
||||
child: const PhotoSearchModelTester(query: 'clouds'),
|
||||
);
|
||||
await tester.pumpWidget(testWidget);
|
||||
expect(unsplashSearches.entries.length, 0);
|
||||
@@ -120,7 +121,7 @@ void main() {
|
||||
final unsplashSearches = PhotoSearchModel(FakeUnsplash());
|
||||
final testWidget = ChangeNotifierProvider<PhotoSearchModel>(
|
||||
create: (context) => unsplashSearches,
|
||||
child: const PhotoSearchModelTester('clouds'),
|
||||
child: const PhotoSearchModelTester(query: 'clouds'),
|
||||
);
|
||||
await tester.pumpWidget(testWidget);
|
||||
await tester.tap(find.byKey(fabKey));
|
||||
|
||||
Reference in New Issue
Block a user