call method

  1. @override
Future<BalanceModel?> call()
override

Implementation

@override
Future<BalanceModel?> call() async {
  var response =
      await Future.wait([_findEstablishmentById.currentId(), _userToken()]);
  for (var element in response) {
    if (element == null) return null;
  }

  var result = await _repository.getBalance(
      appId: response.first.toString(),
      tokenClient: response.last.toString());
  return result;
}