Skip to content

BouncingScrollPhysics.frictionFactor documentation is wrong #95367

@nt4f04uNd

Description

@nt4f04uNd

https://api.flutter.dev/flutter/widgets/BouncingScrollPhysics/frictionFactor.html

This factor starts at 0.52 and progressively becomes harder to overscroll as more of the area past the edge is dragged in (represented by an increasing overscrollFraction which starts at 0 when there is no overscroll).

However, the bigger the overscrollFraction parameter is, the less the returned friction

This codesample will print out decreasing values

import 'dart:math' as math;

void main() {
  double frictionFactor(double overscrollFraction) => 0.52 * math.pow(1 - overscrollFraction, 2);
  for (double i = 0; i < 1; i += 0.01) {
    print(frictionFactor(i));
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listd: api docsIssues with https://api.flutter.dev/f: scrollingViewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions