inc method
Increment the value of the counter with labels by amount
.
Increments by one, if no amount is provided.
Implementation
void inc([double amount = 1]) {
if (amount <= 0) {
throw ArgumentError.value(amount, 'amount', 'Must be greater than zero.');
}
_value += amount;
}