Unverified Commit a3dc90c4 authored by Ahmed Ashour's avatar Ahmed Ashour Committed by GitHub

Add space before curly parentheses. (#85306)

parent 76db0d74
......@@ -24,7 +24,7 @@ class _CullOpacityPageState extends State<CullOpacityPage> with SingleTickerProv
// This code uses a manual listener for historical reasons and will remain
// in order to preserve compatibility with the history of measurements for
// this benchmark.
_offsetY = Tween<double>(begin: 0, end: -1000.0).animate(_controller)..addListener((){
_offsetY = Tween<double>(begin: 0, end: -1000.0).animate(_controller)..addListener(() {
setState(() {});
});
_controller.repeat();
......
......@@ -44,7 +44,7 @@ class _LifeCycleSpyState extends State<LifeCycleSpy> with WidgetsBindingObserver
List<AppLifecycleState?>? _actualLifeCycleSequence;
@override
void initState(){
void initState() {
super.initState();
WidgetsBinding.instance?.addObserver(this);
_actualLifeCycleSequence = <AppLifecycleState?>[
......
......@@ -370,7 +370,7 @@ class LogicalKeyData {
}();
/// Returns the static map of printable representations.
static late final Map<String, String> printable = ((){
static late final Map<String, String> printable = (() {
final String printableKeys = File(path.join(dataRoot, 'printable.json',)).readAsStringSync();
return (json.decode(printableKeys) as Map<String, dynamic>)
.cast<String, String>();
......@@ -389,7 +389,7 @@ class LogicalKeyData {
/// These include synonyms for keys which don't have printable
/// representations, and appear in more than one place on the keyboard (e.g.
/// SHIFT, ALT, etc.).
static late final Map<String, List<String>> synonyms = ((){
static late final Map<String, List<String>> synonyms = (() {
final String synonymKeys = File(path.join(dataRoot, 'synonyms.json',)).readAsStringSync();
final Map<String, dynamic> dynamicSynonym = json.decode(synonymKeys) as Map<String, dynamic>;
return dynamicSynonym.map((String name, dynamic values) {
......
......@@ -364,7 +364,7 @@ class PhysicalKeyEntry {
/// the name from the various different names available, making sure that the
/// name isn't a Dart reserved word (if it is, then it adds the word "Key" to
/// the end of the name).
late final String constantName = ((){
late final String constantName = (() {
String? result;
if (name.isEmpty) {
// If it doesn't have a DomKey name then use the Chromium symbol name.
......
......@@ -1986,7 +1986,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
// label on top of it.
List<Widget> columns;
if (widget.mode == CupertinoTimerPickerMode.hms){
if (widget.mode == CupertinoTimerPickerMode.hms) {
// Pad the widget to make it as wide as `_kPickerWidth`.
pickerColumnWidth =
_kTimerPickerColumnIntrinsicWidth + (_kTimerPickerHalfColumnPadding * 2);
......
......@@ -1237,7 +1237,7 @@ class _FlutterErrorDetailsNode extends DiagnosticableNode<FlutterErrorDetails> {
@override
DiagnosticPropertiesBuilder? get builder {
final DiagnosticPropertiesBuilder? builder = super.builder;
if (builder == null){
if (builder == null) {
return null;
}
Iterable<DiagnosticsNode> properties = builder.properties;
......
......@@ -348,7 +348,7 @@ class ChangeNotifier implements Listenable {
if (_listeners[i] == null) {
// We swap this item with the next not null item.
int swapIndex = i + 1;
while(_listeners[swapIndex] == null){
while(_listeners[swapIndex] == null) {
swapIndex += 1;
}
_listeners[i] = _listeners[swapIndex];
......
......@@ -1835,7 +1835,7 @@ class _RawChipState extends State<RawChip> with MaterialStateMixin, TickerProvid
}
Widget? _wrapWithTooltip(String? tooltip, VoidCallback? callback, Widget? child) {
if(!widget.useDeleteButtonTooltip){
if(!widget.useDeleteButtonTooltip) {
return child;
}
if (child == null || callback == null || tooltip == null) {
......
......@@ -35,7 +35,7 @@ import 'theme.dart';
/// final List<int> _items = List<int>.generate(50, (int index) => index);
///
/// @override
/// Widget build(BuildContext context){
/// Widget build(BuildContext context) {
/// final ColorScheme colorScheme = Theme.of(context).colorScheme;
/// final Color oddItemColor = colorScheme.primary.withOpacity(0.05);
/// final Color evenItemColor = colorScheme.primary.withOpacity(0.15);
......@@ -238,7 +238,7 @@ class ReorderableListView extends StatefulWidget {
/// final List<int> _items = List<int>.generate(50, (int index) => index);
///
/// @override
/// Widget build(BuildContext context){
/// Widget build(BuildContext context) {
/// final ColorScheme colorScheme = Theme.of(context).colorScheme;
/// final Color oddItemColor = colorScheme.primary.withOpacity(0.05);
/// final Color evenItemColor = colorScheme.primary.withOpacity(0.15);
......
......@@ -119,7 +119,7 @@ import 'constants.dart';
/// ),
/// ),
/// body: TabBarView(
/// children: tabs.map((Tab tab){
/// children: tabs.map((Tab tab) {
/// return Center(
/// child: Text(
/// '${tab.text!} Tab',
......
......@@ -2325,7 +2325,7 @@ class VisualDensity with Diagnosticable {
///
/// The resulting minWidth and minHeight values are clamped to not exceed the
/// maxWidth and maxHeight values, respectively.
BoxConstraints effectiveConstraints(BoxConstraints constraints){
BoxConstraints effectiveConstraints(BoxConstraints constraints) {
assert(constraints != null && constraints.debugAssertIsValid());
return constraints.copyWith(
minWidth: (constraints.minWidth + baseSizeAdjustment.dx).clamp(0.0, constraints.maxWidth),
......
......@@ -327,7 +327,7 @@ class _TooltipState extends State<Tooltip> with SingleTickerProviderStateMixin {
}
final bool mouseIsConnected = RendererBinding.instance!.mouseTracker.mouseIsConnected;
if (mouseIsConnected != _mouseIsConnected) {
setState((){
setState(() {
_mouseIsConnected = mouseIsConnected;
});
}
......
......@@ -718,7 +718,7 @@ abstract class ImageStreamCompleter with Diagnosticable {
/// [ImageStreamListener.onChunk] specified) to notify them of a new
/// [ImageChunkEvent].
@protected
void reportImageChunkEvent(ImageChunkEvent event){
void reportImageChunkEvent(ImageChunkEvent event) {
_checkDisposed();
if (hasListeners) {
// Make a copy to allow for concurrent modification.
......
......@@ -2527,7 +2527,7 @@ class FollowerLayer extends ContainerLayer {
if (a.depth < b.depth) {
ancestorsB.add(b.parent);
return _pathsToCommonAncestor(a, b.parent, ancestorsA, ancestorsB);
} else if (a.depth > b.depth){
} else if (a.depth > b.depth) {
ancestorsA.add(a.parent);
return _pathsToCommonAncestor(a.parent, b, ancestorsA, ancestorsB);
}
......
......@@ -153,7 +153,7 @@ abstract class RenderSliverFixedExtentBoxAdaptor extends RenderSliverMultiBoxAda
int _calculateLeadingGarbage(int firstIndex) {
RenderBox? walker = firstChild;
int leadingGarbage = 0;
while(walker != null && indexOf(walker) < firstIndex){
while(walker != null && indexOf(walker) < firstIndex) {
leadingGarbage += 1;
walker = childAfter(walker);
}
......@@ -163,7 +163,7 @@ abstract class RenderSliverFixedExtentBoxAdaptor extends RenderSliverMultiBoxAda
int _calculateTrailingGarbage(int targetLastIndex) {
RenderBox? walker = lastChild;
int trailingGarbage = 0;
while(walker != null && indexOf(walker) > targetLastIndex){
while(walker != null && indexOf(walker) > targetLastIndex) {
trailingGarbage += 1;
walker = childBefore(walker);
}
......
......@@ -248,7 +248,7 @@ abstract class RenderSliverMultiBoxAdaptor extends RenderSliver
/// Verify that the child list index is in strictly increasing order.
///
/// This has no effect in release builds.
bool _debugVerifyChildOrder(){
bool _debugVerifyChildOrder() {
if (_debugChildIntegrityEnabled) {
RenderBox? child = firstChild;
int index;
......
......@@ -170,7 +170,7 @@ abstract class RawKeyEventData {
if (side != null) {
result[key] = side;
}
assert((){
assert(() {
if (side == null) {
debugPrint(
'Raw key data is returning inconsistent information for '
......@@ -767,7 +767,7 @@ class RawKeyboard {
}
}
final Set<PhysicalKeyboardKey>? mappedKeys = _modifierKeyMap[_ModifierSidePair(key, modifiersPressed[key])];
assert((){
assert(() {
if (mappedKeys == null) {
debugPrint(
'Platform key support for ${Platform.operatingSystem} is '
......
......@@ -402,7 +402,7 @@ class AnimatedList extends StatefulWidget {
static AnimatedListState of(BuildContext context) {
assert(context != null);
final AnimatedListState? result = context.findAncestorStateOfType<AnimatedListState>();
assert((){
assert(() {
if (result == null) {
throw FlutterError.fromParts(<DiagnosticsNode>[
ErrorSummary('AnimatedList.of() called with a context that does not contain an AnimatedList.'),
......@@ -822,7 +822,7 @@ class SliverAnimatedList extends StatefulWidget {
static SliverAnimatedListState of(BuildContext context) {
assert(context != null);
final SliverAnimatedListState? result = context.findAncestorStateOfType<SliverAnimatedListState>();
assert((){
assert(() {
if (result == null) {
throw FlutterError(
'SliverAnimatedList.of() called with a context that does not contain a SliverAnimatedList.\n'
......
......@@ -1836,7 +1836,7 @@ class EditableTextState extends State<EditableText> with AutomaticKeepAliveClien
@override
void updateFloatingCursor(RawFloatingCursorPoint point) {
switch(point.state){
switch(point.state) {
case FloatingCursorDragState.Start:
if (_floatingCursorResetController.isAnimating) {
_floatingCursorResetController.stop();
......
......@@ -1425,7 +1425,7 @@ class FocusTraversalOrder extends InheritedWidget {
static FocusOrder of(BuildContext context) {
assert(context != null);
final FocusTraversalOrder? marker = context.getElementForInheritedWidgetOfExactType<FocusTraversalOrder>()?.widget as FocusTraversalOrder?;
assert((){
assert(() {
if (marker == null) {
throw FlutterError(
'FocusTraversalOrder.of() was called with a context that '
......
......@@ -3363,7 +3363,7 @@ class NavigatorState extends State<Navigator> with TickerProviderStateMixin, Res
@override
void initState() {
super.initState();
assert((){
assert(() {
if (widget.pages != const <Page<dynamic>>[]) {
// This navigator uses page API.
if (widget.pages.isEmpty) {
......@@ -3564,7 +3564,7 @@ class NavigatorState extends State<Navigator> with TickerProviderStateMixin, Res
@override
void didUpdateWidget(Navigator oldWidget) {
super.didUpdateWidget(oldWidget);
assert((){
assert(() {
if (widget.pages != const <Page<dynamic>>[]) {
// This navigator uses page API.
if (widget.pages.isEmpty) {
......@@ -3603,7 +3603,7 @@ class NavigatorState extends State<Navigator> with TickerProviderStateMixin, Res
_updateEffectiveObservers();
}
if (oldWidget.pages != widget.pages && !restorePending) {
assert((){
assert(() {
if (widget.pages.isEmpty) {
FlutterError.reportError(
FlutterErrorDetails(
......@@ -3626,7 +3626,7 @@ class NavigatorState extends State<Navigator> with TickerProviderStateMixin, Res
}
void _debugCheckDuplicatedPageKeys() {
assert((){
assert(() {
final Set<Key> keyReservation = <Key>{};
for (final Page<dynamic> page in widget.pages) {
final LocalKey? key = page.key;
......@@ -4513,7 +4513,7 @@ class NavigatorState extends State<Navigator> with TickerProviderStateMixin, Res
}
bool _debugCheckIsPagelessRoute(Route<dynamic> route) {
assert((){
assert(() {
if (route.settings is Page) {
FlutterError.reportError(
FlutterErrorDetails(
......
......@@ -899,7 +899,7 @@ class _PlatformViewLinkState extends State<PlatformViewLink> {
);
}
void _handlePlatformFocusChanged(bool isFocused){
void _handlePlatformFocusChanged(bool isFocused) {
if (isFocused) {
_focusNode!.requestFocus();
}
......
......@@ -244,7 +244,7 @@ class ReorderableList extends StatefulWidget {
static ReorderableListState of(BuildContext context) {
assert(context != null);
final ReorderableListState? result = context.findAncestorStateOfType<ReorderableListState>();
assert((){
assert(() {
if (result == null) {
throw FlutterError.fromParts(<DiagnosticsNode>[
ErrorSummary('ReorderableList.of() called with a context that does not contain a ReorderableList.'),
......@@ -450,7 +450,7 @@ class SliverReorderableList extends StatefulWidget {
static SliverReorderableListState of(BuildContext context) {
assert(context != null);
final SliverReorderableListState? result = context.findAncestorStateOfType<SliverReorderableListState>();
assert((){
assert(() {
if (result == null) {
throw FlutterError.fromParts(<DiagnosticsNode>[
ErrorSummary(
......
......@@ -197,7 +197,7 @@ Widget _chipWithOptionalDeleteButton({
required bool deletable,
TextDirection textDirection = TextDirection.ltr,
bool hasDeleteButtonTooltip = true,
}){
}) {
return _wrapForChip(
textDirection: textDirection,
child: Wrap(
......
......@@ -400,7 +400,7 @@ void main() {
testWidgets('DropdownButtonFormField - disabledHint displays when the items list is empty, when items is null', (WidgetTester tester) async {
final Key buttonKey = UniqueKey();
Widget build({ List<String>? items }){
Widget build({ List<String>? items }) {
return buildFormFrame(
items: items,
buttonKey: buttonKey,
......@@ -426,7 +426,7 @@ void main() {
(WidgetTester tester) async {
final Key buttonKey = UniqueKey();
Widget build({ List<String>? items }){
Widget build({ List<String>? items }) {
return buildFormFrame(
items: items,
buttonKey: buttonKey,
......@@ -448,7 +448,7 @@ void main() {
testWidgets('DropdownButtonFormField - disabledHint is null by default', (WidgetTester tester) async {
final Key buttonKey = UniqueKey();
Widget build({ List<String>? items }){
Widget build({ List<String>? items }) {
return buildFormFrame(
items: items,
buttonKey: buttonKey,
......@@ -468,7 +468,7 @@ void main() {
testWidgets('DropdownButtonFormField - disabledHint is null by default', (WidgetTester tester) async {
final Key buttonKey = UniqueKey();
Widget build({ List<String>? items }){
Widget build({ List<String>? items }) {
return buildFormFrame(
items: items,
buttonKey: buttonKey,
......@@ -488,7 +488,7 @@ void main() {
testWidgets('DropdownButtonFormField - disabledHint displays when onChanged is null', (WidgetTester tester) async {
final Key buttonKey = UniqueKey();
Widget build({ List<String>? items, ValueChanged<String?>? onChanged }){
Widget build({ List<String>? items, ValueChanged<String?>? onChanged }) {
return buildFormFrame(
items: items,
buttonKey: buttonKey,
......@@ -506,7 +506,7 @@ void main() {
testWidgets('DropdownButtonFormField - disabled hint should be of same size as enabled hint', (WidgetTester tester) async {
final Key buttonKey = UniqueKey();
Widget build({ List<String>? items}){
Widget build({ List<String>? items}) {
return buildFormFrame(
items: items,
buttonKey: buttonKey,
......
......@@ -1557,7 +1557,7 @@ void main() {
(WidgetTester tester) async {
final Key buttonKey = UniqueKey();
Widget build({ List<String>? items }){
Widget build({ List<String>? items }) {
return buildFrame(
items: items,
buttonKey: buttonKey,
......@@ -1579,7 +1579,7 @@ void main() {
testWidgets('DropdownButton disabledHint is null by default', (WidgetTester tester) async {
final Key buttonKey = UniqueKey();
Widget build({ List<String>? items }){
Widget build({ List<String>? items }) {
return buildFrame(
items: items,
buttonKey: buttonKey,
......
......@@ -1417,7 +1417,7 @@ void main() {
child: ListTile(
key: tileKey,
onTap: enabled ? () {
setState((){
setState(() {
tapped = true;
});
} : null,
......
......@@ -121,7 +121,7 @@ void main() {
maxLength: TextField.noMaxLength,
);
asserted = false;
} catch (e){
} catch (e) {
asserted = true;
}
expect(asserted, false);
......
......@@ -835,7 +835,7 @@ void main() {
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/56308
group('TextPainter line-height', () {
test('half-leading', (){
test('half-leading', () {
const TextStyle style = TextStyle(
height: 20,
fontSize: 1,
......@@ -858,7 +858,7 @@ void main() {
expect(insets.top, (20 - 1) / 2);
});
test('half-leading with small height', (){
test('half-leading with small height', () {
const TextStyle style = TextStyle(
height: 0.1,
fontSize: 10,
......@@ -882,7 +882,7 @@ void main() {
expect(insets.top, (1 - 10) / 2);
});
test('half-leading with leading trim', (){
test('half-leading with leading trim', () {
const TextStyle style = TextStyle(
height: 0.1,
fontSize: 10,
......@@ -908,7 +908,7 @@ void main() {
expect(glyphBox.topLeft, Offset.zero);
});
test('TextLeadingDistribution falls back to paragraph style', (){
test('TextLeadingDistribution falls back to paragraph style', () {
const TextStyle style = TextStyle(height: 20, fontSize: 1);
final TextPainter painter = TextPainter()
..textDirection = TextDirection.ltr
......@@ -928,7 +928,7 @@ void main() {
expect(insets.top, (20 - 1) / 2);
});
test('TextLeadingDistribution does nothing if height multiplier is null', (){
test('TextLeadingDistribution does nothing if height multiplier is null', () {
const TextStyle style = TextStyle(fontSize: 1);
final TextPainter painter = TextPainter()
..textDirection = TextDirection.ltr
......
......@@ -40,7 +40,7 @@ void main() {
expect(platformViewRenderBox.size, const Size(100, 100));
});
test('send semantics update if id is changed', (){
test('send semantics update if id is changed', () {
final RenderConstrainedBox tree = RenderConstrainedBox(
additionalConstraints: const BoxConstraints.tightFor(height: 20.0, width: 20.0),
child: platformViewRenderBox,
......
......@@ -1084,7 +1084,7 @@ void main() {
expect(tabController.index, 0);
// switch tabs 0 -> 1
setState((){
setState(() {
tabController.index = 1;
});
......@@ -1093,7 +1093,7 @@ void main() {
expect(tabController.index, 1);
// rebuild TabBarView that only have the 1st page with GlobalKey 'key1'
setState((){
setState(() {
tabBarViewCnt = 1;
tabController = TabController(length: tabBarViewCnt, vsync: const TestVSync());
});
......
......@@ -635,15 +635,15 @@ void main() {
body: Center(
child: InteractiveViewer(
transformationController: transformationController,
onInteractionStart: (ScaleStartDetails details){
onInteractionStart: (ScaleStartDetails details) {
calledStart = true;
},
onInteractionUpdate: (ScaleUpdateDetails details){
onInteractionUpdate: (ScaleUpdateDetails details) {
scaleChange = details.scale;
focalPoint = details.focalPoint;
localFocalPoint = details.localFocalPoint;
},
onInteractionEnd: (ScaleEndDetails details){
onInteractionEnd: (ScaleEndDetails details) {
currentVelocity = details.velocity;
},
child: const SizedBox(width: 200.0, height: 200.0),
......
......@@ -780,7 +780,7 @@ void main() {
),
'/A/B': (BuildContext context) => OnTapPage(
id: 'B',
onTap: (){
onTap: () {
Navigator.of(context).popUntil((Route<dynamic> route) => route.isFirst);
Navigator.of(context).pushReplacementNamed('/C');
},
......@@ -847,7 +847,7 @@ void main() {
),
'/A/B': (BuildContext context) => OnTapPage(
id: 'B',
onTap: (){
onTap: () {
// Pops all routes with bad predicate.
Navigator.of(context).popUntil((Route<dynamic> route) => false);
},
......@@ -2543,7 +2543,7 @@ void main() {
);
});
group('Page api', (){
group('Page api', () {
Widget buildNavigator({
required List<Page<dynamic>> pages,
required PopPageCallback onPopPage,
......@@ -2650,7 +2650,7 @@ void main() {
final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
'/' : (BuildContext context) => OnTapPage(
id: action,
onTap: (){
onTap: () {
if (action == 'push') {
Navigator.of(context).push(myPage.createRoute(context));
} else if (action == 'pushReplacement') {
......
......@@ -1080,7 +1080,7 @@ testWidgets('ChildBackButtonDispatcher take priority recursively', (WidgetTester
));
// Only update BackButtonListener widget.
setState((){
setState(() {
location = 'second callback';
});
......
......@@ -278,7 +278,7 @@ void main() {
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount:2),
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
itemCount: focusNodes.length,
itemBuilder: (BuildContext context, int index){
itemBuilder: (BuildContext context, int index) {
return Container(
height: 50,
color: Colors.green,
......@@ -590,7 +590,7 @@ void main() {
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount:2),
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.manual,
itemCount: focusNodes.length,
itemBuilder: (BuildContext context, int index){
itemBuilder: (BuildContext context, int index) {
return Container(
height: 50,
color: Colors.green,
......
......@@ -4648,7 +4648,7 @@ void main() {
MaterialApp(
home: SelectableText(
' blah blah',
onSelectionChanged: (TextSelection newSelection, SelectionChangedCause? cause){
onSelectionChanged: (TextSelection newSelection, SelectionChangedCause? cause) {
selection = newSelection;
},
),
......@@ -4694,7 +4694,7 @@ void main() {
child: Center(
child: SelectableText(
' blah blah',
onSelectionChanged: (TextSelection newSelection, SelectionChangedCause? cause){
onSelectionChanged: (TextSelection newSelection, SelectionChangedCause? cause) {
selection = newSelection;
},
),
......@@ -4747,7 +4747,7 @@ void main() {
child: Center(
child: SelectableText(
' blah blah \n blah',
onSelectionChanged: (TextSelection newSelection, SelectionChangedCause? cause){
onSelectionChanged: (TextSelection newSelection, SelectionChangedCause? cause) {
selection = newSelection;
},
),
......
......@@ -23,7 +23,7 @@ void main() {
PointerHoverEvent? hoverEvent;
await tester.pumpWidget(MaterialApp(home: MouseRegion(
child: const Text('Test'),
onHover: (PointerHoverEvent event){
onHover: (PointerHoverEvent event) {
hoverEvent = event;
},
)));
......
......@@ -706,11 +706,11 @@ void main() {
int numberOfVariationsRun = 0;
TargetPlatform? origTargetPlatform;
setUpAll((){
setUpAll(() {
origTargetPlatform = debugDefaultTargetPlatformOverride;
});
tearDownAll((){
tearDownAll(() {
expect(debugDefaultTargetPlatformOverride, equals(origTargetPlatform));
});
......
......@@ -1106,7 +1106,7 @@ class ArtifactUpdater {
}
@visibleForTesting
String flattenNameSubdirs(Uri url, FileSystem fileSystem){
String flattenNameSubdirs(Uri url, FileSystem fileSystem) {
final List<String> pieces = <String>[url.host, ...url.pathSegments];
final Iterable<String> convertedPieces = pieces.map<String>(_flattenNameNoSubdirs);
return fileSystem.path.joinAll(convertedPieces);
......
......@@ -96,7 +96,7 @@ class ChannelCommand extends FlutterCommand {
// only print non-missing channels
if (availableChannels[i]) {
String currentIndicator = ' ';
if (officialChannels[i] == currentChannel){
if (officialChannels[i] == currentChannel) {
currentIndicator = '*';
}
globals.printStatus('$currentIndicator ${officialChannels[i]}');
......
......@@ -308,7 +308,7 @@ class CreateCommand extends CreateBase {
_printPluginDirectoryLocationMessage(relativePluginPath, projectName, platformsString);
if (!creatingNewProject && requestedPlatforms.isNotEmpty) {
_printPluginUpdatePubspecMessage(relativePluginPath, platformsString);
} else if (_getSupportedPlatformsInPlugin(projectDir).isEmpty){
} else if (_getSupportedPlatformsInPlugin(projectDir).isEmpty) {
_printNoPluginMessage();
}
......
......@@ -266,7 +266,7 @@ abstract class DeviceManager {
.where((Device device) => device.ephemeral == true)
.toList();
if (ephemeralDevices.length == 1){
if (ephemeralDevices.length == 1) {
devices = ephemeralDevices;
}
}
......
......@@ -279,7 +279,7 @@ Map<String, dynamic> getDesiredCapabilities(Browser browser, bool headless, [Str
}
/// Converts [browserName] string to [Browser]
Browser _browserNameToEnum(String browserName){
Browser _browserNameToEnum(String browserName) {
switch (browserName) {
case 'android-chrome': return Browser.androidChrome;
case 'chrome': return Browser.chrome;
......
......@@ -834,7 +834,7 @@ dependencies:
const String newPluginName = 'flutterEngine.getPlugins().add(new plugin1.UseNewEmbedding());';
const String oldPluginName = 'abcplugin1.UseOldEmbedding.registerWith(shimPluginRegistry.registrarFor("abcplugin1.UseOldEmbedding"));';
final String content = registrant.readAsStringSync();
for(final String plugin in <String>[newPluginName,oldPluginName]){
for(final String plugin in <String>[newPluginName,oldPluginName]) {
expect(content, contains(plugin));
expect(content.split(plugin).first.trim().endsWith('try {'), isTrue);
expect(content.split(plugin).last.trim().startsWith('} catch(Exception e) {'), isTrue);
......
......@@ -277,7 +277,7 @@ void main() {
expectExists(pluginRegistrantClasses.childFile('GeneratedPluginRegistrant.m'));
});
testUsingContext('Version.json info is correct', (){
testUsingContext('Version.json info is correct', () {
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
final FlutterManifest manifest = FlutterManifest.createFromString('''
name: test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment