AnnotatedRegionLayer<T extends Object> constructor Null safety

AnnotatedRegionLayer<T extends Object>(
  1. T value,
  2. {Size? size,
  3. Offset? offset,
  4. bool opaque}
)

Creates a new layer that annotates its children with value.

The value provided cannot be null.

Implementation

AnnotatedRegionLayer(
  this.value, {
  this.size,
  Offset? offset,
  this.opaque = false,
}) : assert(value != null),
     assert(opaque != null),
     offset = offset ?? Offset.zero;