Fix WidgetStateTextStyle's doc (#151935)

Fixes #151710
This commit is contained in:
croro613 2024-07-19 04:43:05 +09:00 committed by GitHub
parent b5030df77c
commit 4590600365
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -598,17 +598,15 @@ abstract class WidgetStateOutlinedBorder extends OutlinedBorder implements Widge
/// To use a [WidgetStateTextStyle], you can either:
/// 1. Create a subclass of [WidgetStateTextStyle] and implement the abstract `resolve` method.
/// 2. Use [WidgetStateTextStyle.resolveWith] and pass in a callback that
/// will be used to resolve the color in the given states.
/// will be used to resolve the text style in the given states.
/// 3. Use [WidgetStateTextStyle.fromMap] to assign a style using a [WidgetStateMap].
///
/// If a [WidgetStateTextStyle] is used for a property or a parameter that doesn't
/// support resolving [WidgetStateProperty<TextStyle>]s, then its default color
/// support resolving [WidgetStateProperty<TextStyle>]s, then its default text style
/// value will be used for all states.
///
/// To define a `const` [WidgetStateTextStyle], you'll need to extend
/// [WidgetStateTextStyle] and override its [resolve] method. You'll also need
/// to provide a `defaultValue` to the super constructor, so that we can know
/// at compile-time what its default color is.
/// [WidgetStateTextStyle] and override its [resolve] method.
/// See also:
///
/// * [MaterialStateTextStyle], the Material specific version of