Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
26af12ed
Unverified
Commit
26af12ed
authored
Sep 27, 2022
by
Mitchell Goodwin
Committed by
GitHub
Sep 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change default text color of CupertinoAlertDialog to theme primary color (#111785)
parent
9ea87390
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
dialog.dart
packages/flutter/lib/src/cupertino/dialog.dart
+1
-1
dialog_test.dart
packages/flutter/test/cupertino/dialog_test.dart
+17
-0
No files found.
packages/flutter/lib/src/cupertino/dialog.dart
View file @
26af12ed
...
...
@@ -1713,7 +1713,7 @@ class CupertinoDialogAction extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
TextStyle
style
=
_kCupertinoDialogActionStyle
.
copyWith
(
color:
CupertinoDynamicColor
.
resolve
(
isDestructiveAction
?
CupertinoColors
.
systemRed
:
Cupertino
Colors
.
systemBlue
,
isDestructiveAction
?
CupertinoColors
.
systemRed
:
Cupertino
Theme
.
of
(
context
).
primaryColor
,
context
,
),
);
...
...
packages/flutter/test/cupertino/dialog_test.dart
View file @
26af12ed
...
...
@@ -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
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment