computeCaptureAttribute method
Converts plugin configuration into a proper value for the capture
attribute.
See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#capture
Implementation
@visibleForTesting
String? computeCaptureAttribute(ImageSource source, CameraDevice device) {
if (source == ImageSource.camera) {
return (device == CameraDevice.front) ? 'user' : 'environment';
}
return null;
}