gms_check 1.0.3 copy "gms_check: ^1.0.3" to clipboard
gms_check: ^1.0.3 copied to clipboard

PlatformAndroid

This tiny plugin simply check if Google Services is avalable in the Android device.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:gms_check/gms_check.dart';

Future<void> main() async {
  /// Need to call GmsCheck().checkGmsAvailability()
  /// only once before runApp function.
  await GmsCheck().checkGmsAvailability();

  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('GMS available: ${GmsCheck().isGmsAvailable}\n'),
        ),
      ),
    );
  }
}
9
likes
160
points
1.25k
downloads

Publisher

verified publishersofluffy.io

Weekly Downloads

This tiny plugin simply check if Google Services is avalable in the Android device.

Repository (GitHub)

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on gms_check