InfoView class

A read-only panel showing document metadata and file information.

InfoView renders two sections:

  1. Document metadata — PdfMetadata fields (title, author, subject, keywords, creator, producer, creation date, modification date).
  2. File information — optional file name, file path, file size, page count, PDF version, and filesystem dates.

File info is passed as parameters rather than fetched internally, keeping the widget free of dart:io and making it straightforward to test.

All string fields are rendered as labelled rows with the label in a muted style and the value in primary text. Missing or null fields are omitted entirely. Dates are formatted via intl.DateFormat using pdfDate.value (a DateTime? in UTC); the raw string is never shown.

File size is formatted as a human-readable string (e.g. "1.2 MB") using NumberFormat.decimalPattern.

Example

InfoView(
  metadata: meta,
  docInfo: info,
  pageCount: 42,
  filePath: '/path/to/document.pdf',
  fileSizeBytes: 1234567,
  labels: PdfDocumentInfoLabels(...),
)
Inheritance

Constructors

InfoView({Key? key, required PdfMetadata metadata, required PdfDocumentInfo docInfo, required DocumentInfoLabels labels, int? pageCount, String? filePath, int? fileSizeBytes, DateTime? fsCreated, DateTime? fsModified, String? locale})
Creates a InfoView.
const

Properties

docInfo → PdfDocumentInfo
Document-level properties (PDF version, file identifiers).
final
filePath → String?
Full filesystem path to the file, or null if not available.
final
fileSizeBytes → int?
File size in bytes, or null if not available.
final
fsCreated → DateTime?
Filesystem creation date, or null if not available.
final
fsModified → DateTime?
Filesystem last-modified date, or null if not available.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labels → DocumentInfoLabels
Localised label strings for each field.
final
locale → String?
Locale for date and number formatting. Defaults to the system locale.
final
metadata → PdfMetadata
Document metadata from the PDF Info dictionary.
final
pageCount → int?
Total number of pages, or null if not available.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

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