drawObject method Null safety

void drawObject(
  1. {required DrawableObject drawable,
  2. required Vector2 position,
  3. required int priority,
  4. bool cameraRelative = true}
)

Implementation

void drawObject(
    {required DrawableObject drawable,
    required Vector2 position,
    required int priority,
    bool cameraRelative = true}) {
  if (drawable.hasTextureRegion) {
    drawTextureRegion(
        textureRegion: drawable.textureRegion!,
        transform: drawable.data,
        color: drawable.color,
        position: position,
        priority: priority,
        cameraRelative: cameraRelative);
  }
}