Actions Status

:arrow_right: :black_square_button: Flutter widget to draw direct graphs, trees, flowcharts in rectanglar manner.

Support the author :yellow_heart: :blue_heart:

The only reason why the latest release of Graphite become possible is because of Armed Forces Of Ukraine. Ukrainian defenders are those who saved the author's life last spring and currently continue fighting with absolute evil in my country. If you liked this lib and want to support future releases I would be grateful for your donations to Come Back Alive Charity which directly supports UA Army with equipment.

Thank you.

vertical custom




Example of usage:

import 'package:flutter/material.dart';
import 'package:graphite/graphite.dart';

void main() => runApp(MyApp());
const list = '['

class MyApp extends StatelessWidget {
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Graphite',
      theme: ThemeData(
        primarySwatch: Colors.teal,
      home: MyHomePage(),

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key}) : super(key: key);
  _MyHomePageState createState() => _MyHomePageState();

class _MyHomePageState extends State<MyHomePage> {
  Widget build(BuildContext context) {
    return Scaffold(
      body: InteractiveViewer(
        constrained: false,
        child: DirectGraph(
          list: nodeInputFromJson(list),
          defaultCellSize: const Size(100.0, 100.0),
          cellPadding: const EdgeInsets.all(20),
          orientation: MatrixOrientation.Vertical,


  • Nodes and edge gesture events.
  • Ability provide graph building direction (horizontal or vertical).
  • Ability to provide custom builder to node widget.
  • Ability to add overlays.
  • Ability to add edge text or Widget labels.
  • Ability to provide custom paint builder to graph edges.
  • Ability to customize arrows.


MIT © lempiy