release_to_trigger 0.0.9 release_to_trigger: ^0.0.9 copied to clipboard
release_to_trigger is a Flutter package for capturing vertical swipes and triggering actions, perfect for custom triggers like loading new content or activating app features
release_to_trigger
- Swipe Gesture & Trigger Actions for Flutter π±π₯ #
release_to_trigger
is a powerful Flutter widget designed to capture vertical swipe gestures and trigger custom actions when users pull and release the swipe at a defined height. With support for both top and bottom swipe gestures, itβs perfect for building interactive UIs, pull-to-refresh controls, or custom trigger actions like loading new content or activating specific app features.
π Key Features #
- Swipe Gesture Detection: Recognize and respond to vertical swipes, both from the top and bottom of the screen.
- Pull-to-Trigger Action: Easily define actions that get triggered when the swipe reaches a set height.
- Customizable Appearance: Modify text styles, colors, and progress indicators to match your appβs theme.
- Progress Indicator: Real-time feedback with a circular progress indicator that adjusts dynamically as the user pulls.
- User Feedback Integration: Customize swipe feedback with visual indicators and smooth animations.
β¨ Use Cases #
- Pull-to-Refresh functionality.
- Swipe-to-Activate features.
- Unlock hidden content or actions based on user interactions.
- Enhance user experience with gesture-based controls.
π₯ Why Choose release_to_trigger
? #
- π― High Customizability: Tailor the widgetβs look and behavior to your appβs design.
- π Optimized Performance: Built for smooth animations and responsiveness on any screen size.
- πΌ Versatile Implementation: Use in apps that require gesture detection, refresh controls, or interactive triggers.
π Getting Started #
Simply add the following to your pubspec.yaml
file:
dependencies:
release_to_trigger: ^0.0.2
Then, import and start using it in your project:
import 'package:release_to_trigger/release_to_trigger.dart';
πΈ Screenshots #
Showcase the widget in action:
Initial State | Triggered State |
---|---|
π§ Example Code #
Check out a sample implementation:
ReleaseToTrigger(
backgroundColor: Colors.green.withOpacity(0.2),
progressColor: Colors.green,
initialText: 'Pull down to unlock the surprise',
triggeredText: 'Release to reveal the surprise!',
triggerHeight: 250.0,
onTrigger: () {
// Action to be performed on trigger
},
child: Text('This is a customizable widget!'),
);
π Topics Covered #
This package is ideal for:
pull-to-refresh
swipe-gesture
trigger-actions
vertical-swipe
gesture-detection-flutter
β Show Your Support #
If you like release_to_trigger
, please star the repository on GitHub, leave a review on PubDev, and feel free to contribute! Your feedback helps us improve and add more exciting features!