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:
Loïc de Porcaro 2024-03-08 01:21:35 +01:00 committed by GitHub
parent d632f34f9d
commit dde616dbe1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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