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

Corrected alignment adjustment logic. #138

Merged
merged 1 commit into from
Oct 25, 2020

Conversation

awhitford
Copy link
Collaborator

One of my recent changes replaced the logic in RotateAnimatedTextKit to handle the alignment property. The new logic was revised to use the + operator, which assumed that alignment was an Alignment. However, it is actually an AlignmentGeometry, so the code was reverted to use the add method, which can accommodate Alignment or AlignmentDirectional. Ultimately, an Alignment is required by the AlignmentTween, so the add result needs to be resolved, which requires the textDirection. The final code is type safe.

  • Added textDirection to RotateAnimatedTextKit which was necessary to accommodate an AlignmentGeometry override.
  • Replaced Alignment constants with built-in constants making it easier to read and maintain.
  • Added workaround for gesture detection taps, so was able to validate the onTap callback for RotateAnimatedTextKit and boost code coverage.
  • Corrected an incorrect comment which erroneously stated the wrong default value.

…th built-in constants. Added workaround for gesture detection taps.
@codecov
Copy link

codecov bot commented Oct 25, 2020

Codecov Report

Merging #138 into master will increase coverage by 1.73%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #138      +/-   ##
==========================================
+ Coverage   80.26%   81.99%   +1.73%     
==========================================
  Files           8        8              
  Lines         760      761       +1     
==========================================
+ Hits          610      624      +14     
+ Misses        150      137      -13     
Impacted Files Coverage Δ
lib/src/rotate.dart 81.00% <100.00%> (+13.32%) ⬆️

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 caeb7af...8a7318b. 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 aagarwal1012 merged commit 2728a75 into aagarwal1012:master Oct 25, 2020
@awhitford awhitford deleted the rotate-alignment branch October 25, 2020 21:35
@awhitford
Copy link
Collaborator Author

Related to #128, code coverage is now 82%. 🎉

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