Flutter · Swipe to confirm
Latch
Confirm with intent, not a tap.
A swipe-to-confirm button for Flutter. The thumb resists at first, clicks at the latch point, then runs your action with loading, success and failure states.
Demo
A recording of the demo. Open it in a new tab
What it does
- 01
Resistance at the start so a stray touch never confirms
- 02
Spring release that keeps the speed you let go at
- 03
Async confirm with a spinner, success morph or a shake on failure
- 04
Enter, Space and screen reader activation without swiping
Use it
dependencies:
latch_swipe_confirm:
git:
url: https://github.com/YagnikBarasiya23/latch_swipe_confirm.gitimport 'package:latch_swipe_confirm/latch_swipe_confirm.dart';
LatchSwipeConfirm(
label: 'Swipe to pay ₹1,499',
doneLabel: 'Paid',
failedLabel: 'Card declined',
onConfirm: () async {
await payments.charge(order); // throw, or return false, to fail
return true;
},
)Every option, the technique behind the motion and the accessibility notes are in the README on GitHub
More components
All 10- Flutter
- Web
Get in touch
Open for freelance projects, contract roles and collaborations — mobile apps and full-stack products in particular. WhatsApp gets the fastest reply.
- Phone
- +91 70488 09875
- Based in
- Rajkot, Gujarat, India
- Elsewhere