8000 GitHub - frasker/transformations: transformations for flutter ValueListenable
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

frasker/transformations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

transformations

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

如何使用

    ValueNotifier<int> source = ValueNotifier(4);

    var newValueNotifier = Transformations.map(source, (n) {
      return "test$n";
    });

    newValueNotifier.addListener(() {
      print("new value : ${newValueNotifier.value}");
    });

    source.value = 3;

    source.value = 4;

    source.value = 5;

如何依赖

请依赖github

   transformations:
    git:
        url: https://github.com/frasker/transformations
        ref: 1.0.0-alpha3

About

transformations for flutter ValueListenable

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

0