toErrorCode method
Converts a string to an error code
Implementation
ErrorCode toErrorCode() => switch (this) {
locationPermissionDeniedErrorCode => ErrorCode.locationPermissionDenied,
unknownLocationError => ErrorCode.unknown,
_ => ErrorCode.unknown,
};