loadJson static method

Future loadJson(
  1. String path
)

Loads a JSON file from local assets.

The path argument is the path to the JSON file to be loaded.

Returns a Future that completes with a parsed JSON object.

Implementation

static Future<dynamic> loadJson(String path) async {
  final str = await loadString(path);
  return jsonDecode(str);
}