0

I want to run dart code in background as well as when app is killed. I am making app related to when user is outside of radius (double value), I will call API using Dio. I had tried some packages to run code in background but couldnt go well. I am using Getx package. If anyone could share the code how to run code in background and app killed, it will be really helpful for me. I dont want to run code in main.dart file. You can make any controller file or something else to explain it. Thank You!

Code: class RadiusMonitorController extends GetxController with WidgetsBindingObserver {

}

lets say when this controller is registered i want to perform operations in this controller when app is in background/killed.

2
  • Please provide enough code so others can better understand or reproduce the problem. Commented Jun 24 at 8:40
  • Please check this blog if you find it helpful. medium.com/@urvashikharecha28/… Commented Jul 3 at 12:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.