123 lines
5.0 KiB
Dart
123 lines
5.0 KiB
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:aslan/app_localizations.dart';
|
|
import 'package:aslan/chatvibe_core/constants/at_global_config.dart';
|
|
import 'package:aslan/chatvibe_ui/components/at_debounce_widget.dart';
|
|
|
|
import 'package:aslan/chatvibe_ui/components/appbar/chatvibe_appbar.dart';
|
|
import 'package:aslan/chatvibe_ui/components/text/at_text.dart';
|
|
import 'package:aslan/chatvibe_core/routes/at_fluro_navigator.dart';
|
|
import 'package:aslan/chatvibe_features/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(
|
|
ATGlobalConfig.businessLogicStrategy.getAccountPageBackgroundImage(),
|
|
width: ScreenUtil().screenWidth,
|
|
height: ScreenUtil().screenHeight,
|
|
fit: BoxFit.fill,
|
|
),
|
|
Scaffold(
|
|
backgroundColor: ATGlobalConfig.businessLogicStrategy.getAccountPageScaffoldBackgroundColor(),
|
|
resizeToAvoidBottomInset: false,
|
|
appBar: ChatVibeStandardAppBar(
|
|
title: ATAppLocalizations.of(context)!.account,
|
|
actions: [],
|
|
),
|
|
body: SafeArea(
|
|
top: false,
|
|
child: Column(
|
|
children: [
|
|
Container(
|
|
alignment: Alignment.bottomLeft,
|
|
margin: EdgeInsets.only(left: 15.w),
|
|
child: text(
|
|
ATAppLocalizations.of(context)!.account,
|
|
textColor: ATGlobalConfig.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: ATGlobalConfig.businessLogicStrategy.getAccountPageMainContainerBackgroundColor(),
|
|
border: Border.all(color: ATGlobalConfig.businessLogicStrategy.getAccountPageMainContainerBorderColor(), width: 1.w),
|
|
),
|
|
child: Column(
|
|
children: [
|
|
ATDebounceWidget(
|
|
child: Row(
|
|
children: [
|
|
SizedBox(width: 18.w),
|
|
text(
|
|
ATAppLocalizations.of(context)!.setAccount,
|
|
textColor: ATGlobalConfig.businessLogicStrategy.getAccountPagePrimaryTextColor(),
|
|
fontSize: 13.sp,
|
|
),
|
|
Spacer(),
|
|
Icon(
|
|
Icons.keyboard_arrow_right,
|
|
size: 15.w,
|
|
color: ATGlobalConfig.businessLogicStrategy.getAccountPageIconColor(),
|
|
),
|
|
SizedBox(width: 18.w),
|
|
],
|
|
),
|
|
onTap: () {
|
|
ATNavigatorUtils.push(
|
|
context,
|
|
SettingsRoute.setAccount,
|
|
replace: false,
|
|
);
|
|
},
|
|
),
|
|
Divider(color: ATGlobalConfig.businessLogicStrategy.getAccountPageDividerColor(), thickness: 0.5),
|
|
ATDebounceWidget(
|
|
child: Row(
|
|
children: [
|
|
SizedBox(width: 18.w),
|
|
text(
|
|
ATAppLocalizations.of(context)!.deleteAccount,
|
|
textColor: ATGlobalConfig.businessLogicStrategy.getAccountPagePrimaryTextColor(),
|
|
fontSize: 13.sp,
|
|
),
|
|
Spacer(),
|
|
Icon(
|
|
Icons.keyboard_arrow_right,
|
|
size: 15.w,
|
|
color: ATGlobalConfig.businessLogicStrategy.getAccountPageIconColor(),
|
|
),
|
|
SizedBox(width: 18.w),
|
|
],
|
|
),
|
|
onTap: () {
|
|
ATNavigatorUtils.push(
|
|
context,
|
|
SettingsRoute.deleteAccount,
|
|
replace: false,
|
|
);
|
|
},
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|