@@ -20,8 +20,8 @@ import 'theme_data.dart';
20
20
21
21
/// Defines the title font used for [ListTile] descendants of a [ListTileTheme] .
22
22
///
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 ]
25
25
/// text style, which is used by default.
26
26
enum ListTileStyle {
27
27
/// Use a title font that's appropriate for a [ListTile] in a list.
@@ -356,14 +356,14 @@ class ListTile extends StatelessWidget {
356
356
/// two lines. For example, you can use [Text.maxLines] to enforce the number
357
357
/// of lines.
358
358
///
359
- /// The subtitle's default [TextStyle] depends on [TextTheme.bodyMedium ] except
359
+ /// The subtitle's default [TextStyle] depends on [TextTheme.bodyText2 ] except
360
360
/// [TextStyle.color] . The [TextStyle.color] depends on the value of [enabled]
361
361
/// and [selected] .
362
362
///
363
363
/// When [enabled] is false, the text color is set to [ThemeData.disabledColor] .
364
364
///
365
365
/// 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]
367
367
/// is null.
368
368
final Widget ? subtitle;
369
369
@@ -654,10 +654,10 @@ class ListTile extends StatelessWidget {
654
654
final TextStyle textStyle;
655
655
switch (style ?? tileTheme.style ?? theme.listTileTheme.style ?? ListTileStyle .list) {
656
656
case ListTileStyle .drawer:
657
- textStyle = theme.textTheme.bodyMedium ! ;
657
+ textStyle = theme.textTheme.bodyText1 ! ;
658
658
break ;
659
659
case ListTileStyle .list:
660
- textStyle = theme.textTheme.titleMedium ! ;
660
+ textStyle = theme.textTheme.subtitle1 ! ;
661
661
break ;
662
662
}
663
663
final Color ? color = _textColor (theme, tileTheme, textStyle.color);
@@ -667,15 +667,15 @@ class ListTile extends StatelessWidget {
667
667
}
668
668
669
669
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);
672
672
return _isDenseLayout (theme, tileTheme)
673
673
? textStyle.copyWith (color: color, fontSize: 12.0 )
674
674
: textStyle.copyWith (color: color);
675
675
}
676
676
677
677
TextStyle _trailingAndLeadingTextStyle (ThemeData theme, ListTileThemeData tileTheme) {
678
- final TextStyle textStyle = theme.textTheme.bodyMedium ! ;
678
+ final TextStyle textStyle = theme.textTheme.bodyText2 ! ;
679
679
final Color ? color = _textColor (theme, tileTheme, textStyle.color);
680
680
return textStyle.copyWith (color: color);
681
681
}
0 commit comments