-
Notifications
You must be signed in to change notification settings - Fork 29.7k
CupertinoActivityIndicator & CupertinoApp dark mode #39289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CupertinoActivityIndicator & CupertinoApp dark mode #39289
Conversation
darrenaustin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| /// 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 }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the change in default here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| /// 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 }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should revise the docs a little since by default we will not throw.
e19838f to
4cf877d
Compare
|
@darrenaustin @HansMuller sorry I smuggled in app.dart in this PR since the changes are trivial too. Could you review that part too? |
justinmc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
HansMuller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| key: GlobalObjectKey(this), | ||
| navigatorKey: widget.navigatorKey, | ||
| navigatorObservers: _navigatorObservers, | ||
| pageRouteBuilder: <T>(RouteSettings settings, WidgetBuilder builder) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need an indent here
7d629ad to
a804be8
Compare
a804be8 to
1b86b57
Compare
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?