From 24f5e1d6bd93acf3a3cd5d0e50b51e1703b1c0d7 Mon Sep 17 00:00:00 2001 From: Bruno D'Luka Date: Sun, 30 Jun 2024 10:02:15 -0300 Subject: [PATCH] fix: `TabView.closeDelayDuration` default value is now 1 second. --- CHANGELOG.md | 1 + lib/src/controls/navigation/tab_view.dart | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dac46103..6a1b66bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lib/src/controls/navigation/tab_view.dart b/lib/src/controls/navigation/tab_view.dart index 875d8f77..773f9630 100644 --- a/lib/src/controls/navigation/tab_view.dart +++ b/lib/src/controls/navigation/tab_view.dart @@ -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 @@ -237,6 +237,7 @@ class TabView extends StatefulWidget { ..add(DiagnosticsProperty( 'closeDelayDuration', closeDelayDuration, + defaultValue: const Duration(seconds: 1), )) ..add(DoubleProperty('minTabWidth', minTabWidth, defaultValue: 80.0)) ..add(DoubleProperty('maxTabWidth', maxTabWidth, defaultValue: 240.0)); @@ -321,7 +322,6 @@ class _TabViewState extends State { } setState(() => lockedTabWidth = tabWidth); - createTimer(); } } @@ -389,7 +389,7 @@ class _TabViewState extends State { ) { final item = SizedBox( width: _kButtonWidth, - height: 24.0, + height: 28.0, child: IconButton( icon: Center(child: icon), onPressed: onPressed,