TF-1289: [Data] Implement GetSubscription in fcm repository
This commit is contained in:
@@ -49,4 +49,13 @@ class FCMCacheManager {
|
||||
return _fcmSubscriptionCacheClient.insertItem(
|
||||
FCMSubscriptionCache.keyCacheValue, fcmSubscriptionCache);
|
||||
}
|
||||
|
||||
Future<FCMSubscriptionCache> getSubscription() async {
|
||||
final _fcmSubscription = await _fcmSubscriptionCacheClient.getItem(FCMSubscriptionCache.keyCacheValue);
|
||||
if (_fcmSubscription == null) {
|
||||
throw NotFoundSubscriptionException();
|
||||
} else {
|
||||
return _fcmSubscription;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user