fix block formatting (#29051)

This commit is contained in:
Alexandre Ardhuin
2019-03-09 09:03:11 +01:00
committed by GitHub
parent 0d3c150cfc
commit a0d1f93b07
107 changed files with 412 additions and 418 deletions

View File

@@ -67,7 +67,7 @@ class _CupertinoPickerDemoState extends State<CupertinoPickerDemo> {
),
child: GestureDetector(
// Blocks taps from propagating to the modal sheet and popping.
onTap: () {},
onTap: () { },
child: SafeArea(
top: false,
child: picker,

View File

@@ -513,7 +513,7 @@ class _DiamondBorder extends ShapeBorder {
}
@override
void paint(Canvas canvas, Rect rect, { TextDirection textDirection }) {}
void paint(Canvas canvas, Rect rect, { TextDirection textDirection }) { }
// This border doesn't support scaling.
@override

View File

@@ -60,7 +60,7 @@ class _SearchDemoState extends State<SearchDemo> {
? Icons.more_horiz
: Icons.more_vert,
),
onPressed: () {},
onPressed: () { },
),
],
),

View File

@@ -361,7 +361,7 @@ class _RecipePageState extends State<RecipePage> {
backgroundColor: Colors.transparent,
actions: <Widget>[
PopupMenuButton<String>(
onSelected: (String item) {},
onSelected: (String item) { },
itemBuilder: (BuildContext context) => <PopupMenuItem<String>>[
_buildMenuItem(Icons.share, 'Tweet recipe'),
_buildMenuItem(Icons.email, 'Email recipe'),

View File

@@ -118,18 +118,16 @@ class CutCornersBorder extends OutlineInputBorder {
} else {
final double extent = lerpDouble(0.0, gapExtent + gapPadding * 2.0, gapPercentage);
switch (textDirection) {
case TextDirection.rtl:
{
final Path path = _notchedCornerPath(outer.middleRect, gapStart + gapPadding - extent, extent);
canvas.drawPath(path, paint);
break;
}
case TextDirection.ltr:
{
final Path path = _notchedCornerPath(outer.middleRect, gapStart - gapPadding, extent);
canvas.drawPath(path, paint);
break;
}
case TextDirection.rtl: {
final Path path = _notchedCornerPath(outer.middleRect, gapStart + gapPadding - extent, extent);
canvas.drawPath(path, paint);
break;
}
case TextDirection.ltr: {
final Path path = _notchedCornerPath(outer.middleRect, gapStart - gapPadding, extent);
canvas.drawPath(path, paint);
break;
}
}
}
}

View File

@@ -144,7 +144,7 @@ class _VideoPlayPauseState extends State<VideoPlayPause> {
_VideoPlayPauseState() {
listener = () {
if (mounted)
setState(() {});
setState(() { });
};
}
@@ -221,7 +221,7 @@ class _FadeAnimationState extends State<FadeAnimation> with SingleTickerProvider
);
animationController.addListener(() {
if (mounted) {
setState(() {});
setState(() { });
}
});
animationController.forward(from: 0.0);
@@ -372,7 +372,7 @@ class _VideoDemoState extends State<VideoDemo> with SingleTickerProviderStateMix
await controller.initialize();
if (mounted) {
print('< VideoDemo initController "$name" done ${isDisposed ? "DISPOSED" : ""}');
setState(() {});
setState(() { });
}
}

View File

@@ -631,13 +631,13 @@ void main() {
handle.dispose();
});
testWidgets('overscroll_demo', (WidgetTester tester) async {
tester.binding.addTime(const Duration(seconds: 3));
final SemanticsHandle handle = tester.ensureSemantics();
await tester.pumpWidget(const MaterialApp(home: OverscrollDemo()));
await expectLater(tester, meetsGuideline(textContrastGuideline));
handle.dispose();
});
testWidgets('overscroll_demo', (WidgetTester tester) async {
tester.binding.addTime(const Duration(seconds: 3));
final SemanticsHandle handle = tester.ensureSemantics();
await tester.pumpWidget(const MaterialApp(home: OverscrollDemo()));
await expectLater(tester, meetsGuideline(textContrastGuideline));
handle.dispose();
});
testWidgets('page_selector_demo $themeName', (WidgetTester tester) async {
tester.binding.addTime(const Duration(seconds: 3));

View File

@@ -24,7 +24,7 @@ class Stock {
lastSale = 0.0;
try {
lastSale = double.parse(fields[2]);
} catch (_) {}
} catch (_) { }
symbol = fields[0];
name = fields[1];
marketCap = fields[4];