resolveSurfaceStyle static method
The surface style this app bar renders with in context.
Precedence: the per-instance style, then the ambient StreamAppBarTheme
style, then the ambient StreamSurfaceStyle.
Matches what the bar resolves for itself, so a StreamScaffold can lay out its slot to match before the bar builds.
Implementation
static StreamSurfaceStyle resolveSurfaceStyle(
BuildContext context, {
StreamAppBarStyle? style,
}) {
final themeStyle = context.streamAppBarTheme.style;
final effective = themeStyle?.merge(style) ?? style;
return effective?.surfaceStyle ?? context.streamSurfaceStyle;
}