match<T> method
Allows you to access the location if it is successful or the error if it is not
Implementation
T match<T>({
required T Function(Location location) onSuccess,
required T Function(Error error) onError,
}) =>
isSuccess ? onSuccess(_location!) : onError(_error!);