PublicationFormat class

Format of the Publication file.

Annotations

Constructors

PublicationFormat(PublicationFormatEnum value)
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
props → List<Object>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stringify → bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
value → PublicationFormatEnum
Underlying enum value for Format. To be used with switch to make sure the cases match all values.
final

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

fromMIMEType(String mimetype, {String? fileExtension}) → PublicationFormat?
Finds the PublicationFormat for the given mimetype, or fallback on a fileExtension.
fromMIMETypes(List<String> mimetypes, {String? fileExtension}) → PublicationFormat?
Finds the PublicationFormat from a list of possible mimetypes or fallback on a fileExtension.
fromPath(String path, {required String mimetype}) → PublicationFormat?
Finds the PublicationFormat of the file at the given path, using an optionally provided mimetype.

Constants

epub → const PublicationFormat
pdf → const PublicationFormat
video → const PublicationFormat