fix analyzer warning: use const where possible (#9320)

This commit is contained in:
Yegor
2017-04-10 14:20:47 -07:00
committed by GitHub
parent 5efbe05f04
commit a5593b1678
5 changed files with 7 additions and 7 deletions

View File

@@ -286,7 +286,7 @@ class CardCollectionState extends State<CardCollection> {
leftArrowIcon = new Opacity(opacity: 0.1, child: leftArrowIcon);
// TODO(abarth): This icon is wrong in RTL.
Widget rightArrowIcon = new Icon(Icons.arrow_forward, size: 36.0);
Widget rightArrowIcon = const Icon(Icons.arrow_forward, size: 36.0);
if (_dismissDirection == DismissDirection.endToStart)
rightArrowIcon = new Opacity(opacity: 0.1, child: rightArrowIcon);

View File

@@ -86,7 +86,7 @@ class PageViewAppState extends State<PageViewApp> {
children: <Widget>[
const DrawerHeader(child: const Center(child: const Text('Options'))),
new ListTile(
leading: new Icon(Icons.more_horiz),
leading: const Icon(Icons.more_horiz),
selected: scrollDirection == Axis.horizontal,
trailing: const Text('Horizontal Layout'),
onTap: switchScrollDirection,