AdaptiveGallery class
A showcase surface that pages through rich previews on compact layouts and switches to a spotlight view with a selector list on larger containers.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- AdaptiveGallery
Constructors
-
AdaptiveGallery({Key? key, required List<
AdaptiveGalleryItem> items, AdaptiveSize spotlightAt = AdaptiveSize.medium, AdaptiveHeight minimumSpotlightHeight = AdaptiveHeight.compact, bool useContainerConstraints = true, bool considerOrientation = false, double selectorWidth = 240, int previewFlex = 3, double spacing = 16, double previewSpacing = 16, double selectorItemSpacing = 12, double compactHeight = 380, double compactViewportFraction = 0.92, double pageSpacing = 16, EdgeInsetsGeometry cardPadding = const EdgeInsets.all(16), int initialIndex = 0, ValueChanged<int> ? onSelectedIndexChanged, bool showPageIndicator = true, bool animateTransitions = true, Duration transitionDuration = const Duration(milliseconds: 250), Curve transitionCurve = Curves.easeInOutCubic}) -
Creates an adaptive gallery surface.
const
Properties
- animateTransitions → bool
-
Whether transitions should animate.
final
- cardPadding → EdgeInsetsGeometry
-
Padding applied inside cards and the selector surface.
final
- compactHeight → double
-
Fixed height used by the compact carousel.
final
- compactViewportFraction → double
-
Fraction of the viewport occupied by each compact page.
final
- considerOrientation → bool
-
Whether orientation should influence container-based breakpoint selection.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialIndex → int
-
Initial selected index when the widget is first built.
final
-
items
→ List<
AdaptiveGalleryItem> -
Items shown by the gallery.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- minimumSpotlightHeight → AdaptiveHeight
-
Minimum height class required before the view can switch to spotlight
mode.
final
-
onSelectedIndexChanged
→ ValueChanged<
int> ? -
Called when the active item changes.
final
- pageSpacing → double
-
Space between compact pages and below the pager.
final
- previewFlex → int
-
Flex used by the spotlight card when both regions are visible.
final
- previewSpacing → double
-
Space between the preview and details inside the gallery card.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectorItemSpacing → double
-
Space between selector rows.
final
- selectorWidth → double
-
Width used by the selector list in spotlight mode.
final
- showPageIndicator → bool
-
Whether compact mode should show a page indicator.
final
- spacing → double
-
Space between the spotlight card and selector list.
final
- spotlightAt → AdaptiveSize
-
Semantic size at which the view should switch to spotlight mode.
final
- transitionCurve → Curve
-
Curve used by animations.
final
- transitionDuration → Duration
-
Duration used by animations.
final
- useContainerConstraints → bool
-
Whether to derive the active mode from parent constraints.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< AdaptiveGallery> -
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