toMap method Null safety
Implementation
Map<String, dynamic> toMap() {
HashMap<String, dynamic> dic = HashMap.of({
'uid': uid,
'roomId': roomId,
'x': x,
'y': y,
'w': w,
'h': h,
'zorder': zorder,
'alpha': alpha,
'contentControl': contentControl.value,
'renderMode': renderMode.value,
'localUser': localUser,
'isScreen': isScreen,
'type': type.value,
});
if (this.data != null) {
dic['data'] = data;
}
if (this.dataParam != null) {
dic['dataParam'] = dataParam?.toMap();
}
return dic;
}