|
|
|
@ -1,3 +1,7 @@ |
|
|
|
import 'package:dating_touchme_app/controller/discover/discover_controller.dart'; |
|
|
|
import 'package:dating_touchme_app/controller/home/home_controller.dart'; |
|
|
|
import 'package:dating_touchme_app/controller/message/conversation_controller.dart'; |
|
|
|
import 'package:dating_touchme_app/controller/mine/mine_controller.dart'; |
|
|
|
import 'package:dating_touchme_app/pages/mine/login_page.dart'; |
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
@ -27,13 +31,6 @@ class SettingPage extends StatelessWidget { |
|
|
|
TDCellGroup( |
|
|
|
theme: TDCellGroupTheme.cardTheme, |
|
|
|
cells: [ |
|
|
|
TDCell( |
|
|
|
arrow: false, |
|
|
|
title: '允许中间邀请弹窗', |
|
|
|
rightIconWidget: TDSwitch(isOn: false,trackOnColor: const Color.fromRGBO(117, 98, 249, 1),onChanged: (bool e) { |
|
|
|
return false; |
|
|
|
}) |
|
|
|
), |
|
|
|
TDCell( |
|
|
|
arrow: false, |
|
|
|
title: '后台播放', |
|
|
|
@ -59,12 +56,11 @@ class SettingPage extends StatelessWidget { |
|
|
|
TDCellGroup( |
|
|
|
theme: TDCellGroupTheme.cardTheme, |
|
|
|
cells: [ |
|
|
|
TDCell(arrow: true, title: '安全中心', onClick: (cell) { |
|
|
|
print('安全中心'); |
|
|
|
}), |
|
|
|
TDCell(arrow: true, title: '黑名单', onClick: (cell) { |
|
|
|
Get.to(() => BlacklistPage()); |
|
|
|
}), |
|
|
|
TDCell(arrow: true, title: '隐私设置'), |
|
|
|
TDCell(arrow: true, title: '青少年模式'), |
|
|
|
], |
|
|
|
), |
|
|
|
const SizedBox(height: 12), |
|
|
|
@ -83,62 +79,113 @@ class SettingPage extends StatelessWidget { |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
const SizedBox(height: 64), |
|
|
|
TDButton( |
|
|
|
text: '退出登录', |
|
|
|
width: MediaQuery.of(context).size.width - 40, |
|
|
|
size: TDButtonSize.large, |
|
|
|
type: TDButtonType.fill, |
|
|
|
shape: TDButtonShape.round, |
|
|
|
theme: TDButtonTheme.danger, |
|
|
|
onTap: () { |
|
|
|
showGeneralDialog( |
|
|
|
context: context, |
|
|
|
pageBuilder: (BuildContext buildContext, Animation< |
|
|
|
double> animation, |
|
|
|
Animation<double> secondaryAnimation) { |
|
|
|
return TDAlertDialog( |
|
|
|
title: '是否退出当前账号?', |
|
|
|
buttonWidget: Container( |
|
|
|
padding: EdgeInsetsGeometry.only(top: 16.w, |
|
|
|
right: 30.w, |
|
|
|
left: 30.w, |
|
|
|
bottom: 32.w), |
|
|
|
child: Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
children: [ |
|
|
|
TDButton( |
|
|
|
text: '取 消', |
|
|
|
width: 120, |
|
|
|
size: TDButtonSize.large, |
|
|
|
type: TDButtonType.fill, |
|
|
|
shape: TDButtonShape.round, |
|
|
|
theme: TDButtonTheme.defaultTheme, |
|
|
|
onTap: () { |
|
|
|
Navigator.of(context).pop(); |
|
|
|
}, |
|
|
|
), |
|
|
|
TDButton( |
|
|
|
text: '确 定', |
|
|
|
width: 120, |
|
|
|
size: TDButtonSize.large, |
|
|
|
type: TDButtonType.fill, |
|
|
|
shape: TDButtonShape.round, |
|
|
|
theme: TDButtonTheme.danger, |
|
|
|
onTap: () { |
|
|
|
controller.logout(); |
|
|
|
Get.offAll(() => LoginPage()); |
|
|
|
}, |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
) |
|
|
|
); |
|
|
|
}, |
|
|
|
); |
|
|
|
}, |
|
|
|
const SizedBox(height: 12), |
|
|
|
TDCellGroup( |
|
|
|
theme: TDCellGroupTheme.cardTheme, |
|
|
|
cells: [ |
|
|
|
TDCell(arrow: true, title: '退出登录', onClick: (cell){ |
|
|
|
showGeneralDialog( |
|
|
|
context: context, |
|
|
|
pageBuilder: (BuildContext buildContext, Animation< |
|
|
|
double> animation, |
|
|
|
Animation<double> secondaryAnimation) { |
|
|
|
return TDAlertDialog( |
|
|
|
title: '是否退出当前账号?', |
|
|
|
buttonWidget: Container( |
|
|
|
padding: EdgeInsetsGeometry.only(top: 16.w, |
|
|
|
right: 30.w, |
|
|
|
left: 30.w, |
|
|
|
bottom: 32.w), |
|
|
|
child: Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
children: [ |
|
|
|
TDButton( |
|
|
|
text: '取 消', |
|
|
|
width: 120, |
|
|
|
size: TDButtonSize.large, |
|
|
|
type: TDButtonType.fill, |
|
|
|
shape: TDButtonShape.round, |
|
|
|
theme: TDButtonTheme.defaultTheme, |
|
|
|
onTap: () { |
|
|
|
Navigator.of(context).pop(); |
|
|
|
}, |
|
|
|
), |
|
|
|
TDButton( |
|
|
|
text: '确 定', |
|
|
|
width: 120, |
|
|
|
size: TDButtonSize.large, |
|
|
|
type: TDButtonType.fill, |
|
|
|
shape: TDButtonShape.round, |
|
|
|
theme: TDButtonTheme.danger, |
|
|
|
onTap: () { |
|
|
|
controller.logout(); |
|
|
|
Get.offAll(() => LoginPage()); |
|
|
|
}, |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
) |
|
|
|
); |
|
|
|
}, |
|
|
|
); |
|
|
|
},), |
|
|
|
|
|
|
|
TDCell(arrow: true, title: '退出登录', titleWidget: Text( |
|
|
|
"账号注销", |
|
|
|
style: TextStyle( |
|
|
|
color: const Color.fromRGBO(248, 85, 66, 1), |
|
|
|
fontSize: TDTheme.of(context).fontBodyLarge?.size ?? 16, |
|
|
|
height: TDTheme.of(context).fontBodyLarge?.height ?? 24, |
|
|
|
fontWeight: FontWeight.w400, |
|
|
|
), |
|
|
|
), onClick: (cell){ |
|
|
|
showGeneralDialog( |
|
|
|
context: context, |
|
|
|
pageBuilder: (BuildContext buildContext, Animation< |
|
|
|
double> animation, |
|
|
|
Animation<double> secondaryAnimation) { |
|
|
|
return TDAlertDialog( |
|
|
|
title: '是否退出当前账号?', |
|
|
|
buttonWidget: Container( |
|
|
|
padding: EdgeInsetsGeometry.only(top: 16.w, |
|
|
|
right: 30.w, |
|
|
|
left: 30.w, |
|
|
|
bottom: 32.w), |
|
|
|
child: Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
children: [ |
|
|
|
TDButton( |
|
|
|
text: '取 消', |
|
|
|
width: 120, |
|
|
|
size: TDButtonSize.large, |
|
|
|
type: TDButtonType.fill, |
|
|
|
shape: TDButtonShape.round, |
|
|
|
theme: TDButtonTheme.defaultTheme, |
|
|
|
onTap: () { |
|
|
|
Navigator.of(context).pop(); |
|
|
|
}, |
|
|
|
), |
|
|
|
TDButton( |
|
|
|
text: '确 定', |
|
|
|
width: 120, |
|
|
|
size: TDButtonSize.large, |
|
|
|
type: TDButtonType.fill, |
|
|
|
shape: TDButtonShape.round, |
|
|
|
theme: TDButtonTheme.danger, |
|
|
|
onTap: () { |
|
|
|
controller.logout(); |
|
|
|
Get.offAll(() => LoginPage()); |
|
|
|
}, |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
) |
|
|
|
); |
|
|
|
}, |
|
|
|
); |
|
|
|
},), |
|
|
|
], |
|
|
|
), |
|
|
|
const SizedBox(height: 24), |
|
|
|
], |
|
|
|
); |
|
|
|
}), |
|
|
|
|