angel_serialize_generator 2.0.10

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

angel_serialize_generator

The builder for Angel's model serialization.

Find documentation in the main project repo: https://github.com/angel-dart/serialize

2.0.10

  • Generate XFields.allFields constant.
  • No longer breaks in cases where dynamic is present.
  • Call toJson in toMap on nested models.
  • Never generate named parameters from private fields.
  • Use the new @generatedSerializable to always find generated models.

2.0.9+4

  • Remove defaults in build.yaml.

2.0.9+3

  • Fix a cast error when self-referencing nested list expressions.

2.0.9+2

  • Fix previously unseen cast errors with enums.

2.0.9+1

  • Fix a cast error when deserializing nested model classes.

2.0.9

  • Upgrade to source_gen@^0.8.0.

2.0.8+3

  • Don't fail on null in toMap.
  • Support self-referencing via toJson().

2.0.8+2

  • Better discern when custom methods disqualify classes from const protection.

2.0.8+1

  • Fix generation of const constructors with iterables.

2.0.8

  • Now supports de/serialization of enum types.
  • Generate const constructors when possible.
  • Remove whereType, perform manual coercion.
  • Generate a fromMap with typecasting, for Dart 2's sake.

2.0.7

  • Create unmodifiable Lists and Maps.
  • Support @required on fields.
  • Affix an @immutable annotation to classes, if package:meta is imported.
  • Add /// <reference path="..." /> to TypeScript models.

2.0.6

  • Support for using abstract to create immutable model classes.
  • Add support for custom constructor parameters.
  • Closed #21 - better naming of Map types.
  • Added overridden == operators.

2.0.5

  • Deserialization now supports un-serialized DateTime.
  • Better support for regular typed Lists and Maps in TypeScript.

2.0.4

  • Fields in TypeScript definitions are now nullable by default.

2.0.3

  • Added a TypeScriptDefinitionBuilder.

2.0.2

  • Generates an XFields class with the serialized names of all fields in a model class X.
  • Removed unnecessary named parameters from XSerializer.fromMap.

2.0.1

  • Ensured that List is only transformed if it generically references a Model.

example/main.dart

import 'package:angel_serialize/angel_serialize.dart';

@serializable
class _Todo {
  String text;
  bool completed;
}

Use this package as a library

1. Depend on it

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


dependencies:
  angel_serialize_generator: ^2.0.10

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:angel_serialize_generator/angel_serialize_generator.dart';
  
Version Uploaded Documentation Archive
2.0.10 Jul 11, 2018 Go to the documentation of angel_serialize_generator 2.0.10 Download angel_serialize_generator 2.0.10 archive
2.0.9+4 Jul 11, 2018 Go to the documentation of angel_serialize_generator 2.0.9+4 Download angel_serialize_generator 2.0.9+4 archive
2.0.9+3 Jun 29, 2018 Go to the documentation of angel_serialize_generator 2.0.9+3 Download angel_serialize_generator 2.0.9+3 archive
2.0.9+2 Jun 29, 2018 Go to the documentation of angel_serialize_generator 2.0.9+2 Download angel_serialize_generator 2.0.9+2 archive
2.0.9+1 Jun 29, 2018 Go to the documentation of angel_serialize_generator 2.0.9+1 Download angel_serialize_generator 2.0.9+1 archive
2.0.9 Jun 29, 2018 Go to the documentation of angel_serialize_generator 2.0.9 Download angel_serialize_generator 2.0.9 archive
2.0.8+3 Jun 28, 2018 Go to the documentation of angel_serialize_generator 2.0.8+3 Download angel_serialize_generator 2.0.8+3 archive
2.0.8+2 Jun 27, 2018 Go to the documentation of angel_serialize_generator 2.0.8+2 Download angel_serialize_generator 2.0.8+2 archive
2.0.8+1 Jun 27, 2018 Go to the documentation of angel_serialize_generator 2.0.8+1 Download angel_serialize_generator 2.0.8+1 archive
2.0.8 Jun 27, 2018 Go to the documentation of angel_serialize_generator 2.0.8 Download angel_serialize_generator 2.0.8 archive

All 24 versions...

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

We analyzed this package on Aug 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status tool failures using:

  • Dart: 2.0.0
  • pana: 0.11.8

Platforms

Detected platforms: unsure

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Issues and suggestions

Fix dependencies in pubspec.yaml.

Running pub upgrade failed with the following output:

ERR: The current Dart SDK version is 2.0.0.
 
 Because angel_serialize_generator depends on recase <2.0.0 which requires SDK version >=1.20.0 <2.0.0, version solving failed.

Fix platform conflicts.

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.55 <3.0.0