showErrorNotification method

Future<void> showErrorNotification()

Displays a notification for an error code, if it is resolvable by the user.

This method is similar to showErrorDialogFragment, but is provided for background tasks that cannot or should not display dialogs.

Implementation

Future<void> showErrorNotification() async {
  if (GoogleApiAvailabilityPlatform.instance == null) {
    throw UnsupportedError('This platform is not supported.');
  }

  await GoogleApiAvailabilityPlatform.instance!.showErrorNotification();
}