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.new({required List<ControlButton> buttons, MainAxisAlignment alignment = MainAxisAlignment.start, bool vertical = false, Color? buttonBackgroundColor, BoxConstraints? buttonsContainerConstraints, ControlButtonStateColors? buttonBackgroundColors, Color? buttonColor, Color? activeIconColor, Color? inactiveIconColor, double? iconSize, TextStyle? textStyle, EdgeInsetsGeometry? containerPadding, EdgeInsetsGeometry? containerMargin, Decoration? containerDecoration, AlignmentGeometry? containerAlignment, Clip containerClipBehavior = Clip.none, EdgeInsetsGeometry? buttonPadding, EdgeInsetsGeometry? buttonMargin, BoxDecoration? buttonDecoration, BorderRadiusGeometry? buttonBorderRadius, BoxConstraints? buttonConstraints, EdgeInsetsGeometry? contentPadding, MainAxisAlignment? contentMainAxisAlignment, CrossAxisAlignment? contentCrossAxisAlignment, double? contentGap, Widget? alternateIconComponent, EdgeInsetsGeometry? labelPadding, EdgeInsetsGeometry? iconPadding, ControlButtonsContainerBuilder? containerBuilder, ControlButtonsButtonsBuilder? buttonsBuilder, ControlButtonsButtonBuilder? buttonBuilder, ControlButtonsButtonContentBuilder? buttonContentBuilder, ControlButtonsButtonIconBuilder? iconBuilder, ControlButtonsButtonLabelBuilder? labelBuilder, double? gap})
Configuration for the control-buttons component displaying a horizontal/vertical action bar.
const

Properties

activeIconColor Color?
final
alignment MainAxisAlignment
final
alternateIconComponent Widget?
final
buttonBackgroundColor Color?
final
buttonBackgroundColors ControlButtonStateColors?
final
buttonBorderRadius BorderRadiusGeometry?
final
buttonBuilder ControlButtonsButtonBuilder?
final
buttonColor Color?
final
buttonConstraints BoxConstraints?
final
buttonContentBuilder ControlButtonsButtonContentBuilder?
final
buttonDecoration BoxDecoration?
final
buttonMargin EdgeInsetsGeometry?
final
buttonPadding EdgeInsetsGeometry?
final
buttons List<ControlButton>
final
buttonsBuilder ControlButtonsButtonsBuilder?
final
buttonsContainerConstraints BoxConstraints?
final
containerAlignment AlignmentGeometry?
final
containerBuilder ControlButtonsContainerBuilder?
final
containerClipBehavior Clip
final
containerDecoration Decoration?
final
containerMargin EdgeInsetsGeometry?
final
containerPadding EdgeInsetsGeometry?
final
contentCrossAxisAlignment CrossAxisAlignment?
final
contentGap double?
final
contentMainAxisAlignment MainAxisAlignment?
final
contentPadding EdgeInsetsGeometry?
final
gap double?
final
hashCode int
The hash code for this object.
no setterinherited
iconBuilder ControlButtonsButtonIconBuilder?
final
iconPadding EdgeInsetsGeometry?
final
iconSize double?
final
inactiveIconColor Color?
final
labelBuilder ControlButtonsButtonLabelBuilder?
final
labelPadding EdgeInsetsGeometry?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textStyle TextStyle?
final
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