패키지, 저장소 및 앱 카테고리 검색

패키지 상세v4.2.0

file_picker_platform_interface

file_picker 플러그인을 위한 공통 플랫폼 인터페이스로, 다양한 플랫폼 간의 공유 API 표면 및 데이터 계약을 정의합니다.

AndroidiOSLinuxmacOSWebWindows
30일 다운로드
120만
좋아요
4
Pub 점수
150

패키지 설치

flutter pub add file_picker_platform_interface

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

file_picker_platform_interface 패키지는 여러 플랫폼에서 file_picker 플러그인을 위한 공유 API 표면과 데이터 계약을 제공합니다. 이는 Android, iOS, Linux, macOS, Web 및 Windows에서 일관된 파일 선택 기능을 가능하게 하는 공통 기반 역할을 합니다. 플랫폼에 의존하지 않는 인터페이스를 정의함으로써 크로스플랫폼 개발을 단순화하고, 하위 운영 체제에 관계없이 동일한 동작을 보장합니다. 이 패키지는 신뢰할 수 있는 파일 선택 기능이 필요한 플러그인 또는 앱을 개발하는 개발자에게 필수적입니다.

사용 사례

  • 크로스 플랫폼 파일 선택
  • 파일 선택 플러그인 개발
  • 통합 파일 선택기 API
  • 다중 플랫폼 앱 통합
  • 공유 데이터 계약 구현
  • 다중 플랫폼 간 일관성 유지

주요 기능

  • 플랫폼에 관계없는 API 설계
  • 공유 데이터 계약
  • 여섯 가지 주요 플랫폼 지원
  • 플러그인 확장성 활성화
  • 표준화된 파일 메타데이터 처리
  • 코드 재사용을 촉진합니다

적합한 대상

  • 파일 선택기 플러그인을 개발하는 개발자
  • 크로스플랫폼 플러터 애플리케이션
  • 일관된 파일 작업이 필요한 팀
  • 다중 플랫폼 패키지의 유지보수자
  • 앱에 파일 선택 기능을 통합하는 개발자

고려 사항

  • 각 플랫폼에 보완적인 구현이 필요합니다
  • 최종 사용자 앱에서 직접 사용하기 위한 것이 아님
  • 플랫폼별 플러그인에 의존합니다
  • 각 플랫폼별로 추가 구성이 필요할 수 있습니다
  • API 정의에 국한되며 기능성은 포함되지 않음
  • 더 큰 플러그인 생태계 내에서 가장 잘 사용됨

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

File Picker

pub package CI pipeline status GitHub issues License Awesome Flutter

File Picker

A Flutter plugin that lets you use the native file explorer to pick single or multiple files, with extension filtering, directory selection, and save-file dialogs, across Android, iOS, Linux, macOS, Windows, and Web.

This repository is a Melos workspace hosting file_picker as a federated plugin: a single cross-platform API package on top of one implementation package per platform, all versioned and published independently.

Packages

Package Pub Description
file_picker pub The main package. Add this to your app, it pulls in the right platform implementation automatically.
file_picker_platform_interface pub The shared interface and data contracts (PlatformFile, FileType, platform option classes) every implementation builds on.
file_picker_darwin pub iOS and macOS implementation.
android_file_picker pub Android implementation, including Storage Access Framework (SAF) support.
file_picker_linux pub Linux implementation, using GTK3 and XDG Desktop Portals.
windows_file_picker pub Windows implementation, using the Win32 COM APIs.
file_picker_web pub Web implementation, including Wasm compilation support.

Almost all apps should only ever depend on file_picker directly. The platform packages are pulled in transitively and registered automatically by Flutter's plugin system; you only reach for one of them directly if you need a platform-specific API that isn't exposed on the shared facade (for example FilePickerDarwin.skipEntitlementsChecks() on macOS).

Quick start

dependencies:
  file_picker: ^13.0.0
import 'package:file_picker/file_picker.dart';

final file = await FilePicker.pickFile();

if (file != null) {
  print(file.name);
  print(await file.length()); // Returns Future<int?> (or use file.lengthSync())
}

See packages/file_picker/README.md for the full feature list, platform compatibility chart, and more usage examples (multiple files, extension filters, directory picking, save-file dialogs).

Migration

  • Upgrading to v13? See the Migrating to v13 Guide for details on PlatformFile.length() returning Future<int?> and the removal of legacy v12-deprecated parameters.
  • Upgrading from pre-v12? See the Migrating to v12 Guide for the federated architecture changes (FilePicker.pickFiles() returning List<PlatformFile>, platform options, and streaming).

Documentation

Contributing

Contributions are welcome. Please read CONTRIBUTING.md before opening a pull request, it covers testing requirements, versioning, and changelog conventions for this workspace.

To work on this repository locally:

dart pub global activate melos
melos bootstrap
melos run analyze   # flutter analyze across every package
melos run test       # flutter test across every package

Each package keeps its own pubspec.yaml and CHANGELOG.md and is released independently, only the package(s) you actually changed need a version bump.

Credits

file_picker was created and maintained by Miguel Ruivo, starting in 2018, growing it from a single Android/iOS plugin into the federated, cross-platform package it is today. This repository continues that work under new ownership, built entirely on the foundation of his years of effort.

Thank you, Miguel.

License

MIT, see LICENSE. Every package in this repository is released under the same license.

카테고리

의존성

의존성 목록 3 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.

순위