Last active
          January 31, 2020 22:31 
        
      - 
      
- 
        Save kwalrath/bebeafec39c977f5764472327cd4f8ff to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class NumberCreator { | |
| NumberCreator() { | |
| Timer.periodic(Duration(seconds: 1), (t) { | |
| _controller.sink.add(_count); | |
| _count++; | |
| }); | |
| } | |
| var _count = 1; | |
| final _controller = StreamController<int>(); | |
| Stream<int> get stream => _controller.stream; | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment