flureadium_platform_interface 0.10.1
flureadium_platform_interface: ^0.10.1 copied to clipboard
Platform interface for Flureadium, providing shared models, exceptions, and the abstract FlureadiumPlatform class for EPUB, PDF, and audiobook reading.
0.10.1 #
Bug Fixes #
- Packaged manifests no longer gain a leading slash on their hrefs:
Publication.fromJsonresolved reading-order hrefs against the manifest'sselflink. For a packaged publication that link is relative (manifest.json), its derived base is the empty string, andHreftreats an empty base as/— so every href came back as/01_track.mp3while theLocatorstream kept emitting01_track.mp3. On Android that made a publication href impossible to compare with a locator href, breaking the guaranteeflureadium'sdocs/api-reference/publication.mdgives. It showed up only on Android because readium-kotlin keeps a packaged manifest'sselflink while readium-swift strips it, so iOS was already taking the verbatim path. Hrefs are now resolved against the manifest's location only when that location is one — an absolute or root-relativeselflink — and left verbatim otherwise. A remote manifest still resolves against its directory. The no-self-link case is unchanged and now shares the same rule rather than sitting in its own branch. linksis no longer always empty: looking up theselflink consumed the manifest'slinksarray, and the later parse re-read a key that was already gone, sopublication.linkscame back empty for every caller that did not passpackaged: true, which is every caller outside the tests. The array is read once and used for both.
Documentation #
- Voice query contract:
ttsGetAvailableVoices()now documents that it does not throw merely because TTS is disabled. Android and iOS return an empty list; Web queries the browser's speech synthesis directly and may return voices either way. To populate a voice picker before enabling TTS, usettsGetSystemVoices().
Testing #
Publication.fromJsonhref resolution is covered per branch: a relativeselflink keeps reading-order, resource and toc hrefs verbatim; a root-relativeselflink still resolves; the declaredlinkssurvive the self-link lookup; and aLocatorbuilt from a reading-orderLinkcarries that link's href unchanged. The last one is a consistency check rather than a guard against this bug — it passed before the fix too, because both sides carried the slash. What the Android audiobook integration tests compare is a publication href against a locator the native side emitted, and only they cover that.- The method-channel decode path surfaces an empty native voice response as an empty list, never a throw and never null.
0.10.0 #
New Features #
- Car content refresh: Add
FlureadiumPlatform.refreshCarContent()(with a throwing default) and its method-channel implementation, so the host can tell a connected CarPlay / Android Auto surface that the browsable library changed and it should re-query.
Testing #
- Default-throws and method-channel invocation tests for
refreshCarContent().
0.9.0 #
New Features #
- Car content contract: Add the car-integration types the flureadium plugin's CarPlay and Android Auto renderers consume:
CarContentProvider(the host-implementedrootTabs/children/search/play/nowPlayingChapters/addBookmark/cycleSpeedcontract),CarBrowseNodewithCarNodeKind,CarTab,CarContentStrings, and theCarContentTransportmethod-channel router.FlureadiumPlatformgainsregisterCarContentProvider/unregisterCarContentProvider. All exported from the package barrel.
Testing #
- Unit tests for the car value types (
CarBrowseNode/CarTab/CarContentStringsvalidation + JSON round-trips), theCarContentProvidercontract, andCarContentTransportmethod-channel routing.
0.8.0 #
Changed #
- Validated against Flutter 3.44.7 (Dart 3.12.2). No code changes; the public API is identical to 0.7.1. Bumped so it releases alongside the flureadium package's Flutter 3.44 update.
0.7.1 #
Bug Fixes #
- Relative href normalisation:
Publication.fromJsonno longer adds a leading slash to relative hrefs when a manifest is unpackaged and has noselflink. A bare href like001.jpgused to come back as/001.jpg, whileLocator.fromJsonleft it untouched — sopub.readingOrder.first.hrefand theLocatorstream disagreed about the same resource, and any caller passing an href between the two and a native API hit a format mismatch. Such hrefs now keep the form the native Readium parser produced. Packaged manifests, and manifests with aselflink, behave as before.
Testing #
- Cover all three
Publication.fromJsonbase-URL branches: no self link and not packaged (hrefs verbatim), self link present (resolved against the self URL), and packaged (leading slash kept).
0.7.0 #
New Features #
- Add
extractPageThumbnail(href, maxHeight, quality)toFlureadiumPlatformandMethodChannelFlureadium. - The method-channel implementation sends
extractPageThumbnailwith[href, maxHeight, quality]and returns nullableUint8ListJPEG bytes.
Bug Fixes #
- Locator href encoding:
Locator.fromJsonnow decodes percent-encoded hrefs so the internal representation is always in decoded form.Locator.toJsonencodes hrefs for safe transport to native platforms. FixesPlatformException(InvalidArgument, Failed to parse locator)on iOS when navigating CBZ files with special characters (spaces, brackets) in filenames.
Testing #
- Add method-channel integration tests for thumbnail argument forwarding, nullable byte results, and native exception propagation.
- Add 8 unit tests for href encoding: fromJson decoding, toJson encoding, roundtrip idempotency, and edge cases (spaces-only, brackets-only, mixed special characters).
0.6.0 #
New Features #
- Add
ttsCanSpeak()toFlureadiumPlatformandMethodChannelFlureadium— checks whether the device TTS engine can speak for the current publication's language. - Add
ttsRequestInstallVoice()— opens the platform voice-data installer when the required language pack is missing. - Add
TtsErrorTypeenum toReadiumTimebasedState— surfaces structured TTS errors (languageMissingData,languageNotSupported,synthesisError,networkError). - Add
ttsGetSystemVoices()— returns all system-level TTS voices, independent of publication language. - Add optional
fromLocatorparameter tottsEnable()— allows restoring TTS playback position after re-enabling.
Testing #
- Add regression test for
ttsSetPreferenceswith nullvoiceIdentifierin method channel integration tests.
0.5.0 #
Breaking Changes #
- EPUBPreferences: Remove navigation config fields
enableEdgeTapNavigation,enableSwipeNavigation,edgeTapAreaPoints. UsesetNavigationConfig(ReaderNavigationConfig)instead. - PDFPreferences: Remove navigation config fields
enableEdgeTapNavigation,enableSwipeNavigation,edgeTapAreaPoints,disableDoubleTapZoom,disableTextSelection,disableDragGestures,disableDoubleTapTextSelection. UsesetNavigationConfig(ReaderNavigationConfig)instead.
New Features #
- Add
ReaderNavigationConfig— dedicated type for app-developer navigation UX settings (edge tap, swipe, gesture disabling). These are separate from Readium user reading preferences. - Add
setNavigationConfig(ReaderNavigationConfig)toFlureadiumPlatform,MethodChannelFlureadium,ReadiumReaderWidgetInterface,_ReadiumReaderWidgetState, andReadiumReaderChannel.
0.4.0 #
Breaking Changes #
- PDFPreferences: Rename
disableTextSelectionMenutodisableDoubleTapTextSelection. The old name was misleading — this preference removesUITextNonEditableInteractionfromPDFTextInputView, preventing double-tap word selection entirely. Long-press text selection and the Look Up/Translate/ Search Web menu remain fully functional.
0.3.1 #
- Add
edgeTapAreaPointstoEPUBPreferences— configures the edge tap zone width in absolute points (44–120pt). iOS only. Defaults to 44pt (iOS HIG minimum tap target) when null. - Add
edgeTapAreaPointstoPDFPreferences— same control for the PDF reader.
0.3.0 #
- Add
renderFirstPagemethod toFlureadiumPlatformandMethodChannelFlureadium— renders the first page of a PDF as a JPEG image for cover generation.
0.2.0 #
- Add
enableEdgeTapNavigationandenableSwipeNavigationtoPDFPreferences— allows independently controlling edge tap and swipe page navigation on iOS. - Add
enableEdgeTapNavigationandenableSwipeNavigationtoEPUBPreferences— same controls for EPUB reader on iOS.
0.1.0 #
- Initial public release of the Flureadium platform interface.
- Abstract
FlureadiumPlatformclass with full API for EPUB, PDF, and audiobook reading. - Method channel implementation (
MethodChannelFlureadium). - Readium shared models:
Publication,Locator,Metadata,Link,MediaType, and more. - Reader preference models:
EPUBPreferences,PDFPreferences,TTSPreferences,AudioPreferences. - Reader decoration API for highlights and annotations.
- TTS voice model and platform-specific voice name mappings.
- Exception types for structured error handling.
- OPDS feed and publication models.
- Extension utilities for colors, durations, locators, and strings.