initialize static method
Initializes the camera by fetching the list of available cameras.
printLogs
: If true, debug logs will be printed.
Implementation
static Future<void> initialize({bool printLogs = false}) async {
try {
_cameras = await availableCameras();
_printLogs = printLogs;
} on CameraException catch (e) {
logError(e.code, e.description);
}
}