1

I want to make a few flutter function calls for leaving or closing the resources acquired by the flutter app in an event of app crash or moving into the background.

These life cycle methods are available in the SceneDelegate.swift and AppDelegate.swift.

These are some of the methods available which handles the life cycle when the app crashes are is closed in the middle.

sceneDidDisconnect
sceneWillResignActive
sceneWillEnterForeground

I want to make flutter function calls from these functions.

However any alternative would be better so I can perform few functions before the app goes into background or gets crashed or is closed abruptly.

Akash g krishnan
  • 469
  • 5
  • 16

1 Answers1

0

In order you want to check if app is in background or not you can try this Flutter Widgets Binding Observer

cahyo
  • 597
  • 2
  • 5
  • 14