settings_yaml
8.3.2, released 3 weeks ago by onepub.dev
Read and write application settings to a YAML file using simple Dart maps and lists.
What it does
The package loads a YAML file into a mutable map, lets you modify values via map syntax or typed selectors, and saves the updated configuration back to disk. It validates types, limits recursion, and provides secure, staged file writes on all major desktop platforms.
AI-written summary of version 8.3.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a lightweight, file‑based configuration store without a full database.
- You want YAML format for human‑readable settings and prefer direct map access over code‑generated models.
Skip it when
- You require encrypted or secure storage beyond file permissions.
- You need reactive state management that automatically notifies UI on changes.
Strengths
- Simple API that mirrors Dart collections.
- Cross‑platform safe save adapters with ACL handling.
- Built‑in validation, cycle detection and resource limits.
Weaknesses
- No built‑in encryption or secure vault features.
- Does not provide change notifications or reactive streams.
- Limited to YAML files; not suitable for large or relational data.
Setup
- Kind
- FFI (native library)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 6
import 'package:settings_yaml/settings_yaml.dart';
Future<void> main() async {
final settings = SettingsYaml.load(pathToSettings: '.settings.yaml');
settings['name'] = 'billing';
settings['timeout'] = 200;
await settings.save();
final reloaded = SettingsYaml.load(pathToSettings: '.settings.yaml');
print(reloaded.asInt('timeout'));
}Alternatives
Packages that do the same job and could replace settings_yaml.
- drift_db_viewer
View and filter your drift database directly inside your Flutter application.
50Compare
Works with
Packages commonly used together with settings_yaml: ones it builds on, ones built on it, and its own family.
- yamlsettings_yaml depends on itA Dart library for parsing YAML documents into Dart data structures.
- uuidsettings_yaml depends on itGenerates and parses RFC‑4122/9562 UUIDs (v1‑v8) for Dart.
- ffisettings_yaml depends on itUtilities for working with Foreign Function Interface (FFI) code in Dart.
- dcliBuilt on settings_yamlA Dart SDK for building cross‑platform command line applications and scripts.
- onepubBuilt on settings_yamlCommand line tools for the OnePub private Dart and Flutter package repository.
- pub_releaseBuilt on settings_yamlAutomates publishing Dart packages to pub.dev, handling version bump, git tags, changelog, and optional dry-run.
- dswitchBuilt on settings_yamlCLI tool to rapidly switch between channels and versions of standalone Dart.