updateShouldNotifyDependent method

  1. @override
bool updateShouldNotifyDependent(
  1. covariant ViewScope oldWidget,
  2. Set<ViewScopeAspect> dependencies
)
override

Return true if the changes between this model and oldWidget match any of the dependencies.

Implementation

@override
bool updateShouldNotifyDependent(
  ViewScope oldWidget,
  Set<ViewScopeAspect> dependencies,
) => dependencies.any(
  (aspect) => switch (aspect) {
    ViewScopeAspect.size => size != oldWidget.size,
    ViewScopeAspect.isMobile => isMobile != oldWidget.isMobile,
    ViewScopeAspect.windowControls =>
      windowControls != oldWidget.windowControls,
  },
);