isPicture property
bool
get
isPicture
Returns true if the capture has either a mimeType with "image" inside or if the file path ends with "jpg". On Web, returns always true
Implementation
bool get isPicture => kIsWeb
? true
: captureRequest.when(
single: (singleCaptureRequest) =>
singleCaptureRequest.file?.path.endsWith("jpg") == true ||
singleCaptureRequest.file?.mimeType?.contains("image") == true,
multiple: (multipleCaptureRequest) =>
multipleCaptureRequest.fileBySensor.values.first?.path.endsWith("jpg") == true ||
multipleCaptureRequest.fileBySensor.values.first?.mimeType?.contains("image") == true,
);