Skip to content

Commit 24f5e1d

Browse files
committed
fix: TabView.closeDelayDuration default value is now 1 second.
1 parent c5aa15f commit 24f5e1d

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383

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

8788
## 4.8.7
8889

lib/src/controls/navigation/tab_view.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class TabView extends StatefulWidget {
7373
this.tabWidthBehavior = TabWidthBehavior.equal,
7474
this.header,
7575
this.footer,
76-
this.closeDelayDuration = const Duration(milliseconds: 400),
76+
this.closeDelayDuration = const Duration(seconds: 1),
7777
});
7878

7979
/// The index of the tab to be displayed
@@ -237,6 +237,7 @@ class TabView extends StatefulWidget {
237237
..add(DiagnosticsProperty<Duration>(
238238
'closeDelayDuration',
239239
closeDelayDuration,
240+
defaultValue: const Duration(seconds: 1),
240241
))
241242
..add(DoubleProperty('minTabWidth', minTabWidth, defaultValue: 80.0))
242243
..add(DoubleProperty('maxTabWidth', maxTabWidth, defaultValue: 240.0));
@@ -321,7 +322,6 @@ class _TabViewState extends State<TabView> {
321322
}
322323

323324
setState(() => lockedTabWidth = tabWidth);
324-
325325
createTimer();
326326
}
327327
}
@@ -389,7 +389,7 @@ class _TabViewState extends State<TabView> {
389389
) {
390390
final item = SizedBox(
391391
width: _kButtonWidth,
392-
height: 24.0,
392+
height: 28.0,
393393
child: IconButton(
394394
icon: Center(child: icon),
395395
onPressed: onPressed,

0 commit comments

Comments
 (0)