How to make a task run in the background in Flutter

可紊 提交于 2020-01-24 05:49:04

问题


I have a music app that streams audio online. The only problem is it gets killed every time I exit the app which is not good for the user. They need it to keep running in the background even after exiting. How can I achieve this?


回答1:


Can I run Dart code in the background of an Flutter app?

Yes, you can run Dart code in a background process on both iOS and Android. For more information, see the Medium article Executing Dart in the Background with Flutter Plugins and Geofencing.



来源:https://stackoverflow.com/questions/50790173/how-to-make-a-task-run-in-the-background-in-flutter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!