SnapComponentWithOffset constructor

const SnapComponentWithOffset({
  1. required Components component,
  2. double offset = 0.0,
  3. double size = 1.0,
})

Represents a snap component with a specified size and an additional pixel offset.

  • component: The component to associate with this snap size and offset.
  • offset: The additional pixel offset to add to the size.
  • size: A multiplier for the component's base size. Must be non-negative.

Implementation

const SnapComponentWithOffset({
  required this.component,
  this.offset = 0.0,
  this.size = 1.0,
}) : assert(size >= 0.0, 'Component size can not be negative');