Quantcast
Channel: How to create a custom AppBar widget? - Stack Overflow
Viewing all articles
Browse latest Browse all 9

How to create a custom AppBar widget?

$
0
0

I'm new to flutter. I'm trying to create a custom appbar widget and importing the widget in pages.

But I was unable to create the widget.

import 'package:flutter/material.dart'; class AppBar extends StatelessWidget{  @override  Widget build(BuildContext context){return AppBar(  title: Text('Ordering'),  actions: <Widget>[    IconButton(      onPressed: _incrementCounter,      icon: Icon(Icons.add),    ),    BadgeIconButton(      itemCount: _counter,      badgeColor: Color.fromRGBO(37, 134, 16, 1.0),      badgeTextColor: Colors.white,      icon: Icon(Icons.shopping_cart, size: 30.0,),      onPressed: () {}    ),  ],);

}}'


Viewing all articles
Browse latest Browse all 9

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>