clone<T extends JSONAble> static method

T clone<T extends JSONAble>(
  1. JSONAble object
)

Returns a clone of the object preserving the type

Implementation

static T clone<T extends JSONAble>(JSONAble object) =>
    object.fromJson(object.toJson());