UploadState constructor

const UploadState({
  1. required String resourceId,
  2. required bool isUploading,
})

Represents the current uploading state of a specific file resource.

This model is emitted by the StorageUpload system to reflect whether a given file is actively being uploaded. It allows reactive UI elements or controllers to respond to upload start/stop events.

The resourceId identifies the file uniquely, while isUploading indicates whether the upload is currently in progress.

Example:

final state = UploadState(resourceId: 'file_789', isUploading: true);
print(state.isUploading); // true

Implementation

const UploadState({required this.resourceId, required this.isUploading});