appBar property

AppBarColors get appBar

AppBar colors resolved from the current appBarStyle.

Implementation

AppBarColors get appBar {
  switch (appBarStyle) {
    case AppBarStyle.solid:
      final Color bg = surface ?? AppColors.surface;
      return AppBarColors(
          background: bg, foreground: AppColors.contrastFor(bg));
    case AppBarStyle.glass:
      final Color bg = surface ?? AppColors.surface;
      return AppBarColors(
        background: bg.withValues(alpha: 0.85),
        foreground: AppColors.contrastFor(bg),
      );
    case AppBarStyle.gradient:
      return AppBarColors(
          background: resolvedPrimary, foreground: Colors.white);
  }
}