CloudMediaWatcher class
Utility class for watching media lifecycle beyond basic CloudMedia.watch.
Provides helpers for watching multiple items, filtering by status, waiting for specific states, and tracking upload progress.
Always call dispose when done to cancel all subscriptions:
final watcher = CloudMediaWatcher();
// ... use watcher ...
watcher.dispose();
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void - Cancel all active subscriptions and release resources.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
watchMultiple(
List< String> mediaIds) → Stream<List< CloudMediaItem> > - Watch multiple media items simultaneously.
-
watchStatus(
String mediaId) → Stream< CloudMediaStatus> - Stream only the CloudMediaStatus for a media item.
-
watchUntil(
String mediaId, CloudMediaStatus targetStatus, {Duration timeout = const Duration(seconds: 60)}) → Future< CloudMediaItem> -
Wait until a media item reaches
targetStatus. -
watchUploadProgress(
String mediaId) → Stream< double> - Stream upload progress (0.0 → 1.0) for a media item.
-
watchWithStatusFilter(
String mediaId, List< CloudMediaStatus> statuses) → Stream<CloudMediaItem> -
Watch a media item, only emitting when its status is in
statuses.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited