Closed Mohitmadhav closed 3 years ago
Merging #243 (ccd97bf) into master (f50ac48) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #243 +/- ##
=======================================
Coverage 95.38% 95.38%
=======================================
Files 10 10
Lines 455 455
=======================================
Hits 434 434
Misses 21 21
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update f50ac48...ccd97bf. Read the comment docs.
I updated the README 2 minutes ago. Please check @aagarwal1012 @SirusCodes.
@all-contributors add @Mohitmadhav for documentation.
@aagarwal1012
I've put up a pull request to add @Mohitmadhav! :tada:
Hey @aagarwal1012 have you seen my comment on?
@SirusCodes where is your comment?
Actually I started a review
@SirusCodes why your comment doesn't appear in this PR?
Anyways, @Mohitmadhav can you create a new PR stating @SirusCodes' comments?
Maybe starting a review won't appear on PR.🤔
@SirusCodes so what more possible reasons could be there?? Even I am confused. Then only I'll be able to add an example with reference to that in the new PR.
So, I tried to replicate the issue.. and observed a few things and found out the reason but I don't know exactly why keys fixes it. My 1st guess would be what that video says...
What causes the issue:
When user calls setState
the tree changes and new text list is assigned but the _index
field in the AnimatedTextKit
is not updated according to new list size. That is if the user calls setState
after the index is crossed it will throw RangeError
.
Example
text
has 3 stringssetState
bool get _isLast => _index == widget.animatedTexts.length - 1;
this condition fails and index is increased.Possible fix
bool get _isLast => _index == widget.animatedTexts.length - 1;
=> bool get _isLast => _index >= widget.animatedTexts.length - 1;
This might fix the issue but testing is required...
If this issue is resolved by this then there is not need to add this workaround ;)
@aagarwal1012 and @Mohitmadhav take a look at it
Fixes #198
setState
text
issue in the README file.key
that changes based on thetext
) along with the video by Google Developers.Please tell if anything else needs to be added - Like flutter documentation, etc.