large_file_handler
0.5.2, released 3 months ago by sashadenisov.dev
Copy large assets or download network files to the device local file system.
What it does
Efficiently copies large files from Flutter assets or downloads them from the network directly to the device's local file system. Provides optional progress tracking via streams across multiple platforms.
AI-written summary of version 0.5.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to copy large bundled assets to the local file system for native access.
- You need to download large files from the network with progress tracking.
Skip it when
- You are targeting web platforms where local file system writes are not supported.
- You only need simple key-value storage or a lightweight database.
Strengths
- Supports copying assets and downloading network files with progress tracking.
- Cross-platform support including Android, iOS, macOS, Windows, and Linux.
- Streams data efficiently without buffering entire files in memory on certain platforms.
Weaknesses
- Throws an UnsupportedError on web platforms due to lack of local file system support.
- Requires handling stream errors separately from standard try/catch blocks.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
Register asset files in pubspec.yaml under flutter assets if you plan to copy them locally.
import 'package:large_file_handler/large_file_handler.dart';
Future<void> copyAssetToLocal() async {
const assetName = 'example.json';
const targetPath = 'example.json';
await LargeFileHandler().copyAssetToLocalStorage(assetName: assetName, targetPath: targetPath);
}Alternatives
Packages that do the same job and could replace large_file_handler.
- flutter_downloader
Plugin to create and manage background download tasks on Android and iOS.
80Compare - file_selector_macos
macOS implementation of the file_selector plugin
82Compare - path_provider_android
Android implementation of the path_provider plugin for finding commonly used locations.
79Compare - path_provider_foundation
iOS/macOS implementation of path_provider using direct FFI calls
78Compare
Works with
Packages commonly used together with large_file_handler: ones it builds on, ones built on it, and its own family.
- plugin_platform_interfacelarge_file_handler depends on itReusable base class for platform interfaces of Flutter federated plugins.
- path_providerlarge_file_handler depends on itProvides Flutter APIs to locate common filesystem directories on Android, iOS, macOS, Linux and Windows.
- flutter_edge_aiBuilt on large_file_handlerOn-device AI for Flutter to run Gemma and other LLMs, embeddings, and speech without a server.