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

Adds indicatorGradient to ToggleStyle #45

Merged
merged 8 commits into from
Oct 7, 2023
Merged

Conversation

maeddin
Copy link
Member

@maeddin maeddin commented Oct 5, 2023

closes #44
closes #46

@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (10e058a) 96.91% compared to head (47ad88f) 96.93%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #45      +/-   ##
==========================================
+ Coverage   96.91%   96.93%   +0.02%     
==========================================
  Files           7        7              
  Lines         777      783       +6     
==========================================
+ Hits          753      759       +6     
  Misses         24       24              
Files Coverage Δ
lib/src/style.dart 100.00% <100.00%> (ø)
lib/src/widgets/animated_toggle_switch.dart 96.90% <100.00%> (+0.01%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@denisgl7
Copy link

denisgl7 commented Oct 6, 2023

What does it take to be accepted?

@maeddin
Copy link
Member Author

maeddin commented Oct 6, 2023

@denisgl7 I need to do some more testing and don't know when I'll have the time. But feel free to include this version in your project already if you need the feature now.

animated_toggle_switch:
    git:
      url: https://github.com/SplashByte/animated_toggle_switch.git
      ref: 44-indicator-gradient

@denisgl7
Copy link

denisgl7 commented Oct 6, 2023

Everything works great! In fact, you just need to check whether the color or the gradient will be used in priority. As far as I understand - you just put a gradient on the container. Thank you very much for adding this feature!

@denisgl7
Copy link

denisgl7 commented Oct 7, 2023

2023-10-07.10.32.21.mov

Can you tell me why changing the theme takes so long in your component? I tried changing the animation time and it was no use. Should I create a separate issue?

@maeddin
Copy link
Member Author

maeddin commented Oct 7, 2023

@denisgl7 You can create an issue, but I won't be able to fix this problem so easily. All changes in the ToggleStyle (including all changes in the theme) are currently animated with animationDuration. I would have to rewrite the current structure to do this. Would disabling these style animations work for you for now? Then I would implement something for that.

@denisgl7
Copy link

denisgl7 commented Oct 7, 2023

I don't feel comfortable asking you to change anything else. I'll try to fix the problem myself :)

@maeddin
Copy link
Member Author

maeddin commented Oct 7, 2023

@denisgl7 I don't think you can fix this problem from outside. Create an issue and I'll take a look at it. 👍

@maeddin maeddin merged commit 5675799 into main Oct 7, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants