getTableHeader method

dynamic getTableHeader(
  1. dynamic name,
  2. dynamic context
)

Implementation

getTableHeader(name, context) {
  myLogAll('getTableHeader');

  //var focusName = _mFocusNode[gName] ?? '';
  var value = getTableHeaderValue(name, context);
  /*print('getTableHeader 0 $value,$focusName');
  if (isNull(focusName) && isNull(value)) {

    return const SizedBox();
  }
  print('getTableHeader 1');
  if (name != focusName && isNull(value)) {

    return const SizedBox();
  }
  print('getTableHeader 2');
  if (_tableList[name] == null && isNull(value)) {

    return const SizedBox();
  }
  //value = getTableHeaderValue(name, context);
  var id = _mFocusNode[gId] ?? '';
  print('getTableHeader 3');
  if (isNull(id) && isNull(value)) {

    return const SizedBox();
  }
  /*var dataRow = getTableRowByID(name, id);
  if (isNull(dataRow) && isNull(value)) {
    return const SizedBox();
  }*/
  print('getTableHeader 4');
  value = '${getTableKeyword(name, id, context, -1)}$value';
  if (isNull(value)) {
    return const SizedBox();
  }*/
  int backgroundcolor = Colors.white.value;
//print('getTableHeader 5');
  Widget w = MyLabel(
      {gLabel: value, gFontSize: _defaultFontSize, gAlign: TextAlign.left},
      backgroundcolor);
  if (getIsPos()) {
    //check data length
List tableData = getTableDataMap(name, context);
  if (tableData.isEmpty) {
    return w;
  }
    w = SizedBox(
      width: MediaQuery.of(context).size.width - 50.0,
      child: SingleChildScrollView(
        scrollDirection: Axis.horizontal,
        child: Row(children: [
          MyButton({
            gLabel: gTablePrint,
            gAction: gLocalAction,
            //gType: gPrintTable,
            gTableID: name,
            gCharacter: true,
            /*gWidth: getDouble(
                (getCharLength({gLabel: gTablePrint}) + 20.0).toString()),*/
          }),
          const SizedBox(width: 10.0),
          /*MyIcon({
            gAction: gLocalAction,
            gLabel: gTablePrint,
            gType: gTable,
            gTableID: name,
            gValue: 0xf2ce,
            gIconSize: iconSize,
          }),*/
          w
        ]),
      ),
    );
  }
  //print('getTableHeader 6');
  return w;
  /*List<Widget> actionList = [];
  actionList.insert(
      0,
      Expanded(
          child: MyLabel({gLabel: value, gFontSize: 10.0}, backgroundcolor)));
  return Row(
    children: actionList,
  );*/
}