text property

String get text

Text content for textual formats.

Throws when the writer produced a binary payload. Use textOrNull when handling both textual and binary formats.

Implementation

String get text =>
    payload.text ??
    (throw StateError('Export format ${format.id} produced binary content.'));