toMap method
转为可传给原生端的 Map。
无参数;Android 会读取全部字段,iOS/macOS 当前忽略。
Implementation
Map<String, dynamic> toMap() {
return <String, dynamic>{
'mode': mode.name,
'txPowerLevel': txPowerLevel.name,
'connectable': connectable,
'timeoutMs': timeout?.inMilliseconds,
};
}