ImagePreviewCarousel class
A widget that displays a carousel of images and videos with a synchronized thumbnail gallery.
The carousel supports:
- Mixing images and videos.
- Auto-scrolling (optional implementation).
- Thumbnail navigation.
- Customizing dimensions and styling.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ImagePreviewCarousel
Constructors
-
ImagePreviewCarousel({Key? key, required List<
CarouselItem> items, double carouselHeight = 300.0, double thumbnailHeight = 80.0, EdgeInsetsGeometry thumbnailPadding = const EdgeInsets.symmetric(horizontal: 4.0), int initialIndex = 0, Color selectedThumbnailBorderColor = Colors.blue, double selectedThumbnailBorderWidth = 2.0, IconData videoIndicatorIcon = Icons.videocam, Color videoIndicatorColor = Colors.white, Color arrowColor = Colors.white, double arrowSize = 30.0, double? maxHeight}) -
const
Properties
- arrowColor → Color
-
Color of the navigation arrows.
final
- arrowSize → double
-
Size of the navigation arrows.
final
- carouselHeight → double
-
The height of the main carousel area.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialIndex → int
-
The initial index to display.
final
-
items
→ List<
CarouselItem> -
The list of items (images/videos) to display in the carousel and thumbnail gallery.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- maxHeight → double?
-
Maximum allowed height for the entire widget. If null, it calculates based on constraints.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedThumbnailBorderColor → Color
-
Color for the border of the selected thumbnail.
final
- selectedThumbnailBorderWidth → double
-
Width of the border for the selected thumbnail.
final
- thumbnailHeight → double
-
The height of the thumbnail gallery.
final
- thumbnailPadding → EdgeInsetsGeometry
-
The padding around each thumbnail.
final
- videoIndicatorColor → Color
-
Color of the video indicator icon.
final
- videoIndicatorIcon → IconData
-
Icon to display on video thumbnails.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ImagePreviewCarousel> -
Creates the mutable state for this widget at a given location in the tree.
override
-
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