Missing trailing commas (#41473)

* add missing trailing commas

* add more missing trailing commas

* add more and more missing trailing commas
This commit is contained in:
Alexandre Ardhuin 2019-09-30 18:48:23 +02:00 committed by GitHub
parent d1761f1072
commit f0553ba58e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
166 changed files with 613 additions and 610 deletions

View File

@ -1509,7 +1509,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
.pickerTextStyle.merge(
const TextStyle(
fontSize: _kTimerPickerNumberLabelFontSize,
)
),
);
}
@ -1561,7 +1561,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
data: themeData.copyWith(
textTheme: themeData.textTheme.copyWith(
pickerTextStyle: _textStyleFrom(context),
)
),
),
child: Align(
alignment: widget.alignment,

View File

@ -1554,7 +1554,7 @@ class _RenderCupertinoDialogActions extends RenderBox
firstChild.size.height,
lastChild.size.height,
),
)
),
);
}
} else {

View File

@ -70,7 +70,7 @@ enum OverlayVisibilityMode {
class _CupertinoTextFieldSelectionGestureDetectorBuilder extends TextSelectionGestureDetectorBuilder {
_CupertinoTextFieldSelectionGestureDetectorBuilder({
@required _CupertinoTextFieldState state
@required _CupertinoTextFieldState state,
}) : _state = state,
super(delegate: state);

View File

@ -644,7 +644,7 @@ class FlutterError extends Error with DiagnosticableTreeMixin implements Asserti
wrapWidth: wrapWidth,
wrapWidthProperties: wrapWidth,
maxDescendentsTruncatableNode: 5,
).render(details.toDiagnosticsNode(style: DiagnosticsTreeStyle.error)).trimRight()
).render(details.toDiagnosticsNode(style: DiagnosticsTreeStyle.error)).trimRight(),
);
} else {
debugPrint('Another exception was thrown: ${details.summary}');

View File

@ -275,7 +275,7 @@ void showLicensePage({
applicationVersion: applicationVersion,
applicationIcon: applicationIcon,
applicationLegalese: applicationLegalese,
)
),
));
}

View File

@ -488,7 +488,7 @@ class _ExpansionPanelListState extends State<ExpansionPanelList> {
child: InkWell(
onTap: () => _handlePressed(_isChildExpanded(index), index),
child: header,
)
),
);
}
items.add(

View File

@ -537,7 +537,7 @@ class _MergeableMaterialState extends State<MergeableMaterial> with TickerProvid
mainAxis: widget.mainAxis,
children: slices,
),
)
),
);
slices = <Widget>[];
@ -545,7 +545,7 @@ class _MergeableMaterialState extends State<MergeableMaterial> with TickerProvid
SizedBox(
width: widget.mainAxis == Axis.horizontal ? _getGapSize(i) : null,
height: widget.mainAxis == Axis.vertical ? _getGapSize(i) : null,
)
),
);
} else {
final MaterialSlice slice = _children[i];
@ -591,7 +591,7 @@ class _MergeableMaterialState extends State<MergeableMaterial> with TickerProvid
Material(
type: MaterialType.transparency,
child: child,
)
),
);
}
}
@ -608,7 +608,7 @@ class _MergeableMaterialState extends State<MergeableMaterial> with TickerProvid
mainAxis: widget.mainAxis,
children: slices,
),
)
),
);
slices = <Widget>[];
}

View File

@ -401,7 +401,7 @@ class PaginatedDataTableState extends State<PaginatedDataTable> {
_firstRowIndex + widget.rowsPerPage,
_rowCount,
_rowCountApproximate,
)
),
),
Container(width: 32.0),
IconButton(

View File

@ -46,7 +46,7 @@ class _TextSpanEditingController extends TextEditingController {
class _SelectableTextSelectionGestureDetectorBuilder extends TextSelectionGestureDetectorBuilder {
_SelectableTextSelectionGestureDetectorBuilder({
@required _SelectableTextState state
@required _SelectableTextState state,
}) : _state = state,
super(delegate: state);

View File

@ -35,7 +35,7 @@ typedef InputCounterWidgetBuilder = Widget Function(
class _TextFieldSelectionGestureDetectorBuilder extends TextSelectionGestureDetectorBuilder {
_TextFieldSelectionGestureDetectorBuilder({
@required _TextFieldState state
@required _TextFieldState state,
}) : _state = state,
super(delegate: state);

View File

@ -3054,7 +3054,7 @@ class RenderIgnorePointer extends RenderProxyBox {
'ignoringSemantics',
_effectiveIgnoringSemantics,
description: ignoringSemantics == null ? 'implicitly $_effectiveIgnoringSemantics' : null,
)
),
);
}
}

View File

@ -3966,7 +3966,7 @@ abstract class ComponentElement extends Element {
informationCollector: () sync* {
yield DiagnosticsDebugCreator(DebugCreator(this));
},
)
),
);
} finally {
// We delay marking the element as clean until after calling build() so
@ -3986,7 +3986,7 @@ abstract class ComponentElement extends Element {
informationCollector: () sync* {
yield DiagnosticsDebugCreator(DebugCreator(this));
},
)
),
);
_child = updateChild(null, built, slot);
}

View File

@ -107,7 +107,7 @@ class _LayoutBuilderElement<ConstraintType extends Constraints> extends RenderOb
informationCollector: () sync* {
yield DiagnosticsDebugCreator(DebugCreator(this));
},
)
),
);
}
}
@ -123,7 +123,7 @@ class _LayoutBuilderElement<ConstraintType extends Constraints> extends RenderOb
informationCollector: () sync* {
yield DiagnosticsDebugCreator(DebugCreator(this));
},
)
),
);
_child = updateChild(null, built, slot);
}

View File

@ -44,7 +44,7 @@ class Title extends StatelessWidget {
ApplicationSwitcherDescription(
label: title,
primaryColor: color.value,
)
),
);
return child;
}

View File

@ -2504,7 +2504,7 @@ class _InspectorOverlayLayer extends Layer {
ErrorSummary(
'The inspector should never be used in production mode due to the '
'negative performance impact.'
)
),
]);
}
}
@ -2808,7 +2808,7 @@ Iterable<DiagnosticsNode> _describeRelevantUserCode(Element element) {
children: <DiagnosticsNode>[
ErrorDescription('${ancestor.widget.toStringShort()} ${_describeCreationLocation(ancestor)}'),
],
)
),
);
nodes.add(ErrorSpacer());
return false;

View File

@ -83,7 +83,7 @@ void main() {
find.descendant(
of: find.widgetWithText(CupertinoActionSheetAction, text),
matching: find.byType(DefaultTextStyle),
)
),
).style;
}
@ -313,7 +313,7 @@ void main() {
),
);
}),
)
),
);
await tester.tap(find.text('Go'));

View File

@ -21,7 +21,7 @@ void main() {
boilerplate(child: const CupertinoButton(
child: Text('X', style: testStyle),
onPressed: null,
))
)),
);
final RenderBox buttonBox = tester.renderObject(find.byType(CupertinoButton));
expect(
@ -38,7 +38,7 @@ void main() {
child: Text('X', style: testStyle),
onPressed: null,
minSize: minSize,
))
)),
);
final RenderBox buttonBox = tester.renderObject(find.byType(CupertinoButton));
expect(
@ -53,7 +53,7 @@ void main() {
boilerplate(child: const CupertinoButton(
child: Text('XXXX', style: testStyle),
onPressed: null,
))
)),
);
final RenderBox buttonBox = tester.renderObject(find.byType(CupertinoButton));
expect(
@ -311,7 +311,7 @@ void main() {
find.descendant(
of: find.byType(CupertinoButton),
matching: find.byType(DecoratedBox),
)
),
).decoration;
expect(decoration.color, CupertinoColors.activeBlue);
@ -346,7 +346,7 @@ void main() {
find.descendant(
of: find.byType(CupertinoButton),
matching: find.byType(DecoratedBox),
)
),
).decoration;
expect(decoration.color.value, CupertinoColors.activeOrange.darkColor.value);
});

View File

@ -358,8 +358,8 @@ void main() {
minuteInterval: 3,
),
),
)
)
),
),
);
// Drag the minute picker to the next slot (03 -> 06).
@ -889,8 +889,8 @@ void main() {
onDateTimeChanged: (_) {},
),
),
)
)
),
),
);
final dynamic exception = tester.takeException();
@ -916,8 +916,8 @@ void main() {
),
),
),
)
)
),
),
);
await expectLater(

View File

@ -963,7 +963,7 @@ void main() {
child: Placeholder(),
);
},
)
),
);
await tester.pump();
@ -975,7 +975,7 @@ void main() {
builder: (BuildContext context) {
return const CupertinoNavigationBarBackButton();
},
)
),
);
await tester.pump();
@ -1004,7 +1004,7 @@ void main() {
child: Placeholder(),
);
},
)
),
);
await tester.pump();
@ -1023,7 +1023,7 @@ void main() {
child: const Placeholder(),
);
},
)
),
);
await tester.pump();

View File

@ -31,7 +31,7 @@ void main() {
child: Placeholder(),
);
},
)
),
);
await tester.pump();
@ -64,7 +64,7 @@ void main() {
),
);
},
)
),
);
await tester.pump();
@ -126,7 +126,7 @@ void main() {
child: Placeholder(),
);
},
)
),
);
await tester.pump();
@ -141,7 +141,7 @@ void main() {
child: Placeholder(),
);
},
)
),
);
await tester.pump();
@ -172,7 +172,7 @@ void main() {
child: Placeholder(),
);
},
)
),
);
await tester.pump();
@ -187,7 +187,7 @@ void main() {
child: Placeholder(),
);
},
)
),
);
// Trigger the route push

View File

