Skip to content

Commit

Permalink
Update TextField.style documentation for Material 3 (#135556)
Browse files Browse the repository at this point in the history
fixes [TextField uses bodyLarge instead of titleMedium as the documentation says
](flutter/flutter#135411)
  • Loading branch information
TahaTesser authored Sep 28, 2023
1 parent 2cd0b60 commit 4600b12
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/flutter/lib/src/material/input_decorator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2903,7 +2903,6 @@ class InputDecoration {
/// {@endtemplate}
final TextStyle? errorStyle;


/// The maximum number of lines the [errorText] can occupy.
///
/// Defaults to null, which means that the [errorText] will be limited
Expand Down
7 changes: 6 additions & 1 deletion packages/flutter/lib/src/material/text_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,12 @@ class TextField extends StatefulWidget {
///
/// This text style is also used as the base style for the [decoration].
///
/// If null, defaults to the `titleMedium` text style from the current [Theme].
/// If null, [TextTheme.bodyLarge] will be used. When the text field is disabled,
/// [TextTheme.bodyLarge] with an opacity of 0.38 will be used instead.
///
/// If null and [ThemeData.useMaterial3] is false, [TextTheme.titleMedium] will
/// be used. When the text field is disabled, [TextTheme.titleMedium] with
/// [ThemeData.disabledColor] will be used instead.
final TextStyle? style;

/// {@macro flutter.widgets.editableText.strutStyle}
Expand Down

0 comments on commit 4600b12

Please sign in to comment.