isa property

Class? isa

Stands for isa in iOS and macOS.

Implementation

Class? get isa {
  if (_ptr == nullptr) {
    return null;
  }

  /// There is no cache because the isa pointer can be changed through objc-runtime.
  Pointer<Void> isaPtr = object_getClass(_ptr);

  /// There is a cache inside Class.
  return Class.fromPointer(isaPtr);
}