123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- import 'package:cpt_auth/modules/setting/setting_state.dart';
- import 'package:cs_resources/generated/assets.dart';
- import 'package:flutter/material.dart';
- import 'package:plugin_basic/base/base_stateless_page.dart';
- import 'package:plugin_basic/basic_export.dart';
- import 'package:plugin_basic/utils/ext_get_nav.dart';
- import 'package:router/path/router_path.dart';
- import 'package:shared/utils/screen_util.dart';
- import 'package:widgets/ext/ex_widget.dart';
- import 'package:widgets/my_appbar.dart';
- import 'package:widgets/shatter/setting_item_container.dart';
- import 'setting_controller.dart';
- class SettingPage extends BaseStatelessPage<SettingController> {
- SettingPage({Key? key}) : super(key: key);
- //启动当前页面
- static void startInstance() {
- return Get.start(RouterPath.settings);
- }
- late SettingState state;
- @override
- void initState() {
- state = controller.state;
- }
- @override
- SettingController createRawController() {
- return SettingController();
- }
- @override
- Widget buildWidget(BuildContext context) {
- return Scaffold(
- extendBodyBehindAppBar: true,
- appBar: MyAppBar.appBar(context, "Settings".tr),
- body: SafeArea(
- bottom: true,
- top: false,
- child: Container(
- width: double.infinity,
- height: double.infinity,
- padding: EdgeInsets.only(top: kToolbarHeight + ScreenUtil.getStatusBarH(context) + 1),
- decoration: const BoxDecoration(
- gradient: LinearGradient(
- colors: [
- Color(0xFF091D44),
- Color(0xFF245A8A),
- Color(0xFF7F7CEC),
- ],
- begin: Alignment.topCenter,
- end: Alignment.bottomCenter,
- ),
- ),
- child: Column(children: [
- SizedBox(height: 10),
- // SettingItemContainer(iconPath: Assets.mainSettingSwitchProject, title: "Switch Projects".tr).onTap(() {
- // controller.switchProjects();
- // }),
- SettingItemContainer(iconPath: Assets.mainSettingResetPassword, title: "Reset Password".tr).onTap(() {
- controller.gotoResetPasswordPage();
- }),
- SettingItemContainer(iconPath: Assets.mainSettingAccountDelectivation, title: "Account Deactivation".tr).onTap(() {
- controller.doAccountDelete();
- }),
- SettingItemContainer(iconPath: Assets.mainSettingLogOut, title: "Logout".tr).onTap(() {
- controller.doLogout();
- }),
- ]),
- ),
- ),
- );
- }
- }
|