redux_text_field 1.0.3 copy "redux_text_field: ^1.0.3" to clipboard
redux_text_field: ^1.0.3 copied to clipboard

discontinued
outdated

Flutter's TextField but much easier to attach to a Redux store.

redux_text_field #

Build Status

redux_text_field is a library created to help people with creating forms and inputs that store their value in a Redux store.

Usage #

final reduxTextField = ReduxTextField(
  store: store,
  converter: (state) => state,
  action: _TestFieldUpdatedAction(),
);

ReduxTextField is a simple statefull widget that has a TextField under the hood. It gets all of the params of TextField except the controller, which this widget uses itself.

You pass your Redux Store to the store argument, a converter that is a function that takes state from your store as an argument and should return the value of your field and an action, that is a class implementing the TextFieldUpdatedAction abstract class. This action is being dispatched on all TextField value changes that are made.

If you make a change to your store changing the value of your field (that is changing the value returned by your converter), the value will be persisted to the TextField as well, making the ReduxTextField communication bidirectional.

For a full example, head to the tests.

0
likes
0
pub points
0%
popularity

Publisher

verified publisherwolszon.me

Flutter's TextField but much easier to attach to a Redux store.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, redux

More

Packages that depend on redux_text_field