call method

  1. @override
Future<BaseResponseDonuzModel?> call({
  1. required String destination,
  2. required double value,
})
override

Implementation

@override
Future<BaseResponseDonuzModel?> call({
  required String destination,
  required double value,
}) async {
  var appId = await _findEstablishmentById.currentId();
  var user = await _getUser();
  if (user?.cpf == null) {
    return null;
  }

  if (value <= 0) {
    return null;
  }

  if (appId == null) {
    return null;
  }
  return await _repository.transfer(
    source: user!.cpf!,
    destination: destination,
    value: value,
    appId: appId,
  );
}