Locations class

One or more alternative expressions of the location. https://github.com/readium/architecture/tree/master/models/locators#the-location-object https://github.com/readium/architecture/blob/master/models/locators/extensions/html.md

@param fragments Contains one or more fragment in the resource referenced by the Locator. @param progression Progression in the resource expressed as a percentage (between 0 and 1). @param position An index in the publication (>= 1). @param totalProgression Progression in the publication expressed as a percentage (between 0 and 1). @param otherLocations Additional locations for extensions.

Inheritance
Implemented types
Available extensions
Annotations

Constructors

Locations({int? position, double? progression, double? totalProgression, String? cssSelector, List<String> fragments = const [], DomRange? domRange, String? partialCfi, Map<String, dynamic> additionalProperties = const {}})
const
Locations.fromJson(Map<String, dynamic>? json)
factory

Properties

additionalProperties → Map<String, dynamic>
finalinherited
cssSelector → String?
A CSS Selector - for HTML documents.
final
domRange → DomRange?
See full description in the next separate section - for HTML documents.
final
domRange → DomRange?

Available on Locations, provided by the HTMLLocationsExtension extension

An HTML DOM range.
no setter
durationFragment → int?

Available on Locations, provided by the LocationExtension extension

no setter
fragments → List<String>
Contains one or more fragment in the resource referenced by the Locator Object.
final
hashCode → int
The hash code for this object.
no setterinherited
page → int?

Available on Locations, provided by the LocationExtension extension

no setter
partialCfi → String?
See full description below - for HTML documents.
final
partialCfi → String?

Available on Locations, provided by the HTMLLocationsExtension extension

partialCfi is an expression conforming to the "right-hand" side of the EPUB CFI syntax, that is to say: without the EPUB-specific OPF spine item reference that precedes the first ! exclamation mark (which denotes the "step indirection" into a publication document). Note that the wrapping epubcfi(***) syntax is not used for the partialCfi string, i.e. the "fragment" part of the CFI grammar is ignored.
no setter
physicalPage → String?

Available on Locations, provided by the LocationExtension extension

no setter
position → int?
An index in the publication - Integer where the value is > 0.
final
progression → double?
Progression in the resource expressed as a percentage - Float between 0 and 1.
final
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
timeFragment → TimeFragment?

Available on Locations, provided by the LocationExtension extension

no setter
timestamp → double
no setter
tocFragment → String?

Available on Locations, provided by the LocationExtension extension

no setter
tocHref → String?

Available on Locations, provided by the LocationExtension extension

no setter
totalPages → int?

Available on Locations, provided by the LocationExtension extension

no setter
totalProgression → double?
Progression in the publication expressed as a percentage - Float between 0 and 1.
final

Methods

copyAdditionalProperties({Object? additionalProperties = unset}) → Map<String, dynamic>
Returns a new Map<String, dynamic> with the merged additional properties.
inherited
copyWith({Object? position = unset, Object? progression = unset, Object? totalProgression = unset, Object fragments = unset, Object? additionalProperties = unset, Object? cssSelector = unset, Object? domRange = unset, Object? partialCfi = unset}) → Locations
copyWithFragmentDuration(num? duration) → Locations

Available on Locations, provided by the LocationExtension extension

Duration must be in seconds. Passing null will remove the existing duration from fragment.
copyWithPage(int? index) → Locations

Available on Locations, provided by the LocationExtension extension

copyWithPhysicalPageNumber(String? index) → Locations

Available on Locations, provided by the LocationExtension extension

copyWithTimeFragment(TimeFragment? fragment) → Locations

Available on Locations, provided by the LocationExtension extension

getAdditionalDateTime(String key) → DateTime?
Helper to get a DateTime from an additional property value.
inherited
getAdditionalEnum<T extends Enum>(String key, List<T> enumValues) → T?
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
safeGetAdditionalValue<T>(String key) → T?
Safely get an additional property value of type T.
inherited
toJson() → Map<String, dynamic>
Serializes the object to its JSON representation.
override
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited
operator [](String key) → dynamic
Syntactic sugar to access the additionalProperties values by subscripting directly. obj["layout"] == obj.additionalProperties["layout"]
inherited