refresh method
Implementation
Future refresh() async {
try {
final response = await dio.get('/account/refresh');
_profile = Profile.fromJson(response.data);
_save(response.data);
} on DioException catch (e) {
if (e.response?.statusCode == 401) {
throw UnauthorizedError();
}
rethrow;
}
}