From 6df02e36ea5b27305fdcf80fa8c9b8c6904d814f Mon Sep 17 00:00:00 2001 From: Husain Fadhilah Date: Wed, 10 Jan 2024 01:38:03 +0800 Subject: [PATCH] Fix: cannot access context in `onSwipe` when no cards left then "destroy" the widget tree (#29) --- lib/src/card_swiper.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/card_swiper.dart b/lib/src/card_swiper.dart index 3f3b2e4..e30b5c7 100644 --- a/lib/src/card_swiper.dart +++ b/lib/src/card_swiper.dart @@ -248,9 +248,9 @@ class _CardSwiperState extends State @override void dispose() { - super.dispose(); _animationController.dispose(); widget.controller?.removeListener(_controllerListener); + super.dispose(); } @override