I am trying to use this parameter in Provider, but I ran into an error. What should I do to resolve it?
When I add the require parameter, it will be like an undre image
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