getFromContext function
Implementation
NomoVerticalMenuThemeData getFromContext(
BuildContext context,
NomoVerticalMenu widget,
) {
final globalColorTheme =
NomoTheme.maybeOf(context)?.componentColors.verticalMenuTheme ??
NomoVerticalMenuColorData();
final globalSizingTheme =
NomoTheme.maybeOf(context)?.componentSizes.verticalMenuTheme ??
NomoVerticalMenuSizingData();
final themeOverride = NomoVerticalMenuThemeOverride.maybeOf(context);
final themeData =
NomoVerticalMenuThemeData.from(globalColorTheme, globalSizingTheme)
.override(themeOverride);
return NomoVerticalMenuThemeData(
foreground: widget.foreground ?? themeData.foreground,
background: widget.background ?? themeData.background,
selectedBackground:
widget.selectedBackground ?? themeData.selectedBackground,
selectedForeground:
widget.selectedForeground ?? themeData.selectedForeground,
borderRadius: widget.borderRadius ?? themeData.borderRadius,
hPadding: widget.hPadding ?? themeData.hPadding,
itemSpacing: widget.itemSpacing ?? themeData.itemSpacing,
spacing: widget.spacing ?? themeData.spacing,
height: widget.height ?? themeData.height,
iconSize: widget.iconSize ?? themeData.iconSize,
);
}