mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-24 02:33:44 +03:00
Update UI for toggling applications on older keys
This commit is contained in:
parent
533c2d26d7
commit
4081361163
@ -76,19 +76,23 @@ class _ModeForm extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Column(children: [
|
return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||||
...UsbInterface.values.map(
|
Align(
|
||||||
(iface) => CheckboxListTile(
|
alignment: Alignment.topLeft,
|
||||||
title: Text(iface.name.toUpperCase()),
|
child: Padding(
|
||||||
value: iface.value & interfaces != 0,
|
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||||
onChanged: (_) {
|
child: Wrap(
|
||||||
|
spacing: 8,
|
||||||
|
runSpacing: 16,
|
||||||
|
children: UsbInterface.values
|
||||||
|
.map((iface) => FilterChip(
|
||||||
|
label: Text(iface.name.toUpperCase()),
|
||||||
|
selected: iface.value & interfaces != 0,
|
||||||
|
onSelected: (_) {
|
||||||
onChanged(interfaces ^ iface.value);
|
onChanged(interfaces ^ iface.value);
|
||||||
},
|
},
|
||||||
),
|
))
|
||||||
),
|
.toList()))),
|
||||||
Text(interfaces == 0
|
|
||||||
? AppLocalizations.of(context)!.l_min_one_interface
|
|
||||||
: ''),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -309,7 +313,10 @@ class _ManagementScreenState extends ConsumerState<ManagementScreen> {
|
|||||||
padding: const EdgeInsets.symmetric(horizontal: 18.0),
|
padding: const EdgeInsets.symmetric(horizontal: 18.0),
|
||||||
child: _buildCapabilitiesForm(context, ref, info),
|
child: _buildCapabilitiesForm(context, ref, info),
|
||||||
)
|
)
|
||||||
: _buildModeForm(context, ref, info),
|
: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 18.0),
|
||||||
|
child: _buildModeForm(context, ref, info),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user