rebloc icon indicating copy to clipboard operation
rebloc copied to clipboard

Rebloc Usage with text entry

Open adesugbaa opened this issue 6 years ago • 2 comments

Thanks for the great library rebloc. I am trying to figure out how I can use a SimpleBloc with a widget that has TextFields.

I have seen samples where the standard BLOC exposed streams and functions that access the sinks, and are wired to StreamBuilder that return the TextField.

If I used rebloc, would I have to maintain state and validate the TextField within the widget, and simply dispatch actions for something like the login passing the username/password?

I liked the separation and hidden logic within the standard BLOC, but not sure how to use a VIewModelSubscriber in place of a StreamBuilder while exposing Streams/Sinks from the SimpleBloc.

adesugbaa avatar Dec 11 '18 17:12 adesugbaa

Same question here. I'm wondering, since rebloc seems similar to the Provider approach -- https://stackoverflow.com/q/61863224/1399272 -- could this perhaps be relevant?

I'll have to dig into it some. Enjoying the library.

nabond251 avatar Apr 10 '21 03:04 nabond251

@RedBrogdon I have to imagine this is a fairly common use case -- have you managed to get a "connected" text entry? If so, would you mind sharing your solution?

nabond251 avatar Apr 10 '21 03:04 nabond251