smooth animations
This commit is contained in:
@@ -186,23 +186,28 @@ class _TabBar extends HookConsumerWidget {
|
||||
},
|
||||
);
|
||||
|
||||
return Visibility(
|
||||
visible:
|
||||
sheetController.value != null || (!tabInFullScreen && appBarVisible),
|
||||
maintainState: true,
|
||||
child: switch (tabBarPosition) {
|
||||
TabBarPosition.top => BrowserTopAppBar(
|
||||
showMainToolbar: showMainToolbar,
|
||||
showContextualToolbar: showContextualToolbar,
|
||||
showQuickTabSwitcherBar: showQuickTabSwitcherBar,
|
||||
),
|
||||
TabBarPosition.bottom => BrowserBottomAppBar(
|
||||
showMainToolbar: showMainToolbar,
|
||||
displayedSheet: displayedSheet,
|
||||
showContextualToolbar: showContextualToolbar,
|
||||
showQuickTabSwitcherBar: showQuickTabSwitcherBar,
|
||||
),
|
||||
},
|
||||
return AnimatedSize(
|
||||
duration: const Duration(milliseconds: 125),
|
||||
curve: Curves.easeInOut,
|
||||
child: Visibility(
|
||||
visible:
|
||||
sheetController.value != null ||
|
||||
(!tabInFullScreen && appBarVisible),
|
||||
maintainState: true,
|
||||
child: switch (tabBarPosition) {
|
||||
TabBarPosition.top => BrowserTopAppBar(
|
||||
showMainToolbar: showMainToolbar,
|
||||
showContextualToolbar: showContextualToolbar,
|
||||
showQuickTabSwitcherBar: showQuickTabSwitcherBar,
|
||||
),
|
||||
TabBarPosition.bottom => BrowserBottomAppBar(
|
||||
showMainToolbar: showMainToolbar,
|
||||
displayedSheet: displayedSheet,
|
||||
showContextualToolbar: showContextualToolbar,
|
||||
showQuickTabSwitcherBar: showQuickTabSwitcherBar,
|
||||
),
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -68,6 +68,7 @@ class BrowserFab extends HookConsumerWidget {
|
||||
}
|
||||
|
||||
return AnimatedSwitcher(
|
||||
key: child.key,
|
||||
duration: const Duration(milliseconds: 200),
|
||||
transitionBuilder: (child, animation) {
|
||||
return ScaleTransition(scale: animation, child: child);
|
||||
|
||||
Reference in New Issue
Block a user