nank1ro / solidart

Signals in Dart and Flutter, inspired by SolidJS
https://docs.page/nank1ro/solidart
MIT License
155 stars 5 forks source link

Add hasPreviousValue getter #35

Closed manuel-plavsic closed 1 year ago

manuel-plavsic commented 1 year ago

This PR adds the hasPreviousValue getter suggested in https://github.com/nank1ro/solidart/pull/27#issuecomment-1588990715.

It is a bit unclear to me whether or not I should make a reportObserved call before returning _hasPreviousValue (similarly to what the previousValue getter does)?

codecov[bot] commented 1 year ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (dev@d1f0d04). Click here to learn what that means. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##             dev      #35   +/-   ##
======================================
  Coverage       ?   97.58%           
======================================
  Files          ?       17           
  Lines          ?      705           
  Branches       ?        0           
======================================
  Hits           ?      688           
  Misses         ?       17           
  Partials       ?        0