updateProfile method
Updates profile attributes for the current user.
Implementation
Future<Map<String, dynamic>> updateProfile(Map<String, dynamic> data) async {
final hdrs = await auth.headers();
final uri = auth.baseUrl.resolve('/auth/account/profile');
final response = await auth.dio.put<dynamic>(
uri.toString(),
data: data,
options: Options(headers: {'Accept': 'application/json', ...hdrs}),
);
return response.data is Map<String, dynamic>
? response.data as Map<String, dynamic>
: {'data': response.data};
}