didChangeAppLifecycleState method

  1. @override
Future<void> didChangeAppLifecycleState(
  1. AppLifecycleState state
)
override

Handle application events.

Implementation

@override
Future<void> didChangeAppLifecycleState(AppLifecycleState state) async {
  super.didChangeAppLifecycleState(state);

  // When app has resumed from background.
  if (state == AppLifecycleState.resumed) {
    await updateVersionInfo();

    /// Trigger the stream to indicate another evaluation should be performed.
    /// The value will always be true.
    _streamController.add(true);
  }
}