im facing an error with my flutter project which is when i press on the gallery button in my cam scanner app it crashes immediately
The crash happens because something is going wrong when you press the gallery button.
ok so what is the solution ?
What he meant a bit sarcastically that we do not have a crystal ball. Without any logs from your debug pane we cant help at all.
Have you activated “break on all exceptions”?
What messages do you get in the debug output?
In addition to @escamoteur’s questions, I would posit that you might not have native permissions entitlements set correctly (based on recent experience with iOS).
Another tip: XCode and Flutter don’t integrate very well. For instance: when you are using Firebase Auth and try to sign in with google and you forget to put some keys on your Info.plist
, the app just crashes (a native crash). No log is given to Flutter (I guess Flutter engine is killed before it got a chance to say ouch). CLI and error reports are useless. But, when running the app inside XCode, the log output of xcode will give you a nice error message, often saying exactly what went wrong. Too bad XCode is, as usual, a walled garden and don’t play nice with the outside world (I guess all Apple software are, at its core, autistic).
What he meant a bit sarcastically
I’m sorry. That was not my intention.
My intention was to be a lot sarcastically.