save method

Future<void> save(
  1. String fileName
)

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);
}