Read More
Read now

Scaffold Class in Flutter

Save

In this blog we are going to know about scaffold class in flutter.

Scaffold is a class in flutter which provide api’s to use to its widgets to create layout.

A Scaffold class provides a framework which implements the basic material design visual layout structure of the flutter app.

Scaffold class provide many widget to design or we can say api to show Drawer, AppBar, Bottom navigation bar etc.

Some of the widget of Scaffold class are:

Constructor of scaffold class :

We are going to discuss some widgets of scaffold class

First, we will discuss about most common widget of any application “AppBar

App bar in Scaffold class

App bar is horizontally bar positioned at the top of screen
We can display information and menu and drawer option in app bar according to requirement.
It is just like a toolbar in android app.

Let’s take an example for AppBar :

Result :

App Bar Example
App Bar example

Drawer In Scaffold class

Drawer is side panel positioned at the side of screen.
We can display menu item in drawer.
Drawer can hide and show on any button click event.
An appropriate icon for the drawer is set automatically in an AppBar

Let’s take an example of Drawer

Result :
Drawer example of scaffold class
Drawer example of scaffold class

Floating Action Button:

Floating button widget floats at the top of content of the screen.
It is positioned to left bottom corner of screen.
When we scroll the screen its position remains unchanged.
We can add desired icon on it and can handle it click event on “onpPressed” property.
This is same as Floating action button in android.

Bottom Navigation Bar

Bottom navigation bar display navigation menu at the bottom of screen.
We can add multiple item in bottom navigation bar with icon.
We can handle event of bottom navigation item “ontap()” property.

Result :
Bottom navigation  example of scaffold class
Bottom navigation example of scaffold class

Conclusion :

In this blog we learn about Scaffold class and some widgets provided by scaffold class.

For more details please click here.

Hope ! this will help you in finding what you are looking for.

Thanks For Reading

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

css.php

Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!

Deniel Kerr

Owner and Founder. Opencart

Talk to Sales
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home