offBuild method
If you can't declare a child element as const and it won't change, you can use OffBuildWidget to avoid the rebuilding of the child element.
Implementation
OffBuildWidget offBuild({
required String id,
}) {
return OffBuildWidget(
key: key,
id: id,
child: this,
);
}