Skip to content

Conversation

@LongCatIsLooong
Copy link
Contributor

@LongCatIsLooong LongCatIsLooong commented Aug 27, 2019

Description

  • Update CupertinoActivityIndicator's color
  • Update CupertinoApp's color
  • CupertinoDynamicColor.resolve(Color resolvable, BuildContext context, { bool nullOk = true }), i.e., nullOk is now true by default.

Screenshot

Doesn't look very different from the old widget.
Simulator Screen Shot - iPhone Xʀ - 2019-08-26 at 17 03 55

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.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (Please read Handling breaking changes). Replace this with a link to the e-mail where you asked for input on this proposed change.
  • No, this is not a breaking change.

@fluttergithubbot fluttergithubbot added f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels. labels Aug 27, 2019
Copy link
Contributor

@darrenaustin darrenaustin left a 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 }) {
Copy link
Contributor

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?

Copy link
Contributor Author

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'.

Copy link
Contributor

@HansMuller HansMuller left a 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 }) {
Copy link
Contributor

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.

@LongCatIsLooong
Copy link
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?

@LongCatIsLooong LongCatIsLooong changed the title CupertinoActivityIndicator dark mode CupertinoActivityIndicator & CupertinoApp dark mode Aug 27, 2019
Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Contributor

@HansMuller HansMuller left a 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) =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need an indent here

@LongCatIsLooong LongCatIsLooong force-pushed the activity-indicator branch 3 times, most recently from 7d629ad to a804be8 Compare August 30, 2019 04:41
@LongCatIsLooong LongCatIsLooong merged commit ad47f9e into flutter:master Sep 3, 2019
@LongCatIsLooong LongCatIsLooong deleted the activity-indicator branch September 3, 2019 14:52
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants