VRouterScope constructor

VRouterScope({
  1. Key? key,
  2. required Widget child,
  3. VRouterMode vRouterMode = VRouterMode.hash,
})

Implementation

VRouterScope({
  Key? key,
  required this.child,
  this.vRouterMode = VRouterMode.hash,
}) : super(key: key) {
  // Setup the url strategy (if hash, do nothing since it is the default)
  if (!_isUrlStrategySet && vRouterMode == VRouterMode.history) {
    try {
      setPathUrlStrategy();
    } catch (e) {
      VLogPrinter.show(VMultiUrlStrategyLog());
    }

    _isUrlStrategySet = true;
  }
}