@ -176,7 +176,7 @@ void main() {
data: MediaQueryData(viewInsets: EdgeInsets.only(bottom: 20.0)),
child: child,
),
)
),
);
final Offset initialPoint = tester.getCenter(find.byType(Placeholder));
@ -192,7 +192,7 @@ void main() {
),
child: child,
),
)
),
);
final Offset finalPoint = tester.getCenter(find.byType(Placeholder));
expect(initialPoint, finalPoint);

View File

@ -171,7 +171,7 @@ void main() {
children: children,
onValueChanged: (int newValue) { },
),
)
),
);
// Default padding works.
@ -191,7 +191,7 @@ void main() {
children: children,
onValueChanged: (int newValue) { },
),
)
),
);
// Custom padding works.

View File

@ -554,7 +554,7 @@ void main() {
return Text('Different page ${index + 1}');
},
),
)
),
);
expect(tabsBuilt, const <int>[0, 1]);
@ -653,7 +653,7 @@ void main() {
);
},
),
)
),
);
expect(tabsPainted, const <int> [0]);
@ -675,7 +675,7 @@ void main() {
);
},
),
)
),
);
expect(tabsPainted, const <int> [0, 0]);
@ -869,10 +869,10 @@ void main() {
);
},
),
]
)
)
)
],
),
),
),
);
expect(tabsPainted0, const <int>[2, 0, 1, 2]);
expect(tabsPainted1, const <int>[2, 0]);
@ -892,7 +892,7 @@ void main() {
controller: controller,
tabBuilder: (BuildContext context, int index) => Text('Different page ${index + 1}'),
),
)
),
);
} on AssertionError catch (e) {
expect(e.toString(), contains('controller.index < tabBar.items.length'));
@ -907,7 +907,7 @@ void main() {
controller: controller,
tabBuilder: (BuildContext context, int index) => Text('Different page ${index + 1}'),
),
)
),
);
expect(tester.takeException(), null);
@ -936,7 +936,7 @@ void main() {
return Container();
},
),
)
),
);
for (int i = 0; i < 3; i++) {
@ -958,7 +958,7 @@ void main() {
return Container();
},
),
)
),
);
for (int i = 0; i < 5; i++) {
controller.index = i;

View File

@ -2926,10 +2926,10 @@ void main() {
controller: TextEditingController(text: 'lorem'),
enabled: false,
),
)
),
),
)
)
),
),
);
await expectLater(

View File

@ -23,7 +23,7 @@ void main() {
style: const TextStyle(),
cursorColor: const Color.fromARGB(0, 0, 0, 0),
backgroundCursorColor: const Color.fromARGB(0, 0, 0, 0),
)
),
);
}

View File

@ -38,7 +38,7 @@ void main() {
data: <ui.PointerData>[
ui.PointerData(change: ui.PointerChange.down),
ui.PointerData(change: ui.PointerChange.up),
]
],
);
final List<PointerEvent> events = <PointerEvent>[];
@ -56,7 +56,7 @@ void main() {
ui.PointerData(change: ui.PointerChange.down),
ui.PointerData(change: ui.PointerChange.move),
ui.PointerData(change: ui.PointerChange.up),
]
],
);
final List<PointerEvent> events = <PointerEvent>[];
@ -76,7 +76,7 @@ void main() {
ui.PointerData(change: ui.PointerChange.hover),
ui.PointerData(change: ui.PointerChange.remove),
ui.PointerData(change: ui.PointerChange.hover),
]
],
);
final List<PointerEvent> pointerRouterEvents = <PointerEvent>[];
@ -110,7 +110,7 @@ void main() {
physicalX: 10.0 * ui.window.devicePixelRatio,
physicalY: 15.0 * ui.window.devicePixelRatio,
),
]
],
);
final List<PointerEvent> events = <PointerEvent>[];
@ -129,7 +129,7 @@ void main() {
data: <ui.PointerData>[
ui.PointerData(change: ui.PointerChange.down),
ui.PointerData(change: ui.PointerChange.cancel),
]
],
);
final List<PointerEvent> events = <PointerEvent>[];
@ -146,7 +146,7 @@ void main() {
data: <ui.PointerData>[
ui.PointerData(change: ui.PointerChange.down),
ui.PointerData(change: ui.PointerChange.up),
]
],
);
final List<PointerEvent> events = <PointerEvent>[];
@ -169,7 +169,7 @@ void main() {
ui.PointerData(change: ui.PointerChange.hover, device: 24),
ui.PointerData(change: ui.PointerChange.remove, device: 24),
ui.PointerData(change: ui.PointerChange.hover, device: 24),
]
],
);
final List<PointerEvent> events = PointerEventConverter.expand(
@ -189,7 +189,7 @@ void main() {
ui.PointerData(change: ui.PointerChange.add, device: 25, physicalX: 10.0 * ui.window.devicePixelRatio, physicalY: 10.0 * ui.window.devicePixelRatio),
ui.PointerData(change: ui.PointerChange.down, device: 25, physicalX: 15.0 * ui.window.devicePixelRatio, physicalY: 17.0 * ui.window.devicePixelRatio),
const ui.PointerData(change: ui.PointerChange.remove, device: 25),
]
],
);
final List<PointerEvent> events = PointerEventConverter.expand(
@ -210,7 +210,7 @@ void main() {
data: <ui.PointerData>[
ui.PointerData(change: ui.PointerChange.add),
ui.PointerData(change: ui.PointerChange.hover, signalKind: ui.PointerSignalKind.scroll),
]
],
);
final List<PointerEvent> events = PointerEventConverter.expand(
@ -233,7 +233,7 @@ void main() {
ui.PointerData(change: ui.PointerChange.hover, physicalX: lastLocation.dx, physicalY: lastLocation.dy),
ui.PointerData(change: ui.PointerChange.down, physicalX: lastLocation.dx, physicalY: lastLocation.dy),
ui.PointerData(change: ui.PointerChange.hover, physicalX: scrollLocation.dx, physicalY: scrollLocation.dy, signalKind: ui.PointerSignalKind.scroll),
]
],
);
final List<PointerEvent> events = PointerEventConverter.expand(
@ -261,7 +261,7 @@ void main() {
ui.PointerData(change: ui.PointerChange.down, kind: kind, physicalX: location.dx, physicalY: location.dy),
ui.PointerData(change: ui.PointerChange.move, kind: kind, physicalX: location.dx, physicalY: location.dy),
ui.PointerData(change: ui.PointerChange.up, kind: kind, physicalX: location.dx, physicalY: location.dy),
]
],
);
final List<PointerEvent> events = PointerEventConverter.expand(
@ -296,7 +296,7 @@ void main() {
ui.PointerData(change: ui.PointerChange.down, kind: kind, physicalX: location.dx, physicalY: location.dy),
ui.PointerData(change: ui.PointerChange.move, buttons: kSecondaryStylusButton, kind: kind, physicalX: location.dx, physicalY: location.dy),
ui.PointerData(change: ui.PointerChange.up, kind: kind, physicalX: location.dx, physicalY: location.dy),
]
],
);
final List<PointerEvent> events = PointerEventConverter.expand(
@ -328,7 +328,7 @@ void main() {
ui.PointerData(change: ui.PointerChange.down, kind: kind, physicalX: location.dx, physicalY: location.dy),
ui.PointerData(change: ui.PointerChange.move, kind: kind, physicalX: location.dx, physicalY: location.dy),
ui.PointerData(change: ui.PointerChange.up, kind: kind, physicalX: location.dx, physicalY: location.dy),
]
],
);
final List<PointerEvent> events = PointerEventConverter.expand(
@ -361,7 +361,7 @@ void main() {
ui.PointerData(change: ui.PointerChange.down, kind: kind, buttons: kMiddleMouseButton, physicalX: location.dx, physicalY: location.dy),
ui.PointerData(change: ui.PointerChange.move, kind: kind, buttons: kMiddleMouseButton | kSecondaryMouseButton, physicalX: location.dx, physicalY: location.dy),
ui.PointerData(change: ui.PointerChange.up, kind: kind, physicalX: location.dx, physicalY: location.dy),
]
],
);
final List<PointerEvent> events = PointerEventConverter.expand(

View File

@ -26,7 +26,7 @@ class TestGestureFlutterBinding extends BindingBase with GestureBinding {
data: <ui.PointerData>[
ui.PointerData(change: ui.PointerChange.down),
ui.PointerData(change: ui.PointerChange.up),
]
],
);
Future<void> test(VoidCallback callback) {

View File

@ -28,7 +28,7 @@ void main() {
),
),
),
)
),
);
// Move just below kTouchSlop should recognize tap.
@ -72,7 +72,7 @@ void main() {
),
),
),
)
),
);
// Move just below kTouchSlop should recognize tap.

View File

@ -41,7 +41,7 @@ void main() {
color: Colors.red,
),
),
)
),
);
await tester.longPressAt(tester.getCenter(find.byKey(redContainer)));
@ -90,7 +90,7 @@ void main() {
),
),
),
)
),
);
TestGesture gesture = await tester.startGesture(tester.getCenter(find.byKey(redContainer)));
@ -165,7 +165,7 @@ void main() {
),
),
),
)
),
);
TestGesture gesture = await tester.startGesture(tester.getCenter(find.byKey(redContainer)));

View File

@ -37,7 +37,7 @@ void main() {
color: Colors.red,
),
),
)
),
);
await tester.tapAt(tester.getCenter(find.byKey(redContainer)));
@ -81,7 +81,7 @@ void main() {
),
),
),
)
),
);
// Move just below kTouchSlop should recognize tap.
@ -144,7 +144,7 @@ void main() {
),
),
),
)
),
);
// Move just below kTouchSlop should recognize tap.

View File

@ -155,7 +155,7 @@ void main() {
title: const Text('X'),
),
),
)
),
);
final Finder title = find.text('X');

