BeamerDelegate constructor

BeamerDelegate({
  1. required LocationBuilder locationBuilder,
  2. String initialPath = '/',
  3. void routeListener(
    1. RouteInformation,
    2. BeamerDelegate
    )?,
  4. void buildListener(
    1. BuildContext,
    2. BeamerDelegate
    )?,
  5. Listenable? updateListenable,
  6. @Deprecated('No longer used by this package, please remove any references to it. ' 'This feature was deprecated after v1.0.0.') bool preferUpdate = true,
  7. bool removeDuplicateHistory = true,
  8. BeamPage notFoundPage = BeamPage.notFound,
  9. BeamLocation<RouteInformationSerializable>? notFoundRedirect,
  10. String? notFoundRedirectNamed,
  11. List<BeamGuard> guards = const <BeamGuard>[],
  12. List<NavigatorObserver> navigatorObservers = const <NavigatorObserver>[],
  13. TransitionDelegate transitionDelegate = const DefaultTransitionDelegate(),
  14. TransitionDelegate beamBackTransitionDelegate = const ReverseTransitionDelegate(),
  15. bool onPopPage(
    1. BuildContext context,
    2. Route route,
    3. dynamic result
    )?,
  16. bool setBrowserTabTitle = true,
  17. bool initializeFromParent = true,
  18. bool updateFromParent = true,
  19. bool updateParent = true,
  20. Set<String> clearBeamingHistoryOn = const <String>{},
})

Creates a BeamerDelegate with specified properties.

locationBuilder is required to process the incoming navigation request.

Implementation

BeamerDelegate({
  required this.locationBuilder,
  this.initialPath = '/',
  this.routeListener,
  this.buildListener,
  this.updateListenable,
  @Deprecated(
    'No longer used by this package, please remove any references to it. '
    'This feature was deprecated after v1.0.0.',
  )
  this.preferUpdate = true,
  this.removeDuplicateHistory = true,
  this.notFoundPage = BeamPage.notFound,
  this.notFoundRedirect,
  this.notFoundRedirectNamed,
  this.guards = const <BeamGuard>[],
  this.navigatorObservers = const <NavigatorObserver>[],
  this.transitionDelegate = const DefaultTransitionDelegate(),
  this.beamBackTransitionDelegate = const ReverseTransitionDelegate(),
  this.onPopPage,
  this.setBrowserTabTitle = true,
  this.initializeFromParent = true,
  this.updateFromParent = true,
  this.updateParent = true,
  this.clearBeamingHistoryOn = const <String>{},
}) {
  _currentBeamParameters = BeamParameters(
    transitionDelegate: transitionDelegate,
  );

  configuration = RouteInformation(uri: Uri.parse(initialPath));

  updateListenable?.addListener(_update);
}