enable lint unnecessary_const (#19342)
This commit is contained in:
committed by
GitHub
parent
d10e46ea65
commit
cc1cf13eec
@@ -40,7 +40,7 @@ class DriverTestAppState extends State<DriverTestApp> {
|
||||
new RaisedButton(
|
||||
child: const Text(
|
||||
'toggle',
|
||||
key: const ValueKey<String>('togglePresent'),
|
||||
key: ValueKey<String>('togglePresent'),
|
||||
),
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
@@ -53,7 +53,7 @@ class DriverTestAppState extends State<DriverTestApp> {
|
||||
new Row(
|
||||
children: <Widget>[
|
||||
const Expanded(
|
||||
child: const Text('hit testability'),
|
||||
child: Text('hit testability'),
|
||||
),
|
||||
new DropdownButton<Letter>(
|
||||
key: const ValueKey<String>('dropdown'),
|
||||
@@ -64,24 +64,24 @@ class DriverTestAppState extends State<DriverTestApp> {
|
||||
});
|
||||
},
|
||||
items: const <DropdownMenuItem<Letter>>[
|
||||
const DropdownMenuItem<Letter>(
|
||||
DropdownMenuItem<Letter>(
|
||||
value: Letter.a,
|
||||
child: const Text('Aaa', key: const ValueKey<String>('a')),
|
||||
child: Text('Aaa', key: ValueKey<String>('a')),
|
||||
),
|
||||
const DropdownMenuItem<Letter>(
|
||||
DropdownMenuItem<Letter>(
|
||||
value: Letter.b,
|
||||
child: const Text('Bbb', key: const ValueKey<String>('b')),
|
||||
child: Text('Bbb', key: ValueKey<String>('b')),
|
||||
),
|
||||
const DropdownMenuItem<Letter>(
|
||||
DropdownMenuItem<Letter>(
|
||||
value: Letter.c,
|
||||
child: const Text('Ccc', key: const ValueKey<String>('c')),
|
||||
child: Text('Ccc', key: ValueKey<String>('c')),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
const TextField(
|
||||
key: const ValueKey<String>('enter-text-field'),
|
||||
key: ValueKey<String>('enter-text-field'),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -60,7 +60,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
height: MediaQuery.of(context).size.height,
|
||||
),
|
||||
const TextField(
|
||||
key: const ValueKey<String>(keys.kDefaultTextField),
|
||||
key: ValueKey<String>(keys.kDefaultTextField),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
void main() => runApp(const Center(child: const Text(
|
||||
void main() => runApp(const Center(child: Text(
|
||||
'flutter drive lib/xxx.dart',
|
||||
textDirection: TextDirection.ltr,
|
||||
)));
|
||||
|
||||
@@ -41,6 +41,6 @@ void main() {
|
||||
|
||||
imageBefore = imageAfter;
|
||||
}
|
||||
}, timeout: const Timeout(const Duration(minutes: 2)));
|
||||
}, timeout: const Timeout(Duration(minutes: 2)));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user