elevation property Null safety

double? elevation

The z-coordinate at which to place this app bar relative to its parent.

This property controls the size of the shadow below the app bar if shadowColor is not null.

If surfaceTintColor is not null then it will apply a surface tint overlay to the background color (see Material.surfaceTintColor for more detail).

The value must be non-negative.

If this property is null, then AppBarTheme.elevation of ThemeData.appBarTheme is used. If that is also null, the default value is 4.

See also:

  • scrolledUnderElevation, which will be used when the app bar has something scrolled underneath it.
  • shadowColor, which is the color of the shadow below the app bar.
  • surfaceTintColor, which determines the elevation overlay that will be applied to the background of the app bar.
  • shape, which defines the shape of the app bar's Material and its shadow.


final double? elevation;