---
title: "Platform adapters"
canonical_url: "https://www.nutrient.io/guides/flutter/platform-adapters/"
md_url: "https://www.nutrient.io/guides/flutter/platform-adapters.md"
last_updated: "2026-05-23T00:08:18.095Z"
description: "Learn how to use platform adapters in Nutrient Flutter SDK for direct access to native PDF functionality through language bindings, enabling maximum flexibility and platform-specific customization."
---

Nutrient Flutter SDK includes platform adapters as a built-in extensibility mechanism. They give you direct access to the native Nutrient PDF SDKs on each platform, enabling advanced customization beyond what the cross-platform API exposes.

Platform adapters are currently in beta. APIs may change in future releases.

## What are platform adapters?

Platform adapters are an extension point in Nutrient Flutter SDK that use native language bindings to communicate with the underlying Nutrient PDF SDKs:

- **Android** — JNI bindings via the `jni` package for direct Java/Kotlin interop.

- **iOS** — Objective-C bindings via the `objective_c` package for direct Swift/Objective-C interop.

- **Web** — JavaScript interop via `dart:js_interop` for direct access to Nutrient Web SDK.

Pass an adapter to `NutrientView` for capabilities beyond the standard `PdfConfiguration` options — such as listening to native lifecycle events, customizing platform-specific UI elements, or calling native SDK methods directly.

## When to use platform adapters

Platform adapters are appropriate for the following use cases:

1. **Advanced UI customization**
   - Custom toolbar configurations
   - Platform-specific menu items
   - Contextual toolbar modifications

2. **Full event access**
   - Native document lifecycle events
   - Annotation change callbacks
   - Page rendering events

3. **Platform-specific features**
   - Features only available on one platform
   - Deep integration with native APIs
   - Custom rendering or processing

4. **Direct platform SDK access**
   - Direct calls via JNI (Android), FFI (iOS), or JS interop (Web)
   - Fine-grained control over SDK behavior

## Architecture

Platform adapters follow a layered architecture within Nutrient Flutter SDK, outlined in the image below.![Platform adapters architecture](@/assets/images/guides/flutter/platform-adapters/architecture.svg)

### Key components

1. **NutrientView** — Flutter widget for displaying PDF documents; accepts an optional `adapter` parameter

2. **Nutrient** — SDK initialization and license configuration

3. **NutrientController** — Base controller class for document interaction

4. **Platform adapters** — Customizable bridges to native SDK functionality

### The adapter pattern

Platform adapters are the core extension point. Each adapter:

- Extends a base adapter class (`AndroidAdapter`, `IOSAdapter`, or `NutrientWebAdapter`)

- Receives lifecycle callbacks for customization

- Implements custom controller interfaces

- Has full access to native SDK APIs![Adapter pattern](@/assets/images/guides/flutter/platform-adapters/adapter-pattern.svg)

## Package structure

Nutrient Flutter SDK is composed of several packages:

| Package                               | Purpose                                          |
| ------------------------------------- | ------------------------------------------------ |
| `nutrient_flutter`                    | Main entry point, exports unified API            |
| `nutrient_flutter_platform_interface` | Platform-agnostic interfaces and base classes    |
| `nutrient_flutter_android`            | Android JNI bindings and `AndroidAdapter`        |
| `nutrient_flutter_ios`                | iOS Objective-C bindings and `IOSAdapter`        |
| `nutrient_flutter_web`                | Web JS interop bindings and `NutrientWebAdapter` |

## Next steps

- [Getting started](https://www.nutrient.io/guides/flutter/platform-adapters/getting-started.md) — Installation and setup

- [Usage patterns](https://www.nutrient.io/guides/flutter/platform-adapters/usage.md) — Examples and patterns

- [Platform imports](https://www.nutrient.io/guides/flutter/platform-adapters/platform-imports.md) — Handling platform-specific imports
---

## Related pages

- [Native Sdk Reference](/guides/flutter/platform-adapters/native-sdk-reference.md)
- [Platform Imports](/guides/flutter/platform-adapters/platform-imports.md)
- [Android](/guides/flutter/platform-adapters/getting-started.md)
- [Usage](/guides/flutter/platform-adapters/usage.md)

