Correct versions
This commit is contained in:
parent
b33312edc2
commit
be6a3669cc
4 changed files with 21 additions and 17 deletions
|
@ -1,6 +1,9 @@
|
||||||
# 2.2.3+2
|
# 2.2.3+3
|
||||||
* Add `exclude: true` to `super` call in `Exclude` constructor.
|
* Add `exclude: true` to `super` call in `Exclude` constructor.
|
||||||
|
|
||||||
|
# 2.2.3+2
|
||||||
|
* Apply `package:pedantic`.
|
||||||
|
|
||||||
# 2.2.3+1
|
# 2.2.3+1
|
||||||
* Export `json`, `Codec`, and `Converter` from `dart:convert`.
|
* Export `json`, `Codec`, and `Converter` from `dart:convert`.
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
include: package:pedantic/analysis_options.yaml
|
||||||
analyzer:
|
analyzer:
|
||||||
strong-mode:
|
strong-mode:
|
||||||
implicit-casts: false
|
implicit-casts: false
|
|
@ -6,7 +6,7 @@ export 'package:quiver_hashcode/hashcode.dart' show hashObjects;
|
||||||
|
|
||||||
/// Excludes a field from being excluded.
|
/// Excludes a field from being excluded.
|
||||||
class Exclude extends SerializableField {
|
class Exclude extends SerializableField {
|
||||||
const Exclude({bool canDeserialize: false, bool canSerialize: false})
|
const Exclude({bool canDeserialize = false, bool canSerialize = false})
|
||||||
: super(
|
: super(
|
||||||
exclude: true,
|
exclude: true,
|
||||||
canDeserialize: canDeserialize,
|
canDeserialize: canDeserialize,
|
||||||
|
@ -15,12 +15,12 @@ class Exclude extends SerializableField {
|
||||||
|
|
||||||
/// No longer necessary, as this is the default.
|
/// No longer necessary, as this is the default.
|
||||||
@deprecated
|
@deprecated
|
||||||
const SerializableField nullable = const SerializableField(isNullable: true);
|
const SerializableField nullable = SerializableField(isNullable: true);
|
||||||
|
|
||||||
/// Marks a field as not accepting `null` values.
|
/// Marks a field as not accepting `null` values.
|
||||||
const SerializableField notNull = const SerializableField(isNullable: false);
|
const SerializableField notNull = SerializableField(isNullable: false);
|
||||||
|
|
||||||
const Exclude exclude = const Exclude();
|
const Exclude exclude = Exclude();
|
||||||
|
|
||||||
/// Shorthand for [SerializableField].
|
/// Shorthand for [SerializableField].
|
||||||
class DefaultsTo extends SerializableField {
|
class DefaultsTo extends SerializableField {
|
||||||
|
@ -75,21 +75,21 @@ class SerializableField {
|
||||||
this.serializer,
|
this.serializer,
|
||||||
this.deserializer,
|
this.deserializer,
|
||||||
this.errorMessage,
|
this.errorMessage,
|
||||||
this.isNullable: true,
|
this.isNullable = true,
|
||||||
this.exclude: false,
|
this.exclude = false,
|
||||||
this.canDeserialize: false,
|
this.canDeserialize = false,
|
||||||
this.canSerialize: false,
|
this.canSerialize = false,
|
||||||
this.serializesTo});
|
this.serializesTo});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Marks a class as eligible for serialization.
|
/// Marks a class as eligible for serialization.
|
||||||
class Serializable {
|
class Serializable {
|
||||||
const Serializable(
|
const Serializable(
|
||||||
{this.serializers: const [Serializers.map, Serializers.json],
|
{this.serializers = const [Serializers.map, Serializers.json],
|
||||||
this.autoSnakeCaseNames: true,
|
this.autoSnakeCaseNames = true,
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
@deprecated this.autoIdAndDateFields = true,
|
@deprecated this.autoIdAndDateFields = true,
|
||||||
this.includeAnnotations: const []});
|
this.includeAnnotations = const []});
|
||||||
|
|
||||||
/// A list of enabled serialization modes.
|
/// A list of enabled serialization modes.
|
||||||
///
|
///
|
||||||
|
@ -107,20 +107,19 @@ class Serializable {
|
||||||
final List includeAnnotations;
|
final List includeAnnotations;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Serializable serializable = const Serializable();
|
const Serializable serializable = Serializable();
|
||||||
|
|
||||||
/// Used by `package:angel_serialize_generator` to reliably identify generated models.
|
/// Used by `package:angel_serialize_generator` to reliably identify generated models.
|
||||||
class GeneratedSerializable {
|
class GeneratedSerializable {
|
||||||
const GeneratedSerializable();
|
const GeneratedSerializable();
|
||||||
}
|
}
|
||||||
|
|
||||||
const GeneratedSerializable generatedSerializable =
|
const GeneratedSerializable generatedSerializable = GeneratedSerializable();
|
||||||
const GeneratedSerializable();
|
|
||||||
|
|
||||||
/// The supported serialization types.
|
/// The supported serialization types.
|
||||||
abstract class Serializers {
|
abstract class Serializers {
|
||||||
/// All supported serialization types.
|
/// All supported serialization types.
|
||||||
static const List<int> all = const [map, json, typescript];
|
static const List<int> all = [map, json, typescript];
|
||||||
|
|
||||||
/// Enable `fromMap` and `toMap` methods on the model class.
|
/// Enable `fromMap` and `toMap` methods on the model class.
|
||||||
static const int map = 0;
|
static const int map = 0;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: angel_serialize
|
name: angel_serialize
|
||||||
version: 2.2.3+2
|
version: 2.2.3+3
|
||||||
description: Static annotations powering Angel model serialization. Combine with angel_serialize_generator for flexible modeling.
|
description: Static annotations powering Angel model serialization. Combine with angel_serialize_generator for flexible modeling.
|
||||||
author: Tobe O <thosakwe@gmail.com>
|
author: Tobe O <thosakwe@gmail.com>
|
||||||
homepage: https://github.com/angel-dart/serialize
|
homepage: https://github.com/angel-dart/serialize
|
||||||
|
@ -9,4 +9,5 @@ dependencies:
|
||||||
angel_model: ^1.0.0
|
angel_model: ^1.0.0
|
||||||
collection: ^1.0.0
|
collection: ^1.0.0
|
||||||
meta: ^1.0.0
|
meta: ^1.0.0
|
||||||
|
pedantic: ^1.0.0
|
||||||
quiver_hashcode: ^2.0.0
|
quiver_hashcode: ^2.0.0
|
||||||
|
|
Loading…
Reference in a new issue