- optimize TextField
- opt apt pwd req times
- use logger in update.dart
This commit is contained in:
Junyuan Feng
2022-05-15 13:48:57 +08:00
parent 282443a548
commit 36d7dc7bb2
15 changed files with 90 additions and 83 deletions

View File

@@ -59,16 +59,17 @@ class _AptManagePageState extends State<AptManagePage>
}
// ignore: prefer_function_declarations_over_variables
PwdRequestFunc onPwdRequest = (user) async {
PwdRequestFunc onPwdRequest = (lastTime, user) async {
if (!mounted) return '';
final textController = TextEditingController();
await showRoundDialog(
context,
s.pwdForUser(user ?? s.unknown),
lastTime ? s.lastTry : (user ?? s.unknown),
TextField(
controller: textController,
keyboardType: TextInputType.visiblePassword,
obscureText: true,
onSubmitted: (_) => textController.text.trim(),
decoration: InputDecoration(
labelText: s.pwd,
),