2021-10-09 13:37:08 +08:00
|
|
|
import 'package:dde_gesture_manager/models/scheme.dart';
|
|
|
|
|
|
2021-10-09 18:42:12 +08:00
|
|
|
export 'local_schemes_web.dart' if (dart.library.io) 'local_schemes_linux.dart';
|
|
|
|
|
|
2021-10-09 13:37:08 +08:00
|
|
|
abstract class LocalSchemeEntry {
|
|
|
|
|
Scheme scheme;
|
|
|
|
|
DateTime lastModifyTime;
|
|
|
|
|
String path;
|
|
|
|
|
|
|
|
|
|
LocalSchemeEntry({
|
|
|
|
|
required this.path,
|
|
|
|
|
required this.scheme,
|
|
|
|
|
required this.lastModifyTime,
|
|
|
|
|
});
|
|
|
|
|
|
2021-10-09 18:42:12 +08:00
|
|
|
LocalSchemeEntry.systemDefault()
|
|
|
|
|
: this.path = '',
|
|
|
|
|
this.scheme = Scheme.systemDefault(),
|
|
|
|
|
|
|
|
|
|
/// max value of DateTime 
|
|
|
|
|
this.lastModifyTime = DateTime.fromMillisecondsSinceEpoch(8640000000000000);
|
|
|
|
|
|
2021-10-09 13:37:08 +08:00
|
|
|
save();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
abstract class LocalSchemesInterface<T extends LocalSchemeEntry> {
|
|
|
|
|
Future<List<T>> get schemeEntries;
|
|
|
|
|
}
|