getUserGeoPosition function

Future<Either<Exception, Position>> getUserGeoPosition()

Determine the current position of the device.

When the location services are not enabled or permissions are denied the Future will return an error.

Implementation

Future<Either<Exception, Position>> getUserGeoPosition() async {
  try {
    final position = await _get();
    return Right(position);
  } catch (e) {
    return Left(e as Exception);
  }
}