Scaffold Class: Every Flutter Programmer Should Know
Flutter knowledge sharing #10
The scaffold class is providing APIs for implementing Drawer, SnackBar, BottomNavigationBar, Floating Action Bar, App Bar. The scaffold will appear the whole screen and It will expand by the above elements in the UI, i.e. It will expand over the available space. Therefore scaffold class can hold basic UI elements of the application. I will describe the details which you want to know and really important with code examples. In this story, you will get a basic approach to how to work with scaffold widget. Without a scaffold widget, You cannot implement these widgets and so on.
- AppBar:
It’s mainly positioning at the top of the screen. Also, It has holding App Bar Menu and the drawer menu, depending on the requirement.
appBar: AppBar( title: Text('Scaffold Widget')),
- Drawer Menu
The drawer is the side panel or side menu which has located at the left side of the scaffold. Basically, There have two parts as the menu and the Item list.
drawer: Drawer(
child: ListView(
children: const <Widget>[
DrawerHeader(
decoration: BoxDecoration(
color: Colors.blueAccent,
),
child: Text(
'Scaffold Menu',
style: TextStyle(…