R. C. Howell - 2018
A pretty plotting package for Flutter apps. Sizing and autopadding isn't great right now, but tinkering with padding and fontSize will allow for you to align things well. You can also check out
/docs to learn more, but it really is a single file package.
This example is more complicated than typical because it's showing off the styling capability.
final List<Point> data = [ const Point(21.0, 19.0), const Point(3.0, 7.0), const Point(8.0, 9.0), const Point(11.0, 14.0), const Point(18.0, 17.0), const Point(7.0, 8.0), const Point(-4.0, -4.0), const Point(6.0, 12.0), ]; new Card( child: new Column( children: <Widget>[ new Container( padding: const EdgeInsets.only(top: 12.0), child: new Text('Super Neat Plot'), ), new Container( child: new Plot( height: 200.0, data: widget.data, gridSize: new Offset(2.0, 2.0), style: new PlotStyle( pointRadius: 3.0, outlineRadius: 1.0, primary: Colors.white, secondary: Colors.orange, textStyle: new TextStyle( fontSize: 8.0, color: Colors.blueGrey, ), axis: Colors.blueGrey, gridline: Colors.blueGrey, ), padding: const EdgeInsets.fromLTRB(40.0, 12.0, 12.0, 40.0), xTitle: 'My X Title', yTitle: 'My Y Title', ), ), ], ), ),
// Using the same data as before Plot simplePlot = new Plot( height: 200.0, data: widget.data, gridSize: new Offset(2.0, 2.0), style: new PlotStyle( primary: Colors.black, textStyle: new TextStyle( fontSize: 8.0, color: Colors.blueGrey, ), axis: Colors.blueGrey, ), padding: const EdgeInsets.fromLTRB(40.0, 12.0, 12.0, 40.0), );
See project README.md. This is the initial release of a small plotting library for Flutter.
Add this to your package's pubspec.yaml file:
dependencies: flutter_plot: "^0.0.1"
You can install packages from the command line:
$ flutter packages get
Alternatively, your editor might support
flutter packages get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|0.0.1||Mar 22, 2018|
We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
Fix analysis and formatting issues.
Analysis or formatting checks reported 2 warnings 2 hints.
Strong-mode analysis of
lib/flutter_plot.dartgave the following warning:
line: 309 col: 8
Element 'TextStyle' from SDK library 'ui.dart' is implicitly hidden by 'text_style.dart'.
The description is too short.
Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.
Package is pre-v1 release.
While there is nothing inherently wrong with versions of
0.*.*, it usually means that the author is still experimenting with the general direction API.
Maintain an example.
Create a short demo in the
example/directory to show how to use this package. Common file name patterns include:
example.dartor you could also use