@@ -20,8 +20,8 @@ import 'theme_data.dart';
2020
2121/// Defines the title font used for [ListTile] descendants of a [ListTileTheme] .
2222///
23- /// List tiles that appear in a [Drawer] use the theme's [TextTheme.bodyMedium ]
24- /// text style, which is a little smaller than the theme's [TextTheme.titleMedium ]
23+ /// List tiles that appear in a [Drawer] use the theme's [TextTheme.bodyText1 ]
24+ /// text style, which is a little smaller than the theme's [TextTheme.subtitle1 ]
2525/// text style, which is used by default.
2626enum ListTileStyle {
2727 /// Use a title font that's appropriate for a [ListTile] in a list.
@@ -356,14 +356,14 @@ class ListTile extends StatelessWidget {
356356 /// two lines. For example, you can use [Text.maxLines] to enforce the number
357357 /// of lines.
358358 ///
359- /// The subtitle's default [TextStyle] depends on [TextTheme.bodyMedium ] except
359+ /// The subtitle's default [TextStyle] depends on [TextTheme.bodyText2 ] except
360360 /// [TextStyle.color] . The [TextStyle.color] depends on the value of [enabled]
361361 /// and [selected] .
362362 ///
363363 /// When [enabled] is false, the text color is set to [ThemeData.disabledColor] .
364364 ///
365365 /// When [selected] is false, the text color is set to [ListTileTheme.textColor]
366- /// if it's not null and to [TextTheme.bodySmall ] 's color if [ListTileTheme.textColor]
366+ /// if it's not null and to [TextTheme.caption ] 's color if [ListTileTheme.textColor]
367367 /// is null.
368368 final Widget ? subtitle;
369369
@@ -654,10 +654,10 @@ class ListTile extends StatelessWidget {
654654 final TextStyle textStyle;
655655 switch (style ?? tileTheme.style ?? theme.listTileTheme.style ?? ListTileStyle .list) {
656656 case ListTileStyle .drawer:
657- textStyle = theme.textTheme.bodyMedium ! ;
657+ textStyle = theme.textTheme.bodyText1 ! ;
658658 break ;
659659 case ListTileStyle .list:
660- textStyle = theme.textTheme.titleMedium ! ;
660+ textStyle = theme.textTheme.subtitle1 ! ;
661661 break ;
662662 }
663663 final Color ? color = _textColor (theme, tileTheme, textStyle.color);
@@ -667,15 +667,15 @@ class ListTile extends StatelessWidget {
667667 }
668668
669669 TextStyle _subtitleTextStyle (ThemeData theme, ListTileThemeData tileTheme) {
670- final TextStyle textStyle = theme.textTheme.bodyMedium ! ;
671- final Color ? color = _textColor (theme, tileTheme, theme.textTheme.bodySmall ! .color);
670+ final TextStyle textStyle = theme.textTheme.bodyText2 ! ;
671+ final Color ? color = _textColor (theme, tileTheme, theme.textTheme.caption ! .color);
672672 return _isDenseLayout (theme, tileTheme)
673673 ? textStyle.copyWith (color: color, fontSize: 12.0 )
674674 : textStyle.copyWith (color: color);
675675 }
676676
677677 TextStyle _trailingAndLeadingTextStyle (ThemeData theme, ListTileThemeData tileTheme) {
678- final TextStyle textStyle = theme.textTheme.bodyMedium ! ;
678+ final TextStyle textStyle = theme.textTheme.bodyText2 ! ;
679679 final Color ? color = _textColor (theme, tileTheme, textStyle.color);
680680 return textStyle.copyWith (color: color);
681681 }
0 commit comments