refactoring
This commit is contained in:
@@ -35,6 +35,7 @@ class NotificationRepositoryImpl implements NotificationRepository {
|
||||
}
|
||||
return [];
|
||||
} on DioException catch (e) {
|
||||
if (e.type == DioExceptionType.cancel) rethrow;
|
||||
if (e.response?.statusCode == 404) return [];
|
||||
rethrow;
|
||||
}
|
||||
@@ -51,6 +52,7 @@ class NotificationRepositoryImpl implements NotificationRepository {
|
||||
}
|
||||
return [];
|
||||
} on DioException catch (e) {
|
||||
if (e.type == DioExceptionType.cancel) rethrow;
|
||||
if (e.response?.statusCode == 404) return [];
|
||||
rethrow;
|
||||
}
|
||||
@@ -69,6 +71,7 @@ class NotificationRepositoryImpl implements NotificationRepository {
|
||||
}
|
||||
return [];
|
||||
} on DioException catch (e) {
|
||||
if (e.type == DioExceptionType.cancel) rethrow;
|
||||
if (e.response?.statusCode == 404) return [];
|
||||
rethrow;
|
||||
}
|
||||
@@ -87,6 +90,7 @@ class NotificationRepositoryImpl implements NotificationRepository {
|
||||
}
|
||||
return [];
|
||||
} on DioException catch (e) {
|
||||
if (e.type == DioExceptionType.cancel) rethrow;
|
||||
if (e.response?.statusCode == 404) return [];
|
||||
rethrow;
|
||||
}
|
||||
@@ -101,6 +105,7 @@ class NotificationRepositoryImpl implements NotificationRepository {
|
||||
}
|
||||
return null;
|
||||
} on DioException catch (e) {
|
||||
if (e.type == DioExceptionType.cancel) rethrow;
|
||||
if (e.response?.statusCode == 404) return null;
|
||||
rethrow;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user