showBottomSelector static method
dynamic
showBottomSelector(
- BuildContext context, {
- String? title,
- required List<
HbSelectItemModel> items, - bool showIcon = true,
- bool showDescription = true,
- required HbRadioController controller,
- ValueChanged<
int> ? onSelected,
弹出底部选择弹窗
Implementation
static showBottomSelector(
BuildContext context, {
String? title, // title
required List<HbSelectItemModel> items, // 下拉选项
bool showIcon = true, // 是否显示图标
bool showDescription = true, // 是否显示描述
required HbRadioController controller, // 初始选中项下标与selectItem
// 选项发生变化
ValueChanged<int>? onSelected, //选项发生变化
}) {
showModalBottomSheet(
context: context,
clipBehavior: Clip.hardEdge,
isScrollControlled: true,
constraints: BoxConstraints(maxHeight: 620.w),
backgroundColor: Colors.transparent,
builder: (context) {
return _SelectDialog(
title: title,
items: items,
showIcon: showIcon,
showDescription: showDescription,
controller: controller,
onSelected: onSelected,
);
},
);
}