shouldRebuildWidget method

  1. @override
bool shouldRebuildWidget(
  1. MathOptions oldOptions,
  2. MathOptions newOptions
)
override

Whether the specific MathOptions parameters that this node directly depends upon have changed.

Subclasses should override this method. This method is used to determine whether certain widget rebuilds can be bypassed even when the MathOptions have changed.

Rebuild bypass is determined by the following process:

Implementation

@override
bool shouldRebuildWidget(MathOptions oldOptions, MathOptions newOptions) =>
    oldOptions.color != newOptions.color ||
    oldOptions.mathFontOptions != newOptions.mathFontOptions ||
    oldOptions.textFontOptions != newOptions.textFontOptions ||
    oldOptions.sizeMultiplier != newOptions.sizeMultiplier;