From 058f1660e7ac6197fcf76d87fb41eef1fab50b92 Mon Sep 17 00:00:00 2001 From: Taha Tesser Date: Fri, 28 Jul 2023 18:28:11 +0300 Subject: [PATCH] Update `Card.color` documentation for Material 3 (#131468) fixes [Card color parameter not respected while using Material 3](https://github.com/flutter/flutter/issues/122177) --- packages/flutter/lib/src/material/card.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/flutter/lib/src/material/card.dart b/packages/flutter/lib/src/material/card.dart index a39ff240b0..085d88d9c7 100644 --- a/packages/flutter/lib/src/material/card.dart +++ b/packages/flutter/lib/src/material/card.dart @@ -78,6 +78,12 @@ class Card extends StatelessWidget { /// /// Defines the card's [Material.color]. /// + /// In Material 3, [surfaceTintColor] is drawn on top of this color + /// when the card is elevated. This might make the appearance of + /// the card slightly different than in Material 2. To disable this + /// feature, set [surfaceTintColor] to [Colors.transparent]. + /// See [Material.surfaceTintColor] for more details. + /// /// If this property is null then the ambient [CardTheme.color] is used. If that is null, /// and [ThemeData.useMaterial3] is true, then [ColorScheme.surface] of /// [ThemeData.colorScheme] is used. Otherwise, [ThemeData.cardColor] is used.