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

A Flutter package that provides a draggable page route.

Cupertino Route #

A Flutter package that enhances navigation with a customizable drag-to-go-back gesture that works from anywhere on the screen, providing a more intuitive and iOS-like navigation experience.

Features #

  • 🔙 Drag from Anywhere: Navigate back by dragging from anywhere on the screen, not just from the edge
  • 🎨 Beautiful Animations: Smooth, physics-based animations for transitions
  • 📐 Flexible Integration: Works with existing navigation systems and state management solutions
  • 📱 Native Feel: Provides an iOS-like experience on any platform

Getting Started #

Add the package to your pubspec.yaml file:

dependencies:
  cupertino_route: ^0.0.1

Then run:

flutter pub get

Demo! #

Usage #

import 'package:cupertino_route/cupertino_route.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      // Wrap your route in CupertinoRoute to enable drag-from-anywhere feature
      onGenerateRoute: (settings) {
        return CupertinoRoute(
          settings: settings,
          builder: (context) {
            // Your page content
            return YourPage();
          },
        );
      },
      home: HomePage(),
    );
  }
}

Contributing #

Contributions are welcome! Please feel free to submit a Pull Request.

License #

This project is licensed under the MIT License - see the LICENSE file for details.

3
likes
140
points
39
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package that provides a draggable page route.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, provider, vector_math

More

Packages that depend on cupertino_route