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

feat: add loop of the animation badge #72

Merged
merged 19 commits into from Nov 15, 2022
Merged

Conversation

sawel24
Copy link
Contributor

@sawel24 sawel24 commented Oct 31, 2022

Connection with issue(s)

Resolve issue #66

Adds a loop of the animation badge

Screen.Recording.2022-10-31.at.19.17.49.mov

@sawel24 sawel24 self-assigned this Oct 31, 2022
@yadaniyil
Copy link
Collaborator

@sawel24 no one will use this type of loop animation. Can you show how fade in fade out looks like?

@sawel24
Copy link
Contributor Author

sawel24 commented Nov 2, 2022

@sawel24 no one will use this type of loop animation. Can you show how fade in fade out looks like?
These are examples of looped fade animation and scale animation

fade.animation.mov
scale.animation.mov

lib/src/badge.dart Outdated Show resolved Hide resolved
lib/src/badge.dart Outdated Show resolved Hide resolved
@sawel24
Copy link
Contributor Author

sawel24 commented Nov 2, 2022

New versions of the animation

scale.2.0.mov
fade.2.0.mov

@yadaniyil
Copy link
Collaborator

@sawel24 Good job! Can we try to add curves to our animations? They will look more real

@sawel24 sawel24 linked an issue Nov 2, 2022 that may be closed by this pull request
@sawel24
Copy link
Contributor Author

sawel24 commented Nov 2, 2022

@sawel24 Good job! Can we try to add curves to our animations? They will look more real

I added a variable to control our animation. These are one of the examples, animation with adding a curve

fade.3.0.mov

@yadaniyil
Copy link
Collaborator

@sawel24 In this PR you are breaking the current animation behavior. You make Curve.easeIn the default curve, but you removed Curves.elasticOut for slide animation type.
Also, think about creating a separate constructor for looped animation badge, e.g. Badge.looped(child:...)

Copy link
Collaborator

@yadaniyil yadaniyil left a comment

Choose a reason for hiding this comment

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

Left a comment

@sawel24
Copy link
Contributor Author

sawel24 commented Nov 4, 2022

@sawel24 In this PR you are breaking the current animation behavior. You make Curve.easeIn the default curve, but you removed Curves.elasticOut for slide animation type. Also, think about creating a separate constructor for looped animation badge, e.g. Badge.looped(child:...)

I fixed the broken animation for the slide and created a separate constructor for the looped Badge. Recheck the code, is this the right solution?

@yadaniyil yadaniyil merged commit 98d6375 into dev Nov 15, 2022
@yadaniyil yadaniyil deleted the feat/add-loop-of-the-animation branch November 15, 2022 12:57
yadaniyil added a commit that referenced this pull request Dec 25, 2022
* Add onTap, update to 2.0.4

* Update CHANGELOG.md

* Add widget test for badge

* fix: change widget tests for badges

* fix: add onTap to badge without child widget,
add widget tests for onTap badge

* Big refactoring and example change

* fix: migrate from pedantic lint to flutter lints latest version

* refactor: refactor code for flutter lints

