loadPathsFromJsonSync function

List<RouterPath> loadPathsFromJsonSync (String jsonString)

Implementation

List<RouterPath> loadPathsFromJsonSync(String jsonString) {
  final Map<String, dynamic> routerMap = json.decode(jsonString);
  final paths = <RouterPath>[];

  routerMap.keys.forEach((it) {
    paths.add(RouterPath.fromMap(path: it, config: routerMap[it]));
  });

  return paths;
}