We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I'm trying to scan a QR in live it showing me like this ERROR:Null check operator used on a null value
The text was updated successfully, but these errors were encountered:
Hi Rafael,
A bit more info...
I only get this on iOS and not Android:
flutter: ERROR(decodePlanes):Null check operator used on a null value
I've run in debug and the error is happening in "transformToLuminanceSource" in "decoder/global_functions.dart".
On Android (Android 13 (API 33)): e.bytesPerPixel = 0 On iOS (iOS 16.6 20G75): e.bytesPerPixel = null
The null exception is thrown during the "map" to get the "total":
final total = planes .map<double>((p) => p.bytesPerPixel!.toDouble()) .reduce((value, element) => value + 1 / element) .toInt();
In the definition of "Plane" in "camera_image.dart" it says:
/// The distance between adjacent pixel samples on Android, in bytes. /// /// Will be `null` on iOS. final int? bytesPerPixel;
So I've put in a null test and a default of "1" in "transformToLuminanceSource" and that works for me on iOS.
I'll submit a pull request for you to check.
Cheers Phil
Sorry, something went wrong.
Wow. Thanks so much @philseeley ! I'm wait anxious for your PR.
No branches or pull requests
When I'm trying to scan a QR in live it showing me like this ERROR:Null check operator used on a null value
The text was updated successfully, but these errors were encountered: