QuickToolBar constructor
QuickToolBar(
- BuildContext context, {
- Key? key,
- Color? backgroundColor,
- String? title,
- double? leftMargin,
- EdgeInsetsGeometry? titleMargin,
- AppBarTextColorType? textColorType,
- bool? automaticallyImplyLeading,
- String? leadingText,
- double? leadingPositionedLeft,
- void customOnPressedBack()?,
- List<
Widget> ? actions, - double? actionsPositionedRight,
- bool? centerTitle,
Implementation
QuickToolBar(
BuildContext context, {
Key? key,
Color? backgroundColor, // 导航栏背景色
String? title, // 中间导航栏标题文本
double? leftMargin,
EdgeInsetsGeometry? titleMargin,
AppBarTextColorType? textColorType, // 左侧(返回)按钮视图的类型
bool? automaticallyImplyLeading, // 是否显示左侧(返回)按钮视图(默认true显示)
String? leadingText, // 左侧返回按钮不使用图片时候的文本(默认null时,使用图片)
double? leadingPositionedLeft,
void Function()? customOnPressedBack,
List<Widget>? actions, // 右侧操作按钮视图
double? actionsPositionedRight,
bool? centerTitle,
}) : super(
key: key,
backgroundColor: backgroundColor,
title: Row(
mainAxisAlignment: centerTitle == true ? MainAxisAlignment.center : MainAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(left: leftMargin ?? 0),
child: ToolBarTitleWidget(
text: title,
textColorType: textColorType,
),
)
],
),
titleMargin: titleMargin,
automaticallyImplyLeading: false,
leadingPositionedLeft: leadingPositionedLeft,
actions: actions,
actionsPositionedRight: actionsPositionedRight,
);