For more information, check out:

Performance considerations,
part of the StatefulWidget API doc

Widgets vs helper methods,
a video from the official Flutter YouTube 
channel that explains why widgets
(especially widgets with const constructors)
are more performant than functions.

Use saveLayer() thoughtfully

Some Flutter code uses saveLayer(), an expensive operation,
to implement various visual effects in the UI.
Even if your code doesn’t explicitly call saveLayer(),
other widgets or packages that you use might call it behind the scenes.
Perhaps your app is calling saveLayer() more than necessary;
excessive calls to saveLayer() can cause jank.

Why is saveLayer expensive?