dimissible method

Widget dimissible(
  1. Widget child
)

Implementation

Widget dimissible(Widget child) {
  return Dismissible(
    key: Key(customKey.toString()),
    direction: richbar.dismissableDirection == DismissDirection.horizontal
        ? DismissDirection.horizontal
        : DismissDirection.vertical,
    resizeDuration: null,
    confirmDismiss: (_) {
      if (richbarStatus == RichbarStatus.init ||
          richbarStatus == RichbarStatus.hidden) {
        return Future.value(false);
      }
      return Future.value(true);
    },
    onDismissed: (_) {
      customKey += 1;
      _cancel();
      _isDismissible = true;
      isCurrent ? navigator!.pop() : navigator!.removeRoute(this);
    },
    child: Container(margin: richbar.margin, child: builder),
  );
}