loadJsonData function

Future loadJsonData(
  1. String filepath
)

Function that will asynchrnous load the a JSON file by the filepath

Implementation

Future<dynamic> loadJsonData(String filepath) async {
  final String jsonString = await rootBundle.loadString(filepath);
  final jsonConfig = jsonDecode(jsonString);
  return jsonConfig;
}