instance property

The active platform implementation, or null if not yet set.

FlutterPdfAnnotations falls back to the built-in method-channel implementation when this is null.

Implementation

static FlutterPdfAnnotationsPlatform? get instance => _instance;
set instance (FlutterPdfAnnotationsPlatform? platform)

Override the platform implementation.

Useful in unit tests:

FlutterPdfAnnotationsPlatform.instance = MockPdfAnnotationsPlatform();

Implementation

static set instance(FlutterPdfAnnotationsPlatform? platform) {
  if (platform != null) PlatformInterface.verifyToken(platform, _token);
  _instance = platform;
}