Skip to content

v0.22.0

Compare
Choose a tag to compare
@alex-gutev alex-gutev released this 14 Apr 07:21
· 109 commits to master since this release

New Features:

  • Watch

    Registers a watch function that has access to its own handle.

    This can be used to 1) stop a watch function directly from within the watch function and 2)
    prevent code from running on the first call of the watch function.

    final watch = Watch((state) {
      final value = a();
      
      state.afterInit();
    
      // The following is only run after the first call
      print('A = $value');
      
      if (value > 10) {
        state.stop();
      }
    });