Language:

Search

Setting the Height of the AppBar in Flutter

  • Share this:
post-title
post-title
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Example',
      home: Scaffold(
        appBar: PreferredSize(
          preferredSize: Size.fromHeight(50.0), // here the desired height
          child: AppBar(
            // ...
          )
        ),
        body: // ...
      )
    );
  }
}
Ammar Javed

Ammar Javed

Still Learning | Still Searching | Still Exploring | The secret of your success is determined by your daily agenda.