load static method

Map<String, dynamic> load(
  1. String path
)

Implementation

static Map<String, dynamic> load(String path) {
  final file = File(path);

  if (!file.existsSync()) {
    throw Exception("Template not found: $path");
  }

  final content = file.readAsStringSync();
  return jsonDecode(content);
}