Source Code added
This commit is contained in:
parent
800376eafd
commit
9efa9bc6dd
3912 changed files with 754770 additions and 2 deletions
9
mobile/lib/repositories/api.repository.dart
Normal file
9
mobile/lib/repositories/api.repository.dart
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue