toMap method
转为可传给原生端的 Map。
无参数;用于注册本地 GATT Server 服务。
Implementation
Map<String, dynamic> toMap() {
return <String, dynamic>{
'uuid': uuid,
'isPrimary': isPrimary,
'includedServices': includedServices,
'characteristics': characteristics
.map((characteristic) => characteristic.toMap())
.toList(),
};
}