LumenCarousel class
PageView with rounded cards, the current page highlighted and a
LumenPageIndicator below.
For galleries and onboarding.
LumenCarousel(
itemCount: photos.length,
itemBuilder: (BuildContext context, int i) =>
Image.network(photos[i], fit: BoxFit.cover),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- LumenCarousel
Constructors
-
LumenCarousel({required int itemCount, required IndexedWidgetBuilder itemBuilder, Key? key, PageController? controller, double height = 200, double viewportFraction = 0.88, ValueChanged<
int> ? onPageChanged, bool showIndicator = true, Color? accentColor, double radius = 18, double inactiveScale = 0.92}) -
Create the carousel.
const
Properties
- accentColor → Color?
-
Accent override.
final
- controller → PageController?
-
External controller.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
Page height (the indicator is below).
final
- inactiveScale → double
-
Scale of pages out of focus.
final
- itemBuilder → IndexedWidgetBuilder
-
Builds the content of the
indexpage.final - itemCount → int
-
Number of pages.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
onPageChanged
→ ValueChanged<
int> ? -
Called when the current page changes.
final
- radius → double
-
Radius of page corners.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showIndicator → bool
-
Whether to show LumenPageIndicator below a carousel with multiple pages.
final
- viewportFraction → double
-
Fraction of width occupied per page when there is no controller (below 1
leaves the neighbors appearing).
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< LumenCarousel> -
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