basePath property Null safety

String basePath

A prefix for all routes on this instance.

If this value is non-null, each route is prefixed by this value.

For example, if a route is "/users" and the value of this property is "/api", a request's path must be "/api/users" to match the route.

Trailing and leading slashes have no impact on this value.

Implementation

String get basePath => "/${_basePathSegments.join("/")}";