Add spaces after flow control statements (#126320)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -31,7 +31,7 @@ class TouchPipe implements View.OnTouchListener {
|
||||
}
|
||||
|
||||
public void disable() {
|
||||
if(!mEnabled)
|
||||
if (!mEnabled)
|
||||
return;
|
||||
mEnabled = false;
|
||||
mView.setOnTouchListener(null);
|
||||
|
||||
@@ -162,7 +162,7 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
|
||||
diff.write(currentDiff);
|
||||
}
|
||||
return diff.toString();
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
return e.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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':
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -31,7 +31,7 @@ class TouchPipe implements View.OnTouchListener {
|
||||
}
|
||||
|
||||
public void disable() {
|
||||
if(!mEnabled)
|
||||
if (!mEnabled)
|
||||
return;
|
||||
mEnabled = false;
|
||||
mView.setOnTouchListener(null);
|
||||
|
||||
@@ -144,7 +144,7 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
|
||||
diff.write(currentDiff);
|
||||
}
|
||||
return diff.toString();
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
return e.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user