View File

@ -236,7 +236,7 @@ void main() {
'/a/b': (BuildContext context) => const Text('route "/a/b"'),
'/b': (BuildContext context) => const Text('route "/b"'),
},
)
),
);
expect(find.text('route "/"'), findsOneWidget);
@ -273,7 +273,7 @@ void main() {
);
},
},
)
),
);
await tester.tap(find.text('X'));
await tester.pump();
@ -297,7 +297,7 @@ void main() {
MaterialApp(
initialRoute: '/a/b',
routes: routes,
)
),
);
expect(find.text('route "/"'), findsOneWidget);
expect(find.text('route "/a"'), findsOneWidget);
@ -317,7 +317,7 @@ void main() {
MaterialApp(
initialRoute: '/a/b/c',
routes: routes,
)
),
);
final dynamic exception = tester.takeException();
expect(exception is String, isTrue);
@ -339,7 +339,7 @@ void main() {
MaterialApp(
initialRoute: '/a',
routes: routes,
)
),
);
expect(find.text('route "/"'), findsOneWidget);
expect(find.text('route "/a"'), findsOneWidget);
@ -350,7 +350,7 @@ void main() {
MaterialApp(
initialRoute: '/b',
routes: routes,
)
),
);
expect(find.text('route "/"'), findsOneWidget);
expect(find.text('route "/a"'), findsOneWidget);
@ -375,7 +375,7 @@ void main() {
log.add('onUnknownRoute ${settings.name}');
return null;
},
)
),
);
expect(tester.takeException(), isFlutterError);
expect(log, <String>['onGenerateRoute /', 'onUnknownRoute /']);

View File

@ -20,7 +20,7 @@ void main() {
);
},
},
)
),
);
tester.state<NavigatorState>(find.byType(Navigator)).pushNamed('/next');
@ -48,7 +48,7 @@ void main() {
);
},
},
)
),
);
tester.state<NavigatorState>(find.byType(Navigator)).pushNamed('/next');

View File

@ -35,7 +35,7 @@ void main() {
},
),
),
)
),
);
await tester.tap(find.text('Alarm'));
@ -57,10 +57,10 @@ void main() {
icon: Icon(Icons.access_alarm),
title: Text('Alarm'),
),
]
],
),
),
)
),
);
final RenderBox box = tester.renderObject(find.byType(BottomNavigationBar));
@ -94,7 +94,7 @@ void main() {
],
),
),
)
),
);
const double selectedFontSize = 14.0;
@ -146,7 +146,7 @@ void main() {
],
),
),
)
),
);
final TextStyle selectedFontStyle = tester.renderObject<RenderParagraph>(find.text('AC')).text.style;
@ -187,7 +187,7 @@ void main() {
],
),
),
)
),
);
final TextStyle selectedFontStyle = tester.renderObject<RenderParagraph>(find.text('AC')).text.style;
@ -221,7 +221,7 @@ void main() {
],
),
),
)
),
);
final TextStyle selectedIcon = _iconStyle(tester, Icons.ac_unit);
@ -259,7 +259,7 @@ void main() {
],
),
),
)
),
);
final TextStyle selectedFontStyle = tester.renderObject<RenderParagraph>(find.text('AC')).text.style;
@ -303,7 +303,7 @@ void main() {
],
),
),
)
),
);
final EdgeInsets selectedItemPadding = _itemPadding(tester, Icons.ac_unit);
@ -346,7 +346,7 @@ void main() {
],
),
),
)
),
);
final EdgeInsets selectedItemPadding = _itemPadding(tester, Icons.ac_unit);
@ -388,7 +388,7 @@ void main() {
],
),
),
)
),
);
final EdgeInsets selectedItemPadding = _itemPadding(tester, Icons.ac_unit);
@ -417,7 +417,7 @@ void main() {
],
),
),
)
),
);
const double selectedFontSize = 14.0;
@ -460,7 +460,7 @@ void main() {
],
),
),
)
),
);
expect(tester.renderObject<RenderParagraph>(find.text('AC')).text.style.fontSize, selectedFontSize);
@ -509,7 +509,7 @@ void main() {
],
),
),
)
),
);
expect(tester.renderObject<RenderParagraph>(find.text('AC')).text.style.fontSize, selectedFontSize);
@ -536,7 +536,7 @@ void main() {
],
),
),
)
),
);
expect(_getOpacity(tester, 'AC'), equals(1.0));
@ -564,7 +564,7 @@ void main() {
],
),
),
)
),
);
expect(_getMaterial(tester).color, equals(color));
@ -593,7 +593,7 @@ void main() {
],
),
),
)
),
);
expect(_getMaterial(tester).color, equals(itemColor));
@ -642,7 +642,7 @@ void main() {
],
),
),
)
),
);
expect(tester.renderObject<RenderParagraph>(find.text('AC')).text.style.color, equals(fixedColor));
@ -669,7 +669,7 @@ void main() {
],
),
),
)
),
);
expect(_getMaterial(tester).elevation, equals(customElevation));
@ -691,11 +691,11 @@ void main() {
icon: Icon(Icons.access_alarm),
title: Text('Alarm'),
),
]
],
),
),
),
)
),
);
const double labelBottomMargin = 7.0; // 7 == defaulted selectedFontSize / 2.0.
@ -722,7 +722,7 @@ void main() {
],
),
),
)
),
);
Iterable<RenderBox> actions = tester.renderObjectList(find.byType(InkResponse));
@ -748,7 +748,7 @@ void main() {
],
),
),
)
),
);
await tester.pump(const Duration(milliseconds: 200));
@ -785,7 +785,7 @@ void main() {
],
),
),
)
),
);
// We want to make sure that the last label does not get displaced,
@ -847,7 +847,7 @@ void main() {
),
),
),
)
),
);
await tester.tap(find.text('Alarm'));
@ -885,7 +885,7 @@ void main() {
),
),
),
)
),
);
await tester.tap(find.text('Alarm'));
@ -1658,7 +1658,7 @@ double _getOpacity(WidgetTester tester, String textValue) {
find.ancestor(
of: find.text(textValue),
matching: find.byType(FadeTransition),
).first
).first,
);
return opacityWidget.opacity.value;
}

View File

@ -310,7 +310,7 @@ void main() {
home: Scaffold(
key: scaffoldKey,
body: const Center(child: Text('body')),
)
),
));

View File

@ -25,7 +25,7 @@ void main() {
SizedBox(width: 10.0, height: 10.0),
],
),
)
),
);
final Finder child = find.byType(SizedBox);
@ -47,7 +47,7 @@ void main() {
],
),
),
)
),
);
final Finder child = find.byType(SizedBox);
@ -70,7 +70,7 @@ void main() {
],
),
),
)
),
);
final Finder child = find.byType(SizedBox);
@ -91,7 +91,7 @@ void main() {
Container(),
],
),
)
),
);
// ButtonBar uses a Row internally to implement this
@ -112,7 +112,7 @@ void main() {
],
),
),
)
),
);
// ButtonBar uses a Row internally to implement this
@ -134,7 +134,7 @@ void main() {
],
),
),
)
),
);
// ButtonBar uses a Row internally to implement this
@ -155,10 +155,10 @@ void main() {
Builder(builder: (BuildContext context) {
capturedContext = context;
return Container();
})
}),
],
),
)
),
);
final ButtonThemeData buttonTheme = ButtonTheme.of(capturedContext);
expect(buttonTheme.textTheme, equals(ButtonTextTheme.primary));
@ -187,11 +187,11 @@ void main() {
Builder(builder: (BuildContext context) {
capturedContext = context;
return Container();
})
}),
],
),
),
)
),
);
final ButtonThemeData buttonTheme = ButtonTheme.of(capturedContext);
expect(buttonTheme.textTheme, equals(ButtonTextTheme.primary));
@ -226,11 +226,11 @@ void main() {
Builder(builder: (BuildContext context) {
capturedContext = context;
return Container();
})
}),
],
),
),
)
),
);
final ButtonThemeData buttonTheme = ButtonTheme.of(capturedContext);
expect(buttonTheme.textTheme, equals(ButtonTextTheme.primary));

View File

@ -116,7 +116,7 @@ void main() {
return Container();
}
),
)
),
);
expect(ButtonBarTheme.of(capturedContext), equals(buttonBarTheme));
expect(ButtonBarTheme.of(capturedContext).buttonMinWidth, equals(42.0));
@ -142,7 +142,7 @@ void main() {
);
}
),
)
),
);
expect(ButtonBarTheme.of(capturedContext), equals(buttonBarTheme));
expect(ButtonBarTheme.of(capturedContext).buttonMinWidth, equals(84.0));

View File

@ -610,7 +610,7 @@ void main() {
SemanticsFlag.isEnabled,
],
),
]
],
),
ignoreId: true,
));

View File

@ -171,7 +171,7 @@ Future<void> _pumpCheckmarkChip(
);
},
),
)
),
);
}
@ -333,7 +333,7 @@ void main() {
label: Text(text),
onDeleted: onDeleted,
),
]
],
),
),
),
@ -1783,7 +1783,7 @@ void main() {
matching: find.byWidgetPredicate((Widget widget) {
return widget.runtimeType.toString() == '_ChipRenderWidget';
}),
)
),
);
const Color selectScrimColor = Color(0x60191919);
expect(rawChip, paints..path(color: selectScrimColor, includes: <Offset>[

View File

@ -707,7 +707,7 @@ void _tests() {
);
},
),
)
),
);
final Finder chevronFinder = find.byType(IconButton);

View File

@ -17,7 +17,7 @@ void main() {
),
),
),
)
),
);
final Finder title = find.text('X');
@ -38,7 +38,7 @@ void main() {
),
),
),
)
),
);
center = tester.getCenter(title);

View File

