DisplayModeBarStyle.defaults constructor
DisplayModeBarStyle.defaults({
- required bool isDark,
- required BuildContext context,
Implementation
factory DisplayModeBarStyle.defaults({
required bool isDark,
required BuildContext context,
}) {
final scheme = Theme.of(context).colorScheme;
return DisplayModeBarStyle(
backgroundColor: isDark
? Colors.grey.shade800.withValues(alpha: .85)
: Colors.grey.shade200.withValues(alpha: .85),
selectedIconColor: scheme.onPrimary,
unselectedIconColor: isDark ? Colors.grey.shade400 : Colors.grey.shade600,
selectedBackgroundColor: scheme.primary.withValues(alpha: .8),
iconSize: 24,
borderRadius: 16,
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 8),
spacing: 4,
elevation: 4,
position: Alignment.centerRight,
tooltipBackgroundColor:
isDark ? Colors.grey.shade700 : Colors.grey.shade800,
tooltipTextStyle: const TextStyle(color: Colors.white, fontSize: 12),
showTooltip: true,
);
}