1
0
mirror of https://github.com/immich-app/immich.git synced 2025-07-14 07:04:24 +02:00
Files
immich/mobile/lib/repositories/api.repository.dart
shenlong 5b0575b956 refactor: DCM - const border radius, constructor & switch expressions (#19515)
* enable border radius, switch exp, const constructor

* regenerate provider

* more formatting

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-06-25 13:06:24 +05:30

10 lines
260 B
Dart

import 'package:immich_mobile/constants/errors.dart';
abstract class ApiRepository {
Future<T> checkNull<T>(Future<T?> future) async {
final response = await future;
if (response == null) throw const NoResponseDtoError();
return response;
}
}