mobile_skt/lib/screens/mine/mine.dart

120 lines
4.3 KiB
Dart
Raw Permalink Normal View History

2024-10-16 09:48:17 +08:00
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:sk_base_mobile/screens/mine/settings/mine_settings.dart';
// import 'package:sk_base_mobile/screens/mine/mine_about.dart';
// import 'package:sk_base_mobile/screens/mine/mine_block.dart';
// import 'package:sk_base_mobile/screens/mine/mine_mytickets.dart';
// import 'package:sk_base_mobile/screens/mine/mine_settings.dart';
import 'package:sk_base_mobile/store/auth.store.dart';
import 'package:sk_base_mobile/util/screen_adaper_util.dart';
import 'package:sk_base_mobile/widgets/my_avatar.dart';
import 'package:sk_base_mobile/app_theme.dart';
class MinePage extends StatefulWidget {
const MinePage({super.key});
@override
State<MinePage> createState() => _MinePageState();
}
class _MinePageState extends State<MinePage>
with SingleTickerProviderStateMixin {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Container(
color: AppTheme.nearlyWhite,
child: _buildBody(),
);
}
Widget _buildBody() {
return Column(children: [
Container(
height: ScreenAdaper.height(350),
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [AppTheme.primaryColorLight, AppTheme.primaryColor])
// image: DecorationImage(
// fit: BoxFit.cover,
// image: AssetImage('assets/images/yeyazhijia_bg.jpg'))
),
// decoration: BoxDecoration(
// gradient: LinearGradient(
// colors: [AppTheme.primaryColorLight, AppTheme.primaryColor])),
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: ScreenAdaper.width(20),
vertical: ScreenAdaper.height(20)),
child: Column(children: [
SizedBox(
height: ScreenAdaper.height(100),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
MyAvatarWidget(),
SizedBox(
height: ScreenAdaper.height(10),
),
Obx(
() => Stack(
alignment: Alignment.center,
children: [
Text(
AuthStore.to.userInfo.value.nickname ?? '',
style: TextStyle(
letterSpacing: ScreenAdaper.width(5),
fontSize: ScreenAdaper.height(35),
fontWeight: FontWeight.bold,
foreground: Paint()
..style = PaintingStyle.stroke
..strokeWidth = 2
..color = Colors.black),
),
Text(
AuthStore.to.userInfo.value.nickname ?? '',
style: TextStyle(
letterSpacing: ScreenAdaper.width(5),
color: Colors.white,
fontSize: ScreenAdaper.height(35),
fontWeight: FontWeight.bold),
),
],
),
)
],
)
],
)
]),
),
),
SizedBox(
height: ScreenAdaper.height(50),
),
const Expanded(child: MineSettingsPage())
// Expanded(
// child: DefaultTabController(
// length: 4,
// initialIndex: _controller.selectedTabIndex.value,
// child: Scaffold(
// backgroundColor: AppTheme.white,
// appBar: AppBar(
// backgroundColor: AppTheme.white,
// elevation: 0,
// automaticallyImplyLeading: false,
// flexibleSpace: _buildTabBar(),
// ),
// body: _buildTabView())))
]);
}
}