add missing trailing commas in list/set/map literals (#102585)
This commit is contained in:
committed by
GitHub
parent
0b80f08cf0
commit
07f1c20474
@@ -59,7 +59,7 @@ class ActionSheetSample extends StatelessWidget {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: const Text('Destructive Action'),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -53,7 +53,7 @@ class ActionSheetSample extends StatelessWidget {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: const Text('Yes'),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -54,7 +54,7 @@ class CupertinoNavBarSample extends StatelessWidget {
|
||||
}));
|
||||
},
|
||||
child: const Text('Go to Next Page'),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -33,7 +33,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
List<Color> colors = <Color>[
|
||||
CupertinoColors.systemYellow,
|
||||
CupertinoColors.systemOrange,
|
||||
CupertinoColors.systemPink
|
||||
CupertinoColors.systemPink,
|
||||
];
|
||||
List<Widget> items = <Widget>[
|
||||
Container(color: CupertinoColors.systemPink, height: 100.0),
|
||||
|
||||
@@ -41,7 +41,7 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
style: style,
|
||||
onPressed: () {},
|
||||
child: const Text('Action 2'),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -49,7 +49,7 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
ElevatedButton(
|
||||
child: const Text('Close BottomSheet'),
|
||||
onPressed: () => Navigator.pop(context),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -51,7 +51,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
});
|
||||
},
|
||||
),
|
||||
Text('Volume : $_volume')
|
||||
Text('Volume : $_volume'),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ class CustomListItemTwo extends StatelessWidget {
|
||||
readDuration: readDuration,
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -267,7 +267,7 @@ class _HomeState extends State<Home> with TickerProviderStateMixin<Home> {
|
||||
Destination(0, 'Teal', Icons.home, Colors.teal),
|
||||
Destination(1, 'Cyan', Icons.business, Colors.cyan),
|
||||
Destination(2, 'Orange', Icons.school, Colors.orange),
|
||||
Destination(3, 'Blue', Icons.flight, Colors.blue)
|
||||
Destination(3, 'Blue', Icons.flight, Colors.blue),
|
||||
];
|
||||
|
||||
late final List<GlobalKey<NavigatorState>> navigatorKeys;
|
||||
|
||||
@@ -83,7 +83,7 @@ class _MyNavigationRailState extends State<MyNavigationRail> {
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ class _MyMenuBarAppState extends State<MyMenuBarApp> {
|
||||
onSelected: () {
|
||||
_handleMenuSelection(MenuSelection.about);
|
||||
},
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
PlatformMenuItemGroup(
|
||||
@@ -118,7 +118,7 @@ class _MyMenuBarAppState extends State<MyMenuBarApp> {
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
if (PlatformProvidedMenuItem.hasMenu(PlatformProvidedMenuItemType.quit))
|
||||
|
||||
@@ -65,7 +65,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
value: Menu.itemFour,
|
||||
child: Text('Item 4'),
|
||||
),
|
||||
])
|
||||
]),
|
||||
],
|
||||
),
|
||||
body: Center(
|
||||
|
||||
@@ -53,7 +53,7 @@ class MyScaffoldBody extends StatelessWidget {
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -53,7 +53,7 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -46,10 +46,11 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
const Text('BottomSheet'),
|
||||
ElevatedButton(
|
||||
child: const Text('Close BottomSheet'),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
})
|
||||
child: const Text('Close BottomSheet'),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -34,7 +34,7 @@ class ExampleWidget extends StatelessWidget {
|
||||
fontFamily: 'Sorts Mill Goudy',
|
||||
fontFeatures: <FontFeature>[
|
||||
FontFeature.historicalForms(), // Enables "hist".
|
||||
FontFeature.historicalLigatures() // Enables "hlig".
|
||||
FontFeature.historicalLigatures(), // Enables "hlig".
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -54,7 +54,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 16),
|
||||
child: Text('Result: ${snapshot.data}'),
|
||||
)
|
||||
),
|
||||
];
|
||||
} else if (snapshot.hasError) {
|
||||
children = <Widget>[
|
||||
@@ -66,7 +66,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 16),
|
||||
child: Text('Error: ${snapshot.error}'),
|
||||
)
|
||||
),
|
||||
];
|
||||
} else {
|
||||
children = const <Widget>[
|
||||
@@ -78,7 +78,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 16),
|
||||
child: Text('Awaiting result...'),
|
||||
)
|
||||
),
|
||||
];
|
||||
}
|
||||
return Center(
|
||||
|
||||
@@ -85,7 +85,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 16),
|
||||
child: Text('Select a lot'),
|
||||
)
|
||||
),
|
||||
];
|
||||
break;
|
||||
case ConnectionState.waiting:
|
||||
@@ -98,7 +98,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 16),
|
||||
child: Text('Awaiting bids...'),
|
||||
)
|
||||
),
|
||||
];
|
||||
break;
|
||||
case ConnectionState.active:
|
||||
@@ -111,7 +111,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 16),
|
||||
child: Text('\$${snapshot.data}'),
|
||||
)
|
||||
),
|
||||
];
|
||||
break;
|
||||
case ConnectionState.done:
|
||||
@@ -124,7 +124,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 16),
|
||||
child: Text('\$${snapshot.data} (closed)'),
|
||||
)
|
||||
),
|
||||
];
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -84,13 +84,13 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
TextField(
|
||||
controller: billingAddress1,
|
||||
autofillHints: const <String>[
|
||||
AutofillHints.streetAddressLine1
|
||||
AutofillHints.streetAddressLine1,
|
||||
],
|
||||
),
|
||||
TextField(
|
||||
controller: billingAddress2,
|
||||
autofillHints: const <String>[
|
||||
AutofillHints.streetAddressLine2
|
||||
AutofillHints.streetAddressLine2,
|
||||
],
|
||||
),
|
||||
],
|
||||
@@ -109,7 +109,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
TextField(
|
||||
controller: creditCardSecurityCode,
|
||||
autofillHints: const <String>[
|
||||
AutofillHints.creditCardSecurityCode
|
||||
AutofillHints.creditCardSecurityCode,
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
@@ -43,7 +43,7 @@ class _IVBuilderExampleState extends State<_IVBuilderExample> {
|
||||
for (final Vector3 point in <Vector3>[
|
||||
quad.point1,
|
||||
quad.point2,
|
||||
quad.point3
|
||||
quad.point3,
|
||||
]) {
|
||||
if (point.x < xMin) {
|
||||
xMin = point.x;
|
||||
|
||||
@@ -40,7 +40,7 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
expandedHeight: 200.0,
|
||||
forceElevated: innerBoxIsScrolled,
|
||||
),
|
||||
)
|
||||
),
|
||||
];
|
||||
}, body: Builder(builder: (BuildContext context) {
|
||||
return CustomScrollView(
|
||||
|
||||
@@ -33,7 +33,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
),
|
||||
ColorBoxPage(
|
||||
key: PageStorageKey<String>('pageTwo'),
|
||||
)
|
||||
),
|
||||
];
|
||||
int currentTab = 0;
|
||||
final PageStorageBucket _bucket = PageStorageBucket();
|
||||
|
||||
@@ -44,7 +44,7 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
),
|
||||
Center(
|
||||
child: Text('Third Page'),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
|
||||
blurRadius: 10.0,
|
||||
spreadRadius: 3.0,
|
||||
offset: Offset(0, 6.0),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
end: BoxDecoration(
|
||||
|
||||
@@ -80,7 +80,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
|
||||
childCount: 5,
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user