graphview 0.6.5 graphview: ^0.6.5 copied to clipboard
GraphView is used to display data in graph structures. It can display Tree layout, Directed and Layered graph. Useful for Family Tree, Hierarchy View.
import 'package:example/LayerGraphView.dart';
import 'package:flutter/material.dart';
import 'GraphViewClusterPage.dart';
import 'TreeViewPage.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Home(),
);
}
}
class Home extends StatelessWidget {
const Home({
Key key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(children: [
FlatButton(
onPressed: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Scaffold(
appBar: AppBar(),
body: TreeViewPage(),
)),
),
child: Text(
"Tree View (BuchheimWalker)",
style: TextStyle(color: Theme.of(context).primaryColor),
)),
FlatButton(
onPressed: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Scaffold(
appBar: AppBar(),
body: GraphClusterViewPage(),
)),
),
child: Text(
"Graph Cluster View (FruchtermanReingold)",
style: TextStyle(color: Theme.of(context).primaryColor),
)),
FlatButton(
onPressed: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Scaffold(
appBar: AppBar(),
body: LayeredGraphViewPage(),
)),
),
child: Text(
"Layered View (Sugiyama)",
style: TextStyle(color: Theme.of(context).primaryColor),
)),
]),
),
);
}
}