mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-17 09:46:39 +01:00
fix accessibility issues (#1224)
This commit is contained in:
@@ -14,25 +14,29 @@ class StandardSwitch extends StatefulWidget {
|
||||
class StandardSwitchState extends State<StandardSwitch> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: widget.onTaped,
|
||||
child: AnimatedContainer(
|
||||
padding: EdgeInsets.only(left: 2.0, right: 2.0),
|
||||
alignment: widget.value ? Alignment.centerRight : Alignment.centerLeft,
|
||||
duration: Duration(milliseconds: 250),
|
||||
width: 50,
|
||||
height: 28,
|
||||
decoration: BoxDecoration(
|
||||
color: widget.value
|
||||
? Theme.of(context).primaryColor
|
||||
: Theme.of(context).disabledColor,
|
||||
borderRadius: BorderRadius.all(Radius.circular(14.0))),
|
||||
child: Container(
|
||||
width: 24.0,
|
||||
height: 24.0,
|
||||
|
||||
return Semantics(
|
||||
toggled: widget.value,
|
||||
child: GestureDetector(
|
||||
onTap: widget.onTaped,
|
||||
child: AnimatedContainer(
|
||||
padding: EdgeInsets.only(left: 2.0, right: 2.0),
|
||||
alignment: widget.value ? Alignment.centerRight : Alignment.centerLeft,
|
||||
duration: Duration(milliseconds: 250),
|
||||
width: 50,
|
||||
height: 28,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
shape: BoxShape.circle),
|
||||
color: widget.value
|
||||
? Theme.of(context).primaryColor
|
||||
: Theme.of(context).disabledColor,
|
||||
borderRadius: BorderRadius.all(Radius.circular(14.0))),
|
||||
child: Container(
|
||||
width: 24.0,
|
||||
height: 24.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
shape: BoxShape.circle),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user