getFromContext function
Implementation
NomoLinkButtonThemeData getFromContext(
BuildContext context,
NomoLinkButton widget,
) {
final globalColorTheme =
NomoTheme.maybeOf(context)?.componentColors.linkButtonColor ??
const NomoLinkButtonColorData();
final globalSizingTheme =
NomoTheme.maybeOf(context)?.componentSizes.linkButtonSizing ??
const NomoLinkButtonSizingData();
const globalConstants = NomoLinkButtonConstants();
final themeOverride = NomoLinkButtonThemeOverride.maybeOf(context);
final themeData = NomoLinkButtonThemeData.from(
globalColorTheme, globalSizingTheme, globalConstants)
.copyWith(themeOverride);
return NomoLinkButtonThemeData(
foregroundColor: widget.foregroundColor ?? themeData.foregroundColor,
tapDownColor: widget.tapDownColor ?? themeData.tapDownColor,
padding: widget.padding ?? themeData.padding,
selectionColor: widget.selectionColor ?? themeData.selectionColor,
);
}