BrowserRouter<T> constructor

BrowserRouter<T>({
  1. bool hash = false,
  2. bool listen = false,
})

Set hash to true to use hash routing instead of push state. listen as true will call listen after initialization.

Implementation

factory BrowserRouter({bool hash = false, bool listen = false}) {
  return hash
      ? _HashRouter<T>(listen: listen)
      : _PushStateRouter<T>(listen: listen);
}