NutrientViewConfiguration class
Typed viewer configuration for bindings-based Nutrient views.
NutrientViewConfiguration replaces the legacy PdfConfiguration for views that communicate with the native SDK directly via JNI/FFI bindings (Android) or FFI (iOS) rather than through the Pigeon method channel.
Only options that have a direct 1-to-1 mapping in the platform's native configuration builder are represented as cross-platform fields. Options that are meaningful on only one platform are grouped under the corresponding platform sub-configuration:
- androidConfig — Android-only options
- iosConfig — iOS-only options
- webConfig — Web-only options (type is
Object?to avoid a dependency onnutrient_flutter; pass aWebViewConfigurationinstance at the call site)
Example
NutrientInstantView(
serverUrl: 'https://example.com/api/1/documents/abc',
jwt: 'eyJhbGci...',
configuration: NutrientViewConfiguration(
pageLayoutMode: PageLayoutMode.single,
appearanceMode: AppearanceMode.night,
thumbnailBarMode: ThumbnailBarMode.floating,
androidConfig: AndroidViewConfiguration(
showSearchAction: false,
),
iosConfig: IOSViewConfiguration(
spreadFitting: SpreadFitting.adaptive,
),
),
)
Constructors
-
NutrientViewConfiguration({ScrollDirection? scrollDirection, PageLayoutMode? pageLayoutMode, PageTransition? pageTransition, bool? firstPageAlwaysSingle, UserInterfaceViewMode? userInterfaceViewMode, ThumbnailBarMode? thumbnailBarMode, AppearanceMode? appearanceMode, int? startPage, bool? enableTextSelection, bool? enableAnnotationEditing, bool? enableFormEditing, bool? disableAutosave, bool? enableInstantComments, double? minimumZoomScale, double? maximumZoomScale, SignatureSavingStrategy? signatureSavingStrategy, SignatureCreationConfiguration? signatureCreationConfiguration, AndroidViewConfiguration? androidConfig, IOSViewConfiguration? iosConfig, Object? webConfig, Map<
String, String> ? aiAssistantConfiguration, String? password}) -
const
Properties
-
aiAssistantConfiguration
→ Map<
String, String> ? -
Optional AI Assistant configuration.
final
- androidConfig → AndroidViewConfiguration?
-
Android-specific options.
final
- appearanceMode → AppearanceMode?
-
The colour theme / appearance mode of the viewer.
final
- disableAutosave → bool?
-
Disable automatic saving of changes.
final
- enableAnnotationEditing → bool?
-
Allow the user to create and edit annotations.
final
- enableFormEditing → bool?
-
Allow the user to fill in form fields.
final
- enableInstantComments → bool?
-
Enable Instant comments. Defaults to
false.final - enableTextSelection → bool?
-
Allow the user to select text in the document.
final
- firstPageAlwaysSingle → bool?
-
Always show the first page as a single page in double-page mode.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- iosConfig → IOSViewConfiguration?
-
iOS-specific options.
final
- maximumZoomScale → double?
-
Maximum zoom scale factor.
final
- minimumZoomScale → double?
-
Minimum zoom scale factor.
final
- pageLayoutMode → PageLayoutMode?
-
Single page, double-page spread, or automatic.
final
- pageTransition → PageTransition?
-
The page transition animation.
final
- password → String?
-
Password used to unlock an encrypted document when the view loads.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollDirection → ScrollDirection?
-
The direction pages are scrolled.
final
- signatureCreationConfiguration → SignatureCreationConfiguration?
-
Configures the signature creation UI (creation modes, color presets,
typed-signature fonts, and per-platform layout options).
final
- signatureSavingStrategy → SignatureSavingStrategy?
-
When the signature creation UI offers to save a new signature.
final
- startPage → int?
-
The initial page index (zero-based) to display on open.
final
- thumbnailBarMode → ThumbnailBarMode?
-
Where and how the page thumbnail bar is displayed.
final
- userInterfaceViewMode → UserInterfaceViewMode?
-
When the viewer toolbar and overlays are shown.
final
- webConfig → Object?
-
Web-specific options.
final
Methods
-
copyWith(
{ScrollDirection? scrollDirection, PageLayoutMode? pageLayoutMode, PageTransition? pageTransition, bool? firstPageAlwaysSingle, UserInterfaceViewMode? userInterfaceViewMode, ThumbnailBarMode? thumbnailBarMode, AppearanceMode? appearanceMode, int? startPage, bool? enableTextSelection, bool? enableAnnotationEditing, bool? enableFormEditing, bool? disableAutosave, bool? enableInstantComments, double? minimumZoomScale, double? maximumZoomScale, SignatureSavingStrategy? signatureSavingStrategy, SignatureCreationConfiguration? signatureCreationConfiguration, AndroidViewConfiguration? androidConfig, IOSViewConfiguration? iosConfig, Object? webConfig, Map< String, String> ? aiAssistantConfiguration, String? password}) → NutrientViewConfiguration - Returns a copy of this configuration with the given fields replaced.
-
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