TF-1289: [Data] Implement GetSubscription in fcm datasource

This commit is contained in:
HuyNguyen
2022-12-29 17:05:49 +07:00
committed by Dat Vu
parent 5eb3a35046
commit b7dacc655a
3 changed files with 16 additions and 0 deletions
@@ -59,4 +59,13 @@ class CacheFCMDatasourceImpl extends FCMDatasource {
_exceptionThrower.throwException(error);
});
}
@override
Future<FCMSubscriptionCache> geSubscription() {
return Future.sync(() async {
return await _firebaseCacheManager.getSubscription();
}).catchError((error) {
_exceptionThrower.throwException(error);
});
}
}
@@ -53,4 +53,9 @@ class FcmDatasourceImpl extends FCMDatasource {
Future<bool> storeSubscription(FCMSubscriptionCache fcmSubscriptionCache) {
throw UnimplementedError();
}
@override
Future<FCMSubscriptionCache> geSubscription() {
throw UnimplementedError();
}
}