FCCAppBar constructor

const FCCAppBar({
  1. Key? key,
  2. String? title,
  3. String? subtitle,
  4. Widget? leading,
  5. List<Widget>? actions,
  6. Widget? bottomContent,
  7. bool showSearchBar = false,
  8. TextEditingController? searchController,
  9. ValueChanged<String>? onSearchChanged,
  10. ValueChanged<String>? onSearchSubmitted,
  11. String? searchHintText,
  12. Widget? searchPrefixIcon,
  13. Widget? searchSuffixIcon,
  14. bool searchAutofocus = false,
  15. bool showConnectionStatus = false,
  16. bool isOffline = false,
  17. String? connectionStatusText,
  18. Color? connectionStatusColor,
  19. IconData? connectionStatusIcon,
  20. VoidCallback? onConnectionStatusTap,
  21. Gradient? gradient,
  22. bool dense = false,
  23. double? appBarElevation,
  24. ShapeBorder? appBarShapeOverride,
  25. bool respectTopSafeArea = true,
  26. FCCAppBarSurfaceStyle surfaceStyle = FCCAppBarSurfaceStyle.neumorphicRaised,
  27. Color? surfaceColor,
  28. EdgeInsetsGeometry surfaceMargin = const EdgeInsets.fromLTRB(12, 6, 12, 10),
  29. double surfaceBorderRadius = 24,
  30. bool isNotificationVisible = true,
  31. int? notificationCount,
  32. VoidCallback? onNotificationTap,
  33. VoidCallback? onNotificationLongPress,
  34. Widget notificationPanelBuilder(
    1. BuildContext
    )?,
  35. Color? notificationBadgeColor,
  36. Color? notificationBadgeTextColor,
  37. bool showNotificationDotOnly = false,
  38. String? notificationsSemanticLabel,
  39. String? profileImagePath,
  40. String? userName,
  41. String? status,
  42. String? userRole,
  43. dynamic onProfileTap(
    1. BuildContext
    )?,
  44. VoidCallback? onLogout,
  45. Widget profileMenuBuilder(
    1. BuildContext
    )?,
  46. bool isProfileLoading = false,
  47. AvatarAnimationMode avatarAnimation = AvatarAnimationMode.fadeIn,
  48. String? avatarHeroTag,
  49. VoidCallback? onStatusTap,
  50. Widget customFallbackAvatar(
    1. BuildContext,
    2. String initial
    )?,
  51. void onProfileImageError(
    1. Object error
    )?,
  52. String profileMenuTitle = 'User Menu',
  53. String viewProfileLabel = 'View Profile',
  54. String logoutLabel = 'Logout',
  55. String cancelLabel = 'Cancel',
  56. 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,
});