Skip to content

Commit 51c2af5

Browse files
authored
docs: update docs about color property in material card (flutter#117263)
* update docs * * * typo * Revert "typo" This reverts commit 3e25d4be337b1a41d24b1a86136606d6551b30cf. * Update card.dart * Update card.dart * Update card.dart
1 parent 44f5403 commit 51c2af5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: packages/flutter/lib/src/material/card.dart

+3-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ class Card extends StatelessWidget {
7878
///
7979
/// Defines the card's [Material.color].
8080
///
81-
/// If this property is null then [CardTheme.color] of [ThemeData.cardTheme]
82-
/// is used. If that's null then [ThemeData.cardColor] is used.
81+
/// If this property is null then the ambient [CardTheme.color] is used. If that is null,
82+
/// and [ThemeData.useMaterial3] is true, then [ColorScheme.surface] of
83+
/// [ThemeData.colorScheme] is used. Otherwise, [ThemeData.cardColor] is used.
8384
final Color? color;
8485

8586
/// The color to paint the shadow below the card.

0 commit comments

Comments
 (0)