omit type in tryGet
This commit is contained in:
parent
4026f480fb
commit
0d1e7bdf7b
|
|
@ -37,10 +37,10 @@ class RoomKeyRequestContent {
|
|||
|
||||
RoomKeyRequestContent.fromJson(Map<String, dynamic> json)
|
||||
: body = ((x) => x != null ? RequestedKeyInfo.fromJson(x) : null)(
|
||||
json.tryGet<Map<String, dynamic>>('body')),
|
||||
action = json.tryGet<String>('action') ?? '',
|
||||
requestingDeviceId = json.tryGet<String>('requesting_device_id') ?? '',
|
||||
requestId = json.tryGet<String>('request_id') ?? '';
|
||||
json.tryGet('body')),
|
||||
action = json.tryGet('action') ?? '',
|
||||
requestingDeviceId = json.tryGet('requesting_device_id') ?? '',
|
||||
requestId = json.tryGet('request_id') ?? '';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = <String, dynamic>{};
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class SecretStorageDefaultKeyContent {
|
|||
SecretStorageDefaultKeyContent({required this.key});
|
||||
|
||||
SecretStorageDefaultKeyContent.fromJson(Map<String, dynamic> json)
|
||||
: key = json.tryGet<String>('key');
|
||||
: key = json.tryGet('key');
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = <String, dynamic>{};
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class PassphraseInfo {
|
|||
: algorithm = json.tryGet('algorithm'),
|
||||
salt = json.tryGet('salt'),
|
||||
iterations = json.tryGet('iterations'),
|
||||
bits = json.tryGet<int>('bits');
|
||||
bits = json.tryGet('bits');
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = <String, dynamic>{};
|
||||
|
|
|
|||
Loading…
Reference in New Issue