Explorar o código

minor layout change for ToggleSwitch

ashilkn %!s(int64=2) %!d(string=hai) anos
pai
achega
e7c0b5fad6
Modificáronse 1 ficheiros con 18 adicións e 21 borrados
  1. 18 21
      lib/ui/components/toggle_switch_widget.dart

+ 18 - 21
lib/ui/components/toggle_switch_widget.dart

@@ -28,27 +28,24 @@ class _ToggleSwitchWidgetState extends State<ToggleSwitchWidget> {
   @override
   Widget build(BuildContext context) {
     final enteColorScheme = Theme.of(context).colorScheme.enteTheme.colorScheme;
-    return Padding(
-      padding: const EdgeInsets.symmetric(vertical: 4),
-      child: SizedBox(
-        height: 30,
-        child: FittedBox(
-          fit: BoxFit.contain,
-          child: Switch.adaptive(
-            activeColor: enteColorScheme.primary400,
-            inactiveTrackColor: enteColorScheme.fillMuted,
-            materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
-            value: toggleValue,
-            onChanged: (value) async {
-              setState(() {
-                toggleValue = value;
-              });
-              await widget.onChanged.call();
-              setState(() {
-                toggleValue = widget.value.call();
-              });
-            },
-          ),
+    return SizedBox(
+      height: 32,
+      child: FittedBox(
+        fit: BoxFit.contain,
+        child: Switch.adaptive(
+          activeColor: enteColorScheme.primary400,
+          inactiveTrackColor: enteColorScheme.fillMuted,
+          materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
+          value: toggleValue,
+          onChanged: (value) async {
+            setState(() {
+              toggleValue = value;
+            });
+            await widget.onChanged.call();
+            setState(() {
+              toggleValue = widget.value.call();
+            });
+          },
         ),
       ),
     );