lumi_h5p 1.1.0
lumi_h5p: ^1.1.0 copied to clipboard
A Flutter plugin to view and serve H5P content locally using a static server and InAppWebView.
📜 Changelog #
All notable changes to this project will be documented in this file.
1.1.0 - 2025-11-18 #
🚀 Added #
-
Offline support for H5P content:
- H5P files are now downloaded, extracted, and cached locally.
- Files can be loaded from local storage if already downloaded, reducing repeated downloads.
- Added optional
refNameparameter inloadH5Pto load content using a reference name instead of URL.
-
Download & extraction progress indicators:
- Live download progress using
ValueListenableBuilder<double>linked to_h5pcontroller.downloadProgress. - Live extraction progress using
_h5pcontroller.extractProgress. - Visual feedback in UI with
LinearProgressIndicator.
- Live download progress using
-
Request management improvements:
- Ability to add multiple H5P requests at once via
addRequestList. - Select and remove individual requests or clear all requests from the controller.
H5PLoadStatusenum now includesdownloading,extracting,downloaded,failedfor detailed status handling.
- Ability to add multiple H5P requests at once via
-
Horizontal scrollable H5P buttons:
- Users can select content for immediate load or load without a ref name.
- Enhanced UI with better spacing, border, and rounded corners for request buttons.
-
Event listener for H5P xAPI events:
- Hook added to log xAPI events emitted by the H5P content via
onXApiEvent.
- Hook added to log xAPI events emitted by the H5P content via
🧩 Improved #
-
Optimized request and selection handling:
Set<H5PRequestModel>used for selection to avoid duplicates.- Added checkbox selection for batch removal.
-
UI improvements:
- Requests list with live status icons (
Icons.check_circle,Icons.downloading,Icons.error, etc.). - Cleaner layout with
SingleChildScrollViewfor horizontal H5P selection buttons. - Better separation between loader, webview, and request list sections.
- Requests list with live status icons (
-
Controller optimizations:
_h5pcontrollernow handles all lifecycle events: download, extract, serve, and load.- Added safe null handling and progress fallback for extraction (
progress > 0 ? progress : null).
🧰 Internal #
- Refactored old single-download method to full H5P lifecycle management.
H5PRequestModelnow supportspriorityfor download order.- Updated example app (
TestView) to reflect full functionality with offline and online H5P loading. - Debug and error logging flags (
h5pDebug,h5pError) added for better development experience.
✅ Summary:
The key improvement here is offline support with caching, multi-request management, live download/extraction progress, and improved UI. The old version only had a single method to download H5P files without offline reuse or progress tracking.