From b001f9506900e9723ad238bfab3ae70078f9331a Mon Sep 17 00:00:00 2001 From: leoafarias Date: Thu, 17 Sep 2020 14:52:07 -0400 Subject: [PATCH] Changes to search menu --- packages/app/lib/app_shell.dart | 25 +++++++++++-------------- packages/app/macos/Podfile.lock | 4 ++-- packages/app/pubspec.yaml | 2 +- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/packages/app/lib/app_shell.dart b/packages/app/lib/app_shell.dart index cdafe370..b036c699 100644 --- a/packages/app/lib/app_shell.dart +++ b/packages/app/lib/app_shell.dart @@ -35,7 +35,7 @@ final pages = [ class AppShell extends HookWidget { const AppShell({Key key}) : super(key: key); - final totalTabs = 4; + final totalTabs = 5; @override Widget build(BuildContext context) { @@ -106,21 +106,14 @@ class AppShell extends HookWidget { selectedIndex: selectedIndex.value, minWidth: kNavigationWidth, minExtendedWidth: kNavigationWidthExtended, - trailing: Column( - children: [ - const SizedBox(height: 10), - IconButton( - icon: const Icon(Icons.search), - iconSize: 20, - onPressed: () { - showSearch.value = true; - }, - ), - ], - ), extended: !LayoutSize.isSmall, onDestinationSelected: (index) { - navigation.goTo(NavigationRoutes.values[index]); + // If its search + if (index == 4) { + showSearch.value = true; + } else { + navigation.goTo(NavigationRoutes.values[index]); + } }, labelType: NavigationRailLabelType.none, destinations: [ @@ -140,6 +133,10 @@ class AppShell extends HookWidget { label: 'Settings', iconData: Icons.settings, ), + NavButton( + label: 'Search', + iconData: Icons.search, + ), ], ), const VerticalDivider(thickness: 1, width: 1), diff --git a/packages/app/macos/Podfile.lock b/packages/app/macos/Podfile.lock index c2cf1fdb..50735d5f 100644 --- a/packages/app/macos/Podfile.lock +++ b/packages/app/macos/Podfile.lock @@ -13,7 +13,7 @@ PODS: DEPENDENCIES: - file_chooser (from `Flutter/ephemeral/.symlinks/plugins/file_chooser/macos`) - - FlutterMacOS (from `Flutter/ephemeral/.symlinks/flutter/darwin-x64`) + - FlutterMacOS (from `Flutter/ephemeral/.symlinks/flutter/darwin-x64-release`) - path_provider (from `Flutter/ephemeral/.symlinks/plugins/path_provider/macos`) - path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`) - url_launcher (from `Flutter/ephemeral/.symlinks/plugins/url_launcher/macos`) @@ -24,7 +24,7 @@ EXTERNAL SOURCES: file_chooser: :path: Flutter/ephemeral/.symlinks/plugins/file_chooser/macos FlutterMacOS: - :path: Flutter/ephemeral/.symlinks/flutter/darwin-x64 + :path: Flutter/ephemeral/.symlinks/flutter/darwin-x64-release path_provider: :path: Flutter/ephemeral/.symlinks/plugins/path_provider/macos path_provider_macos: diff --git a/packages/app/pubspec.yaml b/packages/app/pubspec.yaml index cc35adb9..07a0272c 100644 --- a/packages/app/pubspec.yaml +++ b/packages/app/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 +version: 1.0.0-alpha.0 environment: sdk: ">=2.7.0 <3.0.0"