FLUTTER ECOSYSTEM

xdg_directories

A Dart package for reading XDG directory configuration information on Linux.

Latest version
1.1.0
30-day downloads
7.8M
Likes
43
Pub points
160

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Overview

The xdg_directories package provides a simple way to access XDG (X Desktop Group) directory configuration values on Linux systems. It enables Dart applications to locate standard directories like $HOME/.config, $HOME/.local/share, and $HOME/.cache according to the XDG Base Directory Specification. This ensures consistent file organization across Linux desktop environments. The package is particularly useful for desktop apps that need to store user data, configuration files, or caches in appropriate system locations. It abstracts platform-specific logic, making it easier to write portable Linux desktop applications with proper file path handling.

Use cases
  • Reading user configuration directories
  • Storing application cache files
  • Managing persistent app data
  • Ensuring compliance with Linux desktop standards
  • Building cross-desktop Linux applications
Key features
  • Accesses XDG base directories
  • Follows XDG Base Directory Specification
  • Platform-specific path resolution
  • Simple API for common directory queries
  • No external dependencies
Suitable for
  • Linux desktop applications
  • CLI tools targeting Linux
  • Dart apps needing standardized file paths
  • Developers following Linux desktop conventions
  • Apps requiring portable data storage
Considerations
  • Limited to Linux platforms
  • Does not support Windows or macOS
  • Relies on environment variables being set correctly
  • Not applicable for non-Linux environments
  • Requires understanding of XDG directory structure
Supported platformsLinux

Install package

flutter pub add xdg_directories

Categories

Dependencies

Dependency list 2 items

Source repository

Related projects