onCameraError property
Called with a description of why the preview cannot be shown: the camera permission was denied, or the camera failed to initialize (the description then ends with the underlying exception).
Implementation
final void Function(String error) onCameraError;