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 of ControlButton instances to display in the component.
  • alignment (MainAxisAlignment): Alignment of buttons within the component. Defaults to MainAxisAlignment.start.
  • vertical (bool): If true, arranges buttons vertically; otherwise, horizontally. Defaults to false.
  • 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
buttonBackgroundColor Color?
final
buttons List<ControlButton>
final
buttonsContainerConstraints BoxConstraints?
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