浏览代码

[mob] make function private

ashilkn 1 年之前
父节点
当前提交
75dd7c3e48
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      mobile/lib/ui/components/toggle_switch_widget.dart

+ 3 - 3
mobile/lib/ui/components/toggle_switch_widget.dart

@@ -63,11 +63,11 @@ class _ToggleSwitchWidgetState extends State<ToggleSwitchWidget> {
                     ),
                     ),
                     materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
                     materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
                     value: toggleValue ?? false,
                     value: toggleValue ?? false,
-                    onChanged: onChanged,
+                    onChanged: _onChanged,
                   )
                   )
                 : CupertinoSwitch(
                 : CupertinoSwitch(
                     value: toggleValue ?? false,
                     value: toggleValue ?? false,
-                    onChanged: onChanged,
+                    onChanged: _onChanged,
                   ),
                   ),
           ),
           ),
         ),
         ),
@@ -105,7 +105,7 @@ class _ToggleSwitchWidgetState extends State<ToggleSwitchWidget> {
     }
     }
   }
   }
 
 
-  Future<void> onChanged(bool negationOfToggleValue) async {
+  Future<void> _onChanged(bool negationOfToggleValue) async {
     setState(() {
     setState(() {
       toggleValue = negationOfToggleValue;
       toggleValue = negationOfToggleValue;
       //start showing inProgress statu icons if toggle takes more than debounce time
       //start showing inProgress statu icons if toggle takes more than debounce time