BasicAppBar constructor

BasicAppBar({
  1. Key? key,
  2. String? titleText,
  3. Widget? title,
  4. Widget? action,
  5. List<Widget>? actions,
  6. bool isMaybePop = false,
  7. double? elevation,
  8. Widget? leading,
  9. Color? backgroundColor,
  10. bool enableLeading = true,
  11. IconThemeData? iconTheme,
  12. SystemUiOverlayStyle? systemOverlayStyle,
  13. bool? centerTitle = true,
  14. PreferredSizeWidget? bottom,
  15. IconThemeData? actionsIconTheme,
  16. bool automaticallyImplyLeading = true,
  17. double bottomOpacity = 1.0,
  18. bool excludeHeaderSemantics = true,
  19. Widget? flexibleSpace,
  20. double? leadingWidth,
  21. ScrollNotificationPredicate notificationPredicate = defaultScrollNotificationPredicate,
  22. bool primary = true,
  23. double? scrolledUnderElevation,
  24. Color? shadowColor,
  25. Color? foregroundColor,
  26. ShapeBorder? shape,
  27. Color? surfaceTintColor,
  28. double? titleSpacing,
  29. TextStyle? titleTextStyle,
  30. double? toolbarHeight,
  31. double toolbarOpacity = 1.0,
  32. TextStyle? toolbarTextStyle,
})

Implementation

BasicAppBar({
  super.key,
  String? titleText,
  Widget? title,
  Widget? action,
  List<Widget>? actions,
  bool isMaybePop = false,
  double? elevation,
  Widget? leading,
  Color? backgroundColor,
  bool enableLeading = true,
  IconThemeData? iconTheme,
  SystemUiOverlayStyle? systemOverlayStyle,
  super.centerTitle = true,
  super.bottom,
  super.actionsIconTheme,
  super.automaticallyImplyLeading,
  super.bottomOpacity = 1.0,
  super.excludeHeaderSemantics = true,
  super.flexibleSpace,
  super.leadingWidth,
  super.notificationPredicate = defaultScrollNotificationPredicate,
  super.primary = true,
  super.scrolledUnderElevation,
  super.shadowColor,
  super.foregroundColor,
  super.shape,
  super.surfaceTintColor,
  super.titleSpacing,
  super.titleTextStyle,
  super.toolbarHeight,
  super.toolbarOpacity = 1.0,
  super.toolbarTextStyle,
}) : super(
          title: title ??
              TextLarge(titleText,
                  color: GlobalConfig().config.appBarConfig?.titleColor),
          leading: enableLeading
              ? leading ?? BackIcon(isMaybePop: isMaybePop)
              : const SizedBox(),
          elevation:
              elevation ?? GlobalConfig().config.appBarConfig?.elevation,
          systemOverlayStyle: systemOverlayStyle ??
              GlobalConfig().config.appBarConfig?.systemOverlayStyle,
          iconTheme:
              iconTheme ?? GlobalConfig().config.appBarConfig?.iconTheme,
          actions: actions ??
              [
                if (action != null)
                  Container(
                      width: 100,
                      alignment: Alignment.centerRight,
                      margin: const EdgeInsets.only(right: 16),
                      child: action)
              ],
          backgroundColor: backgroundColor ??
              GlobalConfig().config.appBarConfig?.backgroundColor);