* feat: add duration of the appearance Badge (#70)

* feat: add duration of the appearance Badge

* fix: changes duration value AnimatedOpacity to new parameter appearanceDuration

* Update lib/src/badge.dart

Co-authored-by: Daniyil Yakovlev <danny.yakovlev@gmail.com>

* Fix/update widget tests (#71)

* fix: update widget tests

* fix: resolve conflicts

Co-authored-by: Danylo Yakovlev <danny.yakovlev@gmail.com>

* feat: add unit tests for calculate methods (#73)

* feat: add loop of the animation badge (#72)

* feat: add loop of the animation badge

* fix: fix looping animation with adding correct duration

* fix: change loop animation from fade out to fade-in-fade out

* fix: add a variable for controls curve of the animation

* fix: add new variable for control curve slide animation and fade animation

* fix: add named constructor for looped animation Badge

* fix: add calling private constructor from public

* fix: rollback last commit

* fix: add calling private constructor from public

* fix: change animation for looped Badge

* fix: remove unnecessary code

* fix: smooth stopping looped animation

* refactor: BadgeStyle introduced

* refactor: BadgeAnimation introduced

* feat: add rotation and size animation types

* feat: add bouncing animation for arrow in HumanAvatar badge

* feat: more customisation for badge animations

* refactor: remove commented code

Co-authored-by: Danylo Yakovlev <danny.yakovlev@gmail.com>

* fix: add new color changing animation (#76)

* fix: add new color changing animation

* feat: new params for badge color animation duration and curve

Co-authored-by: Daniyil Yakovlev <danny.yakovlev@gmail.com>

* feat: Twitter style badge shape  (#80)

* feat: add custom drawing Badge shapes

* fix: add border for custom drawing shapes

* refactor: delete unnecessary code and rename files

* fix: add new line painter for custom shape

* refactor : refactor painting border in line painter

* fix: resolve merge conflicts and create examples of sun Badge

* feat: add gradient for badge border

* refactor: refactor code

* refactor: remove unnecessary import

* fix(custom shape): Fix painting line painter

* feat: Twitter account widget in example app

Co-authored-by: Daniyil Yakovlev <danny.yakovlev@gmail.com>

* feat: GitHub Actions test coverage (#88)

* feat: VeryGoodCoverage added to Github Actions workflow

* feat: add coverage to flutter test command

* feat: set min coverage to 35 to merge the PR and update the coverage later

* feat: add instagram badge (#87)

* feat: add instagram badge

* refactor: name changes

Co-authored-by: Daniyil Yakovlev <danny.yakovlev@gmail.com>

* feat: add appearance disappearance scale animation (#82)

* feat:add appearance or disappearance of the scale animation

* refactor: format code

* fix: fix disappearance rotation animation

* refactor: remove print

* feat: Remove Tween for scale animation and add ability to add curve to scale animation

* fix: Change disappearance animation

* fix: change instagram appearance animation

* fix: change animation with duration zero

* fix: resolve merge conflicts

Co-authored-by: Daniyil Yakovlev <danny.yakovlev@gmail.com>

* feat: flutter test coverage (#89)

* feat: flutter test coverage

* fix: small typos and refactoring

* refactor: appearanceDuration renamed to disappearanceFadeAnimationDuration

Co-authored-by: Daniyil Yakovlev <danny.yakovlev@gmail.com>

* fix: appearance bug animation (#90)

* fix: change appearance animation

* fix: change animatedOpacity on animatedBuilder

* fix: add parameter for fade animation enabled

* fix: remove print

* feat: add integration test for badges and badge animations (#91)

* feat: add integration test for badges and badge animations

* fix: resolve git code quality errors

* fix: change integration tests

* fix: replace TestScreen on HomeScreen

* fix: rename integration test

* fix: format code

* fix: integration tests run configuration

* fix: change the opacity calculation for the widget

* fix: resolve git errors

* fix: add tests for badges with different duration

* fix: add tests for animation duration

* refactor: tests

* tests: Add animation duration test, WIP

* fix: add tests for different animations

Co-authored-by: Daniyil Yakovlev <danny.yakovlev@gmail.com>

* fix: change badge animation and tests (#93)

* fix: add new parameters to control badge animations add new widget tests for badge, remove unnecessary badge parameters

* fix: resolve github Actions errors with tests

* Slight refactroing

Co-authored-by: Daniyil Yakovlev <danny.yakovlev@gmail.com>

* docs: readme (#94)

* readme: showcase gif

* readme update

* Add readme header image

* Update readme

* Update showcase gif

* Badge animations gif added

* docs: badge shapes preview

* fix: readme typo

* readme: change preview png and gif

* docs: migration_guide

* fix migration guide size

* Refactoring

* Add pub.dev preview image

* Remove old code

* License update

* Add some badges to readme

* Version, changelog and readme update

* Fix tests

Co-authored-by: M-ixai-L <mponochovniy@gmail.com>
Co-authored-by: Mykhailo Ponochovnyi <92673427+M-ixai-L@users.noreply.github.com>
Co-authored-by: sawel24 <sawel.gnidenko@gmail.com>
Co-authored-by: Vitaliy <82770717+sawel24@users.noreply.github.com>
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.

Question - loop animation
2 participants