TsaiButtonTheme class final

Optional global style overrides for TsaiButton variants.

Install this extension alongside TsaiThemeTokens in ThemeData.extensions. Non-null properties in each ButtonStyle override the design-system defaults.

Inheritance
Annotations

Constructors

TsaiButtonTheme({ButtonStyle? primary, ButtonStyle? secondary, ButtonStyle? outline, ButtonStyle? ghost})
Creates button style overrides.
const

Properties

ghost ButtonStyle?
Overrides for ghost buttons.
final
hashCode int
The hash code for this object.
no setterinherited
outline ButtonStyle?
Overrides for outline buttons.
final
primary ButtonStyle?
Overrides for primary buttons.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secondary ButtonStyle?
Overrides for secondary buttons.
final
type Object
The extension's type.
no setterinherited

Methods

copyWith({ButtonStyle? primary, ButtonStyle? secondary, ButtonStyle? outline, ButtonStyle? ghost}) TsaiButtonTheme
Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.
override
lerp(covariant TsaiButtonTheme? other, double t) TsaiButtonTheme
Linearly interpolate with another ThemeExtension object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

of(BuildContext context) TsaiButtonTheme
Returns the nearest button theme or an empty theme.