0

i'm trying to create an app bar in flutter that has two layers - one black-colored top and a blue-colored bottom. The bottom needs to have rounded top edges. I'm attaching a picture for reference. How do I do about that?

enter image description here

I'm currently using the AppBar class in Scaffold and I can make a simple AppBar like this:

AppBar(
      elevation: 0,
      backgroundColor: Color(0xFFB6E6FE),
      leading: CustomLeadingButtonClass(
        onPressed: () {},
        child: Icon(
          Icons.arrow_back_ios,
          color: Colors.black,
          size: 18,
        ),
      ),
    );
siaabd001
  • 45
  • 1
  • 5

1 Answers1

0
class BlogApbar extends StatelessWidget implements PreferredSizeWidget {
 final double _pref = 140.0;

  Widget build(BuildContext context) {
    return Container( child: YOURCHILD, decoration: BoxDecoration(
borderRadius: BorderRadius.only()));
  }


  @override
  Size get preferredSize => Size.fromHeight(_pref);

}

You can make your own appbar custom by doing something like this.

Arbiter Chil
  • 1,061
  • 1
  • 6
  • 9