AnimatedGridView<E extends Object> class

enterTransition: FadeEffect(), ScaleEffect(),

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.

A Flutter AnimatedGridView that animates insertion and removal of the item.

Inheritance

Constructors

AnimatedGridView({Key? key, required List<E> items, required ItemBuilder<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})
const

Properties

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
enterTransition List<AnimationEffect>?
List of AnimationEffect used for the appearing animation when item is added in the list.
final
exitTransition List<AnimationEffect>?
List of AnimationEffect used for the disappearing animation when item is removed from list.
final
hashCode int
The hash code for this object.
no setterinherited
insertDuration Duration?
The duration of the animation when an item was inserted into the list.
final
insertItemBuilder → AnimatedWidgetBuilder<Widget, dynamic>?
A custom builder that is for adding items with animations.
final
itemBuilder → ItemBuilder<Widget, E>
Called, as needed, to build list item widget
final
items List<E>
The current list of items that thisMotionGridViewBuilder should represent.
final
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
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
removeDuration Duration?
The duration of the animation when an item was 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
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
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

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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