I recently did an Android project to support a convention.
We used a bar code scanner for a few different things, including a checkout feature for a physical merch store and deep linking from QR codes located around the venue.
We used the MLKit Barcode Scanning API. It worked well, but it was a mistake. I wished we had used Google code scanner.
Why? One reason: Google code scanner ships as part of Google Play Services and using it relieves your app from having to manage camera permissions.
We were on-site for technical support of the app, and THE most common ask from attendees was how to enable their camera for barcode scanning.
Starting in Android 11, the second time the user taps "Deny" for the camera permission request, they will no longer see the dialog when the app requests permission.
Even though we had a backup dialog to send users to the App Settings screen via a dialog, it seems like many couldn't figure out what to do from there to enable camera permission. So they had to ask for support, and many were unpleased with the app experience.
Using Google code scanner has a couple of other nice benefits like autozoom and returning only the most centralized barcode, but for us the permissions issue would have saved a lot of headache.
One disadvantage is that you cannot use a custom UI with Google code scanner. For us that wouldn't have been an issue, but YMMV.