Period cycle graph

import 'package:menstrual_cycle_widget/menstrual_cycle_widget.dart';
class MenstrualCycleGraphExample extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Period cycle graph'),
),
body: MenstrualCyclePeriodsGraph(
isShowMoreOptions: true,
onPdfDownloadCallback: (pdfPath) async {
// This function will be called when the user downloads an pdf
// pdfPath contains the path to the downloaded pdf
},
onImageDownloadCallback: (imagePath) async {
// This function will be called when the user downloads an image
// imagePath contains the path to the downloaded image
},
),
);
}
}
Parameter
loadingText
String
Specify the loading text while fetch data from databse.
Loading...
isShowMoreOptions
bool
Specify as true to show download image and pdf options into right-top of graph.
false
onImageDownloadCallback
Function
Callback this function if user download image. It's return a path of the image.
-
onPdfDownloadCallback
Function
Callback this function if user download pdf. It's return a path of the image.
-
xAxisTitle
String
Specify the title of xAxis
Cycle start date
xAxisTitleTextStyle
TextStyle
Specify the text style of xAxis
TextStyle(color: Colors.black, fontSize: 10)
isShowXAxisTitle
bool
Speficy false if want to hide xAxis title
true
yAxisTitle
String
Specify the title of yAxis
Cycle length (in days)
yAxisTitleTextStyle
TextStyle
Specify the text style of yAxis
TextStyle(color: Colors.black, fontSize: 10)
isShowYAxisTitle
bool
Speficy false if want to hide yAxis title
true
periodDaysColor
Color
Specify the bar color of period days
Color(0xFFff584f)
periodDaysTitle
Specify the title of period days into header bar
Period days
otherCycleDaysColor
Color
Specify the bar color of other menstrual days
Color(0xFFabcdf0)
otherCycleDaysTitle
Specify the title of other days into header bar
Other cycle days
Last updated