Constants! Constants everywhere! (#9286)

Aggressively apply the const lint.
This commit is contained in:
Ian Hickson
2017-04-07 12:24:32 -07:00
committed by GitHub
parent 54bbb6fb4d
commit 3eb87830e9
197 changed files with 1312 additions and 1315 deletions

View File

@@ -61,7 +61,7 @@ class _MyHomePageState extends State<MyHomePage> {
child: new Center(
child: new Text(
'Platform button tapped $_counter time${ _counter == 1 ? '' : 's' }.',
style: new TextStyle(fontSize: 17.0))
style: const TextStyle(fontSize: 17.0))
),
),
new Container(
@@ -69,7 +69,7 @@ class _MyHomePageState extends State<MyHomePage> {
child: new Row(
children: <Widget>[
new Image.asset('assets/flutter-mark-square-64.png', scale: 1.5),
new Text('Flutter', style: new TextStyle(fontSize: 30.0)),
const Text('Flutter', style: const TextStyle(fontSize: 30.0)),
],
),
),
@@ -77,7 +77,7 @@ class _MyHomePageState extends State<MyHomePage> {
),
floatingActionButton: new FloatingActionButton(
onPressed: _sendFlutterIncrement,
child: new Icon(Icons.add),
child: const Icon(Icons.add),
),
);
}