I am building a simple login app on Flutter, google account selection popups and I select the account but login fails.
CodePudding user response:
the problem is (i think) what happens after you log in, you r code goes on to return the loggedInUi function's results. which has a build tree which contains an ActionChip in the onPressed you supply a function there, but you call it directly (it returns a Future, thats why your error says what it says)
instead, in the onPressed supply something like this:
() {
yourFunctionCall(Parameters);
}
which would supply a void Function that just calls your function