CupertinoActivityIndicator & CupertinoApp dark mode#39289
Merged
LongCatIsLooong merged 8 commits intoflutter:masterfrom Sep 3, 2019
Merged
CupertinoActivityIndicator & CupertinoApp dark mode#39289LongCatIsLooong merged 8 commits intoflutter:masterfrom
LongCatIsLooong merged 8 commits intoflutter:masterfrom
Conversation
darrenaustin
approved these changes
Aug 27, 2019
| /// lacks the dependencies essential to the color resolution, an exception will | ||
| /// be thrown, unless [nullOk] is set to true. | ||
| static Color resolve(Color resolvable, BuildContext context, { bool nullOk = false }) { | ||
| static Color resolve(Color resolvable, BuildContext context, { bool nullOk = true }) { |
Contributor
There was a problem hiding this comment.
Why the change in default here?
Contributor
Author
There was a problem hiding this comment.
Changing default color properties of Cupertino components to dynamic colors may introduce dependencies on MediaQuery/CupertinoInterfaceLevel/CupertinoTheme, that's going to break a lot of widget tests, if those required InheritWidgets are not provided. So it's changed to true by default to avoid breaking our widget tests as well as users'.
HansMuller
approved these changes
Aug 27, 2019
| /// lacks the dependencies essential to the color resolution, an exception will | ||
| /// be thrown, unless [nullOk] is set to true. | ||
| static Color resolve(Color resolvable, BuildContext context, { bool nullOk = false }) { | ||
| static Color resolve(Color resolvable, BuildContext context, { bool nullOk = true }) { |
Contributor
There was a problem hiding this comment.
Probably should revise the docs a little since by default we will not throw.
e19838f to
4cf877d
Compare
Contributor
Author
|
@darrenaustin @HansMuller sorry I smuggled in app.dart in this PR since the changes are trivial too. Could you review that part too? |
HansMuller
approved these changes
Aug 28, 2019
| key: GlobalObjectKey(this), | ||
| navigatorKey: widget.navigatorKey, | ||
| navigatorObservers: _navigatorObservers, | ||
| pageRouteBuilder: <T>(RouteSettings settings, WidgetBuilder builder) => |
7d629ad to
a804be8
Compare
a804be8 to
1b86b57
Compare
6 tasks
18 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
CupertinoActivityIndicator's colorCupertinoApp's colorCupertinoDynamicColor.resolve(Color resolvable, BuildContext context, { bool nullOk = true }), i.e.,nullOkis now true by default.Screenshot
Doesn't look very different from the old widget.

Related Issues
#35541
Tests
Activity indicator dark mode
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).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?