completed velocity integration

This commit is contained in:
2026-05-27 19:01:24 +02:00
parent fec46fb6e9
commit 6fdd3183fb
29 changed files with 2760 additions and 2293 deletions

View File

@@ -0,0 +1,21 @@
class ApiResponse<T> {
final T? data;
final String? error;
final int? statusCode;
const ApiResponse({
this.data,
this.error,
this.statusCode,
});
bool get isSuccess => error == null && data != null;
factory ApiResponse.success(T data, {int? statusCode}) {
return ApiResponse(data: data, statusCode: statusCode);
}
factory ApiResponse.failure(String error, {int? statusCode}) {
return ApiResponse(error: error, statusCode: statusCode);
}
}