MultiValuePickerDialog<T> class

An interactive dialog that allows users to select multiple items from a list.

Constructors

MultiValuePickerDialog({String? title, Widget? titleWidget, TextStyle? titleStyle, Color? titleBackgroundColor, required List<T> items, 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)?})
Creates a MultiValuePickerDialog instance with the specified parameters.

Properties

dialogBorderRadius double
The border radius of the dialog.
final
dialogButton DialogButton?
Configuration for the dialog buttons (positive and negative buttons).
final
dialogHeight double?
(Optional) The height of the dialog. If not provided, defaults to 85% of the screen height.
final
dialogWidth double?
(Optional) The width of the dialog. If not provided, defaults to 85% of the screen width.
final
elevation double
The elevation of the dialog.
final
hashCode int
The hash code for this object.
no setterinherited
initiallyMultiSelectAllItems bool
If true, initially selects all items when the dialog is opened.
final
initialSelectedItems List<T>?
(Optional) The initially selected items in the dialog.
final
itemBuilder Widget Function(BuildContext context, T value, int index)
A callback function that defines how each item should be displayed in the list.
final
items List<T>
The list of items to be displayed in the dialog.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedItemBuilder Widget Function(BuildContext context, T value, int index)?
(Optional) A callback function that defines how selected items should be displayed differently.
final
selectedTextBuilder Widget Function(List<T>? value)?
(Optional) Callback function to customize the text displaying the number of selected items.
final
selectedTextStyle TextStyle?
(Optional) Style for the text displaying the number of selected items.
final
selectionType MultiDialogSelectionType
The type of selection behavior in the dialog.
final
showSelectedTextWidget bool
If true, displays a widget showing the number of selected items.
final
title String?
The title of the dialog, displayed at the top.
final
titleBackgroundColor Color?
(Optional) Background color for the title bar.
final
titleHeight double
The height of the title bar.
final
titleStyle TextStyle?
(Optional) Style for the title text.
final
titleWidget Widget?
(Optional) Custom widget for the title. If provided, it overrides the title.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
show(BuildContext context) Future<List<T>?>
Displays the multi-selectable dialog and returns a Future that resolves when the dialog is dismissed.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited