Browse Source

对接完成修改信息接口,优化一些逻辑处理

ios
王子贤 4 months ago
parent
commit
eee40cb8c8
23 changed files with 658 additions and 908 deletions
  1. 1
      android/app/src/main/AndroidManifest.xml
  2. 13
      lib/components/page_appbar.dart
  3. 13
      lib/controller/mine/login_controller.dart
  4. 5
      lib/controller/mine/mine_controller.dart
  5. 2
      lib/controller/mine/user_controller.dart
  6. 90
      lib/controller/mine/user_info_controller.dart
  7. 103
      lib/controller/setting/notification_controller.dart
  8. 230
      lib/controller/setting/setting_controller.dart
  9. 4
      lib/main.dart
  10. 12
      lib/model/mine/user_data.dart
  11. 1
      lib/network/network_config.dart
  12. 2
      lib/pages/home/report_page.dart
  13. 6
      lib/pages/mine/auth_center_page.dart
  14. 174
      lib/pages/mine/login_controller.dart
  15. 5
      lib/pages/mine/mine_page.dart
  16. 6
      lib/pages/mine/phone_page.dart
  17. 6
      lib/pages/mine/real_name_page.dart
  18. 410
      lib/pages/mine/setting_page.dart
  19. 111
      lib/pages/mine/user_info_page.dart
  20. 0
      lib/pages/setting/blacklist_page.dart
  21. 114
      lib/pages/setting/notice_page.dart
  22. 256
      lib/pages/setting/setting_page.dart
  23. 2
      pubspec.yaml

1
android/app/src/main/AndroidManifest.xml

@ -4,6 +4,7 @@
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<application
android:label="动我"
android:name="${applicationName}"

13
lib/components/page_appbar.dart

@ -5,10 +5,10 @@ class PageAppbar extends StatelessWidget implements PreferredSizeWidget {
final Color? backgroundColor;
final Color? color;
final bool? bottom;
final String title;
final Widget? right;
const PageAppbar({super.key, required this.title, this.backgroundColor, this.color, this.right});
const PageAppbar({super.key, required this.title, this.backgroundColor, this.color, this.right, this.bottom});
@override
Widget build(BuildContext context) {
@ -21,11 +21,18 @@ class PageAppbar extends StatelessWidget implements PreferredSizeWidget {
title: Text(
title,
style: TextStyle(
fontSize: 20,
fontSize: 16,
fontWeight: FontWeight.bold,
color: const Color.fromRGBO(51, 51, 51, 1)
),
),
bottom: (bottom != null && bottom!) ? PreferredSize(
preferredSize: Size.fromHeight(0.5),
child: Container(
color: Colors.grey[300],
height: 0.5,
),
) : null,
);
}
@override

13
lib/controller/mine/login_controller.dart

@ -1,4 +1,5 @@
import 'dart:async';
import 'package:dating_touchme_app/controller/global.dart';
import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
@ -110,14 +111,14 @@ class LoginController extends GetxController {
if (response.data.isSuccess) {
// token和用户信息
if (response.data.data != null) {
final loginData = response.data.data!;
await storage.write('token', loginData.token);
await storage.write('userId', loginData.userId);
//
await storage.write('userInfo', loginData.toJson());
final result = response.data.data!;
GlobalData().userId = result.userId;
GlobalData().qnToken = result.token;
await storage.write('token', result.token);
// await storage.write('userId', result.userId);
//
await _handleUserInfoRetrieval(loginData.userId);
await _handleUserInfoRetrieval(result.userId);
}
} else {
SmartDialog.showToast(response.data.message);

5
lib/controller/mine/mine_controller.dart

@ -1,13 +1,12 @@
import 'package:dating_touchme_app/controller/global.dart';
import 'package:dating_touchme_app/generated/assets.dart';
import 'package:dating_touchme_app/model/mine/user_data.dart';
import 'package:dating_touchme_app/pages/mine/auth_center_page.dart';
import 'package:dating_touchme_app/pages/mine/my_wallet_page.dart';
import 'package:dating_touchme_app/pages/mine/rose_page.dart';
import 'package:dating_touchme_app/pages/mine/setting_page.dart';
import 'package:dating_touchme_app/pages/mine/user_help_center_page.dart';
import 'package:get/get.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import '../../pages/setting/setting_page.dart';
class MineController extends GetxController {

2
lib/controller/mine/user_controller.dart

@ -85,8 +85,8 @@ class UserController extends GetxController {
if (response.data.isSuccess && response.data.data != null) {
//
final baseInfo = response.data.data!;
final result = await _userApi.getMarriageInformationDetail();
// print(result.data);
if (result.data.isSuccess) {
if(result.data.data == null){
if(isMain){

90
lib/controller/mine/user_info_controller.dart

@ -1,4 +1,5 @@
import 'dart:io';
import 'package:dating_touchme_app/controller/global.dart';
import 'package:dating_touchme_app/oss/oss_manager.dart';
import 'package:flustars/flustars.dart';
import 'package:get/get.dart';
@ -6,6 +7,7 @@ import 'package:permission_handler/permission_handler.dart';
import 'package:get_storage/get_storage.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:image_picker/image_picker.dart';
import '../../model/mine/user_data.dart';
import '../../network/user_api.dart';
import '../../pages/main/main_page.dart';
@ -25,7 +27,12 @@ class UserInfoController extends GetxController {
// GetStorage实例
final storage = GetStorage();
Map<String, String> educationCodeMap = {
'大专以下': '0',
'大专': '1',
'本科': '2',
'硕士及以上': '3',
};
// UserApi实例
late UserApi _userApi;
@ -221,12 +228,7 @@ class UserInfoController extends GetxController {
}
//
Map<String, String> educationCodeMap = {
'大专以下': '0',
'大专': '1',
'本科': '2',
'硕士及以上': '3',
};
return {
'birthYear': birthYear,
@ -243,18 +245,13 @@ class UserInfoController extends GetxController {
if (!_validateForm()) {
return;
}
isSubmitting.value = true;
try {
//
final params = _buildSubmitParams();
if (avatarUrl.value.isNotEmpty) {
params['avatarUrl'] = avatarUrl.value;
}
//
print('提交用户信息参数: $params');
@ -264,40 +261,17 @@ class UserInfoController extends GetxController {
//
if (response.data.isSuccess) {
// miIdid
String miId = '';
final regData = response.data.data;
if (regData != null) {
miId = regData;
await storage.write('miId', miId);
} else {
//
final stored = storage.read('miId');
if (stored is String && stored.isNotEmpty) {
miId = stored;
} else {
SmartDialog.showToast('获取资料ID失败,请重试');
return;
}
}
String miId = response.data.data;
// authenticationCode=8
try {
final payload = {
'miId': miId,
'authenticationCode': '8',
'value': '0',
'imgUrl': avatarUrl.value.isNotEmpty ? [avatarUrl.value] : ['0'],
};
final auditResp = await _userApi.saveCertificationAudit(payload);
if (auditResp.data.isSuccess) {
}
else{
SmartDialog.showToast(auditResp.data.message);
return;
if(avatarUrl.value.isNotEmpty){
final payload = {
'miId': miId,
'authenticationCode': '8',
'value': '0',
'imgUrl': avatarUrl.value.isNotEmpty ? [avatarUrl.value] : ['0'],
};
await _userApi.saveCertificationAudit(payload);
}
} catch (e) {
print('保存认证审核失败: $e');
@ -306,23 +280,21 @@ class UserInfoController extends GetxController {
}
//
final currentUserInfo = storage.read('userInfo') ?? {};
if (currentUserInfo is Map<String, dynamic>) {
currentUserInfo.addAll({
'gender': gender.value,
'nickname': nickname.value,
'birthday': birthday.value,
'education': education.value,
'avatarUrl': avatarUrl.value,
});
await storage.write('userInfo', currentUserInfo);
}
GlobalData().userData!.id = miId;
final genderCode = gender.value == 'male' ? 0 : 1;// 1:, 2:
GlobalData().userData!.genderCode = genderCode;
GlobalData().userData!.nickName = nickname.value;
GlobalData().userData!.profilePhoto = avatarUrl.value;
GlobalData().userData!.education = education.value;
final code = educationCodeMap[education.value] ?? '0';
GlobalData().userData!.educationCode = int.parse(code);
//
SmartDialog.showToast('信息提交成功!');
SmartDialog.showToast('信息提交成功');
//
Future.delayed(const Duration(milliseconds: 1500), () {
// await storage.write('token', GlobalData().qnToken);
await storage.write('userId', GlobalData().userId);
Future.delayed(const Duration(milliseconds: 100), () {
// MainPage
Get.offAll(() => MainPage());
});

103
lib/controller/setting/notification_controller.dart

@ -0,0 +1,103 @@
// controllers/notification_controller.dart
import 'package:get/get.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:app_settings/app_settings.dart';
class NotificationController extends GetxController {
//
final Rx<PermissionStatus> notificationStatus = PermissionStatus.denied.obs;
final RxBool checking = false.obs;
//
@override
void onInit() {
super.onInit();
//
checkPermission();
}
//
Future<PermissionStatus> checkPermission() async {
checking.value = true;
try {
//
final status = await Permission.notification.status;
notificationStatus.value = status;
print('通知权限状态: $status');
return status;
} catch (e) {
print('检查通知权限失败: $e');
return PermissionStatus.denied;
} finally {
checking.value = false;
}
}
//
Future<PermissionStatus> requestNotificationPermission() async {
try {
final status = await Permission.notification.request();
notificationStatus.value = status;
print('请求通知权限结果: $status');
return status;
} catch (e) {
print('请求通知权限失败: $e');
return PermissionStatus.denied;
}
}
//
Future<void> openSettings() async {
try {
AppSettings.openAppSettings(
type: AppSettingsType.notification,
);
} catch (e) {
print('打开设置页面失败: $e');
}
}
// 便
// Future<bool> hasNotificationPermission() async {
// final status = await checkNotificationPermission();
// return status.isGranted || status.isLimited;
// }
//
String getPermissionStatusText() {
switch (notificationStatus.value) {
case PermissionStatus.granted:
return '已开启';
case PermissionStatus.denied:
return '已拒绝';
case PermissionStatus.restricted:
return '受限制';
case PermissionStatus.limited:
return '部分授权';
case PermissionStatus.permanentlyDenied:
return '永久拒绝';
case PermissionStatus.provisional:
return '临时授权';
}
}
//
String getPermissionStatusColor() {
switch (notificationStatus.value) {
case PermissionStatus.granted:
return '绿色';
case PermissionStatus.denied:
return '橙色';
case PermissionStatus.restricted:
return '红色';
case PermissionStatus.limited:
return '蓝色';
case PermissionStatus.permanentlyDenied:
return '红色';
case PermissionStatus.provisional:
return '黄色';
}
}
}

230
lib/controller/setting/setting_controller.dart

@ -0,0 +1,230 @@
import 'dart:async';
import 'package:dating_touchme_app/controller/global.dart';
import 'package:dating_touchme_app/extension/ex_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
import '../../generated/assets.dart';
import 'package:package_info_plus/package_info_plus.dart';
class SettingController extends GetxController {
final storage = GetStorage();
final appName = ''.obs;
final packageName = ''.obs;
final version = ''.obs;
final buildNumber = ''.obs;
@override
Future<void> onInit() async {
super.onInit();
// UserApi
await getAppInfo();
}
//
Future<void> getAppInfo() async {
try {
PackageInfo packageInfo = await PackageInfo.fromPlatform();
appName.value = packageInfo.appName;
packageName.value = packageInfo.packageName;
version.value = packageInfo.version;
buildNumber.value = packageInfo.buildNumber;
} catch (e) {
print('获取应用信息失败: $e');
}
}
Future<void> checkVersion() async {
try {
_showUpdateDialog();
} catch (e) {
print('检测版本跟新失败: $e');
}
}
void logout(){
storage.erase();
GlobalData().logout();
}
// dialog
void _showUpdateDialog(){
Navigator.of(Get.context!).push(TDSlidePopupRoute(
modalBarrierColor: TDTheme.of(Get.context!).fontGyColor2,
slideTransitionFrom: SlideTransitionFrom.center,
builder: (context) {
return Material(
color: Colors.transparent,
child: Container(
color: Colors.transparent,
width: 299.w,
padding: EdgeInsets.only(top: 56.w),
child: Stack(
clipBehavior: Clip.none,
children: [
Container(
width: 299.w,
padding: EdgeInsets.only(
top: 147.w,
left: 30.w,
right: 30.w,
bottom: 25.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(18.w)),
color: Colors.white
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Text(
"体验全新升级v1.2.0",
style: TextStyle(
fontSize: 16.w,
fontWeight: FontWeight.w500
),
),
SizedBox(height: 14.w,),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 2.w,
height: 5.w,
margin: EdgeInsets.only(
right: 10.w,
top: 6.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(2.w)),
color: const Color.fromRGBO(51, 51, 51, 1)
),
),
SizedBox(
width: 204.w,
child: Text(
"首页风格改版,更全面的内容,恍然一新的视觉用户体验。",
style: TextStyle(
fontSize: 12.w,
),
),
)
],
),
SizedBox(height: 8.w,),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 2.w,
height: 5.w,
margin: EdgeInsets.only(
right: 10.w,
top: 6.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(2.w)),
color: const Color.fromRGBO(51, 51, 51, 1)
),
),
SizedBox(
width: 204.w,
child: Text(
"优化了动画细节,让产品更流畅。",
style: TextStyle(
fontSize: 12.w,
),
),
)
],
),
SizedBox(height: 32.w,),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
width: 113.w,
height: 40.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(9.w)),
color: const Color.fromRGBO(245, 245, 245, 1)
),
child: Center(
child: Text(
"暂不更新",
style: TextStyle(
fontSize: 15.w,
color: const Color.fromRGBO(144, 144, 144, 1)
),
),
),
).onTap((){
Navigator.of(context).pop();
}),
Container(
width: 113.w,
height: 40.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(9.w)),
color: const Color.fromRGBO(245, 245, 245, 1),
gradient: const LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight, // CSS 90deg
colors: [
Color.fromRGBO(131, 89, 255, 1), // rgba(131, 89, 255, 1)
Color.fromRGBO(61, 138, 224, 1), // rgba(61, 138, 224, 1)
],
),
),
child: Center(
child: Text(
"立即升级",
style: TextStyle(
fontSize: 15.w,
fontWeight: FontWeight.w500,
color: Colors.white
),
),
),
),
],
)
],
),
),
Positioned(
left: 0,
top: -56.w,
child: Image.asset(
Assets.imagesUpdataBg,
width: 299.w,
),
),
Positioned(
left: 11.w,
top: -14.w,
child: Image.asset(
Assets.imagesUpdataIcon,
width: 36.w,
),
),
Positioned(
left: 43.w,
top: 29.w,
child: Image.asset(
Assets.imagesUpdataFont,
width: 76.w,
),
)
],
),
),
);
}));
}
}

4
lib/main.dart

@ -84,10 +84,10 @@ class MyApp extends StatelessWidget {
// token是否为空
final storage = GetStorage();
final token = storage.read<String>('token');
final userId = storage.read<String>('userId');
// token不为空token为空
if (token != null && token.isNotEmpty) {
if (userId != null && userId.isNotEmpty) {
return MainPage();
} else {
return LoginPage();

12
lib/model/mine/user_data.dart

@ -1,11 +1,11 @@
//
class UserData {
final String? id;
final String? nickName;
String? id;
String? nickName;
final String? name;
final String? profilePhoto;
String? profilePhoto;
String? identityCard;
final int? genderCode;
int? genderCode;
final String? genderValue;
final String? homeCountryCode;
final String? homeCountry;
@ -23,8 +23,8 @@ class UserData {
final String? chineseZodiac;
final int? height;
final int? weight;
final int? educationCode;
final String? education;
int? educationCode;
String? education;
final int? maritalStatusCode;
final String? maritalStatusName;
final int? minimumIncome;

1
lib/network/network_config.dart

@ -83,7 +83,6 @@ class ResponseInterceptor extends Interceptor {
) {
//
final data = response.data;
//
if (response.statusCode == 200) {
// {"code": 0, "message": "success", "data": {...}}

2
lib/pages/home/report_page.dart

@ -23,7 +23,7 @@ class _ReportPageState extends State<ReportPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: PageAppbar(title: "举报中心",),
appBar: PageAppbar(title: "举报中心"),
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.only(

6
lib/pages/mine/auth_center_page.dart

@ -4,6 +4,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../components/page_appbar.dart';
import '../../controller/mine/auth_controller.dart';
import '../../extension/router_service.dart';
import '../../generated/assets.dart';
@ -18,10 +19,7 @@ class AuthCenterPage extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xffF5F5F5),
appBar: AppBar(
title: Text('认证中心', style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)),
centerTitle: true,
),
appBar: PageAppbar(title: "认证中心"),
body: Obx(() {
if (controller.isLoading.value) {
return const Center(child: CupertinoActivityIndicator(radius: 12,));

174
lib/pages/mine/login_controller.dart

@ -1,174 +0,0 @@
// import 'dart:async';
// import 'package:dating_touchme_app/pages/main/main_page.dart';
// import 'package:get/get.dart';
// import 'package:get_storage/get_storage.dart';
// import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
// import 'package:dating_touchme_app/network/user_api.dart';
// import 'package:dating_touchme_app/pages/mine/user_info_page.dart';
//
//
// class LoginController extends GetxController {
// //
// final phoneNumber = ''.obs;
// //
// final verificationCode = ''.obs;
// //
// final isSendingCode = false.obs;
// //
// final countdownSeconds = 0.obs;
// //
// final isLoggingIn = false.obs;
//
// // GetX依赖注入中获取UserApi实例
// late UserApi _userApi;
// // GetStorage实例token等信息
// final storage = GetStorage();
//
// @override
// void onInit() {
// super.onInit();
// // UserApi
// _userApi = Get.find<UserApi>();
// }
//
// //
// Future<void> getVerificationCode() async {
// //
// if (phoneNumber.value.isEmpty || phoneNumber.value.length != 11) {
// SmartDialog.showToast('请输入正确的手机号');
// return;
// }
//
// isSendingCode.value = true;
//
// try {
// //
// final params = {
// 'purpose': 1, //
// 'verifiableAccount': phoneNumber.value,
// 'verifiableAccountType': 1, //
// };
//
// // UserApi中的验证码接口
// final response = await _userApi.getVerificationCode(params);
//
// //
// if (response.data.isSuccess) {
// // 使
// // print('验证码发送成功');
// //
// startCountdown();
// } else {
// SmartDialog.showToast(response.data.message);
// }
// } catch (e) {
// SmartDialog.showToast('网络请求失败,请重试');
// } finally {
// isSendingCode.value = false;
// }
// }
//
// //
// void startCountdown() {
// countdownSeconds.value = 60;
// Timer.periodic(const Duration(seconds: 1), (timer) {
// countdownSeconds.value--;
// if (countdownSeconds.value <= 0) {
// timer.cancel();
// }
// });
// }
//
// // - 使SmartDialog
// // void clearErrorMessage() {}
//
//
// //
// Future<void> login() async {
// //
// if (phoneNumber.value.isEmpty || phoneNumber.value.length != 11) {
// SmartDialog.showToast('请输入正确的手机号');
// return;
// }
//
// if (verificationCode.value.isEmpty) {
// SmartDialog.showToast('请输入验证码');
// return;
// }
//
// isLoggingIn.value = true;
//
// try {
// //
// final params = {
// 'account': phoneNumber.value,
// 'accountType': 2, //
// 'captcha': verificationCode.value,
// };
//
// //
// final response = await _userApi.login(params);
//
// //
// if (response.data.isSuccess) {
// // token和用户信息
// if (response.data.data != null) {
// final loginData = response.data.data!;
// await storage.write('token', loginData.token);
// await storage.write('userId', loginData.userId);
// //
// await storage.write('userInfo', loginData.toJson());
//
// //
// await _getBaseUserInfo(loginData.userId);
// }
// } else {
// SmartDialog.showToast(response.data.message);
// }
// } catch (e) {
// SmartDialog.showToast('网络请求失败,请检查网络连接');
// } finally {
// isLoggingIn.value = false;
// }
// }
//
// //
// Future<void> _getBaseUserInfo(String userId) async {
// try {
// final response = await _userApi.getBaseUserInfo(userId);
//
// if (response.data.isSuccess && response.data.data != null) {
// //
// await _getMarriageInformationDetail();
// } else {
// SmartDialog.showToast(response.data.message);
// }
// } catch (e) {
// //
// SmartDialog.showToast('获取用户信息失败');
// }
// }
//
// //
// Future<void> _getMarriageInformationDetail() async {
// try {
// final response = await _userApi.getMarriageInformationDetail();
// if (response.data.isSuccess) {
// // data是否为null或者是空对象
// if(response.data.data == null){
// //
// SmartDialog.showToast('转到完善信息');
// //
// Get.offAll(() => UserInfoPage());
// }else{
// Get.offAll(MainPage());
// }
// } else {
// //
// }
// } catch (e) {
// //
// print('获取婚姻信息异常: $e');
// }
// }
// }

5
lib/pages/mine/mine_page.dart

@ -1,3 +1,4 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:dating_touchme_app/controller/mine/mine_controller.dart';
import 'package:dating_touchme_app/extension/ex_widget.dart';
import 'package:dating_touchme_app/pages/mine/edit_info_page.dart';
@ -6,9 +7,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:dating_touchme_app/generated/assets.dart';
import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';
import '../../extension/router_service.dart';
import '../discover/visitor_list_page.dart';
class MinePage extends StatefulWidget {
@ -80,7 +79,7 @@ class _MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin{
Assets.imagesUserAvatar,
width: 60.w,
height: 60.w,
),
)
),
SizedBox(width: 14.w,),
Column(

6
lib/pages/mine/phone_page.dart

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
import '../../components/page_appbar.dart';
import '../../controller/mine/phone_controller.dart';
class PhonePage extends StatelessWidget {
@ -13,10 +14,7 @@ class PhonePage extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xffFFFFFF),
appBar: AppBar(
title: Text('手机认证', style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)),
centerTitle: true,
),
appBar: PageAppbar(title: "手机认证", bottom: true),
body: Obx(() {
return IndexedStack(
index: controller.tabIndex.value,

6
lib/pages/mine/real_name_page.dart

@ -4,6 +4,7 @@ import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
import '../../components/page_appbar.dart';
import '../../controller/mine/auth_controller.dart';
class RealNamePage extends StatelessWidget {
@ -14,10 +15,7 @@ class RealNamePage extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xffFFFFFF),
appBar: AppBar(
title: Text('实名认证', style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)),
centerTitle: true,
),
appBar: PageAppbar(title: "实名认证"),
body: Column(
children: [
Container(

410
lib/pages/mine/setting_page.dart

@ -1,410 +0,0 @@
import 'package:dating_touchme_app/components/page_appbar.dart';
import 'package:dating_touchme_app/extension/ex_widget.dart';
import 'package:dating_touchme_app/generated/assets.dart';
import 'package:dating_touchme_app/pages/mine/blacklist_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:get/get_core/src/get_main.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
class SettingPage extends StatefulWidget {
const SettingPage({super.key});
@override
State<SettingPage> createState() => _SettingPageState();
}
class _SettingPageState extends State<SettingPage> {
bool blockUser = false;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color.fromRGBO(250, 250, 250, 1),
appBar: PageAppbar(title: "设置"),
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.symmetric(
vertical: 15.w,
horizontal: 10.w
),
child: Column(
children: [
BlockItem(
children: [
Item(
label: "后台播放",
child: TDSwitch(
isOn: blockUser,
trackOnColor: const Color.fromRGBO(117, 98, 249, 1),
onChanged: (bool e){
print(e);
blockUser = e;
setState(() {
});
return e;
},
),
),
LineItem(),
Item(
label: "语音/视频通话提示音",
child: TDSwitch(
isOn: blockUser,
trackOnColor: const Color.fromRGBO(117, 98, 249, 1),
onChanged: (bool e){
print(e);
blockUser = e;
setState(() {
});
return e;
},
),
),
],
),
BlockItem(
children: [
Item(
label: "安全中心",
child: Icon(
Icons.keyboard_arrow_right,
size: 10.w,
color: const Color.fromRGBO(191, 191, 191, 1),
),
),
LineItem(),
Item(
label: "黑名单",
child: Icon(
Icons.keyboard_arrow_right,
size: 10.w,
color: const Color.fromRGBO(191, 191, 191, 1),
),
).onTap((){
Get.to(() => BlacklistPage());
}),
],
),
BlockItem(
children: [
Item(
label: "隐私设置",
child: Icon(
Icons.keyboard_arrow_right,
size: 10.w,
color: const Color.fromRGBO(191, 191, 191, 1),
),
),
LineItem(),
Item(
label: "青少年模式",
child: Icon(
Icons.keyboard_arrow_right,
size: 10.w,
color: const Color.fromRGBO(191, 191, 191, 1),
),
),
],
),
BlockItem(
children: [
Item(
label: "系统权限管理",
child: Icon(
Icons.keyboard_arrow_right,
size: 10.w,
color: const Color.fromRGBO(191, 191, 191, 1),
),
),
LineItem(),
Item(
label: "消息通知",
child: Icon(
Icons.keyboard_arrow_right,
size: 10.w,
color: const Color.fromRGBO(191, 191, 191, 1),
),
),
LineItem(),
Item(
label: "检查更新",
child: Row(
children: [
Text(
"版本号 1.0.000",
style: TextStyle(
fontSize: 13.w,
color: const Color.fromRGBO(117, 98, 249, 1)
),
),
SizedBox(width: 10.w,),
Icon(
Icons.keyboard_arrow_right,
size: 10.w,
color: const Color.fromRGBO(191, 191, 191, 1),
)
],
),
).onTap((){
Navigator.of(context).push(TDSlidePopupRoute(
modalBarrierColor: TDTheme.of(context).fontGyColor2,
slideTransitionFrom: SlideTransitionFrom.center,
builder: (context) {
return Material(
color: Colors.transparent,
child: Container(
color: Colors.transparent,
width: 299.w,
padding: EdgeInsets.only(
top: 56.w
),
child: Stack(
clipBehavior: Clip.none,
children: [
Container(
width: 299.w,
padding: EdgeInsets.only(
top: 147.w,
left: 30.w,
right: 30.w,
bottom: 25.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(18.w)),
color: Colors.white
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Text(
"体验全新升级v1.2.0",
style: TextStyle(
fontSize: 16.w,
fontWeight: FontWeight.w500
),
),
SizedBox(height: 14.w,),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 2.w,
height: 5.w,
margin: EdgeInsets.only(
right: 10.w,
top: 6.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(2.w)),
color: const Color.fromRGBO(51, 51, 51, 1)
),
),
SizedBox(
width: 204.w,
child: Text(
"首页风格改版,更全面的内容,恍然一新的视觉用户体验。",
style: TextStyle(
fontSize: 12.w,
),
),
)
],
),
SizedBox(height: 8.w,),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 2.w,
height: 5.w,
margin: EdgeInsets.only(
right: 10.w,
top: 6.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(2.w)),
color: const Color.fromRGBO(51, 51, 51, 1)
),
),
SizedBox(
width: 204.w,
child: Text(
"优化了动画细节,让产品更流畅。",
style: TextStyle(
fontSize: 12.w,
),
),
)
],
),
SizedBox(height: 32.w,),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
width: 113.w,
height: 40.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(9.w)),
color: const Color.fromRGBO(245, 245, 245, 1)
),
child: Center(
child: Text(
"暂不更新",
style: TextStyle(
fontSize: 15.w,
color: const Color.fromRGBO(144, 144, 144, 1)
),
),
),
),
Container(
width: 113.w,
height: 40.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(9.w)),
color: const Color.fromRGBO(245, 245, 245, 1),
gradient: const LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight, // CSS 90deg
colors: [
Color.fromRGBO(131, 89, 255, 1), // rgba(131, 89, 255, 1)
Color.fromRGBO(61, 138, 224, 1), // rgba(61, 138, 224, 1)
],
),
),
child: Center(
child: Text(
"立即升级",
style: TextStyle(
fontSize: 15.w,
fontWeight: FontWeight.w500,
color: Colors.white
),
),
),
),
],
)
],
),
),
Positioned(
left: 0,
top: -56.w,
child: Image.asset(
Assets.imagesUpdataBg,
width: 299.w,
),
),
Positioned(
left: 11.w,
top: -14.w,
child: Image.asset(
Assets.imagesUpdataIcon,
width: 36.w,
),
),
Positioned(
left: 43.w,
top: 29.w,
child: Image.asset(
Assets.imagesUpdataFont,
width: 76.w,
),
)
],
),
),
);
}));
}),
],
),
],
),
),
),
);
}
}
class BlockItem extends StatefulWidget {
final List<Widget> children;
const BlockItem({super.key, required this.children});
@override
State<BlockItem> createState() => _BlockItemState();
}
class _BlockItemState extends State<BlockItem> {
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.symmetric(
horizontal: 14.w
),
margin: EdgeInsets.only(
bottom: 10.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(9.w)),
color: Colors.white
),
child: Column(
children: widget.children,
),
);
}
}
class Item extends StatefulWidget {
final String label;
final Widget child;
const Item({super.key, required this.label, required this.child});
@override
State<Item> createState() => _ItemState();
}
class _ItemState extends State<Item> {
@override
Widget build(BuildContext context) {
return SizedBox(
height: 54.w,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
widget.label,
style: TextStyle(
fontSize: 13.w,
fontWeight: FontWeight.w500
),
),
widget.child
],
),
);
}
}
class LineItem extends StatelessWidget {
const LineItem({super.key});
@override
Widget build(BuildContext context) {
return Container(
width: 320.w,
height: 2.w,
color: const Color.fromRGBO(245, 245, 245, 1),
);
}
}

111
lib/pages/mine/user_info_page.dart

@ -1,42 +1,74 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:dating_touchme_app/generated/assets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:dating_touchme_app/controller/mine/user_info_controller.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
class UserInfoPage extends StatelessWidget {
const UserInfoPage({Key? key}) : super(key: key);
UserInfoPage({super.key});
//
void _showAvatarOptions(UserInfoController controller) {
showCupertinoModalPopup(
context: Get.context!,
builder: (context) => CupertinoActionSheet(
title: const Text('选择头像'),
actions: <Widget>[
CupertinoActionSheetAction(
child: const Text('拍照'),
onPressed: () async {
Navigator.pop(context);
await controller.handleCameraCapture();
},
),
CupertinoActionSheetAction(
child: const Text('从相册选择'),
onPressed: () async {
Navigator.pop(context);
await controller.handleGallerySelection();
},
),
],
cancelButton: CupertinoActionSheetAction(
child: const Text('取消'),
isDestructiveAction: true,
onPressed: () {
Navigator.pop(context);
},
),
),
void _showAvatarPopup(UserInfoController controller){
Navigator.of(Get.context!).push(
TDSlidePopupRoute(
slideTransitionFrom: SlideTransitionFrom.bottom,
builder: (context) {
return Container(
// color: TDTheme.of(context).bgColorContainer,
height: 490,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(12.0),
topRight: Radius.circular(12.0),
),
),
child: Column(
children: [
const SizedBox(height: 4),
CachedNetworkImage(imageUrl: 'https://dating-agency-prod.oss-cn-shenzhen.aliyuncs.com/1A437A945667.jpg', width: 375, height: 314),
const TDDivider(),
TDCell(
arrow: false,
titleWidget: Center(
child: Text('拍照', style: TextStyle(fontSize: 16.w, color: const Color.fromRGBO(51, 51, 51, 1))),
),
onClick: (cell) async{
Navigator.pop(context);
await controller.handleCameraCapture();
},
),
const TDDivider(),
TDCell(
arrow: false,
titleWidget: Center(
child: Text('从相册选择'),
),
onClick: (cell) async{
Navigator.pop(context);
await controller.handleGallerySelection();
},
),
Expanded(
child: Container(
color: Color(0xFFF3F3F3),
),
),
TDCell(
arrow: false,
titleWidget: Center(
child: Text('取消'),
),
onClick: (cell){
Navigator.pop(context);
},
),
],
),
);
}),
);
}
@ -228,7 +260,7 @@ class UserInfoPage extends StatelessWidget {
title: const Text(
'完善信息',
style: TextStyle(
fontSize: 20,
fontSize: 16,
fontWeight: FontWeight.bold,
color: Color.fromRGBO(51, 51, 51, 1),
),
@ -255,10 +287,9 @@ class UserInfoPage extends StatelessWidget {
child: Column(
children: [
const SizedBox(height: 25),
//
GestureDetector(
onTap: () => _showAvatarOptions(controller),
onTap: () => _showAvatarPopup(controller),
child: Stack(
children: [
Container(
@ -369,7 +400,7 @@ class UserInfoPage extends StatelessWidget {
),
],
),
const SizedBox(height: 25),
const SizedBox(height: 20),
//
const Align(
@ -408,7 +439,7 @@ class UserInfoPage extends StatelessWidget {
],
),
),
const SizedBox(height: 25),
const SizedBox(height: 20),
//
const Align(
@ -452,7 +483,7 @@ class UserInfoPage extends StatelessWidget {
),
),
),
const SizedBox(height: 25),
const SizedBox(height: 20),
//
const Align(
@ -496,7 +527,7 @@ class UserInfoPage extends StatelessWidget {
),
),
),
const SizedBox(height: 25),
const SizedBox(height: 20),
//
const Align(
@ -528,7 +559,7 @@ class UserInfoPage extends StatelessWidget {
),
),
),
const SizedBox(height: 50),
const SizedBox(height: 24),
//
SizedBox(
@ -562,7 +593,7 @@ class UserInfoPage extends StatelessWidget {
),
),
),
const SizedBox(height: 30),
const SizedBox(height: 20),
],
),
),

