readJsonFileAsMapFromUrl static method
Read file as String from provided path and return as Map
Implementation
static Future<Map<String, dynamic>> readJsonFileAsMapFromUrl(
String jsonFileUrl) async {
try {
File file = File(jsonFileUrl);
var jsonString = await json.decode(await file.readAsString());
return jsonString;
} catch (e) {
TGLog.e("Unable to load $jsonFileUrl");
TGLog.e("Error : $e");
}
return <String, dynamic>{};
}