import '../assets/constants.dart' as constants; class Settings { final String exportDirectoryPath; Settings._({required this.exportDirectoryPath}); Map toJson() { return {'exportDirectoryPath': exportDirectoryPath}; } factory Settings.fromJson(Map json) { return Settings._( exportDirectoryPath: json['exportDirectoryPath'] as String, ); } factory Settings.defaults() { return Settings._( exportDirectoryPath: constants.defaultAndroidExportDirectory, ); } Settings copyWith({String? exportDirectoryPath}) { return Settings._( exportDirectoryPath: exportDirectoryPath ?? this.exportDirectoryPath, ); } }