NSValue.fromPointer constructor

NSValue.fromPointer(
  1. Pointer<Void> ptr
)

Implementation

NSValue.fromPointer(Pointer<Void> ptr) : super.fromPointer(ptr) {
  // TODO: Do these things on native.
  String encoding = performSync(SEL('objCType'));
  String? selName = _selNameForNativeValue(encoding);
  if (selName == null) {
    throw 'Invalid encoding type for NSValue: $encoding';
  } else {
    raw = msgSendSync(pointer, SEL(selName));
  }
}