SingleValuePickerDialog<T> class

A dialog that allows users to pick a single value from a list of items.

Constructors

SingleValuePickerDialog({String? title, Widget? titleWidget, TextStyle? titleStyle, Color? titleBackgroundColor, required List<T> items, required Widget itemBuilder(BuildContext context, T value, int index), DialogButton? dialogButton, bool barrierDismissible = true, bool showCloseIcon = false, double elevation = 10.0, double? dialogWidth, double? dialogHeight, double titleHeight = 60.0, double dialogBorderRadius = 4.0})
Creates a SingleValuePickerDialog instance with the specified parameters.

Properties

barrierDismissible bool
If true, allows dismissing the dialog by tapping outside the content area.
final
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
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
showCloseIcon bool
If true, displays a close icon (clear button) in the title bar.
final
title String?
The (optional) title of the dialog, displayed at the top.
final
titleBackgroundColor Color?
(Optional) Background color for the title bar.
final
titleHeight double
(Optional) 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<T?>
Displays the single-value picker 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