toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  if (publicKey == null) {
    return {
      "type": type,
    };
  } else {
    return {"type": type, "publicKey": publicKey};
  }
}