add method
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;
}
Adds a value to the reactive integer and updates it.
Example:
final counter = swift(10);
counter.add(5); // counter.value is now 15
void add(int value) {
this.value = this.value + value;
}