Added font bold when isDefaultAction is true in CupertinoDialogAction#31308
Added font bold when isDefaultAction is true in CupertinoDialogAction#31308LongCatIsLooong merged 17 commits intoflutter:masterfrom riccardoratta:master
Conversation
|
Thanks for the pull request @riccardoratta! |
|
This is going to break the
Not in the scope of this PR. |
|
Generally, LGTM. @LongCatIsLooong Changing the name would be a breaking change. Is it significant enough of an issue to warrant that? |
Removed `isDefaultAction` option since is not valid anymore (due to a new assert). Also performed a check on the final color of the text, that must be destructiveRed.
This is the correct weight for _preferred_ action (here called default).
The alpha channel of the tested color is _removed_ since the scope of this test is only to check the output color when `isDestructiveAction` is `true`. Other tests will be performed to check the opacity (or alpha) when the action is enabled or not.
This test was wrongly removed by me because was not possible anymore to set both style properties to `true`.
xster
left a comment
There was a problem hiding this comment.
If the tests were only testing the color in disabled state, we should add tests for enabled states too.
Otherwise LGTM.
Description
From the
isDefaultActiondoc in theCupertinoDialogActionclass.flutter/packages/flutter/lib/src/cupertino/dialog.dart
Lines 1045 to 1048 in eaf058d
But actually changing this parameter doesn't cause any effect.
Example
By launching this app
you will get
where the "ok" button is not bold.
Solution
The change seem to solve the problem.
Also
isDefaultActionvariable was never used in the code.Related Issues
No related issues found.
Tests
Only performed visual test on the application (see screenshots above).
Checklist
///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?