lib/pages/mine/blacklist_page.dart → lib/pages/setting/blacklist_page.dart

114
lib/pages/setting/notice_page.dart

@ -1,79 +1,77 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
class NoticePage extends StatefulWidget {
const NoticePage({super.key});
import '../../components/page_appbar.dart';
import '../../controller/setting/notification_controller.dart';
@override
State<NoticePage> createState() => _NoticePageState();
}
class NoticePage extends StatelessWidget {
NoticePage({super.key});
class _NoticePageState extends State<NoticePage> with AutomaticKeepAliveClientMixin{
final NotificationController controller = Get.put(NotificationController());
@override
Widget build(BuildContext context) {
super.build(context);
return Scaffold(
backgroundColor: Color(0xffF5F5F5),
appBar: AppBar(
title: Text('消息通知', style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)),
centerTitle: true,
backgroundColor: Colors.white,
),
appBar: PageAppbar(title: "消息通知"),
body: Expanded(
child: SingleChildScrollView(
padding: EdgeInsetsGeometry.symmetric(vertical: 16.w),
child: Column(
children: [
TDCellGroup(
theme: TDCellGroupTheme.cardTheme,
cells: [
TDCell(
arrow: true,
title: '接受推送通知',
description: '已开启',
),
TDCell(
arrow: false,
title: '接受推送通知',
description: '一段很长很长的内容文字',
rightIconWidget: TDSwitch(
isOn: false,
trackOnColor: const Color.fromRGBO(117, 98, 249, 1),
onChanged: (bool e){
return false;
},
)
),
],
),
const SizedBox(height: 12),
TDCellGroup(
theme: TDCellGroupTheme.cardTheme,
cells: [
TDCell(
arrow: false,
title: '后台播放',
description: '一段很长很长的内容文字',
rightIconWidget: TDSwitch(
isOn: true,
trackOnColor: const Color.fromRGBO(117, 98, 249, 1),
onChanged: (bool e){
return false;
},
)
),
],
),
],
),
child: Obx(() {
return Column(
children: [
TDCellGroup(
theme: TDCellGroupTheme.cardTheme,
cells: [
TDCell(
arrow: true,
title: '接受推送通知',
description: controller.getPermissionStatusText(),
onClick: (cell){
controller.openSettings();
},
),
TDCell(
arrow: false,
title: '接受推送通知',
description: '一段很长很长的内容文字',
rightIconWidget: TDSwitch(
isOn: false,
trackOnColor: const Color.fromRGBO(117, 98, 249, 1),
onChanged: (bool e){
return false;
},
)
),
],
),
const SizedBox(height: 12),
TDCellGroup(
theme: TDCellGroupTheme.cardTheme,
cells: [
TDCell(
arrow: false,
title: '后台播放',
description: '一段很长很长的内容文字',
rightIconWidget: TDSwitch(
isOn: true,
trackOnColor: const Color.fromRGBO(117, 98, 249, 1),
onChanged: (bool e){
return false;
},
)
),
],
),
],
);
}),
),
),
);
}
@override
bool get wantKeepAlive => true;
}

