AnimatedGridView<E extends Object> class
A Flutter AnimatedGridView that animates insertion and removal of the item.
enterTransition: [FadeIn(), ScaleIn()],
Effects are always run in parallel (ie. the fade and scale effects in the example above would be run simultaneously), but you can apply delays to offset them or run them in sequence.
/// All list items must have a key.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- AnimatedGridView
- Available extensions
Constructors
-
AnimatedGridView.new({Key? key, required List<
E> items, required ReorderableItemBuilder<Widget, E> itemBuilder, required SliverGridDelegate sliverGridDelegate, List<AnimationEffect> ? enterTransition, List<AnimationEffect> ? exitTransition, Duration? insertDuration, Duration? removeDuration, EdgeInsetsGeometry? padding, Axis scrollDirection = Axis.vertical, bool reverse = false, ScrollController? controller, bool? primary, ScrollPhysics? physics, ScrollBehavior? scrollBehavior, String? restorationId, ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual, DragStartBehavior dragStartBehavior = DragStartBehavior.start, Clip clipBehavior = Clip.hardEdge, AnimatedWidgetBuilder<Widget, dynamic> ? insertItemBuilder, AnimatedWidgetBuilder<Widget, dynamic> ? removeItemBuilder, bool shrinkWrap = false, required bool isSameItem(E a, E b), bool enableSwap = true}) -
Creates a AnimatedGridView that animates insertion and removal of the item.
const
Properties
- asBuilder → NeverWidgetBuilder
-
Available on Widget, provided by the WidgetExtension extension
no setter - asSliver → Widget
-
Available on Widget, provided by the XWidgetArcane extension
no setter - ast → Widget
-
Available on Widget, provided by the XAST extension
no setter - base → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - black → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - blockQuote → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - blurIn → Widget
-
Available on Widget, provided by the XWidgetEffect extension
no setter - bold → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - centered → Widget
-
Available on Widget, provided by the XWidget extension
no setter - clipBehavior → Clip
-
Defaults to Clip.hardEdge.
final
- controller → ScrollController?
-
ScrollController to get the current scroll position.
final
- dragStartBehavior → DragStartBehavior
-
Creates a ScrollView that creates custom scroll effects using slivers.
See the ScrollView constructor for more details on these arguments.
final
- ellipsis → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - enableSwap → bool
-
Whether to enable swap animation when changing the order of the items.
final
-
enterTransition
→ List<
AnimationEffect> ? -
A list of AnimationEffect used for the appearing animation when an item is added to the list.
final
-
exitTransition
→ List<
AnimationEffect> ? -
A list of AnimationEffect used for the disappearing animation when an item was removed from the list.
final
- expand → Widget
-
Available on Widget, provided by the XWidget extension
no setter - extraBold → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - extraLight → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - firstP → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - flexible → Widget
-
Available on Widget, provided by the XWidget extension
no setter - foreground → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - h1 → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - h2 → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - h3 → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - h4 → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- ih → Widget
-
Available on Widget, provided by the XWidgetArcane extension
no setter - inlineCode → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - insertDuration → Duration?
-
The duration of the animation when an item is inserted into the list.
final
-
insertItemBuilder
→ AnimatedWidgetBuilder<
Widget, dynamic> ? -
A custom builder that is for adding items with animations.
final
- intrinsicHeight → Widget
-
Available on Widget, provided by the XWidget extension
no setter - intrinsicSize → Widget
-
Available on Widget, provided by the XWidget extension
no setter - intrinsicWidth → Widget
-
Available on Widget, provided by the XWidget extension
no setter - isSameItem → bool Function(E a, E b)
-
A callback function to determine if two items in the list are considered the same.
final
- italic → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter -
itemBuilder
→ ReorderableItemBuilder<
Widget, E> -
Called, as needed, to build list item widgets.
final
-
items
→ List<
E> -
The current list of items that thisAnimatedGridView should represent.
final
- iw → Widget
-
Available on Widget, provided by the XWidgetArcane extension
no setter - key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- keyboardDismissBehavior → ScrollViewKeyboardDismissBehavior
-
ScrollViewKeyboardDismissBehavior the defines how this ScrollView will
dismiss the keyboard automatically.
final
- large → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - lead → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - li → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - light → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - medium → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - modify → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - mono → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - muted → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - normal → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - p → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - padding → EdgeInsetsGeometry?
-
The amount of space by which to inset the list contents.
final
- physics → ScrollPhysics?
-
How the scroll view should respond to user input.
final
- primary → bool?
-
When this is true, the scroll view is scrollable even if it does not have
sufficient content to actually scroll. Otherwise, by default the user can
only scroll the view if it has sufficient content. See physics.
final
- primaryForeground → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - removeDuration → Duration?
-
The duration of the animation when an item is removed from the list.
final
-
removeItemBuilder
→ AnimatedWidgetBuilder<
Widget, dynamic> ? -
A custom builder that is for removing items with animations.
final
- restorationId → String?
-
Creates a ScrollView that creates custom scroll effects using slivers.
See the ScrollView constructor for more details on these arguments.
final
- reverse → bool
-
Whether the scroll view scrolls in the reading direction.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- safeArea → Widget
-
Available on Widget, provided by the XWidget extension
no setter - sans → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - scrollable → Widget
-
Available on Widget, provided by the XWidget extension
no setter - scrollableHorizontal → Widget
-
Available on Widget, provided by the XWidget extension
no setter - scrollBehavior → ScrollBehavior?
-
ScrollBehaviors also provide ScrollPhysics. If an explicit
ScrollPhysics is provided in physics, it will take precedence,
followed by scrollBehavior, and then the inherited ancestor
ScrollBehavior.
final
- scrollDirection → Axis
-
The axis along which the scroll view scrolls.
final
- secondaryForeground → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - semiBold → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - shrinkWrap → bool
-
Whether the extent of the scroll view in the scrollDirection should be determined by the contents being viewed.
final
- singleLine → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - sliverGridDelegate → SliverGridDelegate
-
Controls the layout of tiles in a grid.
Given the current constraints on the grid,
a SliverGridDelegate computes the layout for the tiles in the grid.
The tiles can be placed arbitrarily,
but it is more efficient to place tiles in roughly in order by scroll offset because grids reify a contiguous sequence of children.
final
- small → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - textCenter → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - textEnd → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - textJustify → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - textLarge → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - textLeft → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - textMuted → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - textRight → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - textSmall → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - textStart → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - thin → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - underline → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - x2Large → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - x3Large → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - x4Large → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - x5Large → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - x6Large → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - x7Large → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - x8Large → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - x9Large → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - xLarge → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter - xSmall → TextModifier
-
Available on Widget, provided by the TextExtension extension
no setter
Methods
-
animate(
{Key? key, List< Effect> ? effects, AnimateCallback? onInit, AnimateCallback? onPlay, AnimateCallback? onComplete, bool? autoPlay, Duration? delay, AnimationController? controller, Adapter? adapter, double? target, double? value}) → Animate -
Available on Widget, provided by the AnimateWidgetExtensions extension
Wraps the target Widget in an Animate instance, and returns the instance for chaining calls. Ex.myWidget.animate()
is equivalent toAnimate(child: myWidget)
. -
asSkeleton(
{bool enabled = true, bool leaf = false, Widget? replacement, bool unite = false, AsyncSnapshot? snapshot}) → Widget -
Available on Widget, provided by the SkeletonExtension extension
-
asSkeletonSliver(
{bool enabled = true}) → Widget -
Available on Widget, provided by the SkeletonExtension extension
-
center(
{Key? key}) → Widget -
Available on Widget, provided by the WidgetExtension extension
-
clip(
{Clip clipBehavior = Clip.hardEdge}) → Widget -
Available on Widget, provided by the WidgetExtension extension
-
clipOval(
{Clip clipBehavior = Clip.antiAlias}) → Widget -
Available on Widget, provided by the WidgetExtension extension
-
clipPath(
{Clip clipBehavior = Clip.antiAlias, required CustomClipper< Path> clipper}) → Widget -
Available on Widget, provided by the WidgetExtension extension
-
clipRRect(
{BorderRadiusGeometry borderRadius = BorderRadius.zero, Clip clipBehavior = Clip.antiAlias}) → Widget -
Available on Widget, provided by the WidgetExtension extension
-
constrained(
{double? minWidth, double? maxWidth, double? minHeight, double? maxHeight, double? width, double? height}) → Widget -
Available on Widget, provided by the WidgetExtension extension
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< AnimatedGridView< E> > -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugContainer(
[Color color = Colors.red]) → Widget -
Available on Widget, provided by the DebugContainer extension
-
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
-
excludeSkeleton(
{bool exclude = true}) → Widget -
Available on Widget, provided by the SkeletonExtension extension
-
expanded(
{int flex = 1}) → Widget -
Available on Widget, provided by the WidgetExtension extension
-
iconDestructiveForeground(
) → Widget -
Available on Widget, provided by the IconExtension extension
-
iconLarge(
) → Widget -
Available on Widget, provided by the IconExtension extension
-
iconMedium(
) → Widget -
Available on Widget, provided by the IconExtension extension
-
iconMutedForeground(
) → Widget -
Available on Widget, provided by the IconExtension extension
-
iconPrimary(
) → Widget -
Available on Widget, provided by the IconExtension extension
-
iconPrimaryForeground(
) → Widget -
Available on Widget, provided by the IconExtension extension
-
iconSecondary(
) → Widget -
Available on Widget, provided by the IconExtension extension
-
iconSecondaryForeground(
) → Widget -
Available on Widget, provided by the IconExtension extension
-
iconSmall(
) → Widget -
Available on Widget, provided by the IconExtension extension
-
iconX2Large(
) → Widget -
Available on Widget, provided by the IconExtension extension
-
iconX2Small(
) → Widget -
Available on Widget, provided by the IconExtension extension
-
iconX3Large(
) → Widget -
Available on Widget, provided by the IconExtension extension
-
iconX3Small(
) → Widget -
Available on Widget, provided by the IconExtension extension
-
iconX4Large(
) → Widget -
Available on Widget, provided by the IconExtension extension
-
iconX4Small(
) → Widget -
Available on Widget, provided by the IconExtension extension
-
iconXLarge(
) → Widget -
Available on Widget, provided by the IconExtension extension
-
iconXSmall(
) → Widget -
Available on Widget, provided by the IconExtension extension
-
ignoreSkeleton(
) → Widget -
Available on Widget, provided by the SkeletonExtension extension
-
intrinsic(
{double? stepWidth, double? stepHeight}) → Widget -
Available on Widget, provided by the WidgetExtension extension
-
intrinsicHeight(
) → Widget -
Available on Widget, provided by the WidgetExtension extension
-
intrinsicWidth(
{double? stepWidth, double? stepHeight}) → Widget -
Available on Widget, provided by the WidgetExtension extension
-
isSliver(
BuildContext context) → bool -
Available on Widget, provided by the XSliverWidget extension
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDoublePressed(
VoidCallback action, {HitTestBehavior? behavior, Set< PointerDeviceKind> ? supportedDevices}) → Widget -
Available on Widget, provided by the XOnGestureWidget extension
Adds a handler for double press/tap gestures. -
onHover(
void action(bool hovering)) → Widget -
Available on Widget, provided by the XOnGestureWidget extension
Adds a handler for hover events. -
onLongPressed(
VoidCallback action, {HitTestBehavior? behavior, Set< PointerDeviceKind> ? supportedDevices}) → Widget -
Available on Widget, provided by the XOnGestureWidget extension
Adds a handler for long press gestures with the primary button. -
onLongSecondaryPressed(
VoidCallback action, {HitTestBehavior? behavior, Set< PointerDeviceKind> ? supportedDevices}) → Widget -
Available on Widget, provided by the XOnGestureWidget extension
Adds a handler for long press gestures with the secondary button. -
onLongTertiaryPressed(
VoidCallback action, {HitTestBehavior? behavior, Set< PointerDeviceKind> ? supportedDevices}) → Widget -
Available on Widget, provided by the XOnGestureWidget extension
Adds a handler for long press gestures with the tertiary button. -
onPressed(
VoidCallback action, {HitTestBehavior? behavior, Set< PointerDeviceKind> ? supportedDevices}) → Widget -
Available on Widget, provided by the XOnGestureWidget extension
Adds a handler for primary press/tap gestures (equivalent to onTap). -
onSecondaryPressed(
VoidCallback action, {HitTestBehavior? behavior, Set< PointerDeviceKind> ? supportedDevices}) → Widget -
Available on Widget, provided by the XOnGestureWidget extension
Adds a handler for secondary press gestures (equivalent to right-click). -
onTertiaryPressed(
VoidCallback action, {HitTestBehavior? behavior, Set< PointerDeviceKind> ? supportedDevices}) → Widget -
Available on Widget, provided by the XOnGestureWidget extension
Adds a handler for tertiary press gestures (equivalent to middle-click). -
pad(
double all) → Widget -
padBottom(
double value) → Widget -
padLeft(
double value) → Widget -
padOnly(
{double left = 0, double top = 0, double right = 0, double bottom = 0}) → Widget -
padRight(
double value) → Widget -
padTop(
double value) → Widget -
positioned(
{Key? key, double? left, double? top, double? right, double? bottom}) → Widget -
Available on Widget, provided by the WidgetExtension extension
-
shadeEdge(
double radius) → Widget -
Available on Widget, provided by the XWidgetEdge extension
-
shadeFrost(
double value) → Widget -
Available on Widget, provided by the XWidgetFrost extension
-
shadeInvert(
) → Widget -
Available on Widget, provided by the XWidgetInvert extension
-
shadePixelate(
double radius) → Widget -
Available on Widget, provided by the XWidgetPixelate extension
-
shadePixelateBlur(
{int samples = 4, double pixelSize = 8, double radius = 2}) → Widget -
Available on Widget, provided by the XWidgetPixelateBlur extension
-
shadeRGB(
{double radius = 5, double spin = 1}) → Widget -
Available on Widget, provided by the XWidgetRGB extension
-
shadeWarp(
{double amplitude = 1, double frequency = 1, double z = 1, int octaves = 2}) → Widget -
Available on Widget, provided by the XWidgetWarp extension
-
shadeWarpAnimation(
{double amplitude = 1, double frequency = 1, double z = 1, double zSpeed = 1, int octaves = 2}) → Widget -
Available on Widget, provided by the XWidgetWarp extension
-
shimmer(
{bool loading = true}) → Widget -
Available on Widget, provided by the XWidgetArcane extension
-
sized(
{double? width, double? height}) → Widget -
Available on Widget, provided by the WidgetExtension extension
-
sized(
{double? width, double? height}) → Widget -
then(
InlineSpan span) → Widget -
Available on Widget, provided by the TextExtension extension
-
thenButton(
{required VoidCallback onPressed, required Widget child}) → Widget -
Available on Widget, provided by the TextExtension extension
-
thenInlineCode(
String text) → Widget -
Available on Widget, provided by the TextExtension extension
-
thenText(
String text) → Widget -
Available on Widget, provided by the TextExtension extension
-
toBox(
BuildContext context, {bool softWarn = true}) → Widget -
Available on Widget, provided by the XSliverWidget extension
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toSliver(
BuildContext context, {bool fillRemaining = false, bool softWarn = true}) → Widget -
Available on Widget, provided by the XSliverWidget extension
-
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
-
transform(
{Key? key, required Matrix4 transform}) → Widget -
Available on Widget, provided by the WidgetExtension extension
-
withAlign(
AlignmentGeometry alignment) → Widget -
Available on Widget, provided by the WidgetExtension extension
-
withMargin(
{double? top, double? bottom, double? left, double? right, double? horizontal, double? vertical, double? all}) → Widget -
Available on Widget, provided by the WidgetExtension extension
-
withOpacity(
double opacity) → Widget -
Available on Widget, provided by the WidgetExtension extension
-
withPadding(
{double? top, double? bottom, double? left, double? right, double? horizontal, double? vertical, double? all, EdgeInsetsGeometry? padding}) → Widget -
Available on Widget, provided by the WidgetExtension extension
-
withTooltip(
String tooltip) → Widget -
Available on Widget, provided by the XWidgetArcane extension
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
maybeOf(
BuildContext context) → AnimatedGridViewState< Object> ? - The state from the closest instance of this class that encloses the given context.
-
of(
BuildContext context) → AnimatedGridViewState< Object> - The state from the closest instance of this class that encloses the given context.