-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Closed
Copy link
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: animationAnimation APIsAnimation APIsa: error messageError messages from the Flutter frameworkError messages from the Flutter frameworkfound in release: 3.16Found to occur in 3.16Found to occur in 3.16found in release: 3.19Found to occur in 3.19Found to occur in 3.19frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Description
Steps to reproduce
Example 1: Create an AnimationController like this:
controller = AnimationController(
duration: const Duration(seconds: 2),
vsync: this,
lowerBound: 100,
upperBound: 300);
controller.repeat();Example 2: Create an AnimationController like this:
controller = AnimationController(
duration: const Duration(seconds: 2),
vsync: this,
lowerBound: -100,
upperBound: 200);
controller.repeat();Expected results
The first animation starts with the value 100 and the second starts with the value -100.
Actual results
In the first example the animation starts with the value 200 and in the second example Flutter throws the following exception:
Assertion failed: file:///opt/flutter/packages/flutter/lib/src/animation/animation_controller.dart:889:12 _initialT >= 0.0 is not true
Code sample
Here is a DartPad that shows both issues: https://dartpad.dev/?id=79b890fd2a994d6e3f5ac210f433e7d5
Flutter Doctor output
Tested on the latest release and the latest main.
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: animationAnimation APIsAnimation APIsa: error messageError messages from the Flutter frameworkError messages from the Flutter frameworkfound in release: 3.16Found to occur in 3.16Found to occur in 3.16found in release: 3.19Found to occur in 3.19Found to occur in 3.19frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team