validate method

List<String> validate()

Implementation

List<String> validate() {
  final errors = <String>[];

  if(_onFailure == null){
    errors.add('`onFailure` callback is not set, Please call `.onFailure(EdfaPgError, Exception)` method');
  }
  if(_onSuccess == null){
    errors.add('`onSuccess` callback is not set, Please call `.onSuccess(EdfaPgSadadSuccess)` method');
  }
  if (_amount == null) {
    errors.add('orderAmount is empty');
  }
  if (_orderId == null || _orderId!.trim().isEmpty) {
    errors.add('orderId is empty');
  }
  if (_orderDescription == null || _orderDescription!.trim().isEmpty) {
    errors.add('orderDescription is empty');
  }
  if (_customerName == null || _customerName!.trim().isEmpty) {
    errors.add('customerName is empty');
  }
  if (_mobileNumber == null || _mobileNumber!.trim().isEmpty) {
    errors.add('mobileNumber is empty');
  }

  return errors;
}