saveToLocation static method
Implementation
static Future<void> saveToLocation(
Token token, Directory directory, String? filename) async {
var file = File(directory.path + (filename ?? 'userData.json'));
if (!(await file.exists())) {
await file.create(recursive: true);
}
await file.writeAsString(jsonEncode(token));
}