Closed Trefa1998 closed 3 years ago
I forked the repository and ran through the migration tool myself earlier to see if I could save you some time, but it fails two of your tests:
1.) 'finish transition' -> 'should finish transition in case new source page is not equal to current source page'
2.) 'transition animation' -> 'should return reverse in case newvalue is [smaller] than previous value.'
TransitionAnimation.calculateStatus
method. You currently have:
if (newValue == 0.0) {
return AnimationStatus.dismissed;
} else if (newValue == 1.0) {
return AnimationStatus.completed;
} else if (newValue > _value) {
return AnimationStatus.forward;
} else if (newValue < _value) {
return AnimationStatus.reverse;
} else {
//this can never happen but is a fallback scenario
return null;
}
My assumption was that the animation status should never be null, however, by setting sut.value = 0.5 in the previous test (#6) and then setting it again in #7, we do hit that null return that isn't supposed to happen.
Theoretically if we could have a <= on one of the else-ifs or return AnimationStatus.dismissed (suggested because it is the initial value) on the else clause, that could help.
I've published version 2.0 with null safety. Thanks again for doing the migration.
Hi Sander. I love the package, so thank you.
Are there any plans in the works to migrate to Null Safety for Dart 2.12+?