Selectable<T> class

If the model type in it is written,the search becomes easeir.



Selectable({Key? key, required List<T> parentList, required List childList(T model), required BuilderSelect builder, required dynamic onSelect(int id, bool isSelect), required BuilderInnerSelect childBuilder, required List<int> selectedList, Widget? icon, Widget? closeButton, double? mainAxisExtent, ImageFilter? imageFilter, Color? backgroundColor, EdgeInsets? headerPadding, double? crossAxisSpacing, double? mainAxisSpacing, double? childAspectRatio, double? maxCrossAxisExtent, int? crossAxisCount})
You must define a model required for multiple selection This model can be any way you want. The only thing required is to have a variable in this model that can tell if it is selected or not. this variable must be id. You can define a Map or create an Object. If you have created a map, don't forget to add {"id" : "--"} in it If this variable is not found, the widget returns an error.


backgroundColor Color
Color background color of detail page. default
builder BuilderSelect
By dint of this builder you will be able to choose your title and add the widget you want to these titles.
childAspectRatio double
The ratio of the cross-axis to the main-axis extent of each child. default 1/1
childBuilder BuilderInnerSelect
It will indicate which variable from your model your multi-select list depends on. this structure has to show a list structure inside your model. Inside the list structure there must be a variable id that allows it to be specifically parsed from the others id each element must hold a different int value from the others.
childList List Function(T model)
This model list is the model list you will choose from your original model.
closeButton Widget?
You can make it functional by putting the back button. This button can be anywhere you want. You can add Positioned. It has no default location, you must specify it. The button is only visible on the detail screen.
crossAxisCount int
The number of children in the cross axis. default value 2 int.
crossAxisSpacing double
The distance between branches is horizontal. default value is 5.0
hashCode int
The hash code for this object.
no setterinherited
icon Widget?
If an item under this heading is selected icon will appear. its default value is Icon(Icons.done,color:Colors.white)
imageFilter ImageFilter
Background blur of the detail page. 4.0 - 4.0
key Key?
Controls how one widget replaces another widget in the tree.
mainAxisExtent double?
The grid view mainAxisExtent
mainAxisSpacing double
The distance between branches is vertical. default value is 4.0
onSelect → dynamic Function(int id, bool isSelect)
This method returns the id of the model you have selected and whether it is selected.
padding EdgeInsets
Padding of headers. default const EdgeInsets.all(10.0),
parentList List<T>
List model. The desired variable of this model will be returned as Widget and you will be able to select it.
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedList List<int>
This list is inside your model if you have a pre-selected structure. You are expected to specify the selected ones.


createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
createState() State<StatefulWidget>
Creates the mutable state for this widget at a given location in the tree.
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
toString({DiagnosticLevel minLevel =}) String
A string representation of this object.
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
toStringShort() String
A short, textual description of this widget.


operator ==(Object other) bool
The equality operator.

Static Methods

of(BuildContext context) → Select?
Sayfa geçişi ve çoklu seçimleri dinleyebilmek için Inherited widget.