add method

void add(
  1. int value
)

Adds a value to the reactive integer and updates it.

Example:

final counter = swift(10);
counter.add(5); // counter.value is now 15

Implementation

void add(int value) {
  this.value = this.value + value;
}