validatePrice method

  1. @action
void validatePrice(
  1. String value
)

Implementation

@action
void validatePrice(String value) {
  if (value.isEmpty) {
    errorStore.priceError = 'Saisir le prix de vente';
  } else if (num.tryParse(value) == null) {
    errorStore.priceError = 'erreur $value';
  } else {
    errorStore.priceError = null;
  }
  return;
}