Carousel class
A widget that displays a carousel of images with a preview and page indicator.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- Carousel
Constructors
-
Carousel({Key? key, required List<
Map> images, Color? backgroundColor, Color? currentPageIndicatorColor, double mainHeight = 420.0, double previewHeight = 60.0, double radius = 16, double previewRadius = 16, double padding = 8, double previewPadding = 8, double currentPageIndicatorRadius = 2.0, double currentPageIndicatorPadding = 1, int? duration, Curve? curve}) -
A widget that displays a carousel of images with a preview and page indicator.
const
Properties
- backgroundColor → Color?
-
The background color of the carousel.
final
- currentPageIndicatorColor → Color?
-
The color of the current page indicator.
final
- currentPageIndicatorPadding → double
-
The padding inside the current page indicator.
final
- currentPageIndicatorRadius → double
-
The radius of the current page indicator corners.
final
- curve → Curve?
-
The curve of the page transition animation.
final
- duration → int?
-
The duration of the page transition in seconds.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
images
→ List<
Map> -
A list of maps containing image data.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- mainHeight → double
-
The height of the main carousel.
final
- padding → double
-
The padding inside the main carousel.
final
- previewHeight → double
-
The height of the preview carousel.
final
- previewPadding → double
-
The padding inside the preview carousel.
final
- previewRadius → double
-
The radius of the preview carousel corners.
final
- radius → double
-
The radius of the main carousel corners.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< Carousel> -
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}) → 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