Scaffold#
Scaffold is a layout structure provided by the Material Design library that serves as the basic visual framework for building the UI of an app screen.
Scaffold(
appBar: The top app bar of the scaffold.
body: The primary content of the scaffold.
floatingActionButton: A button that floats above the body content.
floatingActionButtonLocation: This controls where the floating action button is placed.
floatingActionButtonAnimator: This controls the animation of the floating action button.
persistentFooterButtons: A set of buttons that are always visible at the bottom.
drawer: A drawer that slides in from the side for navigation.
endDrawer: A drawer that slides in from the opposite side.
bottomNavigationBar: A bar displayed at the bottom for navigation.
bottomSheet: A persistent bottom sheet.
backgroundColor: The background color of the scaffold.
resizeToAvoidBottomInset: Whether the scaffold should adjust when the keyboard appears.
primary: Whether this scaffold is the primary scaffold in the app.
drawerScrimColor: The color of the scrim that is overlaid when a drawer is open.
extendBody: Whether the body should extend behind the bottom navigation bar.
extendBodyBehindAppBar: Whether the body should extend behind the app bar.
)
β 1.appBar:#
Here is a very simple Flutter program that shows what the appBar: parameter in Scaffold does.
It adds a bar at the top of the screen that can contain a title, icons, and actions.
β Example: Using appBar: in Scaffold
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
// β
appBar parameter
appBar: AppBar(
title: const Text('My First AppBar'),
centerTitle: true,
backgroundColor: Colors.blue,
),
body: const Center(
child: Text(
'Hello, World!',
style: TextStyle(fontSize: 24),
),
),
),
);
}
}
What this program teaches you
Part |
Meaning |
|---|---|
Scaffold appBar: AppBar() title: centerTitle: backgroundColor: |
Main page layout The top bar of the screen Creates the top bar Text shown in the bar Centers the text Changes bar color |
When you run this app, you will see:
β A blue bar at the top
β Text βMy First AppBarβ in the center
β βHello, World!β in the middle of the screen
π Remove AppBar to see the difference
If you remove the appBar part, the top bar disappears:
Scaffold(
body: Center(
child: Text('No AppBar here'),
),
)
This shows the importance of the appBar: parameter inside Scaffold.
β 2.body:#
Here is a very simple Flutter program that explains the body: parameter in Scaffold.
The body is the main content area of your screen β everything you want to show in the middle of the page goes inside it.
β Example: Using body: in Scaffold
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
// β
App bar is optional
appBar: AppBar(
title: const Text('Scaffold Body Example'),
),
// β
This is the BODY parameter
body: Center(
child: Text(
'This is the BODY of the Scaffold',
style: TextStyle(fontSize: 22),
),
),
),
);
}
}
What this program teaches
Part |
Meaning |
|---|---|
Scaffold body: Center Text |
Main layout of the page The main content area Centers the content Displays text inside the body |
When you run this program, you will see:
β AppBar at the top
β Text in the center of the screen
β That text is inside the body
This shows that everything inside the screen is placed using body:.
π Change Body to a Different Widget
Now change the body to a Container:
body: Container(
color: Colors.orange,
child: const Center(
child: Text(
'New Body Content',
style: TextStyle(fontSize: 24, color: Colors.white),
),
),
),
Now the whole screen becomes orange.
- This proves:
β‘οΈ body controls the entire main screen area
π Important Concept
In Scaffold:
Scaffold(
appBar: ...
body: ... //β MAIN SCREEN CONTENT
)
The body: can contain ANY widget:
Text
Column
Row
ListView
Container
Stack
Image
Custom widget
β 7.drawer:#
Here is a very simple Flutter program that demonstrates the drawer: parameter of Scaffold, using MaterialApp.router() exactly as you requested.
The drawer is the sliding menu that opens from the left side.
β Simple Program: drawer with MaterialApp.router()
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// Router configuration
static final GoRouter _router = GoRouter(
routes: [
GoRoute(
path: '/',
builder: (context, state) => const HomePage(),
),
GoRoute(
path: '/about',
builder: (context, state) => const AboutPage(),
),
],
);
@override
Widget build(BuildContext context) {
return MaterialApp.router(
debugShowCheckedModeBanner: false,
routerConfig: _router,
);
}
}
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Drawer Example'),
),
// β
Drawer parameter
drawer: Drawer(
child: ListView(
padding: EdgeInsets.zero,
children: [
const DrawerHeader(
decoration: BoxDecoration(color: Colors.blue),
child: Text(
'My Menu',
style: TextStyle(color: Colors.white, fontSize: 24),
),
),
ListTile(
leading: const Icon(Icons.home),
title: const Text('Home'),
onTap: () {
Navigator.pop(context); // close drawer
},
),
ListTile(
leading: const Icon(Icons.info),
title: const Text('About'),
onTap: () {
Navigator.pop(context); // close drawer
context.go('/about'); // go to About page
},
),
],
),
),
body: const Center(
child: Text(
'Swipe from left or tap the menu icon',
style: TextStyle(fontSize: 18),
),
),
);
}
}
class AboutPage extends StatelessWidget {
const AboutPage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('About Page'),
),
body: const Center(
child: Text(
'You navigated using Drawer!',
style: TextStyle(fontSize: 20),
),
),
);
}
}
What this program teaches
Part |
Meaning |
|---|---|
drawer: |
Adds a left-side sliding menu |
Drawer() |
The actual drawer widget |
DrawerHeader |
Top section of drawer |
ListTile |
Menu item inside drawer |
context.go(β/aboutβ) |
Go to another page |
Navigator.pop(context) |
Close the drawer |
When you run this app:
β You will see a menu icon (β°) in the AppBar
β Tap it β the drawer slides from the left
β Tap About β it opens a new page
Pubspec dependency (Important)
In pubspec.yaml, you must have:
dependencies:
flutter:
sdk: flutter
go_router: ^14.0.0
Then:
flutter pub get
β 8.endDrawer:#
Here is a very simple Flutter program that demonstrates the endDrawer: parameter in Scaffold, using MaterialApp.router() exactly as you requested.
endDrawer is a drawer that slides from the RIGHT side of the screen (opposite of drawer, which comes from the left).
β Simple Program: endDrawer with MaterialApp.router()
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// Router configuration
static final GoRouter _router = GoRouter(
routes: [
GoRoute(
path: '/',
builder: (context, state) => const HomePage(),
),
],
);
@override
Widget build(BuildContext context) {
return MaterialApp.router(
debugShowCheckedModeBanner: false,
routerConfig: _router,
);
}
}
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('End Drawer Example'),
// β
Button to open the END drawer (right side)
actions: [
Builder(
builder: (context) => IconButton(
icon: const Icon(Icons.menu),
onPressed: () {
Scaffold.of(context).openEndDrawer();
},
),
),
],
),
body: const Center(
child: Text(
'Tap the menu icon on the RIGHT',
style: TextStyle(fontSize: 18),
),
),
// β
endDrawer parameter (right-side drawer)
endDrawer: Drawer(
child: ListView(
padding: EdgeInsets.zero,
children: const [
DrawerHeader(
decoration: BoxDecoration(color: Colors.green),
child: Text(
'Right Menu',
style: TextStyle(color: Colors.white, fontSize: 24),
),
),
ListTile(
leading: Icon(Icons.settings),
title: Text('Settings'),
),
ListTile(
leading: Icon(Icons.person),
title: Text('Profile'),
),
],
),
),
);
}
}
What this program teaches
Part |
Meaning |
|---|---|
endDrawer: |
Drawer that opens from right side |
Drawer() |
The side menu widget |
actions: |
Right side buttons in the AppBar |
Scaffold.of(context).openEndDrawer() |
Opens the right drawer |
When you run the app:
β You see a menu icon on the top-right
β Tap it β drawer slides from the right side
β Contains βSettingsβ and βProfileβ
Difference Between drawer and endDrawer
drawer |
endDrawer |
|---|---|
Opens from LEFT |
Opens from RIGHT |
Common for main menu |
Used for secondary menu |
Uses menu icon automatically |
Needs manual open button |
Dependency Reminder
In pubspec.yaml:
dependencies:
flutter:
sdk: flutter
go_router: ^14.0.0
Then run:
flutter pub get
β 10.bottomSheet:#
Here is a very simple Flutter program that demonstrates the bottomSheet: parameter in Scaffold, using MaterialApp.router() as you requested.
The bottomSheet is a panel attached to the bottom of the screen that is always visible (unlike showModalBottomSheet, which appears and disappears).
β Simple Program: bottomSheet with MaterialApp.router()
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// Router configuration
static final GoRouter _router = GoRouter(
routes: [
GoRoute(
path: '/',
builder: (context, state) => const HomePage(),
),
],
);
@override
Widget build(BuildContext context) {
return MaterialApp.router(
debugShowCheckedModeBanner: false,
routerConfig: _router,
);
}
}
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Bottom Sheet Example'),
),
body: const Center(
child: Text(
'Look at the bottom of the screen β',
style: TextStyle(fontSize: 20),
),
),
// β
bottomSheet parameter
bottomSheet: Container(
height: 80,
width: double.infinity,
color: Colors.blueGrey,
alignment: Alignment.center,
child: const Text(
'I am a Persistent Bottom Sheet',
style: TextStyle(fontSize: 18, color: Colors.white),
),
),
);
}
}
What this program teaches
Part |
Meaning |
|---|---|
bottomSheet: |
Adds a fixed sheet at the bottom |
Container |
Used as the sheet UI |
height: |
Controls how tall the sheet is |
width: double.infinity |
Makes it full width |
Always visible |
Stays on screen forever |
When you run this app:
β You see a bar-like panel at the bottom
β It stays visible all the time
β The main content is above it
This is the bottomSheet: parameter of Scaffold in action.
π Change the height & color
Try this:
bottomSheet: Container(
height: 150,
color: Colors.orange,
child: const Center(
child: Text('Bigger Bottom Sheet'),
),
),
Now the bottom sheet is bigger and orange.
β Important Difference
bottomSheet: |
showModalBottomSheet() |
Always visible |
Opens when needed |
Fixed |
Temporary |
Part of Scaffold |
Appears over UI |
Canβt drag to close |
Can be dismissed |
Dependency Reminder
In pubspec.yaml:
dependencies:
flutter:
sdk: flutter
go_router: ^14.0.0
Then run:
flutter pub get
β 11.backgroundColor:#
Here is a very simple Flutter program that demonstrates the backgroundColor: parameter in Scaffold, using MaterialApp.router() as you requested.
The backgroundColor changes the full screen background color of the Scaffold.
β Simple Program: backgroundColor with MaterialApp.router()
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// Router configuration
static final GoRouter _router = GoRouter(
routes: [
GoRoute(
path: '/',
builder: (context, state) => const HomePage(),
),
],
);
@override
Widget build(BuildContext context) {
return MaterialApp.router(
debugShowCheckedModeBanner: false,
routerConfig: _router,
);
}
}
// ---------------- HOME PAGE ----------------
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
// β
This is the important line
backgroundColor: Colors.lightBlue.shade100,
appBar: AppBar(
title: const Text('Background Color Example'),
),
body: const Center(
child: Text(
'The Scaffold background is LIGHT BLUE',
style: TextStyle(fontSize: 18),
),
),
);
}
}
What this program teaches
Part |
Meaning |
|---|---|
backgroundColor: |
Sets the Scaffoldβs screen color |
Colors.lightBlue.shade100 |
Light blue background |
body: |
Content is placed on top of the background |
When you run this app, you will see:
β A light blue background
β AppBar at the top
β Text in the center
This color is controlled ONLY by:
backgroundColor: Colors.lightBlue.shade100,
π Try different colors
Change this line to test different colors:
backgroundColor: Colors.green,
backgroundColor: Colors.black,
backgroundColor: Colors.orangeAccent,
Youβll see the screen change immediately.
Dependency Reminder
In your pubspec.yaml:
dependencies:
flutter:
sdk: flutter
go_router: ^14.0.0
Then run:
flutter pub get
β 12.resizeToAvoidBottomInset:#
Here is a very simple Flutter program that demonstrates the resizeToAvoidBottomInset: parameter in Scaffold, using MaterialApp.router() just like you asked.
This parameter controls whether the screen resizes when the keyboard opens.
β Simple Program: resizeToAvoidBottomInset with MaterialApp.router()
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// Router configuration
static final GoRouter _router = GoRouter(
routes: [
GoRoute(
path: '/',
builder: (context, state) => const HomePage(),
),
],
);
@override
Widget build(BuildContext context) {
return MaterialApp.router(
debugShowCheckedModeBanner: false,
routerConfig: _router,
);
}
}
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
// β
IMPORTANT PARAMETER
resizeToAvoidBottomInset: false,
appBar: AppBar(
title: const Text('Keyboard Resize Example'),
),
body: Padding(
padding: const EdgeInsets.all(20),
child: Column(
children: const [
Text(
'Tap the text field to open the keyboard',
style: TextStyle(fontSize: 18),
),
SizedBox(height: 20),
TextField(
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Enter something...',
),
),
SizedBox(height: 300),
Text(
'I stay in the same place',
style: TextStyle(fontSize: 18),
),
],
),
),
);
}
}
What this program teaches
The key line is:
resizeToAvoidBottomInset: false,
This means:
Value |
What happens when keyboard opens |
|---|---|
true (default) |
Screen moves up to avoid the keyboard β |
false |
Screen does NOT move β |
In this example:
β Keyboard opens
β Screen DOES NOT resize
β Content may be hidden by keyboard
π Try changing it to true
Change this:
resizeToAvoidBottomInset: true,
Now when the keyboard opens:
β The screen moves up
β The text field stays visible
This is the default behavior in most forms.
When to use false?
You use:
resizeToAvoidBottomInset: false,
When:
β You donβt want layout shifting
β You are using your own scroll system
β Full-screen UI or games
β Fixed layout screens
Dependency Reminder
In your pubspec.yaml:
dependencies:
flutter:
sdk: flutter
go_router: ^14.0.0
Then run:
flutter pub get
β 13.primary:#
Here is a very simple Flutter program that demonstrates the primary: parameter in Scaffold, using MaterialApp.router() (just like you asked).
The primary parameter tells Flutter whether this Scaffold should align itself to the top system area (status bar / notch) or not.
β Simple Program: primary with MaterialApp.router()
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// Router configuration
static final GoRouter _router = GoRouter(
routes: [
GoRoute(
path: '/',
builder: (context, state) => const HomePage(),
),
],
);
@override
Widget build(BuildContext context) {
return MaterialApp.router(
debugShowCheckedModeBanner: false,
routerConfig: _router,
);
}
}
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
// β
IMPORTANT PARAMETER
primary: false,
appBar: AppBar(
title: const Text('Primary Parameter Example'),
),
body: const Center(
child: Text(
'Set primary: false in Scaffold',
style: TextStyle(fontSize: 18),
),
),
);
}
}
What this program teaches
The key line is:
primary: false,
Value |
Behavior |
|---|---|
true (default) |
Respects top safe area (status bar). β |
false |
Does not reserve top padding. β |
When primary: false:
β The Scaffold does not automatically insert padding at the top
β Content can go behind the status bar / notch
β Useful for full-screen designs
On some devices, this is very noticeable near the top.
π Try changing it to true
Change to:
primary: true,
Now:
β The screen respects the status bar
β Automatically adds safe padding
This is the normal default behavior.
π Why is this useful?
You usually set:
primary: false
When:
β You want full control of padding
β You use SafeArea manually
β You design full-screen elements (games, videos, splash)
π Dependency Reminder
In your pubspec.yaml:
dependencies:
flutter:
sdk: flutter
go_router: ^14.0.0
Then run:
flutter pub get
β 14.drawerScrimColor:#
Here is a very simple Flutter program that demonstrates the drawerScrimColor: parameter in Scaffold, using MaterialApp.router() as you requested.
The drawerScrimColor changes the transparent dark overlay color that appears on the screen when the drawer is opened.
β Simple Program: drawerScrimColor with MaterialApp.router()
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// Router configuration
static final GoRouter _router = GoRouter(
routes: [
GoRoute(
path: '/',
builder: (context, state) => const HomePage(),
),
],
);
@override
Widget build(BuildContext context) {
return MaterialApp.router(
debugShowCheckedModeBanner: false,
routerConfig: _router,
);
}
}
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
// β
IMPORTANT PARAMETER
drawerScrimColor: Colors.red.withOpacity(0.5),
appBar: AppBar(
title: const Text('Drawer Scrim Color'),
),
// β
Normal Drawer (LEFT SIDE)
drawer: Drawer(
child: ListView(
padding: EdgeInsets.zero,
children: const [
DrawerHeader(
decoration: BoxDecoration(color: Colors.blue),
child: Text(
'Menu',
style: TextStyle(color: Colors.white, fontSize: 24),
),
),
ListTile(
leading: Icon(Icons.home),
title: Text('Home'),
),
ListTile(
leading: Icon(Icons.settings),
title: Text('Settings'),
),
],
),
),
body: const Center(
child: Text(
'Open the drawer to see the RED overlay',
style: TextStyle(fontSize: 18),
),
),
);
}
}
What this program teaches
The important line is:
drawerScrimColor: Colors.red.withOpacity(0.5),
This means:
β When drawer opens
β The background gets a red transparent overlay
β Instead of the default black/gray color
Try opening the drawer and you will see:
π΄ Red shaded screen behind the drawer
π Try different colors
Change this line:
drawerScrimColor: Colors.green.withOpacity(0.4),
drawerScrimColor: Colors.blue.withOpacity(0.6),
drawerScrimColor: Colors.transparent,
If you use:
drawerScrimColor: Colors.transparent,
Then no dimming / overlay happens at all.
Why use drawerScrimColor?
It is useful when:
β You want custom UI design
β You want brand color behind drawer
β You want no overlay at all
β You want light or dark mode matching
Dependency Reminder
In your pubspec.yaml add:
dependencies:
flutter:
sdk: flutter
go_router: ^14.0.0
Then run:
flutter pub get
β 15.extendBody:#
Here is a very simple Flutter program that demonstrates the extendBody: parameter in Scaffold, using MaterialApp.router() as you requested.
The extendBody parameter tells Flutter whether the body should extend behind the bottom widgets, such as the bottomNavigationBar.
β Simple Program: extendBody with MaterialApp.router()
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// Router configuration
static final GoRouter _router = GoRouter(
routes: [
GoRoute(
path: '/',
builder: (context, state) => const HomePage(),
),
],
);
@override
Widget build(BuildContext context) {
return MaterialApp.router(
debugShowCheckedModeBanner: false,
routerConfig: _router,
);
}
}
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
// β
IMPORTANT PARAMETER
extendBody: true,
appBar: AppBar(
title: const Text('extendBody Example'),
),
body: Container(
color: Colors.orange,
child: const Center(
child: Text(
'The orange body extends behind bottom bar',
style: TextStyle(fontSize: 18, color: Colors.white),
textAlign: TextAlign.center,
),
),
),
// β
Bottom Navigation Bar
bottomNavigationBar: BottomAppBar(
color: Colors.black,
child: Container(
height: 60,
alignment: Alignment.center,
child: const Text(
'Bottom Bar',
style: TextStyle(color: Colors.white, fontSize: 18),
),
),
),
);
}
}
What this program teaches
The key line is:
extendBody: true,
Value |
Result |
|---|---|
false (default) |
Body stops above bottom bar |
true β |
Body goes behind bottom bar |
When extendBody: true:
β The orange body continues under the black bar
β You can see the color through the transparent parts
β Useful for modern, layered UI design
π Compare with false
Change:
extendBody: false,
Now:
β The orange area stops before the bar
β The bar sits on top of a blank area
β Classic layout style
This helps you understand the difference clearly.
When to use extendBody
Use it when:
β You use BottomAppBar + FAB
β You want transparent bottom bars
β You design glass / blur UI
β You need layered visual effects
Dependency Reminder
In your pubspec.yaml:
dependencies:
flutter:
sdk: flutter
go_router: ^14.0.0
Then run:
flutter pub get
β 16.extendBodyBehindAppBar:#
Here is a very simple Flutter program that demonstrates the extendBodyBehindAppBar: parameter in Scaffold, using MaterialApp.router() as you requested.
This parameter allows the body to extend behind (under) the AppBar.
β Simple Program: extendBodyBehindAppBar with MaterialApp.router()
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// β
Router configuration
static final GoRouter _router = GoRouter(
routes: [
GoRoute(
path: '/',
builder: (context, state) => const HomePage(),
),
],
);
@override
Widget build(BuildContext context) {
return MaterialApp.router(
debugShowCheckedModeBanner: false,
routerConfig: _router,
);
}
}
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
// β
IMPORTANT PARAMETER
extendBodyBehindAppBar: true,
appBar: AppBar(
title: const Text('Behind AppBar'),
backgroundColor: Colors.black.withOpacity(0.5), // Transparent look
),
body: Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [Colors.purple, Colors.orange],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
),
),
child: const Center(
child: Text(
'Body is behind the AppBar',
style: TextStyle(fontSize: 22, color: Colors.white),
),
),
),
);
}
}
What this program teaches
The key line is:
extendBodyBehindAppBar: true,
Value |
Result |
|---|---|
false (default) |
Body starts below AppBar |
true β |
Body goes behind AppBar |
In this example:
β The gradient body goes behind the AppBar
β The AppBar is semi-transparent
β You can see colors under the AppBar
- This is commonly used for:
Image header effects
Transparent AppBar designs
Modern UI / full-screen UI
Parallax effects
π Compare with false
Try changing:
dependencies:
flutter:
sdk: flutter
go_router: ^14.0.0
Then run:
.. code-block:: bash
flutter pub get