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

Time:05-16

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

CodePudding user response:

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.

CodePudding user response:

bool has only 2 values, true or false. so for the parameter isSetState type true if you want to rebuild, or false if you don't want to. As isSetState is a required parameter, you have to pass a value needless

Upvote if it helps

  • Related