swipe_back 0.0.2 copy "swipe_back: ^0.0.2" to clipboard
swipe_back: ^0.0.2 copied to clipboard

iOS-style full screen back swipe gesture for Flutter. Enables swiping from anywhere on the screen to navigate back, not just the left edge.

Swipe Back #

A simple, drop-in replacement for Flutter's default page transitions that enables an iOS-style back swipe gesture from anywhere on the screen, not just the left edge.

Swipe Back Demo

Features #

  • Full-Screen Swipe — Works from anywhere on the screen.
  • Native iOS Feel — Pixel-perfect transitions, parallax effects, and spring physics.
  • Drop-in Ready — Easy to integrate into your app's theme.
  • RTL & Fullscreen Dialog Support — Complete language direction and modal support.

Installation #

dependencies:
  swipe_back:
    git:
      url: https://github.com/your-username/swipe_back.git

Usage #

The easiest way to use swipe_back is to set it as the default page transition builder in your app's ThemeData:

import 'package:swipe_back/swipe_back.dart';

MaterialApp(
  theme: ThemeData(
    pageTransitionsTheme: const PageTransitionsTheme(
      builders: {
        TargetPlatform.iOS: SwipeBackPageTransitionsBuilder(),
        TargetPlatform.android: SwipeBackPageTransitionsBuilder(),
      },
    ),
  ),
  home: const HomeScreen(),
)

Now, every Navigator.push or MaterialPageRoute will automatically support the full-screen back gesture!

Direct Usage #

You can also use it for specific routes using CupertinoPageRoute from the package:

import 'package:swipe_back/swipe_back.dart';

Navigator.push(
  context,
  CupertinoPageRoute(
    builder: (context) => const DetailScreen(),
  ),
);

License & Attribution #

This package builds upon Flutter's native Cupertino route transitions (BSD 3-Clause). Licensed under the MIT License.

2
likes
0
points
232
downloads

Publisher

verified publisherspeakblend.com

Weekly Downloads

iOS-style full screen back swipe gesture for Flutter. Enables swiping from anywhere on the screen to navigate back, not just the left edge.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on swipe_back