flutter - 在 Flutter 中与 miniplayer 一起使用时,BetterPlayer 会在全屏时引发错误
问题描述
在我的颤振应用程序中,我有一个迷你播放器,里面有一个better_player(一个用于播放视频的插件,基于chewie)。当我想在我的 better_player 视频中全屏播放时,它会晃动几次,然后抛出错误:
以下是日志:
V/AudioManager( 4491): playSoundEffect effectType: 0
V/AudioManager( 4491): querySoundEffectsEnabled...
D/HwAppInnerBoostImpl( 4491): asyncReportData com.example.cook_it,1,1,1,0 interval=2270
D/HiTouch_PressGestureDetector( 4491): HiTouch on notch display, width corret:81
I/HiTouch_HiTouchSensor( 4491): ORIENTATION_LANDSCAPE
W/libEGL ( 4491): EGLNativeWindowType 0x72af668010 disconnect failed
D/mali_winsys( 4491): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
W/libEGL ( 4491): EGLNativeWindowType 0x72c1a8b010 disconnect failed
D/mali_winsys( 4491): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
D/HwAppInnerBoostImpl( 4491): asyncReportData com.example.cook_it,1,2,1,11 interval=2474
I/ViewRootImpl( 4491): jank_removeInvalidNode all the node in jank list is out of time
W/libEGL ( 4491): EGLNativeWindowType 0x72af668010 disconnect failed
D/mali_winsys( 4491): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
════════ Exception caught by widgets library ═══════════════════════════════════
The following _TypeError was thrown building ValueListenableBuilder<double>(dirty, dependencies: [_LocalizationsScope-[GlobalKey#b0f8f], _InheritedTheme], state: _ValueListenableBuilderState<double>#b21c7):
type 'int' is not a subtype of type 'double'
The relevant error-causing widget was
ValueListenableBuilder<double>
package:miniplayer/miniplayer.dart:157
When the exception was thrown, this was the stack
#0 borderDouble
package:miniplayer/src/utils.dart:24
#1 _MiniplayerState.build.<anonymous closure>
package:miniplayer/miniplayer.dart:170
#2 _ValueListenableBuilderState.build
package:flutter/…/widgets/value_listenable_builder.dart:187
#3 StatefulElement.build
package:flutter/…/widgets/framework.dart:4691
#4 ComponentElement.performRebuild
package:flutter/…/widgets/framework.dart:4574
...
════════════════════════════════════════════════════════════════════════════════
D/HwAppInnerBoostImpl( 4491): asyncReportData com.example.cook_it,1,1,2,0 interval=3360
════════ Exception caught by foundation library ════════════════════════════════
setState() or markNeedsBuild() called when widget tree was locked.
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by foundation library ════════════════════════════════
setState() or markNeedsBuild() called when widget tree was locked.
════════════════════════════════════════════════════════════════════════════════
D/HiTouch_PressGestureDetector( 4491): HiTouch on notch display, height corret:81
W/libEGL ( 4491): EGLNativeWindowType 0x72af668010 disconnect failed
D/mali_winsys( 4491): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
W/libEGL ( 4491): EGLNativeWindowType 0x72c1a8b010 disconnect failed
D/mali_winsys( 4491): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
D/HwAppInnerBoostImpl( 4491): asyncReportData com.example.cook_it,1,2,2,9 interval=3525
W/ACodec ( 4491): forcing OMX state to Idle when received shutdown in ExecutingState
I/ExoPlayerImpl( 4491): Release e8aaab7 [ExoPlayerLib/2.14.2] [HWCLT, CLT-L29, HUAWEI, 28] [goog.exo.core]
E/BufferQueueProducer( 4491): [SurfaceTexture-0-4491-9] cancelBuffer: BufferQueue has been abandoned
I/chatty ( 4491): uid=10264(com.example.cook_it) JNISurfaceTextu identical 3 lines
3
E/BufferQueueProducer( 4491): [SurfaceTexture-0-4491-9] cancelBuffer: BufferQueue has been abandoned
I/chatty ( 4491): uid=10264(com.example.cook_it) JNISurfaceTextu identical 1 line
有人可以帮我解决这个问题吗?
PS。我尝试使用chewie 而不是better_player,但结果几乎相同。
解决方案
我发现了这个问题,它在我自己的代码中,与包无关。
推荐阅读
- sql - 从多个表中选择数据(Laravel)
- php - docker-compose.yml 环境变量到 php 环境变量
- c# - 从 DGV C# 中的查询中复制列标题
- git-flow - Git Flow 功能分支最佳实践
- python-3.x - 使用 pandas 中的循环更改具有多个不同 dtype 的多列 dtype
- python - 如何安装 feature_engine python 包?
- c# - 如何将 transform.eulerAngles 更改为四元数
- python - 如何避免硒中的NoSuchElementException?
- sql - SQL 查询 CASE 值在 IN 语句中不给出值
- r - 动态轴的动态 scale_y_continuous