restoreDeployment method
Restore the deployment from a local file cache.
Returns true
if successful.
Implementation
Future<bool> restoreDeployment() async {
bool success = true;
try {
final name = (await filename)!;
info("Restoring deployment from file '$name'.");
final jsonString = File(name).readAsStringSync();
deployment = SmartphoneDeployment.fromJson(
json.decode(jsonString) as Map<String, dynamic>);
} catch (exception) {
success = false;
warning('Failed to load deployment - $exception');
}
return success;
}