@ -53,7 +53,7 @@ void main() {
disabledElevation: disabledElevation,
highlightElevation: highlightElevation,
shape: shape,
)
),
),
home: Scaffold(
floatingActionButton: FloatingActionButton(

View File

@ -299,7 +299,7 @@ void main() {
],
label: 'link',
),
]
],
), ignoreId: true, ignoreTransform: true));
semantics.dispose();
@ -327,7 +327,7 @@ void main() {
],
label: 'link',
),
]
],
), ignoreId: true, ignoreTransform: true));
semantics.dispose();

View File

@ -698,7 +698,7 @@ void main() {
find.descendant(
of: find.widgetWithText(RawMaterialButton, text),
matching: find.byType(Material),
)
),
).color;
}

View File

@ -107,7 +107,7 @@ double getOpacity(WidgetTester tester, String textValue) {
find.ancestor(
of: find.text(textValue),
matching: find.byType(FadeTransition),
).first
).first,
);
return opacityWidget.opacity.value;
}
@ -2564,7 +2564,7 @@ void main() {
find.ancestor(
of: find.text('label'),
matching: find.byType(AnimatedDefaultTextStyle),
)
),
).style;
}
expect(getLabelStyle().color, labelStyle.color);
@ -2667,7 +2667,7 @@ void main() {
focusColor: Colors.blue,
border: InputBorder.none,
alignLabelWithHint: true,
)
),
);
expect(decoration.labelStyle, themeStyle);

View File

@ -392,7 +392,7 @@ void main() {
SemanticsFlag.hasEnabledState,
],
),
]
],
),
ignoreTransform: true, ignoreId: true, ignoreRect: true),
);

View File

@ -225,8 +225,8 @@ void main() {
applyElevationOverlayColor: false,
colorScheme: const ColorScheme.dark().copyWith(surface: surfaceColor),
),
child: buildMaterial(color: surfaceColor, elevation: 8.0))
);
child: buildMaterial(color: surfaceColor, elevation: 8.0),
));
final RenderPhysicalShape model = getModel(tester);
expect(model.color, equals(surfaceColor));
});
@ -259,7 +259,7 @@ void main() {
color: surfaceColor,
elevation: test.elevation,
),
)
),
);
await tester.pumpAndSettle(); // wait for the elevation animation to finish
final RenderPhysicalShape model = getModel(tester);
@ -278,7 +278,7 @@ void main() {
color: Colors.cyan,
elevation: 8.0,
),
)
),
);
final RenderPhysicalShape model = getModel(tester);
expect(model.color, equals(Colors.cyan));
@ -294,7 +294,7 @@ void main() {
key: materialKey,
type: MaterialType.transparency,
child: const SizedBox(width: 100.0, height: 100.0),
)
),
);
expect(find.byKey(materialKey), hasNoImmediateClip);
@ -309,7 +309,7 @@ void main() {
type: MaterialType.transparency,
child: const SizedBox(width: 100.0, height: 100.0),
clipBehavior: null,
)
),
);
}
@ -324,7 +324,7 @@ void main() {
type: MaterialType.transparency,
child: const SizedBox(width: 100.0, height: 100.0),
clipBehavior: Clip.antiAlias,
)
),
);
expect(find.byKey(materialKey), clipsWithBoundingRect);
@ -339,7 +339,7 @@ void main() {
borderRadius: const BorderRadius.all(Radius.circular(10.0)),
child: const SizedBox(width: 100.0, height: 100.0),
clipBehavior: Clip.antiAlias,
)
),
);
expect(
@ -359,7 +359,7 @@ void main() {
shape: const StadiumBorder(),
child: const SizedBox(width: 100.0, height: 100.0),
clipBehavior: Clip.antiAlias,
)
),
);
expect(
@ -442,7 +442,7 @@ void main() {
key: materialKey,
type: MaterialType.canvas,
child: const SizedBox(width: 100.0, height: 100.0),
)
),
);
expect(find.byKey(materialKey), rendersOnPhysicalModel(
@ -461,7 +461,7 @@ void main() {
borderRadius: const BorderRadius.all(Radius.circular(5.0)),
child: const SizedBox(width: 100.0, height: 100.0),
elevation: 1.0,
)
),
);
expect(find.byKey(materialKey), rendersOnPhysicalModel(
@ -480,7 +480,7 @@ void main() {
shape: const StadiumBorder(),
child: const SizedBox(width: 100.0, height: 100.0),
elevation: 1.0,
)
),
);
expect(find.byKey(materialKey), rendersOnPhysicalShape(
@ -496,7 +496,7 @@ void main() {
key: materialKey,
type: MaterialType.card,
child: const SizedBox(width: 100.0, height: 100.0),
)
),
);
expect(find.byKey(materialKey), rendersOnPhysicalModel(
@ -515,7 +515,7 @@ void main() {
borderRadius: const BorderRadius.all(Radius.circular(5.0)),
elevation: 5.0,
child: const SizedBox(width: 100.0, height: 100.0),
)
),
);
expect(find.byKey(materialKey), rendersOnPhysicalModel(
@ -534,7 +534,7 @@ void main() {
shape: const StadiumBorder(),
elevation: 5.0,
child: const SizedBox(width: 100.0, height: 100.0),
)
),
);
expect(find.byKey(materialKey), rendersOnPhysicalShape(
@ -551,7 +551,7 @@ void main() {
type: MaterialType.circle,
child: const SizedBox(width: 100.0, height: 100.0),
color: const Color(0xFF0000FF),
)
),
);
expect(find.byKey(materialKey), rendersOnPhysicalModel(
@ -568,7 +568,7 @@ void main() {
type: MaterialType.button,
child: const SizedBox(width: 100.0, height: 100.0),
color: const Color(0xFF0000FF),
)
),
);
expect(find.byKey(materialKey), rendersOnPhysicalModel(
@ -588,7 +588,7 @@ void main() {
color: const Color(0xFF0000FF),
borderRadius: const BorderRadius.all(Radius.circular(6.0)),
elevation: 4.0,
)
),
);
expect(find.byKey(materialKey), rendersOnPhysicalModel(
@ -608,7 +608,7 @@ void main() {
color: const Color(0xFF0000FF),
shape: const StadiumBorder(),
elevation: 4.0,
)
),
);
expect(find.byKey(materialKey), rendersOnPhysicalShape(
@ -633,7 +633,7 @@ void main() {
color: Color(0xFF0000FF),
),
),
)
),
);
final RenderBox box = tester.renderObject(find.byKey(materialKey));
@ -653,7 +653,7 @@ void main() {
color: Color(0xFF0000FF),
),
),
)
),
);
final RenderBox box = tester.renderObject(find.byKey(materialKey));
@ -668,7 +668,7 @@ void main() {
type: MaterialType.transparency,
child: const SizedBox(width: 100.0, height: 100.0),
shape: const CircleBorder(),
)
),
);
final RenderBox box = tester.renderObject(find.byKey(materialKey));

View File

@ -404,11 +404,11 @@ void main() {
height: 100.0,
),
),
]
],
),
),
),
)
),
);
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
@ -439,11 +439,11 @@ void main() {
height: 100.0,
),
),
]
],
),
),
),
)
),
);
await tester.pump(const Duration(milliseconds: 100));
@ -478,11 +478,11 @@ void main() {
height: 100.0,
),
),
]
],
),
),
),
)
),
);
await tester.pump(const Duration(milliseconds: 100));
@ -520,11 +520,11 @@ void main() {
height: 100.0,
),
),
]
],
),
),
),
)
),
);
await tester.pump(const Duration(milliseconds: 100));
@ -561,11 +561,11 @@ void main() {
height: 100.0,
),
),
]
],
),
),
),
)
),
);
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
@ -600,11 +600,11 @@ void main() {
height: 100.0,
),
),
]
],
),
),
),
)
),
);
expect(box.size.height, equals(300));
@ -640,11 +640,11 @@ void main() {
height: 100.0,
),
),
]
],
),
),
),
)
),
);
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
@ -672,11 +672,11 @@ void main() {
height: 100.0,
),
),
]
],
),
),
),
)
),
);
await tester.pump();
@ -706,11 +706,11 @@ void main() {
height: 100.0,
),
),
]
],
),
),
),
)
),
);
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
@ -751,11 +751,11 @@ void main() {
height: 100.0,
),
),
]
],
),
),
),
)
),
);
await tester.pump(const Duration(milliseconds: 100));
@ -807,11 +807,11 @@ void main() {
height: 100.0,
),
),
]
],
),
),
),
)
),
);
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
@ -841,11 +841,11 @@ void main() {
height: 100.0,
),
),
]
],
),
),
),
)
),
);
await tester.pump(const Duration(milliseconds: 100));
@ -885,11 +885,11 @@ void main() {
height: 100.0,
),
),
]
],
),
),
),
)
),
);
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
@ -931,11 +931,11 @@ void main() {
height: 100.0,
),
),
]
],
),
),
),
)
),
);
await tester.pump(const Duration(milliseconds: 100));
@ -987,11 +987,11 @@ void main() {
height: 100.0,
),
),
]
],
),
),
),
)
),
);
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
@ -1024,11 +1024,11 @@ void main() {
height: 100.0,
),
),
]
],
),
),
),
)
),
);
await tester.pump(const Duration(milliseconds: 100));
@ -1096,7 +1096,7 @@ void main() {
),
),
),
)
),
);
List<Widget> boxes = tester.widgetList(find.byType(DecoratedBox)).toList();
@ -1149,7 +1149,7 @@ void main() {
),
),
),
)
),
);
// Wait for dividers to shrink.

View File

@ -50,7 +50,7 @@ List<Color> indicatorColors(WidgetTester tester) {
find.descendant(
of: find.byType(TabPageSelector),
matching: find.byType(TabPageSelectorIndicator),
)
),
);
return indicators.map<Color>((TabPageSelectorIndicator indicator) => indicator.backgroundColor).toList();
}

