mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
Upgrading samples to flutter_lints, part 1 of n (#804)
This commit is contained in:
@@ -24,7 +24,7 @@ class _PlatformImageDemoState extends State<PlatformImageDemo> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Platform Image Demo'),
|
||||
title: const Text('Platform Image Demo'),
|
||||
),
|
||||
body: Center(
|
||||
child: Column(
|
||||
@@ -38,7 +38,7 @@ class _PlatformImageDemoState extends State<PlatformImageDemo> {
|
||||
future: imageData,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.none) {
|
||||
return Placeholder();
|
||||
return const Placeholder();
|
||||
} else if (snapshot.hasError) {
|
||||
return Center(
|
||||
child: Text(snapshot.error.toString()),
|
||||
@@ -50,12 +50,12 @@ class _PlatformImageDemoState extends State<PlatformImageDemo> {
|
||||
fit: BoxFit.fill,
|
||||
);
|
||||
}
|
||||
return CircularProgressIndicator();
|
||||
return const CircularProgressIndicator();
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
const SizedBox(
|
||||
height: 16,
|
||||
),
|
||||
ElevatedButton(
|
||||
@@ -66,7 +66,7 @@ class _PlatformImageDemoState extends State<PlatformImageDemo> {
|
||||
imageData = PlatformImageFetcher.getImage();
|
||||
});
|
||||
},
|
||||
child: Text('Get Image'),
|
||||
child: const Text('Get Image'),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user