Toolbar in dark mode how to avoid or remove the black background?

How to remove the black background for both navigation bar and tab bar when scrolling.

When in light mode, it looks fine.

You're referring to the automatic scroll edge effect. It is a subtle blur and fade effect applied to content under system toolbars. If your app has any extra backgrounds or darkening effects behind the bar items, make sure to remove them, as these will interfere with the effect.

You can tune the sharpness of the scroll edge effect on your content with the scrollEdgeEffectStyle modifier.

Toolbar in dark mode how to avoid or remove the black background?
 
 
Q