Flutoryx Uploader đ
A battle-tested Flutter plugin for resumable, chunked, background-safe file uploads. Designed for high-performance apps that need to handle large file transfers reliably across Android (WorkManager) and iOS (Background URLSession).
Why Flutoryx Uploader?
Standard upload plugins often fail when the app is killed or the network blinks. Flutoryx Uploader is built as a robust transport engine that treats every file as a series of reliable packets.
Key Features đ
- đĻ Chunked Uploads: Slices large files into 1MB (configurable) packets.
- đ Smart Resumption: If a chunk fails at 99%, only that specific 1MB chunk retries, not the whole file.
- đ Real-time Metrics: Built-in Speed tracking (e.g.,
1.4 MB/s) and ETA estimation (Remaining: 1m 30s). - đĄī¸ Resilience: Automatically reconnects background sessions and resumes tasks after an app kill or device reboot.
- đ Native Feedback: Integrated Android Foreground Service notifications and iOS local completion alerts.
- đž Persistent Queue: State is managed in native storage (SQLite/Room on Android, JSON on iOS).
- đšī¸ Task Management: Full control with Pause, Resume, Cancel, and Delete APIs.
Setup đ ī¸
Android
Add these permissions to your AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
iOS
- In Xcode, enable Background fetch and Background processing in "Signing & Capabilities".
- Add
NSUserNotificationUsageDescriptionto yourInfo.plistfor upload alerts.
Usage đ
1. Initialize & Start Upload
import 'package:flutoryx_uploader/flutoryx_uploader.dart';
final uploader = FlutoryxUploader();
// Single file upload
final taskId = await uploader.uploadFile(
file: File('/path/to/video.mp4'),
endpoint: 'https://api.yoursite.com/upload',
headers: {"Authorization": "Bearer YOUR_TOKEN"},
config: UploadConfig(
chunkSize: 1024 * 1024, // 1MB default
showNotification: true,
),
);
// Multiple files (batch)
final taskIds = await uploader.uploadFiles(...);
2. Listen to Progress (with Speed & ETA)
uploader.progressStream.listen((event) {
print('Speed: ${event.speed} B/s');
print('Remaining: ${event.eta} seconds');
print('Progress: ${event.progress}%');
});
3. State Restoration (On App Startup)
// Fetch all persisted tasks (active, completed, or failed)
final tasks = await uploader.getTasks();
Comparison đ
| Feature | Flutoryx Uploader | standard_uploader |
|---|---|---|
| Chunked Packets | â (Native Slicing) | â (Raw Multi-part) |
| Speed & ETA | â Built-in | â Manual Logic |
| Resume after Kill | â Native DB Sync | â Often Reset |
| Memory Footprint | đ Very Low (1MB/time) | đ High (Buffering) |
License đ
MIT License - Developed with by SPG-9900.