Stack performance in Flutter?
06:40 27 Dec 2025

In my android application, there is a 4X4 board for 2 player and 4 play buttons together. One board square is made of one stack each. And there is 5-7 layers to several widgets on one stack depending of accessibility. When one player has pressed a button, the game board will drawn again.

A performance was a issue until I saw a video about Flutter (graphic) performance. Also about RepaintBoundary(child: Stack(...),), which helped a lot in code place where actual board was build(). I was thinking, that I had missed even so something, until I founded put all together into this:

class StackWidget extends StatelessWidget {
  StackWidget({super.key, required this.child});
  final Stack child;

  @override
  Widget build(BuildContext context)
  {
    return RepaintBoundary(child: child);
  }

}

flutter performance stack stateless