loadJson static method

Future<MapEntry<String, dynamic>> loadJson(
  1. String path,
  2. String? raw
)

Implementation

static Future<MapEntry<String, dynamic>> loadJson(
    String path, String? raw) async {
  String data;
  if (raw != null && raw != '') {
    data = raw;
  } else {
    data = await rootBundle.loadString(path);
  }
  return MapEntry<String, dynamic>(path, json.decode(data));
}