Skip to content

The AnimationController animateWith must allow to change the direction #60419

@nt4f04uNd

Description

@nt4f04uNd

Use case

I want to use my own spring simulation for fling animation of a widget

Proposal

Allow us to have some control over the direction of the animation.

Src link

/// From animation\animation_controller.dart
///
/// The [status] is always [AnimationStatus.forward] for the entire duration
/// of the simulation. --------- I mean - WHY is that?
  TickerFuture animateWith(Simulation simulation) {
    assert(
      _ticker != null,
      'AnimationController.animateWith() called after AnimationController.dispose()\n'
      'AnimationController methods should not be used after calling dispose.'
    );
    stop();
    _direction = _AnimationDirection.forward;
    return _startSimulation(simulation);
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: animationAnimation APIsc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions