Skip to content

Commit

Permalink
Issue #4 fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhnatly committed Oct 17, 2021
1 parent 819a54b commit c2cb3e8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/controllers/carplay_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class FlutterCarPlayController {
for (var h in templateHistory) {
switch (h.runtimeType) {
case CPTabBarTemplate:
for (var t in h.templates) {
for (var t in (h as CPTabBarTemplate).templates) {
for (var s in t.sections) {
for (var i in s.items) {
if (i.uniqueId == updatedListItem.uniqueId) {
Expand All @@ -68,12 +68,11 @@ class FlutterCarPlayController {
}
break;
case CPListTemplate:
for (var s in h.sections) {
for (var s in (h as CPListTemplate).sections) {
for (var i in s.items) {
if (i.uniqueId == updatedListItem.uniqueId) {
currentRootTemplate!
.templates[currentRootTemplate!.templates.indexOf(h)]
.sections[h.sections.indexOf(s)]
.sections[currentRootTemplate!.sections.indexOf(s)]
.items[s.items.indexOf(i)] = updatedListItem;
break l1;
}
Expand Down

0 comments on commit c2cb3e8

Please sign in to comment.