opt.: TagsEditor & Btn

This commit is contained in:
lollipopkit🏳️‍⚧️
2024-07-28 19:05:31 +08:00
parent 432d76f024
commit 8fd4cc1fe1
11 changed files with 44 additions and 90 deletions

View File

@@ -1251,7 +1251,8 @@ class _SettingPageState extends State<SettingPage> {
),
onTap: () async {
final ctrl = TextEditingController(text: val);
void onSave(String s) {
void onSave() {
final s = ctrl.text.trim();
_setting.sftpEditor.put(s);
context.pop();
}
@@ -1265,9 +1266,9 @@ class _SettingPageState extends State<SettingPage> {
hint: '\$EDITOR / vim / nano ...',
icon: Icons.edit,
suggestion: false,
onSubmitted: onSave,
onSubmitted: (_) => onSave(),
),
actions: Btns.oks(onTap: () => onSave(ctrl.text)),
actions: [Btn.ok(onTap: (_) => onSave())],
);
},
);