locationOr method

Location locationOr(
  1. Location onError(
    1. Error error
    )
)

Allows you to access the location if it is successful or to replace the location with a different value based on an error

Implementation

Location locationOr(Location Function(Error error) onError) =>
    isSuccess ? _location! : onError(_error!);