Bookmark class

Represents a bookmark in an EPUB book.

Bookmarks can be serialized to JSON for persistent storage.

Constructors

Bookmark({required int pageIndex, required double progress, String? title, String? excerpt, required DateTime createdAt})
const
Bookmark.fromJson(Map<String, dynamic> json)
Creates a Bookmark from a JSON map.
factory

Properties

createdAt DateTime
When this bookmark was created.
final
excerpt String?
Optional excerpt of text at the bookmark location.
final
hashCode int
The hash code for this object.
no setteroverride
pageIndex int
The page index where the bookmark is located (0-based).
final
progress double
The reading progress at bookmark location (0.0 to 1.0).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String?
Optional title or label for the bookmark.
final

Methods

copyWith({int? pageIndex, double? progress, Object? title = _sentinel, Object? excerpt = _sentinel, DateTime? createdAt}) Bookmark
Creates a copy of this bookmark with the given fields replaced. Pass explicit null to clear nullable fields (title, excerpt).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this Bookmark to a JSON map.
toString() String
A string representation of this object.
override

Operators

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