View File

@ -19,7 +19,7 @@ void main() {
return const Material(child: Text('Page 2'));
},
},
)
),
);
final Offset widget1TopLeft = tester.getTopLeft(find.text('Page 1'));
@ -81,7 +81,7 @@ void main() {
);
},
},
)
),
);
final Offset widget1InitialTopLeft = tester.getTopLeft(find.text('Page 1'));
@ -151,7 +151,7 @@ void main() {
MaterialApp(
theme: ThemeData(platform: TargetPlatform.iOS),
home: const Material(child: Text('Page 1')),
)
),
);
final Offset widget1InitialTopLeft = tester.getTopLeft(find.text('Page 1'));
@ -217,7 +217,7 @@ void main() {
return const Scaffold(body: Text('Page 2'));
},
},
)
),
);
tester.state<NavigatorState>(find.byType(Navigator)).pushNamed('/next');
@ -248,7 +248,7 @@ void main() {
return const Scaffold(body: Text('Page 2'));
},
},
)
),
);
tester.state<NavigatorState>(find.byType(Navigator)).pushNamed('/next');
@ -352,7 +352,7 @@ void main() {
MaterialApp(
theme: ThemeData(platform: TargetPlatform.iOS),
home: const Scaffold(body: Text('Page 1')),
)
),
);
tester.state<NavigatorState>(find.byType(Navigator)).push(MaterialPageRoute<void>(
@ -388,7 +388,7 @@ void main() {
return const Material(child: Text('Page 2'));
},
},
)
),
);
final Offset widget1InitialTopLeft = tester.getTopLeft(find.text('Page 1'));
@ -423,7 +423,7 @@ void main() {
return const Material(child: Text('Page 2'));
},
},
)
),
);
tester.state<NavigatorState>(find.byType(Navigator)).pop();

View File

@ -52,7 +52,7 @@ void main() {
);
},
),
)
),
));
await tester.pumpAndSettle();
@ -104,7 +104,7 @@ void main() {
home: Scaffold(
key: scaffoldKey,
body: const Center(child: Text('body')),
)
),
));
scaffoldKey.currentState.showBottomSheet<void>(
@ -258,7 +258,7 @@ void main() {
onPressed: null,
child: Text('fab'),
),
)
),
));
scaffoldKey.currentState.showBottomSheet<void>(
@ -467,7 +467,7 @@ void main() {
home: Scaffold(
key: scaffoldKey,
body: const Center(child: Text('body')),
)
),
));
final PersistentBottomSheetController<void> bottomSheet = scaffoldKey.currentState.showBottomSheet<void>((_) {

View File

@ -684,7 +684,7 @@ void main() {
),
),
),
)
),
);
await tester.tap(find.text('Menu Button'));

View File

@ -182,7 +182,7 @@ void main() {
child: Center(
child: CircularProgressIndicator(value: 0.0),
),
)
),
);
expect(tester.getSemantics(find.byType(CircularProgressIndicator)), matchesSemantics(
@ -197,7 +197,7 @@ void main() {
await tester.pumpWidget(
const Center(
child: CircularProgressIndicator(value: null),
)
),
);
expect(tester.getSemantics(find.byType(CircularProgressIndicator)), matchesSemantics());
@ -288,7 +288,7 @@ void main() {
}
),
),
)
),
);
expect(tester.hasRunningAnimations, isTrue);

View File

@ -25,7 +25,7 @@ void main() {
materialTapTargetSize: MaterialTapTargetSize.padded,
child: const Text('+'),
),
)
),
);
await tester.tapAt(const Offset(40.0, 400.0));
@ -67,7 +67,7 @@ void main() {
rect: const Rect.fromLTRB(0.0, 0.0, 48.0, 48.0),
children: <TestSemantics>[],
),
]
],
),
ignoreTransform: true,
));

View File

@ -103,8 +103,8 @@ void main() {
),
child: Scaffold(
body: Container(key: bodyKey),
))
));
),
)));
final RenderBox bodyBox = tester.renderObject(find.byKey(bodyKey));
expect(bodyBox.size, equals(const Size(800.0, 0.0)));
@ -219,7 +219,7 @@ void main() {
padding: EdgeInsets.only(bottom: 20.0),
),
child: child,
)
),
);
final Offset initialPoint = tester.getCenter(find.byType(Placeholder));
// Consume bottom padding - as if by the keyboard opening
@ -275,7 +275,7 @@ void main() {
],
),
),
)
),
);
final ScaffoldState state = tester.firstState(find.byType(Scaffold));
@ -398,7 +398,7 @@ void main() {
padding: EdgeInsets.only(bottom: 20.0),
),
child: child,
)
),
);
final Offset initialPoint = tester.getCenter(find.byType(Placeholder));
// Consume bottom padding - as if by the keyboard opening
@ -487,7 +487,7 @@ void main() {
padding: EdgeInsets.only(bottom: 20.0),
),
child: child,
)
),
);
final Offset initialPoint = tester.getCenter(find.byType(Placeholder));
// Consume bottom padding - as if by the keyboard opening
@ -546,7 +546,7 @@ void main() {
MaterialApp(
theme: ThemeData(platform: platform),
home: Scaffold(appBar: AppBar(), body: const Text('Page 1')),
)
),
);
tester.state<NavigatorState>(find.byType(Navigator)).push(routeBuilder());
@ -1155,7 +1155,7 @@ void main() {
icon: Icon(Icons.add),
title: Text('test'),
),
]
],
),
),
);

View File

@ -59,8 +59,8 @@ void main() {
),
),
),
)
)
),
),
);
SchedulerBinding.instance.debugAssertNoTransientCallbacks('Building a list with a scrollbar triggered an animation.');
@ -90,13 +90,13 @@ void main() {
],
),
),
))
)),
);
final CustomPaint custom = tester.widget(find.descendant(
of: find.byType(Scrollbar),
matching: find.byType(CustomPaint)).first
);
matching: find.byType(CustomPaint),
).first);
final dynamic scrollPainter = custom.foregroundPainter;
// Dragging makes the scrollbar first appear.
await tester.drag(find.text('0'), const Offset(0.0, -10.0));

View File

@ -742,7 +742,7 @@ void main() {
content: const Text('I am a snack bar.'),
duration: const Duration(seconds: 2),
action: SnackBarAction(label: 'ACTION', onPressed: () {}),
)
),
);
},
child: const Text('X'),
@ -757,7 +757,7 @@ void main() {
padding: EdgeInsets.only(bottom: 20.0),
),
child: child,
)
),
);
await tester.tap(find.text('X'));
await tester.pumpAndSettle(); // Show snackbar

View File

@ -1009,7 +1009,7 @@ void main() {
],
),
),
)
),
);
// expect first tab to be selected

View File

@ -119,7 +119,7 @@ void main() {
),
),
),
)
),
);
await tester.tap(find.byKey(textField1));
@ -174,7 +174,7 @@ void main() {
),
),
),
)
),
);
// If there were a splash, this would cancel the splash.

View File

@ -83,7 +83,7 @@ Widget overlayWithEntry(OverlayEntry entry) {
data: const MediaQueryData(size: Size(800.0, 600.0)),
child: Overlay(
initialEntries: <OverlayEntry>[
entry
entry,
],
),
),
@ -124,7 +124,7 @@ double getOpacity(WidgetTester tester, Finder finder) {
find.ancestor(
of: finder,
matching: find.byType(FadeTransition),
)
),
).opacity.value;
}
@ -237,7 +237,7 @@ void main() {
textFieldValue = value;
},
),
)
),
);
RenderBox findTextFieldBox() => tester.renderObject(find.byKey(textFieldKey));
@ -368,7 +368,7 @@ void main() {
overlay(
child: const TextField(
),
)
),
);
final TextField textField = tester.firstWidget(find.byType(TextField));
@ -382,7 +382,7 @@ void main() {
child: const TextField(
cursorRadius: Radius.circular(3.0),
),
)
),
);
final TextField textField = tester.firstWidget(find.byType(TextField));
@ -561,7 +561,7 @@ void main() {
controller: controller,
maxLines: null,
),
)
),
);
expect(controller.selection.baseOffset, -1);
expect(controller.selection.extentOffset, -1);
@ -675,7 +675,7 @@ void main() {
child: TextField(
controller: controller,
),
)
),
);
expect(controller.selection.baseOffset, -1);
expect(controller.selection.extentOffset, -1);
@ -703,7 +703,7 @@ void main() {
controller: controller,
enableInteractiveSelection: false,
),
)
),
);
expect(controller.selection.baseOffset, -1);
expect(controller.selection.extentOffset, -1);
@ -730,7 +730,7 @@ void main() {
child: TextField(
controller: controller,
),
)
),
);
const String testValue = 'abc def ghi';
@ -765,7 +765,7 @@ void main() {
child: TextField(
controller: controller,
),
)
),
);
const String testValue = 'abc def ghi';
@ -804,7 +804,7 @@ void main() {
child: TextField(
controller: controller,
),
)
),
);
const String testValue = 'abcdefghi';
@ -844,7 +844,7 @@ void main() {
child: TextField(
controller: controller,
),
)
),
);
const String testValue = 'abc def ghi';
@ -877,7 +877,7 @@ void main() {
controller: controller,
readOnly: true,
),
)
),
);
// Read only text field cannot open keyboard.
await tester.showKeyboard(find.byType(TextField));
@ -913,7 +913,7 @@ void main() {
readOnly: true,
),
),
)
),
);
await tester.tap(find.byType(TextField));
@ -934,7 +934,7 @@ void main() {
readOnly: true,
),
),
)
),
);
await tester.tap(find.byType(TextField));
@ -997,7 +997,7 @@ void main() {
const TextEditingValue(
text: 'readonly',
composing: TextRange(start: 0, end: 8), // Simulate text composing.
)
),
);
await tester.pumpWidget(
@ -1006,7 +1006,7 @@ void main() {
controller: controller,
readOnly: true,
),
)
),
);
final RenderEditable renderEditable = findRenderEditable(tester);
@ -1112,7 +1112,7 @@ void main() {
controller: controller,
enableInteractiveSelection: false,
),
)
),
);
const String testValue = 'abc def ghi';
@ -3702,7 +3702,7 @@ void main() {
controller: controller,
readOnly: true,
),
)
),
);
await tester.idle();
@ -4141,7 +4141,7 @@ void main() {
controller: controller,
maxLines: null,
),
)
),
);
const String testValue = 'x';

