ListBox<ITEM extends ItemListSource> constructor
ListBox<ITEM extends ItemListSource> ({
- required Data source,
- Key? key,
- required ListSource<
ITEM> list, - DropdownButtonBuilder? selectedItemBuilder,
- Widget? hint,
- Widget? disabledHint,
- ValueChanged<
String?> ? onChanged, - VoidCallback? onTap,
- int elevation = 8,
- TextStyle? style,
- Widget? underline,
- Widget? icon,
- Color? iconDisabledColor,
- Color? iconEnabledColor,
- double iconSize = 24.0,
- bool isDense = false,
- bool isExpanded = false,
- double? itemHeight = kMinInteractiveDimension,
- Color? focusColor,
- FocusNode? focusNode,
- bool autofocus = false,
- Color? dropdownColor,
- bool? enableFeedback,
- AlignmentGeometry alignment = AlignmentDirectional.centerStart,
- BorderRadius? borderRadius,
Implementation
ListBox({
required this.source,
super.key,
required this.list,
this.selectedItemBuilder,
this.hint,
this.disabledHint,
this.onChanged,
this.onTap,
this.elevation = 8,
this.style,
this.underline,
this.icon,
this.iconDisabledColor,
this.iconEnabledColor,
this.iconSize = 24.0,
this.isDense = false,
this.isExpanded = false,
this.itemHeight = kMinInteractiveDimension,
this.focusColor,
this.focusNode,
this.autofocus = false,
this.dropdownColor,
this.menuMaxHeight,
this.enableFeedback,
this.alignment = AlignmentDirectional.centerStart,
this.borderRadius,
}) {
source.on('refresh', (x) => refresh());
list.on('request', (x) => refresh());
}