showTolyPopPicker<T> function
Future<T?>
showTolyPopPicker<T>({
- required BuildContext context,
- required List<
TolyPopItem> tasks, - Widget? title,
- VoidCallback? onCancel,
- String cancelText = "取消",
- TolyPopPickerTheme? theme,
- bool isDismissible = true,
- bool enableDrag = true,
- bool isScrollControlled = false,
- Color? backgroundColor,
- double? elevation,
- Clip? clipBehavior,
- BoxConstraints? constraints,
- Color? barrierColor,
- String? barrierLabel,
- AnimationController? transitionAnimationController,
Implementation
Future<T?> showTolyPopPicker<T>({
required BuildContext context,
required List<TolyPopItem> tasks,
Widget? title,
VoidCallback? onCancel,
String cancelText = "取消",
TolyPopPickerTheme? theme,
bool isDismissible = true,
bool enableDrag = true,
bool isScrollControlled = false,
bool useRootNavigator = false,
Color? backgroundColor,
double? elevation,
Clip? clipBehavior,
BoxConstraints? constraints,
Color? barrierColor,
String? barrierLabel,
AnimationController? transitionAnimationController,
}) {
final effectiveTheme = theme ?? TolyPopPickerTheme.of(context);
return showModalBottomSheet<T>(
context: context,
isDismissible: isDismissible,
enableDrag: enableDrag,
isScrollControlled: isScrollControlled,
useRootNavigator: useRootNavigator,
backgroundColor: backgroundColor,
elevation: elevation,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(effectiveTheme.borderRadius)),
),
clipBehavior: clipBehavior,
constraints: constraints,
barrierColor: barrierColor,
barrierLabel: barrierLabel,
transitionAnimationController: transitionAnimationController,
builder: (context) => TolyPopPicker(
tasks: tasks,
title: title,
onCancel: onCancel,
cancelText: cancelText,
theme: theme,
),
);
}