darshan_linear_graph 0.0.1
darshan_linear_graph: ^0.0.1 copied to clipboard
A new flutter project which helps developers to draw a 2d graph for theie app.
Flutter package project to draw Basic customiseable graph chart for both android and ios in no times .
Usage #
To Use This Package :
dependencies:
flutter:
sdk: flutter
darshan_linear_graph:
Example Code : #
import 'package:darshan_linear_graph/darshan_linear_graph.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Graph Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Lets Learn Together'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
List<String> _xAxisLabelList = ["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];
List<double> _yAxisValueList = [10, 50, 45, 65, 36, 15.1, 64.8];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 20,),
Text("Upside Down Direction",style: TextStyle(color: Colors.purple,fontSize: 22),),
Container(
height: 180,
child: DarshanLinearGraph(
xAxisLabelList: _xAxisLabelList,
yAxisValueList: _yAxisValueList,
),
),
SizedBox(height: 20,),
Text("Down To Up Direction",style: TextStyle(color: Colors.purple,fontSize: 22),),
Container(
height: 180,
child: DarshanLinearGraph(
xAxisLabelList: _xAxisLabelList,
yAxisValueList: _yAxisValueList,
isUpToDown: true,
),
)
],
));
}
}
Screenshots #

Getting started #
import 'package:darshan_linear_graph/darshan_linear_graph.dart';
How to Use #
Container(
height: 150,
child: DarshanLinearGraph(
xAxisLabelList: ["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];,
yAxisValueList: [10, 50, 45, 65, 36, 15.1, 64.8] ,
isUpToDown: true,
),
)
Additional information #
TODO: Tell users more about the package: where to find more information, how to contribute to the package, how to file issues, what response they can expect from the package authors, and more.