zone_local 0.1.2 copy "zone_local: ^0.1.2" to clipboard
zone_local: ^0.1.2 copied to clipboard

discontinued

A simple package for defining zone-scoped values. Typically used for configuration objects.

example/zone_local.dart

import 'package:zone_local/zone_local.dart';

final ZoneLocal<String> greeting = ZoneLocal<String>(defaultValue: 'Hello!');

void main() {
  print(greeting.value);

  // Run a function in a forked zone that sees value "Hi!"
  greeting.forkZoneWithValue('Hi!').run(() {
    print(greeting.value);
  });
}
0
likes
30
pub points
7%
popularity

Publisher

unverified uploader

A simple package for defining zone-scoped values. Typically used for configuration objects.

Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

More

Packages that depend on zone_local