Add missing trailing commas (#28673)

* add trailing commas on list/map/parameters

* add trailing commas on Invocation with nb of arg>1

* add commas for widget containing widgets

* add trailing commas if instantiation contains trailing comma

* revert bad change
This commit is contained in:
Alexandre Ardhuin
2019-03-01 08:17:55 +01:00
committed by GitHub
parent 046f960ae2
commit 387f885481
626 changed files with 5183 additions and 5183 deletions

View File

@@ -20,11 +20,11 @@ class EnumIndex<E> {
EnumIndex(List<E> enumValues)
: _nameToValue = Map<String, E>.fromIterable(
enumValues,
key: _getSimpleName
key: _getSimpleName,
),
_valueToName = Map<E, String>.fromIterable(
enumValues,
value: _getSimpleName
value: _getSimpleName,
);
final Map<String, E> _nameToValue;

View File

@@ -32,6 +32,6 @@ class RenderTree extends Result {
@override
Map<String, dynamic> toJson() => <String, dynamic>{
'tree': tree
'tree': tree,
};
}

View File

@@ -322,7 +322,7 @@ class FlutterDriver {
message: 'Flutter Driver extension is taking a long time to become available. '
'Ensure your test app (often "lib/main.dart") imports '
'"package:flutter_driver/driver_extension.dart" and '
'calls enableFlutterDriverExtension() as the first call in main().'
'calls enableFlutterDriverExtension() as the first call in main().',
);
} else if (isolate.pauseEvent is VMPauseExitEvent ||
isolate.pauseEvent is VMPauseBreakpointEvent ||
@@ -725,7 +725,7 @@ class FlutterDriver {
try {
await _warnIfSlow<void>(
future: _peer.sendRequest(_setVMTimelineFlagsMethodName, <String, String>{
'recordedStreams': _timelineStreamsToString(streams)
'recordedStreams': _timelineStreamsToString(streams),
}),
timeout: timeout,
message: 'VM is taking an unusually long time to respond to being told to start tracing...',
@@ -797,7 +797,7 @@ class FlutterDriver {
/// operation exceeds the specified timeout; it does not actually cancel the
/// operation.
Future<void> clearTimeline({
Duration timeout = _kUnusuallyLongTimeout
Duration timeout = _kUnusuallyLongTimeout,
}) async {
assert(timeout != null);
try {

View File

@@ -42,7 +42,7 @@ class TimelineEvent {
: null,
json['ts'],
json['tts'],
json['args']
json['args'],
);
}
@@ -57,7 +57,7 @@ class TimelineEvent {
this.threadDuration,
this.timestampMicros,
this.threadTimestampMicros,
this.arguments
this.arguments,
);
/// The original event JSON.