In this lesson, we will focus on adding a registration process. This includes a few things:
- Creating a Home Screen
- Creating a Registration API function
- Adding Registration Fields to the UI
- Creating an Auth Provider to handle authentication management
- Modifying our
main.dartfile to react to the authentication state
Here's how the registration screen will look like at the end:

Creating Home Screen
Let's start by creating a Home screen...
Modifications in
lib/main.dartdoesn't match with commit. It's missing the part when we applyAuthProviderand redirect to new routehome.Thank you for letting me know! I've updated the code to be correct
Hmm, still not corrected?
Which part exactly? i might have them fixed a different similar issue.
Please check after this update if it is correct (It should be, but just in case). Thank you :)
That's better, but misses the deletion of "home: Login()," from the MaterialApp widget. And the addition of "'/': (context) {" a couple lines below.
Feels to me like we're actually missing a whole section of explanation for this part. The description above it only says we will wrap the code in a provider; which is exactly what the diffs showed previously. And then there could have done with an explanation of what that does and how it is used, i.e. these latest changes. Given the excellent commentary thus far, it seems to be missing something here?
Okay, now I understand the pain point fully - thank you!
I will update the lesson in a day to better explain what happened and adjust the changes carefully (even now I see that torchlight left some
//on the screen).Sorry about that
Updated the lesson and added a basic explanation on what we did. Let me know if this helps or should I reword it/explain better!