How to track the end of the animation


LVGL version 8.2.0

Tell me how can I track the end of the animation?
Examples don’t help.
I have a simple bar, set the value to 50, the animation begins.
I need to wait for the animation to finish and only then change the value.
event_cb on the LV_EVENT_DRAW_PART_END event is triggered instantly as a bar is drawn without animation.

lv_obj_t *bar = lv_bar_create(frame);
lv_obj_set_size(bar, 60, 10);	
lv_obj_add_style(bar, &styleIndicatorBar, LV_PART_INDICATOR); 
lv_obj_set_style_anim_time(bar, 100, 0);
lv_bar_set_value(bar, 50, LV_ANIM_ON);
lv_obj_add_event_cb(bar, event_cb, LV_EVENT_DRAW_PART_END, NULL);

///////////////////add this callback with actions at the end of animation
static void anim_ready_callback(lv_anim_t * a)
//some code
/////add this to animation init code
lv_anim_set_ready_cb(&a, anim_ready_callback);