Mobile. Share Screen. Use switches for permissions
This commit is contained in:
parent
9c3334baf4
commit
2c231824a0
@ -330,37 +330,14 @@ class PermissionRow extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Row(
|
return SwitchListTile(
|
||||||
children: [
|
visualDensity: VisualDensity.compact,
|
||||||
Expanded(
|
contentPadding: EdgeInsets.all(0),
|
||||||
flex: 5,
|
title: Text(name),
|
||||||
child: FittedBox(
|
value: isOk,
|
||||||
fit: BoxFit.scaleDown,
|
onChanged: (bool value) {
|
||||||
alignment: Alignment.centerLeft,
|
onPressed();
|
||||||
child:
|
});
|
||||||
Text(name, style: Theme.of(context).textTheme.labelLarge))),
|
|
||||||
Expanded(
|
|
||||||
flex: 2,
|
|
||||||
child: FittedBox(
|
|
||||||
fit: BoxFit.scaleDown,
|
|
||||||
child: Text(isOk ? translate("ON") : translate("OFF"),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 16.0,
|
|
||||||
color: isOk ? Colors.green : Colors.grey))),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
flex: 3,
|
|
||||||
child: FittedBox(
|
|
||||||
fit: BoxFit.scaleDown,
|
|
||||||
alignment: Alignment.centerRight,
|
|
||||||
child: TextButton(
|
|
||||||
onPressed: onPressed,
|
|
||||||
child: Text(
|
|
||||||
translate(isOk ? "CLOSE" : "OPEN"),
|
|
||||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
|
||||||
)))),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user