ChartExporter class

Constructors

ChartExporter()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

capabilitiesForFormats({Iterable<ChartExportFormat> formats = ChartExportFormat.values, BaseChartConfig? config, Map<String, dynamic>? jsonConfig, List<List<Object?>>? rows, GlobalKey<State<StatefulWidget>>? boundaryKey}) ChartExportCapabilities
Resolve which formats can be exported from the supplied sources.
capabilitiesForRequests(Iterable<ChartExportRequest> requests) ChartExportCapabilities
Resolve whether each request has enough inputs to run.
capabilityForRequest(ChartExportRequest request) ChartExportCapability
Resolve whether one request has enough inputs to run.
export(ChartExportRequest request) Future<ChartExportResult>
Export chart data or pixels through a single request/result API.
exportableFormats({Iterable<ChartExportFormat> formats = ChartExportFormat.values, BaseChartConfig? config, Map<String, dynamic>? jsonConfig, List<List<Object?>>? rows, GlobalKey<State<StatefulWidget>>? boundaryKey}) List<ChartExportFormat>
Return only formats that can be exported from the supplied sources.
exportAll(Iterable<ChartExportRequest> requests, {ChartExportBatchOptions options = const ChartExportBatchOptions()}) Future<ChartExportBatchResult>
Export several requests and return a single summary object.
exportFormats({required Iterable<ChartExportFormat> formats, BaseChartConfig? config, Map<String, dynamic>? jsonConfig, List<List<Object?>>? rows, GlobalKey<State<StatefulWidget>>? boundaryKey, List<String>? categoryLabels, String? filename, String sheetName = 'Chart Data', String delimiter = ',', String lineEnding = '\r\n', double pixelRatio = 2.0, int jpegQuality = 90, Color jpegBackgroundColor = Colors.white, Duration? timeout, ChartExportCancellationToken? cancellationToken, ChartExportBatchOptions batchOptions = const ChartExportBatchOptions()}) Future<ChartExportBatchResult>
Build matching requests for several formats from a shared chart payload.
imageToJpeg(Image image, {int quality = 90, Color backgroundColor = Colors.white}) Future<Uint8List?>
Encode a captured ui.Image to JPEG bytes.
rowsForRequest(ChartExportRequest request) List<List<Object?>>?
Convert chart series into a rectangular table.
rowsFromPayload(Map<String, dynamic> payload, {List<String>? categoryLabels}) List<List<Object?>>
Convert raw JSON chart payloads into rectangular export rows.
rowsToCsv(List<List<Object?>> rows, {String delimiter = ',', String lineEnding = '\r\n'}) String
Serialise already-normalized tabular rows to CSV.
rowsToXlsx(List<List<Object?>> rows, {String sheetName = 'Chart Data'}) Uint8List
Encode already-normalized tabular rows as an XLSX workbook.
toCsv(BaseChartConfig config, {List<String>? categoryLabels, String delimiter = ',', String lineEnding = '\r\n'}) String
Serialise series data in config to a CSV string.
toImage(GlobalKey<State<StatefulWidget>> key, {double pixelRatio = 2.0}) Future<Image?>
Capture as a ui.Image (useful for in-app display / compositing).
toImageBytes(GlobalKey<State<StatefulWidget>> key, {ChartImageExportFormat format = ChartImageExportFormat.png, double pixelRatio = 2.0, int jpegQuality = 90, Color jpegBackgroundColor = Colors.white}) Future<Uint8List?>
Capture the widget attached to key in the requested image format.
toJpeg(GlobalKey<State<StatefulWidget>> key, {double pixelRatio = 2.0, int quality = 90, Color backgroundColor = Colors.white}) Future<Uint8List?>
Capture the widget attached to key as JPEG bytes.
toPng(GlobalKey<State<StatefulWidget>> key, {double pixelRatio = 2.0}) Future<Uint8List?>
Capture the widget attached to key as PNG bytes.
toRows(BaseChartConfig config, {List<String>? categoryLabels}) List<List<Object?>>
Convert chart series into a rectangular table.
toXlsx(BaseChartConfig config, {List<String>? categoryLabels, String sheetName = 'Chart Data'}) Uint8List
Serialise series data in config to a minimal valid XLSX workbook.

Constants

csvMimeType → const String
jpegMimeType → const String
pngMimeType → const String
xlsxMimeType → const String