mirror of
https://github.com/flutter/flutter
synced 2024-08-25 02:46:31 +00:00
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:
parent
d632f34f9d
commit
dde616dbe1
|
@ -508,7 +508,8 @@ class AlertDialog extends StatelessWidget {
|
||||||
/// Style for the text in the [title] of this [AlertDialog].
|
/// Style for the text in the [title] of this [AlertDialog].
|
||||||
///
|
///
|
||||||
/// If null, [DialogTheme.titleTextStyle] is used. If that's null, defaults to
|
/// 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;
|
final TextStyle? titleTextStyle;
|
||||||
|
|
||||||
/// The (optional) content of the dialog is displayed in the center of the
|
/// 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].
|
/// Style for the text in the [content] of this [AlertDialog].
|
||||||
///
|
///
|
||||||
/// If null, [DialogTheme.contentTextStyle] is used. If that's null, defaults
|
/// 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;
|
final TextStyle? contentTextStyle;
|
||||||
|
|
||||||
/// The (optional) set of actions that are displayed at the bottom of the
|
/// The (optional) set of actions that are displayed at the bottom of the
|
||||||
|
|
Loading…
Reference in a new issue