Fix: cannot access context in `onSwipe` when no cards left then "destroy" the widget tree (#29)

This commit is contained in:
Husain Fadhilah 2024-01-10 01:38:03 +08:00 committed by GitHub
parent 1f23f08ea1
commit 6df02e36ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -248,9 +248,9 @@ class _CardSwiperState<T extends Widget> extends State<CardSwiper>
@override
void dispose() {
super.dispose();
_animationController.dispose();
widget.controller?.removeListener(_controllerListener);
super.dispose();
}
@override