SuperAppBar constructor
SuperAppBar({
- Widget? title,
- Widget? actions,
- double height = kToolbarHeight,
- double? leadingWidth,
- Widget? leading,
- bool automaticallyImplyLeading = true,
- double titleSpacing = 15,
- String previousPageTitle = "Back",
- bool alwaysShowTitle = false,
- SuperSearchBar? searchBar,
- SuperLargeTitle? largeTitle,
- SuperAppBarBottom? bottom,
- Color? backgroundColor,
- Border? border,
- Color? shadowColor,
Implementation
SuperAppBar({
this.title,
this.actions,
this.height = kToolbarHeight,
this.leadingWidth,
this.leading,
this.automaticallyImplyLeading = true,
this.titleSpacing = 15,
this.previousPageTitle = "Back",
this.alwaysShowTitle = false,
this.searchBar,
this.largeTitle,
this.bottom,
this.backgroundColor,
this.border,
this.shadowColor,
}) {
searchBar = searchBar ?? SuperSearchBar();
largeTitle = largeTitle ?? SuperLargeTitle();
bottom = bottom ?? SuperAppBarBottom();
if (!searchBar!.enabled) {
searchBar!.height = 0;
}
if (!largeTitle!.enabled) {
largeTitle!.height = 0;
}
if (!bottom!.enabled) {
bottom!.height = 0;
}
title ??= Text(largeTitle!.largeTitle);
if (title is Text) {
if ((title as Text).style == null) {
title = Text(
"${(title as Text).data}",
style: const TextStyle(),
);
}
}
}