adaptiveAppBarScrollUnderOff property

FlexAdaptive? adaptiveAppBarScrollUnderOff
final

Controls if the AppBar scroll under elevation tint feature is used in Material 3 theming on the AppBar.

The adaptiveRemoveElevationTint will not remove elevation tint or the scroll under elevation tint from the AppBar. It is done via this separate property instead. You may want to use the visually quite useful scroll under elevation tint of the AppBar, having it as a separate property from the general adaptiveRemoveElevationTint allows you to do so.

In Material 3, when you scroll content under an AppBar, it changes color slightly to make it distinct from the background color it has by default in M3 design. It equals the background color of the Scaffold by default.

Having a color equal on the AppBar as the background is a design style used for a long time on iOS. The tint when you scroll under is quite nice, but not a style commonly used on other platforms. With the adaptiveAppBarScrollUnderOff property you can remove the scroll under elevation tint effect on selected platforms. Recommend keeping it used though, it is quite useful and elegant.

See class FlexAdaptive on how to configure the platform adaptive behavior. You may for example like the FlexAdaptive.iOSAndDesktop for a configuration that only keeps elevation tint on Material 3 themes on Android and Fuchsia platforms, and when the app is run in a web browser on these platforms.

The AppBar still changes its elevation to appBarScrolledUnderElevation when you scroll things under it. However, with adaptiveAppBarScrollUnderOff there is no tint change as a result of it.

If you use adaptiveElevationShadowsBack the shadows will change to the shadow level for used appBarScrolledUnderElevation. If you don't want any visible change in the shadows when you scroll under the AppBar, you should set the appBarScrolledUnderElevation equal to the used elevation on the AppBar, typically set via FlexColorScheme.appBarElevation.

If not defined, defaults to FlexAdaptive.off.

Implementation

final FlexAdaptive? adaptiveAppBarScrollUnderOff;