LazySingleValuePickerDialog<T> constructor

LazySingleValuePickerDialog<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. DialogButton? dialogButton,
  8. bool barrierDismissible = true,
  9. bool showCloseIcon = false,
  10. double elevation = 10.0,
  11. double? dialogWidth,
  12. double? dialogHeight,
  13. double titleHeight = 60.0,
  14. double dialogBorderRadius = 4.0,
  15. String? loadingMessage,
  16. LoadingDialog? loadingDialog,
})

Creates a LazySingleValuePickerDialog.

If titleWidget is provided, title, titleBackgroundColor, showCloseIcon, and titleStyle should not be provided.

Should not provide both loadingMessage and loadingDialog.

Implementation

LazySingleValuePickerDialog({
  this.title,
  this.titleWidget,
  this.titleStyle,
  this.titleBackgroundColor,
  required this.asyncItems,
  required this.itemBuilder,
  this.dialogButton,
  this.barrierDismissible = true,
  this.showCloseIcon = false,
  this.elevation = 10.0,
  this.dialogWidth,
  this.dialogHeight,
  this.titleHeight = 60.0,
  this.dialogBorderRadius = 4.0,
  this.loadingMessage,
  this.loadingDialog,
})  : assert(
        (titleWidget == null ||
            (title == null &&
                titleBackgroundColor == null &&
                !showCloseIcon &&
                titleStyle == null)),
        "if titleWidget is provided, then title, titleBackgroundColor, showCloseIcon, titleStyle should not be provided",
      ),
      assert(
        (loadingMessage == null || loadingDialog == null),
        "Should not provide both loadingMessage and loadingDialog",
      );