replaceFragment method
Replaces the hash fragment on the current pathname in place without pushing a new history entry.
await controller.replaceFragment('section-2');
Implementation
Future<void> replaceFragment(String fragment) async {
await setFragment(fragment, replace: true);
}