Add spaces after flow control statements (#126320)

This commit is contained in:
Tomasz Gucio
2023-05-15 11:07:30 +02:00
committed by GitHub
parent 231e00d26b
commit 99c7e9f088
116 changed files with 264 additions and 174 deletions

View File

@@ -47,7 +47,7 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho
@Override
public void onMethodCall(MethodCall methodCall, MethodChannel.Result result) {
switch(methodCall.method) {
switch (methodCall.method) {
case "pipeFlutterViewEvents":
result.success(null);
return;

View File

@@ -49,7 +49,7 @@ public class SimplePlatformView implements PlatformView, MethodChannel.MethodCal
@Override
public void onMethodCall(MethodCall methodCall, MethodChannel.Result result) {
switch(methodCall.method) {
switch (methodCall.method) {
case "pipeTouchEvents":
touchPipe.enable();
result.success(null);

View File

@@ -31,7 +31,7 @@ class TouchPipe implements View.OnTouchListener {
}
public void disable() {
if(!mEnabled)
if (!mEnabled)
return;
mEnabled = false;
mView.setOnTouchListener(null);

View File

@@ -162,7 +162,7 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
diff.write(currentDiff);
}
return diff.toString();
} catch(e) {
} catch (e) {
return e.toString();
}
}

View File

@@ -111,7 +111,7 @@ class WindowManagerBodyState extends State<WindowManagerBody> {
setState(() {
_lastTestStatus = _LastTestStatus.success;
});
} catch(e) {
} catch (e) {
setState(() {
_lastTestStatus = _LastTestStatus.error;
lastError = '$e';
@@ -125,7 +125,7 @@ class WindowManagerBodyState extends State<WindowManagerBody> {
setState(() {
windowClickCount++;
});
} catch(e) {
} catch (e) {
setState(() {
_lastTestStatus = _LastTestStatus.error;
lastError = '$e';

View File

@@ -224,7 +224,7 @@ class _LeaveBehindListItem extends StatelessWidget {
}
},
confirmDismiss: !confirmDismiss ? null : (DismissDirection dismissDirection) async {
switch(dismissDirection) {
switch (dismissDirection) {
case DismissDirection.endToStart:
return await _showConfirmationDialog(context, 'archive') ?? false;
case DismissDirection.startToEnd:

View File

@@ -72,7 +72,7 @@ class ScrollableTabsDemoState extends State<ScrollableTabsDemo> with SingleTicke
return const UnderlineTabIndicator();
}
switch(_demoStyle) {
switch (_demoStyle) {
case TabsDemoStyle.iconsAndText:
return ShapeDecoration(
shape: const RoundedRectangleBorder(

View File

@@ -26,7 +26,7 @@ Set<String> _unTestedDemos = Set<String>.from(_allDemos);
class _MessageHandler {
static LiveWidgetController? controller;
Future<String> call(String message) async {
switch(message) {
switch (message) {
case 'demoNames':
return const JsonEncoder.withIndent(' ').convert(_allDemos);
case 'profileDemos':

View File

@@ -110,7 +110,7 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho
@Override
public void onMethodCall(MethodCall methodCall, MethodChannel.Result result) {
switch(methodCall.method) {
switch (methodCall.method) {
case "getStoragePermission":
if (permissionResult != null) {
result.error("error", "already waiting for permissions", null);

View File

@@ -50,7 +50,7 @@ public class SimplePlatformView implements PlatformView, MethodChannel.MethodCal
@Override
public void onMethodCall(MethodCall methodCall, MethodChannel.Result result) {
switch(methodCall.method) {
switch (methodCall.method) {
case "pipeTouchEvents":
touchPipe.enable();
result.success(null);

View File

@@ -31,7 +31,7 @@ class TouchPipe implements View.OnTouchListener {
}
public void disable() {
if(!mEnabled)
if (!mEnabled)
return;
mEnabled = false;
mView.setOnTouchListener(null);

View File

@@ -144,7 +144,7 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
diff.write(currentDiff);
}
return diff.toString();
} catch(e) {
} catch (e) {
return e.toString();
}
}

View File

@@ -145,7 +145,7 @@ class NestedViewEventBodyState extends State<NestedViewEventBody> {
setState(() {
_lastTestStatus = _LastTestStatus.success;
});
} catch(e) {
} catch (e) {
setState(() {
_lastTestStatus = _LastTestStatus.error;
lastError = '$e';
@@ -165,7 +165,7 @@ class NestedViewEventBodyState extends State<NestedViewEventBody> {
setState(() {
nestedViewClickCount++;
});
} catch(e) {
} catch (e) {
setState(() {
_lastTestStatus = _LastTestStatus.error;
lastError = '$e';