Watch
1
0
Fork
You've already forked arc
0
forked from hesabix/arc
arc/hesabixUI/hesabix_ui/lib/services/user_ui_preferences_service.dart
2026-05-07 22:21:45 +03:30

17 lines
623 B
Dart
Executable file

import '../core/api_client.dart';
class UserUiPreferencesService {
final ApiClient _api;
UserUiPreferencesService(this._api);
Future<Map<String, dynamic>> getPreferences() async {
final res = await _api.get<Map<String, dynamic>>('/api/v1/profile/ui-preferences');
return Map<String, dynamic>.from(res.data?['data'] as Map? ?? const {});
}
Future<Map<String, dynamic>> putPreferences(Map<String, dynamic> body) async {
final res = await _api.put<Map<String, dynamic>>('/api/v1/profile/ui-preferences', data: body);
return Map<String, dynamic>.from(res.data?['data'] as Map? ?? const {});
}
}