getFile method
Implementation
Future<String> getFile(String jsonString) async {
var applicationDirectory = await getApplicationDocumentsDirectory();
final String location = '${applicationDirectory.path}/my_app.json';
final File file = File(location);
await file.writeAsString(jsonString);
return location;
}