Skip to content
pubscout

file_selector_web

0.9.5, released 6 months ago by flutter.dev

Web implementation of file_selector for selecting files in Flutter web.

WASM-ready
$ flutter pub add file_selector_web
Source repository

What it does

Provides file selection APIs for Flutter web, including openFile, openFiles, getSaveLocation, and mimeType support. It is automatically included when using file_selector and requires no extra pubspec entry.

AI-written summary of version 0.9.5, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Selecting files in a Flutter web app
  • Need to support cancel event or mimeType on XFile
  • Using file_selector as a dependency and want web support automatically

Skip it when

  • Using on non-web platforms
  • Relying on cancel event in very old browsers

Strengths

  • Automatically included via endorsement
  • Supports mimeType on XFile
  • Handles cancel event for modern browsers
  • No extra setup needed

Weaknesses

  • Only works on web
  • Cancel event support limited to recent browsers

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
2
import 'package:file_selector/file_selector.dart';

Future<void> pickFile() async {
  final XFile? file = await openFile();
  if (file != null) {
    print('Selected: ${file.path}');
  }
}

Alternatives

Packages that do the same job and could replace file_selector_web.

Works with

Packages commonly used together with file_selector_web: ones it builds on, ones built on it, and its own family.