Skip to content
New issue

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

The operator '[]' isn't defined for the type 'Object? Function()'. #27

Open
kimjong69 opened this issue Jul 3, 2022 · 2 comments
Open

Comments

@kimjong69
Copy link

final messageText = message.data['text'];
it says the operator [] isnt defined for the object pls help

@blcouz
Copy link

blcouz commented Jul 7, 2022

You should use message.get('text') instead of message.data['text'].

@Nisa-fatima369
Copy link

final messageText = (message.data() as Map<String, dynamic>)['text'];
try this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants