项目作者: frasker

项目描述 :
transformations for flutter ValueListenable
高级语言: Dart
项目地址: git://github.com/frasker/transformations.git
创建时间: 2019-08-21T05:50:39Z
项目社区:https://github.com/frasker/transformations

开源协议:Other

下载


transformations

transformations 是一个转化 ValueNotifier 的工具类,实现数据监听的流转

如何使用

  1. ValueNotifier<int> source = ValueNotifier(4);
  2. var newValueNotifier = Transformations.map(source, (n) {
  3. return "test$n";
  4. });
  5. newValueNotifier.addListener(() {
  6. print("new value : ${newValueNotifier.value}");
  7. });
  8. source.value = 3;
  9. source.value = 4;
  10. source.value = 5;

如何依赖

请依赖github
```
transformations:
git:
url: https://github.com/frasker/transformations
ref: 1.0.0-alpha3