Skip to content

Commit

Permalink
FIX: #1752 and https://githu… (#1753)
Browse files Browse the repository at this point in the history
…b.com//issues/1751

Fixes for:

The screen that shows Material elevation and row that says "Surface Tint
Color Only" has shadow and shown elevation dp is wrong.

FIX: #1751
FIX: #1752

## Pre-launch Checklist

- [x] I read the [Flutter Style Guide] _recently_, and have followed its
advice.
- [x] I signed the [CLA].
- [x] I read the [Contributors Guide].
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] All existing and new tests are passing.

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

<!-- Links -->
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[CLA]: https://cla.developers.google.com/
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[Contributors Guide]:
https://github.com/flutter/samples/blob/main/CONTRIBUTING.md
  • Loading branch information
rydmike committed May 2, 2023
1 parent d7f8115 commit faade5f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions experimental/material_3_demo/lib/elevation_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ class ElevationScreen extends StatelessWidget {
),
),
),
ElevationGrid(surfaceTintColor: surfaceTint),
ElevationGrid(
surfaceTintColor: surfaceTint,
shadowColor: Colors.transparent,
),
SliverList(
delegate: SliverChildListDelegate(<Widget>[
const SizedBox(height: 10),
Expand Down Expand Up @@ -146,7 +149,7 @@ class _ElevationCardState extends State<ElevationCard> {
style: Theme.of(context).textTheme.labelMedium,
),
Text(
'${widget.info.level.toInt()} dp',
'${widget.info.elevation.toInt()} dp',
style: Theme.of(context).textTheme.labelMedium,
),
if (widget.surfaceTint != null)
Expand Down
7 changes: 5 additions & 2 deletions material_3_demo/lib/elevation_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ class ElevationScreen extends StatelessWidget {
),
),
),
ElevationGrid(surfaceTintColor: surfaceTint),
ElevationGrid(
surfaceTintColor: surfaceTint,
shadowColor: Colors.transparent,
),
SliverList(
delegate: SliverChildListDelegate(<Widget>[
const SizedBox(height: 10),
Expand Down Expand Up @@ -146,7 +149,7 @@ class _ElevationCardState extends State<ElevationCard> {
style: Theme.of(context).textTheme.labelMedium,
),
Text(
'${widget.info.level.toInt()} dp',
'${widget.info.elevation.toInt()} dp',
style: Theme.of(context).textTheme.labelMedium,
),
if (widget.surfaceTint != null)
Expand Down

0 comments on commit faade5f

Please sign in to comment.