gms_check 1.0.2 copy "gms_check: ^1.0.2" to clipboard
gms_check: ^1.0.2 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'),
        ),
      ),
    );
  }
}
7
likes
140
pub points
96%
popularity

Publisher

verified publishersofluffy.io

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on gms_check