简体   繁体   English

由于音频过多,Flutter 应用程序大小增加

[英]Flutter app size increased due to too many audios

I am working on a Flutter application and I have more than 100 sounds that users can play for educational purposes.我正在开发一个 Flutter 应用程序,我有100 多种声音可供用户播放以用于教育目的。

I am not using any server or Firebase.我没有使用任何服务器或 Firebase。 Every audio is almost 1 MB .每个音频几乎是1 MB With that assets folder size will be more than 100 and app size will increase too.资产文件夹大小将超过100 ,应用程序大小也会增加。

Can I store all the audio in the SQLite Database?我可以将所有音频存储在 SQLite 数据库中吗? Is there any other way?还有别的办法吗?

You can compress your audio files using the flutter_sound package, it'll help you to decrease the size of your audio files, and don't forget to run flutter clean before compiling your app, unless your app size will be more than that size that you expect to be.您可以使用flutter_sound包压缩您的音频文件,它将帮助您减小音频文件的大小,并且不要忘记在编译您的应用程序之前运行flutter clean ,除非您的应用程序大小将超过该大小你希望成为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM