From d2a4564cfbd744232235e2c828657b616e19ba5a Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Thu, 4 Jun 2020 13:35:49 +0530 Subject: Fixes keyboard focus/open issue --- TODO.md | 2 +- lib/components/SearchableAppList.dart | 1 - lib/main.dart | 4 ++++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index 494a938..13dae84 100644 --- a/TODO.md +++ b/TODO.md @@ -9,6 +9,7 @@ ## Issues - [ ] Fix scroll/fling conflict (snap) + - [X] Make keyboard close on swipe - [X] Fix uninstall action issue - [X] Disable back button - [X] Fix build issue @@ -25,7 +26,6 @@ ## Applications list - [ ] Sort the list according to frequently used - [ ] Make app list load faster - - [ ] Make keyboard close on swipe - [X] Create app list - [X] Make app list searchable - [X] Create options menu on long press diff --git a/lib/components/SearchableAppList.dart b/lib/components/SearchableAppList.dart index f41ba18..c939845 100644 --- a/lib/components/SearchableAppList.dart +++ b/lib/components/SearchableAppList.dart @@ -31,7 +31,6 @@ class _SearchableAppListState extends State { onChanged: onInput, decoration: InputDecoration( prefixStyle: TextStyle(color: Color(0xFF888888)), - prefix: Text('/'), hintStyle: TextStyle(color: Color(0xFFD8DEE9)), hintText: 'Search', ), diff --git a/lib/main.dart b/lib/main.dart index c3bf787..8bff71f 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:device_apps/device_apps.dart'; import 'package:android_intent/android_intent.dart'; +import 'package:flutter/services.dart'; import 'pages/Home.dart'; import 'pages/Apps.dart'; @@ -91,6 +92,9 @@ class MyAppState extends StreamState { onWillPop: () => Future.value(false), child: PageView( controller: PageController(keepPage: true), + onPageChanged: (_x) { + SystemChannels.textInput.invokeMethod('TextInput.hide'); + }, children: [ HomeView( dateTime: dateTime.value, -- cgit v1.3.1