FollowerLayer constructor Null safety

FollowerLayer(
  1. {required LayerLink link,
  2. bool? showWhenUnlinked = true,
  3. Offset? unlinkedOffset = Offset.zero,
  4. Offset? linkedOffset = Offset.zero}
)

Creates a follower layer.

The link property must not be null.

The unlinkedOffset, linkedOffset, and showWhenUnlinked properties must be non-null before the compositing phase of the pipeline.

Implementation

FollowerLayer({
  required LayerLink link,
  this.showWhenUnlinked = true,
  this.unlinkedOffset = Offset.zero,
  this.linkedOffset = Offset.zero,
}) : assert(link != null), _link = link;