BeamGuard constructor
const
BeamGuard({
- required List<
Pattern> pathPatterns, - required bool check(
- BuildContext context,
- BeamLocation<
RouteInformationSerializable> location
- void onCheckFailed(
- BuildContext context,
- BeamLocation<
RouteInformationSerializable> location
- BeamLocation<
RouteInformationSerializable> beamTo(- BuildContext context,
- BeamLocation<
RouteInformationSerializable> ? origin, - BeamLocation<
RouteInformationSerializable> target, - String? deepLink,
- String beamToNamed(
- BeamLocation<
RouteInformationSerializable> ? origin, - BeamLocation<
RouteInformationSerializable> target, - String? deepLink
- BeamLocation<
- BeamPage? showPage,
- bool guardNonMatching = false,
- bool replaceCurrentStack = true,
Creates a BeamGuard with defined properties.
pathPatterns
and check
must not be null.
Implementation
const BeamGuard({
required this.pathPatterns,
required this.check,
this.onCheckFailed,
this.beamTo,
this.beamToNamed,
this.showPage,
this.guardNonMatching = false,
this.replaceCurrentStack = true,
});