copy method
Creates a copy of obj
.
- The default implementation uses JSON to copy the internal data.
Implementation
FutureOr<O?> copy(O obj) {
var json = toJson(obj);
if (json is Map<String, dynamic>) {
return createFromMap(json);
}
return null;
}