onFocusLostWithReason property

void Function(bool dueToAppBackground)? onFocusLostWithReason
final

Callback on when screen is not in focus, additionally reporting whether the loss was caused by the app moving to the background (true) as opposed to the widget becoming invisible while the app stays in the foreground (false).

Implementation

final void Function(bool dueToAppBackground)? onFocusLostWithReason;