updateShouldNotify method

  1. @override
bool updateShouldNotify(
  1. covariant ResponsiveBreakpointProviderScope oldWidget
)
override

Only notify when the breakpoints or the breakpoint changes. This helps a lot with performance, since we are only rebuilding widgets when the breakpoint changes, and not whenever the window's width changes.

Implementation

@override
bool updateShouldNotify(covariant ResponsiveBreakpointProviderScope oldWidget) {
  return breakpoints != oldWidget.breakpoints || breakpoint != oldWidget.breakpoint;
}