appBar function
AppBar
appBar(
- BuildContext context, {
- List<
Widget> ? actions, - Widget? leadingWidget,
- Widget? titleWidget,
Implementation
AppBar appBar(BuildContext context, {List<Widget>? actions, Widget? leadingWidget, Widget? titleWidget}){
return AppBar(
elevation: 0,
centerTitle: true,
backgroundColor: Pallet.white,
title: titleWidget,
toolbarHeight: ScreenUtil().setHeight(50),
leading: leadingWidget ?? IconButton(
color: Pallet.black,
iconSize: setWidth(24),
onPressed: () => Navigator.of(context).pop(),
icon: Icon(Icons.arrow_back, size: setWidth(24), color: Pallet.black,)
),
actions: actions,
);
}