onButtonPressed method
void
onButtonPressed()
Implementation
void onButtonPressed() async {
if (roomNameController.text.isEmpty) {
makeToast(msg: 'conferenceNameEmptyToast'.roomTr);
return;
}
if (_isStringOver100Bytes(roomNameController.text)) {
makeToast(msg: 'conferenceNameTooLong'.roomTr);
return;
}
if (_isOperating) {
return;
}
_isOperating = true;
int conferenceStartTime = _getUTCTimeStamp(_startTime);
int conferenceEndTime =
conferenceStartTime + _roomDurationHrs * 3600 + _roomDurationMins * 60;
if (!_isModify) {
await _scheduleRoom(conferenceStartTime, conferenceEndTime);
} else {
await _updateConferenceInfo(conferenceStartTime, conferenceEndTime);
}
_isOperating = false;
}