vyuh_diagram_flutter
4.0.0, released 9 days ago by vyuh.tech
Flutter canvas for diagrams with pan, zoom, selection and theming
$ flutter pub add vyuh_diagram_flutterWhat 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.
80Compare - super_text_layout
Configurable and extensible text display for custom decorations in Flutter.
88Compare - selectable
A widget that enables text selection across multiple text widgets.
77Compare - code_editor
A Flutter code editor widget with syntax highlighting, custom themes, and file navigation.
82Compare
Works with
Packages commonly used together with vyuh_diagram_flutter: ones it builds on, ones built on it, and its own family.
- webvyuh_diagram_flutter depends on itLightweight bindings for browser APIs via JS interop
- path_parsingvyuh_diagram_flutter depends on itPure Dart library for parsing SVG path strings and generating Dart path code.
- flutter_svgvyuh_diagram_flutter depends on itRenders Scalable Vector Graphics (SVG 1.1) and precompiled vector graphics in Flutter.
- material_uivyuh_diagram_flutter depends on itOfficial Flutter Material UI library implementing Google’s Material Design system.
- listenvyuh_diagram_flutter depends on itA package to notify state changes to interested listeners in pure Dart.
- cryptographyvyuh_diagram_flutter depends on itCross‑platform cryptographic algorithms for Dart and Flutter.
- file_selectorvyuh_diagram_flutter depends on itFlutter plugin for opening, saving, and selecting directories with native file dialogs
- mobxvyuh_diagram_flutter depends on itTransparent functional reactive state management using observables, actions, and reactions.