StorageFolderModel class abstract
Serves as the foundational abstraction for models organized within a hierarchical storage or directory structure.
The StorageFolderModel defines a consistent way to represent any item or folder located inside a structured storage system, such as a remote bucket, file system, or nested data hierarchy.
Each instance exposes:
- current: the unique path representing its own location.
- parent: an optional reference to its parent container or folder.
This abstraction allows clean, type-safe modeling of nested storage structures, enabling path composition, traversal, and contextual operations within a bucket-like hierarchy.
Example:
class UserFolder extends StorageFolderModel<UserFolder> {
UserFolder({super.parent}) : super(current: 'users/123');
}
final userFolder = UserFolder(parent: 'company/acme');
print(userFolder.current); // users/123
print(userFolder.parent); // company/acme
- Implementers
Constructors
- StorageFolderModel({String? parent, required String current})
-
Serves as the foundational abstraction for models organized
within a hierarchical storage or directory structure.
const
Properties
- current → String
-
The unique path representing the model’s current location
within the bucket hierarchy.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- parent → String?
-
Represents the path to the parent container or directory, if any.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited