prepareExternalUrl method
Implementation
@override
String prepareExternalUrl(String internal) {
var url = Location.joinWithSlash(_baseHref, internal);
// It's convention that if the hash path is empty, we omit the `#`; however,
// if the empty URL is pushed it won't replace any existing fragment. So
// when the hash path is empty, we instead return the location's path and
// query.
return url.isEmpty
? '${_platformLocation.pathname}${_platformLocation.search}'
: '#$url';
}