Skip to content

Instantly share code, notes, and snippets.

@NITIN-ME
Created May 29, 2020 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NITIN-ME/7ef787932b5dcd0f39c7c1eaad4aaa67 to your computer and use it in GitHub Desktop.
Save NITIN-ME/7ef787932b5dcd0f39c7c1eaad4aaa67 to your computer and use it in GitHub Desktop.
class MyChartBody extends StatelessWidget {
@override
Widget build(BuildContext context) {
final List<DataPoint> args = ModalRoute.of(context).settings.arguments;
var seriesList = [charts.Series<DataPoint, int>(
id: 'Sales',
colorFn: (_, __) => charts.MaterialPalette.blue.shadeDefault,
domainFn: (_,ind) => ind,
measureFn: (DataPoint dp, _) => dp.num,
data: args)];
return ExponentialCurve(seriesList);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment