Skip to content

Commit

Permalink
Remove deprecated TextTheme members (#139255)
Browse files Browse the repository at this point in the history
  • Loading branch information
Renzo-Olivares authored Mar 28, 2024
1 parent 2079f34 commit f5b65ba
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 337 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class CountDisplay extends StatelessWidget {
width: 100,
height: 100,
padding: const EdgeInsetsDirectional.all(10),
child: Text('$count', style: Theme.of(context).textTheme.headline4),
child: Text('$count', style: Theme.of(context).textTheme.headlineMedium),
);
}
}
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/material/button_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ class ButtonThemeData with Diagnosticable {
/// minimum size, internal padding, and shape.
///
/// Despite the name, this property is not the [TextTheme] whose
/// [TextTheme.button] is used as the button text's [TextStyle].
/// [TextTheme.labelLarge] is used as the button text's [TextStyle].
ButtonTextTheme getTextTheme(MaterialButton button) => button.textTheme ?? textTheme;

/// The foreground color of the [button]'s text and icon when
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/material/popup_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1507,7 +1507,7 @@ class _PopupMenuDefaultsM2 extends PopupMenuThemeData {
late final TextTheme _textTheme = _theme.textTheme;

@override
TextStyle? get textStyle => _textTheme.subtitle1;
TextStyle? get textStyle => _textTheme.titleMedium;

static EdgeInsets menuHorizontalPadding = const EdgeInsets.symmetric(horizontal: 16.0);
}
Expand Down
Loading

0 comments on commit f5b65ba

Please sign in to comment.