center property Null safety

AlignmentGeometry center
final

The center of the gradient, as an offset into the (-1.0, -1.0) x (1.0, 1.0) square describing the gradient which will be mapped onto the paint box.

For example, an alignment of (0.0, 0.0) will place the radial gradient in the center of the box.

If this is an Alignment, then it is expressed as a vector from coordinate (0.0, 0.0), in a coordinate space that maps the center of the paint box at (0.0, 0.0) and the bottom right at (1.0, 1.0).

It can also be an AlignmentDirectional, where the start is the left in left-to-right contexts and the right in right-to-left contexts. If a text-direction-dependent value is provided here, then the createShader method will need to be given a TextDirection.

Implementation

final AlignmentGeometry center;