From faade5f4863602ca9b32e38b8c0082fd5d41b831 Mon Sep 17 00:00:00 2001 From: Rydmike Date: Tue, 2 May 2023 07:44:23 +0300 Subject: [PATCH] =?UTF-8?q?FIX:=20https://github.com/flutter/samples/issue?= =?UTF-8?q?s/1752=20and=20https://githu=E2=80=A6=20(#1753)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …b.com/flutter/samples/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: https://github.com/flutter/samples/issues/1751 FIX: https://github.com/flutter/samples/issues/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]. [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 --- experimental/material_3_demo/lib/elevation_screen.dart | 7 +++++-- material_3_demo/lib/elevation_screen.dart | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/experimental/material_3_demo/lib/elevation_screen.dart b/experimental/material_3_demo/lib/elevation_screen.dart index 0f3d6299e..6522e9b8e 100644 --- a/experimental/material_3_demo/lib/elevation_screen.dart +++ b/experimental/material_3_demo/lib/elevation_screen.dart @@ -23,7 +23,10 @@ class ElevationScreen extends StatelessWidget { ), ), ), - ElevationGrid(surfaceTintColor: surfaceTint), + ElevationGrid( + surfaceTintColor: surfaceTint, + shadowColor: Colors.transparent, + ), SliverList( delegate: SliverChildListDelegate([ const SizedBox(height: 10), @@ -146,7 +149,7 @@ class _ElevationCardState extends State { 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) diff --git a/material_3_demo/lib/elevation_screen.dart b/material_3_demo/lib/elevation_screen.dart index 0f3d6299e..6522e9b8e 100644 --- a/material_3_demo/lib/elevation_screen.dart +++ b/material_3_demo/lib/elevation_screen.dart @@ -23,7 +23,10 @@ class ElevationScreen extends StatelessWidget { ), ), ), - ElevationGrid(surfaceTintColor: surfaceTint), + ElevationGrid( + surfaceTintColor: surfaceTint, + shadowColor: Colors.transparent, + ), SliverList( delegate: SliverChildListDelegate([ const SizedBox(height: 10), @@ -146,7 +149,7 @@ class _ElevationCardState extends State { 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)