showFilterBottomSheet<T> function

  1. @Deprecated('This feature was deprecated after v0.3.0.')
Future<T?> showFilterBottomSheet<T>(
  1. BuildContext context, {
  2. required WidgetBuilder contentBuilder,
  3. WidgetBuilder? headerBuilder,
  4. String? title,
  5. bool? centerTitle,
  6. double? titleSpacing,
  7. WidgetBuilder? leadingBuilder,
  8. double? leadingWidth,
  9. bool automaticallyImplyLeading = true,
  10. List<Widget> actionsBuilder(
    1. BuildContext context
    )?,
  11. WidgetBuilder? footerBuilder,
  12. VoidCallback? onConfirm,
  13. VoidCallback? onReset,
  14. String? textConfirm,
  15. String? textCancel,
  16. bool showConfirmButton = true,
  17. bool showCancelButton = true,
  18. bool? showCloseButton,
  19. Color? backgroundColor,
  20. double? elevation,
  21. ShapeBorder? shape,
  22. Clip? clipBehavior,
  23. Color? barrierColor,
  24. bool isScrollControlled = true,
  25. bool useRootNavigator = false,
  26. bool isDismissible = true,
  27. bool enableDrag = true,
  28. EdgeInsetsGeometry? padding,
  29. EdgeInsetsGeometry? contentPadding = _contentPadding,
  30. bool persistent = false,
  31. bool? ignoreSafeArea,
  32. RouteSettings? settings,
  33. Duration? enterBottomSheetDuration,
  34. Duration? exitBottomSheetDuration,
  35. ActionsPosition? actionsPosition = ActionsPosition.footer,
})

显示筛选弹框

Implementation

@Deprecated('This feature was deprecated after v0.3.0.')
Future<T?> showFilterBottomSheet<T>(
  BuildContext context, {
  required WidgetBuilder contentBuilder,
  WidgetBuilder? headerBuilder,
  String? title,
  bool? centerTitle,
  double? titleSpacing,
  WidgetBuilder? leadingBuilder,
  double? leadingWidth,
  bool automaticallyImplyLeading = true,
  List<Widget> Function(BuildContext context)? actionsBuilder,
  WidgetBuilder? footerBuilder,
  VoidCallback? onConfirm,
  VoidCallback? onReset,
  String? textConfirm,
  String? textCancel,
  bool showConfirmButton = true,
  bool showCancelButton = true,
  bool? showCloseButton,
  Color? backgroundColor,
  double? elevation,
  ShapeBorder? shape,
  Clip? clipBehavior,
  Color? barrierColor,
  bool isScrollControlled = true,
  bool useRootNavigator = false,
  bool isDismissible = true,
  bool enableDrag = true,
  EdgeInsetsGeometry? padding,
  EdgeInsetsGeometry? contentPadding = _contentPadding,
  bool persistent = false,
  bool? ignoreSafeArea,
  RouteSettings? settings,
  Duration? enterBottomSheetDuration,
  Duration? exitBottomSheetDuration,
  ActionsPosition? actionsPosition = ActionsPosition.footer,
}) async {
  final TxLocalizations localizations = TxLocalizations.of(context);

  return showDefaultBottomSheet<T>(
    context,
    contentBuilder: (context) => FormItemTheme(
      data: const FormItemThemeData(
        backgroundColor: Colors.transparent,
        padding: EdgeInsets.zero,
      ),
      child: contentBuilder(context),
    ),
    title: title ?? localizations.filterSheetLabel,
    titleSpacing: titleSpacing,
    centerTitle: centerTitle,
    headerBuilder: headerBuilder,
    actionsBuilder: actionsBuilder,
    onConfirm: onConfirm,
    onCancel: onReset,
    textConfirm: textConfirm,
    textCancel: textCancel ?? localizations.resetButtonLabel,
    showConfirmButton: showConfirmButton,
    showCancelButton: showCancelButton,
    padding: padding,
    contentPadding: contentPadding,
    leadingBuilder:
        leadingBuilder ?? (context) => const Icon(Icons.filter_list),
    leadingWidth: leadingWidth,
    automaticallyImplyLeading: automaticallyImplyLeading,
    footerBuilder: footerBuilder,
    persistent: persistent,
    isScrollControlled: isScrollControlled,
    backgroundColor: backgroundColor,
    elevation: elevation,
    shape: shape,
    ignoreSafeArea: ignoreSafeArea,
    clipBehavior: clipBehavior,
    isDismissible: isDismissible,
    barrierColor: barrierColor,
    settings: settings,
    enableDrag: enableDrag,
    enterBottomSheetDuration: enterBottomSheetDuration,
    exitBottomSheetDuration: exitBottomSheetDuration,
    actionsPosition: actionsPosition,
  );
}