WIP: Cards build optimization
This commit is contained in:
@ -12,11 +12,11 @@ class EntityModel extends InheritedWidget {
|
||||
final bool handleTap;
|
||||
|
||||
static EntityModel of(BuildContext context) {
|
||||
return context.inheritFromWidgetOfExactType(EntityModel);
|
||||
return context.dependOnInheritedWidgetOfExactType<EntityModel>();
|
||||
}
|
||||
|
||||
@override
|
||||
bool updateShouldNotify(InheritedWidget oldWidget) {
|
||||
return true;
|
||||
bool updateShouldNotify(EntityModel oldWidget) {
|
||||
return entityWrapper.entity.lastUpdatedTimestamp != oldWidget.entityWrapper.entity.lastUpdatedTimestamp;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user