ControlButtonsComponentOptions class
ControlButtonsComponentOptions
- Configuration options for the ControlButtonsComponent
.
This class defines the layout, alignment, and appearance of a collection of ControlButton
widgets,
allowing flexible and customizable control button arrangements.
Properties:
buttons
(List<ControlButton>
): List ofControlButton
instances to display in the component.alignment
(MainAxisAlignment
): Alignment of buttons within the component. Defaults toMainAxisAlignment.start
.vertical
(bool
): Iftrue
, arranges buttons vertically; otherwise, horizontally. Defaults tofalse
.buttonBackgroundColor
(Color?
): Background color for active buttons.buttonsContainerConstraints
(BoxConstraints?
): Constraints on the container holding the buttons.
Example Usage:
ControlButtonsComponentOptions(
buttons: [
ControlButton(
name: "Play",
icon: Icons.play_arrow,
onPress: () => print("Play button pressed"),
),
ControlButton(
name: "Pause",
icon: Icons.pause,
onPress: () => print("Pause button pressed"),
active: true,
),
],
alignment: MainAxisAlignment.center,
vertical: false,
buttonBackgroundColor: Colors.blue,
);
Constructors
-
ControlButtonsComponentOptions({required List<
ControlButton> buttons, MainAxisAlignment alignment = MainAxisAlignment.start, bool vertical = false, Color? buttonBackgroundColor, BoxConstraints? buttonsContainerConstraints})
Properties
- alignment → MainAxisAlignment
-
final
-
final
-
final
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- vertical → bool
-
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