Selectable<T> class

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

Inheritance

Constructors

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.

Properties

backgroundColor Color
Color background color of detail page. default Colors.black.withOpacity(.65)
final
builder BuilderSelect
By dint of this builder you will be able to choose your title and add the widget you want to these titles.
final
childAspectRatio double
The ratio of the cross-axis to the main-axis extent of each child. default 1/1
final
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.
final
childList List Function(T model)
This model list is the model list you will choose from your original model.
final
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.
final
crossAxisCount int
The number of children in the cross axis. default value 2 int.
final
crossAxisSpacing double
The distance between branches is horizontal. default value is 5.0
final
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)
final
imageFilter ImageFilter
Background blur of the detail page. 4.0 - 4.0
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
mainAxisExtent double?
The grid view mainAxisExtent
final
mainAxisSpacing double
The distance between branches is vertical. default value is 4.0
final
onSelect → dynamic Function(int id, bool isSelect)
This method returns the id of the model you have selected and whether it is selected.
final
padding EdgeInsets
Padding of headers. default const EdgeInsets.all(10.0),
final
parentList List<T>
List model. The desired variable of this model will be returned as Widget and you will be able to select it.
final
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.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
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}) 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

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