Skip to content

Bottom appbar/sheet shadow property - #121406

Merged
esouthren merged 17 commits into
flutter:masterfrom
esouthren:bottom_sheet_shadow_property
Mar 6, 2023
Merged

esouthren merged 17 commits into
flutter:masterfrom
esouthren:bottom_sheet_shadow_property

Conversation

@esouthren

Copy link
Copy Markdown
Contributor

Revised re-land of #119819. Fixes #118150 and #118244.

Instead of hard-defaulting to no shadow in M3, we add a shadowColor property to bottomAppBar and bottomSheet, and their respective themes.

The M3 default is then set to Colors.transparent shadow, but can be overridden by users.

Updated M3 defaults:
Screenshot 2023-02-24 3 04 29 PM

Internal testing has been conducted and g3fix created (cl/512056372).

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.

@flutter-dashboard flutter-dashboard Bot added p: material_ui material_ui package in flutter/packages framework flutter/packages/flutter repository. See also f: labels. c: contributor-productivity Team-specific productivity, code health, technical debt. labels Feb 24, 2023
@esouthren
esouthren marked this pull request as ready for review February 24, 2023 17:51
Comment thread packages/flutter/lib/src/material/bottom_app_bar.dart Outdated
Comment thread packages/flutter/lib/src/material/bottom_app_bar.dart Outdated
@esouthren
esouthren requested a review from guidezpl February 27, 2023 13:37

@HansMuller HansMuller left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Creating a shadowColor theme property is a good move. Just small small-stuff feedback.

Comment thread packages/flutter/lib/src/material/bottom_app_bar.dart
Comment thread packages/flutter/lib/src/material/bottom_app_bar.dart Outdated
Comment thread packages/flutter/lib/src/material/bottom_app_bar.dart Outdated
Comment thread packages/flutter/lib/src/material/bottom_app_bar.dart Outdated
Comment thread packages/flutter/lib/src/material/bottom_app_bar_theme.dart Outdated
Comment thread packages/flutter/lib/src/material/bottom_sheet.dart
@esouthren
esouthren requested a review from HansMuller March 1, 2023 11:59

@HansMuller HansMuller left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread packages/flutter/lib/src/material/bottom_app_bar.dart
@esouthren
esouthren merged commit d696b05 into flutter:master Mar 6, 2023
@esouthren
esouthren deleted the bottom_sheet_shadow_property branch March 6, 2023 11:56
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 6, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 6, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 8, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 8, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 8, 2023
Color? get surfaceTintColor => Theme.of(context).colorScheme.surfaceTint;

@override
Color get shadowColor => Colors.transparent;

@QuncCccccc QuncCccccc Mar 13, 2023 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This shadowColor should have same type Color? as the template. Fixing this in PR: #122548 #122557 :)

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. framework flutter/packages/flutter repository. See also f: labels. p: material_ui material_ui package in flutter/packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BottomAppBar does not match M3 spec

4 participants