Improve documentation of CardTheme.shape (#139096)
The previous documentation did not point out the difference between the default corner radius for Material 2 and Material 3. Fixes: https://github.com/flutter/flutter/issues/139093
This commit is contained in:
@@ -164,7 +164,8 @@ class Card extends StatelessWidget {
|
||||
///
|
||||
/// If this property is null then [CardTheme.shape] of [ThemeData.cardTheme]
|
||||
/// is used. If that's null then the shape will be a [RoundedRectangleBorder]
|
||||
/// with a circular corner radius of 4.0.
|
||||
/// with a circular corner radius of 12.0 and if [ThemeData.useMaterial3] is
|
||||
/// false, then the circular corner radius will be 4.0.
|
||||
final ShapeBorder? shape;
|
||||
|
||||
/// Whether to paint the [shape] border in front of the [child].
|
||||
|
||||
@@ -78,7 +78,8 @@ class CardTheme with Diagnosticable {
|
||||
/// Overrides the default value for [Card.shape].
|
||||
///
|
||||
/// If null, [Card] then uses a [RoundedRectangleBorder] with a circular
|
||||
/// corner radius of 4.0.
|
||||
/// corner radius of 12.0 and if [ThemeData.useMaterial3] is false,
|
||||
/// then the circular corner radius will be 4.0.
|
||||
final ShapeBorder? shape;
|
||||
|
||||
/// Creates a copy of this object with the given fields replaced with the
|
||||
|
||||
Reference in New Issue
Block a user