Files
shorebird/packages/scoped_deps
dependabot[bot] 12ade01071 chore(deps): bump the dart-deps group across 1 directory with 4 updates (#3815)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eric Seidel <eric@shorebird.dev>
2026-06-23 22:03:28 +00:00
..

Scoped Deps

A simple dependency injection library built on Zones.

Quick Start

import 'package:scoped_deps/scoped_deps.dart';

final value = create(() => 42);

void main() {
  runScoped(scopeA, values: {value});
}

void scopeA() {
  print(read(value)); // 42
  runScoped(scopeB, values: {value.overrideWith(() => 0)});
}

void scopeB() {
  print(read(value)); // 0
}