Skip to content

Commit

Permalink
Merge pull request #3 from hamsbrar/dev-improvements
Browse files Browse the repository at this point in the history
Rad: Optimise MultiChildWidget.shouldUpdateWidget
  • Loading branch information
juancastillo0 committed May 31, 2023
2 parents 504c38a + ae05a31 commit 465db71
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/rad_bootstrap/lib/src/rad_bootstrap_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,8 @@ class MultiChildWidget extends rad.Widget {
rad.DomTagType? get correspondingTag => null;

@override
bool shouldUpdateWidget(covariant MultiChildWidget oldWidget) {
return oldWidget.children != children &&
(oldWidget.children.length != children.length ||
Iterable.generate(children.length)
.any((i) => children[i] != oldWidget.children[i]));
bool shouldUpdateWidget(oldWidget) {
return false;
}
}

Expand Down

0 comments on commit 465db71

Please sign in to comment.