FCCAppBar constructor
const
FCCAppBar({
- Key? key,
- String? title,
- String? subtitle,
- Widget? leading,
- List<
Widget> ? actions, - Widget? bottomContent,
- bool showSearchBar = false,
- TextEditingController? searchController,
- ValueChanged<
String> ? onSearchChanged, - ValueChanged<
String> ? onSearchSubmitted, - String? searchHintText,
- Widget? searchPrefixIcon,
- Widget? searchSuffixIcon,
- bool searchAutofocus = false,
- bool showConnectionStatus = false,
- bool isOffline = false,
- String? connectionStatusText,
- Color? connectionStatusColor,
- IconData? connectionStatusIcon,
- VoidCallback? onConnectionStatusTap,
- Gradient? gradient,
- bool dense = false,
- double? appBarElevation,
- ShapeBorder? appBarShapeOverride,
- bool respectTopSafeArea = true,
- FCCAppBarSurfaceStyle surfaceStyle = FCCAppBarSurfaceStyle.neumorphicRaised,
- Color? surfaceColor,
- EdgeInsetsGeometry surfaceMargin = const EdgeInsets.fromLTRB(12, 6, 12, 10),
- double surfaceBorderRadius = 24,
- bool isNotificationVisible = true,
- int? notificationCount,
- VoidCallback? onNotificationTap,
- VoidCallback? onNotificationLongPress,
- Widget notificationPanelBuilder()?,
- Color? notificationBadgeColor,
- Color? notificationBadgeTextColor,
- bool showNotificationDotOnly = false,
- String? notificationsSemanticLabel,
- String? profileImagePath,
- String? userName,
- String? status,
- String? userRole,
- dynamic onProfileTap()?,
- VoidCallback? onLogout,
- Widget profileMenuBuilder()?,
- bool isProfileLoading = false,
- AvatarAnimationMode avatarAnimation = AvatarAnimationMode.fadeIn,
- String? avatarHeroTag,
- VoidCallback? onStatusTap,
- Widget customFallbackAvatar(
- BuildContext,
- String initial
- void onProfileImageError(
- Object error
- String profileMenuTitle = 'User Menu',
- String viewProfileLabel = 'View Profile',
- String logoutLabel = 'Logout',
- String cancelLabel = 'Cancel',
- String? profileSemanticLabel,
Implementation
const FCCAppBar({
super.key,
this.title,
this.subtitle,
this.leading,
this.actions,
// Secondary row
this.bottomContent,
// Search
this.showSearchBar = false,
this.searchController,
this.onSearchChanged,
this.onSearchSubmitted,
this.searchHintText,
this.searchPrefixIcon,
this.searchSuffixIcon,
this.searchAutofocus = false,
// Connection banner
this.showConnectionStatus = false,
this.isOffline = false,
this.connectionStatusText,
this.connectionStatusColor,
this.connectionStatusIcon,
this.onConnectionStatusTap,
// Styling
this.gradient,
this.dense = false,
this.appBarElevation,
this.appBarShapeOverride,
this.respectTopSafeArea = true,
// Surface styling
this.surfaceStyle = FCCAppBarSurfaceStyle.neumorphicRaised,
this.surfaceColor,
this.surfaceMargin = const EdgeInsets.fromLTRB(12, 6, 12, 10),
this.surfaceBorderRadius = 24,
// Notifications
this.isNotificationVisible = true,
this.notificationCount,
this.onNotificationTap,
this.onNotificationLongPress,
this.notificationPanelBuilder,
this.notificationBadgeColor,
this.notificationBadgeTextColor,
this.showNotificationDotOnly = false,
this.notificationsSemanticLabel,
// Profile
this.profileImagePath,
this.userName,
this.status,
this.userRole,
this.onProfileTap,
this.onLogout,
// Profile menu customization
this.profileMenuBuilder,
// Avatar behavior
this.isProfileLoading = false,
this.avatarAnimation = AvatarAnimationMode.fadeIn,
this.avatarHeroTag,
this.onStatusTap,
// Avatar fallback & error hook
this.customFallbackAvatar,
this.onProfileImageError,
// Localization
this.profileMenuTitle = 'User Menu',
this.viewProfileLabel = 'View Profile',
this.logoutLabel = 'Logout',
this.cancelLabel = 'Cancel',
// Semantics
this.profileSemanticLabel,
});