mirror of
https://github.com/hanskokx/arcane_framework.git
synced 2026-05-14 10:29:06 +02:00
Fix updateShouldNotify on ArcaneServiceProvider
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -33,12 +33,13 @@ class ArcaneServiceProvider extends InheritedNotifier {
|
||||
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
|
||||
bool updateShouldNotify(_) => true;
|
||||
bool updateShouldNotify(covariant ArcaneServiceProvider oldWidget) {
|
||||
return !const DeepCollectionEquality().equals(
|
||||
serviceInstances,
|
||||
oldWidget.serviceInstances,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieves the nearest `ArcaneServiceProvider` in the widget tree.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user