# cloneDocument method

Future<ResultWrapper<DocumentData>> cloneDocument(

1. String documentID

)

Clone a document by its ID.

## Implementation

    Future<ResultWrapper<DocumentData>> cloneDocument(String documentID) async {
      try {
        var operationParamsMap = <String, dynamic>{"documentID": documentID};

        var result = await SharedCalls.invoke(
            ScanbotSdk.channel, 'cloneDocument', operationParamsMap);

        return ResultWrapper.fromJson(jsonDecode(result),
            fromJsonT: DocumentData.fromJson);
      } catch (e) {
        Logger.root.severe(e);
        return ResultWrapper.error(e.toString());
      }
    }