mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-27 06:14:58 +03:00
Styling for Toggle Applications.
This commit is contained in:
parent
e5efa332cb
commit
b0e17cf5c8
@ -27,8 +27,8 @@ class _CapabilityForm extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Wrap(
|
return Wrap(
|
||||||
spacing: 4.0,
|
spacing: 8,
|
||||||
runSpacing: 8.0,
|
runSpacing: 16,
|
||||||
children: Capability.values
|
children: Capability.values
|
||||||
.where((c) => capabilities & c.value != 0)
|
.where((c) => capabilities & c.value != 0)
|
||||||
.map((c) => FilterChip(
|
.map((c) => FilterChip(
|
||||||
@ -85,10 +85,12 @@ class _CapabilitiesForm extends StatelessWidget {
|
|||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
if (usbCapabilities != 0)
|
if (usbCapabilities != 0) ...[
|
||||||
const ListTile(
|
const ListTile(
|
||||||
leading: Icon(Icons.usb),
|
leading: Icon(Icons.usb),
|
||||||
title: Text('USB applications'),
|
title: Text('USB'),
|
||||||
|
contentPadding: EdgeInsets.only(bottom: 8),
|
||||||
|
horizontalTitleGap: 0,
|
||||||
),
|
),
|
||||||
_CapabilityForm(
|
_CapabilityForm(
|
||||||
capabilities: usbCapabilities,
|
capabilities: usbCapabilities,
|
||||||
@ -97,10 +99,18 @@ class _CapabilitiesForm extends StatelessWidget {
|
|||||||
onChanged({...enabled, Transport.usb: value});
|
onChanged({...enabled, Transport.usb: value});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
if (nfcCapabilities != 0)
|
],
|
||||||
|
if (nfcCapabilities != 0) ...[
|
||||||
|
if (usbCapabilities != 0)
|
||||||
|
const Padding(
|
||||||
|
padding: EdgeInsets.only(top: 24, bottom: 12),
|
||||||
|
child: Divider(),
|
||||||
|
),
|
||||||
const ListTile(
|
const ListTile(
|
||||||
leading: Icon(Icons.wifi),
|
leading: Icon(Icons.wifi),
|
||||||
title: Text('NFC applications'),
|
title: Text('NFC'),
|
||||||
|
contentPadding: EdgeInsets.only(bottom: 8),
|
||||||
|
horizontalTitleGap: 0,
|
||||||
),
|
),
|
||||||
_CapabilityForm(
|
_CapabilityForm(
|
||||||
capabilities: nfcCapabilities,
|
capabilities: nfcCapabilities,
|
||||||
@ -109,6 +119,7 @@ class _CapabilitiesForm extends StatelessWidget {
|
|||||||
onChanged({...enabled, Transport.nfc: value});
|
onChanged({...enabled, Transport.nfc: value});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
]
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user