  In this paper, we extend the Topological Quantum Field Theory developed by
Gonz\'alez-Prieto, Logares, and Mu\~noz for computing virtual classes of
$G$-representation varieties of closed orientable surfaces in the Grothendieck
ring of varieties to the setting of the character stacks. To this aim, we
define a suitable Grothendieck ring of representable stacks, over which this
Topological Quantum Field Theory is defined. In this way, we compute the
virtual class of the character stack over $BG$, that is, a motivic
decomposition of the representation variety with respect to the natural adjoint
action.
  We apply this framework in two cases providing explicit expressions for the
virtual classes of the character stacks of closed orientable surfaces of
arbitrary genus. First, in the case of the affine linear group of rank $1$, the
virtual class of the character stack fully remembers the natural adjoint
action, in particular, the virtual class of the character variety can be
straightforwardly derived. Second, we consider the non-connected group
$\mathbb{G}_m \rtimes \mathbb{Z}/2\mathbb{Z}$, and we show how our theory
allows us to compute motivic information of the character stacks where the
classical na\"ive point-counting method fails.
