I want to make an appbar with a rounded bottom, like so:
How would I go about implementing such an appbar? I have tried reading up on the documentation for CustomPainter, but I don't feel like that is the way to go.
You can change the shape of the app bar by setting shape property. shape property accept ShapeBorder widget. You can use RoundedRectangleBorder widget to set round rectangle corner widget. Also if you need more shape edge you can use BeveledRectangleBorder widget for that.
If you are in Visual Code, Ctrl + Click on AppBar function. And edit this piece. app_bar. dart will open and you can find preferredSize = new Size.
In Flutter you can have custom shape in AppBar widget with shape property.
AppBar(
title: Text('My App'),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
bottom: Radius.circular(30),
),
),
),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With