showModalOptionList<T> function
Future<SettingsOption<T> ?>
showModalOptionList<T>({
- required BuildContext context,
- required List<
SettingsOption< options,T> >
Implementation
Future<SettingsOption<T>?> showModalOptionList<T>({required BuildContext context, required List<SettingsOption<T>> options}) async {
return await showModalBottomSheet<SettingsOption<T>>(
context: context,
isDismissible: true,
builder: (context) => SettingsOptionList<T>(
onSelect: (option) {
// select this track
Navigator.pop(context, option);
},
options: options,
),
);
}