getFromContext function
Implementation
SecondaryNomoButtonThemeData getFromContext(
BuildContext context,
SecondaryNomoButton widget,
) {
final globalColorTheme =
NomoTheme.maybeOf(context)?.componentColors.secondaryButtonColor ??
const SecondaryNomoButtonColorData();
final globalSizingTheme =
NomoTheme.maybeOf(context)?.componentSizes.secondaryButtonSizing ??
const SecondaryNomoButtonSizingData();
const globalConstants = SecondaryNomoButtonConstants();
final themeOverride = SecondaryNomoButtonThemeOverride.maybeOf(context);
final themeData = SecondaryNomoButtonThemeData.from(
globalColorTheme, globalSizingTheme, globalConstants)
.copyWith(themeOverride);
return SecondaryNomoButtonThemeData(
backgroundColor: widget.backgroundColor ?? themeData.backgroundColor,
foregroundColor: widget.foregroundColor ?? themeData.foregroundColor,
elevation: widget.elevation ?? themeData.elevation,
selectionColor: widget.selectionColor ?? themeData.selectionColor,
border: widget.border ?? themeData.border,
borderRadius: widget.borderRadius ?? themeData.borderRadius,
padding: widget.padding ?? themeData.padding,
);
}