IOPersistentProperties constructor

IOPersistentProperties(
  1. String name, {
  2. String? documentDirPath,
  3. FileSystem fs = fileSystem,
})

Implementation

IOPersistentProperties(
  this.name, {
  String? documentDirPath,
  FileSystem fs = fileSystem,
}) : _fs = fs {
  final fileName = name.replaceAll(' ', '_');
  documentDirPath ??= FileSystemExtension._userHomeDir;
  _file = _fs.file(path.join(documentDirPath, fileName));
  if (!_file.existsSync()) {
    _file.createSync(recursive: true);
  }
  syncSettings();
}