Migrated angel_serialize
This commit is contained in:
parent
31e52b6ad3
commit
1d3d10fb4f
8 changed files with 33 additions and 18 deletions
2
packages/serialize/angel_serialize/AUTHORS.md
Normal file
2
packages/serialize/angel_serialize/AUTHORS.md
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
Tobe O <thosakwe@gmail.com>
|
||||||
|
Thomas Hii <thomashii@dukefirehawk.com>
|
|
@ -1,3 +1,10 @@
|
||||||
|
# 4.0.0
|
||||||
|
* Migrated to support Dart SDK 2.12.x NNBD
|
||||||
|
* Migrateed quiver_hashcode to quiver
|
||||||
|
|
||||||
|
# 3.0.0
|
||||||
|
* Migrated to work with Dart SDK 2.12.x Non NNBD
|
||||||
|
|
||||||
# 2.2.3+3
|
# 2.2.3+3
|
||||||
* Add `exclude: true` to `super` call in `Exclude` constructor.
|
* Add `exclude: true` to `super` call in `Exclude` constructor.
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,6 @@ import 'package:angel_serialize/angel_serialize.dart';
|
||||||
|
|
||||||
@serializable
|
@serializable
|
||||||
class _Todo {
|
class _Todo {
|
||||||
String text;
|
String? text;
|
||||||
bool completed;
|
bool? completed;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ export 'dart:convert' show json, Codec, Converter;
|
||||||
export 'package:angel_model/angel_model.dart';
|
export 'package:angel_model/angel_model.dart';
|
||||||
export 'package:collection/collection.dart';
|
export 'package:collection/collection.dart';
|
||||||
export 'package:meta/meta.dart' show required, Required;
|
export 'package:meta/meta.dart' show required, Required;
|
||||||
export 'package:quiver_hashcode/hashcode.dart' show hashObjects;
|
export 'package:quiver/core.dart' show hashObjects;
|
||||||
|
|
||||||
/// Excludes a field from being excluded.
|
/// Excludes a field from being excluded.
|
||||||
class Exclude extends SerializableField {
|
class Exclude extends SerializableField {
|
||||||
|
@ -35,19 +35,19 @@ class HasAlias extends SerializableField {
|
||||||
/// Attaches options to a field.
|
/// Attaches options to a field.
|
||||||
class SerializableField {
|
class SerializableField {
|
||||||
/// An alternative name for this field.
|
/// An alternative name for this field.
|
||||||
final String alias;
|
final String? alias;
|
||||||
|
|
||||||
/// A default for this field.
|
/// A default for this field.
|
||||||
final defaultValue;
|
final defaultValue;
|
||||||
|
|
||||||
/// A custom serializer for this field.
|
/// A custom serializer for this field.
|
||||||
final Symbol serializer;
|
final Symbol? serializer;
|
||||||
|
|
||||||
/// A custom serializer for this field.
|
/// A custom serializer for this field.
|
||||||
final Symbol deserializer;
|
final Symbol? deserializer;
|
||||||
|
|
||||||
/// An error message to be printed when the provided value is invalid.
|
/// An error message to be printed when the provided value is invalid.
|
||||||
final String errorMessage;
|
final String? errorMessage;
|
||||||
|
|
||||||
/// Whether this field can be set to `null`.
|
/// Whether this field can be set to `null`.
|
||||||
final bool isNullable;
|
final bool isNullable;
|
||||||
|
@ -67,7 +67,7 @@ class SerializableField {
|
||||||
///
|
///
|
||||||
/// Ex. If you have a field that serializes to a JSON string,
|
/// Ex. If you have a field that serializes to a JSON string,
|
||||||
/// specify `serializesTo: String`.
|
/// specify `serializesTo: String`.
|
||||||
final Type serializesTo;
|
final Type? serializesTo;
|
||||||
|
|
||||||
const SerializableField(
|
const SerializableField(
|
||||||
{this.alias,
|
{this.alias,
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
name: angel_serialize
|
name: angel_serialize
|
||||||
version: 3.0.0
|
version: 4.0.0
|
||||||
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>
|
homepage: https://github.com/dukefirehawk/angel
|
||||||
homepage: https://github.com/angel-dart/serialize
|
|
||||||
publish_to: none
|
publish_to: none
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.10.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
dependencies:
|
dependencies:
|
||||||
angel_model: #^1.0.0
|
angel_model:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/dukefirehawk/angel.git
|
url: https://github.com/dukefirehawk/angel.git
|
||||||
ref: sdk-2.12.x
|
ref: sdk-2.12.x_nnbd
|
||||||
path: packages/model
|
path: packages/model
|
||||||
collection: ^1.15.0
|
collection: ^1.15.0
|
||||||
meta: ^1.3.0
|
meta: ^1.3.0
|
||||||
pedantic: ^1.11.0
|
pedantic: ^1.11.0
|
||||||
quiver_hashcode: ^2.0.0
|
quiver: ^3.0.1
|
||||||
|
|
2
packages/serialize/angel_serialize_generator/AUTHORS.md
Normal file
2
packages/serialize/angel_serialize_generator/AUTHORS.md
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
Tobe O <thosakwe@gmail.com>
|
||||||
|
Thomas Hii <thomashii@dukefirehawk.com>
|
|
@ -1,3 +1,9 @@
|
||||||
|
# 4.0.0
|
||||||
|
* Migrated to support Dart SDK 2.12.x NNBD
|
||||||
|
|
||||||
|
# 3.0.0
|
||||||
|
* Migrated to work with Dart SDK 2.12.x Non NNBD
|
||||||
|
|
||||||
# 2.5.0
|
# 2.5.0
|
||||||
* Support mutable models (again).
|
* Support mutable models (again).
|
||||||
* Use `whereType()` instead of chaining `where()` and `cast()`.
|
* Use `whereType()` instead of chaining `where()` and `cast()`.
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
name: angel_serialize_generator
|
name: angel_serialize_generator
|
||||||
version: 3.0.0
|
version: 4.0.0
|
||||||
description: Model serialization generators, designed for use with Angel. Combine with angel_serialize for flexible modeling.
|
description: Model serialization generators, designed for use with Angel. Combine with angel_serialize for flexible modeling.
|
||||||
author: Tobe O <thosakwe@gmail.com>
|
homepage: https://github.com/dukefirehawk/angel
|
||||||
homepage: https://github.com/angel-dart/serialize
|
|
||||||
publish_to: none
|
publish_to: none
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.7.0 <3.0.0'
|
sdk: '>=2.7.0 <3.0.0'
|
||||||
|
|
Loading…
Reference in a new issue