FLUTTER ECOSYSTEM

cupertino_will_pop_scope

Enables 'onWillPop' callbacks on Cupertino page transitions and improves visual feedback of rejected "Swipe to go back" gestures.

Latest version
1.2.1
30-day downloads
6.5K
Likes
58
Pub points
140

Package Overview

Selection guidance generated from public package information. For reference only.

Overview

The cupertino_will_pop_scope package extends Flutter's Cupertino widgets by enabling onWillPop callbacks during page transitions on iOS-style navigation. It enhances user experience by providing visual feedback when a swipe-to-go-back gesture is rejected, ensuring smoother and more intuitive navigation. This package is particularly useful for apps that require custom confirmation logic before navigating back, such as form validation or unsaved changes. It integrates seamlessly with existing CupertinoPageScaffold and CupertinoPageRoute implementations.

Use cases
  • Handling unsaved changes before navigation
  • Custom back gesture validation
  • Improving UX in iOS-style navigation
  • Preventing accidental navigation
  • Implementing confirmation dialogs on back swipe
  • Enhancing swipe-back feedback
Key features
  • Supports onWillPop in Cupertino transitions
  • Visual feedback for rejected swipe gestures
  • Works with CupertinoPageScaffold and routes
  • Minimal boilerplate integration
  • Cross-platform compatibility
  • Clean API for back gesture control
Suitable for
  • iOS-style apps using Cupertino navigation
  • Apps needing custom back navigation logic
  • Developers enhancing swipe-back UX
  • Projects requiring confirmation before pop
  • Teams building consistent mobile navigation
  • Flutter apps targeting multiple platforms
Considerations
  • Requires CupertinoPageScaffold usage
  • Limited to iOS-style navigation patterns
  • May conflict with other route interceptors
  • Not needed for Material design apps
  • Best used with explicit back handling
  • Does not affect Android back behavior
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add cupertino_will_pop_scope

Categories

Source repository

Related projects

No data available yet.