getFromContext function
Implementation
NomoSiderThemeData getFromContext(
BuildContext context,
NomoSider widget,
) {
final globalColorTheme =
NomoTheme.maybeOf(context)?.componentColors.siderColor ??
const NomoSiderColorData();
final globalSizingTheme =
NomoTheme.maybeOf(context)?.componentSizes.siderSizing ??
const NomoSiderSizingData();
const globalConstants = NomoSiderConstants();
final themeOverride = NomoSiderThemeOverride.maybeOf(context);
final themeData = NomoSiderThemeData.from(
globalColorTheme, globalSizingTheme, globalConstants)
.copyWith(themeOverride);
return NomoSiderThemeData(
backgroundColor: widget.backgroundColor ?? themeData.backgroundColor,
border: widget.border ?? themeData.border,
padding: widget.padding ?? themeData.padding,
scrollPadding: widget.scrollPadding ?? themeData.scrollPadding,
width: widget.width ?? themeData.width,
);
}