Join London App Brewery for an in-depth discussion in this video Code refactoring challenge, part of Flutter: Part 10 Firebase Cloud Firestore.
and refactor our code a little bit, … to make it easier for the next things … that we're going to learn … and we're going to add to our code. … Now, this lesson is designed as a challenge for you. … The goal of this lesson is to simplify … and reorganize our existing code. … we have two of these widgets, these Padding widgets, … that enclose a Material with an elevation, … so that's going to get a little bit of drop shadow, … and they contain a MaterialButton … which is what will take us to the relevant screen. … Now, these two Padding widgets are pretty much identical, … other than the Text that they contain as their title, … what they do when they are pressed, … and also what color they are. … These widgets exist on three of our screens, … our welcome screen, our login screen, … and our registration screen. … So, here's part one of the challenge, … can you refactor these Padding widgets … into a separate stateless widget, … and when we use it we're going to simply pass over … a color property, and a onPressed function, …
This course was created by London App Brewery. We are pleased to host this content in our library.
- Refactoring routes
- Customizing Flutter animations
- Setting up a Firebase project
- Authenticating users with FirebaseAuth
- Streaming data from Firestore