getInstances method
Returns up to limit live instances of classId.
Returns null when heap enumeration is unavailable or the call fails.
includeSubclasses includes instances of subclasses when the VM
supports it.
Implementation
Future<InstanceSet?> getInstances(
String classId,
int limit, {
bool? includeSubclasses,
}) async {
_ensureConnected();
if (!_supportsClassList) return null;
try {
return await _vmService!.getInstances(
_isolateId!,
classId,
limit,
includeSubclasses: includeSubclasses,
);
} catch (_) {
return null;
}
}