import 'package:proxmox_login_manager/proxmox_general_settings_model.dart';
class ProxmoxGeneralSettingsForm extends StatefulWidget {
+ const ProxmoxGeneralSettingsForm({Key? key}) : super(key: key);
+
@override
_ProxmoxGeneralSettingsFormState createState() =>
_ProxmoxGeneralSettingsFormState();
}
return null;
},
- autofillHints: [AutofillHints.username],
+ autofillHints: const [AutofillHints.username],
),
DropdownButtonFormField(
decoration: const InputDecoration(icon: Icon(Icons.domain)),
items: widget.accessDomains!
.map((e) => DropdownMenuItem(
+ value: e,
child: ListTile(
title: Text(e!.realm),
subtitle: Text(e.comment ?? ''),
),
- value: e,
))
.toList(),
onChanged: widget.onDomainChanged,
return null;
},
onFieldSubmitted: (value) => widget.onPasswordSubmitted!(),
- autofillHints: [AutofillHints.password],
+ autofillHints: const [AutofillHints.password],
),
Align(
alignment: Alignment.bottomRight,
'$username@$realm', password, origin, settings.sslValidation!);
if (client.credentials.tfa != null &&
- client.credentials.tfa!.kinds().length > 0) {
+ client.credentials.tfa!.kinds().isNotEmpty) {
ProxmoxApiClient? tfaclient =
await Navigator.of(context).push(MaterialPageRoute(
builder: (context) => ProxmoxTfaForm(
icon: Icon(Icons.input)),
items: _tfa_kinds
.map((e) => DropdownMenuItem(
- child: ListTile(title: Text(e)),
value: e,
+ child: ListTile(title: Text(e)),
))
.toList(),
onChanged: (String? value) {