ReactiveCircus / FlowBinding

Kotlin Coroutines Flow binding APIs for Android's platform and unbundled UI widgets, inspired by RxBinding.
https://reactivecircus.github.io/FlowBinding/
Apache License 2.0
901 stars 42 forks source link

Data classes for event wrappers #112

Closed octa-one closed 4 years ago

octa-one commented 4 years ago

What do you think about converting "event wrapper" classes to data classes? (TextChangeEvent, ScrollEvent, EditorActionEvent, etc)

I see at least two improvements:

// with data class textView.textChangeEvents().collect { (view, text, , , _) -> doSmth(view, text) }

ychescale9 commented 4 years ago

I agree it's a good idea and thanks for the destructuring example.

This change will change the ABI although I'm not too concerned since converting to a data class should be binary compatible change.

octa-one commented 4 years ago

Great, thanks for the quick response!

ychescale9 commented 4 years ago

This change is now available in 1.0.0-beta02.