reflective 0.0.29

  • Installing
  • Versions
  • 13

Dart Reflective

Build Status

Reflective is fluent reflection API for Dart.


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

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

Use this package as a library

1. Depend on it

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

  reflective: ^0.0.29

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.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
0.0.21 Dec 2, 2015 Go to the documentation of reflective 0.0.21 Download reflective 0.0.21 archive
0.0.20 Dec 2, 2015 Go to the documentation of reflective 0.0.20 Download reflective 0.0.20 archive

All 29 versions...

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 Oct 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.4


Detected platforms: web, other

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

Health issues and suggestions

Fix lib/src/convert.dart. (-43.75 points)

Analysis of lib/src/convert.dart failed with 2 errors:

line 102 col 21: Undefined name 'JSON'.

line 176 col 19: Undefined name 'JSON'.

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

Analysis of lib/src/core/field_reflection.dart failed with 1 error, 1 hint:

line 48 col 70: The getter '_symbol' isn't defined for the class 'FieldReflection'.

line 47 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 166 col 17: Always override hashCode if overriding ==.

Fix additional 6 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/reflective.dart (Run dartfmt to format lib/reflective.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/instance_reflection.dart (Run dartfmt to format lib/src/core/instance_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

Package is too old. (-100 points)

The package was released more than two years ago.

Maintain (-20 points)

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

Add SDK constraint in pubspec.yaml. (-5 points)

For information about setting SDK constraint, please see

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.

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

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


Package Constraint Resolved Available
Direct dependencies
yaml >=2.1.0 <3.0.0 2.1.15
Transitive dependencies
charcode 1.1.2
meta 1.1.6
path 1.6.2
source_span 1.4.1
string_scanner 1.0.4
Dev dependencies
collection any 1.14.11
test any