CircularList3D class
A carousel that arranges its items on a circular ring in 3-D space.
Items are distributed evenly around the ring. As the list rotates, perspective scaling and opacity make items closer to the viewer appear larger and more opaque than items in the back.
Rotation can be driven by horizontal drag or by enabling autoRotate.
Usage
CircularList3D(
itemCount: 8,
itemBuilder: (ctx, index) => MyCard(items[index]),
radius: 200,
tiltAngle: 0.4,
autoRotate: true,
rotationSpeed: 0.25,
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CircularList3D
Constructors
- CircularList3D({Key? key, required int itemCount, required IndexedWidgetBuilder itemBuilder, double radius = 180, double tiltAngle = 0.3, double perspective = 0.001, bool autoRotate = false, double rotationSpeed = 0.25, RotationDirection rotationDirection = RotationDirection.clockwise, bool snapOnRelease = false})
-
const
Properties
- autoRotate → bool
-
Whether the ring spins automatically.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- itemBuilder → IndexedWidgetBuilder
-
final
- itemCount → int
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- perspective → double
-
Perspective coefficient applied to each item's Transform.
final
- radius → double
-
Ring radius in logical pixels.
final
- rotationDirection → RotationDirection
-
Direction of auto-rotation.
final
- rotationSpeed → double
-
Auto-rotation speed in full rotations per second.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- snapOnRelease → bool
-
Whether to snap to the nearest item after a drag ends.
final
- tiltAngle → double
-
Tilt of the ring toward the viewer (radians).
0= ring lies flat (all items at same Y);pi/2= ring stands vertical.final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CircularList3D> -
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