0

There was a problem after updating pubspec.yaml:

error message

error: The method '[]' can't be unconditionally invoked because the receiver can be 'null'.

double-beep
  • 5,031
  • 17
  • 33
  • 41
ddpearson
  • 1
  • 1
  • add the code in written form instead of screenshots – Munsif Ali Jan 30 '23 at 16:45
  • Does this answer your question? [The method '\[\]' can't be unconditionally invoked because the receiver can be 'null'](https://stackoverflow.com/questions/67575893/the-method-cant-be-unconditionally-invoked-because-the-receiver-can-be-nu) – double-beep Jan 30 '23 at 16:48
  • Does this answer your question? [The method \[\] can't be unconditionally invoked because the receiver can be null](https://stackoverflow.com/questions/73822190/the-method-cant-be-unconditionally-invoked-because-the-receiver-can-be-null) – pmatatias Jan 30 '23 at 16:49

1 Answers1

0

check if value != null or if you are sure it is not null add '!' to the of it

Rami Al Debs
  • 111
  • 5