I want to safely close some process before my flutter application is terminated. I tried with didChangeAppLifecycleState but detached never called. How can I detect that my