updateShouldNotify method Null safety
- covariant ToggleButtonsTheme oldWidget
Whether the framework should notify widgets that inherit from this widget.
When this widget is rebuilt, sometimes we need to rebuild the widgets that
inherit from this widget but sometimes we do not. For example, if the data
held by this widget is the same as the data held by
oldWidget, then we
do not need to rebuild the widgets that inherited the data held by
The framework distinguishes these cases by calling this function with the widget that previously occupied this location in the tree as an argument. The given widget is guaranteed to have the same runtimeType as this object.
@override bool updateShouldNotify(ToggleButtonsTheme oldWidget) => data != oldWidget.data;