JObject.fromPointer constructor
Wrapper java object pointer as dart object.
When java object pointer is nullptr, must specify the java class name className
.
When java object pointer is not nullptr, we will get java class name from jni.
If java class is specified by className
, we will use it first.
Implementation
JObject.fromPointer(Pointer<Void> pointer, {String? className}) {
if (pointer == nullptr) {
throw 'Java object pointer is null.';
}
_ptr = pointer;
_cls = className;
bindLifeCycleWithJava(_ptr);
}