Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

多个页面都使用了swiper,来回切换页面导致的问题 #105

Open
shiyu1991 opened this issue Aug 6, 2024 · 0 comments
Open

Comments

@shiyu1991
Copy link

Unhandled Exception: Looking up a deactivated widget's ancestor is unsafe.
At this point the state of the widget's element tree is no longer stable.
To safely refer to a widget's ancestor in its dispose() method, save a reference to the ancestor by calling dependOnInheritedWidgetOfExactType() in the widget's didChangeDependencies() method.
#0 Element._debugCheckStateIsActiveForAncestorLookup. (package:flutter/src/widgets/framework.dart:4558:9)
#1 Element._debugCheckStateIsActiveForAncestorLookup (package:flutter/src/widgets/framework.dart:4572:6)
#2 Element.getElementForInheritedWidgetOfExactType (package:flutter/src/widgets/framework.dart:4607:12)
#3 Element.getInheritedWidgetOfExactType (package:flutter/src/widgets/framework.dart:4602:12)
#4 TickerMode.getNotifier (package:flutter/src/widgets/ticker_provider.dart:98:50)
#5 TickerProviderStateMixin._updateTickerModeNotifier (package:flutter/src/widgets/ticker_provider.dart:330:58)
#6 TickerProviderStateMixin.createTicker (package:flutter/src/widgets/ticker_provider.dart:294:7)
#7 new AnimationController.unbounded (package:flutter/src/animation/animation_controller.dart:278:21)
#8 new DrivenScrollActivity (package:flutter/src/widgets/scroll_activity.dart:624:39)
#9 ScrollPositionWithSingleContext.animateTo (package:flutter/src/widgets/scroll_position_with_single_context.dart:186:43)
#10 PageController.animateToPage (package:flutter/src/widgets/page_view.dart:199:21)
#11 _TransformerPageViewState.onChangeNotifier (package:card_swiper/src/transformer_page_view/transformer_page_view.dart:583:14)
#12 ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:403:24)
#13 IndexController.next (package:card_swiper/src/transformer_page_view/index_controller.dart:110:5)
#14 _SwiperTimerMixin._onTimer (package:card_swiper/src/swiper.dart:391:24)
#15 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
#16 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
#17 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant