MediaFile class

Represents a media file with metadata

Constructors

MediaFile({required String path, required String name, required MediaType type, required int size, Duration? duration, int? width, int? height, String? mimeType, DateTime? creationDate, Map<String, dynamic>? additionalMetadata})
const
MediaFile.fromMetadata(Map<String, dynamic> metadata)
Create MediaFile from metadata
factory

Properties

additionalMetadata Map<String, dynamic>?
final
creationDate DateTime?
final
duration Duration?
final
hashCode int
The hash code for this object.
no setteroverride
height int?
final
mimeType String?
final
name String
final
path String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
final
type MediaType
final
width int?
final

Methods

copyWith({String? path, String? name, MediaType? type, int? size, Duration? duration, int? width, int? height, String? mimeType, DateTime? creationDate, Map<String, dynamic>? additionalMetadata}) MediaFile
Create a copy with updated values
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
Convert to Map
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

fromPath(String filePath) Future<MediaFile>
Create MediaFile from file path