What does this "に" do in this sentence?


I'm translating this sentence

> たまにはひとり気まま **に** ブラつくのもいいか？

and I understood something like _Is it okay to wander alone and carefree
sometimes?_ , but I'm not sure because I don't understood the function of that
に in this case, Someone can explain me how it works here?




Unless I'm mistaken, it should simply be the adverbial に, transforming it into
an adverbial phrase. See also: <https://www.imabi.net/adverbsii.htm>




Unless I'm mistaken, it should simply be the adverbial に, transforming it into
an adverbial phrase. See also: <https://www.imabi.net/adverbsii.htm>

