redirectGuardToName method

  1. @override
Future<QNameRedirect?> redirectGuardToName(
  1. String path
)
override

This function will be called before onEnter and after onMatch if the result from this page is null the page will be created or the result should be the name of the page to redirect to. but here you can redirect to name with params instead of path.

Implementation

@override
Future<QNameRedirect?> redirectGuardToName(String path) async {
  if (redirectGuardNameFunc != null) {
    return redirectGuardNameFunc!(path);
  }
  return null;
}