luke_flow_diagram 2.1.1 copy "luke_flow_diagram: ^2.1.1" to clipboard
luke_flow_diagram: ^2.1.1 copied to clipboard

A customizable flow diagram canvas for Flutter, inspired by React Flow.

Luke Flow Diagram #

Flow Diagram Screenshot

A customizable, interactive Flutter flow diagram library inspired by React Flow.
Supports drag & drop nodes, sockets, edges (Bezier), pan & zoom, and dynamic connections.

The full documentation is available on: Luke Flow Diagram Docs

Demo: Luke Flow Diagram demo

πŸš€ Features #

  • Custom nodes with builder functions

  • Pan & zoom support (with CustomInteractiveViewer)

  • Node socket system (input/output ports)

  • Connect nodes with Bezier edges (dashed or solid)

  • Large canvas support

  • Controller-based architecture for programmatic updates

  • Much more....

πŸ“¦ Installation #

Add to your pubspec.yaml:

dependencies:
  luke_flow_diagram: version

Usage #


import 'package:luke_flow_diagram/luke_flow_diagram.dart';

class MyFlowCanvas extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final controller = LukeFlowCanvasController<DataModelExample>();

    return LukeFlowCanvas<DataModelExample>(
        controller: controller,
        nodeBuilder: (node) {
            //Create your custom nodes here
            return Container(
                padding: const EdgeInsets.all(16),
                decoration: BoxDecoration(
                    color: node.data?.color ?? Colors.white,
                    borderRadius: BorderRadius.circular(8),
                ),
                child: Center(
                    child: Text(
                        node.data?.name ?? 'Node',
                        style: TextStyle(color: Colors.black),
                    ),
                ),
            );
        },
        onUpdate: (n, c) {
            // LukeFlowCanvas handles all its state internaly, but you can
            //Use this function to get the updated data, or use the controller.
            nodes =n;
            connections = c;
        },
    );
  }
}


Customization #

Grid background: density, color, dots vs lines

Node rendering: fully customizable via nodeBuilder

Socket dimensions: adjustable width, height, radius

BezierEdge: dashed or solid, color configurable

Minimap: (coming soon)

7
likes
145
points
74
downloads

Publisher

verified publisherluk3d.com

Weekly Downloads

A customizable flow diagram canvas for Flutter, inspired by React Flow.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on luke_flow_diagram