redux_text_field 1.1.0

  • Readme
  • Changelog
  • Installing
  • 68

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.

1.1.0 #

  • Add onControllerChange parameter which is called once the controller listener is called and the text field value has changed.

1.0.3 #

  • Fix critical bug with a dead loop while defocusing input.

1.0.2 #

  • Dispatch action only when text has changed.

1.0.1 #

  • Fixed maintenance issues in repository.

1.0.0 #

  • Initial version

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  redux_text_field: ^1.1.0

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:redux_text_field/redux_text_field.dart';
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]
Learn more about scoring.

We analyzed this package on Jan 27, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health issues and suggestions

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.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (redux).

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and redux_text_field.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
redux ^3.0.0 3.0.0 4.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies