| | |
| | | class _SettingPageState extends State<SettingPage> |
| | | with SingleTickerProviderStateMixin { |
| | | bool msg = false; |
| | | bool ad = false; |
| | | bool ad = true; |
| | | bool content = true; |
| | | bool login = false; |
| | | |
| | | String cacheSize = "0B"; |
| | |
| | | |
| | | SettingUtil.isEnablePush().then((value) { |
| | | setState(() { |
| | | msg = value; |
| | | msg = value!; |
| | | }); |
| | | }); |
| | | |
| | | SettingUtil.isEnableRecommendAd().then((value) { |
| | | ad = value; |
| | | setState(() { |
| | | ad = value!; |
| | | }); |
| | | }); |
| | | |
| | | SettingUtil.isEnableRecommendContent().then((value) { |
| | | setState(() { |
| | | content = value!; |
| | | }); |
| | | }); |
| | | } |
| | | |
| | |
| | | UserUtil.getUid(); |
| | | // popPage(context); |
| | | }); |
| | | |
| | | } else { |
| | | ToastUtil.toast(map["msg"], context); |
| | | } |
| | |
| | | content: "关闭后,内容数量将不变,但内容相关度会降低", |
| | | marginTop: 0, |
| | | marginBottom: 1, |
| | | checked: ad, |
| | | checked: content, |
| | | changed: (bool value) { |
| | | SettingUtil.setRecommendAd(value).then((value1) { |
| | | SettingUtil.setRecommendContent(value).then((value1) { |
| | | setState(() { |
| | | ad = value; |
| | | content = value; |
| | | }); |
| | | }); |
| | | }), |
| | |
| | | title: "账户注销", |
| | | content: "", |
| | | onClick: () { |
| | | |
| | | MySharedPreferences.getInstance().getString("unRegisterLink").then((value) { |
| | | MySharedPreferences.getInstance() |
| | | .getString("unRegisterLink") |
| | | .then((value) { |
| | | if (!StringUtil.isNullOrEmpty(value)) { |
| | | NavigatorUtil.navigateToNextPage(context, |
| | | BrowserPage(title: "账户注销", url: value!), (data) {}); |
| | |
| | | title: "隐私投诉", |
| | | content: "", |
| | | onClick: () { |
| | | MySharedPreferences.getInstance().getString("feedBackLink").then((value) { |
| | | MySharedPreferences.getInstance() |
| | | .getString("feedBackLink") |
| | | .then((value) { |
| | | if (!StringUtil.isNullOrEmpty(value)) { |
| | | NavigatorUtil.navigateToNextPage(context, |
| | | BrowserPage(title: "隐私投诉", url: value!), (data) {}); |