tax method
Applies a tax percentage to the reactive double (adds percentage).
Example:
final price = swift(100.0);
price.tax(10); // price.value is now 110.0
Implementation
void tax(double percent) {
value = value * (1 + percent / 100);
}
Applies a tax percentage to the reactive double (adds percentage).
Example:
final price = swift(100.0);
price.tax(10); // price.value is now 110.0
void tax(double percent) {
value = value * (1 + percent / 100);
}