Skip to content
pubscout

gms_check

1.1.0, released 3 months ago by sofluffy.io

Check if Google Mobile Services is available on the Android device.

WASM-ready
$ flutter pub add gms_check
Source repository

What it does

Checks if Google Services are available on an Android device and defaults to true on other platforms. It prevents initializing unnecessary services that require Google Services.

AI-written summary of version 1.1.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want to avoid initializing services that require Google Services on devices without them
  • You need to conditionally initialize Firebase services based on GMS availability

Skip it when

  • You do not use any Google Services or Firebase features in your app

Strengths

  • Simple API with a single check method
  • Uses OptionalMethodChannel to prevent MissingPluginException on other platforms

Weaknesses

  • Only checks availability on Android, returning true by default for other platforms

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
0

Call await GmsCheck().checkGmsAvailability() once before runApp in main().

Future<void> main() async {
  await GmsCheck().checkGmsAvailability();
  runApp(const MyApp());
}

Alternatives

Packages that do the same job and could replace gms_check.