View File

@ -23,7 +23,7 @@ void main() {
style: const TextStyle(),
cursorColor: Colors.black,
backgroundCursorColor: Colors.black,
)
),
);
}

View File

@ -38,7 +38,7 @@ void main() {
],
),
),
)
),
);
await tester.tap(find.byKey(popupMenuButtonKey));
@ -108,7 +108,7 @@ void main() {
),
),
),
)
),
);
await tester.tap(find.byKey(popupMenuButtonKey));
@ -142,7 +142,7 @@ void main() {
),
),
),
)
),
);
await tester.tap(find.byKey(dropdownMenuButtonKey));
@ -176,7 +176,7 @@ void main() {
),
),
),
)
),
);
await tester.tap(find.text('SHOW'));
@ -213,7 +213,7 @@ void main() {
),
),
),
)
),
);
await tester.tap(find.text('SHOW'));
@ -251,7 +251,7 @@ void main() {
),
),
),
)
),
);
await tester.tap(find.text('SHOW'));
@ -268,7 +268,7 @@ void main() {
MaterialApp(
theme: ThemeData(iconTheme: const IconThemeData(color: Colors.green, size: 10.0)),
home: const Icon(Icons.computer),
)
),
);
RenderParagraph glyphText = tester.renderObject(find.byType(RichText));
@ -338,7 +338,7 @@ void main() {
primaryTextTheme: fallback.primaryTextTheme.copyWith(
body1: fallback.primaryTextTheme.body1.copyWith(
fontSize: _kMagicFontSize,
)
),
),
);
expect(customTheme.primaryTextTheme.body1.fontSize, _kMagicFontSize);

View File

@ -700,7 +700,7 @@ void main() {
),
),
),
)
),
);
final Finder tooltip = find.byType(Tooltip);
@ -758,7 +758,7 @@ void main() {
),
),
),
)
),
);
final Finder tooltip = find.byType(Tooltip);
@ -824,7 +824,7 @@ void main() {
label: 'TIP',
textDirection: TextDirection.ltr,
),
]
],
);
expect(semantics, hasSemantics(expected, ignoreTransform: true, ignoreRect: true));

View File

@ -847,7 +847,7 @@ void main() {
),
),
),
)
),
);
final Finder tooltip = find.byType(Tooltip);
@ -891,7 +891,7 @@ void main() {
),
),
),
)
),
);
final Finder tooltip = find.byType(Tooltip);
@ -932,7 +932,7 @@ void main() {
),
),
),
)
),
);
final Finder tooltip = find.byType(Tooltip);
@ -965,7 +965,7 @@ void main() {
),
),
),
)
),
);
final Finder tooltip = find.byType(Tooltip);

View File

@ -139,7 +139,7 @@ void main() {
assetImage.obtainKey(ImageConfiguration(
bundle: testAssetBundle,
devicePixelRatio: 3.0)
devicePixelRatio: 3.0),
).then(expectAsync1((AssetBundleImageKey bundleKey) {
expect(bundleKey.name, mainAssetPath);
expect(bundleKey.scale, 1.0);
@ -172,7 +172,7 @@ void main() {
// we have 1.0 and 3.0, asking for 1.5 should give
assetImage.obtainKey(ImageConfiguration(
bundle: testAssetBundle,
devicePixelRatio: deviceRatio)
devicePixelRatio: deviceRatio),
).then(expectAsync1((AssetBundleImageKey bundleKey) {
expect(bundleKey.name, expectedAssetPath);
expect(bundleKey.scale, chosenAssetRatio);

View File

@ -15,7 +15,7 @@ void main() {
await tester.pumpWidget(
const MaterialApp(
home: Text('text widget'),
)
),
);
const Map<String, dynamic> data = <String, dynamic>{
'type': 'fontsChange',
@ -33,7 +33,7 @@ void main() {
await tester.pumpWidget(
const MaterialApp(
home: SelectableText('text widget'),
)
),
);
const Map<String, dynamic> data = <String, dynamic>{
'type': 'fontsChange',
@ -54,8 +54,7 @@ void main() {
location: BannerLocation.topStart,
textDirection: TextDirection.ltr,
layoutDirection: TextDirection.ltr,
)
),
);
const Map<String, dynamic> data = <String, dynamic>{
'type': 'fontsChange',
@ -74,8 +73,8 @@ void main() {
CupertinoApp(
home: CupertinoDatePicker(
onDateTimeChanged: (DateTime dateTime) { },
)
)
),
),
);
final dynamic state = tester.state(find.byType(CupertinoDatePicker));
final Map<int, double> cache = state.estimatedColumnWidths;
@ -100,8 +99,8 @@ void main() {
home: CupertinoDatePicker(
mode: CupertinoDatePickerMode.date,
onDateTimeChanged: (DateTime dateTime) { },
)
)
),
),
);
final dynamic state = tester.state(find.byType(CupertinoDatePicker));
final Map<int, double> cache = state.estimatedColumnWidths;
@ -126,8 +125,8 @@ void main() {
CupertinoApp(
home: CupertinoTimerPicker(
onTimerDurationChanged: (Duration d) { },
)
)
),
),
);
final dynamic state = tester.state(find.byType(CupertinoTimerPicker));
// Simulates wrong metrics due to font missing.
@ -159,7 +158,7 @@ void main() {
onChanged: (RangeValues values) { },
),
),
)
),
);
const Map<String, dynamic> data = <String, dynamic>{
'type': 'fontsChange',
@ -182,7 +181,7 @@ void main() {
onChanged: (double value) { },
),
),
)
),
);
const Map<String, dynamic> data = <String, dynamic>{
'type': 'fontsChange',
@ -223,7 +222,7 @@ void main() {
),
),
),
)
),
);
await tester.tap(find.text('X'));
await tester.pumpAndSettle();
@ -239,7 +238,7 @@ void main() {
find.descendant(
of: find.byKey(const Key('parent')),
matching: find.byType(CustomPaint),
).first
).first,
);
expect(renderObject.debugNeedsPaint, isTrue);
});

View File

@ -180,7 +180,7 @@ void main() {
WidgetSpan(child: SizedBox(width: 10, height: 10)),
TextSpan(text: 'The sky is falling :)'),
],
)
),
),
),
TextSpan(text: 'c'),
@ -198,7 +198,7 @@ void main() {
WidgetSpan(child: SizedBox(width: 10, height: 11)),
TextSpan(text: 'The sky is falling :)'),
],
)
),
),
),
TextSpan(text: 'c'),

View File

@ -44,7 +44,7 @@ void main() {
);
},
),
)
),
);
await expectLater(
@ -98,7 +98,7 @@ void main() {
);
},
),
)
),
);
await expectLater(
@ -144,7 +144,7 @@ void main() {
);
},
),
)
),
);
await expectLater(

View File

@ -50,7 +50,7 @@ void main() {
child = RenderPositionedBox(
alignment: Alignment.center,
child: RenderSizedBox(const Size(100.0, 100.0)),
)
),
);
root.attach(PipelineOwner());

View File

@ -21,7 +21,7 @@ void main() {
opacity: 1.0
)
),
)
),
),
);
layout(a, phase: EnginePhase.flushSemantics);

View File

@ -74,7 +74,7 @@ void main() {
final List<SemanticsNode> children = <SemanticsNode>[
SemanticsNode()
..isMergedIntoParent = true
..rect = const Rect.fromLTRB(5.0, 5.0, 10.0, 10.0)
..rect = const Rect.fromLTRB(5.0, 5.0, 10.0, 10.0),
];
node.updateWith(
@ -82,7 +82,7 @@ void main() {
childrenInInversePaintOrder: children,
);
children.add( SemanticsNode()
children.add(SemanticsNode()
..isMergedIntoParent = true
..rect = const Rect.fromLTRB(42.0, 42.0, 10.0, 10.0)
);

View File

@ -42,7 +42,7 @@ void main() {
key: key,
duration: const Duration(milliseconds: 200),
decoration: decorationA,
)
),
);
final RenderDecoratedBox box = key.currentContext.findRenderObject();
@ -54,7 +54,7 @@ void main() {
key: key,
duration: const Duration(milliseconds: 200),
decoration: decorationB,
)
),
);
expect(key.currentContext.findRenderObject(), equals(box));
@ -101,7 +101,7 @@ void main() {
AnimatedContainer(
duration: const Duration(milliseconds: 200),
color: const Color(0xFF00FF00),
)
),
);
expect(tester.binding.transientCallbackCount, 0);
await tester.pump(const Duration(seconds: 1));
@ -110,7 +110,7 @@ void main() {
AnimatedContainer(
duration: const Duration(milliseconds: 200),
color: const Color(0xFF00FF00),
)
),
);
expect(tester.binding.transientCallbackCount, 0);
await tester.pump(const Duration(seconds: 1));
@ -119,7 +119,7 @@ void main() {
AnimatedContainer(
duration: const Duration(milliseconds: 200),
color: const Color(0xFF0000FF),
)
),
);
expect(tester.binding.transientCallbackCount, 1); // this is the only time an animation should have started!
await tester.pump(const Duration(seconds: 1));
@ -128,7 +128,7 @@ void main() {
AnimatedContainer(
duration: const Duration(milliseconds: 200),
color: const Color(0xFF0000FF),
)
),
);
expect(tester.binding.transientCallbackCount, 0);
});
@ -226,7 +226,7 @@ void main() {
height: 100.0,
child: const Text('X', textDirection: TextDirection.ltr),
),
)
),
);
await tester.pump();
@ -246,7 +246,7 @@ void main() {
height: 200.0,
child: const Text('X', textDirection: TextDirection.ltr),
),
)
),
);
await tester.pump();
await tester.pump(const Duration(milliseconds: 100));
@ -270,7 +270,7 @@ void main() {
height: 100.0,
child: const Text('X', textDirection: TextDirection.ltr),
),
)
),
);
await tester.pump();
await tester.pump(const Duration(milliseconds: 100));

