add method

void add(
  1. double value
)

Adds a value to the reactive double and updates it.

Example:

final price = swift(10.5);
price.add(5.5); // price.value is now 16.0

Implementation

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