getTitle function
Build title
Implementation
String getTitle(DialogType dialogType) {
String titleText = "";
switch (dialogType) {
case DialogType.CONFIRMATION:
titleText = "Are you sure want to perform this action?";
break;
case DialogType.DELETE:
titleText = "Do you want to delete?";
break;
case DialogType.UPDATE:
titleText = "Do you want to update?";
break;
case DialogType.ADD:
titleText = "Do you want to add?";
break;
case DialogType.ACCEPT:
titleText = "Do you want to accept?";
break;
case DialogType.RETRY:
titleText = "Click to retry";
break;
}
return titleText;
}