This question might be similar to MSE Question but I didn't really get the answer.
Suppose I want to evaluate the integral $$W = \int \underline{F}\cdot \underline{dr}$$ which actually has the physical meaning of giving the work done by the force $F$ along $r$. Now, Imagine I have a non conservative vector field (or force), i.e. $F$ is non conservative, it is a resistive force which resists with constant value $R$, suppose it acts for a distance $d$. Then can I do the following? $$W = \int \underline{F}\cdot\underline{dr} =\underline{F}\cdot\int\underline{dr} = \underline{F}\cdot\underline{\triangle r} = -Rd$$
and if so
why can I do that? When can I take out one of the factors of a dot product inside an integral?
I.e. can I take out the force? This happens in the last line of this page of my lecture notes:

