meta_types_generator 0.1.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 61

meta_types_generator

  • Add meta_types_generator and build_runner to your dev_dependencies
  • generate code by running pub run build_runner run

See meta_types/example for examples on how to write model definitions.

rules

  • Always use generated classes in code.
  • Always use definition classes when referencing other metatypes in your definitions.
  • Sealed classes should never extend, only implement others.
  • Interfaces cannot have computed accessors.
  • Additional functionality can be added to any meta type by generating additional mixins.

0.0.1

  • initial builder for union, enum, and data classes

example/example.dart

/// See meta_types example for code examples.
///
/// use `pub run build_runner build` to run the generator
///
/// make sure build_runner and meta_types_generator are
/// dev_dependencies in you pubspec.yaml

Use this package as a library

1. Depend on it

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


dependencies:
  meta_types_generator: ^0.1.0

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:meta_types_generator/builder.dart';
import 'package:meta_types_generator/generator_api.dart';
  
Version Uploaded Documentation Archive
0.1.0 Aug 7, 2018 Go to the documentation of meta_types_generator 0.1.0 Download meta_types_generator 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
38
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
61
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

Platforms

Detected platforms: other

Platform components identified in package: build, io, isolate, mirrors.

Maintenance issues and suggestions

Homepage does not exists. (-20 points)

We were unable to access https://github.com/davidmarne/dart_meta_types/meta_types_generator at the time of the analysis.

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2-0-0-dev <3.0.0
analyzer ^0.32.0 0.32.6 0.33.0
build ^0.12.0 0.12.8 1.0.1
meta_types ^0.1.0 0.1.0
source_gen ^0.9.0 0.9.1+3
Transitive dependencies
args 1.5.0
async 2.0.8
charcode 1.1.2
collection 1.14.11
convert 2.0.2
crypto 2.0.6
csslib 0.14.6
dart_style 1.1.3 1.2.0
front_end 0.1.4+2 0.1.6
glob 1.1.7
html 0.13.3+3
kernel 0.3.4+2 0.3.6
logging 0.11.3+2
meta 1.1.6
package_config 1.0.5
path 1.6.2
plugin 0.2.0+3
source_span 1.4.1
string_scanner 1.0.4
typed_data 1.1.6
utf 0.9.0+5
watcher 0.9.7+10
yaml 2.1.15
Dev dependencies
build_runner ^0.9.0
build_test ^0.10.2
test ^1.0.0