file_preview_kit library

Flutter widgets and parsers for previewing XLSX, CSV, and DOCX files.

Classes

CsvParser
Parses UTF-8 CSV bytes into an ExcelWorkbook.
CsvPreviewContent
Parsed CSV workbook content.
DocxBlock
Base type for renderable DOCX blocks.
DocxBookmarkStart
Marks the start of a named DOCX bookmark.
DocxBreak
An explicit page or column break.
DocxComment
A document comment and its author metadata.
DocxDocument
Parsed content and references from a DOCX package.
A block-level hyperlink containing styled text runs.
DocxImage
An image extracted from DOCX content.
DocxListInfo
Numbering and indentation metadata for a list paragraph.
DocxNote
A footnote or endnote extracted from a document.
DocxParagraph
A paragraph containing styled text runs.
DocxParagraphStyle
Resolved formatting and layout for a paragraph.
DocxParser
Parses DOCX package bytes into a renderable document model.
DocxPreviewContent
Parsed DOCX document content.
DocxPreviewView
Displays a parsed DOCX document as continuous scrollable content.
DocxTable
A table with rows, style metadata, and optional column widths.
DocxTableCell
A table cell containing block content.
DocxTableRow
A row in a DOCX table.
DocxTextRun
A contiguous piece of text with shared formatting.
DocxTextStyle
Resolved formatting for a text run.
DocxUnsupportedContent
Visual DOCX content that cannot currently be rendered.
ExcelCell
A parsed spreadsheet cell.
ExcelCellBorders
Border sides for a spreadsheet cell.
ExcelCellStyle
Visual style for a spreadsheet cell.
ExcelMergeRegion
A rectangular merged cell region in a worksheet.
ExcelPreviewView
Displays workbook sheets in an interactive spreadsheet grid.
ExcelSheet
A parsed spreadsheet worksheet.
ExcelWorkbook
A parsed XLSX or CSV workbook.
FilePreviewKitTexts
User-facing labels and error messages displayed by preview widgets.
FilePreviewKitTheme
Built-in themes for preview widgets.
FilePreviewLoader
Detects and parses supported in-memory preview sources.
FilePreviewView
Detects, parses, and previews a supported in-memory file.
PreviewContent
Parsed preview payload returned by FilePreviewLoader.load.
PreviewSource
In-memory file content and metadata used to select a preview parser.
UnsupportedPreviewContent
Content for an unsupported file type.
XlsxParser
Parses XLSX package bytes into an ExcelWorkbook.
XlsxPreviewContent
Parsed XLSX workbook content.

Enums

DocxBreakType
Explicit break categories found in DOCX content.
DocxBuiltinKind
Recognized built-in paragraph style categories.
DocxListType
Supported list marker categories.
DocxNoteType
Reference note categories.
DocxParagraphAlignment
Supported paragraph alignment values.
DocxVerticalAlignment
Vertical placement of text relative to the baseline.
ExcelCellType
Supported spreadsheet cell value categories.
ExcelHorizontalAlign
Horizontal alignment for a spreadsheet cell.
ExcelVerticalAlign
Vertical alignment for a spreadsheet cell.
PreviewType
File formats recognized by the unified preview widget.

Exceptions / Errors

EmptyFileException
Indicates that no file content was provided.
InvalidCsvException
Indicates that CSV content is invalid or corrupted.
InvalidDocxException
Indicates that DOCX content is invalid or corrupted.
InvalidXlsxException
Indicates that XLSX content is invalid or corrupted.
PasswordProtectedFileException
Indicates that encrypted XLSX content is unsupported.
PreviewException
Base exception for file parsing and preview failures.
UnsupportedFileTypeException
Indicates that a file format cannot be previewed.