Skip to content
pubscout

vyuh_diagram_flutter

4.0.0, released 9 days ago by vyuh.tech

Flutter canvas for diagrams with pan, zoom, selection and theming

WASM-readyUses material_ui
$ flutter pub add vyuh_diagram_flutter

What it does

Provides a `DiagramCanvas` widget that renders a diagram document, supports navigation, selection, text layout and theme integration. It can be extended with commercial editor extensions for full editing capabilities.

AI-written summary of version 4.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Building custom diagram editors such as flowcharts or network topology views
  • Embedding live Flutter widgets inside diagram shapes
  • Creating themed diagram UIs that integrate with Material Design

Skip it when

  • You need a fully featured commercial editor with toolbar and inspector
  • You are targeting Flutter versions earlier than 3.50 or Dart 3.14

Strengths

  • Rich navigation and selection features
  • Seamless theming via material_ui integration
  • Supports embedding arbitrary Flutter widgets inside shapes

Weaknesses

  • Requires material_ui dependency and updated imports
  • Breaking changes in 4.0.0 may need migration effort

Setup

Kind
Flutter widgets
Effort
Medium
Code generation
No
Direct dependencies
13

Add `material_ui` to pubspec, replace `import 'package:flutter/material.dart';` with `import 'package:material_ui/material_ui.dart';`, and provide a `ThemeData` with `DiagramTheme` extension or pass theme to `DiagramCanvas`

import 'package:vyuh_diagram_flutter/vyuh_diagram_flutter.dart';

final controller = DiagramController();
controller.createShape(Shapes.rectangle, at: DiagramPoint.zero, text: 'Hello Flutter');

DiagramCanvas(controller: controller, theme: DiagramTheme.light);

Alternatives

Packages that do the same job and could replace vyuh_diagram_flutter.

  • re_editor

    A lightweight text and code editor widget for Flutter with syntax highlighting and folding.

  • super_text_layout

    Configurable and extensible text display for custom decorations in Flutter.

  • selectable

    A widget that enables text selection across multiple text widgets.

  • code_editor

    A Flutter code editor widget with syntax highlighting, custom themes, and file navigation.

Works with

Packages commonly used together with vyuh_diagram_flutter: ones it builds on, ones built on it, and its own family.