import 'package:chat/configs/app_colors.dart'; import 'package:chat/services/auth_service.dart'; import 'package:chat/views/user/widgets/link_action_item.dart'; import 'package:flutter/material.dart'; import 'package:get/get_state_manager/get_state_manager.dart'; class UserSettingPrivacyPage extends StatelessWidget { const UserSettingPrivacyPage({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('隐私权限'), ), body: Column( children: [ const Divider( height: 0, color: AppColors.border, ), GetX( builder: (_) { return LinkActionItem( title: '允许通过搜索添加我为好友', trailing: Switch( value: _.userInfo.value.privacy ?? true, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, onChanged: (e) { _.togglePrivacy(); }, ), ); }, ), ], ), ); } }