Skip to main content

Adding Registration Functionality with API Usage

Premium
10 min read

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.dart file 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...

The Full Lesson is Only for Premium Members

Want to access all of our courses? (36 h 00 min)

You also get:

61 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

Luis Antonio Parrado avatar
Luis Antonio Parrado

Modifications in lib/main.dart doesn't match with commit. It's missing the part when we apply AuthProvider and redirect to new route home.

Modestas avatar

Thank you for letting me know! I've updated the code to be correct

Matthew Kille avatar

Hmm, still not corrected?

Modestas avatar

Which part exactly? i might have them fixed a different similar issue.

Modestas avatar

Please check after this update if it is correct (It should be, but just in case). Thank you :)

Matthew Kille avatar

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?

Modestas avatar

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

Modestas avatar

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!

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.