A Flutter package for creating interactive and customizable graphs in your Flutter applications.
- Plot mathematical functions on a graph.
- Customize graph appearance, including colors, grid settings, and more.
- Easily integrate graphs into your Flutter apps.
flutter pub add graph_calculator
import 'package:flutter/material.dart';
import 'package:graph_calculator/controllers/graph_controller.dart';
import 'package:graph_calculator/models/models.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Graph Calculator Example'),
),
body: Center(
child: GraphWidget(
graphController: GraphController(graph: Graph()),
),
),
),
);
}
}
For detailed usage instructions and examples, please check out the example provided in this package.
You can customize various aspects of the graph, such as colors, grid settings, and more, by configuring the Graph
class and the GraphController
.
GraphController(
graph: Graph(
gridStep: 50,
backgroundColor: Colors.blueGrey,
axesColor: Colors.white,
gridColor: Colors.grey,
gridWidth: 1.0,
axesWidth: 2.0,
drawAxes: true,
drawNumbers: true,
),
);
Contributions and feedback are welcome! If you have any suggestions or find issues, please feel free to create an issue or submit a pull request.
This package is open-source and available under the MIT License.