update method
Rebuilds the associated widgets.
Calling update()
will trigger a rebuild of all associated widgets
unless a list of ids
is provided, in which case only the widgets
with matching ids will be rebuilt.
The condition
parameter determines whether the rebuild should occur.
Implementation
void update([List<Object>? ids, bool condition = true]) {
if (!condition) return;
switch (ids) {
case null:
refresh();
case var idList:
final uniqueIds = idList.toSet();
for (final id in uniqueIds) {
refreshGroup(id);
}
}
}