View File

@ -19,7 +19,7 @@ Future<Size> _getSize(WidgetTester tester, BoxConstraints constraints, double as
),
),
),
)
),
);
final RenderBox box = tester.renderObject(find.byKey(childKey));
return box.size;

View File

@ -39,7 +39,7 @@ void main() {
],
),
),
)
),
);
await expectLater(
find.byType(RepaintBoundary).first,

View File

@ -17,7 +17,7 @@ void main() {
elevation: 2.0,
color: Color(0xFF0000FF),
shadowColor: Color(0xFF00FF00),
)
),
);
final RenderPhysicalShape renderObject = tester.renderObject(find.byType(PhysicalShape));
expect(renderObject.clipper, const ShapeBorderClipper(shape: CircleBorder()));
@ -34,7 +34,7 @@ void main() {
color: const Color(0xFF0000FF),
shadowColor: const Color(0xFF00FF00),
child: Container(color: const Color(0xFF0000FF)),
)
),
);
final RenderPhysicalShape renderPhysicalShape =
@ -79,7 +79,7 @@ void main() {
),
),
),
)
),
);
expect(_pointerDown, isFalse);
await tester.tap(find.byKey(key1));
@ -109,7 +109,7 @@ void main() {
),
),
),
)
),
);
expect(_pointerDown, isFalse);
await tester.tap(find.byKey(key1));
@ -139,7 +139,7 @@ void main() {
),
),
),
)
),
);
expect(_pointerDown, isFalse);
await tester.tap(find.byKey(key1));

View File

@ -100,7 +100,7 @@ Future<void> main() async {
border: Border.all(width: 10.0, color: const Color(0x80FF00FF)),
color: Colors.teal[600],
),
)
),
);
});
@ -116,7 +116,7 @@ Future<void> main() async {
height: 25.0,
),
),
)
),
);
expect(tester.getSize(find.byKey(key)), equals(const Size(45.0, 45.0)));
});

View File

@ -136,7 +136,7 @@ void main() {
behavior: HitTestBehavior.opaque,
onTap: () { log.add('tap'); },
),
)
),
);
expect(log, equals(<String>['getClip']));
@ -156,7 +156,7 @@ void main() {
behavior: HitTestBehavior.opaque,
onTap: () { log.add('tap'); },
),
)
),
);
expect(log, equals(<String>[]));
@ -179,7 +179,7 @@ void main() {
onTap: () { log.add('tap'); },
),
),
)
),
);
expect(log, equals(<String>[]));
@ -207,7 +207,7 @@ void main() {
),
),
),
)
),
);
expect(log, equals(<String>['a']));
@ -231,7 +231,7 @@ void main() {
),
),
),
)
),
);
expect(log, equals(<String>['a', 'tap']));
@ -249,7 +249,7 @@ void main() {
),
),
),
)
),
);
expect(log, equals(<String>['a', 'tap', 'a']));
@ -267,7 +267,7 @@ void main() {
),
),
),
)
),
);
expect(log, equals(<String>['a', 'tap', 'a']));
@ -285,7 +285,7 @@ void main() {
),
),
),
)
),
);
expect(log, equals(<String>['a', 'tap', 'a', 'b']));
@ -303,7 +303,7 @@ void main() {
),
),
),
)
),
);
expect(log, equals(<String>['a', 'tap', 'a', 'b', 'c']));

View File

@ -54,7 +54,7 @@ void main() {
),
),
),
)
),
);
await expectLater(
find.byType(ColorFiltered),

View File

@ -311,7 +311,7 @@ void main() {
final TextEditingController controller = TextEditingController.fromValue(
const TextEditingValue(
text: 'initial value',
)
),
);
Future<void> pumpEditableTextWithTextStyle(TextStyle style) async {
await tester.pumpWidget(

View File

@ -211,7 +211,7 @@ void main() {
),
),
),
)
),
);
Scrollable.ensureVisible(findContext(0));

View File

@ -24,7 +24,7 @@ void main() {
),
),
),
)
),
);
final RenderBox outsideBox = tester.firstRenderObject(find.byKey(outside));
@ -60,7 +60,7 @@ void main() {
),
),
),
)
),
);
final RenderBox outsideBox = tester.firstRenderObject(find.byKey(outside));
@ -96,7 +96,7 @@ void main() {
),
),
),
)
),
);
final RenderBox outsideBox = tester.firstRenderObject(find.byKey(outside));
@ -466,7 +466,7 @@ void main() {
),
),
),
)
),
);
expect(_pointerDown, isFalse);
await tester.tap(find.byKey(key1));

View File

@ -78,7 +78,7 @@ void main() {
buildBox(5),
buildBox(6),
],
)
),
);
await tester.tap(find.text('0'));
@ -108,7 +108,7 @@ void main() {
children: <Widget>[
Container(width: 100.0, height: 100.0),
],
)
),
);
ContainerLayer layer = RendererBinding.instance.renderView.debugLayer;
while (layer != null && !(layer is OpacityLayer))

View File

@ -517,7 +517,7 @@ void main() {
delegate: SliverChildListDelegate(<Widget>[
Text('child', key: GlobalKey()),
]),
)
),
],
),
),

View File

@ -25,7 +25,7 @@ void main() {
},
child: Container(),
),
)
),
);
expect(semantics, includesNodeWith(
@ -59,7 +59,7 @@ void main() {
},
child: Container(),
),
)
),
);
expect(semantics, includesNodeWith(
@ -125,7 +125,7 @@ void main() {
instance
..onTap = () { logs.add('tap'); };
},
)
),
});
};
@ -149,7 +149,7 @@ void main() {
instance
..onStart = (_) { logs.add('horizontal'); };
},
)
),
},
child: hasLayoutPerformer ? _TestLayoutPerformer(performLayout: performLayout) : null,
),
@ -186,7 +186,7 @@ void main() {
gestures: gestures,
child: Container(),
),
)
),
);
expect(semantics, includesNodeWith(
@ -200,7 +200,7 @@ void main() {
semantics: _TestSemanticsGestureDelegate(onTap: () {}),
child: Container(),
),
)
),
);
expect(semantics, includesNodeWith(
@ -222,7 +222,7 @@ void main() {
semantics: _TestSemanticsGestureDelegate(onTap: () {}),
child: Container(),
),
)
),
);
expect(semantics, includesNodeWith(
@ -235,7 +235,7 @@ void main() {
gestures: gestures,
child: Container(),
),
)
),
);
expect(semantics, includesNodeWith(
@ -257,7 +257,7 @@ void main() {
semantics: _TestSemanticsGestureDelegate(onTap: () {}),
child: Container(),
),
)
),
);
expect(semantics, includesNodeWith(
@ -271,7 +271,7 @@ void main() {
semantics: _TestSemanticsGestureDelegate(onLongPress: () {}),
child: Container(),
),
)
),
);
expect(semantics, includesNodeWith(
@ -298,7 +298,7 @@ void main() {
),
child: Container(),
),
)
),
);
final int detectorId = detectorKey.currentContext.findRenderObject().debugSemantics.id;
@ -332,7 +332,7 @@ void main() {
gestures: _buildGestureMap(null, null),
child: Container(),
),
)
),
);
expect(semantics, isNot(includesNodeWith(
@ -353,7 +353,7 @@ void main() {
),
child: Container(),
),
)
),
);
expect(semantics, includesNodeWith(
@ -384,7 +384,7 @@ void main() {
),
child: Container(),
),
)
),
);
final int detectorId = detectorKey.currentContext.findRenderObject().debugSemantics.id;
@ -404,7 +404,7 @@ void main() {
gestures: _buildGestureMap(null, null),
child: Container(),
),
)
),
);
expect(semantics, isNot(includesNodeWith(
@ -425,7 +425,7 @@ void main() {
),
child: Container(),
),
)
),
);
expect(semantics, includesNodeWith(
@ -456,7 +456,7 @@ void main() {
),
child: Container(),
),
)
),
);
final int detectorId = detectorKey.currentContext.findRenderObject().debugSemantics.id;
@ -476,7 +476,7 @@ void main() {
gestures: _buildGestureMap(null, null),
child: Container(),
),
)
),
);
expect(semantics, isNot(includesNodeWith(
@ -497,7 +497,7 @@ void main() {
),
child: Container(),
),
)
),
);
expect(semantics, includesNodeWith(
@ -513,7 +513,7 @@ void main() {
),
child: Container(),
),
)
),
);
expect(semantics, includesNodeWith(
@ -556,7 +556,7 @@ void main() {
gestures: gestures,
child: Container(),
),
)
),
);
final int detectorId = detectorKey.currentContext.findRenderObject().debugSemantics.id;
@ -582,7 +582,7 @@ void main() {
gestures: _buildGestureMap(null, null),
child: Container(),
),
)
),
);
expect(semantics, isNot(includesNodeWith(
@ -603,7 +603,7 @@ void main() {
),
child: Container(),
),
)
),
);
expect(semantics, includesNodeWith(
@ -647,7 +647,7 @@ void main() {
gestures: gestures,
child: Container(),
),
)
),
);
final int detectorId = detectorKey.currentContext.findRenderObject().debugSemantics.id;
@ -672,7 +672,7 @@ void main() {
gestures: _buildGestureMap(() => LongPressGestureRecognizer(), null),
child: Container(),
),
)
),
);
expect(semantics, includesNodeWith(
@ -685,7 +685,7 @@ void main() {
gestures: _buildGestureMap(() => TapGestureRecognizer(), null),
child: Container(),
),
)
),
);
expect(semantics, includesNodeWith(

View File

@ -315,7 +315,7 @@ Future<void> main() async {
find.ancestor(
of: find.byKey(firstKey, skipOffstage: false),
matching: find.byType(Offstage, skipOffstage: false),
).first
).first,
);
// Original hero should stay hidden.
expect(first.offstage, isTrue);
@ -736,7 +736,7 @@ Future<void> main() async {
},
),
),
)
),
);
// Pushes route
@ -838,7 +838,7 @@ Future<void> main() async {
},
),
),
)
),
);
// Pushes route
@ -916,7 +916,7 @@ Future<void> main() async {
},
),
),
)
),
);
// Pushes route
@ -1044,7 +1044,7 @@ Future<void> main() async {
},
),
),
)
),
);
// Pushes routeB
@ -1143,7 +1143,7 @@ Future<void> main() async {
},
),
),
)
),
);
expect(find.text('456'), findsOneWidget);
@ -1758,7 +1758,7 @@ Future<void> main() async {
);
},
),
)
),
);
nestedNavigator.currentState.push(MaterialPageRoute<void>(
@ -2234,7 +2234,7 @@ Future<void> main() async {
child: Image(
image: imageProvider,
key: imageKey2,
)
),
),
),
);

