mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 09:45:22 +00:00
Implemented home management and user invitation flows
This commit is contained in:
@ -79,6 +79,23 @@ class HTTPService {
|
||||
}
|
||||
}
|
||||
|
||||
Future<T> put<T>(
|
||||
{required String path,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
dynamic body,
|
||||
required T Function(dynamic) expectedResponseModel}) async {
|
||||
try {
|
||||
final response = await client.put(
|
||||
path,
|
||||
data: body,
|
||||
queryParameters: queryParameters,
|
||||
);
|
||||
return expectedResponseModel(response.data);
|
||||
} catch (error) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future<T> download<T>(
|
||||
{required String path,
|
||||
required String savePath,
|
||||
|
Reference in New Issue
Block a user