Please follow below steps for HTTP API calling in flutter
Read moreWhat is foreground service in Flutter?
foreground service is either for running long running tasks . that is why i named it android long task. or running a task non stop. now you can run foreground service non stop. and have your code run on a periodic basis.
Read moreCan Flutter run in the background?
Starting Flutter Engine in the background Can Android/iOS starts the Flutter engine in the background? Yes! We’ll first need to register a Dart callback function which will only be invoked whenever a background job is started by the native code.
Read moreWhat is background services in Android?
A background service performs an operation that isn’t directly noticed by the user . For example, if an app used a service to compact its storage, that would usually be a background service.
Read more