apply upcoming lint prefer_const_literals_to_create_immutables (#14029)
This commit is contained in:
committed by
GitHub
parent
5dc4ce85d9
commit
0fe1e5bf5b
@@ -267,7 +267,7 @@ class IconBar extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(left: 16.0, right: 16.0),
|
||||
child: new Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const IconWithText(Icons.thumb_up, 'Like'),
|
||||
const IconWithText(Icons.comment, 'Comment'),
|
||||
const IconWithText(Icons.share, 'Share'),
|
||||
@@ -438,10 +438,10 @@ class ItemImageBox extends StatelessWidget {
|
||||
borderRadius: new BorderRadius.circular(2.0)
|
||||
),
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: new RichText(
|
||||
text: new TextSpan(
|
||||
child: const RichText(
|
||||
text: const TextSpan(
|
||||
style: const TextStyle(color: Colors.white),
|
||||
children: <TextSpan>[
|
||||
children: const <TextSpan>[
|
||||
const TextSpan(
|
||||
text: 'Photo by '
|
||||
),
|
||||
@@ -560,7 +560,7 @@ class BottomBar extends StatelessWidget {
|
||||
),
|
||||
child: new Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const BottomBarButton(Icons.new_releases, 'News'),
|
||||
const BottomBarButton(Icons.people, 'Requests'),
|
||||
const BottomBarButton(Icons.chat, 'Messenger'),
|
||||
|
||||
@@ -66,7 +66,7 @@ class DriverTestAppState extends State<DriverTestApp> {
|
||||
_selectedValue = newValue;
|
||||
});
|
||||
},
|
||||
items: <DropdownMenuItem<Letter>>[
|
||||
items: const <DropdownMenuItem<Letter>>[
|
||||
const DropdownMenuItem<Letter>(
|
||||
value: Letter.a,
|
||||
child: const Text('Aaa', key: const ValueKey<String>('a')),
|
||||
|
||||
@@ -347,8 +347,8 @@ class CardCollectionState extends State<CardCollection> {
|
||||
return new LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: <Color>[const Color(0x00FFFFFF), const Color(0xFFFFFFFF)],
|
||||
stops: <double>[0.1, 0.35],
|
||||
colors: const <Color>[const Color(0x00FFFFFF), const Color(0xFFFFFFFF)],
|
||||
stops: const <double>[0.1, 0.35],
|
||||
)
|
||||
.createShader(bounds);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user