UTabBarTheme.from constructor
UTabBarTheme.from(
- BuildContext context
Implementation
factory UTabBarTheme.from(BuildContext context) {
final ColorScheme cs = Theme.of(context).colorScheme;
final Color bg = cs.primary;
final Color on = cs.onPrimary;
return UTabBarTheme(
backgroundColor: bg,
backgroundGradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: <Color>[
Color.alphaBlend(Colors.white.withValues(alpha: 0.05), bg),
bg,
],
),
selectedTabColor: Color.alphaBlend(Colors.black.withValues(alpha: 0.22), bg),
hoverTabColor: on.withValues(alpha: 0.10),
unselectedTabColor: on.withValues(alpha: 0.04),
selectedTextColor: on,
unselectedTextColor: on.withValues(alpha: 0.75),
indicatorColor: on,
controlColor: on.withValues(alpha: 0.85),
);
}