Questions
user482user482asked 4 months ago
Error, The method ‘setState’ isn’t defined for the type ‘Body’. Try correcting the name to the name of an existing method, or defining a method named ‘setState’. setState-isnt-defined-for-the-type-Body how to fix,
1

2 Answers

Accepted
rscw93answered 4 months ago
try this,
setState(() => {
    passwordFieldVisibility = !passwordFieldVisibility.
  });
1
Accepted
heshanheshananswered 4 months ago
check this ,
onTap: () {

  setState(() {
    //code here
  });

},
1