Open utterances-bot opened 2 years ago
I'm not sure if this is the right place for this but I'm having an issue with the course. I have copied the course exactly and followed every step but when I try to use the login button the screen just reloads to the same login page. I'm not sure why this is but it has happened with both anonymous and google sign in, however the anonmous sign in sometimes creates a new account but still only reloads the login page. Any ideas?
If you ever run into this error lib/login/login.dart:54:35: Error: Required named parameter 'label' must be provided.
Then include label: Text(text),
as one of the children of ElevatedButton.icon
The imports shown in the video are missing in the snippets.
This course is not good. That's all I have to say.
I was getting an error saying AuthService() has no attribute signOut(). I jsut changed it to the function or widget name we defined in auth.dart signOut(), Seems to be working idk
Clicking the login button doesn't take me anywhere.
If the issue is that nothing happens when you click the login button make sure your device is correctly connected to the internet. On an emulated device this might be a little iffy so even if the wifi-icon is showing turn it off and on and all that good stuff. Also my first signin was SLOOOOW so you might also just be experiencing a cold start :)
In case you have the following error:
Another exception was thrown: type 'Future<void>' is not a subtypeof type '(() => void)?'
Update your login.dart like:
onPressed: (() => loginMethod()),
Note: I'm using Flutter 3.3.2
Login Screen
Build a login screen with Anonymous sign in.
https://fireship.io/courses/flutter-firebase/auth-stream/