Splitting your Flutter code into separate classes can open up many possibilities for extensibility in your project.
when we built our I Am Rich and I Am Poor project, … if you remember, we created our app inside our main function … which we know gets triggered when our code is run. … Inside these curly braces is the starting point, … and inside here we've told the phone to run an app, … which is a Material App, … and then we gave it various widgets to be displayed. … So in this case we've got a Scaffold … That means if I was to go and change our color, … instead of having a background of teal, … I now want it to have a background of a red color, … then I should be able to go and click on this button, … which is Hot Reload, and it should change instantly, right? … And you can see down here that, … it's initializing Hot Reload, … and it seems to have successfully reloaded everything. … But why is our background not red? … Why hasn't it changed? … Well, the reason is because, for Hot Reload to work, … we have to have the things that we've changed … inside a Flutter stateless or stateful widget. … So let me show you what that looks like. …
This course was created by London App Brewery. We are pleased to host this content in our library.