Skip to content

Commit

Permalink
Add TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
fujidaiti committed Jul 21, 2024
1 parent a54b6bd commit 67b0ab2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package/lib/src/foundation/sheet_physics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ abstract class SheetPhysics {

double computeOverflow(double offset, SheetMetrics metrics);

// TODO: Change to return a tuple of (physicsAppliedOffset, overflow) to avoid recomputation of the overflow.
double applyPhysicsToOffset(double offset, SheetMetrics metrics);

Simulation? createBallisticSimulation(double velocity, SheetMetrics metrics);
Expand Down Expand Up @@ -92,6 +93,7 @@ mixin SheetPhysicsMixin on SheetPhysics {

@override
double applyPhysicsToOffset(double offset, SheetMetrics metrics) {
// TODO: Use computeOverflow() to calculate the overflowed pixels.
if (parent case final parent?) {
return parent.applyPhysicsToOffset(offset, metrics);
} else if (offset > 0 && metrics.pixels < metrics.maxPixels) {
Expand Down

0 comments on commit 67b0ab2

Please sign in to comment.