Zxing2 flutter scanner

Hi guys,
Is there any working example for flutter Zxing2 pub package. I did tried the official pub package example [zxing2 | Dart Package] but it doesn’t work. I get the below error

I/CameraManagerGlobal( 5452): Connecting to camera service
E/flutter ( 5452): [ERROR:flutter/lib/ui/ui_dart_state.cc(213)] Unhandled Exception: CameraException(Uninitialized CameraController, startImageStream() was called on an uninitialized CameraController.)
E/flutter ( 5452): #0      CameraController._throwIfNotInitialized (package:camera/src/camera_controller.dart:769:7)
E/flutter ( 5452): #1      CameraController.startImageStream (package:camera/src/camera_controller.dart:370:5)
E/flutter ( 5452): #2      _MyHomePageState._onCameraSelected (package:test_camera/main.dart:83:26)
E/flutter ( 5452): #3      _MyHomePageState.initState (package:test_camera/main.dart:46:5)
E/flutter ( 5452): #4      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4796:57)
E/flutter ( 5452): #5      ComponentElement.mount (package:flutter/src/widgets/framework.dart:4631:5)
E/flutter ( 5452): #6      Element.inflateWidget (package:flutter/src/widgets/framework.dart:3666:14)
E/flutter ( 5452): #7      Element.updateChild (package:flutter/src/widgets/framework.dart:3418:18)
E/flutter ( 5452): #8      SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6186:14)
E/flutter ( 5452): #9      Element.inflateWidget (package:flutter/src/widgets/framework.dart:3666:14)
E/flutter ( 5452): #10     Element.updateChild (package:flutter/src/widgets/framework.dart:3418:18)
E/flutter ( 5452): #11     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4683:16)
E/flutter ( 5452): #12     Element.rebuild (package:flutter/src/widgets/framework.dart:4348:5)
E/flutter ( 5452): #13     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4636:5)
E/flutter ( 5452): #14     ComponentElement.mount (package:flutter/src/widgets/framework.dart:4631:5)
E/flutter ( 5452): #15     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3666:14)
E/flutter ( 5452): #16     Element.updateChild (package:flutter/src/widgets/framework.dart:3418:18)
E/flutter ( 5452): #17     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6186:14)
E/flutter ( 5452): #18     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3666:14)
E/flutter ( 5452): #19     Element.updateChild (package:flutter/src/widgets/framework.dart:3418:18)
E/flutter ( 5452): #20     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6186:14)
E/flutter ( 5452): #21     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3666:14)
E/flutter ( 5452): #22     Element.updateChild (package:flutter/src/widgets/framework.dart:3418:18)
E/flutter ( 5452): #23     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4683:16)
E/flutter ( 5452): #24     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4831:11)
E/flutter ( 5452): #25     Element.rebuild (package:flutter/src/widgets/framework.dart:4348:5)
E/flutter ( 5452): #26     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4636:5)
E/flutter ( 5452): #27     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4822:11)
E/flutter ( 5452): #28     ComponentElement.mount (package:flutter/src/widgets/framework.dart:4631:5)
E/flutter ( 5452): #29     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3666:14)
E/flutter ( 5452): #30     Element.updateChild (package:flutter/src/widgets/framework.dart:3418:18)
E/flutter ( 5452): #31     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6186:14)
E/flutter ( 5452): #32     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3666:14)
E/flutter ( 5452): #33     Element.updateChild (package:flutter/src/widgets/framework.dart:3418:18)
E/flutter ( 5452): #34     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6186:14)
E/flutter ( 5452): #35     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3666:14)
E/flutter ( 5452): #36     Element.updateChild (package:flutter/src/widgets/framework.dart:3418:18)
E/flutter ( 5452): #37     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4683:16)
E/flutter ( 5452): #38     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4831:11)
E/flutter ( 5452): #39     Element.rebuild (package:flutter/src/widgets/framework.dart:4348:5)
E/flutter ( 5452): #40     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4636:5)
E/flutter ( 5452): #41     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4822:11)
E/flutter ( 5452): #42     ComponentElement.mount (package:flutter/src/widgets/framework.dart:4631:5)
E/flutter ( 5452): #43     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3666:14)
E/flutter ( 5452): #44     Element.updateChild (package:flutter/src/widgets/framework.dart:3418:18)
E/flutter ( 5452): #45     C

the code which throws error is on line 83.

Has anyone had the same issue? I will really appreciate if someone gives me a good working example to use zxing2.

Note: I only need to use zxing2 not qr or bar code scanner

thanks