buildAppBarWidget function
PreferredSizeWidget
buildAppBarWidget({
- List<
Widget> ? actions, - Color? backgroundColor,
- Widget? leading,
- bool? automaticallyImplyLeading,
- TextStyle? textStyle,
- Widget? titleWidget,
- FontWeight? fontWeight,
- bool centerTitle = true,
- String title = '',
- double? titleSpacing,
- PreferredSizeWidget? bottom,
- double? leadingWidth,
- double? toolbarHeight,
- IconThemeData? iconTheme,
公共控件/
Implementation
PreferredSizeWidget buildAppBarWidget({
List<Widget>? actions,
Color? backgroundColor,
Widget? leading,
bool? automaticallyImplyLeading,
TextStyle? textStyle,
Widget? titleWidget,
FontWeight? fontWeight,
bool centerTitle = true,
String title = '',
double? titleSpacing,
PreferredSizeWidget? bottom,
double? leadingWidth,
double? toolbarHeight,
IconThemeData? iconTheme
}){
Widget mTitleWidget;
if(fontWeight != null || textStyle != null){
mTitleWidget = buildText(title, fontWeight: fontWeight, textStyle: textStyle);
}else{
mTitleWidget = Text(title);
}
return AppBar(
iconTheme: iconTheme,
toolbarHeight: toolbarHeight,
leadingWidth: leadingWidth,
automaticallyImplyLeading: automaticallyImplyLeading??centerTitle,
titleSpacing: titleSpacing,
title: titleWidget??mTitleWidget,
bottom: bottom,
leading: leading,
centerTitle: centerTitle,
backgroundColor: backgroundColor,
actions: actions,
);
}