The parameter for StatefulBuilder's builder function are different in the website flutter.dev and the documentation pop-up window in android studio or vs code. In official website documentation it says that the second parameter is a StateSetter whereas in IDE it says void Function(void Function ()).
So, should I post it as an issue in the flutter's github for updation of documentation ? or shall I let it be ? I mean is there something I don't know technically ?.
A
StateSetter
is a typedef for function signaturevoid Function(VoidCallback fn)
, andVoidCallback
is a typedef forvoid Function()
, so basicallyIt is just that IDEs usually resolve the typedefs to most primitive values, which is usually handy, but sometimes confusing as well.