item method

T item(
  1. dynamic index
)

Implementation

T item(dynamic index) {
  final element = obj.item(index);
  if (element == null) throw Exception("Item not found");
  final componentType = GuiComponentType.values
      .where((e) => e.value == element.typeAsNumber)
      .firstOrNull;
  return _classByTypeNumber(componentType, element);
}