Unverified Commit 26af12ed authored by Mitchell Goodwin's avatar Mitchell Goodwin Committed by GitHub

Change default text color of CupertinoAlertDialog to theme primary color (#111785)

parent 9ea87390
......@@ -1713,7 +1713,7 @@ class CupertinoDialogAction extends StatelessWidget {
Widget build(BuildContext context) {
TextStyle style = _kCupertinoDialogActionStyle.copyWith(
color: CupertinoDynamicColor.resolve(
isDestructiveAction ? CupertinoColors.systemRed : CupertinoColors.systemBlue,
isDestructiveAction ? CupertinoColors.systemRed : CupertinoTheme.of(context).primaryColor,
context,
),
);
......
......@@ -125,6 +125,23 @@ void main() {
expect(widget.style.color!.withAlpha(255), CupertinoColors.systemRed.color);
});
testWidgets('Dialog default action style', (WidgetTester tester) async {
await tester.pumpWidget(
CupertinoTheme(
data: const CupertinoThemeData(
primaryColor: CupertinoColors.systemGreen,
),
child: boilerplate(const CupertinoDialogAction(
child: Text('Ok'),
)),
),
);
final DefaultTextStyle widget = tester.widget(find.byType(DefaultTextStyle));
expect(widget.style.color!.withAlpha(255), CupertinoColors.systemGreen.color);
});
testWidgets('Dialog dark theme', (WidgetTester tester) async {
await tester.pumpWidget(
CupertinoApp(
......
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