Spotlight constructor

Spotlight({
  1. bool? enabled,
  2. Offset? position,
  3. SpotlightStyle? style,
})

Creates a SceneElement which represents a spotlight.

Implementation

Spotlight({
  bool? enabled,
  Offset? position,
  SpotlightStyle? style,
})  : _style = style ?? SpotlightStyle.defaultStyle,
      super(
        enabled: enabled,
        layoutDelegate: PositionedBoxLayoutDelegate(
          alignment: Alignment.center,
          position: position ?? Offset.zero,
          size: Size.zero,
        ),
      ) {
  _updateSize();
}