fix build analysis errors (#67476)
This commit is contained in:
parent
f1c1d944e3
commit
e9c94e6c45
@ -256,7 +256,7 @@ void main() {
|
|||||||
DefaultTextStyle textStyle = tester.widget(find.widgetWithText(DefaultTextStyle, 'Child 1'));
|
DefaultTextStyle textStyle = tester.widget(find.widgetWithText(DefaultTextStyle, 'Child 1'));
|
||||||
IconTheme iconTheme = tester.widget(find.widgetWithIcon(IconTheme, const IconData(1)));
|
IconTheme iconTheme = tester.widget(find.widgetWithIcon(IconTheme, const IconData(1)));
|
||||||
|
|
||||||
expect(textStyle.style!.color, isSameColorAs(CupertinoColors.white));
|
expect(textStyle.style.color, isSameColorAs(CupertinoColors.white));
|
||||||
expect(iconTheme.data.color, CupertinoColors.activeBlue);
|
expect(iconTheme.data.color, CupertinoColors.activeBlue);
|
||||||
|
|
||||||
await tester.tap(find.widgetWithIcon(IconTheme, const IconData(1)));
|
await tester.tap(find.widgetWithIcon(IconTheme, const IconData(1)));
|
||||||
@ -265,7 +265,7 @@ void main() {
|
|||||||
textStyle = tester.widget(find.widgetWithText(DefaultTextStyle, 'Child 1'));
|
textStyle = tester.widget(find.widgetWithText(DefaultTextStyle, 'Child 1'));
|
||||||
iconTheme = tester.widget(find.widgetWithIcon(IconTheme, const IconData(1)));
|
iconTheme = tester.widget(find.widgetWithIcon(IconTheme, const IconData(1)));
|
||||||
|
|
||||||
expect(textStyle.style!.color, CupertinoColors.activeBlue);
|
expect(textStyle.style.color, CupertinoColors.activeBlue);
|
||||||
expect(iconTheme.data.color, isSameColorAs(CupertinoColors.white));
|
expect(iconTheme.data.color, isSameColorAs(CupertinoColors.white));
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -300,7 +300,7 @@ void main() {
|
|||||||
DefaultTextStyle textStyle = tester.widget(find.widgetWithText(DefaultTextStyle, 'Child 1').first);
|
DefaultTextStyle textStyle = tester.widget(find.widgetWithText(DefaultTextStyle, 'Child 1').first);
|
||||||
IconThemeData iconTheme = IconTheme.of(tester.element(find.byIcon(const IconData(1))));
|
IconThemeData iconTheme = IconTheme.of(tester.element(find.byIcon(const IconData(1))));
|
||||||
|
|
||||||
expect(textStyle.style!.color, isSameColorAs(CupertinoColors.black));
|
expect(textStyle.style.color, isSameColorAs(CupertinoColors.black));
|
||||||
expect(iconTheme.color, isSameColorAs(CupertinoColors.systemBlue.darkColor));
|
expect(iconTheme.color, isSameColorAs(CupertinoColors.systemBlue.darkColor));
|
||||||
|
|
||||||
await tester.tap(find.byIcon(const IconData(1)));
|
await tester.tap(find.byIcon(const IconData(1)));
|
||||||
@ -310,7 +310,7 @@ void main() {
|
|||||||
textStyle = tester.widget(find.widgetWithText(DefaultTextStyle, 'Child 1').first);
|
textStyle = tester.widget(find.widgetWithText(DefaultTextStyle, 'Child 1').first);
|
||||||
iconTheme = IconTheme.of(tester.element(find.byIcon(const IconData(1))));
|
iconTheme = IconTheme.of(tester.element(find.byIcon(const IconData(1))));
|
||||||
|
|
||||||
expect(textStyle.style!.color, isSameColorAs(CupertinoColors.systemBlue.darkColor));
|
expect(textStyle.style.color, isSameColorAs(CupertinoColors.systemBlue.darkColor));
|
||||||
expect(iconTheme.color, isSameColorAs(CupertinoColors.black));
|
expect(iconTheme.color, isSameColorAs(CupertinoColors.black));
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@ -348,7 +348,7 @@ void main() {
|
|||||||
IconTheme iconTheme = tester.widget(find.widgetWithIcon(IconTheme, const IconData(1)));
|
IconTheme iconTheme = tester.widget(find.widgetWithIcon(IconTheme, const IconData(1)));
|
||||||
|
|
||||||
expect(getRenderSegmentedControl(tester).borderColor, CupertinoColors.black);
|
expect(getRenderSegmentedControl(tester).borderColor, CupertinoColors.black);
|
||||||
expect(textStyle.style!.color, CupertinoColors.lightBackgroundGray);
|
expect(textStyle.style.color, CupertinoColors.lightBackgroundGray);
|
||||||
expect(iconTheme.data.color, CupertinoColors.activeGreen.color);
|
expect(iconTheme.data.color, CupertinoColors.activeGreen.color);
|
||||||
expect(getBackgroundColor(tester, 0), CupertinoColors.activeGreen.color);
|
expect(getBackgroundColor(tester, 0), CupertinoColors.activeGreen.color);
|
||||||
expect(getBackgroundColor(tester, 1), CupertinoColors.lightBackgroundGray);
|
expect(getBackgroundColor(tester, 1), CupertinoColors.lightBackgroundGray);
|
||||||
@ -359,7 +359,7 @@ void main() {
|
|||||||
textStyle = tester.widget(find.widgetWithText(DefaultTextStyle, 'Child 1'));
|
textStyle = tester.widget(find.widgetWithText(DefaultTextStyle, 'Child 1'));
|
||||||
iconTheme = tester.widget(find.widgetWithIcon(IconTheme, const IconData(1)));
|
iconTheme = tester.widget(find.widgetWithIcon(IconTheme, const IconData(1)));
|
||||||
|
|
||||||
expect(textStyle.style!.color, CupertinoColors.activeGreen.color);
|
expect(textStyle.style.color, CupertinoColors.activeGreen.color);
|
||||||
expect(iconTheme.data.color, CupertinoColors.lightBackgroundGray);
|
expect(iconTheme.data.color, CupertinoColors.lightBackgroundGray);
|
||||||
expect(getBackgroundColor(tester, 0), CupertinoColors.lightBackgroundGray);
|
expect(getBackgroundColor(tester, 0), CupertinoColors.lightBackgroundGray);
|
||||||
expect(getBackgroundColor(tester, 1), CupertinoColors.activeGreen.color);
|
expect(getBackgroundColor(tester, 1), CupertinoColors.activeGreen.color);
|
||||||
|
@ -254,7 +254,7 @@ void main() {
|
|||||||
|
|
||||||
DefaultTextStyle textStyle = tester.widget(find.widgetWithText(DefaultTextStyle, 'Child 1').first);
|
DefaultTextStyle textStyle = tester.widget(find.widgetWithText(DefaultTextStyle, 'Child 1').first);
|
||||||
|
|
||||||
expect(textStyle.style!.fontWeight, FontWeight.w500);
|
expect(textStyle.style.fontWeight, FontWeight.w500);
|
||||||
|
|
||||||
await tester.tap(find.byIcon(const IconData(1)));
|
await tester.tap(find.byIcon(const IconData(1)));
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
@ -263,7 +263,7 @@ void main() {
|
|||||||
textStyle = tester.widget(find.widgetWithText(DefaultTextStyle, 'Child 1').first);
|
textStyle = tester.widget(find.widgetWithText(DefaultTextStyle, 'Child 1').first);
|
||||||
|
|
||||||
expect(groupValue, 1);
|
expect(groupValue, 1);
|
||||||
expect(textStyle.style!.fontWeight, FontWeight.normal);
|
expect(textStyle.style.fontWeight, FontWeight.normal);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ void main() {
|
|||||||
builder: (BuildContext context) => CupertinoButton(
|
builder: (BuildContext context) => CupertinoButton(
|
||||||
child: const Text('home'),
|
child: const Text('home'),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.of(context).restorablePushNamed('/2');
|
Navigator.of(context)!.restorablePushNamed('/2');
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
routes: <String, WidgetBuilder>{
|
routes: <String, WidgetBuilder>{
|
||||||
@ -269,7 +269,7 @@ void main() {
|
|||||||
expect(find.text('home'), findsNothing);
|
expect(find.text('home'), findsNothing);
|
||||||
expect(find.text('second route'), findsOneWidget);
|
expect(find.text('second route'), findsOneWidget);
|
||||||
|
|
||||||
Navigator.of(tester.element(find.text('second route'))).pop();
|
Navigator.of(tester.element(find.text('second route')))!.pop();
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
|
|
||||||
expect(find.text('home'), findsOneWidget);
|
expect(find.text('home'), findsOneWidget);
|
||||||
@ -280,7 +280,7 @@ void main() {
|
|||||||
expect(find.text('home'), findsNothing);
|
expect(find.text('home'), findsNothing);
|
||||||
expect(find.text('second route'), findsOneWidget);
|
expect(find.text('second route'), findsOneWidget);
|
||||||
|
|
||||||
Navigator.of(tester.element(find.text('second route'))).pop();
|
Navigator.of(tester.element(find.text('second route')))!.pop();
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
|
|
||||||
expect(find.text('home'), findsOneWidget);
|
expect(find.text('home'), findsOneWidget);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user