Drawer-Behavior-Flutter
Drawer-Behavior-Flutter copied to clipboard
Active animation ticker and Lifecycle assertion failure.
Hello,
When I am trying to pop away from an open drawer (when user signs out), I am presented with the following errors. Is this a bug, or something I have incorrectly done on my side?
======== Exception caught by widgets library =======================================================
The following assertion was thrown while finalizing the widget tree:
_DrawerScaffoldState
_DrawerScaffoldState
Tickers used by AnimationControllers should be disposed by calling dispose() on the AnimationController itself. Otherwise, the ticker will leak.
The offending ticker was: _WidgetTicker(created by _DrawerScaffoldState
When the exception was thrown, this was the stack:
#0 TickerProviderStateMixin.dispose. (package:flutter/src/widgets/ticker_provider.dart:219:13)
#1 TickerProviderStateMixin.dispose (package:flutter/src/widgets/ticker_provider.dart:237:6)
#2 _DrawerScaffoldState.dispose (package:drawerbehavior/drawer_scaffold.dart:140:11)
#3 StatefulElement.unmount (package:flutter/src/widgets/framework.dart:4800:11)
#4 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1847:13)
...
======== Exception caught by foundation library ==================================================== The following assertion was thrown while dispatching notifications for MenuController: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4188 pos 12: '_lifecycleState != _ElementLifecycle.defunct': is not true.
Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause. In either case, please report this assertion by filing a bug on GitHub: https://github.com/flutter/flutter/issues/new?template=2_bug.md
When the exception was thrown, this was the stack:
#2 Element.markNeedsBuild (package:flutter/src/widgets/framework.dart:4188:12)
#3 State.setState (package:flutter/src/widgets/framework.dart:1108:15)
#4 _DrawerScaffoldState.createController. (package:drawerbehavior/drawer_scaffold.dart:159:26)
#5 ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:243:25)
#6 new MenuController. (package:drawerbehavior/drawer_scaffold.dart:574:9)
...
The MenuController sending notification was: Instance of 'MenuController'
======== Exception caught by foundation library ==================================================== The following assertion was thrown while dispatching notifications for MenuController: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4188 pos 12: '_lifecycleState != _ElementLifecycle.defunct': is not true.
Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause. In either case, please report this assertion by filing a bug on GitHub: https://github.com/flutter/flutter/issues/new?template=2_bug.md