You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to print the FlSpot values from the answer Iman gave with "print(spots)", my console returns: I/flutter (19814): [FlSpot, FlSpot, FlSpot, FlSpot, FlSpot, FlSpot, FlSpot]
How can I instead receive the x and y coordinates of each FlSpot and not just the data type? It would be helpful to know how to do this so I can double-check my FlSpot values in the Console during testing.
The text was updated successfully, but these errors were encountered:
Got it.
Each Dart object has a toString method that you can override.
If you don't override it, dart uses a default implementation (that prints the data type). Otherwise, it prints what you define in your overridden method.
Now I suggest you read about it. Then you can fork this repo and make the change. Then create your PullRequest and I will merge it to the master.
Also, I encourage you to attend to the Hacktoberfest and they count your PullRequest to gift a swag to you.
Thanks!
Thank you for your response! I will research that to learn more about it and make the change 👍
Oh I didn't know about Hacktoberfest but I looked it up and it looks really exciting, I just signed up! This will be my first time contributing to open source. I'll create a pull request soon, thanks!
I would like to know how to print the x and y values for FlSpots from a List of FlSpots.
Iman posted an answer at this link:
https://stackoverflow.com/questions/60281061/how-to-assign-an-array-to-spots-in-fl-chart-in-flutter/61987521#61987521
When I try to print the FlSpot values from the answer Iman gave with "print(spots)", my console returns:
I/flutter (19814): [FlSpot, FlSpot, FlSpot, FlSpot, FlSpot, FlSpot, FlSpot]
How can I instead receive the x and y coordinates of each FlSpot and not just the data type? It would be helpful to know how to do this so I can double-check my FlSpot values in the Console during testing.
The text was updated successfully, but these errors were encountered: