onForegroundLost method

void onForegroundLost()

It means, for example, that the user sent your app to the background by opening another app or turned off the device's screen while your widget was visible.

Implementation

void onForegroundLost() {}