Viewing version 0.1.1. Open the latest package page.
zone_local
0.1.1Type-safe zone-scoped variables.
This package is discontinued upstream.
Readme
Introduction
What's a zone? See explanation of zones at dartlang.org.
If you are declaring a static variable, this package gives you:
- Type-safe zone-scoped mutability
- Helpful methods for forking zones
Getting Started
dependencies:
zone_local: ^0.1.1
import 'package:zone_local/zone_local.dart';
final ZoneLocal<String> greeting = new 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);
});
}
Changelog
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'zone_local:0.1.1'pubspec.yaml
name: zone_local
version: 0.1.1
description: Type-safe zone-scoped variables.
author: terrier989 <terrier989@gmail.com>
homepage: https://github.com/terrier989/dart-zone_local
environment:
sdk: '>=2.0.0 <3.0.0'
dev_dependencies:
meta: '^1.1.0'
pedantic: '^1.7.0'
test: '^1.6.0'Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.1.0 | Cached · Upstream SHA-256 matched | Download | d2ab5fea…6db82e |
| 0.1.1 | Cached · Upstream SHA-256 matched | Download | e4f1f380…e4c7e2 |
| 0.1.2 | Cached · Upstream SHA-256 matched | Download | 279d9c80…f869e5 |
| 0.2.0-nullsafety.0 | Cached · Upstream SHA-256 matched | Download | 6887f39a…8ba4bf |
| 0.2.0-nullsafety.1 | Cached · Upstream SHA-256 matched | Download | be21885a…7c6fb3 |
Dependencies
No direct dependencies declared.