appplayer_form_view

A read-only Flutter viewer for mcp_form documents. Renders a FormDocument as the actual paper form — the template's own borders, font effects, shading, tables and images (a seal) on a white sheet — so both people and LLMs see the document, not its schema.

Features

  • Faithful render — outlines, fonts, shading, tables and images, paged so a short document still fills a full sheet.
  • LLM coordinate scan — every block is tagged (MetaData {type: formBlock, id: <blockId>}) so a UI driver can locate a block by coordinates.
  • PNG captureFormViewController.capturePng() for a self-verification loop (the model sees the form it produced).
  • Inspector / editor seedonBlockTap(FormBlockRef) + selectedBlockId highlight for tap-to-inspect and direct editing.
  • Page modelspaged (a full sheet even when content is short) or sectionPerPage (one section per page).

Input

  • Canonical — a typed FormDocument (no style loss).
  • TransitionalformDocumentFromUiDsl(tree) reverse-maps a frozen form.render {format: 'uiDsl'} tree.

Usage

import 'package:appplayer_form_view/appplayer_form_view.dart';

FormView(
  document: myFormDocument,
  controller: controller,
  onBlockTap: (ref) {
    // show an inspector for ref.blockId
  },
);

License

MIT — see LICENSE.

Libraries

appplayer_form_view
Read-only Flutter viewer for mcp_form documents.