diff --git a/lib/pages/webdav/view.dart b/lib/pages/webdav/view.dart index ec0784e94..8d13effd8 100644 --- a/lib/pages/webdav/view.dart +++ b/lib/pages/webdav/view.dart @@ -23,6 +23,7 @@ class _WebDavSettingPageState extends State { final _usernameCtr = TextEditingController(text: Pref.webdavUsername); final _passwordCtr = TextEditingController(text: Pref.webdavPassword); final _directoryCtr = TextEditingController(text: Pref.webdavDirectory); + bool _obscureText = true; @override void dispose() { @@ -67,10 +68,17 @@ class _WebDavSettingPageState extends State { TextField( controller: _passwordCtr, autofillHints: const [AutofillHints.password], - decoration: const InputDecoration( + decoration: InputDecoration( labelText: '密码', - border: OutlineInputBorder(), + border: const OutlineInputBorder(), + suffixIcon: IconButton( + onPressed: () => setState(() => _obscureText = !_obscureText), + icon: _obscureText + ? const Icon(Icons.visibility) + : const Icon(Icons.visibility_off), + ), ), + obscureText: _obscureText, ), const SizedBox(height: 20), TextField( diff --git a/pubspec.lock b/pubspec.lock index 8acc85264..0678856fc 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -2058,10 +2058,11 @@ packages: webdav_client: dependency: "direct main" description: - name: webdav_client - sha256: "682fffc50b61dc0e8f46717171db03bf9caaa17347be41c0c91e297553bf86b2" - url: "https://pub.dev" - source: hosted + path: "." + ref: main + resolved-ref: "2f669c98fb81cff1c64fee93466a1475c77e4273" + url: "https://github.com/wgh136/webdav_client.git" + source: git version: "1.2.2" win32: dependency: transitive diff --git a/pubspec.yaml b/pubspec.yaml index d3b9fbd45..54c660baf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -188,7 +188,11 @@ dependencies: fl_chart: ^1.0.0 synchronized: ^3.3.0 document_file_save_plus: ^2.0.0 - webdav_client: ^1.2.2 + # webdav_client: ^1.2.2 + webdav_client: + git: + url: https://github.com/wgh136/webdav_client.git + ref: main re_highlight: ^0.0.3 cached_network_svg_image: ^1.2.0 flutter_sortable_wrap: