getFromContext function
Implementation
NomoAppBarThemeData getFromContext(
BuildContext context,
NomoAppBar widget,
) {
final globalColorTheme =
NomoTheme.maybeOf(context)?.componentColors.appBarColor ??
const NomoAppBarColorData();
final globalSizingTheme =
NomoTheme.maybeOf(context)?.componentSizes.appBarSizing ??
const NomoAppBarSizingData();
const globalConstants = NomoAppBarConstants();
final themeOverride = NomoAppBarThemeOverride.maybeOf(context);
final themeData = NomoAppBarThemeData.from(
globalColorTheme, globalSizingTheme, globalConstants)
.copyWith(themeOverride);
return NomoAppBarThemeData(
borderRadius: widget.borderRadius ?? themeData.borderRadius,
backgroundColor: widget.backgroundColor ?? themeData.backgroundColor,
spacing: widget.spacing ?? themeData.spacing,
topInset: widget.topInset ?? themeData.topInset,
height: widget.height ?? themeData.height,
elevation: widget.elevation ?? themeData.elevation,
);
}