shape property

ShapeBorder? shape
final

The shape of the app bar's Material as well as its shadow.

If this property is null, then the ambient AppBarThemeData.shape is used. Both properties default to null. If both properties are null then the shape of the app bar's Material is just a simple rectangle.

A shadow is only displayed if the elevation is greater than zero.

{@tool dartpad} This sample demonstrates how to implement a custom app bar shape for the shape property.

** See code in examples/api/lib/material/app_bar/app_bar.4.dart ** {@end-tool} See also:

  • elevation, which defines the size of the shadow below the app bar.
  • shadowColor, which is the color of the shadow below the app bar.

Implementation

final ShapeBorder? shape;