Skip to content

Commit

Permalink
Use IndexedStack to preserve state
Browse files Browse the repository at this point in the history
  • Loading branch information
muizidn committed Nov 26, 2022
1 parent 4f87674 commit 99f7f0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/controls/navigation/tab_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ class _TabViewState extends State<TabView> {
),
),
if (widget.tabs.isNotEmpty)
Expanded(child: widget.tabs[widget.currentIndex].body),
Expanded(child: IndexedStack(index: widget.currentIndex,children: widget.tabs.map((e) => e.body).toList(),)),
]);
if (widget.shortcutsEnabled) {
void onClosePressed() {
Expand Down

0 comments on commit 99f7f0c

Please sign in to comment.