搜索插件、代码仓与 APP 分类

插件详情v2.1.6

path_provider

Flutter 插件,用于获取主机平台文件系统中常用的目录位置,例如临时目录和应用数据目录。

AndroidiOSmacOSWindowsLinux
近 30 天下载
1070万
喜欢数
5570
Pub 分数
160

安装插件

flutter pub add path_provider

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

path_provider 包是一个 Flutter 插件,可在各种平台上提供对常见文件系统目录的访问,包括临时目录和应用程序特定的数据目录。它通过将平台特定的路径抽象为一致且易于使用的 API,简化了跨平台文件管理。这使得开发者能够可靠地在每个操作系统的适当位置存储和检索文件,例如应用缓存、文档或持久化存储。对于任何需要安全高效地管理本地文件操作的 Flutter 应用来说,该包都是必不可少的。

适合场景

  • 存储应用缓存文件
  • 保存用户生成的内容
  • 管理临时文件
  • 持久化应用数据
  • 读取/写入配置文件

主要特点

  • 跨平台目录访问
  • 平台无关的 API
  • 对临时和应用数据目录的支持
  • 与文件系统操作的轻松集成
  • 跨平台可靠的路径解析

适合对象

  • 需要本地文件存储的应用程序
  • 数据持久化实现
  • 缓存策略
  • 基于文件的配置管理
  • 跨平台开发团队

使用建议

  • 某些平台需要正确的权限处理
  • 不直接处理文件 I/O(需与 dart:io 配合使用)
  • 限于预定义路径
  • 无内置加密或安全功能
  • 依赖于文件系统权限的正确使用

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Flutter Packages

Release Status Flutter CI Status

This repo is a companion repo to the main flutter repo. It contains the source code for Flutter's first-party packages (i.e., packages developed by the core Flutter team). Check the packages directory to see all packages.

These packages are also available on pub.

Issues

Please file any issues, bugs, or feature requests in the main flutter repo. Issues pertaining to this repository are labeled "package".

Contributing

If you wish to contribute a new package to the Flutter ecosystem, please see the documentation for developing packages. You can store your package source code in any GitHub repository (the present repo is only intended for packages developed by the core Flutter team). Once your package is ready you can publish to the pub repository.

If you wish to contribute a change to any of the existing packages in this repo, please review our contribution guide, and send a pull request.

Packages

These are the packages hosted in this repository:

Package Pub Points Usage Issues Pull requests
animations pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
camera pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
cross_file pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
cupertino_icons pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
cupertino_ui pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
espresso pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
extension_google_sign_in_as_googleapis_auth pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
file_selector pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
flutter_lints pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
flutter_plugin_android_lifecycle pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
flutter_svg pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
flutter_svg_test pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
go_router pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
go_router_builder pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
google_adsense pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
google_fonts pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
google_maps_flutter pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
google_sign_in pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
image_picker pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
interactive_media_ads pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
in_app_purchase pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
local_auth pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
material_ui pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
metrics_center pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
path_parsing pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
path_provider pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
pigeon pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
pointer_interceptor pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
plugin_platform_interface pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
quick_actions pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
google_identity_services_web pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
rfw pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
shared_preferences pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
two_dimensional_scrollables pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
url_launcher pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
vector_graphics pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
vector_graphics_codec pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
vector_graphics_compiler pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
video_player pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
web_benchmarks pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
webview_flutter pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
xdg_directories pub package pub points downloads GitHub issues by-label GitHub pull requests by-label

所属分类

依赖

依赖清单 5 项

  • path_provider_android^2.2.5
  • path_provider_foundation^2.3.2
  • path_provider_linux^2.2.0
  • path_provider_platform_interface^2.1.0
  • path_provider_windows^2.2.0

源码仓库

使用此插件的项目

所在榜单