• Stars
    star
    129
  • Rank 279,262 (Top 6 %)
  • Language
    Dart
  • License
    MIT License
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Flutter widget to draw interactive direct graphs (flowcharts) of any complexity in a tile rectangular manner.

Graphite

Actions Status

➡️ 🔲 Flutter widget to draw direct graphs, trees, flowcharts in rectanglar manner.

Support the author 💛 💙

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

flowchart

label

digimon

Example of usage:

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

void main() => runApp(MyApp());
const list = '['
    '{"id":"A","next":[{"outcome":"B"}]},'
    '{"id":"B","next":[{"outcome":"C"},{"outcome":"D"},{"outcome":"E"}]},'
    '{"id":"C","next":[{"outcome":"F"}]},'
    '{"id":"D","next":[{"outcome":"J"}]},{"id":"E","next":[{"outcome":"J"}]},'
    '{"id":"J","next":[{"outcome":"I"}]},'
    '{"id":"I","next":[{"outcome":"H"}]},{"id":"F","next":[{"outcome":"K"}]},'
    '{"id":"K","next":[{"outcome":"L"}]},'
    '{"id":"H","next":[{"outcome":"L"}]},{"id":"L","next":[{"outcome":"P"}]},'
    '{"id":"P","next":[{"outcome":"M"},{"outcome":"N"}]},'
    '{"id":"M","next":[]},{"id":"N","next":[]}'
    ']';

class MyApp extends StatelessWidget {
  @override
  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);
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  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,
       ),
      )
    );
  }
}

Features

  • 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.

License

MIT © lempiy

More Repositories

1

react-direct-graph

📏 React component for drawing direct graphs with rectangular (non-curve) edges.
TypeScript
27
star
2

Weiler-Atherton-Clipping

Implementation of Weiler-Atherton Polygon Clipping Algorithm in Rust
Rust
8
star
3

dgraph

🔷 Draw direct graphs in GO 🔶
Go
6
star
4

Sea_Wars

Sea Wars - 🚢 - Turn Based Online Game
TypeScript
6
star
5

Pizza-To-Go

🍕 Go/Angular 2 application
Go
5
star
6

Sqlite3CreateTableParser

📜 Advanced PRAGMA table_info through DDL parsing
Go
5
star
7

Kottans-Pizza-Api

REST API written in Rust with Notification System written in Go
Rust
4
star
8

lempiy.github.io

Pokedex for Kottans Project
JavaScript
4
star
9

slic0

Linear image segmentation 🌄
Rust
3
star
10

global-happenings

Interactive globe with dynamic map
JavaScript
2
star
11

KottansPokedex

😺 Angular 6 Pokedex for Kottans
TypeScript
2
star
12

NativeSPAExample

Simple example of native Single Page App based on hash routing
JavaScript
2
star
13

Film_API

🎥 Film API written in Golang Echo with JWT Authorization.
Go
2
star
14

Superpixel_Annotator

🎨 Helper Graphics Editor for ML model training 🎨
JavaScript
2
star
15

Peeromant

🔥 File transfer
TypeScript
2
star
16

TCP_UDP_sockets

Samples of tcp/udp sockets
Go
1
star
17

Signaller

Signaller for WebRTC P2P Data
Go
1
star
18

Balloon-Shoot

JavaScript
1
star
19

dora

DOta2 Replay Analyzer
Go
1
star
20

JSON-edit

Simple JSON editor that allows to view and edit only primitive values of JSON. Written in plain js.
JavaScript
1
star
21

Go_Chat

Websockets Chat application written in Beego / Gorilla.
Go
1
star
22

task-2

test task #2 - figure intersection
JavaScript
1
star
23

zeo_quick_order

Zeo Quick Order
Dart
1
star
24

flect

JavaScript
1
star
25

Three-BB

JavaScript
1
star
26

WebRTC-DataChannels

WebRTC DataChannels demo based on localStorage as signal 'server'
JavaScript
1
star