256
lib/pages/setting/setting_page.dart

@ -1,155 +1,153 @@
import 'package:dating_touchme_app/components/home_appbar.dart';
import 'package:dating_touchme_app/generated/assets.dart';
import 'package:dating_touchme_app/pages/discover/live_room_page.dart';
import 'package:dating_touchme_app/pages/mine/login_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
import '../../components/page_appbar.dart';
import '../../controller/setting/setting_controller.dart';
import 'blacklist_page.dart';
import 'notice_page.dart';
class SettingPage extends StatefulWidget {
const SettingPage({super.key});
class SettingPage extends StatelessWidget {
@override
State<SettingPage> createState() => _SettingPageState();
}
class _SettingPageState extends State<SettingPage> with AutomaticKeepAliveClientMixin{
SettingPage({super.key});
final SettingController controller = Get.put(SettingController());
@override
Widget build(BuildContext context) {
super.build(context);
return Scaffold(
backgroundColor: Color(0xffF5F5F5),
appBar: AppBar(
title: Text('设置', style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)),
centerTitle: true,
backgroundColor: Colors.white,
),
appBar: PageAppbar(title: "设置"),
body: Expanded(
child: SingleChildScrollView(
padding: EdgeInsetsGeometry.symmetric(vertical: 16.w),
child: Column(
children: [
TDCellGroup(
theme: TDCellGroupTheme.cardTheme,
cells: [
TDCell(
arrow: false,
title: '允许中间邀请弹窗',
rightIconWidget: TDSwitch(
isOn: false,
trackOnColor: const Color.fromRGBO(117, 98, 249, 1),
onChanged: (bool e){
return false;
child: Obx(() {
return Column(
children: [
TDCellGroup(
theme: TDCellGroupTheme.cardTheme,
cells: [
TDCell(
arrow: false,
title: '允许中间邀请弹窗',
rightIconWidget: TDSwitch(isOn: false,trackOnColor: const Color.fromRGBO(117, 98, 249, 1),onChanged: (bool e) {
return false;
})
),
TDCell(
arrow: false,
title: '后台播放',
rightIconWidget: TDSwitch(
isOn: true,
trackOnColor: const Color.fromRGBO(117, 98, 249, 1),
onChanged: (bool e) {
return false;
},
)
),
TDCell(
arrow: false,
title: '语音/视频通话提示音',
rightIconWidget: TDSwitch(isOn: false,trackOnColor: const Color.fromRGBO(117, 98, 249, 1),onChanged: (bool e) {
return false;
})
),
],
),
const SizedBox(height: 12),
TDCellGroup(
theme: TDCellGroupTheme.cardTheme,
cells: [
TDCell(arrow: true, title: '安全中心', onClick: (cell) {
print('安全中心');
}),
TDCell(arrow: true, title: '黑名单', onClick: (cell) {
Get.to(() => BlacklistPage());
}),
],
),
const SizedBox(height: 12),
TDCellGroup(
theme: TDCellGroupTheme.cardTheme,
cells: [
TDCell(arrow: true, title: '系统权限管理'),
TDCell(arrow: true, title: '消息通知', onClick: (cell) {
Get.to(() => NoticePage());
}),
TDCell(arrow: true, title: '检查更新', onClick: (cell) {
// _showUpdateDialog();
controller.checkVersion();
},
noteWidget: Text('当前版本:${controller.version.value}',style: TextStyle(fontSize: 13.w,color: const Color.fromRGBO(117, 98, 249, 1))),
)
),
TDCell(
arrow: false,
title: '后台播放',
rightIconWidget: TDSwitch(
isOn: true,
trackOnColor: const Color.fromRGBO(117, 98, 249, 1),
onChanged: (bool e){
return false;
},
)
),
TDCell(arrow: false, title: '单行标题'),
],
),
const SizedBox(height: 12),
TDCellGroup(
theme: TDCellGroupTheme.cardTheme,
cells: [
TDCell(arrow: true, title: '黑名单',onClick: (cell) {
print('单行标题');
}
),
],
),
const SizedBox(height: 12),
TDCellGroup(
theme: TDCellGroupTheme.cardTheme,
cells: [
TDCell(arrow: true, title: '单行标题'),
TDCell(arrow: true, title: '单行标题'),
TDCell(arrow: true, title: '消息通知',onClick: (cell) {
Get.to(()=> NoticePage());
}
),
],
),
const SizedBox(height: 36),
TDButton(
text: '退出登录',
width: MediaQuery.of(context).size.width - 40,
size: TDButtonSize.large,
type: TDButtonType.fill,
shape: TDButtonShape.round,
theme: TDButtonTheme.danger,
onTap: (){
// showGeneralDialog(
// context: context,
// pageBuilder: (BuildContext buildContext, Animation<double> animation,
// Animation<double> secondaryAnimation) {
// return TDConfirmDialog(
// title: '是否退出当前账号?',
//
// );
// },
// );
showGeneralDialog(
context: context,
pageBuilder: (BuildContext buildContext, Animation<double> animation,
Animation<double> secondaryAnimation) {
return TDAlertDialog(
title: '是否退出当前账号?',
buttonWidget:Container(
padding: EdgeInsetsGeometry.only(top: 16.w, right: 30.w, left: 30.w, bottom: 32.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
TDButton(
text: '取 消',
width: 120,
size: TDButtonSize.large,
type: TDButtonType.fill,
shape: TDButtonShape.round,
theme: TDButtonTheme.defaultTheme,
onTap: (){
Navigator.of(context).pop();
},
),
TDButton(
text: '确 定',
width: 120,
size: TDButtonSize.large,
type: TDButtonType.fill,
shape: TDButtonShape.round,
theme: TDButtonTheme.danger,
onTap: (){
Navigator.of(context).pop();
},
],
),
const SizedBox(height: 64),
TDButton(
text: '退出登录',
width: MediaQuery.of(context).size.width - 40,
size: TDButtonSize.large,
type: TDButtonType.fill,
shape: TDButtonShape.round,
theme: TDButtonTheme.danger,
onTap: () {
showGeneralDialog(
context: context,
pageBuilder: (BuildContext buildContext, Animation<
double> animation,
Animation<double> secondaryAnimation) {
return TDAlertDialog(
title: '是否退出当前账号?',
buttonWidget: Container(
padding: EdgeInsetsGeometry.only(top: 16.w,
right: 30.w,
left: 30.w,
bottom: 32.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
TDButton(
text: '取 消',
width: 120,
size: TDButtonSize.large,
type: TDButtonType.fill,
shape: TDButtonShape.round,
theme: TDButtonTheme.defaultTheme,
onTap: () {
Navigator.of(context).pop();
},
),
TDButton(
text: '确 定',
width: 120,
size: TDButtonSize.large,
type: TDButtonType.fill,
shape: TDButtonShape.round,
theme: TDButtonTheme.danger,
onTap: () {
controller.logout();
Navigator.of(context).pop();
Get.offAll(() => LoginPage());
},
),
],
),
],
),
)
);
},
);
},
),
],
),
)
);
},
);
},
),
const SizedBox(height: 24),
],
);
}),
),
),
);
}
@override
bool get wantKeepAlive => true;
}

2
pubspec.yaml

@ -58,6 +58,8 @@ dependencies:
wechat_assets_picker: ^9.8.0
wechat_camera_picker: ^4.4.0
tdesign_flutter: ^0.2.5
app_settings: ^6.1.1
package_info_plus: ^9.0.0
record: ^6.1.2
video_player: ^2.9.2
chewie: ^1.8.5 # 视频播放器UI

Loading…
Cancel
Save