17 lines
466 B
Dart
17 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;
|
||
|
}
|