LazyMultiValuePickerDialog<T> constructor
LazyMultiValuePickerDialog<T> ({
- String? title,
- Widget? titleWidget,
- TextStyle? titleStyle,
- Color? titleBackgroundColor,
- required Future<
List< asyncItems(),T> ?> - required Widget itemBuilder(
- BuildContext context,
- T value,
- int index
- Widget selectedItemBuilder(
- BuildContext context,
- T value,
- int index
- List<
T> ? initialSelectedItems, - DialogButton? dialogButton,
- bool initiallyMultiSelectAllItems = false,
- MultiDialogSelectionType selectionType = MultiDialogSelectionType.checkboxTap,
- double elevation = 10.0,
- double? dialogWidth,
- double? dialogHeight,
- double titleHeight = 60.0,
- double dialogBorderRadius = 4.0,
- bool showSelectedTextWidget = true,
- TextStyle? selectedTextStyle,
- Widget selectedTextBuilder(
- List<
T> ? value
- List<
- String? loadingMessage,
- LoadingDialog? loadingDialog,
Creates a LazyMultiValuePickerDialog.
If titleWidget is provided, title, titleBackgroundColor, showCloseIcon,
and titleStyle should not be provided.
Should not provide both loadingMessage and loadingDialog.
Implementation
LazyMultiValuePickerDialog({
this.title,
this.titleWidget,
this.titleStyle,
this.titleBackgroundColor,
required this.asyncItems,
required this.itemBuilder,
this.selectedItemBuilder,
this.initialSelectedItems,
this.dialogButton,
this.initiallyMultiSelectAllItems = false,
this.selectionType = MultiDialogSelectionType.checkboxTap,
this.elevation = 10.0,
this.dialogWidth,
this.dialogHeight,
this.titleHeight = 60.0,
this.dialogBorderRadius = 4.0,
this.showSelectedTextWidget = true,
this.selectedTextStyle,
this.selectedTextBuilder,
this.loadingMessage,
this.loadingDialog,
}) : assert(
!(initiallyMultiSelectAllItems && initialSelectedItems != null),
"Either 'initiallyMultiSelectAllItems' or 'initialSelectedItems' should be provided.",
),
assert(
(selectionType != MultiDialogSelectionType.itemTap ||
selectedItemBuilder != null),
"If selectionType is '[SelectionType.itemTap]',"
" 'selectedItemBuilder' should be implemented to differentiate the selected and un-selected items",
);