getWidgetTitle method

dynamic getWidgetTitle(
  1. dynamic param,
  2. dynamic backcolor
)

Implementation

getWidgetTitle(param, backcolor) {
  myLogAll('getWidgetTitle');
  Widget title;
  param[gTitle] = getParamTypeValue(param[gTitle]);
  if (param[gTitle][gType] == gLabel) {
    title = MyLabel(param[gTitle], backcolor);
  } else if (param[gTitle][gType] == gIcon) {
    title = MyIcon(param[gTitle]);
  } else if (param[gTitle][gType] == gImg) {
    title = MyPic(param[gTitle]);
  } else {
    title = MyLabel({gLabel: param[gTitle][gTitle]}, backcolor);
  }
  return title;
}