Currently I have my chart displayed on the homepage of my app.
I would like to export this chart as an image and display it on a different page of the app. You can only navigate to this page by opening a sidebar menu, and clicking the page name.
In the documentation for "Exporting in Flutter Cartesian Charts", the _renderChartAsImage() function is called with the use of a TextButton. However, I would like to export the image when I click on an "Export" tile in the sidebar menu of the app, and then display it on an already existing "Export" page. I can't figure out how to call this _renderChartAsImage() function on a different page of the app (this page is saved as a separate dart file).
Any idea how this can be achieved? I am still new to flutter and any assistance would be appreciated.
Hi Matt Keller,
Currently, we are validating your query and will update the complete details in one business day.
We have created a simple sample in which we have rendered the chart widget on the home page, and in the side navigation drawer, we have placed an export tile button which on clicked will export the chart widget rendered on the home page to image and display it on the separate export page that already exists. You can find the below attached sample for reference.
Sorry for the late response, but thank you! This was very helpful :)
Most Welcome. Kindly get back to us if you have further queries. We are always happy to assist you.