DynamicMultiCheckWidget class
A highly customizable widget for creating dynamic multi-select checklists.
Features:
- Drag-to-resize container height
- Add, edit, and delete items dynamically
- Checkbox selection with real-time callbacks
- Scrollable or fixed content layout
- Customizable colors and styling
- Auto-generated or custom item IDs
Example:
DynamicMultiCheckWidget(
config: {
"title": "Survey Items",
"color": "#eb5234",
"scrollable": "yes",
"height": "300",
"allowAdd": "true",
"allowEdit": "true",
"data": [
{"id": 1, "key": "Item 1", "value": "Description", "checked": false}
]
},
onDataChanged: ({required allItems, required currentHeight}) {
print('All items: $allItems');
},
onCheckedItemsChanged: ({required checkedItems, required currentHeight}) {
print('Checked: $checkedItems');
},
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- DynamicMultiCheckWidget
Constructors
-
DynamicMultiCheckWidget({Key? key, required Map<
String, dynamic> config, OnDataChanged? onDataChanged, OnCheckedItemsChanged? onCheckedItemsChanged}) -
const
Properties
-
config
→ Map<
String, dynamic> -
Configuration map containing widget settings
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onCheckedItemsChanged → OnCheckedItemsChanged?
-
Callback triggered when checked items change
final
- onDataChanged → OnDataChanged?
-
Callback triggered when any data changes (check/uncheck, add, edit, delete, height change)
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< DynamicMultiCheckWidget> -
Creates the mutable state for this widget at a given location in the tree.
override
-
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, 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