gviz 0.3.0

Pub Package Build Status

A simple Dart package for writing GraphViz dot files.

0.3.0 #

  • BREAKING Removed all of the complex graph API – Graph, Edge, Flag, GraphStyle.
  • Added Gviz.nodeExists function.

0.2.0+1 #

  • Support Dart 2 stable.

0.2.0 #

  • Added graphProperties to the Gviz constructor.
  • BREAKING Rename EdgeFlag to Flag.

0.1.0 #

  • Rename Graph to Gviz.
  • Added Graph class which actually represents a DAG.
  • Ensure nodes are only added once.

0.0.1 #

  • Initial version.

example/example.dart

// Copyright (c) 2017, Kevin Moore. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import 'package:gviz/gviz.dart';

void main() {
  final graph = Gviz();

  for (var item in [
    [1, 2],
    [2, 5],
    [5, 1],
    [2, 6],
    [5, 6],
    [2, 3],
    [6, 7],
    [7, 6],
    [3, 7],
    [3, 4],
    [4, 3],
    [4, 8],
    [8, 4],
    [8, 7]
  ]) {
    final from = item[0].toString();
    final to = item[1].toString();

    if (item[0] % 2 == 1 && !graph.nodeExists(from)) {
      graph.addNode(from, properties: {'color': 'red'});
    }

    graph.addEdge(from, to);
  }

  print(graph);
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  gviz: ^0.3.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:gviz/gviz.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
41
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
70
Learn more about scoring.

We analyzed this package on Jul 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:gviz/gviz.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
Dev dependencies
pedantic ^1.0.0
test ^1.3.0

Admin