FB2Parser class

Constructors

FB2Parser(String path)

Properties

body FB2Body
The body of the FB2 file.
latefinal
description FB2Description
The description of the FB2 file.
latefinal
file File
The file object of the FB2 file.
latefinal
hashCode int
The hash code for this object.
no setterinherited
images List<FB2Image>
The list of images in the FB2 file.
final
path String
The path of the FB2 file.
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

changeImageTagToImg(String fileContent) String
Replaces all image tags in the given fileContent with corresponding img tags. The fileContent is expected to be a string containing HTML-like content. The image tags are expected to have the format <image ... />. The replacement is done by matching the id attribute of each image tag with the id of an FB2Image object in the images list. If a matching FB2Image object is found, the image tag is replaced with an img tag containing the base64-encoded image bytes. If no matching FB2Image object is found, the image tag is left unchanged. Returns the modified fileContent string.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse() Future<void>
Parses the file content and performs various transformations and parsing operations.
parseBody(String fileContent) → void
Parses the body of the FB2 file from the given fileContent. Throws an exception if the file does not contain a body.
parseDescription(String fileContent) → void
Parses the description from the given fileContent.
parseImages(String fileContent) → void
Parses the images from the given fileContent.
toString() String
A string representation of this object.
inherited

Operators

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