encode method
Convert obj
of type T
to a map of String to
json encodable objects. Can only be called once for
each object in data heap.
Implementation
@override
Map<String, dynamic> encode(Color? obj) {
if (obj == null) return {};
return {'value': obj.value};
}