flutter - 为什么在 Flutter 的 Chewie 视频中没有全屏应用更改主题?
问题描述
我已将自定义主题数据应用于 Chewie 视频,它工作正常,但在全屏播放视频时不起作用,它只是返回默认主题
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
Expanded(
child: Center(
child: _chewieController != null &&
_chewieController.videoPlayerController.value.isInitialized
? Theme(
data: Theme.of(context).copyWith(
accentColor: kPrimaryColor,
backgroundColor: kLightPrimaryColor,
iconTheme: IconThemeData(color: kPrimaryColor),
),
child: Chewie(
controller: _chewieController,
),
)
: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
LoadingCircle(),
SizedBox(height: 20),
Text('Loading'),
],
),
),
),
],
);
}
解决方案
我发现现在工作的唯一方法是将主题添加到整个应用程序
推荐阅读
- jquery-plugins - mmenu.js:如何搜索同义词?
- bash - 权限错误 - MacOS - 打开 /Users/username/.docker/.token_seed: 权限被拒绝
- teradata - Teradata,将字段拆分为几行使用 STRTOK_SPLIT_TO_TABLE和 <\b> 语法错误
- javascript - 我的不和谐机器人的 discord-xp 问题“无法读取未定义的属性‘缓存’
- sql - 在名称中包含撇号而不导致语法错误
- swift - SwiftUI 如何使用带有自定义对象数组的 Dict 进行 ForEach 自动更新
- c# - 'BuildRenderTree(RenderTreeBuilder)':找不到合适的方法来覆盖
- python - 如何将模型的标签列表添加到弹性搜索索引?
- ios - 在 iPhone 12 上构建应用程序时不再支持此代码签名
- reactjs - 只要我拖放,无论映射到选中的功能如何,复选框都会设置为 true,我该如何解决这个问题?