content: import 'package:flutter/material.dart';
  import 'package:flutter_screenutil/flutter_screenutil.dart';
  
  import '../../../components/appBar.dart';
  
  class PrivacySetting extends StatefulWidget {
    PrivacySetting({Key key, this.detail}) : super(key: key);
    final Map detail;
  
    @override
    _PrivacySettingState createState() => _PrivacySettingState();
  }
  
  class _PrivacySettingState extends State<PrivacySetting> {
    bool switch1 = false;
    bool switch2 = false;
    bool switch3 = false;
    bool switch4 = false;
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: setCustomAppBar(context, '隐私'),
        body: ListView(
          children: <Widget>[
            ListTile(
                contentPadding:
                    EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(30)),
                title: Text(
                  '加我为朋友时需要验证',
                  style: TextStyle(
                      fontSize: ScreenUtil().setSp(24), color: Color(0xFF333333)),
                ),
                trailing: Switch(
                    value: switch1,
                    onChanged: (value) {
                      setState(() {
                        switch1 = value;
                      });
                    })),
            ListTile(
                contentPadding:
                    EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(30)),
                title: Text(
                  '想我推荐通讯录朋友',
                  style: TextStyle(
                      fontSize: ScreenUtil().setSp(24), color: Color(0xFF333333)),
                ),
                subtitle: Text(
                  '开启后,为您推荐通讯录好友',
                  style: TextStyle(
                      fontSize: ScreenUtil().setSp(16), color: Color(0xFFcccccc)),
                ),
                trailing: Switch(
                    value: switch2,
                    onChanged: (value) {
                      setState(() {
                        switch2 = value;
                      });
                    })),
            ListTile(
                contentPadding:
                    EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(30)),
                title: Text(
                  '添加我的方式',
                  style: TextStyle(
                      fontSize: ScreenUtil().setSp(24), color: Color(0xFF333333)),
                ),
                trailing: Icon(
                  Icons.keyboard_arrow_right,
                  color: Color(0xFF333333),
                  size: ScreenUtil().setWidth(40),
                ),
                onTap: () {}),
            ListTile(
                contentPadding:
                    EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(30)),
                title: Text(
                  '通讯录黑名单',
                  style: TextStyle(
                      fontSize: ScreenUtil().setSp(24), color: Color(0xFF333333)),
                ),
                trailing: Icon(
                  Icons.keyboard_arrow_right,
                  color: Color(0xFF333333),
                  size: ScreenUtil().setWidth(40),
                ),
                onTap: () {}),
            Container(
                height: ScreenUtil().setHeight(20), color: Color(0xFFededed)),
            ListTile(
                contentPadding:
                    EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(30)),
                title: Text(
                  '不让他(她)看我的朋友圈',
                  style: TextStyle(
                      fontSize: ScreenUtil().setSp(24), color: Color(0xFF333333)),
                ),
                trailing: Icon(
                  Icons.keyboard_arrow_right,
                  color: Color(0xFF333333),
                  size: ScreenUtil().setWidth(40),
                ),
                onTap: () {}),
            ListTile(
                contentPadding:
                    EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(30)),
                title: Text(
                  '不看他(她)的朋友圈',
                  style: TextStyle(
                      fontSize: ScreenUtil().setSp(24), color: Color(0xFF333333)),
                ),
                trailing: Icon(
                  Icons.keyboard_arrow_right,
                  color: Color(0xFF333333),
                  size: ScreenUtil().setWidth(40),
                ),
                onTap: () {}),
            ListTile(
                contentPadding:
                    EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(30)),
                title: Text(
                  '允许陌生人查看十条朋友圈',
                  style: TextStyle(
                      fontSize: ScreenUtil().setSp(24), color: Color(0xFF333333)),
                ),
                trailing: Switch(
                    value: switch3,
                    onChanged: (value) {
                      setState(() {
                        switch3 = value;
                      });
                    })),
            ListTile(
                contentPadding:
                    EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(30)),
                title: Text(
                  '朋友圈更新提示',
                  style: TextStyle(
                      fontSize: ScreenUtil().setSp(24), color: Color(0xFF333333)),
                ),
                trailing: Switch(
                    value: switch4,
                    onChanged: (value) {
                      setState(() {
                        switch4 = value;
                      });
                    })),
            Container(
                height: ScreenUtil().setHeight(20), color: Color(0xFFededed)),
            ListTile(
                contentPadding:
                    EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(30)),
                title: Text(
                  '授权管理',
                  style: TextStyle(
                      fontSize: ScreenUtil().setSp(24), color: Color(0xFF333333)),
                ),
                trailing: Icon(
                  Icons.keyboard_arrow_right,
                  color: Color(0xFF333333),
                  size: ScreenUtil().setWidth(40),
                ),
                onTap: () {}),
          ],
        ),
      );
    }
  }
  