Index of every page on this site: llms.txt
All skills
madteacher avatar

/flutter-duit-bdui

@2fb67e3
Run it yourself

Integrate, fix, review, migrate, test, or debug Duit / flutter_duit backend-driven UI in Flutter applications. Use when a task mentions DUIT, flutter_duit, backend-driven UI, BDUI, server-driven UI, XDriver, DuitViewHost, DuitRegistry, HTTP or WebSocket transports, custom Duit widgets, components, capability delegates, compile-time DUIT flags, or rendering JSON layouts from a backend.

Use this Skill: https://skilld.dev/gh/madteacher/mad-agents-skills/flutter-duit-bdui

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencespublic_api.md

≈717 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Public Driver API

Use this reference after SKILL.md has routed you here. It summarizes the driver API patterns the agent should verify and use; it is not a replacement for checking the installed package version.

Version Rule

flutter_duit 4.x examples use XDriver factories and DuitViewHost.withDriver. Older DuitDriver(...) examples and transport option wrappers may still appear in historical docs, blog posts, or old projects. Match the target project's installed major version before editing code.

Common Modes

Mode Use when 4.x starting point
Remote Layout comes from a backend endpoint XDriver.remote(...) with an HTTP transport manager
Static Layout is local JSON for tests, previews, or fixtures XDriver.static(...)
Native module Duit UI is embedded and communicates with a host/native layer XDriver.nativeModule(...) after checking the current API

Remote HTTP Example

late final XDriver driver;

@override
void initState() {
  super.initState();
  driver = XDriver.remote(
    transportManager: HttpTransportManager(
      url: "/layout",
      baseUrl: "https://api.example.com",
      defaultHeaders: {
        "Content-Type": "application/json",
      },
    ),
  );
}

@override
void dispose() {
  driver.dispose();
  super.dispose();
}
DuitViewHost.withDriver(
  driver: driver,
  placeholder: const CircularProgressIndicator(),
);

Static Layout Example

final driver = XDriver.static(
  {
    "type": "Text",
    "id": "hello",
    "attributes": {
      "data": "Hello, World!",
    },
  },
  transportManager: StubTransportManager(),
);

Use static mode for local smoke tests before introducing backend transport complexity.

Lifecycle Rules

  • Create the driver in an owner with a clear lifecycle, usually State.initState or an existing dependency owner.
  • Dispose the driver in the matching cleanup method.
  • Avoid creating a new driver on every build.
  • Handle loading and error states when the host widget/API supports them.
  • Keep auth headers and base URLs consistent with the project's existing networking layer.

Event And Stream Work

When adding external event streams, custom event handlers, actions, or WebSocket transport, verify names and signatures against the current API docs. Treat server event schema as a backend contract, not something to infer from widget names alone.

Do Not Use Without Verification

Avoid these shapes unless the installed package version explicitly supports them:

XDriver(
  transportManager: HttpTransportManager(
    options: HttpTransportOptions(...),
  ),
);
WSTransportManager(
  options: WSTransportOptions(...),
);

These forms may reflect older or mixed documentation and can produce code that does not compile on current 4.x packages.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning2mo5 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill facilitates the integration of a backend-driven UI framework in Flutter. It inherently handles data from external sources and supports embedded scripting, which presents potential surfaces for indirect prompt injection and dynamic execution if the data source is untrusted.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

  • Runlayer9mo

    5/5 files flagged

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 2fb67e3. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Dormantupdated 7 months ago

README badge

README badge for madteacher/mad-agents-skills/flutter-duit-bdui