Substituting xanthan gum for flour
Xanthan is not necessarily a substitute for flour.  We would need to know what your recipe is to give you the best answer.  Xanthan increases viscosity when at rest, but thins when stirred (shear thinning).  It is most often used to stabilize emulsions. It also reduces syneresis (the weeping of liquid from gels or purees.  It can be used as a binder in gluten free recipes.  There are a range of concentrations depending on the desired effect, but they generally don't go over 1.5% of the weight of the total recipe.