CodePudding user response:
this is because the function missed a return type.
Future<bool> func1() {
// you logic
return true <-- // return bool value should be specified here
}
if you want the function without return type
Future<void> func2() {
// you logic
<-- //there will not be return type here
}