gpsVerification function
Implementation
Future<bool> gpsVerification(BuildContext context) async {
final bool serviceEnabled = await Geolocator.isLocationServiceEnabled();
if (!serviceEnabled) {
if (context.mounted) {
showDialog(
context: context,
builder: (ctx) => const AlertDialog(
title: Text("GPS no activado"),
content: Text(
"Por favor verifique que su GPS esté activo e intete nuevamente"),
));
}
}
return serviceEnabled;
}