fix the following lints:
- prefer_is_empty
- sort_child_properties_last
- prefer_const_literals_to_create_immutables
- prefer_const_constructors
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
import 'package:proxmox_login_manager/proxmox_general_settings_model.dart';
class ProxmoxGeneralSettingsForm extends StatefulWidget {
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();
@override
_ProxmoxGeneralSettingsFormState createState() =>
_ProxmoxGeneralSettingsFormState();
- autofillHints: [AutofillHints.username],
+ autofillHints: const [AutofillHints.username],
),
DropdownButtonFormField(
decoration: const InputDecoration(icon: Icon(Icons.domain)),
items: widget.accessDomains!
.map((e) => DropdownMenuItem(
),
DropdownButtonFormField(
decoration: const InputDecoration(icon: Icon(Icons.domain)),
items: widget.accessDomains!
.map((e) => DropdownMenuItem(
child: ListTile(
title: Text(e!.realm),
subtitle: Text(e.comment ?? ''),
),
child: ListTile(
title: Text(e!.realm),
subtitle: Text(e.comment ?? ''),
),
))
.toList(),
onChanged: widget.onDomainChanged,
))
.toList(),
onChanged: widget.onDomainChanged,
return null;
},
onFieldSubmitted: (value) => widget.onPasswordSubmitted!(),
return null;
},
onFieldSubmitted: (value) => widget.onPasswordSubmitted!(),
- autofillHints: [AutofillHints.password],
+ autofillHints: const [AutofillHints.password],
),
Align(
alignment: Alignment.bottomRight,
),
Align(
alignment: Alignment.bottomRight,
'$username@$realm', password, origin, settings.sslValidation!);
if (client.credentials.tfa != null &&
'$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(
ProxmoxApiClient? tfaclient =
await Navigator.of(context).push(MaterialPageRoute(
builder: (context) => ProxmoxTfaForm(
icon: Icon(Icons.input)),
items: _tfa_kinds
.map((e) => DropdownMenuItem(
icon: Icon(Icons.input)),
items: _tfa_kinds
.map((e) => DropdownMenuItem(
- child: ListTile(title: Text(e)),
+ child: ListTile(title: Text(e)),
))
.toList(),
onChanged: (String? value) {
))
.toList(),
onChanged: (String? value) {