fix out of range error
This commit is contained in:
parent
e1d7a30a06
commit
78b5abea7d
1 changed files with 6 additions and 1 deletions
|
|
@ -225,8 +225,13 @@ class Sidebar extends HookConsumerWidget {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
onDestinationSelected: (value) {
|
onDestinationSelected: (value) {
|
||||||
|
final children = selectedSpace.children.addAll(
|
||||||
|
selectedSpace.subSpaces
|
||||||
|
.map((element) => element.children)
|
||||||
|
.flattened,
|
||||||
|
);
|
||||||
selectedRoomIdNotifier.set(
|
selectedRoomIdNotifier.set(
|
||||||
selectedSpace.children[value].metadata?.id,
|
children[value].metadata?.id, //
|
||||||
);
|
);
|
||||||
if (!isDesktop) Navigator.of(context).pop();
|
if (!isDesktop) Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue