我正在尝试在 Flutter 应用程序中显示音频文件的长度。我使用了 flutter_sound 和 audioplayers 插件,但我不确定如何在不播放音频文件和获取持续时间的情况下获取音频文件的长度(我想在列表中显示每个音频文件的长度,以便用户知道)距离比赛还有多长时间)。除了在这些插件之一中使用播放音频文件的持续时间之外,我无法在网上找到任何显示如何在 dart 中获取音频文件长度的地方。有人知道如何在 Dart 中获取音频文件长度吗?
我有一个运行良好的颤振应用程序。我正在更新我的 flutter 版本和我的一些插件的版本(在最新的 XCode 版本 11 上)。我无法再构建我的应用程序,因为发生以下两种情况之一:
1)如果我没有“use_modular_headers!” 在我的 podfile 中,尝试运行时出现此错误pod install:
The Swift pod `DKPhotoGallery` depends upon `SDWebImage`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
Run Code Online (Sandbox Code Playgroud)
2)如果我添加“use_modular_headers!” 到 podfile,然后我可以成功安装 podfile,但是在构建时失败并出现此错误:
fatal error: module map file '/Users/mbpro/Documents/Perkl/ios/Pods/Headers/Private/openssl_grpc/BoringSSL-GRPC.modulemap' not found
Run Code Online (Sandbox Code Playgroud)
我发现的第二个错误是因为 GRPC 不支持模块化标题。这就是我卡住的地方,因为由于 flutter 从 …