Skip to content

Commit

Permalink
Changes to search menu
Browse files Browse the repository at this point in the history
  • Loading branch information
leoafarias committed Sep 17, 2020
1 parent 12d48f2 commit b001f95
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
25 changes: 11 additions & 14 deletions packages/app/lib/app_shell.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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: [
Expand All @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions packages/app/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion packages/app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b001f95

Please sign in to comment.