file_picker_web
4.2.1, released 10 days ago by victorcarreras.dev
Web implementation of file_picker for selecting, streaming, and saving files in browsers.
What it does
Provides a browser file selection dialog, streams file contents in chunks, and supports saving files via the browser's save dialog. It integrates with the generic file_picker API as the web platform implementation.
AI-written summary of version 4.2.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need file picking or saving functionality in a Flutter web app
- You require streaming large files to avoid loading them fully into memory
Skip it when
- Your app targets mobile or desktop only (use the main file_picker package)
- You need advanced file system access beyond what browsers expose
Strengths
- Handles file selection, streaming, and saving on web
- Fixes common edge cases like cancellation and empty files
- Exposes save dialog support detection
Weaknesses
- Only works on web platforms
- Limited to browser capabilities, no native file system access
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 5
import 'package:file_picker/file_picker.dart';
void pickFile() async {
final result = await FilePicker.platform.pickFiles();
if (result != null) {
// Use result.files.first
}
}Alternatives
Packages that do the same job and could replace file_picker_web.
- file_selector_macos
macOS implementation of the file_selector plugin
82Compare - file_selector_windows
Windows implementation of the file_selector plugin
77Compare - file_selector_web
Web implementation of file_selector for selecting files in Flutter web.
76Compare - image_picker_for_web
Web implementation of image_picker that lets users select images or videos via the browser file picker.
79Compare
Works with
Packages commonly used together with file_picker_web: ones it builds on, ones built on it, and its own family.
- webfile_picker_web depends on itLightweight bindings for browser APIs via JS interop
- file_picker_platform_interfacefile_picker_web depends on itCommon platform interface for the file_picker federated plugin.
- cross_filefile_picker_web depends on itAn abstraction to allow working with files across multiple platforms.
- file_magic_numberSame familyDetect file types based on content headers and magic numbers across platforms.
- file_pickerBuilt on file_picker_webUse the native file explorer to pick single or multiple files, directories, and save files.