getHTML method
Implementation
Future<String> getHTML([HighchartsOptions? options]) async {
final json = options == null ? '' : options.toJSON();
final result = Completer<String>();
HighchartsCallbackDart<dynamic>? callback;
callback = (obj) {
view.off('highcharts_flutter.getHTML', callback!);
result.complete(obj[0].toString());
};
view.on('highcharts_flutter.getHTML', callback);
await view.webViewController.runJavaScript('''(() => {
const html = highcharts_flutter.chart.exporting.getTable($json);
highcharts_flutter.callback('highcharts_flutter.getHTML', [html]);
})();''');
return result.future;
}