findFirstRecursive method

TlvMsg? findFirstRecursive(
  1. List<int> path
)

Implementation

TlvMsg? findFirstRecursive(List<int> path) {
  TlvList? current = this;
  TlvMsg? found;
  for (final int tag in path) {
    found = current?.findFirst(tag);
    if (found == null) return null;
    current = found.value is TlvList ? found.value! as TlvList : null;
  }
  return found;
}