Ad Code

POPULAR ARTICLES

6/recent/ticker-posts

Recent Posts

Your First Flutter App Ep 2 - Scaffolding a Material App


All right now in the last lesson, we created a brand new material app which is going to be the basis for all the other widgets that we're going to construct on-screen and by including the material app. We also get to tap into all of the components or widgets that the material apps come with such as a text or an image widget. but in this lesson, we're gonna look at creating a scaffold in this material app so that we can have an app bar. we can have a body where most of our app is gonna go or we can have a floating button. if we wanted to add the scaffold widget is pretty much exactly that you can use it to place common items onto your screen.

I recommend reading the scaffold class documentation and seeing what it allows you to do so inside our app instead of having a central piece of text we're gonna go ahead and delete all of that so select everything up to the closing comment for the center widget and you can go ahead and delete that. now notice that these comments get created automatically and it shows you for example this is the end of the center widget this is the end of the material app widget and if I added a comma here and hit save.

it separates out the text widget and shows me that this is the final closing brace and this makes it easy for us to be able to for example take this part out which is the text widget or take this part out which is the center widget just to be able to see where that's coming from now if it bothers you having a lot of this extra stuff that gets written on the screen making your code look wordier you can also go into the preferences and going to the editor section then general then appearance and you can either enable or disable this if you want I'm gonna leave it in just to make it easier for you to see where each part ends but it's again up to you as a personal preference so we were gonna go and delete the center widget from here. so we're gonna leave the part where it says home but we're gonna delete the center widget.


Reactions

Post a Comment

0 Comments

Comments

Ad Code