removeQueryArgs method

  1. @override
void removeQueryArgs()
override

It cleans the query args from the current url

Implementation

@override
void removeQueryArgs() {
  String currentUrl = html.window.location.href;
  String afterDomain = currentUrl.substring(currentUrl.lastIndexOf("/") + 1);
  String beforeQueryString = afterDomain.split("?")[0];
  html.window.history.pushState({}, html.document.title, "/$beforeQueryString");
}