sub method

void sub(
  1. int value
)

Subtracts a value from the reactive integer and updates it.

Example:

final counter = swift(10);
counter.sub(3); // counter.value is now 7

Implementation

void sub(int value) {
  this.value -= value;
}