Locations class

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

@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.

Available extensions

Constructors

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

Properties

cssSelector String?

Available on Locations, provided by the LocationsExtension extension

A CSS Selector.
no setter
domRange DomRange?

Available on Locations, provided by the LocationsExtension extension

An HTML DOM range.
no setter
fragments List<String>
final
hashCode int
The hash code for this object.
no setterinherited
json String
no setter
otherLocations Map<String, dynamic>
final
partialCfi String?

Available on Locations, provided by the LocationsExtension 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
position int?
final
progression double?
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
timestamp int
no setter
totalProgression double?
final

Methods

copy({int? position = _emptyIntValue, double? progression = _emptyDoubleValue, double? totalProgression = _emptyDoubleValue, List<String>? fragments, Map<String, dynamic>? otherLocations}) Locations
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
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 otherLocations values by subscripting Locations directly. locations["cssSelector"] == locations.otherLocations["cssSelector"]