Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimized the initState for AnimatedTextKit #169

Merged
merged 1 commit into from
Dec 11, 2020

Conversation

awhitford
Copy link
Collaborator

For AnimatedTextKit, the initState was calling _nextAnimation which was calling setState. Technically, setState should not be called from within initState. Refactored the code so that both initState and _nextAnimation call _initAnimation. Initialization is simplified.

@awhitford
Copy link
Collaborator Author

I suspect this should resolve #168.

@codecov
Copy link

codecov bot commented Dec 10, 2020

Codecov Report

Merging #169 (7f9f91b) into master (ef52c3f) will decrease coverage by 1.57%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #169      +/-   ##
==========================================
- Coverage   91.01%   89.43%   -1.58%     
==========================================
  Files           9        9              
  Lines         445      445              
==========================================
- Hits          405      398       -7     
- Misses         40       47       +7     
Impacted Files Coverage Δ
lib/src/animated_text.dart 68.13% <50.00%> (-7.70%) ⬇️

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 ef52c3f...7f9f91b. Read the comment docs.

Copy link
Owner

@aagarwal1012 aagarwal1012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@aagarwal1012
Copy link
Owner

@awhitford, please do a new release after merging this PR.

@aagarwal1012 aagarwal1012 merged commit 1a1f7ad into aagarwal1012:master Dec 11, 2020
@awhitford awhitford deleted the initOpt branch December 11, 2020 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants