checkSettingEnable method
void
checkSettingEnable()
Implementation
void checkSettingEnable() async {
if (GetStorage().hasData("setting")) {
var map = await GetStorage().read("setting");
var map1 = jsonDecode(map) as List;
for (int i = 0; i < map1.length; i++) {
var conferenceModelList = <SettingModel>[];
var subList = map1[i]['settingList'] as List;
for (int j = 0; j < subList.length; j++) {
conferenceModelList
.add(SettingModel(subList[j]['name'], subList[j]['isStatus']));
}
settingList.add(SettingModelList(map1[i]['name'], conferenceModelList));
}
for (int i = 0; i < settingList.length; i++) {
for (int j = 0; j < settingList[i].settingList.length; j++) {
if (settingList[i].settingList[j].name ==
'Ask To Confirm When Leaving Meeting' &&
settingList[i].settingList[j].isStatus == true) {
isConfirmWhenLeavingMeeting = true;
} else if (settingList[i].settingList[j].name ==
'Show My Connected Time' &&
settingList[i].settingList[j].isStatus == true) {
isShowConnectedTime = true;
} else if (settingList[i].settingList[j].name == 'New Chat Message' &&
settingList[i].settingList[j].isStatus == true) {
isNewChatMessage = true;
} else if (settingList[i].settingList[j].name == 'Beep on Entry' &&
settingList[i].settingList[j].isStatus == true) {
isBeeponEntry = true;
} else if (settingList[i].settingList[j].name == 'Beep on Exit' &&
settingList[i].settingList[j].isStatus == true) {
isBeeponExit = true;
Fluttertoast.showToast(
msg: "Beep on Exit",
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.CENTER,
backgroundColor: Colors.red,
textColor: Colors.white,
fontSize: 16.0);
} else if (settingList[i].settingList[j].name == 'Start Recording' &&
settingList[i].settingList[j].isStatus == true) {
isStartRecording = true;
} else if (settingList[i].settingList[j].name == 'Stop Recording' &&
settingList[i].settingList[j].isStatus == true) {
isStopRecording = true;
} else if (settingList[i].settingList[j].name == 'End of Meeting' &&
settingList[i].settingList[j].isStatus == true) {
isEndofMeeting = true;
}
print("AudioRoom ${settingList[i].settingList[j].name}");
}
}
}
}