model2fish 0.0.2

  • Readme
  • Changelog
  • Installing
  • 40

model2fish #

model2fish is a dart library for gen fish-redux-template from model;

three steps for gen:

  1. Preparing Json files
  2. Run flutter pub run model2fish:main
  3. Use it to coding

Installation #

Add these libraries into pubspec.yaml

    model2fish: 0.0.2

Usage #

cli #

>flutter pub run model2fish:main -h
-s, --source-dir    A source folder contains all string json files
                    (defaults to "example/")

-o, --output-dir    A output folder stores all generated files
                    (defaults to "generate/")

-h, --help          Instance:
                    > pub run fish-gens:main
                    read from example/fish_domain,
                    output to lib/generated,
                    & source file need start with f. to work
[WARNING]: xxxx.dart does not match naming pattern [f.{locale}.json]
[INFO]: xxxxx/fish_example/generate/todo_edit/action.dart is OK
[INFO]: xxxxx/fish_example/generate/todo_edit/reducer.dart is OK
[INFO]: xxxxx/fish_example/generate/todo_edit/effect.dart is OK
[INFO]: xxxxx/fish_example/generate/todo_edit/state.dart is OK
[INFO]: xxxxx/fish_example/generate/todo_edit/page.dart is OK
[INFO]: xxxxx/fish_example/generate/todo_edit/view.dart is OK

json #

/// example/f.todo.edit.json
    "DomainName" : "TodoEdit",
      {"nameEditController": "TextEditingController"},
      {"descEditController": "TextEditingController"},

welcome to PF ^_^

0.0.2 #

  • Initial version, created by Stagehand

Use this package as a library

1. Depend on it

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

  model2fish: ^0.0.2

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:model2fish/model2fish.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 Apr 8, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6

Health suggestions

Fix lib/manage/print_tool.dart. (-1.49 points)

Analysis of lib/manage/print_tool.dart reported 3 hints:

line 6 col 17: Unnecessary new keyword.

line 11 col 17: Unnecessary new keyword.

line 16 col 17: Unnecessary new keyword.

Fix bin/main.dart. (-0.50 points)

Analysis of bin/main.dart reported 1 hint:

line 33 col 16: Unnecessary new keyword.

Fix lib/manage/core_manage.dart. (-0.50 points)

Analysis of lib/manage/core_manage.dart reported 1 hint:

line 49 col 15: Unnecessary new keyword.

Fix additional 47 files with analysis or formatting issues. (-1 points)

