GFMultiSelect<T> constructor
const
GFMultiSelect<T> ({
- 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.
Implementation
const GFMultiSelect({
required this.items,
required this.onSelect,
this.initialSelectedItemsIndex,
this.dropdownTitleTileText = 'Select : ',
this.dropdownTitleTileTextStyle =
const TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
this.color,
this.avatar,
this.padding = const EdgeInsets.all(5),
this.margin = const EdgeInsets.all(5),
this.size = GFSize.SMALL,
this.type = GFCheckboxType.basic,
this.activeBgColor = GFColors.WHITE,
this.inactiveBgColor = GFColors.WHITE,
this.activeBorderColor = GFColors.WHITE,
this.inactiveBorderColor = GFColors.WHITE,
this.listItemTextColor = GFColors.DARK,
this.buttonColor = GFColors.PRIMARY,
this.submitButton,
this.cancelButton,
this.expandedIcon = const Icon(
Icons.keyboard_arrow_down,
color: Colors.black87,
size: 30,
),
this.collapsedIcon = const Icon(
Icons.keyboard_arrow_up,
color: Colors.black87,
size: 30,
),
this.focusNode,
this.dropdownBgColor = Colors.white,
this.activeIcon = const Icon(
Icons.check,
size: 20,
color: GFColors.DARK,
),
this.inactiveIcon,
this.customBgColor = GFColors.SUCCESS,
this.selected = false,
this.dropdownTitleTileBorder,
this.dropdownTitleTileBorderRadius =
const BorderRadius.all(Radius.circular(4)),
this.dropdownTitleTileColor = GFColors.WHITE,
this.hideDropdownUnderline = false,
this.dropdownUnderlineBorder =
const BorderSide(color: Colors.black45, width: 1),
this.dropdownTitleTileMargin = const EdgeInsets.all(16),
this.dropdownTitleTilePadding = const EdgeInsets.all(12),
this.dropdownTitleTileHintText,
this.dropdownTitleTileHintTextStyle =
const TextStyle(fontSize: 12, fontWeight: FontWeight.w400),
this.dropdownButton,
Key? key,
}) : super(key: key);