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
Adding time extensions #11
Conversation
Thanks for your contribution! The The extensions on |
Wow great! I haven't seen those members. Nice job then =) |
Hey @shinayser @leisim By the way, amazing idea to curate these extensions but I have a slight tingle in my stomach that copying source code and tests may not be an elegant solution as both libraries could take different directions and divert at some point from bug fixes, api changes and just normal improvements and one would have to track both implementations and test cases whenever this happens. @leisim with your permission, the improvements on |
Just removed the duplicated int extensions! |
I agree. I would never copy your without asking. I actually took this functionality from Kotlin before your package was released.
Yeah sure, no problem. Do you think I should remove all time related getters? My vision with |
My objective of doing the merge was to make dartx the only library needed for all this small extensions that we use all the time on our work days. Imagine if you want to use timer extensions, you will have to import it manually. |
No issues really, I was just more worried on how to proceed when things start to diverge.
If you wouldn't mind, I could make Time.dart more robust with those inclusions.
At least with the current implementation of extensions for dart we shouldn't be worried about this, There is an open discussion about global scoping (even though I wouldn't want that to be honest) and that could break projects down the road for every one. |
A more elegant solution is to have |
Shit sorry I edited you comment... |
@rrousselGit good of you to join in :)
@shinayser, considering the fact that extensions are scoped to their imports, I would not think this is the way to go. |
@leisim I was already edging towards that idea in my mind. Good to know we are all in sync 💙 👍 |
Awesome. So, making dartx depend on time will be the best sollution. Will you do this @leisim, or you want me to push that change? |
Perfect, let's do that. You create extensions for |
This is also a future proof solution to solve these kinds of conflict. |
Yes @leisim will do that and add more tests. |
That was a nice smooth discussion! Epic ❤️ |
@jogboms @rrousselGit @shinayser I made the changes and added a small example to the readme. A new version will be published once |
Amazing! Can't wait to use it with Flutter! Anyone got any idea when we getting dart 2.6 on it? |
@shinayser not so sure on the timeline. @leisim published v1.1.0 of Time.dart |
Hello!
I got the code produced by jogboms on https://github.com/jogboms/time.dart and merged his great libraries into dartx.
This commit introduces all the jogbom's extensions to time types, like producing durations through integers and some other utility methods.