From fb752e192db8c41071307b3ca6f5be57ad3d2961 Mon Sep 17 00:00:00 2001 From: Bruce Liu Date: Fri, 22 Jan 2021 22:14:56 +0800 Subject: [PATCH] turn off autocorrect by default --- .../src/main/res/drawable-night/launch_background.xml | 11 +++++++++++ lib/main.dart | 1 + lib/pages/item_list_page.dart | 1 + lib/pages/settings/text_editor_page.dart | 4 ++++ 4 files changed, 17 insertions(+) create mode 100644 android/app/src/main/res/drawable-night/launch_background.xml diff --git a/android/app/src/main/res/drawable-night/launch_background.xml b/android/app/src/main/res/drawable-night/launch_background.xml new file mode 100644 index 0000000..753a8db --- /dev/null +++ b/android/app/src/main/res/drawable-night/launch_background.xml @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/lib/main.dart b/lib/main.dart index 3977d29..86edd77 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -98,6 +98,7 @@ class MyApp extends StatelessWidget { child: Consumer( builder: (context, globalModel, child) => CupertinoApp( title: "Fluent Reader", + debugShowCheckedModeBanner: false, localizationsDelegates: [ // ... app-specific localization delegate[s] here S.delegate, diff --git a/lib/pages/item_list_page.dart b/lib/pages/item_list_page.dart index 7a7d492..dae7608 100644 --- a/lib/pages/item_list_page.dart +++ b/lib/pages/item_list_page.dart @@ -175,6 +175,7 @@ class _ItemListPageState extends State { saveText: S.of(context).search, initialValue: getFeed().search, navigationBarColor: CupertinoColors.systemBackground, + enableSuggestions: true, ), )); if (keyword == null) return; diff --git a/lib/pages/settings/text_editor_page.dart b/lib/pages/settings/text_editor_page.dart index faed129..9ca7bb4 100644 --- a/lib/pages/settings/text_editor_page.dart +++ b/lib/pages/settings/text_editor_page.dart @@ -12,6 +12,7 @@ class TextEditorPage extends StatefulWidget { final Color navigationBarColor; final FutureOr Function(String) validate; final TextInputType inputType; + final bool enableSuggestions; TextEditorPage( this.title, @@ -21,6 +22,7 @@ class TextEditorPage extends StatefulWidget { this.saveText, this.initialValue: "", this.inputType, + this.enableSuggestions: false, Key key, }) : super(key: key); @@ -91,6 +93,8 @@ class _TextEditorPage extends State { obscureText: widget.inputType == TextInputType.visiblePassword, keyboardType: widget.inputType, onSubmitted: (v) { _onSave(); }, + autocorrect: widget.enableSuggestions, + enableSuggestions: widget.enableSuggestions, ), ]), ]), -- 2.38.5