fromRoute method Null safety

GetNavConfig? fromRoute(
  1. String route
)

Implementation

static GetNavConfig? fromRoute(String route) {
  final res = Get.routeTree.matchRoute(route);
  if (res.treeBranch.isEmpty) return null;
  return GetNavConfig(
    currentTreeBranch: res.treeBranch,
    location: route,
    state: null,
  );
}