Skip to content
pubscout

global_configs

1.1.2, released 5 years ago by an unverified publisher

Flutter package to manage app configurations via a singleton pattern.

WASM-ready
$ flutter pub add global_configs
Source repository

What it does

Loads configuration data from a Map or JSON file and stores it in a global singleton. Provides get, set, and unset methods to access nested config values using dot‑separated paths.

AI-written summary of version 1.1.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a simple, centralized place for runtime configuration values.
  • You want to load configs from assets or code without additional tooling.

Skip it when

  • You require reactive updates when config changes.
  • You need secure or encrypted storage for sensitive data.

Strengths

  • Very easy to integrate and use.
  • Supports nested paths for hierarchical configs.
  • Works on all Flutter platforms out of the box.

Weaknesses

  • No built‑in change notification mechanism.
  • Manual type casting required for custom types.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1
import 'package:global_configs/global_configs.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  GlobalConfigs().loadFromMap({
    'appearance': {'defaultTheme': 'Dark'}
  });
  var theme = GlobalConfigs().get<String>('appearance.defaultTheme');
  print(theme); // Dark
}

Alternatives

Packages that do the same job and could replace global_configs.

  • yaml

    Provides a lightweight way to load and parse configuration files without a singleton wrapper.