vyuh_diagram_flutter 2.14.0
vyuh_diagram_flutter: ^2.14.0 copied to clipboard
Shared Flutter rendering, input and text integration for Vyuh Diagram.
vyuh_diagram_flutter
The Flutter canvas for Vyuh Diagram. Start here for a Flutter app.
Vyuh Diagram · Docs · Examples · API reference
Mount a DiagramController in a DiagramCanvas, a real Flutter widget with
painting, gestures, text editing, navigation, themes and effects. This one
import also brings the whole vyuh_diagram_core application API and
DiagramJsonCodec.
Install #
Application code uses typed properties and diagnostics from the main import.
Custom DiagramPropertyEditor.of<T> builders receive a typed field; declarations
and editor integrations remain in extension_api.dart. The editor extension
adds command search, drawing search, arrangement and review over this same
canvas. See the controller API.
flutter pub add vyuh_diagram_flutter --hosted-url https://pub.vyuh.tech
Register your registry token first with dart pub token add https://pub.vyuh.tech;
see package access.
Usage #
import 'package:vyuh_diagram_flutter/vyuh_diagram_flutter.dart';
// Create once in your host state, and dispose it with the host.
final controller = DiagramController(
configuration: DiagramConfiguration(
extensions: [NavigationExtension(fitOnAttach: true)],
),
);
// Mount inside a bounded layout.
DiagramCanvas(controller: controller, theme: DiagramTheme.light);
Without an editable extension the canvas navigates and selects; install
EditorExtension() from vyuh_diagram_extension_editor to edit.
Key options #
| Extension | Options |
|---|---|
NavigationExtension |
NavigationOptions: edge panning, keyboard steps, fitOnAttach. |
ImagesExtension(limits:, picker:) |
ImagesOptions: image limits and the image source picker. |
RenderingExtension(lod:, render:) |
RenderingOptions, from adapter.dart. |
Theme the canvas with DiagramTheme.light, DiagramTheme.dark or a
copyWith of them. Custom shapes, tools and Flutter extensions are authored
with package:vyuh_diagram_flutter/extension_api.dart.
Agent skill #
This package ships the vyuh-diagram-flutter-integration skill for coding
agents. Install it from your application:
dart run skills@ get -p vyuh_diagram_flutter -s vyuh-diagram-flutter-integration
Learn more #
License #
Licensed under the Apache License, Version 2.0. Dependencies retain their own licenses; see third-party notices.