ToggleButtonThemeData class
Defines the visual properties of Button.
Descendant widgets obtain the current ToggleButtonThemeData object using
ToggleButtonTheme.of(context)
. Instances of ToggleButtonThemeData
can be customized with ToggleButtonThemeData.copyWith or ToggleButtonThemeData.merge.
- Inheritance
-
- Object
- ThemeExtension<
ToggleButtonThemeData> - ToggleButtonThemeData
- Mixed in types
- Implementers
- Annotations
Constructors
- ToggleButtonThemeData({required Curve curve, required Duration duration, required ButtonStyle style, ButtonStyleByVariant variantStyle = const {}, ButtonStyleByVariant dangerStyle = const {}, ButtonStyleByVariant warningStyle = const {}, ButtonStyleByVariant successStyle = const {}, ButtonStyleByVariant infoStyle = const {}})
-
Creates a theme data that can be used for ToggleButtonTheme.
const
- ToggleButtonThemeData.defaults(BuildContext context)
-
A ToggleButtonThemeData with default values.
factory
- ToggleButtonThemeData.from([ToggleButtonThemeData? other])
- Creates a ToggleButtonThemeData from another one that probably null.
- ToggleButtonThemeData.ios(BuildContext context)
-
A ToggleButtonThemeData with ios default values.
factory
- ToggleButtonThemeData.m2(BuildContext context)
-
A ToggleButtonThemeData with material 2 default values.
factory
- ToggleButtonThemeData.m3(BuildContext context)
-
A ToggleButtonThemeData with material 3 default values.
factory
Properties
- curve → Curve
-
The curve to apply when animating the parameters of avatar widget.
final
- dangerStyle → ButtonStyleByVariant
-
The
ButtonStyle
to be applied to the sheet widget with danger severityfinal - duration → Duration
-
The duration over which to animate the parameters of button widget.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- infoStyle → ButtonStyleByVariant
-
The
ButtonStyle
to be applied to the sheet widget with info severityfinal - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
severityStyle
→ Map<
ButtonSeverity, ButtonStyleByVariant> -
The ButtonStyle to be applied to the sheet widget with severity
no setter
- style → ButtonStyle
-
The ButtonStyle to be applied to the button widget
final
- successStyle → ButtonStyleByVariant
-
The
ButtonStyle
to be applied to the sheet widget with success severityfinal - type → Object
-
The extension's type.
no setterinherited
- variantStyle → ButtonStyleByVariant
-
The
ButtonStyle
to be applied to the variant sheet widgetfinal - warningStyle → ButtonStyleByVariant
-
The
ButtonStyle
to be applied to the sheet widget with warning severityfinal
Methods
-
copyWith(
{Curve? curve, Duration? duration, ButtonStyle? style, ButtonStyleByVariant? variantStyle, ButtonStyleByVariant? dangerStyle, ButtonStyleByVariant? warningStyle, ButtonStyleByVariant? successStyle, ButtonStyleByVariant? infoStyle}) → ToggleButtonThemeData -
Creates a copy of this ToggleButtonThemeData but with
the given fields replaced with the new values.
override
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
lerp(
covariant ThemeExtension< ToggleButtonThemeData> ? other, double t) → ToggleButtonThemeData -
Linearly interpolate with another ThemeExtension object.
override
-
merge(
ToggleButtonThemeData? other) → ToggleButtonThemeData - Creates a copy of this ToggleButtonThemeData but with the given fields replaced with the new values.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
{ButtonVariant? variant, ButtonSeverity? severity}) → ButtonStyle -
Return ButtonStyle that depends on
variant
andseverity
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toMap(
) → Map< String, dynamic> -
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Constants
- fallback → const ToggleButtonThemeData
- Create a ToggleButtonThemeData with some reasonable default values.