Added path field

This commit is contained in:
Juan Gilsanz Polo
2024-02-26 15:47:41 +01:00
parent a82dbea166
commit fa0441a0e4
8 changed files with 53 additions and 8 deletions

View File

@@ -77,7 +77,7 @@ class _ConnectForm extends ConsumerWidget {
final connectionMethod = ConnectionMethod.values[provider.method];
final connectionString =
"${connectionMethod.name}://${provider.ipDomainController.text}${provider.portController.text != '' ? ':${provider.portController.text}' : ""}";
"${connectionMethod.name}://${provider.ipDomainController.text}${provider.portController.text != '' ? ':${provider.portController.text}' : ""}${provider.pathController.text}";
return Column(
children: [
@@ -167,6 +167,22 @@ class _ConnectForm extends ConsumerWidget {
labelText: t.onboarding.port,
),
),
const SizedBox(height: 24),
TextFormField(
controller: provider.pathController,
onChanged: ref.read(connectProvider.notifier).validatePath,
autocorrect: false,
decoration: InputDecoration(
prefixIcon: const Icon(Icons.route_rounded),
border: const OutlineInputBorder(
borderRadius: BorderRadius.all(
Radius.circular(10),
),
),
errorText: provider.pathError,
labelText: t.onboarding.path,
),
),
SectionLabel(
label: t.onboarding.authentication,
padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 24),