Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are running threads killed when an app exits?

If I have an async function that persists data for my Flutter app and it may take a second to finish, can I be sure that it will never be killed if the application is closed normally (i.e. no crash etc.)?

like image 395
johrpan Avatar asked Nov 07 '22 03:11

johrpan


1 Answers

All you need to do is dispose all of your controllers on

dispose();

Method

like image 56
Jaswant Singh Avatar answered Nov 11 '22 15:11

Jaswant Singh