hide top home button bar when there is only a single option

This commit is contained in:
julian 2024-06-06 16:01:08 -06:00
parent 7c40dd1546
commit 52e73cc6ba

View file

@ -126,8 +126,10 @@ class _HomeViewState extends ConsumerState<HomeView> {
_rotateIconController = RotateIconController(); _rotateIconController = RotateIconController();
_children = [ _children = [
const WalletsView(), const WalletsView(),
if (Constants.enableExchange) const ExchangeView(), if (AppConfig.hasFeature(AppFeature.swap) && Constants.enableExchange)
if (Constants.enableExchange) const BuyView(), const ExchangeView(),
if (AppConfig.hasFeature(AppFeature.buy) && Constants.enableExchange)
const BuyView(),
]; ];
ref.read(notificationsProvider).startCheckingWatchedNotifications(); ref.read(notificationsProvider).startCheckingWatchedNotifications();
@ -343,7 +345,7 @@ class _HomeViewState extends ConsumerState<HomeView> {
), ),
body: Column( body: Column(
children: [ children: [
if (Constants.enableExchange) if (_children.length > 1)
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context) color: Theme.of(context)