From 4db689d50b810b4cd6dfe28162d2807449fe0493 Mon Sep 17 00:00:00 2001 From: Harsh Bhikadia Date: Mon, 31 Jan 2022 12:24:32 +0530 Subject: [PATCH] perf: only rebuild widgets when `BackdropScaffoldState` changed --- lib/src/scaffold.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/scaffold.dart b/lib/src/scaffold.dart index 752a55d..cc8b1a9 100644 --- a/lib/src/scaffold.dart +++ b/lib/src/scaffold.dart @@ -29,7 +29,7 @@ class Backdrop extends InheritedWidget { context.dependOnInheritedWidgetOfExactType()!.data; @override - bool updateShouldNotify(Backdrop oldWidget) => true; + bool updateShouldNotify(Backdrop oldWidget) => oldWidget.data != data; } /// Implements the basic functionality of backdrop.