Search code examples
flutterprovider

The named parameter 'isSetState' is required, but there's no corresponding argument


I am trying to use this parameter in Provider, but I ran into an error. What should I do to resolve it?

enter image description here

When I add the require parameter, it will be like an undre image

enter image description here


Solution

  • The argument is required means it can't be null in this case isSetState is set to null but it can only be either true or false.

    If you pass true to isSetState attribute then the ui will update and if you pass false to isSetState attribute then the ui will not update.