NutrientViewHandle class
Copyright © 2018-2026 PSPDFKit GmbH. All rights reserved.
THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES. This notice may not be removed from this file.
Handle identifying a platform view instance.
Passed to adapter lifecycle callbacks (e.g. NutrientPlatformAdapter.onPlatformViewCreated). To reach native SDK objects, prefer the typed accessors on your platform adapter — they return the real native type with no casting:
- Android (AndroidAdapter):
nativePdfDocument,nativePdfFragment,nativePdfUiFragment,nativeFormProvider. - iOS (IOSAdapter):
nativeViewController,nativeDocument,nativeFormParser. - Web (
NutrientWebAdapter):nativeInstance.
Example:
@override
Future<void> onViewControllerReady(PSPDFViewController vc) async {
final doc = nativeDocument; // typed, no cast
}
Constructors
- NutrientViewHandle.forPlatform(int viewId)
-
Factory constructor for platform implementations.
factory
Properties
Methods
-
dispose(
) → Future< void> - Dispose of this handle and clean up resources.
-
getNativeInstance(
String identifier) → Object? - Low-level, stringly-typed lookup of a registered native instance.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited