AdaptiveFile.fromPath constructor
AdaptiveFile.fromPath(})
Creates an AdaptiveFile from a local file path.
Implementation
factory AdaptiveFile.fromPath(
String path, {
String? name,
String? mimeType,
int? width,
int? height,
int? size,
Uint8List? bytes,
DateTime? lastModified,
}) {
final fileName = name ?? _extractFileName(path);
final inferredMime = mimeType ?? _inferMimeType(fileName);
return AdaptiveFile(
path: path,
name: fileName,
bytes: bytes,
mimeType: inferredMime,
width: width,
height: height,
size: size,
lastModified: lastModified,
);
}