1
0
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:
Brett Morgan
2021-06-05 12:24:28 +10:00
committed by GitHub
parent 14921d0c06
commit 936d1fdaae
230 changed files with 2361 additions and 2444 deletions

View File

@@ -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'),
)
],
),