Home > Software design >  When clicking a text form field, the behind pages breaks down in flutter
When clicking a text form field, the behind pages breaks down in flutter

Time:01-08

The previous page gets errors when clicking a text form field in a form editing page, flutter. The issue is detailed in the video

LINK TO THE VIDEO

The issue in a nutshell: It's an e-com product page using Getx, it navigates to an address editing page when clicking edit address. When clicking any form fields, it gets

" Another exception was thrown: NoSuchMethodError: The method '[]' was called on null." error and the page that displays product page gets errors of the above-mentioned one.

Please check out the video and help. Thanks in advance.

CodePudding user response:

you defined a list that it is an empty list

CodePudding user response:

You Have To validate TextFormField before Submitting the value. If the Field value is empty you have to add the default value by checking the field Controller. On Other Words, if the field is not mandatory then the field must be submitted by some default value in that way you can get rid of Null Saftey Errors.

  •  Tags:  
  • Related