saveState method
Persists record to .flutter_setup/releases/current_state.json.
Implementation
Future<String> saveState(
String projectPath,
ReleaseStateRecord record, {
bool dryRun = false,
}) async {
final filePath = getCurrentStateFilePath(projectPath);
if (dryRun) return filePath;
final dir = Directory(getStateDirectory(projectPath));
if (!await dir.exists()) {
await dir.create(recursive: true);
}
final file = File(filePath);
await file.writeAsString(record.encodeJson());
return filePath;
}