appIsForeground method

Future<bool> appIsForeground()

Whether the app is in the foreground. Answered authoritatively on iOS (UIApplication.applicationState), where a VoIP push can launch the app in the BACKGROUND and no permission dialog can be presented. Defaults to true where unimplemented, preserving the caller's normal behaviour.

Implementation

Future<bool> appIsForeground() async => true;