MediaUtils class

Constructors

MediaUtils.new()

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

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

Static Methods

checkFileUploadSize(String path, String mediaType) bool
Checks if the size of a file at the specified path is within the acceptable upload limits for the given mediaType. Returns true if the file size is within the limits, otherwise false.
fileSize(int bytes, [int decimals = 0]) String
Converts a file size in bytes to a human-readable format with appropriate units.
getImageDimensions(String filePath) Future<Tuple2<int, int>>
Get Width and Height from file
getMobileWidthAndHeight(int? originalWidth, int? originalHeight) → Tuple2<int, int>
Get Width and Height for Mobile
isMediaExists(String? filePath) bool
isMediaFileAvailable(MessageType msgType, ChatMessageModel message) bool
isMediaFileNotAvailable(bool isMediaFileAvailable, ChatMessageModel message) bool

Constants

maxAudioFileSize → const int
maxDocFileSize → const int
maxImageFileSize → const int
maxVideoFileSize → const int