HcDragAndDropView class

Inheritance
Available Extensions

Constructors

HcDragAndDropView({Key? key, bool reverse = false, Widget? header, ScrollController? controller, bool? primary, ScrollPhysics? physics, bool isCustomFeedback = false, bool isCustomChildWhenDragging = false, required WillAcceptCallback onWillAccept, required ReorderCallback onReorder, EdgeInsetsGeometry? padding, required SliverGridDelegate gridDelegate, required IndexedWidgetBuilder itemBuilder, int? itemCount, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, bool addSemanticIndexes = true, double? cacheExtent, int? semanticChildCount, DragStartBehavior dragStartBehavior = DragStartBehavior.start, ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual, WidgetPositionBuilder? feedback, WidgetPositionBuilder? childWhenDragging})
DragAndDropGridView has the all same parameters (except shrinkWrap and scrollDirection) that GridView.builder constructor
const
HcDragAndDropView.horizontal({Key? key, bool reverse = false, ScrollController? controller, bool? primary, ScrollPhysics? physics, bool isCustomFeedback = false, bool isCustomChildWhenDragging = false, required WillAcceptCallback onWillAccept, required ReorderCallback onReorder, EdgeInsetsGeometry? padding, required SliverGridDelegate gridDelegate, required IndexedWidgetBuilder itemBuilder, int? itemCount, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, bool addSemanticIndexes = true, double? cacheExtent, int? semanticChildCount, DragStartBehavior dragStartBehavior = DragStartBehavior.start, ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual, WidgetPositionBuilder? feedback, WidgetPositionBuilder? childWhenDragging})
This constructor use to achive the Horizontal Reorderable / Re-Indexing feature in DragAndDropGridView. Providing a non-null itemCount improves the ability of the GridView to estimate the maximum scroll extent.
const
HcDragAndDropView.horizontalStickyHeader({Key? key, bool reverse = false, ScrollController? controller, bool? primary, ScrollPhysics? physics, bool isCustomFeedback = false, bool isCustomChildWhenDragging = false, required WillAcceptCallback onWillAccept, WillAcceptCallback? onWillAcceptHeader, required IndexedWidgetBuilder itemBuilderHeader, bool allHeaderChildNonDraggable = false, SliverGridDelegate? headerGridDelegate, required ReorderCallback onReorder, ReorderCallback? onReorderHeader, int? headerItemCount, EdgeInsetsGeometry? headerPadding, EdgeInsetsGeometry? padding, required SliverGridDelegate gridDelegate, required IndexedWidgetBuilder itemBuilder, int? itemCount, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, bool addSemanticIndexes = true, double? cacheExtent, int? semanticChildCount, DragStartBehavior dragStartBehavior = DragStartBehavior.start, ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual, WidgetPositionBuilder? feedback, WidgetPositionBuilder? childWhenDragging})
To achive the sticky header in horizontal gridview just call this horizontalStickyHeader constructor. By Default allHeaderChildNonDraggable is set to false making all header draggable. onWillAcceptHeader (Implement your logic on accepting and rejecting the drop of an header element), onReorderHeader (implement your logic for reodering and reindexing the elements) And if you want the header to be non-draggable element simple set allHeaderChildNonDraggable to true. itemBuilderHeader will be called only with indices greater than or equal to
const
HcDragAndDropView.stickyHeader({Key? key, bool reverse = false, ScrollController? controller, bool? primary, ScrollPhysics? physics, bool isCustomFeedback = false, bool isCustomChildWhenDragging = false, required WillAcceptCallback onWillAccept, WillAcceptCallback? onWillAcceptHeader, required IndexedWidgetBuilder itemBuilderHeader, bool allHeaderChildNonDraggable = false, SliverGridDelegate? headerGridDelegate, required ReorderCallback onReorder, ReorderCallback? onReorderHeader, int? headerItemCount, EdgeInsetsGeometry? headerPadding, EdgeInsetsGeometry? padding, required SliverGridDelegate gridDelegate, required IndexedWidgetBuilder itemBuilder, int? itemCount, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, bool addSemanticIndexes = true, double? cacheExtent, int? semanticChildCount, DragStartBehavior dragStartBehavior = DragStartBehavior.start, ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual, WidgetPositionBuilder? feedback, WidgetPositionBuilder? childWhenDragging})
To achive the sticky header in gridview just call this stickyHeader constructor. By Default allHeaderChildNonDraggable is set to false making all header draggable. onWillAcceptHeader (Implement your logic on accepting and rejecting the drop of an header element), onReorderHeader (implement your logic for reodering and reindexing the elements) And if you want the header to be non-draggable element simple set allHeaderChildNonDraggable to true. itemBuilderHeader will be called only with indices greater than or equal to
const

Properties

addAutomaticKeepAlive bool
finalinherited
addRepaintBoundaries bool
finalinherited
addSemanticIndexes bool
finalinherited
allHeaderChildNonDraggable bool
finalinherited
cacheExtent double?
finalinherited
childWhenDragging WidgetPositionBuilder?
finalinherited
controller ScrollController?
finalinherited
dragStartBehavior DragStartBehavior
finalinherited
feedback WidgetPositionBuilder?
finalinherited
gridDelegate SliverGridDelegate
finalinherited
hashCode int
The hash code for this object.
no setterinherited
finalinherited
headerGridDelegate SliverGridDelegate?
finalinherited
headerItemCount int?
finalinherited
headerPadding EdgeInsetsGeometry?
finalinherited
isCustomChildWhenDragging bool
finalinherited
isCustomFeedback bool
finalinherited
isStickyHeader bool
finalinherited
isVertical bool
finalinherited
itemBuilder IndexedWidgetBuilder
finalinherited
itemBuilderHeader IndexedWidgetBuilder?
finalinherited
itemCount int?
finalinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardDismissBehavior ScrollViewKeyboardDismissBehavior
finalinherited
onReorder ReorderCallback
finalinherited
onReorderHeader ReorderCallback?
finalinherited
onWillAccept WillAcceptCallback
finalinherited
onWillAcceptHeader WillAcceptCallback?
finalinherited
padding EdgeInsetsGeometry?
finalinherited
physics ScrollPhysics?
finalinherited
primary bool?
finalinherited
reverse bool
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticChildCount int?
finalinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() HcMainGridViewState
Creates the mutable state for this widget at a given 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