Skip to content
pubscout

swipe_back_detector

2.0.0, released 6 years ago by magicleon94.dev

Adds swipe to go back functionality to custom or non-Cupertino routes.

WASM-ready
$ flutter pub add swipe_back_detector
Source repository

What it does

Provides a detector widget that wraps your UI to enable swipe-to-pop navigation gestures. It allows customization of detection area width, cutoff velocity, vertical padding, and pop values.

AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are using custom routes that lack default swipe-to-back behavior
  • You need to implement iOS-style edge swipe gestures on non-Cupertino routes

Skip it when

  • You require RTL (right-to-left) language support, which is currently not implemented
  • You are already using standard Cupertino routes that handle back swipes natively

Strengths

  • Easy customization of swipe area width and cutoff velocity
  • Simple widget wrapper approach for custom routes

Weaknesses

  • Does not currently support RTL layouts
  • Limited documentation beyond basic attributes

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
SwipeBackDetector(
  child: MyScreen(),
  cutoffVelocity: 300.0,
  swipeAreaWidth: 20.0,
  popValue: true,
)

Alternatives

Packages that do the same job and could replace swipe_back_detector.