resolveDeepLinks function

DeepLinkHandler? resolveDeepLinks(
  1. BuildContext context,
  2. dynamic uri
)

Implementation

DeepLinkHandler? resolveDeepLinks(BuildContext context, uri) {
  final router = SunnyRouting.router;
  final match = router.matchRoute("$uri");
  if (match == null) {
    return null;
  } else {
    return (context) async {
      final result = await match.route.go(context, args: match.parameters);

      /// Inspect result?
      return result;
    };
  }
}