mirror of
https://github.com/immich-app/immich.git
synced 2025-02-11 01:18:24 -05:00
11 lines
313 B
Dart
11 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;
|
|
}
|
|
}
|