appBar static method
PreferredSizeWidget
appBar({
- String? titleStr,
- Widget? title,
- Widget? left,
- Widget? right,
- dynamic backTap()?,
- bool canGoBack = true,
- Color foregroundColor = const Color(0xff333333),
- IconThemeData? iconTheme = const IconThemeData(color: Color(0xff37383b)),
- IconThemeData? actionsIconTheme = const IconThemeData(color: Color(0xff37383b)),
- BoxDecoration? backDecoration,
- TextStyle titleTextStyle = const TextStyle(fontSize: 18, fontWeight: FontWeight.w600, color: Color(0xff37383b)),
- SystemUiOverlayStyle statusStyle = SystemUiOverlayStyle.dark,
导航栏 已添加字段不满足时,请自行补充;无特殊需要,只赋值自己需要的内容即可
Implementation
static PreferredSizeWidget appBar ({
String? titleStr,
Widget? title,
Widget? left,
Widget? right,
Function()? backTap,
bool canGoBack = true,
Color foregroundColor = const Color(0xff333333),
IconThemeData? iconTheme = const IconThemeData(color: Color(0xff37383b)),
IconThemeData? actionsIconTheme = const IconThemeData(color: Color(0xff37383b)),
BoxDecoration? backDecoration,
TextStyle titleTextStyle = const TextStyle(fontSize: 18, fontWeight: FontWeight.w600, color: Color(0xff37383b)),
SystemUiOverlayStyle statusStyle = SystemUiOverlayStyle.dark}) {
return JJAppNavigationBar(
backDecoration: backDecoration,
titleStr: titleStr,
title: title,
left: left,
right: right,
backTap: backTap,
canGoBack: canGoBack,
//flexibleSpace: widget.flexibleSpace,
//bottom: widget.bottom,
elevation: 0,
//scrolledUnderElevation: widget.scrolledUnderElevation,
shadowColor: Colors.transparent,
//surfaceTintColor: widget.surfaceTintColor,
//shape: widget.shape,
backgroundColor: Colors.transparent,
foregroundColor: foregroundColor,
iconTheme: iconTheme,
actionsIconTheme: actionsIconTheme,
//primary: widget.primary,
centerTitle: true,
// excludeHeaderSemantics: widget.excludeHeaderSemantics,
// titleSpacing: widget.titleSpacing,
// toolbarOpacity: widget.toolbarOpacity,
// bottomOpacity: widget.bottomOpacity,
// toolbarHeight: widget.toolbarHeight,
// leadingWidth: widget.leadingWidth,
// toolbarTextStyle: widget.toolbarTextStyle,
titleTextStyle: titleTextStyle,
systemOverlayStyle: statusStyle,
);
}