redux_persist_encoder 0.7.0-rc.5

  • Readme
  • Changelog
  • Installing
  • 54

redux_persist_encoder pub package

This is fork of redux_persist that adds support for an encoder, because the original package lacks it. I don't plan on further support for it.

Usage: #

// Create Persistor
final persistor = Persistor<AppState>(
  storage: FlutterStorage("my-app"), // Or use other engines
  decoder: /* *something* */,
  encoder: (data) {
    return serializers.serializeWith(AppState.serializer, data)

0.7.0-rc.2 - 2018-04-09

  • Fix middleware typing.

0.7.0-rc.1 - 2018-03-31

  • Breaking: Dart 2.
  • Breaking: Upgraded redux to v3.0.0.
  • Breaking: Changed loading flow:
    • persistor.start has been deprecated (will be removed in next major version). Use persistor.load
    • Loading dispatched PersistLoadAction, then PersistLoadedAction once completed.
  • Breaking: Changed action names:
    • LoadAction: PersistLoadingAction
    • LoadedAction: PersistLoadedAction
    • PersistorErrorAction: PersistErrorAction
  • Added saving actions (PersistSavingAction and PersistSavedAction)
  • Added MemoryStorage.
  • Added loadFromStorage and saveToStorage for more manual control.
  • Refactor, new tests.

0.6.0 - 2018-03-18

  • Breaking: Change saved state format. This will break your saved state, will only happen once.
  • Added migrations and version key.
  • Fix JSON deprecation warning.
  • Added tests.
  • Added exceptions.
  • Added FileStorage.

0.5.2 - 2018-03-14

  • Fix library export.

0.5.1 - 2018-03-13

  • Made persistor.start return a Future.
  • Add type to persistor.loadStream.

0.5.0 - 2018-03-12

  • Breaking: Change persistor.load(store) to persistor.start(store) for initial loading.
  • Breaking: Change LoadAction<T> to LoadedAction<T>.
  • Add LoadAction (action dispatch to start loading).
  • Add PersistorErrorAction (action dispatched on save/load error).
  • Add debug persistor option, doesn't do anything yet.

0.4.0 - 2018-03-10

  • Breaking: Decouple Flutter and Web into different packages.

0.3.0 - 2018-03-10

  • Add state and raw transformers.
  • Added better error handling (persistor.errorStream)

0.2.0 - 2018-03-10

  • Move Flutter-specific code to separate, unexported file. It is likely this will become it's own package.
  • Add SaveLocation for Flutter storage engine.
  • Add SharedPreference sub-engine for Flutter storage engine (make default).
  • Fix PersistorGatepassing variables to state and initialization.
  • Add more docs.

0.1.0 - 2018-03-09

  • Create generic StorageEngine.
  • Create FlutterStorage.

0.0.3 - 2018-03-09

  • Added documentation.

0.0.2 - 2018-03-09

  • Added PersistorGate.

0.0.1 - 2018-03-09

  • Initial release.

Use this package as a library

1. Depend on it

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

  redux_persist_encoder: ^0.7.0-rc.5

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or 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_persist_encoder/redux_persist_encoder.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

Health suggestions

Fix lib/redux_persist_encoder.dart. (-6.78 points)

Analysis of lib/redux_persist_encoder.dart reported 14 hints, including:

line 61 col 7: Unnecessary new keyword.

line 64 col 7: Unnecessary new keyword.

line 124 col 7: Use rethrow to rethrow a caught exception.

line 135 col 13: Unnecessary new keyword.

line 147 col 15: Unnecessary new keyword.

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).

Package is getting outdated. (-27.95 points)

The package was last published 66 weeks ago.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

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_persist_encoder.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.

Package is pre-release. (-5 points)

Pre-release versions should be used with caution; their API can change in breaking ways.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev <3.0.0
redux ^3.0.0 3.0.0 4.0.0
Dev dependencies
test ^0.12.33