tapRowitemone method

dynamic tapRowitemone(
  1. dynamic item,
  2. dynamic name,
  3. dynamic id,
  4. dynamic context,
)

Implementation

tapRowitemone(item, name, id, context) {
  myLogAll('tapRowitemone');
  bool result = false;
  var droplist = item[gDroplist] ?? '';
  if (isNull(droplist)) {
    return result;
  }
  List listDp = _dpList[droplist];
  if (listDp.isEmpty || listDp.length >= 4) {
    return result;
  }
  var value = getValue(name, item[gId], id)[gValue] ?? '';
  {
    for (int i = 0; i < listDp.length; i++) {
      if (listDp[i] is! Map) {
        var li = listDp[i];
        if (isNull(value) || li == value) {
          int j = i + 1;
          if (j > listDp.length - 1) {
            j = 0;
          }
          setValue(name, item[gId], id, listDp[j], context);
          result = true;
          break;
        }

        continue;
      }
      Map li = listDp[i];

      if (isNull(value) || li[gLabel] == value) {
        int j = i + 1;
        if (j > listDp.length - 1) {
          j = 0;
        }
        setValue(name, item[gId], id, listDp[j][gLabel], context);
        result = true;
        break;
      }
    }
  }
  return result;
}