For Nutrient Flutter SDK 5.5.0 and later, use the NutrientInstantView widget to embed the collaborative viewer directly into your widget tree. This component supports full NutrientViewConfiguration options on Android and iOS. On Web, continue using NutrientView. While Nutrient.presentInstant() remains available for backward compatibility, we recommend migrating to the widget-based approach.

To use Instant for Flutter, pass a server URL and JSON Web Token (JWT) to the Nutrient.presentInstant() method. This loads the Instant document in a viewer.

The JWT contains the following information:

  • Document ID — A unique document identifier that you want to view and collaborate on.
  • User information — The user name, email address, and other relevant details.
  • Permissions — Actions the user is enabled to perform on the document (viewing, annotating, or commenting).
  • Instant layers — Collaborative layers that will be used for the Instant document viewer.

The following example shows the Nutrient.presentInstant() method in a Flutter app:

import 'package:nutrient_flutter/nutrient_flutter.dart';
// Assume that `serverUrl` and the JWT are already defined.
// Present the Instant document viewer.
await Nutrient.presentInstant(
serverUrl: serverUrl,
jwt: jwt,
);

To customize the Instant document viewer, pass additional configurations to the Nutrient.presentInstant() method.