activateLicense method

Future<void> activateLicense(
  1. String? licenseKey
)

Activates the native SDK license for this platform.

Called once by Nutrient.initialize with the current platform's license key (null/empty ⇒ trial mode, watermarked). This is a stateless, SDK-global step — independent of any per-view adapter — so it lives here rather than on NutrientPlatformAdapter:

  • AndroidNutrient.initialize(context, …) with the key.
  • iOSPSPDFKitGlobal.setLicenseKey(…), which must run before any other SDK API.
  • Web — no-op (the key is injected into each NutrientViewer.load()).

Implementations must be idempotent (activate at most once). The default is a no-op so platforms that license per-load (web) need not override it.

Implementation

Future<void> activateLicense(String? licenseKey) async {}