getTreeNodeTable method
dynamic
getTreeNodeTable(
- dynamic tableName,
- dynamic item,
- dynamic parentid,
- dynamic context,
- dynamic backcolor,
Implementation
getTreeNodeTable(tableName, item, parentid, context, backcolor) {
myLogAll('getTreeNodeTable');
List list = getTableRowByParentID(tableName, parentid, context);
List<TreeNode> result = [];
if (list.isEmpty) {
return result;
}
for (int i = 0; i < list.length; i++) {
Map dataRow = list[i];
var id = dataRow[gId];
List<TreeNode> listChild =
getTreeNodeTable(tableName, item, id, context, backcolor);
result.add(TreeNode(
content: InkWell(
child: Row(
children: [
getRowItemOne({gTableID: tableName}, dataRow[gId], item,
context, backcolor, gTreeView),
//getImg({gValue: imgDefault}, backcolor),
MyLabel(
{gValue: getTableValueKeyFromTable(tableName, dataRow)},
backcolor),
],
),
onTap: () {
sendRequestOne(
gLocalAction,
{
gLabel: gEdit,
gAction: gLocalAction,
gTableID: tableName,
gRow: dataRow
},
context);
}),
children: listChild));
}
return result;
}