LazyMultiValuePickerDialog<T> constructor

LazyMultiValuePickerDialog<T>({
  1. String? title,
  2. Widget? titleWidget,
  3. TextStyle? titleStyle,
  4. Color? titleBackgroundColor,
  5. required Future<List<T>?> asyncItems(),
  6. required Widget itemBuilder(
    1. BuildContext context,
    2. T value,
    3. int index
    ),
  7. Widget selectedItemBuilder(
    1. BuildContext context,
    2. T value,
    3. int index
    )?,
  8. List<T>? initialSelectedItems,
  9. DialogButton? dialogButton,
  10. bool initiallyMultiSelectAllItems = false,
  11. MultiDialogSelectionType selectionType = MultiDialogSelectionType.checkboxTap,
  12. double elevation = 10.0,
  13. double? dialogWidth,
  14. double? dialogHeight,
  15. double titleHeight = 60.0,
  16. double dialogBorderRadius = 4.0,
  17. bool showSelectedTextWidget = true,
  18. TextStyle? selectedTextStyle,
  19. Widget selectedTextBuilder(
    1. List<T>? value
    )?,
  20. String? loadingMessage,
  21. 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",
      );