Flutter:height of the AppBar

Posted by

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

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x