搜尋套件、儲存庫與 APP 分類

graphite 封面
套件詳情v1.2.1

graphite

用於輕鬆繪製有向圖、樹狀圖、流程圖的 Flutter 小部件。內建觸控 API,可建立圖形互動。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
2090
喜歡數
187
Pub 分數
135

安裝套件

flutter pub add graphite

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

Graphite 是一個 Flutter 套件,可簡化在應用程式中建立有向圖、樹狀圖與流程圖的過程。它提供一個靈活的組件,用於視覺化階層結構與網路資料,並內建手勢支援,便於互動式圖形操作。開發者可輕鬆自訂節點外觀、連接方式與佈局行為。該套件支援多種平台,包括 Android、iOS、Web、macOS、Windows 與 Linux,非常適合跨平台視覺化需求。

適用情境

  • 可視化組織架構
  • 建立互動式流程圖
  • 顯示資料依賴關係樹
  • 建構繪圖工具
  • 使用動態節點網絡設計使用者介面

主要特色

  • 內建手勢互動
  • 可自訂的節點和邊樣式
  • 支援階層式與有向佈局
  • 跨平台相容性
  • 與 Flutter 小部件的輕鬆整合
  • 可擴展的圖形修改 API

適合對象

  • UI 開發人員在圖表密集型應用程式上工作
  • 需要視覺數據表示的教育或技術應用
  • 需要使用者可編輯圖結構的工具
  • 建構互動式資料視覺化儀表板的團隊

使用建議

  • 可能需要針對大型圖進行效能優化
  • 自定義佈局邏輯可能需要額外的實作
  • 有限的內建動畫功能
  • 最適合中等大小的資料集
  • 高級使用需要理解圖論概念

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Graphite

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

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 and lines.

License

MIT © lempiy

所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。