flutter_hms_gms_availability 1.0.0 copy "flutter_hms_gms_availability: ^1.0.0" to clipboard
flutter_hms_gms_availability: ^1.0.0 copied to clipboard

outdated

Flutter plugin to detect HMS and GMS availability. Always return False in iOS.

example/lib/main.dart

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

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  bool gms, hms;

  @override
  void initState() {
    super.initState();
    FlutterHmsGmsAvailability.isGmsAvailable.then((t) {
      setState(() {
        gms = t;
      });
    });
    FlutterHmsGmsAvailability.isHmsAvailable.then((t) {
      setState(() {
        hms = t;
      });
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('HMS/GMS Availability'),
        ),
        body: Center(
          child: Text('GMS Available:  $gms\nHMS Available:  $hms'),
        ),
      ),
    );
  }
}
15
likes
30
pub points
93%
popularity

Publisher

verified publisher3b.my

Flutter plugin to detect HMS and GMS availability. Always return False in iOS.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_hms_gms_availability