reflective 0.1.1

  • readme.md
  • Installing
  • Versions
  • 37

Dart Reflective

Build Status

Reflective is fluent reflection API for Dart.

Examples:

TypeReflection typeOfEmployeeName = type(Employee).field('name').type;

Employee employee = type(Employee).construct(
    name: 'John Doe', 
    email: 'john@doe.org');

Use this package as a library

1. Depend on it

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


dependencies:
  reflective: ^0.1.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:reflective/reflective.dart';
  
Version Uploaded Documentation Archive
0.1.1 Dec 5, 2018 Go to the documentation of reflective 0.1.1 Download reflective 0.1.1 archive
0.1.0 Dec 5, 2018 Go to the documentation of reflective 0.1.0 Download reflective 0.1.0 archive
0.0.29 Jul 25, 2016 Go to the documentation of reflective 0.0.29 Download reflective 0.0.29 archive
0.0.28 May 30, 2016 Go to the documentation of reflective 0.0.28 Download reflective 0.0.28 archive
0.0.27 May 30, 2016 Go to the documentation of reflective 0.0.27 Download reflective 0.0.27 archive
0.0.26 Mar 27, 2016 Go to the documentation of reflective 0.0.26 Download reflective 0.0.26 archive
0.0.25 Mar 26, 2016 Go to the documentation of reflective 0.0.25 Download reflective 0.0.25 archive
0.0.24 Dec 14, 2015 Go to the documentation of reflective 0.0.24 Download reflective 0.0.24 archive
0.0.23 Dec 2, 2015 Go to the documentation of reflective 0.0.23 Download reflective 0.0.23 archive
0.0.22 Dec 2, 2015 Go to the documentation of reflective 0.0.22 Download reflective 0.0.22 archive

All 31 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
89
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
50
Overall:
Weighted score of the above. [more]
37
Learn more about scoring.

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

  • Dart: 2.1.0
  • pana: 0.12.7

Platforms

Detected platforms: web, other

Primary library: package:reflective/reflective.dart with components: mirrors.

Health issues and suggestions

Document public APIs (-9.94 points)

154 out of 155 API elements (library, class, field or method) have no adequate dartdoc content. Good documentation improves code readability and discoverability through search.

Fix lib/src/core/field_reflection.dart. (-0.50 points)

Analysis of lib/src/core/field_reflection.dart reported 1 hint:

line 48 col 17: Always override hashCode if overriding ==.

Fix lib/src/core/type_reflection.dart. (-0.50 points)

Analysis of lib/src/core/type_reflection.dart reported 1 hint:

line 188 col 17: Always override hashCode if overriding ==.

Format lib/reflective.dart.

Run dartfmt to format lib/reflective.dart.

Fix additional 5 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/convert.dart (Run dartfmt to format lib/src/convert.dart.)
  • lib/src/core.dart (Run dartfmt to format lib/src/core.dart.)
  • lib/src/core/abstract_reflection.dart (Run dartfmt to format lib/src/core/abstract_reflection.dart.)
  • lib/src/core/library_reflection.dart (Run dartfmt to format lib/src/core/library_reflection.dart.)
  • lib/src/util.dart (Run dartfmt to format lib/src/util.dart.)

Maintenance issues and suggestions

Maintain CHANGELOG.md. (-20 points)

Changelog entries help clients to follow the progress in your code.

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use reflective.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK <=3.0.0
Dev dependencies
collection any
test any