The flutter_background_service package is used to spawn services. These services stay in background doing stuff and they can also communicate with the Flutter app in foreground.
In this post you will not find a guide throughout the usage of this package. Here you can find some notes about how to create the custom icon of the Android status bar.
We assume that the package is already present in the pubspec.yaml file and the example app is working.
First of all you need to create a folder that will contain the icon:
my_flutter_project/android/app/src/main/res/drawable-anydpi-v24/
Second step: create the icon. The icon should be an SVG, so you can use Inkscape to create your vectored and colored icon. Then you have to translate the icon to an XML drawable format. Online you can find many services like this one: https://svg2vector.com/
Once downloaded the XML rename it to ic_bg_service_small.xml and place it into the folder previously created.
You should now be able to build the Flutter app and you will find in the status bar the new icon.
Cheers
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.