How can I simply set the height of the AppBar in Flutter?

Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 10.0),
child: MaterialApp(
home: DefaultTabController(
length: 2,
child: Scaffold(
appBar: AppBar(
centerTitle: true,
toolbarHeight: 10,
// title: Text('HolidayLandmark'),
bottom: TabBar(
tabs: [
Tab(text:"MyTripsBookings"),
Tab(text:"ManageTripsBookings"),
],
),
),
body: TabBarView(
children: [
Mytripbooking(data: widget.data, mydata: widget.mydata, start_date: DateTime.now(), title: '',),
ManageTripsBookings(data: widget.data, mydata: widget.mydata, start_date: DateTime.now(), title: '',),
// SecondScreen(),
],
),
// bottomNavigationBar: _buildBottomBar()
),
),
),
);
}
Output

I’m Abhishek, a DevOps, SRE, DevSecOps, and Cloud expert with a passion for sharing knowledge and real-world experiences. I’ve had the opportunity to work with Cotocus and continue to contribute to multiple platforms where I share insights across different domains:
-
DevOps School – Tech blogs and tutorials
-
Holiday Landmark – Travel stories and guides
-
Stocks Mantra – Stock market strategies and tips
-
My Medic Plus – Health and fitness guidance
-
TrueReviewNow – Honest product reviews
-
Wizbrand – SEO and digital tools for businesses
I’m also exploring the fascinating world of Quantum Computing.