import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:sk_base_mobile/app_theme.dart'; import 'package:sk_base_mobile/screens/mine/mine.controller.dart'; import 'package:sk_base_mobile/store/auth.store.dart'; import 'package:sk_base_mobile/util/screen_adaper_util.dart'; class MineSettingsPage extends StatelessWidget { final _controller = Get.find(); MineSettingsPage({super.key}); @override Widget build(BuildContext context) { return Container( padding: EdgeInsets.symmetric(horizontal: ScreenAdaper.width(15)), child: ListView.separated( separatorBuilder: (_, index) => const Divider( color: Color(0xFFCCCCCC), ), itemBuilder: ((_, index) => _buildSettingsItem( index, )), itemCount: 4), ); } Widget _buildSettingsItem(int index) { switch (index) { // auto translate case 0: return Container( padding: EdgeInsets.symmetric(vertical: ScreenAdaper.width(10)), child: Row( children: [], )); 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', style: TextStyle(fontSize: ScreenAdaper.sp(18)), ), ], ))); case 2: return InkWell( onTap: () async { await AuthStore.to.logout(force: true); }, child: Container( padding: EdgeInsets.symmetric(vertical: ScreenAdaper.width(10)), child: Row( children: [ Text( 'Logout', style: TextStyle(fontSize: ScreenAdaper.sp(18)), ), ], ))); default: return SizedBox(); } } }