readJson method

Future<Map<String, dynamic>> readJson(
  1. String fileName
)

Reads a json file from the assets folder.

Implementation

Future<Map<String, dynamic>> readJson(String fileName) async {
  final content = await readFile(fileName);
  return jsonDecode(content) as Map<String, dynamic>;
}