forked from firka/flutter
Update documentation of AlertDialog's default TextStyle for Material 3 (#144697)
## Update `AlertDialog` Documentation for Material 3 Defaults This pull request updates the documentation for `AlertDialog` to accurately reflect the default text styles (`titleTextStyle` and `contentTextStyle`) when using Material 3. Previously, the documentation suggested default styles (`TextTheme.titleLarge` for titles and `TextTheme.titleMedium` for content) that do not align with Material 3 implementation, which uses `TextTheme.headlineSmall` and `TextTheme.bodyMedium` respectively. Fixes #144489
This commit is contained in:
@@ -508,7 +508,8 @@ class AlertDialog extends StatelessWidget {
|
||||
/// Style for the text in the [title] of this [AlertDialog].
|
||||
///
|
||||
/// If null, [DialogTheme.titleTextStyle] is used. If that's null, defaults to
|
||||
/// [TextTheme.titleLarge] of [ThemeData.textTheme].
|
||||
/// [TextTheme.headlineSmall] of [ThemeData.textTheme] if
|
||||
/// [ThemeData.useMaterial3] is true, [TextTheme.titleLarge] otherwise.
|
||||
final TextStyle? titleTextStyle;
|
||||
|
||||
/// The (optional) content of the dialog is displayed in the center of the
|
||||
@@ -542,7 +543,8 @@ class AlertDialog extends StatelessWidget {
|
||||
/// Style for the text in the [content] of this [AlertDialog].
|
||||
///
|
||||
/// If null, [DialogTheme.contentTextStyle] is used. If that's null, defaults
|
||||
/// to [TextTheme.titleMedium] of [ThemeData.textTheme].
|
||||
/// to [TextTheme.bodyMedium] of [ThemeData.textTheme] if
|
||||
/// [ThemeData.useMaterial3] is true, [TextTheme.titleMedium] otherwise.
|
||||
final TextStyle? contentTextStyle;
|
||||
|
||||
/// The (optional) set of actions that are displayed at the bottom of the
|
||||
|
||||
Reference in New Issue
Block a user