flutter_graph_view 0.0.1+2 copy "flutter_graph_view: ^0.0.1+2" to clipboard
flutter_graph_view: ^0.0.1+2 copied to clipboard

retracted

An open source project which can display beautiful graph data structure.

Flutter Graph View #

An open source project which can display beautiful graph data structure, such as force-directed.

Features #

TODO:

  • ✅ Data converter: convert business data into graphic view data.
  • ❌ Algorithm: calculate vertex layout.
    • ❌ Force directed algorithm.
    • ✅ Random algorithm (In example folder).
  • ❌ Data panel embedding.
  • ❌ Style configuration.
  • ❌ More graphical interactions.

Getting started #

flutter pub add flutter_graph_view

Usage #

// Copyright (c) 2023- All flutter_graph_view authors. All rights reserved.
//
// This source code is licensed under Apache 2.0 License.

import 'dart:math';

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

void main() {
  var vertexes = <Map>{};
  var r = Random();
  for (var i = 0; i < 200; i++) {
    vertexes.add({'id': 'node$i', 'tag': 'tag${r.nextInt(9)}'});
  }
  var edges = <Map>{};

  for (var i = 0; i < 100; i++) {
    edges.add({
      'srcId': 'node${(i % 10) + 60}',
      'dstId': 'node${i % 3 + 1}',
      'edgeName': 'edge${r.nextInt(3)}',
      'ranking': r.nextInt(DateTime.now().millisecond),
    });
  }

  var data = {
    'vertexes': vertexes,
    'edges': edges,
  };

  runApp(MaterialApp(
    home: FlutterGraphWidget(
      data: data,
      algorithm: ForceDirected(),
      convertor: MapConvertor(),
    ),
  ));
}

Licence #

flutter_graph_view is under the Apache License, Version 2.0.

49
likes
0
pub points
81%
popularity

Publisher

verified publisherdudu.ltd

An open source project which can display beautiful graph data structure.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flame, flutter

More

Packages that depend on flutter_graph_view