own_appbar
A responsive AppBar widget.
About responsiveness:
This package uses context property which is make appbar responsive. If you want to change responsive factor in order to make more better you can use given factor parameters as well.
sizeFactor
- In order to change height of appbar. It can be useful betweensizeFactor >= 15 && sizeFactor <= 20
. When sizeFactor changed also icon height will changed as well and it will be change appbar height according toMediaQuery.of(context).size.height / sizeFactor
.iconFactor
- In order to change action icons' height rather using default factor, this property maybe helpful.tailingIcon
andleadingIcon
properties are using IconData parameter (Ex:Icons.arrow_back_ios
)leadingColor
andtailingColor
allows to change icons' color.actionClicked
- this method will fired when one of action icon clicked by user. And it will show which of action icon clicked.
actionClicked: (actionName) {
print(actionName);
},
actionName can be either leading_clicked
or tailing_clicked
.
By Default you can use:
OwnAppBar(
context: context,
actionClicked: (actionName) {
print(actionName);
},
logoID: "assets/logo.png",//path of assests image (can be null too)
leadingIcon: Icons.arrow_back_ios, //can be null too
tailingIcon: Icons.settings, //can be null too
)
Full version
OwnAppBar(
sizeFactor: 18,
backgroundColor: Colors.black,
key: Key("appBar"),
iconFactor: 1.8,
context: context,
leadingColor: Colors.white,
tailingColor: Colors.white,
actionClicked: (actionName) {
print(actionName);
},
logoID: "assets/logo.png",
leadingIcon: Icons.arrow_back_ios,
tailingIcon: Icons.settings,
),