DocumentNetworkMedia class
Represents document URLs.
Supports documents like PDF, DOC, XLSX, etc. accessible via URL. Supports both Uri and String constructors.
- Inheritance
-
- Object
- MediaSource<
DocumentType> - NetworkMediaSource<
DocumentType> - DocumentNetworkMedia
Constructors
- DocumentNetworkMedia(Uri uri, {String? mimeType, String? name, FileSize? size})
- Creates a DocumentNetworkMedia from a Uri object.
- DocumentNetworkMedia.url(String url, {String? mimeType, String? name, FileSize? size})
- Creates a DocumentNetworkMedia from a URL string.
Properties
- extension → String
-
Extracts the file extension from the name.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- metadata → DocumentType
-
Metadata about the media type (e.g., VideoType, AudioType).
finalinherited
- mimeType → String?
-
The MIME type of the media, if available.
finalinherited
- name → String
-
The name or identifier of the media.
finalinherited
-
props
→ List<
Object?> -
Includes the URI in equality comparisons.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → FileSize?
-
The size of the media, if known.
finalinherited
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited - uri → Uri
-
The network URI pointing to the media.
finalinherited
Methods
-
fold<
T> ({T file(FileMediaSource< DocumentType> fileMedia)?, T memory(MemoryMediaSource<DocumentType> memoryMedia)?, T network(NetworkMediaSource<DocumentType> networkMedia)?, T asset(AssetMediaSource<DocumentType> assetMedia)?, T thumbnail(ThumbnailMediaSource<DocumentType, dynamic> thumbnailMedia)?, required T orElse()}) → T -
Performs pattern matching on media sources using a fold-like pattern.
inherited
-
isAnyType(
List< Type> list) → bool -
Checks if this media source's runtime type is in the given list.
inherited
-
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