Toolbar constructor
Toolbar({})
Implementation
Toolbar(
{Key? key,
this.titleStr = '',
this.height = 48,
this.showBack = true,
this.bottom,
this.actions = const [],
this.backButtonAction,
this.backgroundColor = FXColor.main_white,
this.fontWeightDelta = 0,
this.titleColor = FXColor.main_black1,
this.isWhite = false})
: super(
key: key,
centerTitle: true,
toolbarHeight: height,
elevation: 0,
backgroundColor: backgroundColor,
title: CenterText(titleStr,
style: CenterText.title_black.apply(color: titleColor, fontWeightDelta: fontWeightDelta)),
actions: actions,
leading: showBack
? Builder(builder: (context) {
return IconButton(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
padding: const EdgeInsets.all(6),
icon: ImageIcon(AssetImage(ImageUtil.imageFullName('images/icon_back.png')),
color: isWhite ? FXColor.main_white : FXColor.black),
onPressed: () {
backButtonAction?.call();
Navigator.maybePop(context);
});
})
: null,
bottom: bottom);