diff --git a/mobile/lib/ui/inkino_app_bar.dart b/mobile/lib/ui/inkino_app_bar.dart index 31b8fabd..6bbd625a 100644 --- a/mobile/lib/ui/inkino_app_bar.dart +++ b/mobile/lib/ui/inkino_app_bar.dart @@ -27,6 +27,7 @@ class _InkinoAppBarState extends State @override void dispose() { super.dispose(); + _searchQuery.close() } void _toggleTheaters() async { @@ -57,11 +58,13 @@ class _InkinoAppBarState extends State if (_searchQuery == null || _searchQuery.text.isEmpty) { // Stop searching. Navigator.pop(context); - return; + return null; + }else{ + _clearSearchQuery(); + return null; } - _clearSearchQuery(); - }, + }, ), ]; } @@ -69,7 +72,7 @@ class _InkinoAppBarState extends State return [ _TheaterIconButton(_theatersOpen, _toggleTheaters), IconButton( - color: Colors.white70, + color: Colors.white60, icon: const Icon(Icons.search), onPressed: _startSearch, ), @@ -81,7 +84,7 @@ class _InkinoAppBarState extends State controller: _searchQuery, autofocus: true, decoration: const InputDecoration( - hintText: 'Search movies & showtimes...', + hintText: 'Search you want to see..', border: InputBorder.none, hintStyle: const TextStyle(color: Colors.white30), ), @@ -98,17 +101,13 @@ class _InkinoAppBarState extends State void _startSearch() { ModalRoute.of(context).addLocalHistoryEntry(_searchEntry); - setState(() { - _isSearching = true; - }); + setState(() => _isSearching = true); } void _stopSearching() { _clearSearchQuery(); - setState(() { - _isSearching = false; - }); + setState(() =>_isSearching = false); } void _clearSearchQuery() {