ButtonState class
Constructors
- ButtonState({required String stateName, Widget child = const SizedBox(), VoidCallback? onPressed, Size? size, Color color = Colors.blue, BoxDecoration? decoration, AlignmentGeometry alignment = Alignment.center, TextStyle? textStyle, Matrix4? transform, Clip clipBehavior = Clip.none, Decoration? foregroundDecoration, VoidCallback? onAnimationEnd, AlignmentGeometry? transformAlignment})
-
Note: For better text transition between states,pass textStyle into ButtonState.textStyle property.
const
Properties
- alignment → AlignmentGeometry
-
Used to align the child.
Defaults to Alignment.center
final
- child → Widget
-
final
- clipBehavior → Clip
-
The clip behavior when decoration is not null.
final
- color → Color
-
Color of the button.
This should be null if boxDecoration is not null.
final
- decoration → BoxDecoration?
-
Decorate the button with color, border radius, box shadow, gradient etc...
final
- foregroundDecoration → Decoration?
-
The decoration to paint in front of the child.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- onAnimationEnd → VoidCallback?
-
SubRoutine to run on transition animation ends.
final
- onPressed → VoidCallback?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → Size?
-
Size of the button
final
- stateName → String
-
This is the name used to identify the state of the button.
This name is used to change the state using MultiStateButtonController
final
- textStyle → TextStyle?
-
If descendant of the button is a Text child, this textStle is used to enable transition animtation between two states.
final
- transform → Matrix4?
-
The transformation matrix to apply before painting the button.
final
- transformAlignment → AlignmentGeometry?
-
The alignment of the child, relative to the size of the button, if transform is specified.
When transform is null, the value of this property is ignored.
final
Methods
-
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