Closed Prophet1702 closed 3 years ago
@Prophet1702 I think this issue is not related our plugin. It is much more flutter and coding question which you should ask it on stackoverflow.
I try to help you anyway. You're calling "checkUserAnswer" function, when you cal it you have to provide current screen's context to display Alert. So you can change your
void checkUserAnswer(bool userPickedAnswer)
function to
void checkUserAnswer(bool userPickedAnswer, BuildContext context)
and call it
checkUserAnswer(false, context)
I'm new to Flutter . Any help is appreciated. Thanks in advance. The error is : Undefined name 'context'. Try correcting the name to one that is defined, or defining the name. Here's my code :