dvDeepLinkCovers function

bool dvDeepLinkCovers(
  1. String path,
  2. String route
)

Whether the platform opens route in the application for a served path: * matches the rest of a segment, and anything after it.

Implementation

bool dvDeepLinkCovers(String path, String route) {
  final String pattern = '^${RegExp.escape(path).replaceAll(r'\*', '.*')}\$';
  return RegExp(pattern).hasMatch(route);
}