Skip to content

Commit

Permalink
fix: TabView.closeDelayDuration default value is now 1 second.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdlukaa committed Jun 30, 2024
1 parent c5aa15f commit 24f5e1d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@

Explore the `TabState` reference to see all the available methods you can override.
* feat: Deprecate `TabView.addIconData` and `TabView.addIconBuilder`. Use `TabView.newTabIcon` instead.
* fix: `TabView.closeDelayDuration` default value is now 1 second.

## 4.8.7

Expand Down
6 changes: 3 additions & 3 deletions lib/src/controls/navigation/tab_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class TabView extends StatefulWidget {
this.tabWidthBehavior = TabWidthBehavior.equal,
this.header,
this.footer,
this.closeDelayDuration = const Duration(milliseconds: 400),
this.closeDelayDuration = const Duration(seconds: 1),
});

/// The index of the tab to be displayed
Expand Down Expand Up @@ -237,6 +237,7 @@ class TabView extends StatefulWidget {
..add(DiagnosticsProperty<Duration>(
'closeDelayDuration',
closeDelayDuration,
defaultValue: const Duration(seconds: 1),
))
..add(DoubleProperty('minTabWidth', minTabWidth, defaultValue: 80.0))
..add(DoubleProperty('maxTabWidth', maxTabWidth, defaultValue: 240.0));
Expand Down Expand Up @@ -321,7 +322,6 @@ class _TabViewState extends State<TabView> {
}

setState(() => lockedTabWidth = tabWidth);

createTimer();
}
}
Expand Down Expand Up @@ -389,7 +389,7 @@ class _TabViewState extends State<TabView> {
) {
final item = SizedBox(
width: _kButtonWidth,
height: 24.0,
height: 28.0,
child: IconButton(
icon: Center(child: icon),
onPressed: onPressed,
Expand Down

0 comments on commit 24f5e1d

Please sign in to comment.