GFMultiSelect<T> class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- GFMultiSelect
Constructors
-
GFMultiSelect({required List items, required ValueChanged<
List> onSelect, List<int> ? initialSelectedItemsIndex, String dropdownTitleTileText = 'Select : ', TextStyle dropdownTitleTileTextStyle = const TextStyle(fontSize: 16, fontWeight: FontWeight.w500), dynamic color, Widget? avatar, EdgeInsets padding = const EdgeInsets.all(5), EdgeInsets margin = const EdgeInsets.all(5), double size = GFSize.SMALL, GFCheckboxType type = GFCheckboxType.basic, Color activeBgColor = GFColors.WHITE, Color inactiveBgColor = GFColors.WHITE, Color activeBorderColor = GFColors.WHITE, Color inactiveBorderColor = GFColors.WHITE, Color? listItemTextColor = GFColors.DARK, Color buttonColor = GFColors.PRIMARY, Widget? submitButton, Widget? cancelButton, Widget expandedIcon = const Icon(Icons.keyboard_arrow_down, color: Colors.black87, size: 30), Widget collapsedIcon = const Icon(Icons.keyboard_arrow_up, color: Colors.black87, size: 30), FocusNode? focusNode, Color dropdownBgColor = Colors.white, Widget activeIcon = const Icon(Icons.check, size: 20, color: GFColors.DARK), Widget? inactiveIcon, Color customBgColor = GFColors.SUCCESS, bool selected = false, Border? dropdownTitleTileBorder, BorderRadius dropdownTitleTileBorderRadius = const BorderRadius.all(Radius.circular(4)), dynamic dropdownTitleTileColor = GFColors.WHITE, bool hideDropdownUnderline = false, BorderSide dropdownUnderlineBorder = const BorderSide(color: Colors.black45, width: 1), EdgeInsets dropdownTitleTileMargin = const EdgeInsets.all(16), EdgeInsets dropdownTitleTilePadding = const EdgeInsets.all(12), String? dropdownTitleTileHintText, TextStyle dropdownTitleTileHintTextStyle = const TextStyle(fontSize: 12, fontWeight: FontWeight.w400), Widget? dropdownButton, Key? key}) -
GF Multiselect let user to select multiple items from the number of
Checkbox ListTile items and display selected items in the TitleTile box.
It displays list of items in the overlay dropdown fashion.
const
Properties
- activeBgColor → Color
-
defines dropdown ListTile's checkbox background color when its active
type of Color used to change the backgroundColor of the active checkbox
final
- activeBorderColor → Color
-
defines dropdown ListTile's checkbox border color when its active
type of Color used to change the border color of the active checkbox
final
- activeIcon → Widget
-
defines dropdown ListTile's checkbox's active icon
type of Widget used to change the checkbox's active icon
final
- avatar → Widget?
-
type of Widget or GFAvatar used to defines dropdown checkbox ListTile's leading
final
-
defines dropdown ListTile's button background color
type of Color used to change the button background color
final
- cancelButton → Widget?
-
defines the cancel button in the dropdown
final
- collapsedIcon → Widget
-
defines the dropdownTitleTile's trailing icon when dropdown is not visible
final
- color → dynamic
-
defines dropdown checkbox ListTile's background color. Can be given Color or GFColors
final
- customBgColor → Color
-
type of Color used to change the background color of the custom active checkbox only
final
- dropdownBgColor → Color
-
defines the background color of the dropdown. Can be given Color or GFColors
final
- dropdownButton → Widget?
-
final
- dropdownTitleTileBorder → Border?
-
defines the border of the dropdownTitleTile.
final
- dropdownTitleTileBorderRadius → BorderRadius
-
defines the border radius of the dropdownTitleTile
final
- dropdownTitleTileColor → dynamic
-
defines the background color of dropdownButton
final
- dropdownTitleTileHintText → String?
-
type of String to define the dropdownTitleTile hint text
final
- dropdownTitleTileHintTextStyle → TextStyle
-
type of TextStyle to define the textStyle of dropdownTitleTileHintTextStyle
final
- dropdownTitleTileMargin → EdgeInsets
-
defines the dropdownTitleTile margin
final
- dropdownTitleTilePadding → EdgeInsets
-
defines the dropdownTitleTile padding
final
- dropdownTitleTileText → String
-
type of String to define the dropdownTitleTile title
final
- dropdownTitleTileTextStyle → TextStyle
-
type of TextStyle to define the textStyle of dropdownTitleTileText
final
- dropdownUnderlineBorder → BorderSide
-
defines the border of the Dropdown Underline border
final
- expandedIcon → Widget
-
defines the dropdownTitleTile's trailing icon when dropdown is visible
final
- focusNode → FocusNode?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hideDropdownUnderline → bool
-
on true state, it hides the Dropdown Underline border
defaults value is false
final
- inactiveBgColor → Color
-
defines dropdown ListTile's checkbox background color when its inactive
type of Color used to change the backgroundColor of the inactive checkbox
final
- inactiveBorderColor → Color
-
defines dropdown ListTile's checkbox border color when its inactive
type of Color used to change the border color of the inactive checkbox
final
- inactiveIcon → Widget?
-
defines dropdown ListTile's checkbox's inactive icon
type of Widget used to change the checkbox's inactive icon
final
-
initialSelectedItemsIndex
→ List<
int> ? -
A List of items that should be selected at the initial state
final
- items → List
-
defines the list of items the user can select
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- listItemTextColor → Color?
-
The color for the color of the list item text.
final
- margin → EdgeInsets
-
defines the margin of dropdown checkbox ListTile
final
-
onSelect
→ ValueChanged<
List> -
callback when user select item from the dropdown,
in callback we get list of selected items index
final
- padding → EdgeInsets
-
defines the padding of dropdown checkbox ListTile
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selected → bool
-
To have the list tile appear selected when the checkbox is checked, pass the same value to both.
Normally, this property is left to its default value, false.
final
- size → double
-
defines dropdown ListTile's checkbox size
type of double which is GFSize ie, small, medium and large and can use any double value
final
- submitButton → Widget?
-
defines the submit button in the dropdown
final
- type → GFCheckboxType
-
defines dropdown ListTile's checkbox type
type of GFCheckboxType which is of four type is basic, sqaure, circular and custom
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _GFMultiSelectState -
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