RoutePath constructor

RoutePath({
  1. String path = '/',
  2. String pathType = 'prefix',
  3. bool stripPrefix = false,
  4. Object? targetPort,
  5. RouteContentSpec? targetContent,
  6. String? unavailable,
})

Implementation

RoutePath({this.path = '/', this.pathType = 'prefix', this.stripPrefix = false, this.targetPort, this.targetContent, this.unavailable})
  : assert((targetPort == null) != (targetContent == null), 'RoutePath requires exactly one target'),
    assert(targetContent == null || !stripPrefix, 'content routes always strip the matched route path'),
    assert(targetContent == null || unavailable == null, 'unavailable is supported only for service paths');