to_string_generator 1.2.1

  • Readme
  • Changelog
  • Installing
  • 67

to_string_generator #

Pub Package Build Status

Provider builder and generator for package to_string.

See here for more information.

1.2.1 #

  • Fix: Only field with it type annotated ToString() can be wrapped output in pretty print.

1.2.0+1 #

  • Supports pretty print with annotation ToString() or build.yaml

1.1.0 #

  • Private or static field and getter with ToString() will be shown in method toString()

  • Public field, private or static field and getter with ToString() in supper class and mixin class with ToString(), will be shown in their base class method toString

1.0.1 #

  • Fix bug setter is generated incorrectly.

1.0.0 #

  • Annotate ToString() to getter to let it show in toString()

0.1.0 #

  • Stable release

0.0.1 #

  • Add ToString annotation for generating toString()

Use this package as a library

1. Depend on it

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


dependencies:
  to_string_generator: ^1.2.1

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:to_string_generator/to_string_generator.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
46
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
73
Overall:
Weighted score of the above. [more]
67
Learn more about scoring.

We analyzed this package on Mar 31, 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/src/generator/code_generate.dart. (-1.49 points)

Analysis of lib/src/generator/code_generate.dart reported 3 hints:

line 1 col 8: Unused import: 'package:analyzer/dart/ast/ast.dart'.

line 3 col 8: Unused import: 'package:source_gen/source_gen.dart'.

line 7 col 8: Duplicate import.

Format lib/builder.dart.

Run dartfmt to format lib/builder.dart.

Format lib/src/generator/member_collect.dart.

Run dartfmt to format lib/src/generator/member_collect.dart.

Format lib/src/to_string_generator.dart.

Run dartfmt to format lib/src/to_string_generator.dart.

Maintenance suggestions

The package description is too short. (-17 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 to_string_generator.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.2.0 <3.0.0
analyzer ^0.39.0 0.39.4
build ^1.2.0 1.2.2
source_gen ^0.9.4+5 0.9.5
to_string ^1.2.1 1.2.1
Transitive dependencies
_fe_analyzer_shared 1.0.3
args 1.6.0
async 2.4.1
charcode 1.1.3
collection 1.14.12
convert 2.1.1
crypto 2.1.4
csslib 0.16.1
dart_style 1.3.3
glob 1.2.0
html 0.14.0+3
js 0.6.1+1
logging 0.11.4
meta 1.1.8
node_interop 1.0.3
node_io 1.0.1+2
package_config 1.9.3
path 1.6.4
pub_semver 1.4.4
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+14
yaml 2.2.0
Dev dependencies
build_runner ^1.7.1
pedantic ^1.8.0 1.9.0
source_gen_test ^0.1.0+5
test ^1.6.0