processTab method

dynamic processTab(
  1. List data,
  2. dynamic context
)

Implementation

processTab(List data, context) {
  myLogAll('processTab');
  for (int i = 0; i < data.length; i++) {
    Map data0 = getMap(data[i]);
    if (data0[gType].toString().endsWith(gTable) ||
        data0[gType] == gTabletree) {
      addTableOne(data0, context);
      if (data0[gWhere] != null &&
          data0[gWhere].toString().indexOf("=") > 0) {
        data0[gWhere] = getWhereClean(data0[gWhere]);
        _whereList[data0[gActionid] + '_' + data0[gLabel]] = data0;
        Widget w = showTableOne(
            data0[gActionid],
            context,
            data0[gLabel],
            data0[gTranspass],
            null,
            data0[gActionid] + '_' + data0[gLabel],
            data0[gWhere],
            -1);
        /*return Scaffold(
            resizeToAvoidBottomInset: false,
            body: SizedBox(height: 200.0, width: 100.0, child: w));*/
        if (isEmptyWidget(w)) {
          return;
        }
        return SizedBox(
            height: MediaQuery.of(context).size.height,
            width: MediaQuery.of(context).size.width,
            child: w);
      }
    } else if (data0[gType] == gCard) {
      int i = 0;
      List databodyNew = [];
      List<dynamic> data0body = data0[gBody];
      for (var element in data0body) {
        element = getMap(element);
        if (i == _colorList.length) {
          i = 0;
        }
        element[gColorIndex] = i;
        databodyNew.add(element);
        i++;
      }
      data0[gBody] = databodyNew;
      data0[gIsselected] = true;
    }
    var param0 = data0[gParam0] ?? gHometab;
    addTab(data0, context, param0);
  }

  myNotifyListeners();
}