redux_text_field is a library created to help people with creating forms and inputs that store their value in a Redux store.
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.
onControllerChangeparameter which is called once the controller listener is called and the text field value has changed.
actiononly when text has changed.
Add this to your package's pubspec.yaml file:
dependencies: redux_text_field: ^1.1.0
You can install packages from the command line:
$ flutter pub get
Alternatively, your editor might support
flutter pub get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Aug 22, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
Document public APIs. (-0.23 points)
37 out of 38 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.
Maintain an example. (-10 points)
Create a short demo in the
example/ directory to show how to use this package.
Common filename patterns include
redux_text_field.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.