makeGooglePlayServicesAvailable method

Future<void> makeGooglePlayServicesAvailable()

Attempts to make Google Play Services available on this device.

Shows a dialog if the error is resolvable by user.

If the Future completes without throwing an exception, Play Services is available on this device.

Implementation

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