SnapComponent.position constructor

const SnapComponent.position({
  1. required Components component,
  2. required double position,
})

Factory constructor to create a SnapComponentAtPosition, which stops at a specific pixel position.

  • component: The component to associate with this position.
  • position: The fixed pixel position for the snap point.

Implementation

const factory SnapComponent.position({
  required Components component,
  required double position,
}) = SnapComponentAtPosition;