From cc61f87734663a2d1316d6575d61c4b7d773adf2 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Thu, 23 Feb 2023 22:44:56 +0530 Subject: [PATCH] Add placeholder for search tab --- lib/ui/home/home_bottom_nav_bar.dart | 14 ++++++++++++++ lib/ui/home_widget.dart | 3 +++ lib/ui/search_tab.dart | 16 ++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 lib/ui/search_tab.dart diff --git a/lib/ui/home/home_bottom_nav_bar.dart b/lib/ui/home/home_bottom_nav_bar.dart index bfd0151df..47341a890 100644 --- a/lib/ui/home/home_bottom_nav_bar.dart +++ b/lib/ui/home/home_bottom_nav_bar.dart @@ -169,6 +169,20 @@ class _HomeBottomNavigationBarState extends State { // of occasional missing events }, ), + GButton( + margin: const EdgeInsets.fromLTRB(10, 6, 8, 6), + icon: Icons.search_outlined, + iconColor: enteColorScheme.tabIcon, + iconActiveColor: strokeBaseLight, + text: '', + onPressed: () { + _onTabChange( + 3, + mode: "OnPressed", + ); // To take care + // of occasional missing events + }, + ), ], selectedIndex: currentTabIndex, onTabChange: _onTabChange, diff --git a/lib/ui/home_widget.dart b/lib/ui/home_widget.dart index e0f4015c7..cc193d8f3 100644 --- a/lib/ui/home_widget.dart +++ b/lib/ui/home_widget.dart @@ -41,6 +41,7 @@ import 'package:photos/ui/home/preserve_footer_widget.dart'; import 'package:photos/ui/home/start_backup_hook_widget.dart'; import 'package:photos/ui/loading_photos_widget.dart'; import 'package:photos/ui/notification/update/change_log_page.dart'; +import "package:photos/ui/search_tab.dart"; import 'package:photos/ui/settings/app_update_dialog.dart'; import 'package:photos/ui/settings_page.dart'; import 'package:photos/ui/shared_collections_gallery.dart'; @@ -60,6 +61,7 @@ class HomeWidget extends StatefulWidget { class _HomeWidgetState extends State { static const _deviceFolderGalleryWidget = CollectionsGalleryWidget(); static const _sharedCollectionGallery = SharedCollectionGallery(); + static const _searchTab = SearchTab(); static final _settingsPage = SettingsPage( emailNotifier: UserService.instance.emailValueNotifier, ); @@ -374,6 +376,7 @@ class _HomeWidgetState extends State { ), _deviceFolderGalleryWidget, _sharedCollectionGallery, + _searchTab, ], ); }, diff --git a/lib/ui/search_tab.dart b/lib/ui/search_tab.dart new file mode 100644 index 000000000..e02b3e859 --- /dev/null +++ b/lib/ui/search_tab.dart @@ -0,0 +1,16 @@ +import "package:flutter/widgets.dart"; + +class SearchTab extends StatefulWidget { + const SearchTab({Key? key}) : super(key: key); + @override + State createState() => _SearchTabState(); +} + +class _SearchTabState extends State { + @override + Widget build(BuildContext context) { + return const Center( + child: Text("Search tab placeholder"), + ); + } +}