getValue function

Implementation

Future<EventNotificationModel?> getValue(String key) async {
  try {
    EventNotificationModel? event;
    var atKey = EventService().getAtKey(key);
    var atValue = await EventService().atClientInstance!.get(atKey);
    if (atValue.value != null) {
      event = EventNotificationModel.fromJson(jsonDecode(atValue.value));
    }

    return event;
  } catch (e) {
    print('$e');
    return null;
  }
}