generateLink method

String? generateLink(
  1. Object? pageData
)

Returns the deep link generated by this page given pageData.

Implementation

String? generateLink(Object? pageData) {
  if (linkGenerator != null) {
    // Dart doesn't allow automatic casting 1st citizen objects who
    // have different less than 1st citizen parameters.
    // In this case, linkGenerator could be ((MyClass) => String),
    // But dart only can see ((Object) => String) and therefore
    // can't convert between them.
    // We do this trick here from inside the problematic class
    // to cast as something that we _know_ to be true.
    return linkGenerator!(pageData as R);
  }

  return null;
}