Overview
There_ucm_core library is the foundation of the ReUCM project, providing essential data models, interfaces, and utilities that are shared across all other packages. This library contains no platform-specific dependencies and can be used in any Dart environment.
Version: 1.8.0
Repository: https://github.com/BooksFine/re_ucm_core
Exports
The library exports the following modules:models/book.dart- Book-related data modelsmodels/portal.dart- Portal interfaces and definitionsmodels/progress.dart- Download progress trackinglogger.dart- Logging utilities
Core models
Book
TheBook class represents a book from any portal with all its metadata.
id- Unique identifier within the portalurl- Full URL to the book on the portalportal- Reference to the portal this book belongs tochapters- List of book chapters (populated during download)series- Optional series information if the book is part of a series
Author
Represents a book author with name and optional profile URL.Chapter
Represents a single chapter of a book with title and HTML content.Genre
Represents a book genre. Defined as part of the book model library.Series
Represents a book series with name and book number within the series.Portal system
Portal interface
ThePortal interface defines how book portals are implemented. Each portal must provide information about itself and a service for fetching books.
url- Base URL of the portal (e.g., “https://author.today”)name- Display name of the portalcode- Unique identifier code for the portallogo- Portal logo asset informationservice- Service implementation for fetching book data
PortalService interface
Defines the contract for portal service implementations.getBookFromId()- Fetch book metadata from portalgetTextFromId()- Fetch all chapter content for a bookisAuthorized()- Check if the current settings include valid authenticationbuildSettingsSchema()- Build UI schema for portal configuration
PortalSettings
Base class for portal-specific settings.Portal setting items
The library provides several setting item types for building portal configuration UIs:PortalSettingStateSwitcher- Conditional settings based on statePortalSettingGroup- Group multiple settings togetherPortalSettingSectionTitle- Section headerPortalSettingActionButton- Clickable action buttonPortalSettingTextField- Text input fieldPortalSettingWebAuthButton- Web-based authentication flow
Progress tracking
TheProgress class tracks download and conversion progress.