redux_utils 0.0.3

Redux Utils #

Redux Utils helps to setup basic boiler plate to use redux.dart with flutter.

Note: Still experimenting. Suggestions and PR welcome.

Installing #

Specify the package in dev_dependencies like,

redux_utils: 0.0.3

Usage #

Note: Use this tool only with new flutter projects, it does not support existing projects. Please commit the initial project before using this tool.

  • First run flutter packages get after adding redux_utils to dev_dependencies
  • From root of the flutter project run flutter pub pub run redux_utils:main --setup
  • Then run flutter packages get
  • Next, run flutter pub pub run build_runner build

Redux setup is done, you can start using the package.

Packages Used #

dependencies:
    redux: '^3.0.0',
    redux_epics: '^0.10.0',
    flutter_redux: '^0.5.2',
    built_value: '^6.1.3',
    built_collection: '^4.0.0',
    shared_preferences: '0.4.2',
    rxdart: '^0.18.1',
    uri: '0.11.3+1',
    http: '^0.11.3+16',
    intl: '^0.15.7',

dev_dependencies:
    build_runner: '^1.0.0',
    built_value_generator: '^6.1.4',
    flutter_launcher_icons: '^0.6.1',

Folder Structure Used #

/actions
    - actions.dart
/api
    - api_client.dart
/data
    - app_repository.dart
    - preference_client.dart
/middleware
    - auth_middleware.dart
    - middleware.dart
/models
    - app_state.dart
    - models.dart
    - serializers.dart
/reducers
    - reducers.dart
/utils
    - assets.dart
    - icons.dart
    - utils.dart
/views
    /login
        - login_page.dart
    /home
        - home_page.dart
    - init_page.dart
- main.dart
- theme.dart

Author #

Hemanth Raj StackOverflow

1.0.0 #

  • Initial version, created by Stagehand

example/README.md

example #

Example - generated boilerplate

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

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


dependencies:
  redux_utils: ^0.0.3

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support 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_utils/redux_utils.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
2
Health:
Code health derived from static analysis. [more]
92
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
47
Learn more about scoring.

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

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: other

Primary library: package:redux_utils/redux_utils.dart with components: io, mirrors.

Health issues and suggestions

Document public APIs. (-1 points)

75 out of 75 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.

Fix lib/parser/parser.dart. (-5.36 points)

Analysis of lib/parser/parser.dart reported 11 hints, including:

line 198 col 7: DO use curly braces for all flow control structures.

line 200 col 7: DO use curly braces for all flow control structures.

line 202 col 7: DO use curly braces for all flow control structures.

line 204 col 7: DO use curly braces for all flow control structures.

line 210 col 7: DO use curly braces for all flow control structures.

Fix lib/utils.dart. (-1.49 points)

Analysis of lib/utils.dart reported 3 hints:

line 15 col 7: DO use curly braces for all flow control structures.

line 17 col 7: DO use curly braces for all flow control structures.

line 21 col 5: Future results in async function bodies must be awaited or marked unawaited using package:pedantic.

Fix lib/dart_redux/main.dart. (-0.50 points)

Analysis of lib/dart_redux/main.dart reported 1 hint:

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

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
args ^1.5.0 1.5.2
built_collection ^4.0.0 4.2.2
built_value ^6.1.3 6.7.0
code_builder ^3.1.3 3.2.0
dart_style ^1.1.3 1.2.9
path ^1.4.1 1.6.2
pubspec ^0.1.1 0.1.1
recase ^2.0.0+1 2.0.1
tuple ^1.0.2 1.0.2
Transitive dependencies
analyzer 0.37.0
async 2.3.0
charcode 1.1.2
collection 1.14.11
convert 2.1.1
crypto 2.0.6
csslib 0.16.1
fixnum 0.10.9
front_end 0.1.20
glob 1.1.7
html 0.14.0+2
kernel 0.3.20
matcher 0.12.5
meta 1.1.7
package_config 1.0.5
pedantic 1.8.0+1
pub_semver 1.4.2
quiver 2.0.3
source_span 1.5.5
stack_trace 1.9.3
string_scanner 1.0.4
stuff 0.1.0
term_glyph 1.1.0
typed_data 1.1.6
uri 0.11.3+1
utf 0.9.0+5
watcher 0.9.7+12
yaml 2.1.16
yamlicious 0.1.0
Dev dependencies
test ^1.0.0

Admin