QuickToolBar constructor

QuickToolBar(
  1. BuildContext context, {
  2. Key? key,
  3. Color? backgroundColor,
  4. String? title,
  5. double? leftMargin,
  6. EdgeInsetsGeometry? titleMargin,
  7. AppBarTextColorType? textColorType,
  8. bool? automaticallyImplyLeading,
  9. String? leadingText,
  10. double? leadingPositionedLeft,
  11. void customOnPressedBack()?,
  12. List<Widget>? actions,
  13. double? actionsPositionedRight,
  14. 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,
      );