toMap method
转为可传给原生端的 Map。
无参数;不会写入 raw 中的额外字段。
Implementation
Map<String, dynamic> toMap() {
return <String, dynamic>{
'id': id,
if (name != null) 'name': name,
if (address != null) 'address': address,
if (type != null) 'type': type,
'isConnected': isConnected,
'isBonded': isBonded,
};
}