- 
                Notifications
    
You must be signed in to change notification settings  - Fork 277
 
Add distinctBy #396
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
base: master
Are you sure you want to change the base?
Add distinctBy #396
Conversation
3e5da35    to
    490ad4f      
    Compare
  
    490ad4f    to
    326afac      
    Compare
  
    
          Codecov Report
 @@            Coverage Diff             @@
##           master     #396      +/-   ##
==========================================
- Coverage   93.34%   93.34%   -0.01%     
==========================================
  Files          59       61       +2     
  Lines        2013     2043      +30     
==========================================
+ Hits         1879     1907      +28     
- Misses        134      136       +2 | 
    
| 
           Heya, Thanks for submitting a PR! However, I think it's best if we try to keep the amount of operators to a minimum, You could do similar things for all other operators too, to suit different special use cases, but in the end, the sheer amount of operators would be too overwhelming even to experienced users. Plus, you could simply enable this extension in your own project easily.  | 
    
| 
           In RxJava and RxJs, the  According to you mention that keep the amount of operators to a minimum. I think the  And yes, that's why I created a simple package for that: https://github.com/yongjhih/flutter_ext/blob/master/streamx/lib/streamx.dart  | 
    
| 
           Remember, rxdart is built on top of Dart Streams. In Dart Streams, there's distinct. But with different behavior to Rx in general, where we have distinct and distinctUntilChanged. So, since distinct is taken, we chose to add distinctUnique and gave it the same signature, i.e. an (a, b) => bool. The above is confusing to begin with, if we then add alternatives using selectors, we'd get: ...which is my main concern here. Maybe selectors in general need a separate issue, cos we'd want to be consistent throughout the whole library then. Just a random thought, but we could make selector alternatives available in a separate lib, ie rxdart/selectors.dart which is an optional import. That way the common operators would follow Dart standards, where the new import would follow classic Rx standards.  | 
    
| 
           For anyone interested in this extension (  | 
    
          Codecov Report❌ Patch coverage is  Additional details and impacted files@@            Coverage Diff             @@
##           master     #396      +/-   ##
==========================================
- Coverage   93.34%   93.34%   -0.01%     
==========================================
  Files          59       61       +2     
  Lines        2013     2043      +30     
==========================================
+ Hits         1879     1907      +28     
- Misses        134      136       +2     🚀 New features to boost your workflow:
  | 
    
Uh oh!
There was an error while loading. Please reload this page.