saveJsonFromPath function
Implementation
Future<void> saveJsonFromPath(String path, dynamic data) async {
final file = File(path);
if (!await file.exists()) {
await file.create(recursive: true);
}
await file.writeAsString(json.encode(data));
}