load static method
Loads data.json from the working folder (a new 1080×2160 comics when there is none).
Implementation
static Future<Comics> load() async {
final dataFile = File('${await FileManager.tempFolder}/data.json');
if (await dataFile.exists()) {
final json =
jsonDecode(await dataFile.readAsString()) as Map<String, dynamic>;
return Comics.fromJson(json);
}
return Comics(width: 1080, height: 2160);
}