2026-04-09 21:32:23 +08:00

133 lines
5.4 KiB
Dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:yumi/app_localizations.dart';
import 'package:yumi/app/constants/sc_global_config.dart';
import 'package:yumi/ui_kit/components/sc_debounce_widget.dart';
import 'package:yumi/ui_kit/components/appbar/socialchat_appbar.dart';
import 'package:yumi/ui_kit/components/text/sc_text.dart';
import 'package:yumi/app/routes/sc_fluro_navigator.dart';
import 'package:yumi/modules/user/settings/settings_route.dart';
class AccountPage extends StatefulWidget {
@override
_AccountPageState createState() => _AccountPageState();
}
class _AccountPageState extends State<AccountPage> {
@override
Widget build(BuildContext context) {
return Stack(
children: [
Image.asset(
SCGlobalConfig.businessLogicStrategy.getAccountPageBackgroundImage(),
width: ScreenUtil().screenWidth,
height: ScreenUtil().screenHeight,
fit: BoxFit.fill,
),
Scaffold(
backgroundColor: SCGlobalConfig.businessLogicStrategy.getAccountPageScaffoldBackgroundColor(),
resizeToAvoidBottomInset: false,
appBar: SocialChatStandardAppBar(
title: SCAppLocalizations.of(context)!.account,
actions: [],
),
body: SafeArea(
top: false,
child: Column(
children: [
Container(
alignment: Alignment.bottomLeft,
margin: EdgeInsets.only(left: 15.w),
child: text(
SCAppLocalizations.of(context)!.account,
textColor: SCGlobalConfig.businessLogicStrategy.getAccountPageSecondaryTextColor(),
fontSize: 12.sp,
),
),
Container(
padding: EdgeInsets.symmetric(vertical: 12.w),
margin: EdgeInsets.symmetric(vertical: 8.w, horizontal: 15.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: SCGlobalConfig.businessLogicStrategy.getAccountPageMainContainerBackgroundColor(),
),
child: Column(
children: [
SCDebounceWidget(
child: Row(
children: [
SizedBox(width: 18.w),
text(
SCAppLocalizations.of(context)!.setAccount,
textColor: SCGlobalConfig.businessLogicStrategy.getAccountPagePrimaryTextColor(),
fontSize: 13.sp,
),
Spacer(),
Icon(
Icons.keyboard_arrow_right,
size: 15.w,
color: SCGlobalConfig.businessLogicStrategy.getAccountPageIconColor(),
),
SizedBox(width: 18.w),
],
),
onTap: () {
SCNavigatorUtils.push(
context,
SettingsRoute.setAccount,
replace: false,
);
},
),
],
),
),
Container(
padding: EdgeInsets.symmetric(vertical: 12.w),
margin: EdgeInsets.symmetric(vertical: 8.w, horizontal: 15.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: SCGlobalConfig.businessLogicStrategy.getAccountPageMainContainerBackgroundColor(),
),
child: Column(
children: [
SCDebounceWidget(
child: Row(
children: [
SizedBox(width: 18.w),
text(
SCAppLocalizations.of(context)!.deleteAccount,
textColor: SCGlobalConfig.businessLogicStrategy.getAccountPagePrimaryTextColor(),
fontSize: 13.sp,
),
Spacer(),
Icon(
Icons.keyboard_arrow_right,
size: 15.w,
color: SCGlobalConfig.businessLogicStrategy.getAccountPageIconColor(),
),
SizedBox(width: 18.w),
],
),
onTap: () {
SCNavigatorUtils.push(
context,
SettingsRoute.deleteAccount,
replace: false,
);
},
),
],
),
)
],
),
),
),
],
);
}
}