mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
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:
parent
d1761f1072
commit
f0553ba58e
@ -1509,7 +1509,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
|
|||||||
.pickerTextStyle.merge(
|
.pickerTextStyle.merge(
|
||||||
const TextStyle(
|
const TextStyle(
|
||||||
fontSize: _kTimerPickerNumberLabelFontSize,
|
fontSize: _kTimerPickerNumberLabelFontSize,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1561,7 +1561,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
|
|||||||
data: themeData.copyWith(
|
data: themeData.copyWith(
|
||||||
textTheme: themeData.textTheme.copyWith(
|
textTheme: themeData.textTheme.copyWith(
|
||||||
pickerTextStyle: _textStyleFrom(context),
|
pickerTextStyle: _textStyleFrom(context),
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: widget.alignment,
|
alignment: widget.alignment,
|
||||||
|
@ -1554,7 +1554,7 @@ class _RenderCupertinoDialogActions extends RenderBox
|
|||||||
firstChild.size.height,
|
firstChild.size.height,
|
||||||
lastChild.size.height,
|
lastChild.size.height,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -70,7 +70,7 @@ enum OverlayVisibilityMode {
|
|||||||
|
|
||||||
class _CupertinoTextFieldSelectionGestureDetectorBuilder extends TextSelectionGestureDetectorBuilder {
|
class _CupertinoTextFieldSelectionGestureDetectorBuilder extends TextSelectionGestureDetectorBuilder {
|
||||||
_CupertinoTextFieldSelectionGestureDetectorBuilder({
|
_CupertinoTextFieldSelectionGestureDetectorBuilder({
|
||||||
@required _CupertinoTextFieldState state
|
@required _CupertinoTextFieldState state,
|
||||||
}) : _state = state,
|
}) : _state = state,
|
||||||
super(delegate: state);
|
super(delegate: state);
|
||||||
|
|
||||||
|
@ -644,7 +644,7 @@ class FlutterError extends Error with DiagnosticableTreeMixin implements Asserti
|
|||||||
wrapWidth: wrapWidth,
|
wrapWidth: wrapWidth,
|
||||||
wrapWidthProperties: wrapWidth,
|
wrapWidthProperties: wrapWidth,
|
||||||
maxDescendentsTruncatableNode: 5,
|
maxDescendentsTruncatableNode: 5,
|
||||||
).render(details.toDiagnosticsNode(style: DiagnosticsTreeStyle.error)).trimRight()
|
).render(details.toDiagnosticsNode(style: DiagnosticsTreeStyle.error)).trimRight(),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
debugPrint('Another exception was thrown: ${details.summary}');
|
debugPrint('Another exception was thrown: ${details.summary}');
|
||||||
|
@ -275,7 +275,7 @@ void showLicensePage({
|
|||||||
applicationVersion: applicationVersion,
|
applicationVersion: applicationVersion,
|
||||||
applicationIcon: applicationIcon,
|
applicationIcon: applicationIcon,
|
||||||
applicationLegalese: applicationLegalese,
|
applicationLegalese: applicationLegalese,
|
||||||
)
|
),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -488,7 +488,7 @@ class _ExpansionPanelListState extends State<ExpansionPanelList> {
|
|||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () => _handlePressed(_isChildExpanded(index), index),
|
onTap: () => _handlePressed(_isChildExpanded(index), index),
|
||||||
child: header,
|
child: header,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
items.add(
|
items.add(
|
||||||
|
@ -537,7 +537,7 @@ class _MergeableMaterialState extends State<MergeableMaterial> with TickerProvid
|
|||||||
mainAxis: widget.mainAxis,
|
mainAxis: widget.mainAxis,
|
||||||
children: slices,
|
children: slices,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
slices = <Widget>[];
|
slices = <Widget>[];
|
||||||
|
|
||||||
@ -545,7 +545,7 @@ class _MergeableMaterialState extends State<MergeableMaterial> with TickerProvid
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
width: widget.mainAxis == Axis.horizontal ? _getGapSize(i) : null,
|
width: widget.mainAxis == Axis.horizontal ? _getGapSize(i) : null,
|
||||||
height: widget.mainAxis == Axis.vertical ? _getGapSize(i) : null,
|
height: widget.mainAxis == Axis.vertical ? _getGapSize(i) : null,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
final MaterialSlice slice = _children[i];
|
final MaterialSlice slice = _children[i];
|
||||||
@ -591,7 +591,7 @@ class _MergeableMaterialState extends State<MergeableMaterial> with TickerProvid
|
|||||||
Material(
|
Material(
|
||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
child: child,
|
child: child,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -608,7 +608,7 @@ class _MergeableMaterialState extends State<MergeableMaterial> with TickerProvid
|
|||||||
mainAxis: widget.mainAxis,
|
mainAxis: widget.mainAxis,
|
||||||
children: slices,
|
children: slices,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
slices = <Widget>[];
|
slices = <Widget>[];
|
||||||
}
|
}
|
||||||
|
@ -401,7 +401,7 @@ class PaginatedDataTableState extends State<PaginatedDataTable> {
|
|||||||
_firstRowIndex + widget.rowsPerPage,
|
_firstRowIndex + widget.rowsPerPage,
|
||||||
_rowCount,
|
_rowCount,
|
||||||
_rowCountApproximate,
|
_rowCountApproximate,
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
Container(width: 32.0),
|
Container(width: 32.0),
|
||||||
IconButton(
|
IconButton(
|
||||||
|
@ -46,7 +46,7 @@ class _TextSpanEditingController extends TextEditingController {
|
|||||||
|
|
||||||
class _SelectableTextSelectionGestureDetectorBuilder extends TextSelectionGestureDetectorBuilder {
|
class _SelectableTextSelectionGestureDetectorBuilder extends TextSelectionGestureDetectorBuilder {
|
||||||
_SelectableTextSelectionGestureDetectorBuilder({
|
_SelectableTextSelectionGestureDetectorBuilder({
|
||||||
@required _SelectableTextState state
|
@required _SelectableTextState state,
|
||||||
}) : _state = state,
|
}) : _state = state,
|
||||||
super(delegate: state);
|
super(delegate: state);
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ typedef InputCounterWidgetBuilder = Widget Function(
|
|||||||
|
|
||||||
class _TextFieldSelectionGestureDetectorBuilder extends TextSelectionGestureDetectorBuilder {
|
class _TextFieldSelectionGestureDetectorBuilder extends TextSelectionGestureDetectorBuilder {
|
||||||
_TextFieldSelectionGestureDetectorBuilder({
|
_TextFieldSelectionGestureDetectorBuilder({
|
||||||
@required _TextFieldState state
|
@required _TextFieldState state,
|
||||||
}) : _state = state,
|
}) : _state = state,
|
||||||
super(delegate: state);
|
super(delegate: state);
|
||||||
|
|
||||||
|
@ -3054,7 +3054,7 @@ class RenderIgnorePointer extends RenderProxyBox {
|
|||||||
'ignoringSemantics',
|
'ignoringSemantics',
|
||||||
_effectiveIgnoringSemantics,
|
_effectiveIgnoringSemantics,
|
||||||
description: ignoringSemantics == null ? 'implicitly $_effectiveIgnoringSemantics' : null,
|
description: ignoringSemantics == null ? 'implicitly $_effectiveIgnoringSemantics' : null,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3966,7 +3966,7 @@ abstract class ComponentElement extends Element {
|
|||||||
informationCollector: () sync* {
|
informationCollector: () sync* {
|
||||||
yield DiagnosticsDebugCreator(DebugCreator(this));
|
yield DiagnosticsDebugCreator(DebugCreator(this));
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
} finally {
|
} finally {
|
||||||
// We delay marking the element as clean until after calling build() so
|
// We delay marking the element as clean until after calling build() so
|
||||||
@ -3986,7 +3986,7 @@ abstract class ComponentElement extends Element {
|
|||||||
informationCollector: () sync* {
|
informationCollector: () sync* {
|
||||||
yield DiagnosticsDebugCreator(DebugCreator(this));
|
yield DiagnosticsDebugCreator(DebugCreator(this));
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
_child = updateChild(null, built, slot);
|
_child = updateChild(null, built, slot);
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ class _LayoutBuilderElement<ConstraintType extends Constraints> extends RenderOb
|
|||||||
informationCollector: () sync* {
|
informationCollector: () sync* {
|
||||||
yield DiagnosticsDebugCreator(DebugCreator(this));
|
yield DiagnosticsDebugCreator(DebugCreator(this));
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -123,7 +123,7 @@ class _LayoutBuilderElement<ConstraintType extends Constraints> extends RenderOb
|
|||||||
informationCollector: () sync* {
|
informationCollector: () sync* {
|
||||||
yield DiagnosticsDebugCreator(DebugCreator(this));
|
yield DiagnosticsDebugCreator(DebugCreator(this));
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
_child = updateChild(null, built, slot);
|
_child = updateChild(null, built, slot);
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ class Title extends StatelessWidget {
|
|||||||
ApplicationSwitcherDescription(
|
ApplicationSwitcherDescription(
|
||||||
label: title,
|
label: title,
|
||||||
primaryColor: color.value,
|
primaryColor: color.value,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
return child;
|
return child;
|
||||||
}
|
}
|
||||||
|
@ -2504,7 +2504,7 @@ class _InspectorOverlayLayer extends Layer {
|
|||||||
ErrorSummary(
|
ErrorSummary(
|
||||||
'The inspector should never be used in production mode due to the '
|
'The inspector should never be used in production mode due to the '
|
||||||
'negative performance impact.'
|
'negative performance impact.'
|
||||||
)
|
),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2808,7 +2808,7 @@ Iterable<DiagnosticsNode> _describeRelevantUserCode(Element element) {
|
|||||||
children: <DiagnosticsNode>[
|
children: <DiagnosticsNode>[
|
||||||
ErrorDescription('${ancestor.widget.toStringShort()} ${_describeCreationLocation(ancestor)}'),
|
ErrorDescription('${ancestor.widget.toStringShort()} ${_describeCreationLocation(ancestor)}'),
|
||||||
],
|
],
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
nodes.add(ErrorSpacer());
|
nodes.add(ErrorSpacer());
|
||||||
return false;
|
return false;
|
||||||
|
@ -83,7 +83,7 @@ void main() {
|
|||||||
find.descendant(
|
find.descendant(
|
||||||
of: find.widgetWithText(CupertinoActionSheetAction, text),
|
of: find.widgetWithText(CupertinoActionSheetAction, text),
|
||||||
matching: find.byType(DefaultTextStyle),
|
matching: find.byType(DefaultTextStyle),
|
||||||
)
|
),
|
||||||
).style;
|
).style;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,7 +313,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.tap(find.text('Go'));
|
await tester.tap(find.text('Go'));
|
||||||
|
@ -21,7 +21,7 @@ void main() {
|
|||||||
boilerplate(child: const CupertinoButton(
|
boilerplate(child: const CupertinoButton(
|
||||||
child: Text('X', style: testStyle),
|
child: Text('X', style: testStyle),
|
||||||
onPressed: null,
|
onPressed: null,
|
||||||
))
|
)),
|
||||||
);
|
);
|
||||||
final RenderBox buttonBox = tester.renderObject(find.byType(CupertinoButton));
|
final RenderBox buttonBox = tester.renderObject(find.byType(CupertinoButton));
|
||||||
expect(
|
expect(
|
||||||
@ -38,7 +38,7 @@ void main() {
|
|||||||
child: Text('X', style: testStyle),
|
child: Text('X', style: testStyle),
|
||||||
onPressed: null,
|
onPressed: null,
|
||||||
minSize: minSize,
|
minSize: minSize,
|
||||||
))
|
)),
|
||||||
);
|
);
|
||||||
final RenderBox buttonBox = tester.renderObject(find.byType(CupertinoButton));
|
final RenderBox buttonBox = tester.renderObject(find.byType(CupertinoButton));
|
||||||
expect(
|
expect(
|
||||||
@ -53,7 +53,7 @@ void main() {
|
|||||||
boilerplate(child: const CupertinoButton(
|
boilerplate(child: const CupertinoButton(
|
||||||
child: Text('XXXX', style: testStyle),
|
child: Text('XXXX', style: testStyle),
|
||||||
onPressed: null,
|
onPressed: null,
|
||||||
))
|
)),
|
||||||
);
|
);
|
||||||
final RenderBox buttonBox = tester.renderObject(find.byType(CupertinoButton));
|
final RenderBox buttonBox = tester.renderObject(find.byType(CupertinoButton));
|
||||||
expect(
|
expect(
|
||||||
@ -311,7 +311,7 @@ void main() {
|
|||||||
find.descendant(
|
find.descendant(
|
||||||
of: find.byType(CupertinoButton),
|
of: find.byType(CupertinoButton),
|
||||||
matching: find.byType(DecoratedBox),
|
matching: find.byType(DecoratedBox),
|
||||||
)
|
),
|
||||||
).decoration;
|
).decoration;
|
||||||
expect(decoration.color, CupertinoColors.activeBlue);
|
expect(decoration.color, CupertinoColors.activeBlue);
|
||||||
|
|
||||||
@ -346,7 +346,7 @@ void main() {
|
|||||||
find.descendant(
|
find.descendant(
|
||||||
of: find.byType(CupertinoButton),
|
of: find.byType(CupertinoButton),
|
||||||
matching: find.byType(DecoratedBox),
|
matching: find.byType(DecoratedBox),
|
||||||
)
|
),
|
||||||
).decoration;
|
).decoration;
|
||||||
expect(decoration.color.value, CupertinoColors.activeOrange.darkColor.value);
|
expect(decoration.color.value, CupertinoColors.activeOrange.darkColor.value);
|
||||||
});
|
});
|
||||||
|
@ -358,8 +358,8 @@ void main() {
|
|||||||
minuteInterval: 3,
|
minuteInterval: 3,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Drag the minute picker to the next slot (03 -> 06).
|
// Drag the minute picker to the next slot (03 -> 06).
|
||||||
@ -889,8 +889,8 @@ void main() {
|
|||||||
onDateTimeChanged: (_) {},
|
onDateTimeChanged: (_) {},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final dynamic exception = tester.takeException();
|
final dynamic exception = tester.takeException();
|
||||||
@ -916,8 +916,8 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await expectLater(
|
await expectLater(
|
||||||
|
@ -963,7 +963,7 @@ void main() {
|
|||||||
child: Placeholder(),
|
child: Placeholder(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
@ -975,7 +975,7 @@ void main() {
|
|||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return const CupertinoNavigationBarBackButton();
|
return const CupertinoNavigationBarBackButton();
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
@ -1004,7 +1004,7 @@ void main() {
|
|||||||
child: Placeholder(),
|
child: Placeholder(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
@ -1023,7 +1023,7 @@ void main() {
|
|||||||
child: const Placeholder(),
|
child: const Placeholder(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
|
@ -31,7 +31,7 @@ void main() {
|
|||||||
child: Placeholder(),
|
child: Placeholder(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
@ -64,7 +64,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
@ -126,7 +126,7 @@ void main() {
|
|||||||
child: Placeholder(),
|
child: Placeholder(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
@ -141,7 +141,7 @@ void main() {
|
|||||||
child: Placeholder(),
|
child: Placeholder(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
@ -172,7 +172,7 @@ void main() {
|
|||||||
child: Placeholder(),
|
child: Placeholder(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
@ -187,7 +187,7 @@ void main() {
|
|||||||
child: Placeholder(),
|
child: Placeholder(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Trigger the route push
|
// Trigger the route push
|
||||||
|
@ -176,7 +176,7 @@ void main() {
|
|||||||
data: MediaQueryData(viewInsets: EdgeInsets.only(bottom: 20.0)),
|
data: MediaQueryData(viewInsets: EdgeInsets.only(bottom: 20.0)),
|
||||||
child: child,
|
child: child,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final Offset initialPoint = tester.getCenter(find.byType(Placeholder));
|
final Offset initialPoint = tester.getCenter(find.byType(Placeholder));
|
||||||
@ -192,7 +192,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
child: child,
|
child: child,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
final Offset finalPoint = tester.getCenter(find.byType(Placeholder));
|
final Offset finalPoint = tester.getCenter(find.byType(Placeholder));
|
||||||
expect(initialPoint, finalPoint);
|
expect(initialPoint, finalPoint);
|
||||||
|
@ -171,7 +171,7 @@ void main() {
|
|||||||
children: children,
|
children: children,
|
||||||
onValueChanged: (int newValue) { },
|
onValueChanged: (int newValue) { },
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Default padding works.
|
// Default padding works.
|
||||||
@ -191,7 +191,7 @@ void main() {
|
|||||||
children: children,
|
children: children,
|
||||||
onValueChanged: (int newValue) { },
|
onValueChanged: (int newValue) { },
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Custom padding works.
|
// Custom padding works.
|
||||||
|
@ -554,7 +554,7 @@ void main() {
|
|||||||
return Text('Different page ${index + 1}');
|
return Text('Different page ${index + 1}');
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(tabsBuilt, const <int>[0, 1]);
|
expect(tabsBuilt, const <int>[0, 1]);
|
||||||
@ -653,7 +653,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(tabsPainted, const <int> [0]);
|
expect(tabsPainted, const <int> [0]);
|
||||||
@ -675,7 +675,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(tabsPainted, const <int> [0, 0]);
|
expect(tabsPainted, const <int> [0, 0]);
|
||||||
@ -869,10 +869,10 @@ void main() {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
)
|
),
|
||||||
)
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(tabsPainted0, const <int>[2, 0, 1, 2]);
|
expect(tabsPainted0, const <int>[2, 0, 1, 2]);
|
||||||
expect(tabsPainted1, const <int>[2, 0]);
|
expect(tabsPainted1, const <int>[2, 0]);
|
||||||
@ -892,7 +892,7 @@ void main() {
|
|||||||
controller: controller,
|
controller: controller,
|
||||||
tabBuilder: (BuildContext context, int index) => Text('Different page ${index + 1}'),
|
tabBuilder: (BuildContext context, int index) => Text('Different page ${index + 1}'),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
} on AssertionError catch (e) {
|
} on AssertionError catch (e) {
|
||||||
expect(e.toString(), contains('controller.index < tabBar.items.length'));
|
expect(e.toString(), contains('controller.index < tabBar.items.length'));
|
||||||
@ -907,7 +907,7 @@ void main() {
|
|||||||
controller: controller,
|
controller: controller,
|
||||||
tabBuilder: (BuildContext context, int index) => Text('Different page ${index + 1}'),
|
tabBuilder: (BuildContext context, int index) => Text('Different page ${index + 1}'),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(tester.takeException(), null);
|
expect(tester.takeException(), null);
|
||||||
@ -936,7 +936,7 @@ void main() {
|
|||||||
return Container();
|
return Container();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
@ -958,7 +958,7 @@ void main() {
|
|||||||
return Container();
|
return Container();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
for (int i = 0; i < 5; i++) {
|
for (int i = 0; i < 5; i++) {
|
||||||
controller.index = i;
|
controller.index = i;
|
||||||
|
@ -2926,10 +2926,10 @@ void main() {
|
|||||||
controller: TextEditingController(text: 'lorem'),
|
controller: TextEditingController(text: 'lorem'),
|
||||||
enabled: false,
|
enabled: false,
|
||||||
),
|
),
|
||||||
)
|
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
)
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await expectLater(
|
await expectLater(
|
||||||
|
@ -23,7 +23,7 @@ void main() {
|
|||||||
style: const TextStyle(),
|
style: const TextStyle(),
|
||||||
cursorColor: const Color.fromARGB(0, 0, 0, 0),
|
cursorColor: const Color.fromARGB(0, 0, 0, 0),
|
||||||
backgroundCursorColor: const Color.fromARGB(0, 0, 0, 0),
|
backgroundCursorColor: const Color.fromARGB(0, 0, 0, 0),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ void main() {
|
|||||||
data: <ui.PointerData>[
|
data: <ui.PointerData>[
|
||||||
ui.PointerData(change: ui.PointerChange.down),
|
ui.PointerData(change: ui.PointerChange.down),
|
||||||
ui.PointerData(change: ui.PointerChange.up),
|
ui.PointerData(change: ui.PointerChange.up),
|
||||||
]
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
final List<PointerEvent> events = <PointerEvent>[];
|
final List<PointerEvent> events = <PointerEvent>[];
|
||||||
@ -56,7 +56,7 @@ void main() {
|
|||||||
ui.PointerData(change: ui.PointerChange.down),
|
ui.PointerData(change: ui.PointerChange.down),
|
||||||
ui.PointerData(change: ui.PointerChange.move),
|
ui.PointerData(change: ui.PointerChange.move),
|
||||||
ui.PointerData(change: ui.PointerChange.up),
|
ui.PointerData(change: ui.PointerChange.up),
|
||||||
]
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
final List<PointerEvent> events = <PointerEvent>[];
|
final List<PointerEvent> events = <PointerEvent>[];
|
||||||
@ -76,7 +76,7 @@ void main() {
|
|||||||
ui.PointerData(change: ui.PointerChange.hover),
|
ui.PointerData(change: ui.PointerChange.hover),
|
||||||
ui.PointerData(change: ui.PointerChange.remove),
|
ui.PointerData(change: ui.PointerChange.remove),
|
||||||
ui.PointerData(change: ui.PointerChange.hover),
|
ui.PointerData(change: ui.PointerChange.hover),
|
||||||
]
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
final List<PointerEvent> pointerRouterEvents = <PointerEvent>[];
|
final List<PointerEvent> pointerRouterEvents = <PointerEvent>[];
|
||||||
@ -110,7 +110,7 @@ void main() {
|
|||||||
physicalX: 10.0 * ui.window.devicePixelRatio,
|
physicalX: 10.0 * ui.window.devicePixelRatio,
|
||||||
physicalY: 15.0 * ui.window.devicePixelRatio,
|
physicalY: 15.0 * ui.window.devicePixelRatio,
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
final List<PointerEvent> events = <PointerEvent>[];
|
final List<PointerEvent> events = <PointerEvent>[];
|
||||||
@ -129,7 +129,7 @@ void main() {
|
|||||||
data: <ui.PointerData>[
|
data: <ui.PointerData>[
|
||||||
ui.PointerData(change: ui.PointerChange.down),
|
ui.PointerData(change: ui.PointerChange.down),
|
||||||
ui.PointerData(change: ui.PointerChange.cancel),
|
ui.PointerData(change: ui.PointerChange.cancel),
|
||||||
]
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
final List<PointerEvent> events = <PointerEvent>[];
|
final List<PointerEvent> events = <PointerEvent>[];
|
||||||
@ -146,7 +146,7 @@ void main() {
|
|||||||
data: <ui.PointerData>[
|
data: <ui.PointerData>[
|
||||||
ui.PointerData(change: ui.PointerChange.down),
|
ui.PointerData(change: ui.PointerChange.down),
|
||||||
ui.PointerData(change: ui.PointerChange.up),
|
ui.PointerData(change: ui.PointerChange.up),
|
||||||
]
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
final List<PointerEvent> events = <PointerEvent>[];
|
final List<PointerEvent> events = <PointerEvent>[];
|
||||||
@ -169,7 +169,7 @@ void main() {
|
|||||||
ui.PointerData(change: ui.PointerChange.hover, device: 24),
|
ui.PointerData(change: ui.PointerChange.hover, device: 24),
|
||||||
ui.PointerData(change: ui.PointerChange.remove, device: 24),
|
ui.PointerData(change: ui.PointerChange.remove, device: 24),
|
||||||
ui.PointerData(change: ui.PointerChange.hover, device: 24),
|
ui.PointerData(change: ui.PointerChange.hover, device: 24),
|
||||||
]
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
final List<PointerEvent> events = PointerEventConverter.expand(
|
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.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),
|
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),
|
const ui.PointerData(change: ui.PointerChange.remove, device: 25),
|
||||||
]
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
final List<PointerEvent> events = PointerEventConverter.expand(
|
final List<PointerEvent> events = PointerEventConverter.expand(
|
||||||
@ -210,7 +210,7 @@ void main() {
|
|||||||
data: <ui.PointerData>[
|
data: <ui.PointerData>[
|
||||||
ui.PointerData(change: ui.PointerChange.add),
|
ui.PointerData(change: ui.PointerChange.add),
|
||||||
ui.PointerData(change: ui.PointerChange.hover, signalKind: ui.PointerSignalKind.scroll),
|
ui.PointerData(change: ui.PointerChange.hover, signalKind: ui.PointerSignalKind.scroll),
|
||||||
]
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
final List<PointerEvent> events = PointerEventConverter.expand(
|
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.hover, physicalX: lastLocation.dx, physicalY: lastLocation.dy),
|
||||||
ui.PointerData(change: ui.PointerChange.down, 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),
|
ui.PointerData(change: ui.PointerChange.hover, physicalX: scrollLocation.dx, physicalY: scrollLocation.dy, signalKind: ui.PointerSignalKind.scroll),
|
||||||
]
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
final List<PointerEvent> events = PointerEventConverter.expand(
|
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.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.move, kind: kind, physicalX: location.dx, physicalY: location.dy),
|
||||||
ui.PointerData(change: ui.PointerChange.up, 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(
|
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.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.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),
|
ui.PointerData(change: ui.PointerChange.up, kind: kind, physicalX: location.dx, physicalY: location.dy),
|
||||||
]
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
final List<PointerEvent> events = PointerEventConverter.expand(
|
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.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.move, kind: kind, physicalX: location.dx, physicalY: location.dy),
|
||||||
ui.PointerData(change: ui.PointerChange.up, 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(
|
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.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.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),
|
ui.PointerData(change: ui.PointerChange.up, kind: kind, physicalX: location.dx, physicalY: location.dy),
|
||||||
]
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
final List<PointerEvent> events = PointerEventConverter.expand(
|
final List<PointerEvent> events = PointerEventConverter.expand(
|
||||||
|
@ -26,7 +26,7 @@ class TestGestureFlutterBinding extends BindingBase with GestureBinding {
|
|||||||
data: <ui.PointerData>[
|
data: <ui.PointerData>[
|
||||||
ui.PointerData(change: ui.PointerChange.down),
|
ui.PointerData(change: ui.PointerChange.down),
|
||||||
ui.PointerData(change: ui.PointerChange.up),
|
ui.PointerData(change: ui.PointerChange.up),
|
||||||
]
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
Future<void> test(VoidCallback callback) {
|
Future<void> test(VoidCallback callback) {
|
||||||
|
@ -28,7 +28,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Move just below kTouchSlop should recognize tap.
|
// Move just below kTouchSlop should recognize tap.
|
||||||
@ -72,7 +72,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Move just below kTouchSlop should recognize tap.
|
// Move just below kTouchSlop should recognize tap.
|
||||||
|
@ -41,7 +41,7 @@ void main() {
|
|||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.longPressAt(tester.getCenter(find.byKey(redContainer)));
|
await tester.longPressAt(tester.getCenter(find.byKey(redContainer)));
|
||||||
@ -90,7 +90,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
TestGesture gesture = await tester.startGesture(tester.getCenter(find.byKey(redContainer)));
|
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)));
|
TestGesture gesture = await tester.startGesture(tester.getCenter(find.byKey(redContainer)));
|
||||||
|
@ -37,7 +37,7 @@ void main() {
|
|||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.tapAt(tester.getCenter(find.byKey(redContainer)));
|
await tester.tapAt(tester.getCenter(find.byKey(redContainer)));
|
||||||
@ -81,7 +81,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Move just below kTouchSlop should recognize tap.
|
// Move just below kTouchSlop should recognize tap.
|
||||||
@ -144,7 +144,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Move just below kTouchSlop should recognize tap.
|
// Move just below kTouchSlop should recognize tap.
|
||||||
|
@ -155,7 +155,7 @@ void main() {
|
|||||||
title: const Text('X'),
|
title: const Text('X'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final Finder title = find.text('X');
|
final Finder title = find.text('X');
|
||||||
|
@ -236,7 +236,7 @@ void main() {
|
|||||||
'/a/b': (BuildContext context) => const Text('route "/a/b"'),
|
'/a/b': (BuildContext context) => const Text('route "/a/b"'),
|
||||||
'/b': (BuildContext context) => const Text('route "/b"'),
|
'/b': (BuildContext context) => const Text('route "/b"'),
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(find.text('route "/"'), findsOneWidget);
|
expect(find.text('route "/"'), findsOneWidget);
|
||||||
@ -273,7 +273,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
await tester.tap(find.text('X'));
|
await tester.tap(find.text('X'));
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
@ -297,7 +297,7 @@ void main() {
|
|||||||
MaterialApp(
|
MaterialApp(
|
||||||
initialRoute: '/a/b',
|
initialRoute: '/a/b',
|
||||||
routes: routes,
|
routes: routes,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(find.text('route "/"'), findsOneWidget);
|
expect(find.text('route "/"'), findsOneWidget);
|
||||||
expect(find.text('route "/a"'), findsOneWidget);
|
expect(find.text('route "/a"'), findsOneWidget);
|
||||||
@ -317,7 +317,7 @@ void main() {
|
|||||||
MaterialApp(
|
MaterialApp(
|
||||||
initialRoute: '/a/b/c',
|
initialRoute: '/a/b/c',
|
||||||
routes: routes,
|
routes: routes,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
final dynamic exception = tester.takeException();
|
final dynamic exception = tester.takeException();
|
||||||
expect(exception is String, isTrue);
|
expect(exception is String, isTrue);
|
||||||
@ -339,7 +339,7 @@ void main() {
|
|||||||
MaterialApp(
|
MaterialApp(
|
||||||
initialRoute: '/a',
|
initialRoute: '/a',
|
||||||
routes: routes,
|
routes: routes,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(find.text('route "/"'), findsOneWidget);
|
expect(find.text('route "/"'), findsOneWidget);
|
||||||
expect(find.text('route "/a"'), findsOneWidget);
|
expect(find.text('route "/a"'), findsOneWidget);
|
||||||
@ -350,7 +350,7 @@ void main() {
|
|||||||
MaterialApp(
|
MaterialApp(
|
||||||
initialRoute: '/b',
|
initialRoute: '/b',
|
||||||
routes: routes,
|
routes: routes,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(find.text('route "/"'), findsOneWidget);
|
expect(find.text('route "/"'), findsOneWidget);
|
||||||
expect(find.text('route "/a"'), findsOneWidget);
|
expect(find.text('route "/a"'), findsOneWidget);
|
||||||
@ -375,7 +375,7 @@ void main() {
|
|||||||
log.add('onUnknownRoute ${settings.name}');
|
log.add('onUnknownRoute ${settings.name}');
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(tester.takeException(), isFlutterError);
|
expect(tester.takeException(), isFlutterError);
|
||||||
expect(log, <String>['onGenerateRoute /', 'onUnknownRoute /']);
|
expect(log, <String>['onGenerateRoute /', 'onUnknownRoute /']);
|
||||||
|
@ -20,7 +20,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
tester.state<NavigatorState>(find.byType(Navigator)).pushNamed('/next');
|
tester.state<NavigatorState>(find.byType(Navigator)).pushNamed('/next');
|
||||||
@ -48,7 +48,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
tester.state<NavigatorState>(find.byType(Navigator)).pushNamed('/next');
|
tester.state<NavigatorState>(find.byType(Navigator)).pushNamed('/next');
|
||||||
|
@ -35,7 +35,7 @@ void main() {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.tap(find.text('Alarm'));
|
await tester.tap(find.text('Alarm'));
|
||||||
@ -57,10 +57,10 @@ void main() {
|
|||||||
icon: Icon(Icons.access_alarm),
|
icon: Icon(Icons.access_alarm),
|
||||||
title: Text('Alarm'),
|
title: Text('Alarm'),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox box = tester.renderObject(find.byType(BottomNavigationBar));
|
final RenderBox box = tester.renderObject(find.byType(BottomNavigationBar));
|
||||||
@ -94,7 +94,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
const double selectedFontSize = 14.0;
|
const double selectedFontSize = 14.0;
|
||||||
@ -146,7 +146,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final TextStyle selectedFontStyle = tester.renderObject<RenderParagraph>(find.text('AC')).text.style;
|
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;
|
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);
|
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;
|
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);
|
final EdgeInsets selectedItemPadding = _itemPadding(tester, Icons.ac_unit);
|
||||||
@ -346,7 +346,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final EdgeInsets selectedItemPadding = _itemPadding(tester, Icons.ac_unit);
|
final EdgeInsets selectedItemPadding = _itemPadding(tester, Icons.ac_unit);
|
||||||
@ -388,7 +388,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final EdgeInsets selectedItemPadding = _itemPadding(tester, Icons.ac_unit);
|
final EdgeInsets selectedItemPadding = _itemPadding(tester, Icons.ac_unit);
|
||||||
@ -417,7 +417,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
const double selectedFontSize = 14.0;
|
const double selectedFontSize = 14.0;
|
||||||
@ -460,7 +460,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(tester.renderObject<RenderParagraph>(find.text('AC')).text.style.fontSize, selectedFontSize);
|
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);
|
expect(tester.renderObject<RenderParagraph>(find.text('AC')).text.style.fontSize, selectedFontSize);
|
||||||
@ -536,7 +536,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(_getOpacity(tester, 'AC'), equals(1.0));
|
expect(_getOpacity(tester, 'AC'), equals(1.0));
|
||||||
@ -564,7 +564,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(_getMaterial(tester).color, equals(color));
|
expect(_getMaterial(tester).color, equals(color));
|
||||||
@ -593,7 +593,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(_getMaterial(tester).color, equals(itemColor));
|
expect(_getMaterial(tester).color, equals(itemColor));
|
||||||
@ -642,7 +642,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(tester.renderObject<RenderParagraph>(find.text('AC')).text.style.color, equals(fixedColor));
|
expect(tester.renderObject<RenderParagraph>(find.text('AC')).text.style.color, equals(fixedColor));
|
||||||
@ -669,7 +669,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(_getMaterial(tester).elevation, equals(customElevation));
|
expect(_getMaterial(tester).elevation, equals(customElevation));
|
||||||
@ -691,11 +691,11 @@ void main() {
|
|||||||
icon: Icon(Icons.access_alarm),
|
icon: Icon(Icons.access_alarm),
|
||||||
title: Text('Alarm'),
|
title: Text('Alarm'),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const double labelBottomMargin = 7.0; // 7 == defaulted selectedFontSize / 2.0.
|
const double labelBottomMargin = 7.0; // 7 == defaulted selectedFontSize / 2.0.
|
||||||
@ -722,7 +722,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
Iterable<RenderBox> actions = tester.renderObjectList(find.byType(InkResponse));
|
Iterable<RenderBox> actions = tester.renderObjectList(find.byType(InkResponse));
|
||||||
@ -748,7 +748,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump(const Duration(milliseconds: 200));
|
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,
|
// 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'));
|
await tester.tap(find.text('Alarm'));
|
||||||
@ -885,7 +885,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.tap(find.text('Alarm'));
|
await tester.tap(find.text('Alarm'));
|
||||||
@ -1658,7 +1658,7 @@ double _getOpacity(WidgetTester tester, String textValue) {
|
|||||||
find.ancestor(
|
find.ancestor(
|
||||||
of: find.text(textValue),
|
of: find.text(textValue),
|
||||||
matching: find.byType(FadeTransition),
|
matching: find.byType(FadeTransition),
|
||||||
).first
|
).first,
|
||||||
);
|
);
|
||||||
return opacityWidget.opacity.value;
|
return opacityWidget.opacity.value;
|
||||||
}
|
}
|
||||||
|
@ -310,7 +310,7 @@ void main() {
|
|||||||
home: Scaffold(
|
home: Scaffold(
|
||||||
key: scaffoldKey,
|
key: scaffoldKey,
|
||||||
body: const Center(child: Text('body')),
|
body: const Center(child: Text('body')),
|
||||||
)
|
),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ void main() {
|
|||||||
SizedBox(width: 10.0, height: 10.0),
|
SizedBox(width: 10.0, height: 10.0),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final Finder child = find.byType(SizedBox);
|
final Finder child = find.byType(SizedBox);
|
||||||
@ -47,7 +47,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final Finder child = find.byType(SizedBox);
|
final Finder child = find.byType(SizedBox);
|
||||||
@ -70,7 +70,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final Finder child = find.byType(SizedBox);
|
final Finder child = find.byType(SizedBox);
|
||||||
@ -91,7 +91,7 @@ void main() {
|
|||||||
Container(),
|
Container(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// ButtonBar uses a Row internally to implement this
|
// ButtonBar uses a Row internally to implement this
|
||||||
@ -112,7 +112,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// ButtonBar uses a Row internally to implement this
|
// ButtonBar uses a Row internally to implement this
|
||||||
@ -134,7 +134,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// ButtonBar uses a Row internally to implement this
|
// ButtonBar uses a Row internally to implement this
|
||||||
@ -155,10 +155,10 @@ void main() {
|
|||||||
Builder(builder: (BuildContext context) {
|
Builder(builder: (BuildContext context) {
|
||||||
capturedContext = context;
|
capturedContext = context;
|
||||||
return Container();
|
return Container();
|
||||||
})
|
}),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
final ButtonThemeData buttonTheme = ButtonTheme.of(capturedContext);
|
final ButtonThemeData buttonTheme = ButtonTheme.of(capturedContext);
|
||||||
expect(buttonTheme.textTheme, equals(ButtonTextTheme.primary));
|
expect(buttonTheme.textTheme, equals(ButtonTextTheme.primary));
|
||||||
@ -187,11 +187,11 @@ void main() {
|
|||||||
Builder(builder: (BuildContext context) {
|
Builder(builder: (BuildContext context) {
|
||||||
capturedContext = context;
|
capturedContext = context;
|
||||||
return Container();
|
return Container();
|
||||||
})
|
}),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
final ButtonThemeData buttonTheme = ButtonTheme.of(capturedContext);
|
final ButtonThemeData buttonTheme = ButtonTheme.of(capturedContext);
|
||||||
expect(buttonTheme.textTheme, equals(ButtonTextTheme.primary));
|
expect(buttonTheme.textTheme, equals(ButtonTextTheme.primary));
|
||||||
@ -226,11 +226,11 @@ void main() {
|
|||||||
Builder(builder: (BuildContext context) {
|
Builder(builder: (BuildContext context) {
|
||||||
capturedContext = context;
|
capturedContext = context;
|
||||||
return Container();
|
return Container();
|
||||||
})
|
}),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
final ButtonThemeData buttonTheme = ButtonTheme.of(capturedContext);
|
final ButtonThemeData buttonTheme = ButtonTheme.of(capturedContext);
|
||||||
expect(buttonTheme.textTheme, equals(ButtonTextTheme.primary));
|
expect(buttonTheme.textTheme, equals(ButtonTextTheme.primary));
|
||||||
|
@ -116,7 +116,7 @@ void main() {
|
|||||||
return Container();
|
return Container();
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(ButtonBarTheme.of(capturedContext), equals(buttonBarTheme));
|
expect(ButtonBarTheme.of(capturedContext), equals(buttonBarTheme));
|
||||||
expect(ButtonBarTheme.of(capturedContext).buttonMinWidth, equals(42.0));
|
expect(ButtonBarTheme.of(capturedContext).buttonMinWidth, equals(42.0));
|
||||||
@ -142,7 +142,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(ButtonBarTheme.of(capturedContext), equals(buttonBarTheme));
|
expect(ButtonBarTheme.of(capturedContext), equals(buttonBarTheme));
|
||||||
expect(ButtonBarTheme.of(capturedContext).buttonMinWidth, equals(84.0));
|
expect(ButtonBarTheme.of(capturedContext).buttonMinWidth, equals(84.0));
|
||||||
|
@ -610,7 +610,7 @@ void main() {
|
|||||||
SemanticsFlag.isEnabled,
|
SemanticsFlag.isEnabled,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
),
|
),
|
||||||
ignoreId: true,
|
ignoreId: true,
|
||||||
));
|
));
|
||||||
|
@ -171,7 +171,7 @@ Future<void> _pumpCheckmarkChip(
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -333,7 +333,7 @@ void main() {
|
|||||||
label: Text(text),
|
label: Text(text),
|
||||||
onDeleted: onDeleted,
|
onDeleted: onDeleted,
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -1783,7 +1783,7 @@ void main() {
|
|||||||
matching: find.byWidgetPredicate((Widget widget) {
|
matching: find.byWidgetPredicate((Widget widget) {
|
||||||
return widget.runtimeType.toString() == '_ChipRenderWidget';
|
return widget.runtimeType.toString() == '_ChipRenderWidget';
|
||||||
}),
|
}),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
const Color selectScrimColor = Color(0x60191919);
|
const Color selectScrimColor = Color(0x60191919);
|
||||||
expect(rawChip, paints..path(color: selectScrimColor, includes: <Offset>[
|
expect(rawChip, paints..path(color: selectScrimColor, includes: <Offset>[
|
||||||
|
@ -707,7 +707,7 @@ void _tests() {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final Finder chevronFinder = find.byType(IconButton);
|
final Finder chevronFinder = find.byType(IconButton);
|
||||||
|
@ -17,7 +17,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final Finder title = find.text('X');
|
final Finder title = find.text('X');
|
||||||
@ -38,7 +38,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
center = tester.getCenter(title);
|
center = tester.getCenter(title);
|
||||||
|
@ -53,7 +53,7 @@ void main() {
|
|||||||
disabledElevation: disabledElevation,
|
disabledElevation: disabledElevation,
|
||||||
highlightElevation: highlightElevation,
|
highlightElevation: highlightElevation,
|
||||||
shape: shape,
|
shape: shape,
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
home: Scaffold(
|
home: Scaffold(
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
|
@ -299,7 +299,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
label: 'link',
|
label: 'link',
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
), ignoreId: true, ignoreTransform: true));
|
), ignoreId: true, ignoreTransform: true));
|
||||||
|
|
||||||
semantics.dispose();
|
semantics.dispose();
|
||||||
@ -327,7 +327,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
label: 'link',
|
label: 'link',
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
), ignoreId: true, ignoreTransform: true));
|
), ignoreId: true, ignoreTransform: true));
|
||||||
|
|
||||||
semantics.dispose();
|
semantics.dispose();
|
||||||
|
@ -698,7 +698,7 @@ void main() {
|
|||||||
find.descendant(
|
find.descendant(
|
||||||
of: find.widgetWithText(RawMaterialButton, text),
|
of: find.widgetWithText(RawMaterialButton, text),
|
||||||
matching: find.byType(Material),
|
matching: find.byType(Material),
|
||||||
)
|
),
|
||||||
).color;
|
).color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ double getOpacity(WidgetTester tester, String textValue) {
|
|||||||
find.ancestor(
|
find.ancestor(
|
||||||
of: find.text(textValue),
|
of: find.text(textValue),
|
||||||
matching: find.byType(FadeTransition),
|
matching: find.byType(FadeTransition),
|
||||||
).first
|
).first,
|
||||||
);
|
);
|
||||||
return opacityWidget.opacity.value;
|
return opacityWidget.opacity.value;
|
||||||
}
|
}
|
||||||
@ -2564,7 +2564,7 @@ void main() {
|
|||||||
find.ancestor(
|
find.ancestor(
|
||||||
of: find.text('label'),
|
of: find.text('label'),
|
||||||
matching: find.byType(AnimatedDefaultTextStyle),
|
matching: find.byType(AnimatedDefaultTextStyle),
|
||||||
)
|
),
|
||||||
).style;
|
).style;
|
||||||
}
|
}
|
||||||
expect(getLabelStyle().color, labelStyle.color);
|
expect(getLabelStyle().color, labelStyle.color);
|
||||||
@ -2667,7 +2667,7 @@ void main() {
|
|||||||
focusColor: Colors.blue,
|
focusColor: Colors.blue,
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
alignLabelWithHint: true,
|
alignLabelWithHint: true,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(decoration.labelStyle, themeStyle);
|
expect(decoration.labelStyle, themeStyle);
|
||||||
|
@ -392,7 +392,7 @@ void main() {
|
|||||||
SemanticsFlag.hasEnabledState,
|
SemanticsFlag.hasEnabledState,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
),
|
),
|
||||||
ignoreTransform: true, ignoreId: true, ignoreRect: true),
|
ignoreTransform: true, ignoreId: true, ignoreRect: true),
|
||||||
);
|
);
|
||||||
|
@ -225,8 +225,8 @@ void main() {
|
|||||||
applyElevationOverlayColor: false,
|
applyElevationOverlayColor: false,
|
||||||
colorScheme: const ColorScheme.dark().copyWith(surface: surfaceColor),
|
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);
|
final RenderPhysicalShape model = getModel(tester);
|
||||||
expect(model.color, equals(surfaceColor));
|
expect(model.color, equals(surfaceColor));
|
||||||
});
|
});
|
||||||
@ -259,7 +259,7 @@ void main() {
|
|||||||
color: surfaceColor,
|
color: surfaceColor,
|
||||||
elevation: test.elevation,
|
elevation: test.elevation,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
await tester.pumpAndSettle(); // wait for the elevation animation to finish
|
await tester.pumpAndSettle(); // wait for the elevation animation to finish
|
||||||
final RenderPhysicalShape model = getModel(tester);
|
final RenderPhysicalShape model = getModel(tester);
|
||||||
@ -278,7 +278,7 @@ void main() {
|
|||||||
color: Colors.cyan,
|
color: Colors.cyan,
|
||||||
elevation: 8.0,
|
elevation: 8.0,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
final RenderPhysicalShape model = getModel(tester);
|
final RenderPhysicalShape model = getModel(tester);
|
||||||
expect(model.color, equals(Colors.cyan));
|
expect(model.color, equals(Colors.cyan));
|
||||||
@ -294,7 +294,7 @@ void main() {
|
|||||||
key: materialKey,
|
key: materialKey,
|
||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
child: const SizedBox(width: 100.0, height: 100.0),
|
child: const SizedBox(width: 100.0, height: 100.0),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(find.byKey(materialKey), hasNoImmediateClip);
|
expect(find.byKey(materialKey), hasNoImmediateClip);
|
||||||
@ -309,7 +309,7 @@ void main() {
|
|||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
child: const SizedBox(width: 100.0, height: 100.0),
|
child: const SizedBox(width: 100.0, height: 100.0),
|
||||||
clipBehavior: null,
|
clipBehavior: null,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -324,7 +324,7 @@ void main() {
|
|||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
child: const SizedBox(width: 100.0, height: 100.0),
|
child: const SizedBox(width: 100.0, height: 100.0),
|
||||||
clipBehavior: Clip.antiAlias,
|
clipBehavior: Clip.antiAlias,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(find.byKey(materialKey), clipsWithBoundingRect);
|
expect(find.byKey(materialKey), clipsWithBoundingRect);
|
||||||
@ -339,7 +339,7 @@ void main() {
|
|||||||
borderRadius: const BorderRadius.all(Radius.circular(10.0)),
|
borderRadius: const BorderRadius.all(Radius.circular(10.0)),
|
||||||
child: const SizedBox(width: 100.0, height: 100.0),
|
child: const SizedBox(width: 100.0, height: 100.0),
|
||||||
clipBehavior: Clip.antiAlias,
|
clipBehavior: Clip.antiAlias,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
@ -359,7 +359,7 @@ void main() {
|
|||||||
shape: const StadiumBorder(),
|
shape: const StadiumBorder(),
|
||||||
child: const SizedBox(width: 100.0, height: 100.0),
|
child: const SizedBox(width: 100.0, height: 100.0),
|
||||||
clipBehavior: Clip.antiAlias,
|
clipBehavior: Clip.antiAlias,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
@ -442,7 +442,7 @@ void main() {
|
|||||||
key: materialKey,
|
key: materialKey,
|
||||||
type: MaterialType.canvas,
|
type: MaterialType.canvas,
|
||||||
child: const SizedBox(width: 100.0, height: 100.0),
|
child: const SizedBox(width: 100.0, height: 100.0),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(find.byKey(materialKey), rendersOnPhysicalModel(
|
expect(find.byKey(materialKey), rendersOnPhysicalModel(
|
||||||
@ -461,7 +461,7 @@ void main() {
|
|||||||
borderRadius: const BorderRadius.all(Radius.circular(5.0)),
|
borderRadius: const BorderRadius.all(Radius.circular(5.0)),
|
||||||
child: const SizedBox(width: 100.0, height: 100.0),
|
child: const SizedBox(width: 100.0, height: 100.0),
|
||||||
elevation: 1.0,
|
elevation: 1.0,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(find.byKey(materialKey), rendersOnPhysicalModel(
|
expect(find.byKey(materialKey), rendersOnPhysicalModel(
|
||||||
@ -480,7 +480,7 @@ void main() {
|
|||||||
shape: const StadiumBorder(),
|
shape: const StadiumBorder(),
|
||||||
child: const SizedBox(width: 100.0, height: 100.0),
|
child: const SizedBox(width: 100.0, height: 100.0),
|
||||||
elevation: 1.0,
|
elevation: 1.0,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(find.byKey(materialKey), rendersOnPhysicalShape(
|
expect(find.byKey(materialKey), rendersOnPhysicalShape(
|
||||||
@ -496,7 +496,7 @@ void main() {
|
|||||||
key: materialKey,
|
key: materialKey,
|
||||||
type: MaterialType.card,
|
type: MaterialType.card,
|
||||||
child: const SizedBox(width: 100.0, height: 100.0),
|
child: const SizedBox(width: 100.0, height: 100.0),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(find.byKey(materialKey), rendersOnPhysicalModel(
|
expect(find.byKey(materialKey), rendersOnPhysicalModel(
|
||||||
@ -515,7 +515,7 @@ void main() {
|
|||||||
borderRadius: const BorderRadius.all(Radius.circular(5.0)),
|
borderRadius: const BorderRadius.all(Radius.circular(5.0)),
|
||||||
elevation: 5.0,
|
elevation: 5.0,
|
||||||
child: const SizedBox(width: 100.0, height: 100.0),
|
child: const SizedBox(width: 100.0, height: 100.0),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(find.byKey(materialKey), rendersOnPhysicalModel(
|
expect(find.byKey(materialKey), rendersOnPhysicalModel(
|
||||||
@ -534,7 +534,7 @@ void main() {
|
|||||||
shape: const StadiumBorder(),
|
shape: const StadiumBorder(),
|
||||||
elevation: 5.0,
|
elevation: 5.0,
|
||||||
child: const SizedBox(width: 100.0, height: 100.0),
|
child: const SizedBox(width: 100.0, height: 100.0),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(find.byKey(materialKey), rendersOnPhysicalShape(
|
expect(find.byKey(materialKey), rendersOnPhysicalShape(
|
||||||
@ -551,7 +551,7 @@ void main() {
|
|||||||
type: MaterialType.circle,
|
type: MaterialType.circle,
|
||||||
child: const SizedBox(width: 100.0, height: 100.0),
|
child: const SizedBox(width: 100.0, height: 100.0),
|
||||||
color: const Color(0xFF0000FF),
|
color: const Color(0xFF0000FF),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(find.byKey(materialKey), rendersOnPhysicalModel(
|
expect(find.byKey(materialKey), rendersOnPhysicalModel(
|
||||||
@ -568,7 +568,7 @@ void main() {
|
|||||||
type: MaterialType.button,
|
type: MaterialType.button,
|
||||||
child: const SizedBox(width: 100.0, height: 100.0),
|
child: const SizedBox(width: 100.0, height: 100.0),
|
||||||
color: const Color(0xFF0000FF),
|
color: const Color(0xFF0000FF),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(find.byKey(materialKey), rendersOnPhysicalModel(
|
expect(find.byKey(materialKey), rendersOnPhysicalModel(
|
||||||
@ -588,7 +588,7 @@ void main() {
|
|||||||
color: const Color(0xFF0000FF),
|
color: const Color(0xFF0000FF),
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(6.0)),
|
borderRadius: const BorderRadius.all(Radius.circular(6.0)),
|
||||||
elevation: 4.0,
|
elevation: 4.0,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(find.byKey(materialKey), rendersOnPhysicalModel(
|
expect(find.byKey(materialKey), rendersOnPhysicalModel(
|
||||||
@ -608,7 +608,7 @@ void main() {
|
|||||||
color: const Color(0xFF0000FF),
|
color: const Color(0xFF0000FF),
|
||||||
shape: const StadiumBorder(),
|
shape: const StadiumBorder(),
|
||||||
elevation: 4.0,
|
elevation: 4.0,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(find.byKey(materialKey), rendersOnPhysicalShape(
|
expect(find.byKey(materialKey), rendersOnPhysicalShape(
|
||||||
@ -633,7 +633,7 @@ void main() {
|
|||||||
color: Color(0xFF0000FF),
|
color: Color(0xFF0000FF),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox box = tester.renderObject(find.byKey(materialKey));
|
final RenderBox box = tester.renderObject(find.byKey(materialKey));
|
||||||
@ -653,7 +653,7 @@ void main() {
|
|||||||
color: Color(0xFF0000FF),
|
color: Color(0xFF0000FF),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox box = tester.renderObject(find.byKey(materialKey));
|
final RenderBox box = tester.renderObject(find.byKey(materialKey));
|
||||||
@ -668,7 +668,7 @@ void main() {
|
|||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
child: const SizedBox(width: 100.0, height: 100.0),
|
child: const SizedBox(width: 100.0, height: 100.0),
|
||||||
shape: const CircleBorder(),
|
shape: const CircleBorder(),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox box = tester.renderObject(find.byKey(materialKey));
|
final RenderBox box = tester.renderObject(find.byKey(materialKey));
|
||||||
|
@ -404,11 +404,11 @@ void main() {
|
|||||||
height: 100.0,
|
height: 100.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
|
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
|
||||||
@ -439,11 +439,11 @@ void main() {
|
|||||||
height: 100.0,
|
height: 100.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump(const Duration(milliseconds: 100));
|
await tester.pump(const Duration(milliseconds: 100));
|
||||||
@ -478,11 +478,11 @@ void main() {
|
|||||||
height: 100.0,
|
height: 100.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump(const Duration(milliseconds: 100));
|
await tester.pump(const Duration(milliseconds: 100));
|
||||||
@ -520,11 +520,11 @@ void main() {
|
|||||||
height: 100.0,
|
height: 100.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump(const Duration(milliseconds: 100));
|
await tester.pump(const Duration(milliseconds: 100));
|
||||||
@ -561,11 +561,11 @@ void main() {
|
|||||||
height: 100.0,
|
height: 100.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
|
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
|
||||||
@ -600,11 +600,11 @@ void main() {
|
|||||||
height: 100.0,
|
height: 100.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(box.size.height, equals(300));
|
expect(box.size.height, equals(300));
|
||||||
@ -640,11 +640,11 @@ void main() {
|
|||||||
height: 100.0,
|
height: 100.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
|
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
|
||||||
@ -672,11 +672,11 @@ void main() {
|
|||||||
height: 100.0,
|
height: 100.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
@ -706,11 +706,11 @@ void main() {
|
|||||||
height: 100.0,
|
height: 100.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
|
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
|
||||||
@ -751,11 +751,11 @@ void main() {
|
|||||||
height: 100.0,
|
height: 100.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump(const Duration(milliseconds: 100));
|
await tester.pump(const Duration(milliseconds: 100));
|
||||||
@ -807,11 +807,11 @@ void main() {
|
|||||||
height: 100.0,
|
height: 100.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
|
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
|
||||||
@ -841,11 +841,11 @@ void main() {
|
|||||||
height: 100.0,
|
height: 100.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump(const Duration(milliseconds: 100));
|
await tester.pump(const Duration(milliseconds: 100));
|
||||||
@ -885,11 +885,11 @@ void main() {
|
|||||||
height: 100.0,
|
height: 100.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
|
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
|
||||||
@ -931,11 +931,11 @@ void main() {
|
|||||||
height: 100.0,
|
height: 100.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump(const Duration(milliseconds: 100));
|
await tester.pump(const Duration(milliseconds: 100));
|
||||||
@ -987,11 +987,11 @@ void main() {
|
|||||||
height: 100.0,
|
height: 100.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
|
final RenderBox box = tester.renderObject(find.byType(MergeableMaterial));
|
||||||
@ -1024,11 +1024,11 @@ void main() {
|
|||||||
height: 100.0,
|
height: 100.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump(const Duration(milliseconds: 100));
|
await tester.pump(const Duration(milliseconds: 100));
|
||||||
@ -1096,7 +1096,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
List<Widget> boxes = tester.widgetList(find.byType(DecoratedBox)).toList();
|
List<Widget> boxes = tester.widgetList(find.byType(DecoratedBox)).toList();
|
||||||
@ -1149,7 +1149,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Wait for dividers to shrink.
|
// Wait for dividers to shrink.
|
||||||
|
@ -50,7 +50,7 @@ List<Color> indicatorColors(WidgetTester tester) {
|
|||||||
find.descendant(
|
find.descendant(
|
||||||
of: find.byType(TabPageSelector),
|
of: find.byType(TabPageSelector),
|
||||||
matching: find.byType(TabPageSelectorIndicator),
|
matching: find.byType(TabPageSelectorIndicator),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
return indicators.map<Color>((TabPageSelectorIndicator indicator) => indicator.backgroundColor).toList();
|
return indicators.map<Color>((TabPageSelectorIndicator indicator) => indicator.backgroundColor).toList();
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ void main() {
|
|||||||
return const Material(child: Text('Page 2'));
|
return const Material(child: Text('Page 2'));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final Offset widget1TopLeft = tester.getTopLeft(find.text('Page 1'));
|
final Offset widget1TopLeft = tester.getTopLeft(find.text('Page 1'));
|
||||||
@ -81,7 +81,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final Offset widget1InitialTopLeft = tester.getTopLeft(find.text('Page 1'));
|
final Offset widget1InitialTopLeft = tester.getTopLeft(find.text('Page 1'));
|
||||||
@ -151,7 +151,7 @@ void main() {
|
|||||||
MaterialApp(
|
MaterialApp(
|
||||||
theme: ThemeData(platform: TargetPlatform.iOS),
|
theme: ThemeData(platform: TargetPlatform.iOS),
|
||||||
home: const Material(child: Text('Page 1')),
|
home: const Material(child: Text('Page 1')),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final Offset widget1InitialTopLeft = tester.getTopLeft(find.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'));
|
return const Scaffold(body: Text('Page 2'));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
tester.state<NavigatorState>(find.byType(Navigator)).pushNamed('/next');
|
tester.state<NavigatorState>(find.byType(Navigator)).pushNamed('/next');
|
||||||
@ -248,7 +248,7 @@ void main() {
|
|||||||
return const Scaffold(body: Text('Page 2'));
|
return const Scaffold(body: Text('Page 2'));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
tester.state<NavigatorState>(find.byType(Navigator)).pushNamed('/next');
|
tester.state<NavigatorState>(find.byType(Navigator)).pushNamed('/next');
|
||||||
@ -352,7 +352,7 @@ void main() {
|
|||||||
MaterialApp(
|
MaterialApp(
|
||||||
theme: ThemeData(platform: TargetPlatform.iOS),
|
theme: ThemeData(platform: TargetPlatform.iOS),
|
||||||
home: const Scaffold(body: Text('Page 1')),
|
home: const Scaffold(body: Text('Page 1')),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
tester.state<NavigatorState>(find.byType(Navigator)).push(MaterialPageRoute<void>(
|
tester.state<NavigatorState>(find.byType(Navigator)).push(MaterialPageRoute<void>(
|
||||||
@ -388,7 +388,7 @@ void main() {
|
|||||||
return const Material(child: Text('Page 2'));
|
return const Material(child: Text('Page 2'));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final Offset widget1InitialTopLeft = tester.getTopLeft(find.text('Page 1'));
|
final Offset widget1InitialTopLeft = tester.getTopLeft(find.text('Page 1'));
|
||||||
@ -423,7 +423,7 @@ void main() {
|
|||||||
return const Material(child: Text('Page 2'));
|
return const Material(child: Text('Page 2'));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
tester.state<NavigatorState>(find.byType(Navigator)).pop();
|
tester.state<NavigatorState>(find.byType(Navigator)).pop();
|
||||||
|
@ -52,7 +52,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
));
|
));
|
||||||
|
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
@ -104,7 +104,7 @@ void main() {
|
|||||||
home: Scaffold(
|
home: Scaffold(
|
||||||
key: scaffoldKey,
|
key: scaffoldKey,
|
||||||
body: const Center(child: Text('body')),
|
body: const Center(child: Text('body')),
|
||||||
)
|
),
|
||||||
));
|
));
|
||||||
|
|
||||||
scaffoldKey.currentState.showBottomSheet<void>(
|
scaffoldKey.currentState.showBottomSheet<void>(
|
||||||
@ -258,7 +258,7 @@ void main() {
|
|||||||
onPressed: null,
|
onPressed: null,
|
||||||
child: Text('fab'),
|
child: Text('fab'),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
));
|
));
|
||||||
|
|
||||||
scaffoldKey.currentState.showBottomSheet<void>(
|
scaffoldKey.currentState.showBottomSheet<void>(
|
||||||
@ -467,7 +467,7 @@ void main() {
|
|||||||
home: Scaffold(
|
home: Scaffold(
|
||||||
key: scaffoldKey,
|
key: scaffoldKey,
|
||||||
body: const Center(child: Text('body')),
|
body: const Center(child: Text('body')),
|
||||||
)
|
),
|
||||||
));
|
));
|
||||||
|
|
||||||
final PersistentBottomSheetController<void> bottomSheet = scaffoldKey.currentState.showBottomSheet<void>((_) {
|
final PersistentBottomSheetController<void> bottomSheet = scaffoldKey.currentState.showBottomSheet<void>((_) {
|
||||||
|
@ -684,7 +684,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.tap(find.text('Menu Button'));
|
await tester.tap(find.text('Menu Button'));
|
||||||
|
@ -182,7 +182,7 @@ void main() {
|
|||||||
child: Center(
|
child: Center(
|
||||||
child: CircularProgressIndicator(value: 0.0),
|
child: CircularProgressIndicator(value: 0.0),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(tester.getSemantics(find.byType(CircularProgressIndicator)), matchesSemantics(
|
expect(tester.getSemantics(find.byType(CircularProgressIndicator)), matchesSemantics(
|
||||||
@ -197,7 +197,7 @@ void main() {
|
|||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
const Center(
|
const Center(
|
||||||
child: CircularProgressIndicator(value: null),
|
child: CircularProgressIndicator(value: null),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(tester.getSemantics(find.byType(CircularProgressIndicator)), matchesSemantics());
|
expect(tester.getSemantics(find.byType(CircularProgressIndicator)), matchesSemantics());
|
||||||
@ -288,7 +288,7 @@ void main() {
|
|||||||
}
|
}
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(tester.hasRunningAnimations, isTrue);
|
expect(tester.hasRunningAnimations, isTrue);
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ void main() {
|
|||||||
materialTapTargetSize: MaterialTapTargetSize.padded,
|
materialTapTargetSize: MaterialTapTargetSize.padded,
|
||||||
child: const Text('+'),
|
child: const Text('+'),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.tapAt(const Offset(40.0, 400.0));
|
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),
|
rect: const Rect.fromLTRB(0.0, 0.0, 48.0, 48.0),
|
||||||
children: <TestSemantics>[],
|
children: <TestSemantics>[],
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
),
|
),
|
||||||
ignoreTransform: true,
|
ignoreTransform: true,
|
||||||
));
|
));
|
||||||
|
@ -103,8 +103,8 @@ void main() {
|
|||||||
),
|
),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
body: Container(key: bodyKey),
|
body: Container(key: bodyKey),
|
||||||
))
|
),
|
||||||
));
|
)));
|
||||||
|
|
||||||
final RenderBox bodyBox = tester.renderObject(find.byKey(bodyKey));
|
final RenderBox bodyBox = tester.renderObject(find.byKey(bodyKey));
|
||||||
expect(bodyBox.size, equals(const Size(800.0, 0.0)));
|
expect(bodyBox.size, equals(const Size(800.0, 0.0)));
|
||||||
@ -219,7 +219,7 @@ void main() {
|
|||||||
padding: EdgeInsets.only(bottom: 20.0),
|
padding: EdgeInsets.only(bottom: 20.0),
|
||||||
),
|
),
|
||||||
child: child,
|
child: child,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
final Offset initialPoint = tester.getCenter(find.byType(Placeholder));
|
final Offset initialPoint = tester.getCenter(find.byType(Placeholder));
|
||||||
// Consume bottom padding - as if by the keyboard opening
|
// Consume bottom padding - as if by the keyboard opening
|
||||||
@ -275,7 +275,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final ScaffoldState state = tester.firstState(find.byType(Scaffold));
|
final ScaffoldState state = tester.firstState(find.byType(Scaffold));
|
||||||
@ -398,7 +398,7 @@ void main() {
|
|||||||
padding: EdgeInsets.only(bottom: 20.0),
|
padding: EdgeInsets.only(bottom: 20.0),
|
||||||
),
|
),
|
||||||
child: child,
|
child: child,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
final Offset initialPoint = tester.getCenter(find.byType(Placeholder));
|
final Offset initialPoint = tester.getCenter(find.byType(Placeholder));
|
||||||
// Consume bottom padding - as if by the keyboard opening
|
// Consume bottom padding - as if by the keyboard opening
|
||||||
@ -487,7 +487,7 @@ void main() {
|
|||||||
padding: EdgeInsets.only(bottom: 20.0),
|
padding: EdgeInsets.only(bottom: 20.0),
|
||||||
),
|
),
|
||||||
child: child,
|
child: child,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
final Offset initialPoint = tester.getCenter(find.byType(Placeholder));
|
final Offset initialPoint = tester.getCenter(find.byType(Placeholder));
|
||||||
// Consume bottom padding - as if by the keyboard opening
|
// Consume bottom padding - as if by the keyboard opening
|
||||||
@ -546,7 +546,7 @@ void main() {
|
|||||||
MaterialApp(
|
MaterialApp(
|
||||||
theme: ThemeData(platform: platform),
|
theme: ThemeData(platform: platform),
|
||||||
home: Scaffold(appBar: AppBar(), body: const Text('Page 1')),
|
home: Scaffold(appBar: AppBar(), body: const Text('Page 1')),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
tester.state<NavigatorState>(find.byType(Navigator)).push(routeBuilder());
|
tester.state<NavigatorState>(find.byType(Navigator)).push(routeBuilder());
|
||||||
@ -1155,7 +1155,7 @@ void main() {
|
|||||||
icon: Icon(Icons.add),
|
icon: Icon(Icons.add),
|
||||||
title: Text('test'),
|
title: Text('test'),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -59,8 +59,8 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
SchedulerBinding.instance.debugAssertNoTransientCallbacks('Building a list with a scrollbar triggered an animation.');
|
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(
|
final CustomPaint custom = tester.widget(find.descendant(
|
||||||
of: find.byType(Scrollbar),
|
of: find.byType(Scrollbar),
|
||||||
matching: find.byType(CustomPaint)).first
|
matching: find.byType(CustomPaint),
|
||||||
);
|
).first);
|
||||||
final dynamic scrollPainter = custom.foregroundPainter;
|
final dynamic scrollPainter = custom.foregroundPainter;
|
||||||
// Dragging makes the scrollbar first appear.
|
// Dragging makes the scrollbar first appear.
|
||||||
await tester.drag(find.text('0'), const Offset(0.0, -10.0));
|
await tester.drag(find.text('0'), const Offset(0.0, -10.0));
|
||||||
|
@ -742,7 +742,7 @@ void main() {
|
|||||||
content: const Text('I am a snack bar.'),
|
content: const Text('I am a snack bar.'),
|
||||||
duration: const Duration(seconds: 2),
|
duration: const Duration(seconds: 2),
|
||||||
action: SnackBarAction(label: 'ACTION', onPressed: () {}),
|
action: SnackBarAction(label: 'ACTION', onPressed: () {}),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: const Text('X'),
|
child: const Text('X'),
|
||||||
@ -757,7 +757,7 @@ void main() {
|
|||||||
padding: EdgeInsets.only(bottom: 20.0),
|
padding: EdgeInsets.only(bottom: 20.0),
|
||||||
),
|
),
|
||||||
child: child,
|
child: child,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
await tester.tap(find.text('X'));
|
await tester.tap(find.text('X'));
|
||||||
await tester.pumpAndSettle(); // Show snackbar
|
await tester.pumpAndSettle(); // Show snackbar
|
||||||
|
@ -1009,7 +1009,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// expect first tab to be selected
|
// expect first tab to be selected
|
||||||
|
@ -119,7 +119,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.tap(find.byKey(textField1));
|
await tester.tap(find.byKey(textField1));
|
||||||
@ -174,7 +174,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// If there were a splash, this would cancel the splash.
|
// If there were a splash, this would cancel the splash.
|
||||||
|
@ -83,7 +83,7 @@ Widget overlayWithEntry(OverlayEntry entry) {
|
|||||||
data: const MediaQueryData(size: Size(800.0, 600.0)),
|
data: const MediaQueryData(size: Size(800.0, 600.0)),
|
||||||
child: Overlay(
|
child: Overlay(
|
||||||
initialEntries: <OverlayEntry>[
|
initialEntries: <OverlayEntry>[
|
||||||
entry
|
entry,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -124,7 +124,7 @@ double getOpacity(WidgetTester tester, Finder finder) {
|
|||||||
find.ancestor(
|
find.ancestor(
|
||||||
of: finder,
|
of: finder,
|
||||||
matching: find.byType(FadeTransition),
|
matching: find.byType(FadeTransition),
|
||||||
)
|
),
|
||||||
).opacity.value;
|
).opacity.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,7 +237,7 @@ void main() {
|
|||||||
textFieldValue = value;
|
textFieldValue = value;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
RenderBox findTextFieldBox() => tester.renderObject(find.byKey(textFieldKey));
|
RenderBox findTextFieldBox() => tester.renderObject(find.byKey(textFieldKey));
|
||||||
@ -368,7 +368,7 @@ void main() {
|
|||||||
overlay(
|
overlay(
|
||||||
child: const TextField(
|
child: const TextField(
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final TextField textField = tester.firstWidget(find.byType(TextField));
|
final TextField textField = tester.firstWidget(find.byType(TextField));
|
||||||
@ -382,7 +382,7 @@ void main() {
|
|||||||
child: const TextField(
|
child: const TextField(
|
||||||
cursorRadius: Radius.circular(3.0),
|
cursorRadius: Radius.circular(3.0),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final TextField textField = tester.firstWidget(find.byType(TextField));
|
final TextField textField = tester.firstWidget(find.byType(TextField));
|
||||||
@ -561,7 +561,7 @@ void main() {
|
|||||||
controller: controller,
|
controller: controller,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(controller.selection.baseOffset, -1);
|
expect(controller.selection.baseOffset, -1);
|
||||||
expect(controller.selection.extentOffset, -1);
|
expect(controller.selection.extentOffset, -1);
|
||||||
@ -675,7 +675,7 @@ void main() {
|
|||||||
child: TextField(
|
child: TextField(
|
||||||
controller: controller,
|
controller: controller,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(controller.selection.baseOffset, -1);
|
expect(controller.selection.baseOffset, -1);
|
||||||
expect(controller.selection.extentOffset, -1);
|
expect(controller.selection.extentOffset, -1);
|
||||||
@ -703,7 +703,7 @@ void main() {
|
|||||||
controller: controller,
|
controller: controller,
|
||||||
enableInteractiveSelection: false,
|
enableInteractiveSelection: false,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(controller.selection.baseOffset, -1);
|
expect(controller.selection.baseOffset, -1);
|
||||||
expect(controller.selection.extentOffset, -1);
|
expect(controller.selection.extentOffset, -1);
|
||||||
@ -730,7 +730,7 @@ void main() {
|
|||||||
child: TextField(
|
child: TextField(
|
||||||
controller: controller,
|
controller: controller,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
const String testValue = 'abc def ghi';
|
const String testValue = 'abc def ghi';
|
||||||
@ -765,7 +765,7 @@ void main() {
|
|||||||
child: TextField(
|
child: TextField(
|
||||||
controller: controller,
|
controller: controller,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
const String testValue = 'abc def ghi';
|
const String testValue = 'abc def ghi';
|
||||||
@ -804,7 +804,7 @@ void main() {
|
|||||||
child: TextField(
|
child: TextField(
|
||||||
controller: controller,
|
controller: controller,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
const String testValue = 'abcdefghi';
|
const String testValue = 'abcdefghi';
|
||||||
@ -844,7 +844,7 @@ void main() {
|
|||||||
child: TextField(
|
child: TextField(
|
||||||
controller: controller,
|
controller: controller,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
const String testValue = 'abc def ghi';
|
const String testValue = 'abc def ghi';
|
||||||
@ -877,7 +877,7 @@ void main() {
|
|||||||
controller: controller,
|
controller: controller,
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
// Read only text field cannot open keyboard.
|
// Read only text field cannot open keyboard.
|
||||||
await tester.showKeyboard(find.byType(TextField));
|
await tester.showKeyboard(find.byType(TextField));
|
||||||
@ -913,7 +913,7 @@ void main() {
|
|||||||
readOnly: true,
|
readOnly: true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.tap(find.byType(TextField));
|
await tester.tap(find.byType(TextField));
|
||||||
@ -934,7 +934,7 @@ void main() {
|
|||||||
readOnly: true,
|
readOnly: true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.tap(find.byType(TextField));
|
await tester.tap(find.byType(TextField));
|
||||||
@ -997,7 +997,7 @@ void main() {
|
|||||||
const TextEditingValue(
|
const TextEditingValue(
|
||||||
text: 'readonly',
|
text: 'readonly',
|
||||||
composing: TextRange(start: 0, end: 8), // Simulate text composing.
|
composing: TextRange(start: 0, end: 8), // Simulate text composing.
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
@ -1006,7 +1006,7 @@ void main() {
|
|||||||
controller: controller,
|
controller: controller,
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderEditable renderEditable = findRenderEditable(tester);
|
final RenderEditable renderEditable = findRenderEditable(tester);
|
||||||
@ -1112,7 +1112,7 @@ void main() {
|
|||||||
controller: controller,
|
controller: controller,
|
||||||
enableInteractiveSelection: false,
|
enableInteractiveSelection: false,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
const String testValue = 'abc def ghi';
|
const String testValue = 'abc def ghi';
|
||||||
@ -3702,7 +3702,7 @@ void main() {
|
|||||||
controller: controller,
|
controller: controller,
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.idle();
|
await tester.idle();
|
||||||
@ -4141,7 +4141,7 @@ void main() {
|
|||||||
controller: controller,
|
controller: controller,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
const String testValue = 'x';
|
const String testValue = 'x';
|
||||||
|
@ -23,7 +23,7 @@ void main() {
|
|||||||
style: const TextStyle(),
|
style: const TextStyle(),
|
||||||
cursorColor: Colors.black,
|
cursorColor: Colors.black,
|
||||||
backgroundCursorColor: Colors.black,
|
backgroundCursorColor: Colors.black,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.tap(find.byKey(popupMenuButtonKey));
|
await tester.tap(find.byKey(popupMenuButtonKey));
|
||||||
@ -108,7 +108,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.tap(find.byKey(popupMenuButtonKey));
|
await tester.tap(find.byKey(popupMenuButtonKey));
|
||||||
@ -142,7 +142,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.tap(find.byKey(dropdownMenuButtonKey));
|
await tester.tap(find.byKey(dropdownMenuButtonKey));
|
||||||
@ -176,7 +176,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.tap(find.text('SHOW'));
|
await tester.tap(find.text('SHOW'));
|
||||||
@ -213,7 +213,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.tap(find.text('SHOW'));
|
await tester.tap(find.text('SHOW'));
|
||||||
@ -251,7 +251,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.tap(find.text('SHOW'));
|
await tester.tap(find.text('SHOW'));
|
||||||
@ -268,7 +268,7 @@ void main() {
|
|||||||
MaterialApp(
|
MaterialApp(
|
||||||
theme: ThemeData(iconTheme: const IconThemeData(color: Colors.green, size: 10.0)),
|
theme: ThemeData(iconTheme: const IconThemeData(color: Colors.green, size: 10.0)),
|
||||||
home: const Icon(Icons.computer),
|
home: const Icon(Icons.computer),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
RenderParagraph glyphText = tester.renderObject(find.byType(RichText));
|
RenderParagraph glyphText = tester.renderObject(find.byType(RichText));
|
||||||
@ -338,7 +338,7 @@ void main() {
|
|||||||
primaryTextTheme: fallback.primaryTextTheme.copyWith(
|
primaryTextTheme: fallback.primaryTextTheme.copyWith(
|
||||||
body1: fallback.primaryTextTheme.body1.copyWith(
|
body1: fallback.primaryTextTheme.body1.copyWith(
|
||||||
fontSize: _kMagicFontSize,
|
fontSize: _kMagicFontSize,
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
expect(customTheme.primaryTextTheme.body1.fontSize, _kMagicFontSize);
|
expect(customTheme.primaryTextTheme.body1.fontSize, _kMagicFontSize);
|
||||||
|
@ -700,7 +700,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final Finder tooltip = find.byType(Tooltip);
|
final Finder tooltip = find.byType(Tooltip);
|
||||||
@ -758,7 +758,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final Finder tooltip = find.byType(Tooltip);
|
final Finder tooltip = find.byType(Tooltip);
|
||||||
@ -824,7 +824,7 @@ void main() {
|
|||||||
label: 'TIP',
|
label: 'TIP',
|
||||||
textDirection: TextDirection.ltr,
|
textDirection: TextDirection.ltr,
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(semantics, hasSemantics(expected, ignoreTransform: true, ignoreRect: true));
|
expect(semantics, hasSemantics(expected, ignoreTransform: true, ignoreRect: true));
|
||||||
|
@ -847,7 +847,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final Finder tooltip = find.byType(Tooltip);
|
final Finder tooltip = find.byType(Tooltip);
|
||||||
@ -891,7 +891,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final Finder tooltip = find.byType(Tooltip);
|
final Finder tooltip = find.byType(Tooltip);
|
||||||
@ -932,7 +932,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final Finder tooltip = find.byType(Tooltip);
|
final Finder tooltip = find.byType(Tooltip);
|
||||||
@ -965,7 +965,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final Finder tooltip = find.byType(Tooltip);
|
final Finder tooltip = find.byType(Tooltip);
|
||||||
|
@ -139,7 +139,7 @@ void main() {
|
|||||||
|
|
||||||
assetImage.obtainKey(ImageConfiguration(
|
assetImage.obtainKey(ImageConfiguration(
|
||||||
bundle: testAssetBundle,
|
bundle: testAssetBundle,
|
||||||
devicePixelRatio: 3.0)
|
devicePixelRatio: 3.0),
|
||||||
).then(expectAsync1((AssetBundleImageKey bundleKey) {
|
).then(expectAsync1((AssetBundleImageKey bundleKey) {
|
||||||
expect(bundleKey.name, mainAssetPath);
|
expect(bundleKey.name, mainAssetPath);
|
||||||
expect(bundleKey.scale, 1.0);
|
expect(bundleKey.scale, 1.0);
|
||||||
@ -172,7 +172,7 @@ void main() {
|
|||||||
// we have 1.0 and 3.0, asking for 1.5 should give
|
// we have 1.0 and 3.0, asking for 1.5 should give
|
||||||
assetImage.obtainKey(ImageConfiguration(
|
assetImage.obtainKey(ImageConfiguration(
|
||||||
bundle: testAssetBundle,
|
bundle: testAssetBundle,
|
||||||
devicePixelRatio: deviceRatio)
|
devicePixelRatio: deviceRatio),
|
||||||
).then(expectAsync1((AssetBundleImageKey bundleKey) {
|
).then(expectAsync1((AssetBundleImageKey bundleKey) {
|
||||||
expect(bundleKey.name, expectedAssetPath);
|
expect(bundleKey.name, expectedAssetPath);
|
||||||
expect(bundleKey.scale, chosenAssetRatio);
|
expect(bundleKey.scale, chosenAssetRatio);
|
||||||
|
@ -15,7 +15,7 @@ void main() {
|
|||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
const MaterialApp(
|
const MaterialApp(
|
||||||
home: Text('text widget'),
|
home: Text('text widget'),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
const Map<String, dynamic> data = <String, dynamic>{
|
const Map<String, dynamic> data = <String, dynamic>{
|
||||||
'type': 'fontsChange',
|
'type': 'fontsChange',
|
||||||
@ -33,7 +33,7 @@ void main() {
|
|||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
const MaterialApp(
|
const MaterialApp(
|
||||||
home: SelectableText('text widget'),
|
home: SelectableText('text widget'),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
const Map<String, dynamic> data = <String, dynamic>{
|
const Map<String, dynamic> data = <String, dynamic>{
|
||||||
'type': 'fontsChange',
|
'type': 'fontsChange',
|
||||||
@ -54,8 +54,7 @@ void main() {
|
|||||||
location: BannerLocation.topStart,
|
location: BannerLocation.topStart,
|
||||||
textDirection: TextDirection.ltr,
|
textDirection: TextDirection.ltr,
|
||||||
layoutDirection: TextDirection.ltr,
|
layoutDirection: TextDirection.ltr,
|
||||||
|
),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
const Map<String, dynamic> data = <String, dynamic>{
|
const Map<String, dynamic> data = <String, dynamic>{
|
||||||
'type': 'fontsChange',
|
'type': 'fontsChange',
|
||||||
@ -74,8 +73,8 @@ void main() {
|
|||||||
CupertinoApp(
|
CupertinoApp(
|
||||||
home: CupertinoDatePicker(
|
home: CupertinoDatePicker(
|
||||||
onDateTimeChanged: (DateTime dateTime) { },
|
onDateTimeChanged: (DateTime dateTime) { },
|
||||||
)
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
final dynamic state = tester.state(find.byType(CupertinoDatePicker));
|
final dynamic state = tester.state(find.byType(CupertinoDatePicker));
|
||||||
final Map<int, double> cache = state.estimatedColumnWidths;
|
final Map<int, double> cache = state.estimatedColumnWidths;
|
||||||
@ -100,8 +99,8 @@ void main() {
|
|||||||
home: CupertinoDatePicker(
|
home: CupertinoDatePicker(
|
||||||
mode: CupertinoDatePickerMode.date,
|
mode: CupertinoDatePickerMode.date,
|
||||||
onDateTimeChanged: (DateTime dateTime) { },
|
onDateTimeChanged: (DateTime dateTime) { },
|
||||||
)
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
final dynamic state = tester.state(find.byType(CupertinoDatePicker));
|
final dynamic state = tester.state(find.byType(CupertinoDatePicker));
|
||||||
final Map<int, double> cache = state.estimatedColumnWidths;
|
final Map<int, double> cache = state.estimatedColumnWidths;
|
||||||
@ -126,8 +125,8 @@ void main() {
|
|||||||
CupertinoApp(
|
CupertinoApp(
|
||||||
home: CupertinoTimerPicker(
|
home: CupertinoTimerPicker(
|
||||||
onTimerDurationChanged: (Duration d) { },
|
onTimerDurationChanged: (Duration d) { },
|
||||||
)
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
final dynamic state = tester.state(find.byType(CupertinoTimerPicker));
|
final dynamic state = tester.state(find.byType(CupertinoTimerPicker));
|
||||||
// Simulates wrong metrics due to font missing.
|
// Simulates wrong metrics due to font missing.
|
||||||
@ -159,7 +158,7 @@ void main() {
|
|||||||
onChanged: (RangeValues values) { },
|
onChanged: (RangeValues values) { },
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
const Map<String, dynamic> data = <String, dynamic>{
|
const Map<String, dynamic> data = <String, dynamic>{
|
||||||
'type': 'fontsChange',
|
'type': 'fontsChange',
|
||||||
@ -182,7 +181,7 @@ void main() {
|
|||||||
onChanged: (double value) { },
|
onChanged: (double value) { },
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
const Map<String, dynamic> data = <String, dynamic>{
|
const Map<String, dynamic> data = <String, dynamic>{
|
||||||
'type': 'fontsChange',
|
'type': 'fontsChange',
|
||||||
@ -223,7 +222,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
await tester.tap(find.text('X'));
|
await tester.tap(find.text('X'));
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
@ -239,7 +238,7 @@ void main() {
|
|||||||
find.descendant(
|
find.descendant(
|
||||||
of: find.byKey(const Key('parent')),
|
of: find.byKey(const Key('parent')),
|
||||||
matching: find.byType(CustomPaint),
|
matching: find.byType(CustomPaint),
|
||||||
).first
|
).first,
|
||||||
);
|
);
|
||||||
expect(renderObject.debugNeedsPaint, isTrue);
|
expect(renderObject.debugNeedsPaint, isTrue);
|
||||||
});
|
});
|
||||||
|
@ -180,7 +180,7 @@ void main() {
|
|||||||
WidgetSpan(child: SizedBox(width: 10, height: 10)),
|
WidgetSpan(child: SizedBox(width: 10, height: 10)),
|
||||||
TextSpan(text: 'The sky is falling :)'),
|
TextSpan(text: 'The sky is falling :)'),
|
||||||
],
|
],
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextSpan(text: 'c'),
|
TextSpan(text: 'c'),
|
||||||
@ -198,7 +198,7 @@ void main() {
|
|||||||
WidgetSpan(child: SizedBox(width: 10, height: 11)),
|
WidgetSpan(child: SizedBox(width: 10, height: 11)),
|
||||||
TextSpan(text: 'The sky is falling :)'),
|
TextSpan(text: 'The sky is falling :)'),
|
||||||
],
|
],
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextSpan(text: 'c'),
|
TextSpan(text: 'c'),
|
||||||
|
@ -44,7 +44,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await expectLater(
|
await expectLater(
|
||||||
@ -98,7 +98,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await expectLater(
|
await expectLater(
|
||||||
@ -144,7 +144,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await expectLater(
|
await expectLater(
|
||||||
|
@ -50,7 +50,7 @@ void main() {
|
|||||||
child = RenderPositionedBox(
|
child = RenderPositionedBox(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: RenderSizedBox(const Size(100.0, 100.0)),
|
child: RenderSizedBox(const Size(100.0, 100.0)),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
root.attach(PipelineOwner());
|
root.attach(PipelineOwner());
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ void main() {
|
|||||||
opacity: 1.0
|
opacity: 1.0
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
layout(a, phase: EnginePhase.flushSemantics);
|
layout(a, phase: EnginePhase.flushSemantics);
|
||||||
|
@ -74,7 +74,7 @@ void main() {
|
|||||||
final List<SemanticsNode> children = <SemanticsNode>[
|
final List<SemanticsNode> children = <SemanticsNode>[
|
||||||
SemanticsNode()
|
SemanticsNode()
|
||||||
..isMergedIntoParent = true
|
..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(
|
node.updateWith(
|
||||||
@ -82,7 +82,7 @@ void main() {
|
|||||||
childrenInInversePaintOrder: children,
|
childrenInInversePaintOrder: children,
|
||||||
);
|
);
|
||||||
|
|
||||||
children.add( SemanticsNode()
|
children.add(SemanticsNode()
|
||||||
..isMergedIntoParent = true
|
..isMergedIntoParent = true
|
||||||
..rect = const Rect.fromLTRB(42.0, 42.0, 10.0, 10.0)
|
..rect = const Rect.fromLTRB(42.0, 42.0, 10.0, 10.0)
|
||||||
);
|
);
|
||||||
|
@ -42,7 +42,7 @@ void main() {
|
|||||||
key: key,
|
key: key,
|
||||||
duration: const Duration(milliseconds: 200),
|
duration: const Duration(milliseconds: 200),
|
||||||
decoration: decorationA,
|
decoration: decorationA,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderDecoratedBox box = key.currentContext.findRenderObject();
|
final RenderDecoratedBox box = key.currentContext.findRenderObject();
|
||||||
@ -54,7 +54,7 @@ void main() {
|
|||||||
key: key,
|
key: key,
|
||||||
duration: const Duration(milliseconds: 200),
|
duration: const Duration(milliseconds: 200),
|
||||||
decoration: decorationB,
|
decoration: decorationB,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(key.currentContext.findRenderObject(), equals(box));
|
expect(key.currentContext.findRenderObject(), equals(box));
|
||||||
@ -101,7 +101,7 @@ void main() {
|
|||||||
AnimatedContainer(
|
AnimatedContainer(
|
||||||
duration: const Duration(milliseconds: 200),
|
duration: const Duration(milliseconds: 200),
|
||||||
color: const Color(0xFF00FF00),
|
color: const Color(0xFF00FF00),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(tester.binding.transientCallbackCount, 0);
|
expect(tester.binding.transientCallbackCount, 0);
|
||||||
await tester.pump(const Duration(seconds: 1));
|
await tester.pump(const Duration(seconds: 1));
|
||||||
@ -110,7 +110,7 @@ void main() {
|
|||||||
AnimatedContainer(
|
AnimatedContainer(
|
||||||
duration: const Duration(milliseconds: 200),
|
duration: const Duration(milliseconds: 200),
|
||||||
color: const Color(0xFF00FF00),
|
color: const Color(0xFF00FF00),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(tester.binding.transientCallbackCount, 0);
|
expect(tester.binding.transientCallbackCount, 0);
|
||||||
await tester.pump(const Duration(seconds: 1));
|
await tester.pump(const Duration(seconds: 1));
|
||||||
@ -119,7 +119,7 @@ void main() {
|
|||||||
AnimatedContainer(
|
AnimatedContainer(
|
||||||
duration: const Duration(milliseconds: 200),
|
duration: const Duration(milliseconds: 200),
|
||||||
color: const Color(0xFF0000FF),
|
color: const Color(0xFF0000FF),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(tester.binding.transientCallbackCount, 1); // this is the only time an animation should have started!
|
expect(tester.binding.transientCallbackCount, 1); // this is the only time an animation should have started!
|
||||||
await tester.pump(const Duration(seconds: 1));
|
await tester.pump(const Duration(seconds: 1));
|
||||||
@ -128,7 +128,7 @@ void main() {
|
|||||||
AnimatedContainer(
|
AnimatedContainer(
|
||||||
duration: const Duration(milliseconds: 200),
|
duration: const Duration(milliseconds: 200),
|
||||||
color: const Color(0xFF0000FF),
|
color: const Color(0xFF0000FF),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(tester.binding.transientCallbackCount, 0);
|
expect(tester.binding.transientCallbackCount, 0);
|
||||||
});
|
});
|
||||||
@ -226,7 +226,7 @@ void main() {
|
|||||||
height: 100.0,
|
height: 100.0,
|
||||||
child: const Text('X', textDirection: TextDirection.ltr),
|
child: const Text('X', textDirection: TextDirection.ltr),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
@ -246,7 +246,7 @@ void main() {
|
|||||||
height: 200.0,
|
height: 200.0,
|
||||||
child: const Text('X', textDirection: TextDirection.ltr),
|
child: const Text('X', textDirection: TextDirection.ltr),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
await tester.pump(const Duration(milliseconds: 100));
|
await tester.pump(const Duration(milliseconds: 100));
|
||||||
@ -270,7 +270,7 @@ void main() {
|
|||||||
height: 100.0,
|
height: 100.0,
|
||||||
child: const Text('X', textDirection: TextDirection.ltr),
|
child: const Text('X', textDirection: TextDirection.ltr),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
await tester.pump(const Duration(milliseconds: 100));
|
await tester.pump(const Duration(milliseconds: 100));
|
||||||
|
@ -19,7 +19,7 @@ Future<Size> _getSize(WidgetTester tester, BoxConstraints constraints, double as
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
final RenderBox box = tester.renderObject(find.byKey(childKey));
|
final RenderBox box = tester.renderObject(find.byKey(childKey));
|
||||||
return box.size;
|
return box.size;
|
||||||
|
@ -39,7 +39,7 @@ void main() {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
await expectLater(
|
await expectLater(
|
||||||
find.byType(RepaintBoundary).first,
|
find.byType(RepaintBoundary).first,
|
||||||
|
@ -17,7 +17,7 @@ void main() {
|
|||||||
elevation: 2.0,
|
elevation: 2.0,
|
||||||
color: Color(0xFF0000FF),
|
color: Color(0xFF0000FF),
|
||||||
shadowColor: Color(0xFF00FF00),
|
shadowColor: Color(0xFF00FF00),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
final RenderPhysicalShape renderObject = tester.renderObject(find.byType(PhysicalShape));
|
final RenderPhysicalShape renderObject = tester.renderObject(find.byType(PhysicalShape));
|
||||||
expect(renderObject.clipper, const ShapeBorderClipper(shape: CircleBorder()));
|
expect(renderObject.clipper, const ShapeBorderClipper(shape: CircleBorder()));
|
||||||
@ -34,7 +34,7 @@ void main() {
|
|||||||
color: const Color(0xFF0000FF),
|
color: const Color(0xFF0000FF),
|
||||||
shadowColor: const Color(0xFF00FF00),
|
shadowColor: const Color(0xFF00FF00),
|
||||||
child: Container(color: const Color(0xFF0000FF)),
|
child: Container(color: const Color(0xFF0000FF)),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderPhysicalShape renderPhysicalShape =
|
final RenderPhysicalShape renderPhysicalShape =
|
||||||
@ -79,7 +79,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(_pointerDown, isFalse);
|
expect(_pointerDown, isFalse);
|
||||||
await tester.tap(find.byKey(key1));
|
await tester.tap(find.byKey(key1));
|
||||||
@ -109,7 +109,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(_pointerDown, isFalse);
|
expect(_pointerDown, isFalse);
|
||||||
await tester.tap(find.byKey(key1));
|
await tester.tap(find.byKey(key1));
|
||||||
@ -139,7 +139,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(_pointerDown, isFalse);
|
expect(_pointerDown, isFalse);
|
||||||
await tester.tap(find.byKey(key1));
|
await tester.tap(find.byKey(key1));
|
||||||
|
@ -100,7 +100,7 @@ Future<void> main() async {
|
|||||||
border: Border.all(width: 10.0, color: const Color(0x80FF00FF)),
|
border: Border.all(width: 10.0, color: const Color(0x80FF00FF)),
|
||||||
color: Colors.teal[600],
|
color: Colors.teal[600],
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ Future<void> main() async {
|
|||||||
height: 25.0,
|
height: 25.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(tester.getSize(find.byKey(key)), equals(const Size(45.0, 45.0)));
|
expect(tester.getSize(find.byKey(key)), equals(const Size(45.0, 45.0)));
|
||||||
});
|
});
|
||||||
|
@ -136,7 +136,7 @@ void main() {
|
|||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: () { log.add('tap'); },
|
onTap: () { log.add('tap'); },
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(log, equals(<String>['getClip']));
|
expect(log, equals(<String>['getClip']));
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ void main() {
|
|||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: () { log.add('tap'); },
|
onTap: () { log.add('tap'); },
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(log, equals(<String>[]));
|
expect(log, equals(<String>[]));
|
||||||
|
|
||||||
@ -179,7 +179,7 @@ void main() {
|
|||||||
onTap: () { log.add('tap'); },
|
onTap: () { log.add('tap'); },
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(log, equals(<String>[]));
|
expect(log, equals(<String>[]));
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(log, equals(<String>['a']));
|
expect(log, equals(<String>['a']));
|
||||||
|
|
||||||
@ -231,7 +231,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(log, equals(<String>['a', 'tap']));
|
expect(log, equals(<String>['a', 'tap']));
|
||||||
|
|
||||||
@ -249,7 +249,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(log, equals(<String>['a', 'tap', 'a']));
|
expect(log, equals(<String>['a', 'tap', 'a']));
|
||||||
|
|
||||||
@ -267,7 +267,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(log, equals(<String>['a', 'tap', 'a']));
|
expect(log, equals(<String>['a', 'tap', 'a']));
|
||||||
|
|
||||||
@ -285,7 +285,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(log, equals(<String>['a', 'tap', 'a', 'b']));
|
expect(log, equals(<String>['a', 'tap', 'a', 'b']));
|
||||||
|
|
||||||
@ -303,7 +303,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(log, equals(<String>['a', 'tap', 'a', 'b', 'c']));
|
expect(log, equals(<String>['a', 'tap', 'a', 'b', 'c']));
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
await expectLater(
|
await expectLater(
|
||||||
find.byType(ColorFiltered),
|
find.byType(ColorFiltered),
|
||||||
|
@ -311,7 +311,7 @@ void main() {
|
|||||||
final TextEditingController controller = TextEditingController.fromValue(
|
final TextEditingController controller = TextEditingController.fromValue(
|
||||||
const TextEditingValue(
|
const TextEditingValue(
|
||||||
text: 'initial value',
|
text: 'initial value',
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
Future<void> pumpEditableTextWithTextStyle(TextStyle style) async {
|
Future<void> pumpEditableTextWithTextStyle(TextStyle style) async {
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
|
@ -211,7 +211,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
Scrollable.ensureVisible(findContext(0));
|
Scrollable.ensureVisible(findContext(0));
|
||||||
|
@ -24,7 +24,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox outsideBox = tester.firstRenderObject(find.byKey(outside));
|
final RenderBox outsideBox = tester.firstRenderObject(find.byKey(outside));
|
||||||
@ -60,7 +60,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox outsideBox = tester.firstRenderObject(find.byKey(outside));
|
final RenderBox outsideBox = tester.firstRenderObject(find.byKey(outside));
|
||||||
@ -96,7 +96,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox outsideBox = tester.firstRenderObject(find.byKey(outside));
|
final RenderBox outsideBox = tester.firstRenderObject(find.byKey(outside));
|
||||||
@ -466,7 +466,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(_pointerDown, isFalse);
|
expect(_pointerDown, isFalse);
|
||||||
await tester.tap(find.byKey(key1));
|
await tester.tap(find.byKey(key1));
|
||||||
|
@ -78,7 +78,7 @@ void main() {
|
|||||||
buildBox(5),
|
buildBox(5),
|
||||||
buildBox(6),
|
buildBox(6),
|
||||||
],
|
],
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.tap(find.text('0'));
|
await tester.tap(find.text('0'));
|
||||||
@ -108,7 +108,7 @@ void main() {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Container(width: 100.0, height: 100.0),
|
Container(width: 100.0, height: 100.0),
|
||||||
],
|
],
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
ContainerLayer layer = RendererBinding.instance.renderView.debugLayer;
|
ContainerLayer layer = RendererBinding.instance.renderView.debugLayer;
|
||||||
while (layer != null && !(layer is OpacityLayer))
|
while (layer != null && !(layer is OpacityLayer))
|
||||||
|
@ -517,7 +517,7 @@ void main() {
|
|||||||
delegate: SliverChildListDelegate(<Widget>[
|
delegate: SliverChildListDelegate(<Widget>[
|
||||||
Text('child', key: GlobalKey()),
|
Text('child', key: GlobalKey()),
|
||||||
]),
|
]),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -25,7 +25,7 @@ void main() {
|
|||||||
},
|
},
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(semantics, includesNodeWith(
|
expect(semantics, includesNodeWith(
|
||||||
@ -59,7 +59,7 @@ void main() {
|
|||||||
},
|
},
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(semantics, includesNodeWith(
|
expect(semantics, includesNodeWith(
|
||||||
@ -125,7 +125,7 @@ void main() {
|
|||||||
instance
|
instance
|
||||||
..onTap = () { logs.add('tap'); };
|
..onTap = () { logs.add('tap'); };
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ void main() {
|
|||||||
instance
|
instance
|
||||||
..onStart = (_) { logs.add('horizontal'); };
|
..onStart = (_) { logs.add('horizontal'); };
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
},
|
},
|
||||||
child: hasLayoutPerformer ? _TestLayoutPerformer(performLayout: performLayout) : null,
|
child: hasLayoutPerformer ? _TestLayoutPerformer(performLayout: performLayout) : null,
|
||||||
),
|
),
|
||||||
@ -186,7 +186,7 @@ void main() {
|
|||||||
gestures: gestures,
|
gestures: gestures,
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(semantics, includesNodeWith(
|
expect(semantics, includesNodeWith(
|
||||||
@ -200,7 +200,7 @@ void main() {
|
|||||||
semantics: _TestSemanticsGestureDelegate(onTap: () {}),
|
semantics: _TestSemanticsGestureDelegate(onTap: () {}),
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(semantics, includesNodeWith(
|
expect(semantics, includesNodeWith(
|
||||||
@ -222,7 +222,7 @@ void main() {
|
|||||||
semantics: _TestSemanticsGestureDelegate(onTap: () {}),
|
semantics: _TestSemanticsGestureDelegate(onTap: () {}),
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(semantics, includesNodeWith(
|
expect(semantics, includesNodeWith(
|
||||||
@ -235,7 +235,7 @@ void main() {
|
|||||||
gestures: gestures,
|
gestures: gestures,
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(semantics, includesNodeWith(
|
expect(semantics, includesNodeWith(
|
||||||
@ -257,7 +257,7 @@ void main() {
|
|||||||
semantics: _TestSemanticsGestureDelegate(onTap: () {}),
|
semantics: _TestSemanticsGestureDelegate(onTap: () {}),
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(semantics, includesNodeWith(
|
expect(semantics, includesNodeWith(
|
||||||
@ -271,7 +271,7 @@ void main() {
|
|||||||
semantics: _TestSemanticsGestureDelegate(onLongPress: () {}),
|
semantics: _TestSemanticsGestureDelegate(onLongPress: () {}),
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(semantics, includesNodeWith(
|
expect(semantics, includesNodeWith(
|
||||||
@ -298,7 +298,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final int detectorId = detectorKey.currentContext.findRenderObject().debugSemantics.id;
|
final int detectorId = detectorKey.currentContext.findRenderObject().debugSemantics.id;
|
||||||
@ -332,7 +332,7 @@ void main() {
|
|||||||
gestures: _buildGestureMap(null, null),
|
gestures: _buildGestureMap(null, null),
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(semantics, isNot(includesNodeWith(
|
expect(semantics, isNot(includesNodeWith(
|
||||||
@ -353,7 +353,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(semantics, includesNodeWith(
|
expect(semantics, includesNodeWith(
|
||||||
@ -384,7 +384,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final int detectorId = detectorKey.currentContext.findRenderObject().debugSemantics.id;
|
final int detectorId = detectorKey.currentContext.findRenderObject().debugSemantics.id;
|
||||||
@ -404,7 +404,7 @@ void main() {
|
|||||||
gestures: _buildGestureMap(null, null),
|
gestures: _buildGestureMap(null, null),
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(semantics, isNot(includesNodeWith(
|
expect(semantics, isNot(includesNodeWith(
|
||||||
@ -425,7 +425,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(semantics, includesNodeWith(
|
expect(semantics, includesNodeWith(
|
||||||
@ -456,7 +456,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final int detectorId = detectorKey.currentContext.findRenderObject().debugSemantics.id;
|
final int detectorId = detectorKey.currentContext.findRenderObject().debugSemantics.id;
|
||||||
@ -476,7 +476,7 @@ void main() {
|
|||||||
gestures: _buildGestureMap(null, null),
|
gestures: _buildGestureMap(null, null),
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(semantics, isNot(includesNodeWith(
|
expect(semantics, isNot(includesNodeWith(
|
||||||
@ -497,7 +497,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(semantics, includesNodeWith(
|
expect(semantics, includesNodeWith(
|
||||||
@ -513,7 +513,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(semantics, includesNodeWith(
|
expect(semantics, includesNodeWith(
|
||||||
@ -556,7 +556,7 @@ void main() {
|
|||||||
gestures: gestures,
|
gestures: gestures,
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final int detectorId = detectorKey.currentContext.findRenderObject().debugSemantics.id;
|
final int detectorId = detectorKey.currentContext.findRenderObject().debugSemantics.id;
|
||||||
@ -582,7 +582,7 @@ void main() {
|
|||||||
gestures: _buildGestureMap(null, null),
|
gestures: _buildGestureMap(null, null),
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(semantics, isNot(includesNodeWith(
|
expect(semantics, isNot(includesNodeWith(
|
||||||
@ -603,7 +603,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(semantics, includesNodeWith(
|
expect(semantics, includesNodeWith(
|
||||||
@ -647,7 +647,7 @@ void main() {
|
|||||||
gestures: gestures,
|
gestures: gestures,
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final int detectorId = detectorKey.currentContext.findRenderObject().debugSemantics.id;
|
final int detectorId = detectorKey.currentContext.findRenderObject().debugSemantics.id;
|
||||||
@ -672,7 +672,7 @@ void main() {
|
|||||||
gestures: _buildGestureMap(() => LongPressGestureRecognizer(), null),
|
gestures: _buildGestureMap(() => LongPressGestureRecognizer(), null),
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(semantics, includesNodeWith(
|
expect(semantics, includesNodeWith(
|
||||||
@ -685,7 +685,7 @@ void main() {
|
|||||||
gestures: _buildGestureMap(() => TapGestureRecognizer(), null),
|
gestures: _buildGestureMap(() => TapGestureRecognizer(), null),
|
||||||
child: Container(),
|
child: Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(semantics, includesNodeWith(
|
expect(semantics, includesNodeWith(
|
||||||
|
@ -315,7 +315,7 @@ Future<void> main() async {
|
|||||||
find.ancestor(
|
find.ancestor(
|
||||||
of: find.byKey(firstKey, skipOffstage: false),
|
of: find.byKey(firstKey, skipOffstage: false),
|
||||||
matching: find.byType(Offstage, skipOffstage: false),
|
matching: find.byType(Offstage, skipOffstage: false),
|
||||||
).first
|
).first,
|
||||||
);
|
);
|
||||||
// Original hero should stay hidden.
|
// Original hero should stay hidden.
|
||||||
expect(first.offstage, isTrue);
|
expect(first.offstage, isTrue);
|
||||||
@ -736,7 +736,7 @@ Future<void> main() async {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Pushes route
|
// Pushes route
|
||||||
@ -838,7 +838,7 @@ Future<void> main() async {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Pushes route
|
// Pushes route
|
||||||
@ -916,7 +916,7 @@ Future<void> main() async {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Pushes route
|
// Pushes route
|
||||||
@ -1044,7 +1044,7 @@ Future<void> main() async {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Pushes routeB
|
// Pushes routeB
|
||||||
@ -1143,7 +1143,7 @@ Future<void> main() async {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(find.text('456'), findsOneWidget);
|
expect(find.text('456'), findsOneWidget);
|
||||||
@ -1758,7 +1758,7 @@ Future<void> main() async {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
nestedNavigator.currentState.push(MaterialPageRoute<void>(
|
nestedNavigator.currentState.push(MaterialPageRoute<void>(
|
||||||
@ -2234,7 +2234,7 @@ Future<void> main() async {
|
|||||||
child: Image(
|
child: Image(
|
||||||
image: imageProvider,
|
image: imageProvider,
|
||||||
key: imageKey2,
|
key: imageKey2,
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -38,10 +38,10 @@ void main() {
|
|||||||
text: 'zzzzzzzzz',
|
text: 'zzzzzzzzz',
|
||||||
recognizer: tapRight,
|
recognizer: tapRight,
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox box = tester.renderObject(find.byKey(textKey));
|
final RenderBox box = tester.renderObject(find.byKey(textKey));
|
||||||
|
@ -87,7 +87,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox renderObject = tester.renderObject(find.byType(Icon));
|
final RenderBox renderObject = tester.renderObject(find.byType(Icon));
|
||||||
|
@ -15,7 +15,7 @@ void main() {
|
|||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
const Center(
|
const Center(
|
||||||
child: ImageIcon(_kImage),
|
child: ImageIcon(_kImage),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox renderObject = tester.renderObject(find.byType(ImageIcon));
|
final RenderBox renderObject = tester.renderObject(find.byType(ImageIcon));
|
||||||
@ -45,7 +45,7 @@ void main() {
|
|||||||
null,
|
null,
|
||||||
size: 96.0,
|
size: 96.0,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox renderObject = tester.renderObject(find.byType(ImageIcon));
|
final RenderBox renderObject = tester.renderObject(find.byType(ImageIcon));
|
||||||
@ -59,7 +59,7 @@ void main() {
|
|||||||
data: IconThemeData(size: 36.0),
|
data: IconThemeData(size: 36.0),
|
||||||
child: ImageIcon(null),
|
child: ImageIcon(null),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox renderObject = tester.renderObject(find.byType(ImageIcon));
|
final RenderBox renderObject = tester.renderObject(find.byType(ImageIcon));
|
||||||
@ -76,7 +76,7 @@ void main() {
|
|||||||
size: 48.0,
|
size: 48.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox renderObject = tester.renderObject(find.byType(ImageIcon));
|
final RenderBox renderObject = tester.renderObject(find.byType(ImageIcon));
|
||||||
@ -90,7 +90,7 @@ void main() {
|
|||||||
data: IconThemeData(),
|
data: IconThemeData(),
|
||||||
child: ImageIcon(null),
|
child: ImageIcon(null),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderBox renderObject = tester.renderObject(find.byType(ImageIcon));
|
final RenderBox renderObject = tester.renderObject(find.byType(ImageIcon));
|
||||||
|
@ -210,7 +210,7 @@ void main() {
|
|||||||
image: imageProvider,
|
image: imageProvider,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(imageProvider._lastResolvedConfiguration.devicePixelRatio, 5.0);
|
expect(imageProvider._lastResolvedConfiguration.devicePixelRatio, 5.0);
|
||||||
@ -237,7 +237,7 @@ void main() {
|
|||||||
image: imageProvider,
|
image: imageProvider,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(imageProvider._lastResolvedConfiguration.devicePixelRatio, 10.0);
|
expect(imageProvider._lastResolvedConfiguration.devicePixelRatio, 10.0);
|
||||||
@ -276,7 +276,7 @@ void main() {
|
|||||||
child: Container(width: 100.0),
|
child: Container(width: 100.0),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(imageProvider._lastResolvedConfiguration.devicePixelRatio, 5.0);
|
expect(imageProvider._lastResolvedConfiguration.devicePixelRatio, 5.0);
|
||||||
@ -306,7 +306,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(imageProvider._lastResolvedConfiguration.devicePixelRatio, 10.0);
|
expect(imageProvider._lastResolvedConfiguration.devicePixelRatio, 10.0);
|
||||||
@ -597,7 +597,7 @@ void main() {
|
|||||||
image: TestImageProvider(),
|
image: TestImageProvider(),
|
||||||
color: const Color(0xFF00FF00),
|
color: const Color(0xFF00FF00),
|
||||||
colorBlendMode: BlendMode.clear,
|
colorBlendMode: BlendMode.clear,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
final RenderImage renderer = tester.renderObject<RenderImage>(find.byType(Image));
|
final RenderImage renderer = tester.renderObject<RenderImage>(find.byType(Image));
|
||||||
expect(renderer.color, const Color(0xFF00FF00));
|
expect(renderer.color, const Color(0xFF00FF00));
|
||||||
@ -792,7 +792,7 @@ void main() {
|
|||||||
textDirection: TextDirection.ltr,
|
textDirection: TextDirection.ltr,
|
||||||
flags: <SemanticsFlag>[SemanticsFlag.isImage],
|
flags: <SemanticsFlag>[SemanticsFlag.isImage],
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
), ignoreTransform: true));
|
), ignoreTransform: true));
|
||||||
semantics.dispose();
|
semantics.dispose();
|
||||||
});
|
});
|
||||||
|
@ -161,7 +161,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(log, equals(<String>['a: 3']));
|
expect(log, equals(<String>['a: 3']));
|
||||||
@ -237,7 +237,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(log, equals(<String>['a: 3']));
|
expect(log, equals(<String>['a: 3']));
|
||||||
@ -308,7 +308,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(log, equals(<int>[3]));
|
expect(log, equals(<int>[3]));
|
||||||
@ -355,7 +355,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
right: child,
|
right: child,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(log, equals(<int>[3]));
|
expect(log, equals(<int>[3]));
|
||||||
@ -403,7 +403,7 @@ void main() {
|
|||||||
ValueInherited(
|
ValueInherited(
|
||||||
value: 3,
|
value: 3,
|
||||||
child: inner,
|
child: inner,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(inheritedValue, equals(3));
|
expect(inheritedValue, equals(3));
|
||||||
});
|
});
|
||||||
@ -430,7 +430,7 @@ void main() {
|
|||||||
ValueInherited(
|
ValueInherited(
|
||||||
value: 3,
|
value: 3,
|
||||||
child: inner,
|
child: inner,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(buildCount, equals(1));
|
expect(buildCount, equals(1));
|
||||||
});
|
});
|
||||||
@ -461,7 +461,7 @@ void main() {
|
|||||||
ValueInherited(
|
ValueInherited(
|
||||||
value: 3,
|
value: 3,
|
||||||
child: inner,
|
child: inner,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
expect(buildCount, equals(2));
|
expect(buildCount, equals(2));
|
||||||
});
|
});
|
||||||
|
@ -188,7 +188,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
TextStyle getIconStyle(Key key) {
|
TextStyle getIconStyle(Key key) {
|
||||||
|
@ -28,7 +28,7 @@ void main() {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(layoutBuilderSize, const Size(100.0, 200.0));
|
expect(layoutBuilderSize, const Size(100.0, 200.0));
|
||||||
@ -231,7 +231,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(layoutBuilderSize, equals(const Size(10.0, 20.0)));
|
expect(layoutBuilderSize, equals(const Size(10.0, 20.0)));
|
||||||
|
@ -120,8 +120,7 @@ void main() {
|
|||||||
1, 2,
|
1, 2,
|
||||||
3, 4, 5, // visible
|
3, 4, 5, // visible
|
||||||
6, 7,
|
6, 7,
|
||||||
]
|
]));
|
||||||
));
|
|
||||||
callbackTracker.clear();
|
callbackTracker.clear();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -459,7 +458,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderSliverList list = tester.renderObject(find.byType(SliverList));
|
final RenderSliverList list = tester.renderObject(find.byType(SliverList));
|
||||||
@ -490,7 +489,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderObject renderObject = tester.renderObject(find.byType(Scrollable));
|
final RenderObject renderObject = tester.renderObject(find.byType(Scrollable));
|
||||||
@ -516,7 +515,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderObject renderObject = tester.renderObject(find.byType(Scrollable));
|
final RenderObject renderObject = tester.renderObject(find.byType(Scrollable));
|
||||||
|
@ -134,7 +134,7 @@ void main() {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Can be scrolled infinitely for negative indexes.
|
// Can be scrolled infinitely for negative indexes.
|
||||||
@ -183,7 +183,7 @@ void main() {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(paintedChildren, <int>[-13, -12, -11, -10, -9, -8, -7]);
|
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.
|
// Scrolls up and down to check if builder is called twice.
|
||||||
@ -326,7 +326,7 @@ void main() {
|
|||||||
return Text(index.toString());
|
return Text(index.toString());
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderListWheelViewport viewport = tester.firstRenderObject(find.byType(Text)).parent.parent;
|
final RenderListWheelViewport viewport = tester.firstRenderObject(find.byType(Text)).parent.parent;
|
||||||
@ -363,7 +363,7 @@ void main() {
|
|||||||
return Text(index.toString());
|
return Text(index.toString());
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final RenderListWheelViewport viewport = tester.firstRenderObject(find.byType(Text)).parent.parent;
|
final RenderListWheelViewport viewport = tester.firstRenderObject(find.byType(Text)).parent.parent;
|
||||||
@ -385,7 +385,7 @@ void main() {
|
|||||||
return Text(index.toString());
|
return Text(index.toString());
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// 12 instead of 6 children are laid out + 1 because the middle item is
|
// 12 instead of 6 children are laid out + 1 because the middle item is
|
||||||
|
@ -34,7 +34,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.tap(find.text('X'));
|
await tester.tap(find.text('X'));
|
||||||
|
@ -274,7 +274,7 @@ void main() {
|
|||||||
label: 'Dismiss',
|
label: 'Dismiss',
|
||||||
textDirection: TextDirection.ltr,
|
textDirection: TextDirection.ltr,
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
);
|
);
|
||||||
expect(semantics, hasSemantics(expectedSemantics, ignoreId: true));
|
expect(semantics, hasSemantics(expectedSemantics, ignoreId: true));
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ Future<void> main() async {
|
|||||||
routes: <String, WidgetBuilder>{
|
routes: <String, WidgetBuilder>{
|
||||||
'/page': (BuildContext context) => Container(),
|
'/page': (BuildContext context) => Container(),
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
final RenderImage renderImage = tester.renderObject(find.byType(Image));
|
final RenderImage renderImage = tester.renderObject(find.byType(Image));
|
||||||
final ui.Image image1 = renderImage.image;
|
final ui.Image image1 = renderImage.image;
|
||||||
|
@ -174,7 +174,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
await expectLater(
|
await expectLater(
|
||||||
find.byType(RepaintBoundary).first,
|
find.byType(RepaintBoundary).first,
|
||||||
|
@ -23,7 +23,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final Element builderElement = tester.element(find.byKey(builderKey));
|
final Element builderElement = tester.element(find.byKey(builderKey));
|
||||||
|
@ -888,7 +888,7 @@ void main() {
|
|||||||
find.descendant(
|
find.descendant(
|
||||||
of: find.byType(AndroidView),
|
of: find.byType(AndroidView),
|
||||||
matching: find.byType(Focus),
|
matching: find.byType(Focus),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
final Element containerElement = tester.element(find.byKey(containerKey));
|
final Element containerElement = tester.element(find.byKey(containerKey));
|
||||||
final FocusNode androidViewFocusNode = androidViewFocusWidget.focusNode;
|
final FocusNode androidViewFocusNode = androidViewFocusWidget.focusNode;
|
||||||
@ -1579,7 +1579,7 @@ void main() {
|
|||||||
height: 100,
|
height: 100,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// First frame is before the platform view was created so the render object
|
// First frame is before the platform view was created so the render object
|
||||||
@ -1914,7 +1914,8 @@ void main() {
|
|||||||
Factory<OneSequenceGestureRecognizer>(
|
Factory<OneSequenceGestureRecognizer>(
|
||||||
constructRecognizer,
|
constructRecognizer,
|
||||||
),
|
),
|
||||||
})
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
@ -1925,7 +1926,8 @@ void main() {
|
|||||||
Factory<OneSequenceGestureRecognizer>(
|
Factory<OneSequenceGestureRecognizer>(
|
||||||
constructRecognizer,
|
constructRecognizer,
|
||||||
),
|
),
|
||||||
})
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
expect(factoryInvocationCount, 1);
|
expect(factoryInvocationCount, 1);
|
||||||
});
|
});
|
||||||
@ -2160,7 +2162,7 @@ void main() {
|
|||||||
find.descendant(
|
find.descendant(
|
||||||
of: find.byType(PlatformViewLink),
|
of: find.byType(PlatformViewLink),
|
||||||
matching: find.byType(Focus),
|
matching: find.byType(Focus),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
final FocusNode platformViewFocusNode = platformViewFocusWidget.focusNode;
|
final FocusNode platformViewFocusNode = platformViewFocusWidget.focusNode;
|
||||||
final Element containerElement = tester.element(find.byKey(containerKey));
|
final Element containerElement = tester.element(find.byKey(containerKey));
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user