getFromContext function
Implementation
NomoBottomBarThemeData getFromContext(
BuildContext context,
NomoBottomBar widget,
) {
final globalColorTheme =
NomoTheme.maybeOf(context)?.componentColors.bottomBarColor ??
const NomoBottomBarColorData();
final globalSizingTheme =
NomoTheme.maybeOf(context)?.componentSizes.bottomBarSizing ??
const NomoBottomBarSizingData();
const globalConstants = NomoBottomBarConstants();
final themeOverride = NomoBottomBarThemeOverride.maybeOf(context);
final themeData = NomoBottomBarThemeData.from(
globalColorTheme, globalSizingTheme, globalConstants)
.copyWith(themeOverride);
return NomoBottomBarThemeData(
foreground: widget.foreground ?? themeData.foreground,
background: widget.background ?? themeData.background,
selectedForeground:
widget.selectedForeground ?? themeData.selectedForeground,
itemBorderRadius: widget.itemBorderRadius ?? themeData.itemBorderRadius,
borderRadius: widget.borderRadius ?? themeData.borderRadius,
height: widget.height ?? themeData.height,
spacing: widget.spacing ?? themeData.spacing,
iconSize: widget.iconSize ?? themeData.iconSize,
padding: widget.padding ?? themeData.padding,
elevation: widget.elevation ?? themeData.elevation,
itemPadding: widget.itemPadding ?? themeData.itemPadding,
);
}