Can anyone tell about how can i send PreKeyBundle to server.
I have implemented with some approach but theres a problem in converting Uint8List PreKey to ECPublicKey Class Object on getting PreKeyBundleModel back from the server.
I have created this PreKeyBundleModel which is coming from server after deserializing but i have to convert this PreKeyBundleModel to PreKeyBundle. Problem occurs when i want to convert Uinit8List PreKey to ECPublicKey as PreKeyBundle requires ECPublicKey Object as parameters. Is there any method to convert Uini8List to ECPublicKey.
Can anyone tell about how can i send PreKeyBundle to server. I have implemented with some approach but theres a problem in converting Uint8List PreKey to ECPublicKey Class Object on getting PreKeyBundleModel back from the server.
I have created this PreKeyBundleModel which is coming from server after deserializing but i have to convert this PreKeyBundleModel to PreKeyBundle. Problem occurs when i want to convert Uinit8List PreKey to ECPublicKey as PreKeyBundle requires ECPublicKey Object as parameters. Is there any method to convert Uini8List to ECPublicKey.
` @JsonSerializable() class PreKeyBundleModel { int? registrationId; int? deviceId; List? preKeys;
SignedPreKeyModel? signedPreKey;
String? identityKey;
PreKeyBundleModel({this.registrationId, this.deviceId, this.preKeys, this.signedPreKey, this.identityKey});
factory PreKeyBundleModel.fromJson(Map<String, dynamic> json) => _$PreKeyBundleModelFromJson(json);
Map<String, dynamic> toJson() => _$PreKeyBundleModelToJson(this); }
@JsonSerializable() class PreKeyModel { int? id; String? key;
PreKeyModel({this.id, this.key});
factory PreKeyModel.fromJson(Map<String, dynamic> json) => _$PreKeyModelFromJson(json);
Map<String, dynamic> toJson() => _$PreKeyModelToJson(this); }
@JsonSerializable() class SignedPreKeyModel { int? id; String? key; String? signature;
SignedPreKeyModel({this.id, this.key, this.signature});
factory SignedPreKeyModel.fromJson(Map<String, dynamic> json) => _$SignedPreKeyModelFromJson(json);
Map<String, dynamic> toJson() => _$SignedPreKeyModelToJson(this); } `