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:
committed by
GitHub
parent
046f960ae2
commit
387f885481
@@ -163,7 +163,7 @@ void main() {
|
||||
style: TextStyle(fontSize: 14.0, color: Colors.yellowAccent),
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
)
|
||||
));
|
||||
@@ -349,10 +349,10 @@ void main() {
|
||||
child: GestureDetector(
|
||||
onTap: () {},
|
||||
child: const SizedBox(width: 4.0, height: 4.0),
|
||||
)
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
)
|
||||
));
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ void main() {
|
||||
|
||||
class WidgetControllerSpy extends WidgetController {
|
||||
WidgetControllerSpy(
|
||||
TestWidgetsFlutterBinding binding
|
||||
TestWidgetsFlutterBinding binding,
|
||||
) : super(binding) {
|
||||
_binding = binding;
|
||||
}
|
||||
@@ -250,7 +250,7 @@ class WidgetControllerSpy extends WidgetController {
|
||||
pointer: pointer ?? _getNextPointer(),
|
||||
kind: kind,
|
||||
dispatcher: sendEventToBinding,
|
||||
hitTester: hitTestOnBinding
|
||||
hitTester: hitTestOnBinding,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -260,7 +260,7 @@ class TestGestureSpy extends TestGesture {
|
||||
int pointer,
|
||||
PointerDeviceKind kind,
|
||||
EventDispatcher dispatcher,
|
||||
HitTester hitTester
|
||||
HitTester hitTester,
|
||||
}) : super(
|
||||
pointer: pointer,
|
||||
kind: kind,
|
||||
|
||||
@@ -21,7 +21,7 @@ void main() {
|
||||
TextSpan(text: 't', children: <TextSpan>[
|
||||
TextSpan(text: 'e'),
|
||||
TextSpan(text: 'st'),
|
||||
]
|
||||
],
|
||||
),
|
||||
)));
|
||||
|
||||
@@ -68,7 +68,7 @@ void main() {
|
||||
),
|
||||
Container(
|
||||
child: const Text('2'),
|
||||
)
|
||||
),
|
||||
],
|
||||
)),
|
||||
);
|
||||
|
||||
@@ -225,7 +225,7 @@ void main() {
|
||||
Path(),
|
||||
coversSameAreaAs(
|
||||
Path(),
|
||||
areaToCompare: Rect.fromLTRB(0.0, 0.0, 10.0, 10.0)
|
||||
areaToCompare: Rect.fromLTRB(0.0, 0.0, 10.0, 10.0),
|
||||
),
|
||||
);
|
||||
});
|
||||
@@ -237,7 +237,7 @@ void main() {
|
||||
Path(),
|
||||
isNot(coversSameAreaAs(
|
||||
rectPath,
|
||||
areaToCompare: Rect.fromLTRB(0.0, 0.0, 10.0, 10.0)
|
||||
areaToCompare: Rect.fromLTRB(0.0, 0.0, 10.0, 10.0),
|
||||
)),
|
||||
);
|
||||
});
|
||||
@@ -250,7 +250,7 @@ void main() {
|
||||
Path(),
|
||||
coversSameAreaAs(
|
||||
rectPath,
|
||||
areaToCompare: Rect.fromLTRB(0.0, 0.0, 4.0, 4.0)
|
||||
areaToCompare: Rect.fromLTRB(0.0, 0.0, 4.0, 4.0),
|
||||
),
|
||||
);
|
||||
});
|
||||
@@ -268,7 +268,7 @@ void main() {
|
||||
linePath,
|
||||
coversSameAreaAs(
|
||||
rectPath,
|
||||
areaToCompare: Rect.fromLTRB(0.0, 0.0, 10.0, 10.0)
|
||||
areaToCompare: Rect.fromLTRB(0.0, 0.0, 10.0, 10.0),
|
||||
),
|
||||
);
|
||||
});
|
||||
@@ -286,7 +286,7 @@ void main() {
|
||||
linePath,
|
||||
isNot(coversSameAreaAs(
|
||||
rectPath,
|
||||
areaToCompare: Rect.fromLTRB(0.0, 0.0, 10.0, 10.0)
|
||||
areaToCompare: Rect.fromLTRB(0.0, 0.0, 10.0, 10.0),
|
||||
)),
|
||||
);
|
||||
});
|
||||
@@ -426,7 +426,7 @@ void main() {
|
||||
onLongPressHint: 'fill',
|
||||
customActions: <CustomSemanticsAction>[
|
||||
const CustomSemanticsAction(label: 'foo'),
|
||||
const CustomSemanticsAction(label: 'bar')
|
||||
const CustomSemanticsAction(label: 'bar'),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -447,7 +447,7 @@ void main() {
|
||||
onLongPressHint: 'fill',
|
||||
customActions: <CustomSemanticsAction>[
|
||||
const CustomSemanticsAction(label: 'foo'),
|
||||
const CustomSemanticsAction(label: 'barz')
|
||||
const CustomSemanticsAction(label: 'barz'),
|
||||
],
|
||||
)),
|
||||
);
|
||||
@@ -468,7 +468,7 @@ void main() {
|
||||
onLongPressHint: 'fills',
|
||||
customActions: <CustomSemanticsAction>[
|
||||
const CustomSemanticsAction(label: 'foo'),
|
||||
const CustomSemanticsAction(label: 'bar')
|
||||
const CustomSemanticsAction(label: 'bar'),
|
||||
],
|
||||
)),
|
||||
);
|
||||
|
||||
@@ -223,7 +223,7 @@ void main() {
|
||||
try {
|
||||
expect(find.descendant(
|
||||
of: find.widgetWithText(Column, 'foo'),
|
||||
matching: find.text('bar')
|
||||
matching: find.text('bar'),
|
||||
), findsOneWidget);
|
||||
} catch (e) {
|
||||
failure = e;
|
||||
@@ -421,7 +421,7 @@ void main() {
|
||||
testWidgets('hasRunningAnimations control test', (WidgetTester tester) async {
|
||||
final AnimationController controller = AnimationController(
|
||||
duration: const Duration(seconds: 1),
|
||||
vsync: const TestVSync()
|
||||
vsync: const TestVSync(),
|
||||
);
|
||||
expect(tester.hasRunningAnimations, isFalse);
|
||||
controller.forward();
|
||||
@@ -437,7 +437,7 @@ void main() {
|
||||
testWidgets('pumpAndSettle control test', (WidgetTester tester) async {
|
||||
final AnimationController controller = AnimationController(
|
||||
duration: const Duration(minutes: 525600),
|
||||
vsync: const TestVSync()
|
||||
vsync: const TestVSync(),
|
||||
);
|
||||
expect(await tester.pumpAndSettle(), 1);
|
||||
controller.forward();
|
||||
@@ -574,7 +574,7 @@ void main() {
|
||||
body: Container(
|
||||
child: OutlineButton(
|
||||
onPressed: () {},
|
||||
child: const Text('hello')
|
||||
child: const Text('hello'),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -605,7 +605,7 @@ void main() {
|
||||
child: Container(),
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -20,7 +20,7 @@ void main() {
|
||||
},
|
||||
propertyFaker: (TestWidgetsFlutterBinding binding, double fakeValue) {
|
||||
binding.window.devicePixelRatioTestValue = fakeValue;
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -34,7 +34,7 @@ void main() {
|
||||
},
|
||||
propertyFaker: (TestWidgetsFlutterBinding binding, Size fakeValue) {
|
||||
binding.window.physicalSizeTestValue = fakeValue;
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -48,7 +48,7 @@ void main() {
|
||||
},
|
||||
propertyFaker: (TestWidgetsFlutterBinding binding, WindowPadding fakeValue) {
|
||||
binding.window.viewInsetsTestValue = fakeValue;
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -62,7 +62,7 @@ void main() {
|
||||
},
|
||||
propertyFaker: (TestWidgetsFlutterBinding binding, WindowPadding fakeValue) {
|
||||
binding.window.paddingTestValue = fakeValue;
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -76,7 +76,7 @@ void main() {
|
||||
},
|
||||
propertyFaker: (TestWidgetsFlutterBinding binding, Locale fakeValue) {
|
||||
binding.window.localeTestValue = fakeValue;
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -90,7 +90,7 @@ void main() {
|
||||
},
|
||||
propertyFaker: (TestWidgetsFlutterBinding binding, List<Locale> fakeValue) {
|
||||
binding.window.localesTestValue = fakeValue;
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -104,7 +104,7 @@ void main() {
|
||||
},
|
||||
propertyFaker: (TestWidgetsFlutterBinding binding, double fakeValue) {
|
||||
binding.window.textScaleFactorTestValue = fakeValue;
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -118,7 +118,7 @@ void main() {
|
||||
},
|
||||
propertyFaker: (TestWidgetsFlutterBinding binding, bool fakeValue) {
|
||||
binding.window.alwaysUse24HourFormatTestValue = fakeValue;
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -132,7 +132,7 @@ void main() {
|
||||
},
|
||||
propertyFaker: (TestWidgetsFlutterBinding binding, String fakeValue) {
|
||||
binding.window.defaultRouteNameTestValue = fakeValue;
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -146,7 +146,7 @@ void main() {
|
||||
},
|
||||
propertyFaker: (TestWidgetsFlutterBinding binding, AccessibilityFeatures fakeValue) {
|
||||
binding.window.accessibilityFeaturesTestValue = fakeValue;
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
@@ -160,7 +160,7 @@ void main() {
|
||||
},
|
||||
propertyFaker: (TestWidgetsFlutterBinding binding, Brightness fakeValue) {
|
||||
binding.window.platformBrightnessTestValue = fakeValue;
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user