2024-03-19 08:59:08 +08:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:sk_base_mobile/app_theme.dart';
|
2024-04-07 17:32:46 +08:00
|
|
|
import 'package:sk_base_mobile/constants/bg_color.dart';
|
|
|
|
import 'package:sk_base_mobile/services/app_info.service.dart';
|
2024-03-19 08:59:08 +08:00
|
|
|
import 'package:sk_base_mobile/store/auth.store.dart';
|
|
|
|
import 'package:sk_base_mobile/util/screen_adaper_util.dart';
|
|
|
|
|
|
|
|
class MineSettingsPage extends StatelessWidget {
|
2024-03-31 17:13:29 +08:00
|
|
|
const MineSettingsPage({super.key});
|
2024-03-19 08:59:08 +08:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Container(
|
2024-03-27 11:06:01 +08:00
|
|
|
padding: EdgeInsets.symmetric(horizontal: ScreenAdaper.width(15)),
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border.all(),
|
|
|
|
borderRadius: BorderRadius.circular(15),
|
|
|
|
color: AppTheme.nearlyWhite),
|
2024-04-07 17:32:46 +08:00
|
|
|
width: ScreenAdaper.width(600),
|
2024-03-27 11:06:01 +08:00
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(vertical: ScreenAdaper.width(10)),
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () async {
|
|
|
|
await AuthStore.to.logout(force: true);
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenAdaper.width(20),
|
|
|
|
vertical: ScreenAdaper.width(20)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'退出登录',
|
|
|
|
style: TextStyle(
|
2024-04-07 17:32:46 +08:00
|
|
|
fontSize: ScreenAdaper.height(30),
|
|
|
|
fontWeight: FontWeight.w600),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)))),
|
|
|
|
SizedBox(
|
|
|
|
height: ScreenAdaper.height(defaultPadding),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border.all(),
|
|
|
|
borderRadius: BorderRadius.circular(15),
|
|
|
|
color: AppTheme.nearlyWhite),
|
|
|
|
width: ScreenAdaper.width(600),
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(vertical: ScreenAdaper.width(10)),
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () async {
|
2024-04-08 13:50:23 +08:00
|
|
|
await AppInfoService.to.checkVersion(forceCheck: true);
|
2024-04-07 17:32:46 +08:00
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenAdaper.width(20),
|
|
|
|
vertical: ScreenAdaper.width(20)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'v${AppInfoService.to.versionNumber}',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenAdaper.height(25),
|
|
|
|
fontWeight: FontWeight.w400),
|
|
|
|
),
|
|
|
|
const Spacer(),
|
|
|
|
Text(
|
|
|
|
'检查更新',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenAdaper.height(30),
|
2024-03-27 11:06:01 +08:00
|
|
|
fontWeight: FontWeight.w600),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
))))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
));
|
2024-03-19 08:59:08 +08:00
|
|
|
}
|
|
|
|
|
2024-03-27 11:06:01 +08:00
|
|
|
// Widget _buildSettingsItem(int index) {
|
|
|
|
// switch (index) {
|
|
|
|
// // auto translate
|
|
|
|
// case 0:
|
|
|
|
// return;
|
|
|
|
// case 1:
|
|
|
|
// return InkWell(
|
|
|
|
// onTap: () async {
|
|
|
|
// await AuthStore.to.deleteAccount();
|
|
|
|
// },
|
|
|
|
// child: Container(
|
|
|
|
// padding: EdgeInsets.symmetric(vertical: ScreenAdaper.width(10)),
|
|
|
|
// child: Row(
|
|
|
|
// children: [
|
|
|
|
// Text(
|
|
|
|
// 'Delete acount',
|
2024-03-28 17:18:46 +08:00
|
|
|
// style: TextStyle(fontSize: ScreenAdaper.height(18)),
|
2024-03-27 11:06:01 +08:00
|
|
|
// ),
|
|
|
|
// ],
|
|
|
|
// )));
|
|
|
|
// case 2:
|
|
|
|
// return I;
|
|
|
|
// default:
|
|
|
|
// return SizedBox();
|
|
|
|
// }
|
|
|
|
// }
|
2024-03-19 08:59:08 +08:00
|
|
|
}
|