createHref method
Formats a Uri as an href for this history implementation.
This is primarily useful on the web (e.g. when calling
window.history.pushState), but can also be used to generate link targets.
Implementation
@override
String createHref(Uri uri) {
final buffer = StringBuffer(uri.path);
if (uri.hasQuery) buffer.write('?${uri.query}');
if (uri.hasFragment) buffer.write('#${uri.fragment}');
return buffer.toString();
}