TF-1487 Apply linter rule

This commit is contained in:
dab246
2023-02-24 12:12:54 +07:00
committed by Dat Vu
parent 117a8a8fc6
commit 2b71aba278
155 changed files with 798 additions and 1039 deletions
@@ -18,27 +18,21 @@ class CacheFCMDatasourceImpl extends FCMDatasource {
Future<bool> storeStateToRefresh(TypeName typeName, jmap.State newState) {
return Future.sync(() async {
return await _firebaseCacheManager.storeStateToRefresh(typeName, newState);
}).catchError((error) {
_exceptionThrower.throwException(error);
});
}).catchError(_exceptionThrower.throwException);
}
@override
Future<jmap.State> getStateToRefresh(TypeName typeName) {
return Future.sync(() async {
return await _firebaseCacheManager.getStateToRefresh(typeName);
}).catchError((error) {
_exceptionThrower.throwException(error);
});
}).catchError(_exceptionThrower.throwException);
}
@override
Future<bool> deleteStateToRefresh(TypeName typeName) {
return Future.sync(() async {
return await _firebaseCacheManager.deleteStateToRefresh(typeName);
}).catchError((error) {
_exceptionThrower.throwException(error);
});
}).catchError(_exceptionThrower.throwException);
}
@override
@@ -64,9 +58,7 @@ class CacheFCMDatasourceImpl extends FCMDatasource {
Future<FCMSubscriptionCache> geSubscription() {
return Future.sync(() async {
return await _firebaseCacheManager.getSubscription();
}).catchError((error) {
_exceptionThrower.throwException(error);
});
}).catchError(_exceptionThrower.throwException);
}
@override
@@ -19,9 +19,7 @@ class FcmDatasourceImpl extends FCMDatasource {
Future<FirebaseSubscription> getFirebaseSubscriptionByDeviceId(String deviceId) {
return Future.sync(() async {
return await _fcmApi.getFirebaseSubscriptionByDeviceId(deviceId);
}).catchError((error) {
_exceptionThrower.throwException(error);
});
}).catchError(_exceptionThrower.throwException);
}
@override
@@ -44,9 +42,7 @@ class FcmDatasourceImpl extends FCMDatasource {
return Future.sync(() async {
final firebaseSubscription = await _fcmApi.registerNewToken(newTokenRequest);
return firebaseSubscription.fromDeviceId(newDeviceId: newTokenRequest.firebaseSubscription.deviceClientId);
}).catchError((error) {
_exceptionThrower.throwException(error);
});
}).catchError(_exceptionThrower.throwException);
}
@override
@@ -63,8 +59,6 @@ class FcmDatasourceImpl extends FCMDatasource {
Future<bool> destroySubscription(String subscriptionId) {
return Future.sync(() async {
return await _fcmApi.destroySubscription(subscriptionId);
}).catchError((error) {
_exceptionThrower.throwException(error);
});
}).catchError(_exceptionThrower.throwException);
}
}