Skip to content
On this page

ReorderableList

A list whose items can be rearranged by dragging.

ReorderableList in FluttyUIReorderableList in FluttyUI dark theme

Import

import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;

API Reference

The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.

ReorderableList

const ReorderableList({
  super.key,
  required List<Widget> children,
  required this.onReorder,
  this.controller,
  this.scrollDirection = Axis.vertical,
  this.reverse = false,
  this.padding = EdgeInsets.zero,
  this.spacing,
  this.shrinkWrap = false,
  this.physics,
  this.showDragHandles = true,
  this.longPressToDrag = true,
  this.isDisabled = false,
  this.onReorderStart,
  this.onReorderEnd,
  this.handleBuilder,
  this.borderRadius,
  this.haptic = HapticType.medium,
  this.motion,
});
ParameterTypeRequiredDefault
keyKey?Nonull
childrenList<Widget>Yes—
onReordervoid Function(int oldIndex, int newIndex)Yes—
controllerScrollController?Nonull
scrollDirectionAxisNoAxis.vertical
reverseboolNofalse
paddingEdgeInsetsGeometryNoEdgeInsets.zero
spacingdouble?Nonull
shrinkWrapboolNofalse
physicsScrollPhysics?Nonull
showDragHandlesboolNotrue
longPressToDragboolNotrue
isDisabledboolNofalse
onReorderStartValueChanged<int>?Nonull
onReorderEndValueChanged<int>?Nonull
handleBuilderIndexedWidgetBuilder?Nonull
borderRadiusdouble?Nonull
hapticHapticTypeNoHapticType.medium
motionComponentMotion?Nonull

ReorderableList.builder

const ReorderableList.builder({
  super.key,
  required IndexedWidgetBuilder this.itemBuilder,
  required this.itemCount,
  required this.onReorder,
  this.controller,
  this.scrollDirection = Axis.vertical,
  this.reverse = false,
  this.padding = EdgeInsets.zero,
  this.spacing,
  this.shrinkWrap = false,
  this.physics,
  this.showDragHandles = true,
  this.longPressToDrag = true,
  this.isDisabled = false,
  this.onReorderStart,
  this.onReorderEnd,
  this.handleBuilder,
  this.borderRadius,
  this.haptic = HapticType.medium,
  this.motion,
});

Application Setup

Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.

Source

lib/src/widgets/collections/reorderable_list/reorderable_list.dart

This reference is generated from the ReorderableList declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

DartFlutter

Get started with FluttyUI