isDynamic property

bool get isDynamic

Checks whether the ABI parameter is dynamic. Dynamic parameters include strings, bytes, dynamic arrays, and tuples containing dynamic components.

Implementation

bool get isDynamic {
  if (type == 'string' || type == 'bytes' || type.endsWith('[]')) {
    return true;
  }

  if (type == 'tuple') {
    return components.any((component) => component.isDynamic);
  }

  if (type.endsWith(']')) {
    return _ABIUtils.toArrayType(this).item1.isDynamic;
  }

  return false;
}