Skip to content

Commit d181498

Browse files
Construct FCXCallUpdate correctly without remoteHandle passed from the native code
1 parent e04bf94 commit d181498

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/src/call_update.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,16 @@ class FCXCallUpdate {
8383
};
8484

8585
FCXCallUpdate._fromMap(Map<dynamic, dynamic> map)
86-
: this.remoteHandle = FCXHandle._fromMap(map['remoteHandle']),
86+
: this.remoteHandle = _FCXNullableHandle._fromMap(map['remoteHandle']),
8787
this.localizedCallerName = map['localizedCallerName'],
8888
this.supportsHolding = map['supportsHolding'],
8989
this.supportsGrouping = map['supportsGrouping'],
9090
this.supportsUngrouping = map['supportsUngrouping'],
9191
this.supportsDTMF = map['supportsDTMF'],
9292
this.hasVideo = map['hasVideo'];
9393
}
94+
95+
extension _FCXNullableHandle on FCXHandle {
96+
static FCXHandle? _fromMap(Map<dynamic, dynamic>? map) =>
97+
map == null ? null : FCXHandle._fromMap(map);
98+
}

0 commit comments

Comments
 (0)