Skip to content

Conversation

@werainkhatri
Copy link
Member

@werainkhatri werainkhatri commented May 29, 2022

From Spec:

Flutter (MacOS):

Fixes #104882

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. c: contributor-productivity Team-specific productivity, code health, technical debt. labels May 29, 2022
@werainkhatri werainkhatri force-pushed the add-icon-to-dialog branch 2 times, most recently from 57bb050 to 9fe0a43 Compare May 29, 2022 10:31
@werainkhatri
Copy link
Member Author

Screenshot 2022-05-29 at 3 57 03 PM

Material 3 states that the padding between title and content should be 16dp, but currently this padding is 20dp, provided by contentPadding, which is a non-null parameter. Should I turn contentPadding to nullable and set the padding according to if the theme is material 3? or should I keep it non-null and modify it before applying?

Copy link
Member

Choose a reason for hiding this comment

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

I'd make contentPadding nullable and follow the example that titlePadding sets. Please document similarly, see lines 259-261.

Copy link
Member Author

Choose a reason for hiding this comment

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

PTAL

@werainkhatri
Copy link
Member Author

werainkhatri commented May 30, 2022

if iconColor is not provided:

  • for M2, it's straightforward, use the Theme.of(context).dialogTheme, else use _DefaultsM2 which uses Theme.of(context).iconTheme (right?)
  • for M3, the default _TokenDefaultsM3's iconColors is colorScheme.secondary, so Theme.of(context).iconTheme will not be used. is this expected?

@werainkhatri werainkhatri requested a review from guidezpl May 30, 2022 18:59
@werainkhatri
Copy link
Member Author

will fix the test and add more in the next commit :)

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/// If null, [DialogTheme.iconColor] is used.
/// If null, [DialogTheme.iconColor] is used. If that is also null, ..."

Copy link
Member Author

Choose a reason for hiding this comment

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

PTAL

@werainkhatri werainkhatri force-pushed the add-icon-to-dialog branch 3 times, most recently from 004a852 to 7d543e9 Compare June 1, 2022 14:32
@werainkhatri werainkhatri marked this pull request as ready for review June 1, 2022 16:10
@werainkhatri werainkhatri requested a review from guidezpl June 1, 2022 16:13
@guidezpl
Copy link
Member

guidezpl commented Jun 3, 2022

Please resolve conflicts, then I can review

@werainkhatri
Copy link
Member Author

Please resolve conflicts, then I can review

I should've merged instead of rebase 😅

I'm away today, will do this over the weekend 😊

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/// of the [icon]. If [title] is _not_ null, an extra 16 pixels of bottom
/// of the [icon]. If [title] is _not_ null, 16 pixels of bottom
Suggested change
/// of the [icon]. If [title] is _not_ null, an extra 16 pixels of bottom
/// of the [icon]. If [title] is _not_ null, an extra 16 pixels of bottom

@guidezpl
Copy link
Member

guidezpl commented Jun 8, 2022

While providing padding can be done with the icon, to be consistent with titlePadding and contentPadding, I don't have an issue with including it here. WDYT, @darrenaustin ?

@fluttergithubbot fluttergithubbot merged commit 672859a into flutter:master Jun 20, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jun 20, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jun 21, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 21, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jun 21, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jun 21, 2022
camsim99 pushed a commit to camsim99/flutter that referenced this pull request Aug 10, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt. f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Material 3 dialog with hero icon

3 participants