mirror of
https://github.com/immich-app/immich.git
synced 2025-01-19 18:26:46 +01:00
12 lines
313 B
Dart
12 lines
313 B
Dart
|
import 'package:flutter/foundation.dart';
|
||
|
import 'package:immich_mobile/constants/errors.dart';
|
||
|
|
||
|
abstract class BaseApiRepository {
|
||
|
@protected
|
||
|
Future<T> checkNull<T>(Future<T?> future) async {
|
||
|
final response = await future;
|
||
|
if (response == null) throw NoResponseDtoError();
|
||
|
return response;
|
||
|
}
|
||
|
}
|