Unverified Commit 555cb66e authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by GitHub

fix tree (#67410)

parent f5511784
......@@ -61,7 +61,7 @@ void main() {
final DefaultTextStyle widget = tester.widget(find.widgetWithText(DefaultTextStyle, 'Ok'));
expect(widget.style!.color, const CupertinoDynamicColor.withBrightnessAndContrast(
expect(widget.style.color, const CupertinoDynamicColor.withBrightnessAndContrast(
color: Color.fromARGB(255, 255, 59, 48),
darkColor: Color.fromARGB(255, 255, 69, 58),
highContrastColor: Color.fromARGB(255, 215, 0, 21),
......@@ -84,7 +84,7 @@ void main() {
of: find.widgetWithText(CupertinoActionSheetAction, text),
matching: find.byType(DefaultTextStyle),
),
).style!;
).style;
}
await tester.pumpWidget(
......@@ -139,7 +139,7 @@ void main() {
final DefaultTextStyle widget = tester.widget(find.widgetWithText(DefaultTextStyle, 'Ok'));
expect(widget.style!.fontWeight, equals(FontWeight.w600));
expect(widget.style.fontWeight, equals(FontWeight.w600));
});
testWidgets('Action sheet text styles are correct when both title and message are included', (WidgetTester tester) async {
......@@ -160,8 +160,8 @@ void main() {
final DefaultTextStyle messageStyle = tester.firstWidget(find.widgetWithText(DefaultTextStyle,
'An action sheet'));
expect(titleStyle.style!.fontWeight, FontWeight.w600);
expect(messageStyle.style!.fontWeight, FontWeight.w400);
expect(titleStyle.style.fontWeight, FontWeight.w600);
expect(messageStyle.style.fontWeight, FontWeight.w400);
});
testWidgets('Action sheet text styles are correct when title but no message is included', (WidgetTester tester) async {
......@@ -179,7 +179,7 @@ void main() {
final DefaultTextStyle titleStyle = tester.firstWidget(find.widgetWithText(DefaultTextStyle,
'Action Sheet'));
expect(titleStyle.style!.fontWeight, FontWeight.w400);
expect(titleStyle.style.fontWeight, FontWeight.w400);
});
testWidgets('Action sheet text styles are correct when message but no title is included', (WidgetTester tester) async {
......@@ -197,7 +197,7 @@ void main() {
final DefaultTextStyle messageStyle = tester.firstWidget(find.widgetWithText(DefaultTextStyle,
'An action sheet'));
expect(messageStyle.style!.fontWeight, FontWeight.w600);
expect(messageStyle.style.fontWeight, FontWeight.w600);
});
testWidgets('Content section but no actions', (WidgetTester tester) async {
......
......@@ -323,7 +323,7 @@ void main() {
home: CupertinoButton(
onPressed: () { },
child: Builder(builder: (BuildContext context) {
textStyle = DefaultTextStyle.of(context).style!;
textStyle = DefaultTextStyle.of(context).style;
return const Placeholder();
}),
),
......@@ -337,7 +337,7 @@ void main() {
home: CupertinoButton.filled(
onPressed: () { },
child: Builder(builder: (BuildContext context) {
textStyle = DefaultTextStyle.of(context).style!;
textStyle = DefaultTextStyle.of(context).style;
return const Placeholder();
}),
),
......@@ -359,7 +359,7 @@ void main() {
home: CupertinoButton(
onPressed: () { },
child: Builder(builder: (BuildContext context) {
textStyle = DefaultTextStyle.of(context).style!;
textStyle = DefaultTextStyle.of(context).style;
return const Placeholder();
}),
),
......@@ -373,7 +373,7 @@ void main() {
home: CupertinoButton.filled(
onPressed: () { },
child: Builder(builder: (BuildContext context) {
textStyle = DefaultTextStyle.of(context).style!;
textStyle = DefaultTextStyle.of(context).style;
return const Placeholder();
}),
),
......
......@@ -50,7 +50,7 @@ void main() {
);
expect(finder, findsOneWidget);
final DefaultTextStyle defaultStyle = tester.widget(finder);
return defaultStyle.style!;
return defaultStyle.style;
}
Icon _getIcon(WidgetTester tester) {
......
......@@ -116,7 +116,7 @@ void main() {
final DefaultTextStyle widget = tester.widget(find.byType(DefaultTextStyle));
expect(widget.style!.color!.withAlpha(255), CupertinoColors.systemRed.color);
expect(widget.style.color!.withAlpha(255), CupertinoColors.systemRed.color);
});
testWidgets('Dialog dark theme', (WidgetTester tester) async {
......@@ -231,7 +231,7 @@ void main() {
final DefaultTextStyle widget = tester.widget(find.byType(DefaultTextStyle));
expect(widget.style!.fontWeight, equals(FontWeight.w600));
expect(widget.style.fontWeight, equals(FontWeight.w600));
});
testWidgets('Dialog default and destructive action styles', (WidgetTester tester) async {
......@@ -243,8 +243,8 @@ void main() {
final DefaultTextStyle widget = tester.widget(find.byType(DefaultTextStyle));
expect(widget.style!.color!.withAlpha(255), CupertinoColors.systemRed.color);
expect(widget.style!.fontWeight, equals(FontWeight.w600));
expect(widget.style.color!.withAlpha(255), CupertinoColors.systemRed.color);
expect(widget.style.fontWeight, equals(FontWeight.w600));
});
testWidgets('Dialog disabled action style', (WidgetTester tester) async {
......@@ -254,8 +254,8 @@ void main() {
final DefaultTextStyle widget = tester.widget(find.byType(DefaultTextStyle));
expect(widget.style!.color!.opacity, greaterThanOrEqualTo(127 / 255));
expect(widget.style!.color!.opacity, lessThanOrEqualTo(128 / 255));
expect(widget.style.color!.opacity, greaterThanOrEqualTo(127 / 255));
expect(widget.style.color!.opacity, lessThanOrEqualTo(128 / 255));
});
testWidgets('Dialog enabled action style', (WidgetTester tester) async {
......@@ -266,7 +266,7 @@ void main() {
final DefaultTextStyle widget = tester.widget(find.byType(DefaultTextStyle));
expect(widget.style!.color!.opacity, equals(1.0));
expect(widget.style.color!.opacity, equals(1.0));
});
testWidgets('Message is scrollable, has correct padding with large text sizes', (WidgetTester tester) async {
......
......@@ -1198,7 +1198,7 @@ class _ExpectStyles extends StatelessWidget {
@override
Widget build(BuildContext context) {
final TextStyle style = DefaultTextStyle.of(context).style!;
final TextStyle style = DefaultTextStyle.of(context).style;
expect(style.color, isSameColorAs(color));
expect(style.fontFamily, '.SF Pro Text');
expect(style.fontSize, 17.0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment