redux_text_field 1.1.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • new63

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:


dependencies:
  redux_text_field: ^1.1.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages 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';
  
Version Uploaded Documentation Archive
1.1.0 Mar 3, 2019 Go to the documentation of redux_text_field 1.1.0 Download redux_text_field 1.1.0 archive
1.0.3 Mar 3, 2019 Go to the documentation of redux_text_field 1.0.3 Download redux_text_field 1.0.3 archive
1.0.2 Feb 27, 2019 Go to the documentation of redux_text_field 1.0.2 Download redux_text_field 1.0.2 archive
1.0.1 Feb 24, 2019 Go to the documentation of redux_text_field 1.0.1 Download redux_text_field 1.0.1 archive
1.0.0 Feb 24, 2019 Go to the documentation of redux_text_field 1.0.0 Download redux_text_field 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
30
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
63
Learn more about scoring.

We analyzed this package on Mar 6, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14
  • Flutter: 1.3.3

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

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 suggestions

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/README.md.

For more information see the pub package layout conventions.

Dependencies

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
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test