Fix updateShouldNotify on ArcaneServiceProvider

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2025-04-29 15:00:48 +02:00
parent 3e62ffc808
commit 8711eae4d8
+6 -5
View File
@@ -33,12 +33,13 @@ class ArcaneServiceProvider extends InheritedNotifier {
super.key, super.key,
}); });
/// Determines whether the widget should notify its dependents.
///
/// This always returns `true`, meaning dependents will always be notified
/// when this widget is rebuilt.
@override @override
bool updateShouldNotify(_) => true; bool updateShouldNotify(covariant ArcaneServiceProvider oldWidget) {
return !const DeepCollectionEquality().equals(
serviceInstances,
oldWidget.serviceInstances,
);
}
/// Retrieves the nearest `ArcaneServiceProvider` in the widget tree. /// Retrieves the nearest `ArcaneServiceProvider` in the widget tree.
/// ///