ReorderableFit<T extends Object> class
Placing children evenly on a screen with an ability to reorder them.
Layout depends on the provided axis.
left or right, top or bottom, width and height should be specified only if this ReorderableFit should take a portion of the screen. Otherwise, the whole available space will be occupied.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- ReorderableFit
- Available extensions
Constructors
-
ReorderableFit({Key? key, required List<
T> children, required Widget itemBuilder(T data), Widget decoratorBuilder(T data)?, Widget overlayBuilder(T data)?, Color? dividerColor, double dividerSize = 1, dynamic onReorder(T, int)?, dynamic onAdded(T, int)?, dynamic onDragStarted(T)?, void onDoughBreak(T)?, dynamic onDragEnd(T)?, dynamic onDragCompleted(T)?, dynamic onDraggableCanceled(T)?, Color? hoverColor, Axis? axis, double? left, double? right, double? top, double? bottom, double? width, double? height, bool onWillAccept(T?)?, void onLeave(T?)?, Offset onOffset()?, bool useLongPress = false, bool allowEmptyTarget = false, bool allowDraggingLast = true, BoxConstraints? itemConstraints(T)?, BorderRadius? borderRadius}) -
const
Properties
- allowDraggingLast → bool
-
Indicator whether dragging is allowed when the children contain only one
item.
final
- allowEmptyTarget → bool
-
Indicator whether the DragTarget should be allowed when children are
empty.
final
- axis → Axis?
-
Axis to place children along.
final
- borderRadius → BorderRadius?
-
Optional BorderRadius to decorate this ReorderableFit with.
final
- bottom → double?
-
Bottom position of this view.
final
-
children
→ List<
T> -
Children widgets needed to be placed in a Wrap.
final
- decoratorBuilder → Widget Function(T data)?
-
Builder decorating the provided item.
final
- dividerColor → Color?
-
Color of a divider between children.
final
- dividerSize → double
-
Size of a divider between children.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Width of this view to occupy.
final
- hoverColor → Color?
-
Hover color of the DragTarget.
final
- itemBuilder → Widget Function(T data)
-
Builder building the provided item.
final
- itemConstraints → BoxConstraints? Function(T)?
-
Callback, specifying a BoxConstraints of an item when it's dragged.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- left → double?
-
Left position of this view.
final
- marginZero → Widget
-
Available on Widget, provided by the WidgetMarginX extension
no setter - onAdded → dynamic Function(T, int)?
-
Callback, called when a new item is added.
final
- onDoughBreak → void Function(T)?
-
Callback, called when an item breaks its dough.
final
- onDragCompleted → dynamic Function(T)?
-
Callback, called when an item is accepted by some DragTarget.
final
- onDragEnd → dynamic Function(T)?
-
Callback, called when item dragging is ended.
final
- onDraggableCanceled → dynamic Function(T)?
-
Callback, called item dragging is canceled.
final
- onDragStarted → dynamic Function(T)?
-
Callback, called when item dragging is started.
final
- onLeave → void Function(T?)?
-
Callback, called when a dragged item leaves some DragTarget.
final
- onOffset → Offset Function()?
-
Callback, specifying an Offset of this view.
final
- onReorder → dynamic Function(T, int)?
-
Callback, called when an item is reordered.
final
- onWillAccept → bool Function(T?)?
-
Callback, called when some DragTarget may accept the dragged item.
final
- overlayBuilder → Widget Function(T data)?
-
Builder creating overlay of the provided item.
final
- paddingZero → Widget
-
Available on Widget, provided by the WidgetPaddingX extension
no setter - right → double?
-
Right position of this view.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sliverBox → Widget
-
Available on Widget, provided by the WidgetSliverBoxX extension
no setter - top → double?
-
Top position of this view.
final
- useLongPress → bool
-
Indicator whether a LongPressDraggable should be used instead of a
Draggable.
final
- width → double?
-
Width of this view to occupy.
final
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)
. -
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
-
marginAll(
double margin) → Widget -
Available on Widget, provided by the WidgetMarginX extension
-
marginOnly(
{double left = 0.0, double top = 0.0, double right = 0.0, double bottom = 0.0}) → Widget -
Available on Widget, provided by the WidgetMarginX extension
-
marginSymmetric(
{double horizontal = 0.0, double vertical = 0.0}) → Widget -
Available on Widget, provided by the WidgetMarginX extension
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
paddingAll(
double padding) → Widget -
Available on Widget, provided by the WidgetPaddingX extension
-
paddingOnly(
{double left = 0.0, double top = 0.0, double right = 0.0, double bottom = 0.0}) → Widget -
Available on Widget, provided by the WidgetPaddingX extension
-
paddingSymmetric(
{double horizontal = 0.0, double vertical = 0.0}) → Widget -
Available on Widget, provided by the WidgetPaddingX 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
-
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
Static Methods
-
calculateSize(
{required double maxSize, required Size constraints, required Axis axis, required int length}) → double -
Returns calculated size of a ReorderableFit in its Wrap form with
maxSize
,constraints
,axis
and childrenlength
. -
useFitView(
{required double maxSize, required Size constraints, required Axis? axis, required int length}) → bool - Indicates whether this ReorderableFit should place its children evenly, or use a Wrap otherwise.