add missing trailing commas in list/set/map literals (#102585)

This commit is contained in:
Alexandre Ardhuin
2022-04-27 09:15:35 +02:00
committed by GitHub
parent 0b80f08cf0
commit 07f1c20474
271 changed files with 1236 additions and 1141 deletions

View File

@@ -59,7 +59,7 @@ class ActionSheetSample extends StatelessWidget {
Navigator.pop(context);
},
child: const Text('Destructive Action'),
)
),
],
),
);

View File

@@ -53,7 +53,7 @@ class ActionSheetSample extends StatelessWidget {
Navigator.pop(context);
},
child: const Text('Yes'),
)
),
],
),
);

View File

@@ -54,7 +54,7 @@ class CupertinoNavBarSample extends StatelessWidget {
}));
},
child: const Text('Go to Next Page'),
)
),
],
),
),

View File

@@ -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),

View File

@@ -41,7 +41,7 @@ class MyStatelessWidget extends StatelessWidget {
style: style,
onPressed: () {},
child: const Text('Action 2'),
)
),
],
),
);

View File

@@ -49,7 +49,7 @@ class MyStatelessWidget extends StatelessWidget {
ElevatedButton(
child: const Text('Close BottomSheet'),
onPressed: () => Navigator.pop(context),
)
),
],
),
),

View File

@@ -51,7 +51,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
});
},
),
Text('Volume : $_volume')
Text('Volume : $_volume'),
],
);
}

View File

@@ -140,7 +140,7 @@ class CustomListItemTwo extends StatelessWidget {
readDuration: readDuration,
),
),
)
),
],
),
),

View File

@@ -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;

View File

@@ -83,7 +83,7 @@ class _MyNavigationRailState extends State<MyNavigationRail> {
],
),
),
)
),
],
);
}

View File

@@ -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))

View File

@@ -65,7 +65,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
value: Menu.itemFour,
child: Text('Item 4'),
),
])
]),
],
),
body: Center(

View File

@@ -53,7 +53,7 @@ class MyScaffoldBody extends StatelessWidget {
onPressed: () {
Navigator.pop(context);
},
)
),
],
),
),

View File

@@ -53,7 +53,7 @@ class MyStatelessWidget extends StatelessWidget {
onPressed: () {
Navigator.pop(context);
},
)
),
],
),
),

View File

@@ -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);
},
),
],
),
),

View File

@@ -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".
],
),
);

View File

@@ -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(

View File

@@ -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;
}

View File

@@ -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,
],
),
],

View File

@@ -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;

View File

@@ -40,7 +40,7 @@ class MyStatelessWidget extends StatelessWidget {
expandedHeight: 200.0,
forceElevated: innerBoxIsScrolled,
),
)
),
];
}, body: Builder(builder: (BuildContext context) {
return CustomScrollView(

View File

@@ -33,7 +33,7 @@ class _MyHomePageState extends State<MyHomePage> {
),
ColorBoxPage(
key: PageStorageKey<String>('pageTwo'),
)
),
];
int currentTab = 0;
final PageStorageBucket _bucket = PageStorageBucket();

View File

@@ -44,7 +44,7 @@ class MyStatelessWidget extends StatelessWidget {
),
Center(
child: Text('Third Page'),
)
),
],
);
}

View File

@@ -43,7 +43,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
blurRadius: 10.0,
spreadRadius: 3.0,
offset: Offset(0, 6.0),
)
),
],
),
end: BoxDecoration(

View File

@@ -80,7 +80,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
childCount: 5,
),
),
)
),
]);
}
}