improve doh ui

This commit is contained in:
Fabian Freund
2025-10-03 13:31:41 +02:00
parent f5ce88ab8c
commit 15aeeb0a05
@@ -145,14 +145,16 @@ class DohSettingsScreen extends HookConsumerWidget {
child: RadioListTile(
value: true,
enabled: false,
title: Column(
children: [
const Text('Custom'),
Form(
title: Form(
key: formKey,
child: TextFormField(
controller: customProviderController,
keyboardType: TextInputType.url,
decoration: const InputDecoration(
label: Text('Custom Resolver URL'),
hintText: 'https://example.com/dns-query',
floatingLabelBehavior: FloatingLabelBehavior.always,
),
validator: (value) {
return validateUrl(
value,
@@ -163,9 +165,7 @@ class DohSettingsScreen extends HookConsumerWidget {
onSaved: (newProvider) async {
if (newProvider != null) {
await ref
.read(
saveEngineSettingsControllerProvider.notifier,
)
.read(saveEngineSettingsControllerProvider.notifier)
.save(
(currentSettings) => currentSettings.copyWith
.dohProviderUrl(newProvider),
@@ -179,8 +179,6 @@ class DohSettingsScreen extends HookConsumerWidget {
},
),
),
],
),
),
),
],