Skip to content

API surface

Applet has two API surfaces:

  • Dart APIs used by the Flutter host to load, limit, observe, and reload applets;
  • JavaScript APIs used by applet modules to describe Flutter UI.
Page Use it for
Dart host API Applet.asset, Applet.source, AppletController, bundles, runtime options.
JavaScript API State, Applet.action, node helpers, modules, default exports.
Component modules @app/material, @app/cupertino, layout, widgets, and coverage strategy.

Use types/app.d.ts in editors that support JavaScript type acquisition. It declares the built-in modules, common props, state helpers, theme tokens, and Flutter-shaped component factories.

New code should import @app/* modules. Compatibility aliases under @applet/* are still declared so older scripts continue to work:

import { Text } from "@app/material";

Prefer the new module names in docs, examples, and new applets.