Home > Software design >  Flutter app simple login page , iam getting this error after selecting acc "'Future<dyn
Flutter app simple login page , iam getting this error after selecting acc "'Future<dyn

Time:11-07

I am building a simple login app on Flutter, google account selection popups and I select the account but login fails.

DEBUG CONSOLE

Login Page Code

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

  • Related