backgroundBuilder property

ButtonLayerBuilder? backgroundBuilder
final

Creates a widget that becomes the child of the button's Material and whose child is the rest of the button, including the button's child parameter.

The widget created by backgroundBuilder is constrained to be the same size as the overall button and will appear behind the button's child. The widget created by foregroundBuilder is constrained to be the same size as the button's child, i.e. it's inset by ButtonStyle.padding and aligned by the button's ButtonStyle.alignment.

By default the returned widget is clipped to the Material's ButtonStyle.shape.

See also:

Implementation

final ButtonLayerBuilder? backgroundBuilder;