getAtValue method

Future getAtValue(
  1. AtKey key
)

Retrieves the value of an AtKey

Implementation

Future<dynamic> getAtValue(AtKey key) async {
  try {
    var atvalue =
        await AtClientManager.getInstance().atClient.get(key).catchError(
            // ignore: invalid_return_type_for_catch_error
            (e) => _logger.severe('error in in key_stream_service get $e'));
    // ignore: unnecessary_null_comparison
    if (atvalue != null) {
      return atvalue;
    } else {
      return null;
    }
  } catch (e) {
    _logger.severe('error in key_stream_service getAtValue:$e');
    return null;
  }
}