DocumentUtils class
Utility class for handling document-related checks in a web environment.
This implementation is designed for web platforms where dart:io is not available.
It uses package:file_magic_number for file type detection, which is compatible
with both native and web platforms.
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
-
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
-
createBlobUrl(
Uint8List bytes) → String - Creates a Blob URL from the given bytes with the correct MIME type.
-
getTemporalFolderPath(
) → String - Returns the temporary directory path.
-
hasPDFExtension(
String filePath) → bool - Checks if the given file path has a PDF extension.
-
isImage(
MergeInput input) → Future< bool> - Determines whether the given file path/blob corresponds to an image file.
-
isPDF(
MergeInput input) → Future< bool> - Determines whether the given file path/blob corresponds to a PDF file.
-
prepareInput(
MergeInput input) → Future< String> - Process a MergeInput and return a valid file path or blob URL.
-
removeTemporalFiles(
List< String> paths) → void - Removes a list of temporary files (blob URLs) on web.
-
setTemporalFolderPath(
String path) → void - Sets a custom temporary folder path.