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
Looking up a deactivated widget's ancestor is unsafe #11
Comments
作者您好,非常感谢您开源这么强大的库!! |
收到,请问你用的是模拟器还是真机,系统版本以及型号提供一下 |
您好, 我使用的是 iPhone 7 真机, iOS 13.3.1 |
经过测试, 我发现好像是在 Navigator.pop(context) 之后, 播放器内部的MediaQuery.of 不断的使用 context 而引发, 不知道是不是这样 |
好的,安排。ps: 你是单页面还是多页面,播放器是在首页还是子页面调用 Navigator.pop |
您好, 播放器是在子页面进行的 Navigator.pop(context) |
一样的问题,不知道是不是我在一个list里使用了多个导致的。 |
等我发布新的版本,你再试试,今天晚上发一版 |
Hello, I have the same problem. In my case, I am using a PageView and when leaving the page with the player and returning it is in a loop repeating this error.
Running on a real device on Android 9. |
Thanks for your feedback. This is a know BUG that i have fixed and i'll release a version today. |
@niicolasalves @z234009184 I'll fixed this bug with the version 1.0.7 |
════════ Exception caught by scheduler library ═════════════════════════════════════════════════════
The following assertion was thrown during a scheduler callback:
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. (package:flutter/src/widgets/framework.dart:3508:9)
#1 Element._debugCheckStateIsActiveForAncestorLookup (package:flutter/src/widgets/framework.dart:3522:6)
#2 Element.dependOnInheritedWidgetOfExactType (package:flutter/src/widgets/framework.dart:3564:12)
#3 MediaQuery.of (package:flutter/src/widgets/media_query.dart:793:38)
#4 _AwsomeVideoPlayerState.initState.. (package:awsome_video_player/src/video.dart:113:38)
...
════════════════════════════════════════════════════════════════════════════════════════════════════
The text was updated successfully, but these errors were encountered: