toJson method
Implementation
Map<String, dynamic> toJson() {
final data = <String, dynamic>{
'option': {
'language': language.contains('en') ? 'en' : language,
'localOpenSpeaker': localOpenSpeaker ? 1 : 0,
'autoOpenMic': localOpenMic ? 1 : 0, //设置入会是否开麦 本地配置
'autoOpenCam': localOpenCam ? 1 : 0, //设置入会是否开摄像头 本地配置
},
'custom': [],
'SingleTask': singleTask,
};
void putCustom(String key, bool value) {
// [value] 是否显示
data['custom'].add({
"name": key,
"hide": !value ? 1 : 0,
});
}
putCustom('topbar_meeting_info', topbarMeetingInfo);
putCustom('topbar_speaker_switch', topbarSpeakerSwitch);
putCustom('topbar_camera_switch', topbarCameraSwitch);
putCustom('topbar_exit_meeting', topbarExitMeeting);
putCustom('meeting_info_confurl', meetingInfoConfurl);
putCustom('meeting_info_copy', meetingInfoCopy);
putCustom('meeting_info_hostpswd', meetingInfoHostpswd);
putCustom('pstn', pstn);
putCustom('bottom_mic', bottomMic);
putCustom('bottom_camera', bottomCamera);
putCustom('bottom_share', bottomShare);
putCustom('bottom_member', bottomMember);
putCustom('bottom_more', bottomMore);
putCustom('share_screen', shareScreen);
putCustom('share_company_disk', shareCompanyDisk);
putCustom('share_person_disk', sharePersonDisk);
putCustom('share_white_board', shareWhiteBoard);
putCustom('share_opened_doc', shareOpenedDoc);
putCustom('share_album', shareAlbum);
putCustom('more_mini_video', moreMiniVideo);
// putCustom('more_invite', moreInvite);
putCustom('more_invite', false);
putCustom('more_start_server_record', moreStartServerRecord);
putCustom('more_stop_server_record', moreStopServerRecord);
putCustom('more_live', moreLive);
putCustom('more_vote', moreVote);
putCustom('more_rollcall', moreRollcall);
putCustom('more_im', moreIm);
// putCustom('more_vbg', moreVbg);
putCustom('more_vbg', false);
putCustom('more_floating', moreFloating);
putCustom('more_start_captions', moreStartCaptions);
putCustom('more_stop_captions', moreStopCaptions);
putCustom('more_setting', moreSetting);
return data;
}