|
4 | 4 | This source code is licensed under Apache 2.0 License.
|
5 | 5 | -->
|
6 | 6 |
|
7 |
| -# Flutter Graph View |
| 7 | +<h1 align="center"> Flutter Graph View </h1> |
| 8 | + |
| 9 | + |
| 10 | +<p align="center"> |
| 11 | + <a title="Pub" href="https://flame-engine.org" > |
| 12 | + <img src="https://img.shields.io/badge/Powered%20by-%F0%9F%94%A5-orange.svg" /> |
| 13 | + </a> |
| 14 | + <a title="Powered by Flame" href="https://pub.dev/packages/flutter_graph_view" > |
| 15 | + <img src="https://img.shields.io/badge/Pub-v0.0.1+x-red?style=popout" /> |
| 16 | + </a> |
| 17 | + <a href="https://github.com/dudu-ltd/flutter_graph_view/stargazers"> |
| 18 | + <img src="https://img.shields.io/github/stars/dudu-ltd/flutter_graph_view" alt="GitHub stars" /> |
| 19 | + </a> |
| 20 | + <a href="https://github.com/dudu-ltd/flutter_graph_view/network/members"> |
| 21 | + <img src="https://img.shields.io/github/forks/dudu-ltd/flutter_graph_view" alt="GitHub forks" /> |
| 22 | + </a> |
| 23 | +</p> |
| 24 | + |
8 | 25 | Widgets for beautiful graphic data structures, such as force-oriented diagrams. (Under development.)
|
9 | 26 |
|
10 |
| - |
| 27 | + |
| 28 | + |
11 | 29 |
|
12 | 30 | https://user-images.githubusercontent.com/15630211/214360687-93a3683c-0935-46bd-9584-5cb997d518b8.mp4
|
13 | 31 |
|
|
19 | 37 | - [x] Force directed algorithm.
|
20 | 38 | - [x] Random algorithm (In example folder).
|
21 | 39 | - [x] Data panel embedding.
|
22 |
| -- [ ] Style configuration. |
| 40 | +- [x] Style configuration. |
23 | 41 | - [ ] More graphical interactions.
|
24 | 42 |
|
25 | 43 | ## Getting started
|
@@ -49,7 +67,7 @@ void main() {
|
49 | 67 | 'id': 'node$i',
|
50 | 68 | 'tag': 'tag${r.nextInt(9)}',
|
51 | 69 | 'tags': [
|
52 |
| - 'tag${r.nextInt(4)}', |
| 70 | + 'tag${r.nextInt(9)}', |
53 | 71 | if (r.nextBool()) 'tag${r.nextInt(4)}',
|
54 | 72 | if (r.nextBool()) 'tag${r.nextInt(8)}'
|
55 | 73 | ],
|
@@ -90,13 +108,20 @@ void main() {
|
90 | 108 | options: Options()
|
91 | 109 | ..graphStyle = (GraphStyle()
|
92 | 110 | // tagColor is prior to tagColorByIndex. use vertex.tags to get color
|
93 |
| - ..tagColor = {'tag3': Colors.purple} |
| 111 | + ..tagColor = {'tag8': Colors.orangeAccent.shade200} |
94 | 112 | ..tagColorByIndex = [
|
95 |
| - Colors.blue, |
96 |
| - Colors.red, |
97 |
| - Colors.green, |
98 |
| - Colors.yellow, |
| 113 | + Colors.red.shade200, |
| 114 | + Colors.orange.shade200, |
| 115 | + Colors.yellow.shade200, |
| 116 | + Colors.green.shade200, |
| 117 | + Colors.blue.shade200, |
| 118 | + Colors.blueAccent.shade200, |
| 119 | + Colors.purple.shade200, |
| 120 | + Colors.pink.shade200, |
| 121 | + Colors.blueGrey.shade200, |
| 122 | + Colors.deepOrange.shade200, |
99 | 123 | ])
|
| 124 | + ..useLegend = true // default true |
100 | 125 | ..edgePanelBuilder = edgePanelBuilder
|
101 | 126 | ..vertexPanelBuilder = vertexPanelBuilder
|
102 | 127 | ..edgeShape = EdgeLineShape() // default is EdgeLineShape.
|
|
0 commit comments