unnecessary parenthesis (#14533)
This commit is contained in:
parent
a37a8424b3
commit
bd1921ec84
@ -153,11 +153,11 @@ Press play to produce texture frames.''';
|
||||
],
|
||||
),
|
||||
),
|
||||
floatingActionButton: (_icon == null ? null : new FloatingActionButton(
|
||||
floatingActionButton: _icon == null ? null : new FloatingActionButton(
|
||||
key: const ValueKey<String>('fab'),
|
||||
child: new Icon(_icon),
|
||||
onPressed: _nextState,
|
||||
)),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -399,7 +399,7 @@ class _VideoDemoState extends State<VideoDemo>
|
||||
appBar: new AppBar(
|
||||
title: const Text('Videos'),
|
||||
),
|
||||
body: (isSupported)
|
||||
body: isSupported
|
||||
? new ConnectivityOverlay(
|
||||
child: new ListView(
|
||||
children: <Widget>[
|
||||
|
@ -109,7 +109,7 @@ class GestureDemoState extends State<GestureDemo> {
|
||||
|
||||
void _handleScaleUpdate(ScaleUpdateDetails details) {
|
||||
setState(() {
|
||||
_zoom = (_previousZoom * details.scale);
|
||||
_zoom = _previousZoom * details.scale;
|
||||
|
||||
// Ensure that item under the focal point stays in the same place despite zooming
|
||||
final Offset normalizedOffset = (_startingFocalPoint - _previousOffset) / _previousZoom;
|
||||
|
@ -117,7 +117,7 @@ class _FlexibleSpaceBarState extends State<FlexibleSpaceBar> {
|
||||
|
||||
// 0.0 -> Expanded
|
||||
// 1.0 -> Collapsed to toolbar
|
||||
final double t = (1.0 - (settings.currentExtent - settings.minExtent) / (deltaExtent)).clamp(0.0, 1.0);
|
||||
final double t = (1.0 - (settings.currentExtent - settings.minExtent) / deltaExtent).clamp(0.0, 1.0);
|
||||
|
||||
// background image
|
||||
if (widget.background != null) {
|
||||
|
@ -225,7 +225,7 @@ class ColorSwatch<T> extends Color {
|
||||
if (other.runtimeType != runtimeType)
|
||||
return false;
|
||||
final ColorSwatch<T> typedOther = other;
|
||||
return super==(other) && _swatch == typedOther._swatch;
|
||||
return super == other && _swatch == typedOther._swatch;
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -285,16 +285,16 @@ void main() {
|
||||
Color textColor(Key key) => tester.state<TestTextState>(find.byKey(key)).textStyle.color;
|
||||
|
||||
// A selected ListTile's leading, trailing, and text get the primary color by default
|
||||
await(tester.pumpWidget(buildFrame(selected: true)));
|
||||
await(tester.pump(const Duration(milliseconds: 300))); // DefaultTextStyle changes animate
|
||||
await tester.pumpWidget(buildFrame(selected: true));
|
||||
await tester.pump(const Duration(milliseconds: 300)); // DefaultTextStyle changes animate
|
||||
expect(iconColor(leadingKey), theme.primaryColor);
|
||||
expect(iconColor(trailingKey), theme.primaryColor);
|
||||
expect(textColor(titleKey), theme.primaryColor);
|
||||
expect(textColor(subtitleKey), theme.primaryColor);
|
||||
|
||||
// A selected ListTile's leading, trailing, and text get the ListTileTheme's selectedColor
|
||||
await(tester.pumpWidget(buildFrame(selected: true, selectedColor: green)));
|
||||
await(tester.pump(const Duration(milliseconds: 300))); // DefaultTextStyle changes animate
|
||||
await tester.pumpWidget(buildFrame(selected: true, selectedColor: green));
|
||||
await tester.pump(const Duration(milliseconds: 300)); // DefaultTextStyle changes animate
|
||||
expect(iconColor(leadingKey), green);
|
||||
expect(iconColor(trailingKey), green);
|
||||
expect(textColor(titleKey), green);
|
||||
@ -302,16 +302,16 @@ void main() {
|
||||
|
||||
// An unselected ListTile's leading and trailing get the ListTileTheme's iconColor
|
||||
// An unselected ListTile's title texts get the ListTileTheme's textColor
|
||||
await(tester.pumpWidget(buildFrame(iconColor: red, textColor: green)));
|
||||
await(tester.pump(const Duration(milliseconds: 300))); // DefaultTextStyle changes animate
|
||||
await tester.pumpWidget(buildFrame(iconColor: red, textColor: green));
|
||||
await tester.pump(const Duration(milliseconds: 300)); // DefaultTextStyle changes animate
|
||||
expect(iconColor(leadingKey), red);
|
||||
expect(iconColor(trailingKey), red);
|
||||
expect(textColor(titleKey), green);
|
||||
expect(textColor(subtitleKey), green);
|
||||
|
||||
// If the item is disabled it's rendered with the theme's disabled color.
|
||||
await(tester.pumpWidget(buildFrame(enabled: false)));
|
||||
await(tester.pump(const Duration(milliseconds: 300))); // DefaultTextStyle changes animate
|
||||
await tester.pumpWidget(buildFrame(enabled: false));
|
||||
await tester.pump(const Duration(milliseconds: 300)); // DefaultTextStyle changes animate
|
||||
expect(iconColor(leadingKey), theme.disabledColor);
|
||||
expect(iconColor(trailingKey), theme.disabledColor);
|
||||
expect(textColor(titleKey), theme.disabledColor);
|
||||
@ -319,8 +319,8 @@ void main() {
|
||||
|
||||
// If the item is disabled it's rendered with the theme's disabled color.
|
||||
// Even if it's selected.
|
||||
await(tester.pumpWidget(buildFrame(enabled: false, selected: true)));
|
||||
await(tester.pump(const Duration(milliseconds: 300))); // DefaultTextStyle changes animate
|
||||
await tester.pumpWidget(buildFrame(enabled: false, selected: true));
|
||||
await tester.pump(const Duration(milliseconds: 300)); // DefaultTextStyle changes animate
|
||||
expect(iconColor(leadingKey), theme.disabledColor);
|
||||
expect(iconColor(trailingKey), theme.disabledColor);
|
||||
expect(textColor(titleKey), theme.disabledColor);
|
||||
|
@ -1332,11 +1332,11 @@ void main() {
|
||||
|
||||
// A fling in the TabBar or TabBarView, shouldn't do anything.
|
||||
|
||||
await(tester.fling(find.byType(TabBar), const Offset(-100.0, 0.0), 5000.0));
|
||||
await(tester.pumpAndSettle());
|
||||
await tester.fling(find.byType(TabBar), const Offset(-100.0, 0.0), 5000.0);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
await(tester.fling(find.byType(TabBarView), const Offset(100.0, 0.0), 5000.0));
|
||||
await(tester.pumpAndSettle());
|
||||
await tester.fling(find.byType(TabBarView), const Offset(100.0, 0.0), 5000.0);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(controller.index, 0);
|
||||
});
|
||||
@ -1378,17 +1378,17 @@ void main() {
|
||||
|
||||
// A fling in the TabBar or TabBarView, shouldn't move the tab.
|
||||
|
||||
await(tester.fling(find.byType(TabBar), const Offset(-100.0, 0.0), 5000.0));
|
||||
await(tester.pump(const Duration(milliseconds: 50)));
|
||||
await tester.fling(find.byType(TabBar), const Offset(-100.0, 0.0), 5000.0);
|
||||
await tester.pump(const Duration(milliseconds: 50));
|
||||
expect(tester.getTopLeft(find.widgetWithText(Tab, 'TAB')).dx, 0);
|
||||
expect(tester.getTopRight(find.widgetWithText(Tab, 'TAB')).dx, 800);
|
||||
await(tester.pumpAndSettle());
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
await(tester.fling(find.byType(TabBarView), const Offset(100.0, 0.0), 5000.0));
|
||||
await(tester.pump(const Duration(milliseconds: 50)));
|
||||
await tester.fling(find.byType(TabBarView), const Offset(100.0, 0.0), 5000.0);
|
||||
await tester.pump(const Duration(milliseconds: 50));
|
||||
expect(tester.getTopLeft(find.widgetWithText(Tab, 'TAB')).dx, 0);
|
||||
expect(tester.getTopRight(find.widgetWithText(Tab, 'TAB')).dx, 800);
|
||||
await(tester.pumpAndSettle());
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(controller.index, 0);
|
||||
expect(find.text('TAB'), findsOneWidget);
|
||||
|
@ -758,7 +758,7 @@ void main() {
|
||||
|
||||
// Scroll the target upwards by 25 pixels. The Hero flight's Y coordinate
|
||||
// will be redirected from 100 to 75.
|
||||
await(tester.drag(find.byKey(routeContainerKey), const Offset(0.0, -25.0)));
|
||||
await tester.drag(find.byKey(routeContainerKey), const Offset(0.0, -25.0));
|
||||
await tester.pump();
|
||||
await tester.pump(const Duration(milliseconds: 10));
|
||||
final double yAt110ms = tester.getTopLeft(find.byKey(routeHeroKey)).dy;
|
||||
@ -833,7 +833,7 @@ void main() {
|
||||
expect(yAt100ms, lessThan(200.0));
|
||||
expect(yAt100ms, greaterThan(100.0));
|
||||
|
||||
await(tester.drag(find.byKey(routeContainerKey), const Offset(0.0, -400.0)));
|
||||
await tester.drag(find.byKey(routeContainerKey), const Offset(0.0, -400.0));
|
||||
await tester.pump();
|
||||
await tester.pump(const Duration(milliseconds: 10));
|
||||
expect(find.byKey(routeContainerKey), findsNothing); // Scrolled off the top
|
||||
|
@ -229,7 +229,7 @@ void main() {
|
||||
|
||||
// Fully expand the appbar by scrolling (no animation) to 0.0.
|
||||
controller.jumpTo(0.0);
|
||||
await(tester.pumpAndSettle());
|
||||
await tester.pumpAndSettle();
|
||||
expect(scrollOffset, 0.0);
|
||||
expect(tester.renderObject<RenderBox>(find.byType(AppBar)).size.height, 200.0);
|
||||
|
||||
@ -291,12 +291,12 @@ void main() {
|
||||
|
||||
// A scroll collapses Page0's appbar to 150.0.
|
||||
controller.jumpTo(50.0);
|
||||
await(tester.pumpAndSettle());
|
||||
await tester.pumpAndSettle();
|
||||
expect(tester.renderObject<RenderBox>(find.byType(AppBar)).size.height, 150.0);
|
||||
|
||||
// Fling to Page1. Page1's appbar height is the same as the appbar for Page0.
|
||||
await tester.fling(find.text('Page0'), const Offset(-100.0, 0.0), 10000.0);
|
||||
await(tester.pumpAndSettle());
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Page0'), findsNothing);
|
||||
expect(find.text('Page1'), findsOneWidget);
|
||||
expect(find.text('Page2'), findsNothing);
|
||||
@ -305,10 +305,10 @@ void main() {
|
||||
// Expand Page1's appbar and then fling to Page2. Page2's appbar appears
|
||||
// fully expanded.
|
||||
controller.jumpTo(0.0);
|
||||
await(tester.pumpAndSettle());
|
||||
await tester.pumpAndSettle();
|
||||
expect(tester.renderObject<RenderBox>(find.byType(AppBar)).size.height, 200.0);
|
||||
await tester.fling(find.text('Page1'), const Offset(-100.0, 0.0), 10000.0);
|
||||
await(tester.pumpAndSettle());
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Page0'), findsNothing);
|
||||
expect(find.text('Page1'), findsNothing);
|
||||
expect(find.text('Page2'), findsOneWidget);
|
||||
|
@ -37,10 +37,10 @@ void main() {
|
||||
expect(find.text('Page2-Item1'), findsNothing);
|
||||
|
||||
controller.jumpTo(listItemHeight + 10);
|
||||
await (tester.pumpAndSettle());
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
await tester.fling(find.text('Page0-Item1'), const Offset(-100.0, 0.0), 10000.0);
|
||||
await (tester.pumpAndSettle());
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Page0-Item1'), findsNothing);
|
||||
expect(find.text('Page1-Item1'), findsOneWidget);
|
||||
@ -48,7 +48,7 @@ void main() {
|
||||
expect(find.text('Page2-Item1'), findsNothing);
|
||||
|
||||
await tester.fling(find.text('Page1-Item1'), const Offset(-100.0, 0.0), 10000.0);
|
||||
await (tester.pumpAndSettle());
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Page0-Item1'), findsNothing);
|
||||
expect(find.text('Page1-Item1'), findsNothing);
|
||||
|
@ -274,8 +274,8 @@ Future<XcodeBuildResult> buildXcodeProject({
|
||||
appIosDir: appDirectory,
|
||||
iosEngineDir: flutterFrameworkDir(buildInfo.mode),
|
||||
isSwift: app.isSwift,
|
||||
pluginOrFlutterPodChanged: (injectPluginsResult.hasChanged
|
||||
|| previousGeneratedXcconfig != currentGeneratedXcconfig),
|
||||
pluginOrFlutterPodChanged: injectPluginsResult.hasChanged
|
||||
|| previousGeneratedXcconfig != currentGeneratedXcconfig,
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user