View File

@ -38,10 +38,10 @@ void main() {
text: 'zzzzzzzzz',
recognizer: tapRight,
),
]
],
),
),
)
),
);
final RenderBox box = tester.renderObject(find.byKey(textKey));

View File

@ -87,7 +87,7 @@ void main() {
),
),
),
)
),
);
final RenderBox renderObject = tester.renderObject(find.byType(Icon));

View File

@ -15,7 +15,7 @@ void main() {
await tester.pumpWidget(
const Center(
child: ImageIcon(_kImage),
)
),
);
final RenderBox renderObject = tester.renderObject(find.byType(ImageIcon));
@ -45,7 +45,7 @@ void main() {
null,
size: 96.0,
),
)
),
);
final RenderBox renderObject = tester.renderObject(find.byType(ImageIcon));
@ -59,7 +59,7 @@ void main() {
data: IconThemeData(size: 36.0),
child: ImageIcon(null),
),
)
),
);
final RenderBox renderObject = tester.renderObject(find.byType(ImageIcon));
@ -76,7 +76,7 @@ void main() {
size: 48.0,
),
),
)
),
);
final RenderBox renderObject = tester.renderObject(find.byType(ImageIcon));
@ -90,7 +90,7 @@ void main() {
data: IconThemeData(),
child: ImageIcon(null),
),
)
),
);
final RenderBox renderObject = tester.renderObject(find.byType(ImageIcon));

View File

@ -210,7 +210,7 @@ void main() {
image: imageProvider,
),
),
)
),
);
expect(imageProvider._lastResolvedConfiguration.devicePixelRatio, 5.0);
@ -237,7 +237,7 @@ void main() {
image: imageProvider,
),
),
)
),
);
expect(imageProvider._lastResolvedConfiguration.devicePixelRatio, 10.0);
@ -276,7 +276,7 @@ void main() {
child: Container(width: 100.0),
),
],
)
),
);
expect(imageProvider._lastResolvedConfiguration.devicePixelRatio, 5.0);
@ -306,7 +306,7 @@ void main() {
),
),
],
)
),
);
expect(imageProvider._lastResolvedConfiguration.devicePixelRatio, 10.0);
@ -597,7 +597,7 @@ void main() {
image: TestImageProvider(),
color: const Color(0xFF00FF00),
colorBlendMode: BlendMode.clear,
)
),
);
final RenderImage renderer = tester.renderObject<RenderImage>(find.byType(Image));
expect(renderer.color, const Color(0xFF00FF00));
@ -792,7 +792,7 @@ void main() {
textDirection: TextDirection.ltr,
flags: <SemanticsFlag>[SemanticsFlag.isImage],
),
]
],
), ignoreTransform: true));
semantics.dispose();
});

View File

@ -161,7 +161,7 @@ void main() {
),
),
),
)
),
);
expect(log, equals(<String>['a: 3']));
@ -237,7 +237,7 @@ void main() {
),
),
),
)
),
);
expect(log, equals(<String>['a: 3']));
@ -308,7 +308,7 @@ void main() {
),
),
),
)
),
);
expect(log, equals(<int>[3]));
@ -355,7 +355,7 @@ void main() {
),
right: child,
),
)
),
);
expect(log, equals(<int>[3]));
@ -403,7 +403,7 @@ void main() {
ValueInherited(
value: 3,
child: inner,
)
),
);
expect(inheritedValue, equals(3));
});
@ -430,7 +430,7 @@ void main() {
ValueInherited(
value: 3,
child: inner,
)
),
);
expect(buildCount, equals(1));
});
@ -461,7 +461,7 @@ void main() {
ValueInherited(
value: 3,
child: inner,
)
),
);
expect(buildCount, equals(2));
});

View File

@ -188,7 +188,7 @@ void main() {
),
);
},
)
),
);
TextStyle getIconStyle(Key key) {

View File

@ -28,7 +28,7 @@ void main() {
},
),
),
)
),
);
expect(layoutBuilderSize, const Size(100.0, 200.0));
@ -231,7 +231,7 @@ void main() {
);
}
),
)
),
);
expect(layoutBuilderSize, equals(const Size(10.0, 20.0)));

View File

@ -120,8 +120,7 @@ void main() {
1, 2,
3, 4, 5, // visible
6, 7,
]
));
]));
callbackTracker.clear();
});
@ -459,7 +458,7 @@ void main() {
),
),
),
)
),
);
final RenderSliverList list = tester.renderObject(find.byType(SliverList));
@ -490,7 +489,7 @@ void main() {
),
),
),
)
),
);
final RenderObject renderObject = tester.renderObject(find.byType(Scrollable));
@ -516,7 +515,7 @@ void main() {
),
),
),
)
),
);
final RenderObject renderObject = tester.renderObject(find.byType(Scrollable));

View File

@ -134,7 +134,7 @@ void main() {
},
),
),
)
),
);
// Can be scrolled infinitely for negative indexes.
@ -183,7 +183,7 @@ void main() {
},
),
),
)
),
);
expect(paintedChildren, <int>[-13, -12, -11, -10, -9, -8, -7]);
@ -299,7 +299,7 @@ void main() {
},
),
),
)
),
);
// Scrolls up and down to check if builder is called twice.
@ -326,7 +326,7 @@ void main() {
return Text(index.toString());
}),
),
)
),
);
final RenderListWheelViewport viewport = tester.firstRenderObject(find.byType(Text)).parent.parent;
@ -363,7 +363,7 @@ void main() {
return Text(index.toString());
}),
),
)
),
);
final RenderListWheelViewport viewport = tester.firstRenderObject(find.byType(Text)).parent.parent;
@ -385,7 +385,7 @@ void main() {
return Text(index.toString());
}),
),
)
),
);
// 12 instead of 6 children are laid out + 1 because the middle item is

View File

@ -34,7 +34,7 @@ void main() {
),
),
),
)
),
);
await tester.tap(find.text('X'));

View File

@ -274,7 +274,7 @@ void main() {
label: 'Dismiss',
textDirection: TextDirection.ltr,
),
]
],
);
expect(semantics, hasSemantics(expectedSemantics, ignoreId: true));

View File

@ -25,7 +25,7 @@ Future<void> main() async {
routes: <String, WidgetBuilder>{
'/page': (BuildContext context) => Container(),
},
)
),
);
final RenderImage renderImage = tester.renderObject(find.byType(Image));
final ui.Image image1 = renderImage.image;

View File

@ -174,7 +174,7 @@ void main() {
),
),
),
)
),
);
await expectLater(
find.byType(RepaintBoundary).first,

View File

@ -23,7 +23,7 @@ void main() {
);
},
),
)
),
);
final Element builderElement = tester.element(find.byKey(builderKey));

View File

@ -888,7 +888,7 @@ void main() {
find.descendant(
of: find.byType(AndroidView),
matching: find.byType(Focus),
)
),
);
final Element containerElement = tester.element(find.byKey(containerKey));
final FocusNode androidViewFocusNode = androidViewFocusWidget.focusNode;
@ -1579,7 +1579,7 @@ void main() {
height: 100,
),
],
)
),
);
// First frame is before the platform view was created so the render object
@ -1914,7 +1914,8 @@ void main() {
Factory<OneSequenceGestureRecognizer>(
constructRecognizer,
),
})
},
),
);
await tester.pumpWidget(
@ -1925,7 +1926,8 @@ void main() {
Factory<OneSequenceGestureRecognizer>(
constructRecognizer,
),
})
},
),
);
expect(factoryInvocationCount, 1);
});
@ -2160,7 +2162,7 @@ void main() {
find.descendant(
of: find.byType(PlatformViewLink),
matching: find.byType(Focus),
)
),
);
final FocusNode platformViewFocusNode = platformViewFocusWidget.focusNode;
final Element containerElement = tester.element(find.byKey(containerKey));

Some files were not shown because too many files have changed in this diff Show More