platform/angel_serialize_generator/test/models/has_map.dart
2019-01-06 20:38:04 -05:00

16 lines
466 B
Dart

import 'dart:convert';
import 'package:angel_serialize/angel_serialize.dart';
import 'package:collection/collection.dart';
import 'package:meta/meta.dart';
part 'has_map.g.dart';
Map _fromString(v) => json.decode(v.toString()) as Map;
String _toString(Map v) => json.encode(v);
@Serializable(autoIdAndDateFields: false)
abstract class _HasMap {
@SerializableField(
serializer: #_toString, deserializer: #_fromString, isNullable: false)
Map get value;
}