Unverified Commit fd80503f authored by Ayush Bherwani's avatar Ayush Bherwani Committed by GitHub

[Api docs] Updates ListTile.subtitle docs to address how TextStyle is decided (#61071)

parent 6eaaf165
...@@ -687,6 +687,21 @@ class ListTile extends StatelessWidget { ...@@ -687,6 +687,21 @@ class ListTile extends StatelessWidget {
/// If [isThreeLine] is true, this should be configured to take a maximum of /// If [isThreeLine] is true, this should be configured to take a maximum of
/// two lines. For example, you can use [Text.maxLines] to enforce the number /// two lines. For example, you can use [Text.maxLines] to enforce the number
/// of lines. /// of lines.
///
/// The subtitle's default [TextStyle] depends on [TextTheme.bodyText2] except
/// [TextStyle.color]. The [TextStyle.color] depends on the value of [enabled]
/// and [selected].
///
/// When [enabled] is false, the text color is set to [ThemeData.disabledColor].
///
/// When [selected] is true, the text color is set to [ListTileTheme.selectedColor]
/// if it's not null. If [ListTileTheme.selectedColor] is null, the text color
/// is set to [ThemeData.primaryColor] when [ThemeData.brightness] is
/// [Brightness.light] and to [ThemeData.accentColor] when it is [Brightness.dark].
///
/// When [selected] is false, the text color is set to [ListTileTheme.textColor]
/// if it's not null and to [TextTheme.caption]'s color if [ListTileTheme.textColor]
/// is null.
final Widget subtitle; final Widget subtitle;
/// A widget to display after the title. /// A widget to display after the title.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment