swipe_confirm_button 0.1.0
swipe_confirm_button: ^0.1.0 copied to clipboard
A universal, zero-dependency slide-to-confirm button for Flutter. Themeable, with idle/loading/success/error states, haptics and RTL support.
0.1.0 #
Initial release.
SwipeButton— themeable slide-to-confirm button with zero external dependencies.SwipeButtonController/SwipeButtonStatusfor manual state control.- Automatic mode: drives loading/success/error from the
onSwipeFuture. - Customizable colors, height, radius, icons, threshold, haptics and animations.
- Left-to-right and right-to-left (RTL) swipe directions.
- Collapse-into-a-circle loading animation.
onSwipeStart/onSwipeEnddrag callbacks.SwipeButton.expandconstructor.activeTrackColor/activeThumbColorcrossfade as the thumb advances.trackElevation/thumbElevationMaterial-like shadows.trackPaddingto inset the thumb within the track.borderRadiusaccepts anyBorderRadiusGeometry.thumbBuilderfor fully custom, status-aware thumb content.iconTransition— animated icon swap on state change (scaleFadeshrinks the old icon out and grows the new one in), plusscale/fade/rotateand a fully customthumbTransitionBuilder.hintAnimation— looping idle invitation on the thumb icon (nudge/pulse/shimmer/bounce/wiggle/none); only the icon repaints per frame.dragEffect— feedback while the thumb is grabbed (grow/lift/glow/growLift/none); the thumb is drawn in an unclipped layer so it can spill past the track edge.rollIcon— spins the idle icon like a wheel (rotation proportional to the distance swiped); composes with anydragEffect.hintDuration/iconSwitchDuration/dragEffectDurationtuning.- Accessibility: exposes a Semantics tap action to confirm, and honors
MediaQuery.disableAnimations(reduce motion). SwipeButtonThemeData/SwipeButtonTheme— app-wide defaults viaThemeData.extensions.SwipeButtonController.complete()— confirm programmatically with animation.flickToComplete/flickVelocity— a fast flick confirms below threshold.draggableTrack— drag anywhere on the track, not only the thumb.shakeOnTap— tapping (not swiping) shakes the thumb as a hint.successColor/errorColor— tint the thumb + fill per state.trackGradient/thumbGradientand a faint trailingendIcon.directionnow follows the ambientDirectionalitywhen left null (auto-RTL).
