mirror of
https://github.com/flutter/samples.git
synced 2026-07-17 06:21:41 +00:00
Adjust desktop_photo_search's lint rules (#816)
This commit is contained in:
@@ -37,12 +37,14 @@ void main() {
|
||||
create: (context) => PhotoSearchModel(
|
||||
Unsplash(accessKey: unsplashAccessKey),
|
||||
),
|
||||
child: UnsplashSearchApp(),
|
||||
child: const UnsplashSearchApp(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
class UnsplashSearchApp extends StatelessWidget {
|
||||
const UnsplashSearchApp({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
@@ -56,7 +58,7 @@ class UnsplashSearchApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class UnsplashHomePage extends StatelessWidget {
|
||||
const UnsplashHomePage({required this.title});
|
||||
const UnsplashHomePage({required this.title, Key? key}) : super(key: key);
|
||||
final String title;
|
||||
|
||||
@override
|
||||
@@ -70,7 +72,7 @@ class UnsplashHomePage extends StatelessWidget {
|
||||
showDialog<void>(
|
||||
context: context,
|
||||
builder: (context) =>
|
||||
PhotoSearchDialog(photoSearchModel.addSearch),
|
||||
PhotoSearchDialog(callback: photoSearchModel.addSearch),
|
||||
);
|
||||
},
|
||||
),
|
||||
@@ -139,7 +141,8 @@ class UnsplashHomePage extends StatelessWidget {
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: () => showDialog<void>(
|
||||
context: context,
|
||||
builder: (context) => PhotoSearchDialog(photoSearchModel.addSearch),
|
||||
builder: (context) =>
|
||||
PhotoSearchDialog(callback: photoSearchModel.addSearch),
|
||||
),
|
||||
tooltip: 'Search for a photo',
|
||||
child: const Icon(Icons.search),
|
||||
|
||||
Reference in New Issue
Block a user