getFromContext function
Implementation
ExpandableThemeData getFromContext(
BuildContext context,
Expandable widget,
) {
final globalColorTheme =
NomoTheme.maybeOf(context)?.componentColors.expandableColor ??
const ExpandableColorData();
final globalSizingTheme =
NomoTheme.maybeOf(context)?.componentSizes.expandableSizing ??
const ExpandableSizingData();
const globalConstants = ExpandableConstants();
final themeOverride = ExpandableThemeOverride.maybeOf(context);
final themeData = ExpandableThemeData.from(
globalColorTheme, globalSizingTheme, globalConstants)
.copyWith(themeOverride);
return ExpandableThemeData(
titlePadding: widget.titlePadding ?? themeData.titlePadding,
childrenPadding: widget.childrenPadding ?? themeData.childrenPadding,
borderRadius: widget.borderRadius ?? themeData.borderRadius,
highlightColor: widget.highlightColor ?? themeData.highlightColor,
focusColor: widget.focusColor ?? themeData.focusColor,
splashColor: widget.splashColor ?? themeData.splashColor,
hoverColor: widget.hoverColor ?? themeData.hoverColor,
iconColor: widget.iconColor ?? themeData.iconColor,
iconSize: widget.iconSize ?? themeData.iconSize,
);
}