A package for creating instagram like story, you can use this package to edit images and make it story ready by adding other contents over it like text and gradients.
MIT License
5
stars
10
forks
source link
Exception after StoryMaker screen is closed - Looking up a deactivated widget's ancestor is unsafe #3
After closing the screen (clicking "Add to story"), the exception below occurs.
The app does not crash, but still it should be fixed.
I suspect it can be because of PhotoView (or some other widget) is not disposed properly, or because some widget is trying to be rebuilt after the StoryMaker screen has been unmounted.
The following assertion was thrown while finalizing the widget tree:
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.
When the exception was thrown, this was the stack
#0 Element._debugCheckStateIsActiveForAncestorLookup.<anonymous closure>
package:flutter/…/widgets/framework.dart:4153
#1 Element._debugCheckStateIsActiveForAncestorLookup
package:flutter/…/widgets/framework.dart:4167
#2 Element.getElementForInheritedWidgetOfExactType
package:flutter/…/widgets/framework.dart:4193
#3 TickerMode.getNotifier
package:flutter/…/widgets/ticker_provider.dart:96
#4 TickerProviderStateMixin._updateTickerModeNotifier
package:flutter/…/widgets/ticker_provider.dart:327
#5 TickerProviderStateMixin.createTicker
package:flutter/…/widgets/ticker_provider.dart:291
#6 new AnimationController
package:flutter/…/animation/animation_controller.dart:246
#7 PhotoViewCoreState._scaleAnimationController
package:photo_view/…/core/photo_view_core.dart:112
#8 PhotoViewCoreState._scaleAnimationController (package:photo_view/src/core/photo_view_core.dart)
package:photo_view/…/core/photo_view_core.dart:1
#9 PhotoViewCoreState.dispose
package:photo_view/…/core/photo_view_core.dart:274
#10 StatefulElement.unmount
package:flutter/…/widgets/framework.dart:4983
#11 _InactiveElements._unmount
package:flutter/…/widgets/framework.dart:1926
#12 _InactiveElements._unmount.<anonymous closure>
package:flutter/…/widgets/framework.dart:1924
#13 ComponentElement.visitChildren
package:flutter/…/widgets/framework.dart:4807
#14 _InactiveElements._unmount
package:flutter/…/widgets/framework.dart:1922
#15 _InactiveElements._unmount.<anonymous closure>
package:flutter/…/widgets/framework.dart:1924
#16 _LayoutBuilderElement.visitChildren
package:flutter/…/widgets/layout_builder.dart:71
#17 _InactiveElements._unmount
package:flutter/…/widgets/framework.dart:1922
#18 _InactiveElements._unmount.<anonymous closure>
package:flutter/…/widgets/framework.dart:1924
#19 ComponentElement.visitChildren
package:flutter/…/widgets/framework.dart:4807
#20 _InactiveElements._unmount
package:flutter/…/widgets/framework.dart:1922
#21 _InactiveElements._unmount.<anonymous closure>
package:flutter/…/widgets/framework.dart:1924
#22 SingleChildRenderObjectElement.visitChildren
package:flutter/…/widgets/framework.dart:6271
#23 _InactiveElements._unmount
package:flutter/…/widgets/framework.dart:1922
#24 _InactiveElements._unmount.<anonymous closure>
package:flutter/…/widgets/framework.dart:1924
#25 .... (many more similar lines here)
...
After closing the screen (clicking "Add to story"), the exception below occurs. The app does not crash, but still it should be fixed.
I suspect it can be because of PhotoView (or some other widget) is not disposed properly, or because some widget is trying to be rebuilt after the StoryMaker screen has been unmounted.