onGettingProperties<T> method

  1. @protected
  2. @nonVirtual
T onGettingProperties<T>(
  1. T handler(
    1. DynamicLibrary
    )
)

Middleman of retrive properties from handler and prevent it when isClosed, which throw StateError instead.

Implementation

@protected
@nonVirtual
T onGettingProperties<T>(T Function(DynamicLibrary) handler) {
  if (isClosed) {
    throw StateError("This instance has been closed already.");
  }

  return handler(_nativeLibrary);
}