shitman/lib/settings/settings.dart
zeyus bc128cef3d
Some checks are pending
/ build-web (push) Waiting to run
just a concept.
2025-07-21 22:52:31 +02:00

45 lines
1.3 KiB
Dart

/// =============================================================================
/// MODULAR SETTINGS FRAMEWORK
/// =============================================================================
///
/// A comprehensive, type-safe settings management framework for Flutter/Dart
/// applications.
///
/// Usage Example:
/// ```dart
/// // Define your settings
/// final gameSettings = SettingsBase(
/// key: 'game',
/// items: SettingsGroup(items: [
/// BoolSetting(key: 'soundEnabled', defaultValue: true),
/// DoubleSetting(
/// key: 'volume',
/// defaultValue: 0.8,
/// validator: (v) => v >= 0.0 && v <= 1.0,
/// ),
/// ]),
/// );
///
/// // Register and initialize
/// Settings.register(gameSettings);
/// await Settings.init();
///
/// // Use settings
/// bool sound = Settings.getBool('game.soundEnabled');
/// await Settings.setBool('game.soundEnabled', false);
///
/// // Listen for changes
/// gameSettings.items['soundEnabled']!.stream.listen((value) {
/// print('Sound enabled changed to: $value');
/// });
/// ```
///
/// =============================================================================
library;
export 'settings_manager.dart';
export 'exceptions.dart';
export 'setting.dart';
export 'settings_group.dart';
export 'settings_store.dart';
export 'game.dart';