prepareExternalUrl method
- String internalUrl
override
Given a path that's internal to the app, create the external url that will be used in the browser.
Implementation
@override
String prepareExternalUrl(String internalUrl) {
if (internalUrl.isEmpty) {
internalUrl = '/';
}
assert(
internalUrl.startsWith('/'),
"When using PathUrlStrategy, all route names must start with '/' because "
"the browser's pathname always starts with '/'. "
"Found route name: '$internalUrl'",
);
return '$_basePath$internalUrl';
}