Additional issues in the following files:

  • lib/manage/file_tool.dart (1 hint)
  • lib/util_package/str_replace_baseclass/util_str.dart (1 hint)
  • lib/code_replace/action/action.dart (Run dartfmt to format lib/code_replace/action/action.dart.)
  • lib/code_replace/action/action_creator.dart (Run dartfmt to format lib/code_replace/action/action_creator.dart.)
  • lib/code_replace/action/action_creator_item.dart (Run dartfmt to format lib/code_replace/action/action_creator_item.dart.)
  • lib/code_replace/action/index.dart (Run dartfmt to format lib/code_replace/action/index.dart.)
  • lib/code_replace/effect/effect.dart (Run dartfmt to format lib/code_replace/effect/effect.dart.)
  • lib/code_replace/effect/effect_method.dart (Run dartfmt to format lib/code_replace/effect/effect_method.dart.)
  • lib/code_replace/effect/effect_method_item.dart (Run dartfmt to format lib/code_replace/effect/effect_method_item.dart.)
  • lib/code_replace/effect/index.dart (Run dartfmt to format lib/code_replace/effect/index.dart.)
  • lib/code_replace/index.dart (Run dartfmt to format lib/code_replace/index.dart.)
  • lib/code_replace/page.dart (Run dartfmt to format lib/code_replace/page.dart.)
  • lib/code_replace/reducer/index.dart (Run dartfmt to format lib/code_replace/reducer/index.dart.)
  • lib/code_replace/reducer/reducer.dart (Run dartfmt to format lib/code_replace/reducer/reducer.dart.)
  • lib/code_replace/reducer/reducer_clone.dart (Run dartfmt to format lib/code_replace/reducer/reducer_clone.dart.)
  • lib/code_replace/reducer/reducer_clone_item.dart (Run dartfmt to format lib/code_replace/reducer/reducer_clone_item.dart.)
  • lib/code_replace/reducer/reducer_method.dart (Run dartfmt to format lib/code_replace/reducer/reducer_method.dart.)
  • lib/code_replace/reducer/reducer_method_item.dart (Run dartfmt to format lib/code_replace/reducer/reducer_method_item.dart.)
  • lib/code_replace/state/attr.dart (Run dartfmt to format lib/code_replace/state/attr.dart.)
  • lib/code_replace/state/index.dart (Run dartfmt to format lib/code_replace/state/index.dart.)
  • lib/code_replace/state/state.dart (Run dartfmt to format lib/code_replace/state/state.dart.)
  • lib/code_replace/state/state_init.dart (Run dartfmt to format lib/code_replace/state/state_init.dart.)
  • lib/code_replace/view.dart (Run dartfmt to format lib/code_replace/view.dart.)
  • lib/manage/fish_option.dart (Run dartfmt to format lib/manage/fish_option.dart.)
  • lib/util_package/fish_template/actions_str.dart (Run dartfmt to format lib/util_package/fish_template/actions_str.dart.)
  • lib/util_package/fish_template/effect_str.dart (Run dartfmt to format lib/util_package/fish_template/effect_str.dart.)
  • lib/util_package/fish_template/index.dart (Run dartfmt to format lib/util_package/fish_template/index.dart.)
  • lib/util_package/fish_template/page_str.dart (Run dartfmt to format lib/util_package/fish_template/page_str.dart.)
  • lib/util_package/fish_template/reducer_str.dart (Run dartfmt to format lib/util_package/fish_template/reducer_str.dart.)
  • lib/util_package/fish_template/state_str.dart (Run dartfmt to format lib/util_package/fish_template/state_str.dart.)
  • lib/util_package/fish_template/view_str.dart (Run dartfmt to format lib/util_package/fish_template/view_str.dart.)
  • lib/util_package/index.dart (Run dartfmt to format lib/util_package/index.dart.)
  • lib/util_package/model/action.dart (Run dartfmt to format lib/util_package/model/action.dart.)
  • lib/util_package/model/action.g.dart (Run dartfmt to format lib/util_package/model/action.g.dart.)
  • lib/util_package/model/actions.dart (Run dartfmt to format lib/util_package/model/actions.dart.)
  • lib/util_package/model/attr.dart (Run dartfmt to format lib/util_package/model/attr.dart.)
  • lib/util_package/model/attr.g.dart (Run dartfmt to format lib/util_package/model/attr.g.dart.)
  • lib/util_package/model/attrs.dart (Run dartfmt to format lib/util_package/model/attrs.dart.)
  • lib/util_package/model/attrs.g.dart (Run dartfmt to format lib/util_package/model/attrs.g.dart.)
  • lib/util_package/model/domain.dart (Run dartfmt to format lib/util_package/model/domain.dart.)
  • lib/util_package/model/domain.g.dart (Run dartfmt to format lib/util_package/model/domain.g.dart.)
  • lib/util_package/model/effects.dart (Run dartfmt to format lib/util_package/model/effects.dart.)
  • lib/util_package/model/index.dart (Run dartfmt to format lib/util_package/model/index.dart.)
  • lib/util_package/model/reducers.dart (Run dartfmt to format lib/util_package/model/reducers.dart.)
  • lib/util_package/str_replace_baseclass/domain_handle.dart (Run dartfmt to format lib/util_package/str_replace_baseclass/domain_handle.dart.)
  • lib/util_package/str_replace_baseclass/handle.dart (Run dartfmt to format lib/util_package/str_replace_baseclass/handle.dart.)
  • lib/util_package/str_replace_baseclass/index.dart (Run dartfmt to format lib/util_package/str_replace_baseclass/index.dart.)

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field was unreachable.

The package description is too short. (-16 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.

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.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and model2fish.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.2.0 <3.0.0
ansicolor ^1.0.2 1.0.2
args >=0.12.1 <2.0.0 1.6.0
path ^1.4.1 1.6.4
Dev dependencies
pedantic ^1.0.0
test ^1.0.0