ReadingTimeExtension class
A PageExtension that calculates reading time for pages.
Adds a 'readingTime' field to page data with the estimated reading time in minutes. The calculation is based on an average reading speed of 200 words per minute.
- Implemented types
Constructors
- ReadingTimeExtension({int wordsPerMinute = 200})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- wordsPerMinute → int
-
Average words per minute for reading time calculation.
final
Methods
-
apply(
Page page, List< Node> nodes) → Future<List< Node> > -
Applies the extension to the given Page and parsed Nodes.
override
-
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