gms_check 1.0.1 gms_check: ^1.0.1 copied to clipboard
This tiny plugin simply check if Google Services is avalable in the Android device.
gms_check #
This tiny plugin simply checks if Google Services is available on the Android device.
For other platform, it always return true
as default.
Usage #
- Call
await GmsCheck().checkGmsAvailability()
beforerunApp()
inmain()
.
Future<void> main() async {
/// Need to call GmsCheck().checkGmsAvailability()
/// only once before runApp function.
await GmsCheck().checkGmsAvailability();
runApp(const MyApp());
}
- Use
GmsCheck().isGmsAvailable
any where in the app.
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: Text('GMS available: ${GmsCheck().isGmsAvailable}'),
),
),
);
}