FractionSnappingModel constructor

FractionSnappingModel(
  1. Set<double> fractions
)

Constructs an FractionSnappingModel with the given fractions.

  • fractions: A set of fractions defining snapping positions. Each value should fall between 0.0 (bottom of the viewport) and 1.0 (top of the viewport).

Usage Example:

// Define sheet height snapping positions at 20%, 50%, and 75% of the viewport height.
final snappingModel = FractionSnappingModel({0.2, 0.5, 0.75});

Implementation

FractionSnappingModel(this.fractions);