File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -404,12 +404,23 @@ class CameraPickerState extends State<CameraPicker>
404
404
);
405
405
406
406
try {
407
+ final Stopwatch stopwatch = Stopwatch ()..start ();
407
408
await newController.initialize ();
409
+ stopwatch.stop ();
410
+ realDebugPrint ("${stopwatch .elapsed } for controller's initialization." );
408
411
// Call recording preparation first.
409
412
if (shouldPrepareForVideoRecording) {
413
+ stopwatch
414
+ ..reset ()
415
+ ..start ();
410
416
await newController.prepareForVideoRecording ();
417
+ stopwatch.stop ();
418
+ realDebugPrint ("${stopwatch .elapsed } for recording's preparation." );
411
419
}
412
420
// Then call other asynchronous methods.
421
+ stopwatch
422
+ ..reset ()
423
+ ..start ();
413
424
await Future .wait (
414
425
< Future <void >> [
415
426
if (config.lockCaptureOrientation != null )
@@ -430,6 +441,8 @@ class CameraPickerState extends State<CameraPicker>
430
441
],
431
442
eagerError: true ,
432
443
);
444
+ stopwatch.stop ();
445
+ realDebugPrint ("${stopwatch .elapsed } for config's update." );
433
446
_controller = newController;
434
447
} catch (e, s) {
435
448
handleErrorWithHandler (e, config.onError, s: s);
You can’t perform that action at this time.
0 commit comments