aboutsummaryrefslogtreecommitdiff
path: root/plugins/aves_model/lib/src/storage/volume.dart
diff options
context:
space:
mode:
authormirror <mirror@localhost>2026-11-22 08:41:00 +0900
committermirror <mirror@localhost>2026-11-22 08:41:00 +0900
commit449d8b74bd6d9dae98a07254cdfad677b920e7b0 (patch)
treec131c3528c4d517f56e19b854a7453fedb097d40 /plugins/aves_model/lib/src/storage/volume.dart
downloadaves-src-master.tar.gz
aves-src-master.zip
snapshot of aves v1.13.12 (secrets removed: android/app/google-services.json)HEADv1.13.12master
Diffstat (limited to 'plugins/aves_model/lib/src/storage/volume.dart')
-rw-r--r--plugins/aves_model/lib/src/storage/volume.dart31
1 files changed, 31 insertions, 0 deletions
diff --git a/plugins/aves_model/lib/src/storage/volume.dart b/plugins/aves_model/lib/src/storage/volume.dart
new file mode 100644
index 0000000..ff6df3d
--- /dev/null
+++ b/plugins/aves_model/lib/src/storage/volume.dart
@@ -0,0 +1,31 @@
+import 'package:equatable/equatable.dart';
+import 'package:meta/meta.dart';
+
+@immutable
+class StorageVolume extends Equatable {
+ final String? description;
+ final String path, state;
+ final bool isPrimary, isRemovable;
+
+ @override
+ List<Object?> get props => [description, path, state, isPrimary, isRemovable];
+
+ const StorageVolume({
+ required this.description,
+ required this.isPrimary,
+ required this.isRemovable,
+ required this.path,
+ required this.state,
+ });
+
+ factory StorageVolume.fromMap(Map map) {
+ final isPrimary = map['isPrimary'] ?? false;
+ return StorageVolume(
+ description: map['description'],
+ isPrimary: isPrimary,
+ isRemovable: map['isRemovable'] ?? false,
+ path: map['path'] ?? '',
+ state: map['state'] ?? '',
+ );
+ }
+}