scoped_deps

Last updated:

0 purchases

scoped_deps Image
scoped_deps Images
Add to Cart

Description:

scoped deps

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
}
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.