Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter Application : Location fetch in background

I want to keep my application running or a piece of code which can perform some operation like getting a current location and call an API to submit that location.

I saw the background_fetch plugin but it says, app can not fetch the callback before 15 minutes in background so it is not feasible solution for tracking a location to get location every 15 minutes, so is there any way that can make possible to keep running some code in background.

Any leads would be appreciated.

Thanks

like image 747
Code Runner Avatar asked Sep 19 '25 04:09

Code Runner


1 Answers

In flutter, code can be executed in background using Isolates

Isolates are Dart’s model for multithreading, though an isolate differs from a conventional thread in that it doesn’t share a memory with the main program.

Check this post for more info.

like image 192
Mangaldeep Pannu Avatar answered Sep 20 '25 19:09

Mangaldeep Pannu