AppBackground constructor

const AppBackground({
  1. Key? key,
  2. required Widget child,
  3. String title = '',
  4. Widget? titleWidget,
  5. bool showBackButton = false,
  6. VoidCallback? onBackPressed,
  7. Widget? leading,
  8. bool showNotification = false,
  9. VoidCallback? onNotificationPressed,
  10. int? notificationBadgeCount,
  11. bool showSearch = false,
  12. VoidCallback? onSearchPressed,
  13. bool showCall = false,
  14. VoidCallback? onCallPressed,
  15. bool showOptions = false,
  16. List<PopupMenuEntry>? optionMenuItems,
  17. void onOptionSelected(
    1. dynamic value
    )?,
  18. List<Widget>? actions,
  19. Widget? bottomNavigationBar,
  20. Widget? floatingActionButton,
  21. Color? appBarColor,
  22. double? appBarHeight,
  23. bool isRefresh = false,
  24. Future<void> onRefresh()?,
  25. bool isLoading = false,
  26. Widget? loadingWidget,
  27. bool isError = false,
  28. String? errorMessage,
  29. VoidCallback? onRetry,
  30. bool useSafeArea = true,
  31. bool isChildScrollable = true,
  32. Color? statusBarColor,
  33. Brightness? statusBarBrightness,
})

Creates an AppBackground with the default background from AppConfig.backgroundColor.

To set an explicit background use AppBackground.color or AppBackground.image.

Implementation

const AppBackground({
  super.key,
  required this.child,
  this.title = '',
  this.titleWidget,
  this.showBackButton = false,
  this.onBackPressed,
  this.leading,
  this.showNotification = false,
  this.onNotificationPressed,
  this.notificationBadgeCount,
  this.showSearch = false,
  this.onSearchPressed,
  this.showCall = false,
  this.onCallPressed,
  this.showOptions = false,
  this.optionMenuItems,
  this.onOptionSelected,
  this.actions,
  this.bottomNavigationBar,
  this.floatingActionButton,
  this.appBarColor,
  this.appBarHeight,
  this.isRefresh = false,
  this.onRefresh,
  this.isLoading = false,
  this.loadingWidget,
  this.isError = false,
  this.errorMessage,
  this.onRetry,
  this.useSafeArea = true,
  this.isChildScrollable = true,
  this.statusBarColor,
  this.statusBarBrightness,
})  : _backgroundType = null,
      backgroundColor = null,
      backgroundImage = null;