listen attach or detach
void Function(bool isAttach, double offset) on_attach_or_detach = (bool isAttach, double offset) {};