save method
Save configuration to file
Implementation
Future<void> save(String fileName) async {
final file = File(fileName);
final encoder = JsonEncoder.withIndent(' ');
final jsonString = encoder.convert(_toJson());
await file.writeAsString(jsonString);
}