Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rounded bottom on appbar

Tags:

flutter

dart

I want to make an appbar with a rounded bottom, like so:

Rounded appbar

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.

like image 350
Mike Bellika Avatar asked May 08 '18 20:05

Mike Bellika


People also ask

How do I change the shape of my app bar?

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.

How do I make my big AppBar flutter?

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.


1 Answers

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),
      ),
    ),
  ),
like image 105
Abdurahman Popal Avatar answered Oct 03 '22 20:10

Abdurahman Popal