flutter_material_pickers library

Package for building card based settings forms

Classes

PickerModel
This model is used as the element data structure for each of the picker controls.
SelectAllConfig

Enums

FileType

Functions

showMaterialCheckboxPicker<T>({required BuildContext context, String? title, required List<T> items, List<T>? selectedItems, Color? headerColor, Color? headerTextColor, Color? backgroundColor, Color? buttonTextColor, String? confirmText, bool cancellable = true, String? cancelText, double? maxLongSide, double? maxShortSide, ValueChanged<List<T>>? onChanged, ValueChanged<List<T>>? onSelectionChanged, SelectAllConfig? selectAllConfig, VoidCallback? onConfirmed, VoidCallback? onCancelled, Transformer<T>? transformer}) Future<List<T>?>
Allows selection of many values from a checkbox list.
showMaterialColorPicker({required BuildContext context, String title = "Pick a color", required Color selectedColor, Color? headerColor, Color? headerTextColor, Color? backgroundColor, Color? buttonTextColor, String? confirmText, String? cancelText, double? maxLongSide, double? maxShortSide, ValueChanged<Color>? onChanged, VoidCallback? onConfirmed, bool cancellable = true, VoidCallback? onCancelled}) Future<Color?>
Allows RGB selection of a color.
showMaterialDatePicker({required BuildContext context, String? title, required DateTime firstDate, required DateTime lastDate, required DateTime selectedDate, Color? headerColor, Color? headerTextColor, Color? backgroundColor, Color? buttonTextColor, String? confirmText, bool cancellable = true, String? cancelText, double? maxLongSide, double? maxShortSide, ValueChanged<DateTime>? onChanged, VoidCallback? onConfirmed, VoidCallback? onCancelled}) Future<DateTime?>
Allows selection of a date.
showMaterialFilePicker({BuildContext? context, FileType fileType = FileType.any, List<String>? allowedExtensions, ValueChanged<PlatformFile>? onChanged}) Future<void>
Allows selection of a file.
showMaterialNumberPicker({required BuildContext context, String? title, required int minNumber, required int maxNumber, int? selectedNumber, int step = 1, Color? headerColor, Color? headerTextColor, Color? backgroundColor, Color? buttonTextColor, String? confirmText, bool cancellable = true, String? cancelText, double? maxLongSide, double? maxShortSide, ValueChanged<int>? onChanged, VoidCallback? onConfirmed, VoidCallback? onCancelled, Transformer<int>? transformer}) Future<int?>
Allows selection of a number via a slot machine carousel
showMaterialPalettePicker({required BuildContext context, String title = "Pick a color", required Color selectedColor, Color? headerColor, Color? headerTextColor, Color? backgroundColor, Color? buttonTextColor, String? confirmText, bool cancellable = true, String? cancelText, double? maxLongSide, double? maxShortSide, ValueChanged<Color>? onChanged, VoidCallback? onConfirmed, VoidCallback? onCancelled}) Future<Color?>
Allows Material palette selection of a color
showMaterialRadioPicker<T>({required BuildContext context, String? title, required List<T> items, T? selectedItem, Color? headerColor, Color? headerTextColor, Color? backgroundColor, Color? buttonTextColor, String? confirmText, bool cancellable = true, String? cancelText, double? maxLongSide, double? maxShortSide, ValueChanged<T>? onChanged, VoidCallback? onConfirmed, VoidCallback? onCancelled, Transformer<T>? transformer}) Future<T?>
Allows selection of a single from a radio list
showMaterialResponsiveDialog<T>({required BuildContext context, String? title, Widget? child, bool hideButtons = false, Color? headerColor, Color? headerTextColor, Color? backgroundColor, Color? buttonTextColor, String? confirmText, bool cancelButtonVisible = true, String? cancelText, double? maxLongSide, double? maxShortSide, VoidCallback? onConfirmed, VoidCallback? onCancelled}) Future<T?>
Extends Dialog by making it responsive to screen orientation changes
showMaterialScrollPicker<T>({required BuildContext context, String? title, required List<T> items, required T selectedItem, bool showDivider = true, Color? headerColor, Color? headerTextColor, Color? backgroundColor, Color? buttonTextColor, String? confirmText, bool cancellable = true, String? cancelText, double? maxLongSide, double? maxShortSide, ValueChanged<T>? onChanged, VoidCallback? onConfirmed, VoidCallback? onCancelled, Transformer<T>? transformer}) Future<T?>
Allows selection of a string via a slot machine carousel
showMaterialSelectionPicker<T>({required BuildContext context, String? title, required List<T> items, T? selectedItem, Color? headerColor, Color? headerTextColor, Color? backgroundColor, Color? buttonTextColor, String? confirmText, bool cancellable = true, String? cancelText, double? maxLongSide, double? maxShortSide, ValueChanged<T>? onChanged, VoidCallback? onConfirmed, VoidCallback? onCancelled, Transformer<T>? transformer, Iconizer<T?>? iconizer}) Future<T?>
Allows selection of a single value via an icon label list
showMaterialSwatchPicker({required BuildContext context, String title = "Pick a color", required Color selectedColor, Color? headerColor, Color? headerTextColor, Color? backgroundColor, Color? buttonTextColor, String? confirmText, bool cancellable = true, String? cancelText, double? maxLongSide, double? maxShortSide, ValueChanged<Color>? onChanged, VoidCallback? onConfirmed, VoidCallback? onCancelled}) Future<Color?>
Allows selection of a color from swatches
showMaterialTimePicker({required BuildContext context, String? title, required TimeOfDay selectedTime, String? confirmText, String? cancelText, ValueChanged<TimeOfDay>? onChanged, VoidCallback? onConfirmed, VoidCallback? onCancelled}) Future<TimeOfDay?>
Allows selection of a time

Typedefs

Iconizer<T> = Icon? Function(T item)
Transformer<T> = String? Function(T item)