CarouselControl class

A carousel navigation overlay control bar for switching between slides.

Figma Specifications (Node 811:11843 - .CarouselControl):

  • Layout: Horizontal bar, padding: EdgeInsets.symmetric(horizontal: 24), MainAxisAlignment.spaceBetween.
  • Variants:
    • Position=Start (811:11844): Left button hidden (opacity: 0), Right button visible.
    • Position=Middle (811:11847): Left button visible, Right button visible.
    • Position=End (811:11850): Left button visible, Right button hidden (opacity: 0).
  • Buttons:
    • Reuses ButtonIcon (130:8371, ButtonIconType.white, 48x48px, 20px radius, 1px border).
    • Icons: chevron_left and chevron_right (28x28px glyph size).
Inheritance

Constructors

CarouselControl({Key? key, CarouselControlPosition position = CarouselControlPosition.middle, VoidCallback? onPrevious, VoidCallback? onNext, bool? canPrevious, bool? canNext, EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 24.0)})
Creates a CarouselControl instance.
const
CarouselControl.end({Key? key, VoidCallback? onPrevious, EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 24.0)})
Convenience constructor for carousel at the end position.
const
CarouselControl.middle({Key? key, VoidCallback? onPrevious, VoidCallback? onNext, EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 24.0)})
Convenience constructor for carousel at the middle position.
const
CarouselControl.start({Key? key, VoidCallback? onNext, EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 24.0)})
Convenience constructor for carousel at the start position.
const

Properties

canNext → bool?
Whether the next button is enabled/visible (overrides position if specified).
final
canPrevious → bool?
Whether the previous button is enabled/visible (overrides position if specified).
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onNext → VoidCallback?
Callback executed when the next slide button is tapped.
final
onPrevious → VoidCallback?
Callback executed when the previous slide button is tapped.
final
padding → EdgeInsetsGeometry
Outer padding of the control bar (defaults to 24px horizontal).
final
position → CarouselControlPosition
Navigation position state of the carousel.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

version → const String
Component version for reference. v1.0.1: Encapsulated internal ButtonIcon configurations strictly adhering to Figma Node 811:11843 without leaking child button properties. v1.0.0: Initial release matching Figma Node 811:11843 (.CarouselControl: Start, Middle, End variants).