ButtonStylePropertyAll<T> class

A button state property delegate that always returns the same value.

ButtonStylePropertyAll implements a ButtonStatePropertyDelegate that ignores the context, states, and default value parameters, always returning its stored value. This is useful for creating static style properties that don't change based on button state.

Example:

final alwaysRedDecoration = ButtonStylePropertyAll<Decoration>(
  BoxDecoration(color: Colors.red),
);

Constructors

ButtonStylePropertyAll(T value)
Creates a ButtonStylePropertyAll with the specified constant value.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → T
The constant value to return regardless of state.
final

Methods

call(BuildContext context, Set<WidgetState> states, T value) → T
Returns the stored value, ignoring all parameters.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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