StatePickerDialog<T> constructor

const StatePickerDialog<T>({
  1. Key? key,
  2. required ValueChanged<T> onValuePicked,
  3. required List<T> states,
  4. Widget? title,
  5. EdgeInsetsGeometry? titlePadding,
  6. EdgeInsetsGeometry contentPadding = const EdgeInsets.fromLTRB(0.0, 12.0, 0.0, 16.0),
  7. String? semanticLabel,
  8. ItemFilter<T>? itemFilter,
  9. Comparator<T>? sortComparator,
  10. List<T>? topStates,
  11. ItemBuilder<T>? itemBuilder,
  12. bool isDividerEnabled = false,
  13. Widget divider = const Divider(height: 0.0),
  14. bool isSearchable = false,
  15. bool popOnPick = true,
  16. InputDecoration? searchInputDecoration,
  17. Color? searchCursorColor,
  18. Widget? searchEmptyView,
  19. SearchFilter<T>? searchFilter,
})

Creates a StatePickerDialog.

  • onValuePicked is required and specifies the callback triggered on item selection.
  • states is required and contains the list of items to display.

Implementation

const StatePickerDialog({
  super.key,
  required this.onValuePicked,
  required this.states,
  this.title,
  this.titlePadding,
  this.contentPadding = const EdgeInsets.fromLTRB(0.0, 12.0, 0.0, 16.0),
  this.semanticLabel,
  this.itemFilter,
  this.sortComparator,
  this.topStates,
  this.itemBuilder,
  this.isDividerEnabled = false,
  this.divider = const Divider(height: 0.0),
  this.isSearchable = false,
  this.popOnPick = true,
  this.searchInputDecoration,
  this.searchCursorColor,
  this.searchEmptyView,
  this.searchFilter,
});