copy method

  1. @override
FutureOr<O?> copy(
  1. O obj
)
override

Creates a copy of obj.

  • The default implementation uses JSON to copy the internal data.

Implementation

@override
FutureOr<O?> copy(O obj) {
  var reflection = this.reflection;
  var json = reflection.toJson(obj);
  return reflection.fromJson(json);
}