代码优化
This commit is contained in:
parent
af2701f7f8
commit
5d6f953858
@ -4,9 +4,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../components/my_app_bar.dart';
|
||||
import '../../router/app_routers.dart';
|
||||
import 'logic.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
|
||||
class AboutappPage extends StatelessWidget {
|
||||
@ -55,7 +53,7 @@ class AboutappPage extends StatelessWidget {
|
||||
Text(
|
||||
'圈子',
|
||||
style: TextStyle(
|
||||
color: Color(0xFFF7FAFA),
|
||||
color: const Color(0xFFF7FAFA),
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
@ -63,7 +61,7 @@ class AboutappPage extends StatelessWidget {
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 0.4.sp,
|
||||
color: Color(0xFF2E2E3B),
|
||||
color: const Color(0xFF2E2E3B),
|
||||
),
|
||||
// SizedBox(height: 20),
|
||||
// GestureDetector(
|
||||
@ -194,14 +192,14 @@ class AboutappPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
|
||||
String url = 'https://www.baidu.com'; // Replace with your desired URL
|
||||
|
||||
void _openBrowser() async {
|
||||
if (await canLaunch(url)) {
|
||||
await launch(url);
|
||||
} else {
|
||||
throw 'Could not launch $url';
|
||||
}
|
||||
}
|
||||
// String url = 'https://www.baidu.com'; // Replace with your desired URL
|
||||
//
|
||||
// void _openBrowser() async {
|
||||
// if (await canLaunch(url)) {
|
||||
// await launch(url);
|
||||
// } else {
|
||||
// throw 'Could not launch $url';
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import 'package:circle_app/main.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@ -2,11 +2,9 @@ import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../components/my_app_bar.dart';
|
||||
import '../../util/util.dart';
|
||||
import 'logic.dart';
|
||||
|
||||
class BindmailPage extends StatefulWidget {
|
||||
BindmailPage({Key? key}) : super(key: key);
|
||||
@ -32,7 +30,7 @@ class _BindmailPageState extends State<BindmailPage> {
|
||||
_countdownSeconds = 60;
|
||||
});
|
||||
|
||||
_timer = Timer.periodic(Duration(seconds: 1), (timer) {
|
||||
_timer = Timer.periodic(const Duration(seconds: 1), (timer) {
|
||||
setState(() {
|
||||
if (_countdownSeconds > 0) {
|
||||
_countdownSeconds--;
|
||||
@ -55,7 +53,7 @@ class _BindmailPageState extends State<BindmailPage> {
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: MyAppBar(
|
||||
appBar: const MyAppBar(
|
||||
centerTitle: '绑定邮箱',
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
@ -71,7 +69,7 @@ class _BindmailPageState extends State<BindmailPage> {
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4.0.sp),
|
||||
color: Color(0xff282733),
|
||||
color: const Color(0xff282733),
|
||||
),
|
||||
height: 40.0.sp,
|
||||
child: Row(
|
||||
@ -103,8 +101,8 @@ class _BindmailPageState extends State<BindmailPage> {
|
||||
),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.0,
|
||||
height: 1.0,
|
||||
fontSize: 14.0.sp,
|
||||
height: 1.0.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -121,7 +119,7 @@ class _BindmailPageState extends State<BindmailPage> {
|
||||
16.0.sp, 20.0.sp, 8.0.sp, 0.0.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4.0.sp),
|
||||
color: Color(0xff282733),
|
||||
color: const Color(0xff282733),
|
||||
),
|
||||
height: 40.0.sp,
|
||||
child: Row(
|
||||
@ -130,7 +128,7 @@ class _BindmailPageState extends State<BindmailPage> {
|
||||
alignment: Alignment.centerLeft,
|
||||
padding: EdgeInsets.only(
|
||||
left: 10.0.sp, right: 10.sp),
|
||||
child: Text(
|
||||
child: const Text(
|
||||
"验证码",
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
@ -152,7 +150,7 @@ class _BindmailPageState extends State<BindmailPage> {
|
||||
),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.0,
|
||||
fontSize: 14.0.sp,
|
||||
height: 1.0,
|
||||
),
|
||||
),
|
||||
@ -176,7 +174,7 @@ class _BindmailPageState extends State<BindmailPage> {
|
||||
8.0.sp, 20.0.sp, 16.0.sp, 0.0.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4.0.sp),
|
||||
color: Color(0xff282733),
|
||||
color: const Color(0xff282733),
|
||||
),
|
||||
height: 40.0.sp,
|
||||
child: Center(
|
||||
|
||||
@ -186,31 +186,32 @@ class Call_outPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
},
|
||||
child: Container(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
getCircleImage(controller.isCheck
|
||||
? 'check'
|
||||
: 'uncheck'),
|
||||
width: 17.5.sp,
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
Text(
|
||||
'使用至尊喊话',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp),
|
||||
)
|
||||
],
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
getCircleImage(controller.isCheck
|
||||
? 'check'
|
||||
: 'uncheck'),
|
||||
width: 17.5.sp,
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
Text(
|
||||
'使用至尊喊话',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: (){
|
||||
navigateToContentGuidelines();
|
||||
},
|
||||
child: Text(
|
||||
'内容规范',
|
||||
style: TextStyle(
|
||||
|
||||
@ -30,7 +30,7 @@ class FeedbackPage extends StatelessWidget {
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: MyAppBar(
|
||||
appBar: const MyAppBar(
|
||||
centerTitle: '意见反馈',
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
@ -42,19 +42,19 @@ class FeedbackPage extends StatelessWidget {
|
||||
children: [
|
||||
Container(
|
||||
height: 200,
|
||||
margin: EdgeInsets.symmetric(
|
||||
margin: const EdgeInsets.symmetric(
|
||||
horizontal: 16, vertical: 20),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(13),
|
||||
color: Color(
|
||||
color: const Color(
|
||||
0xFF4C3E5F), // Use your desired background color
|
||||
),
|
||||
padding: EdgeInsets.all(13),
|
||||
padding: EdgeInsets.all(13.sp),
|
||||
child: TextField(
|
||||
maxLength: 200,
|
||||
controller: controller.textEditingController,
|
||||
onChanged: (msg){
|
||||
print(msg);
|
||||
|
||||
controller.state.maxMsg = '${msg.length}/200';
|
||||
controller.update();
|
||||
|
||||
@ -65,14 +65,14 @@ class FeedbackPage extends StatelessWidget {
|
||||
counterText: '',
|
||||
|
||||
hintStyle: TextStyle(
|
||||
color: Color(0xFFB7BECC), fontSize: 14.sp),
|
||||
color: const Color(0xFFB7BECC), fontSize: 14.sp),
|
||||
border: InputBorder.none,
|
||||
),
|
||||
maxLines: null,
|
||||
inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(200),
|
||||
],
|
||||
style: TextStyle(color: Colors.white),
|
||||
style: const TextStyle(color: Colors.white),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
@ -80,7 +80,7 @@ class FeedbackPage extends StatelessWidget {
|
||||
bottom: 30.sp,
|
||||
child: Text(
|
||||
controller.state.maxMsg,
|
||||
style: TextStyle(color: Colors.white),
|
||||
style: const TextStyle(color: Colors.white),
|
||||
))
|
||||
],
|
||||
),
|
||||
@ -88,7 +88,7 @@ class FeedbackPage extends StatelessWidget {
|
||||
height: 120.sp,
|
||||
margin: EdgeInsets.only(left: 16.sp, right: 16.sp),
|
||||
child: GridView.builder(
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3, // 每行显示的项目数量
|
||||
),
|
||||
itemCount:controller.state.imaglist.length<3 ? controller.state.imaglist.length+1: controller.state.imaglist.length, // Replace with your item count
|
||||
@ -125,14 +125,14 @@ class FeedbackPage extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 16, top: 10),
|
||||
padding: EdgeInsets.only(left: 16.sp, top: 10.sp),
|
||||
child: Text(
|
||||
'最多选择3张图片',
|
||||
style:
|
||||
TextStyle(color: Color(0xFFB7BECC), fontSize: 12),
|
||||
TextStyle(color: const Color(0xFFB7BECC), fontSize: 12.sp),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 50),
|
||||
SizedBox(height: 50.sp),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
// showToast("完善资料");
|
||||
@ -143,8 +143,8 @@ class FeedbackPage extends StatelessWidget {
|
||||
child: Center(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(21),
|
||||
gradient: LinearGradient(
|
||||
borderRadius: BorderRadius.circular(21.sp),
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color(0xFF06F9FA),
|
||||
Color(0xFFDC5BFD),
|
||||
@ -159,7 +159,7 @@ class FeedbackPage extends StatelessWidget {
|
||||
"提交",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
fontSize: 12.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -179,7 +179,7 @@ class FeedbackPage extends StatelessWidget {
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
width: double.infinity, // 设置容器宽度为屏幕宽度
|
||||
height: double.infinity, // 设置容器高度为屏幕高度
|
||||
child: ClipRRect(
|
||||
|
||||
@ -27,7 +27,7 @@ class FriendslistPage extends StatelessWidget {
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: MyAppBar(
|
||||
appBar: const MyAppBar(
|
||||
centerTitle: "我喜欢的",
|
||||
),
|
||||
body: SafeArea(
|
||||
@ -84,7 +84,7 @@ class FriendslistPage extends StatelessWidget {
|
||||
left: 0,
|
||||
bottom: 0,
|
||||
|
||||
child: item.vip!=null&&item.vip>0 ?
|
||||
child: item.vip>0 ?
|
||||
Image(
|
||||
image: AssetImage(getBaseImage("vip")),
|
||||
width: 44.sp,
|
||||
@ -113,7 +113,7 @@ class FriendslistPage extends StatelessWidget {
|
||||
width: 150.sp,
|
||||
child: Text(
|
||||
item.signature,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFFB7BECC)),
|
||||
style: TextStyle(fontSize: 12.sp, color: const Color(0xFFB7BECC)),
|
||||
),
|
||||
),
|
||||
],
|
||||
@ -128,12 +128,12 @@ class FriendslistPage extends StatelessWidget {
|
||||
width: 75,
|
||||
height: 28,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFFF4D7C),
|
||||
color: const Color(0xFFFF4D7C),
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
),
|
||||
child:
|
||||
Center(
|
||||
child: Text(item.isLike?"取消喜欢":"喜欢", style: TextStyle(fontSize: 14, color: Colors.white)),
|
||||
child: Text(item.isLike?"取消喜欢":"喜欢", style: TextStyle(fontSize: 14.sp, color: Colors.white)),
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -145,14 +145,14 @@ class FriendslistPage extends StatelessWidget {
|
||||
|
||||
|
||||
Widget _buildInfoRow(UserInfo userInfoBean) {
|
||||
String ageMsg = getAgeCOntent(userInfoBean!.gender, userInfoBean!.age,
|
||||
userInfoBean!.role, userInfoBean!.orientation);
|
||||
String ageMsg = getAgeCOntent(userInfoBean.gender, userInfoBean.age,
|
||||
userInfoBean.role, userInfoBean.orientation);
|
||||
return Row(
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: LinearGradient(
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color.fromRGBO(141, 255, 248, 1.0),
|
||||
Color.fromRGBO(181, 211, 255, 1.0),
|
||||
@ -167,7 +167,7 @@ class FriendslistPage extends StatelessWidget {
|
||||
ageMsg ,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 10,
|
||||
fontSize: 10.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@ -1,16 +1,10 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:circle_app/app/minefragment/view.dart';
|
||||
import 'package:circle_app/app/circle/view.dart';
|
||||
import 'package:circle_app/app/msg/view.dart';
|
||||
import 'package:circle_app/router/app_routers.dart';
|
||||
import 'package:circle_app/util/util.dart';
|
||||
import 'package:circle_app/view/ExitAppConfirmation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../router/app_routers.dart';
|
||||
import 'logic.dart';
|
||||
|
||||
class HomePage extends StatefulWidget {
|
||||
@ -43,7 +37,7 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
|
||||
// color: Colors.red,
|
||||
padding: EdgeInsets.only(left: 50.sp, right: 50.sp, top: 8.sp),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF423055),
|
||||
color: const Color(0xFF423055),
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.fill,
|
||||
image: AssetImage(
|
||||
@ -82,14 +76,12 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
|
||||
controller.updateIndex(index);
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
child: Image.asset(
|
||||
isSelected
|
||||
? getTabbarImage(image + '_selected')
|
||||
: getTabbarImage(image + '_normal'),
|
||||
width: 34.sp,
|
||||
height: 34.sp,
|
||||
),
|
||||
child: Image.asset(
|
||||
isSelected
|
||||
? getTabbarImage('${image}_selected')
|
||||
: getTabbarImage('${image}_normal'),
|
||||
width: 34.sp,
|
||||
height: 34.sp,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ class Complete_materialPage extends StatelessWidget {
|
||||
return GetBuilder(builder: (Complete_materialLogic controller) {
|
||||
return Stack(
|
||||
children: [
|
||||
Container(
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
child: Image.asset(
|
||||
@ -227,7 +227,7 @@ class Complete_materialPage extends StatelessWidget {
|
||||
child: Text(
|
||||
controller.type == "user" ? "完成" : '开启小圈之旅',
|
||||
style: TextStyle(
|
||||
color: Color(0xff00FFF4),
|
||||
color: const Color(0xff00FFF4),
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
@ -267,7 +267,7 @@ class Complete_materialPage extends StatelessWidget {
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w500,
|
||||
shadows: [
|
||||
Shadow(color: Color(0xffF657FF), blurRadius: 4.0.sp)
|
||||
Shadow(color: const Color(0xffF657FF), blurRadius: 4.0.sp)
|
||||
])),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
@ -299,7 +299,7 @@ class Complete_materialPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
interestWdiget(String interest, Complete_materialLogic controller) {
|
||||
return Container(
|
||||
return SizedBox(
|
||||
height: 59.sp,
|
||||
width: 240.sp,
|
||||
child: ListView.builder(
|
||||
@ -312,20 +312,20 @@ class Complete_materialPage extends StatelessWidget {
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17.0), // 设置圆角半径
|
||||
gradient: LinearGradient(
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color(0xFF06F9FA),
|
||||
Color(0xFFDC5BFD),
|
||||
],
|
||||
),
|
||||
color: Color(0xFF392D53),
|
||||
color: const Color(0xFF392D53),
|
||||
),
|
||||
child: Container(
|
||||
margin: EdgeInsets.all(0.5.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17.0),
|
||||
// shape: BoxShape.circle,
|
||||
color: Color(0xFF392D53),
|
||||
color: const Color(0xFF392D53),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
@ -334,7 +334,7 @@ class Complete_materialPage extends StatelessWidget {
|
||||
child: Text(
|
||||
controller.numbers[index].name,
|
||||
style: TextStyle(
|
||||
fontSize: 11.0,
|
||||
fontSize: 11.sp,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
@ -386,7 +386,7 @@ class Complete_materialPage extends StatelessWidget {
|
||||
onConfirm: (p) {
|
||||
String month = p.month! < 10 ? '0${p.month!}' : p.month!.toString();
|
||||
String day = p.day! < 10 ? '0${p.day!}' : p.day!.toString();
|
||||
var time = '${p.year}-${month}-${day}';
|
||||
var time = '${p.year}-$month-$day';
|
||||
controller.state.age = controller.getAge(p);
|
||||
controller.state.brithday = time;
|
||||
controller.update();
|
||||
|
||||
@ -1,13 +1,10 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
|
||||
import '../../components/my_app_bar.dart';
|
||||
import '../../router/app_routers.dart';
|
||||
import '../../util/util.dart';
|
||||
import 'logic.dart';
|
||||
|
||||
@ -33,6 +30,8 @@ class MyfeedbacklistPage extends StatelessWidget {
|
||||
body: SafeArea(
|
||||
child: logic.isLoad ? loaddingWidget(true) : logic.lists.isEmpty ? noResultWidget() : SmartRefresher(
|
||||
controller: logic.refreshController,
|
||||
onRefresh: _onRefresh,
|
||||
onLoading: _onLoading,
|
||||
child: ListView.builder(
|
||||
|
||||
itemCount: logic.lists.length,
|
||||
@ -42,8 +41,6 @@ class MyfeedbacklistPage extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
),
|
||||
onRefresh: _onRefresh,
|
||||
onLoading: _onLoading,
|
||||
),
|
||||
),),
|
||||
);
|
||||
@ -59,7 +56,7 @@ class MyfeedbacklistPage extends StatelessWidget {
|
||||
margin: EdgeInsets.only(bottom: 12.0.sp,top: 12.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8.0.sp),
|
||||
color: Color(0xff282733),
|
||||
color: const Color(0xff282733),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@ -69,7 +66,7 @@ class MyfeedbacklistPage extends StatelessWidget {
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 16.0.sp, horizontal: 16.0.sp),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xff282733),
|
||||
color: const Color(0xff282733),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(8.0.sp),
|
||||
topRight: Radius.circular(8.0.sp),
|
||||
@ -83,10 +80,10 @@ class MyfeedbacklistPage extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
SizedBox(
|
||||
height: 120.sp,
|
||||
child: GridView.builder(
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3, // 每行显示的项目数量
|
||||
),
|
||||
itemCount:item.album.length, // Replace with your item count
|
||||
@ -127,7 +124,7 @@ class MyfeedbacklistPage extends StatelessWidget {
|
||||
Widget _buildImageItem(String url, MyfeedbacklistLogic controller, int index) {
|
||||
return ClipRRect(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
width: double.infinity, // 设置容器宽度为屏幕宽度
|
||||
height: double.infinity, // 设置容器高度为屏幕高度
|
||||
child: ClipRRect(
|
||||
|
||||
@ -34,7 +34,7 @@ class _OffaccountState extends State<OffaccountPage> {
|
||||
}
|
||||
|
||||
void startCountdown() {
|
||||
timer = Timer.periodic(Duration(seconds: 1), (Timer t) {
|
||||
timer = Timer.periodic(const Duration(seconds: 1), (Timer t) {
|
||||
setState(() {
|
||||
if (countdown > 0) {
|
||||
countdown--;
|
||||
@ -69,7 +69,7 @@ class _OffaccountState extends State<OffaccountPage> {
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: MyAppBar(centerTitle: '注销账号'),
|
||||
appBar: const MyAppBar(centerTitle: '注销账号'),
|
||||
body: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: SingleChildScrollView(
|
||||
@ -90,28 +90,28 @@ class _OffaccountState extends State<OffaccountPage> {
|
||||
Text(
|
||||
"1、无法登录app;",
|
||||
style: TextStyle(
|
||||
color: Color(0xFFB7BECC),
|
||||
color: const Color(0xFFB7BECC),
|
||||
fontSize: 12.sp,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"2、所有信息将被永远删除:身份信息、账户信息、会员、喊话、相册等内容;",
|
||||
style: TextStyle(
|
||||
color: Color(0xFFB7BECC),
|
||||
color: const Color(0xFFB7BECC),
|
||||
fontSize: 12.sp,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"3、您的好友无法与你取得联系(包括关注、粉丝等);",
|
||||
style: TextStyle(
|
||||
color: Color(0xFFB7BECC),
|
||||
color: const Color(0xFFB7BECC),
|
||||
fontSize: 12.sp,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"4、注销后,一个月内该手机号将无法注册新的账号。",
|
||||
style: TextStyle(
|
||||
color: Color(0xFFB7BECC),
|
||||
color: const Color(0xFFB7BECC),
|
||||
fontSize: 12.sp,
|
||||
),
|
||||
),
|
||||
@ -121,7 +121,7 @@ class _OffaccountState extends State<OffaccountPage> {
|
||||
Text(
|
||||
"请输入绑定的手机号",
|
||||
style: TextStyle(
|
||||
color: Color(0xFF898F99),
|
||||
color: const Color(0xFF898F99),
|
||||
fontSize: 10.sp,
|
||||
),
|
||||
),
|
||||
@ -140,7 +140,7 @@ class _OffaccountState extends State<OffaccountPage> {
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
filled: true,
|
||||
fillColor: Color(0xFF000000),
|
||||
fillColor: const Color(0xFF000000),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
borderSide: BorderSide.none,
|
||||
@ -159,7 +159,7 @@ class _OffaccountState extends State<OffaccountPage> {
|
||||
Text(
|
||||
"请选择你的注销原因",
|
||||
style: TextStyle(
|
||||
color: Color(0xFF898F99),
|
||||
color: const Color(0xFF898F99),
|
||||
fontSize: 10.sp,
|
||||
),
|
||||
),
|
||||
@ -173,7 +173,7 @@ class _OffaccountState extends State<OffaccountPage> {
|
||||
margin: EdgeInsets.only(top: 10.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4.sp),
|
||||
color: Color(0xFF000000),
|
||||
color: const Color(0xFF000000),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
@ -183,14 +183,14 @@ class _OffaccountState extends State<OffaccountPage> {
|
||||
decoration: InputDecoration(
|
||||
hintText: logic.state.offReasonMsg,
|
||||
hintStyle: TextStyle(
|
||||
color: Color(0xFFF7FAFA),
|
||||
color: const Color(0xFFF7FAFA),
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
border: InputBorder.none,
|
||||
contentPadding: EdgeInsets.only(left: 16.sp),
|
||||
),
|
||||
style: TextStyle(
|
||||
color: Color(0xFFF7FAFA),
|
||||
color: const Color(0xFFF7FAFA),
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
),
|
||||
@ -213,18 +213,15 @@ class _OffaccountState extends State<OffaccountPage> {
|
||||
|
||||
}, child: Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
width: 160.sp,
|
||||
child: ElevatedButton(
|
||||
onPressed: (){
|
||||
handleLogout(logic);
|
||||
},
|
||||
child: Text(
|
||||
countdown > 0 ? "注销($countdown s)" : "注销",
|
||||
),
|
||||
style: ButtonStyle(
|
||||
backgroundColor: MaterialStateProperty.all<Color>(
|
||||
countdown > 0 ? Colors.grey : Color(0xFF21BEAB),
|
||||
countdown > 0 ? Colors.grey : const Color(0xFF21BEAB),
|
||||
),
|
||||
shape: MaterialStateProperty.all<OutlinedBorder>(
|
||||
RoundedRectangleBorder(
|
||||
@ -232,6 +229,9 @@ class _OffaccountState extends State<OffaccountPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
countdown > 0 ? "注销($countdown s)" : "注销",
|
||||
),
|
||||
),
|
||||
),
|
||||
),)
|
||||
@ -304,7 +304,7 @@ class _OffaccountState extends State<OffaccountPage> {
|
||||
child: Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:math';
|
||||
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@ -53,7 +52,7 @@ class PhotoinfoPage extends StatelessWidget {
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4.0.sp),
|
||||
color: Color(0xff282733),
|
||||
color: const Color(0xff282733),
|
||||
),
|
||||
height: 40.0.sp,
|
||||
child: Row(
|
||||
@ -156,7 +155,7 @@ class PhotoinfoPage extends StatelessWidget {
|
||||
EdgeInsets.fromLTRB(16.0.sp, 20.0.sp, 16.0.sp, 0.0.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4.0.sp),
|
||||
color: Color(0xff282733),
|
||||
color: const Color(0xff282733),
|
||||
),
|
||||
height: 40.0.sp,
|
||||
child: Row(
|
||||
@ -218,7 +217,7 @@ class PhotoinfoPage extends StatelessWidget {
|
||||
16.0.sp, 20.0.sp, 8.0.sp, 0.0.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4.0.sp),
|
||||
color: Color(0xff282733),
|
||||
color: const Color(0xff282733),
|
||||
),
|
||||
height: 40.0.sp,
|
||||
child: Row(
|
||||
@ -274,7 +273,7 @@ class PhotoinfoPage extends StatelessWidget {
|
||||
8.0.sp, 20.0.sp, 16.0.sp, 0.0.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4.0.sp),
|
||||
color: Color(0xff282733),
|
||||
color: const Color(0xff282733),
|
||||
),
|
||||
height: 40.0.sp,
|
||||
child: Center(
|
||||
|
||||
@ -27,13 +27,13 @@ class SetupPage extends StatelessWidget {
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: MyAppBar(centerTitle: '设置',),
|
||||
appBar: const MyAppBar(centerTitle: '设置',),
|
||||
body: SafeArea(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
children: const [
|
||||
// GestureDetector(
|
||||
// onTap: () {
|
||||
//
|
||||
@ -71,14 +71,19 @@ class SetupPage extends StatelessWidget {
|
||||
// SizedBox(height: 16.sp),
|
||||
// _buildItemRow('聊天设置', getHomeImage("icon_in")),
|
||||
// SizedBox(height: 16.sp),
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
Get.toNamed(AppRoutes.PrivacyActivity);
|
||||
},
|
||||
child: _buildItemRow('隐私设置', getHomeImage("icon_in")),
|
||||
),
|
||||
SizedBox(height: 16.sp),
|
||||
|
||||
|
||||
// GestureDetector(
|
||||
// behavior: HitTestBehavior.opaque,
|
||||
// onTap: () {
|
||||
// Get.toNamed(AppRoutes.PrivacyActivity);
|
||||
// },
|
||||
// child: _buildItemRow('隐私设置', getHomeImage("icon_in")),
|
||||
// ),
|
||||
// SizedBox(height: 16.sp),
|
||||
|
||||
|
||||
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
@ -122,11 +127,11 @@ class SetupPage extends StatelessWidget {
|
||||
Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
color: Color(0xFFF7FAFA), // 将 #fff7fafa 替换为相应的颜色值
|
||||
color: const Color(0xFFF7FAFA), // 将 #fff7fafa 替换为相应的颜色值
|
||||
fontSize: 16.sp, // 将 16sp 替换为相应的值
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
imagePath,
|
||||
width: 20.sp, // 将相应的值替换为图像的宽度
|
||||
@ -147,16 +152,16 @@ class SetupPage extends StatelessWidget {
|
||||
Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
color: Color(0xFFF7FAFA), // 将 #fff7fafa 替换为相应的颜色值
|
||||
color: const Color(0xFFF7FAFA), // 将 #fff7fafa 替换为相应的颜色值
|
||||
fontSize: 16.sp, // 将 16sp 替换为相应的值
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
// _getFormat(context),
|
||||
Text(
|
||||
logic.cache, // 将 'XXX' 替换为相应的缓存大小值
|
||||
style: TextStyle(
|
||||
color: Color(0xFFB7BECC), // 将 #ffb7becc 替换为相应的颜色值
|
||||
color: const Color(0xFFB7BECC), // 将 #ffb7becc 替换为相应的颜色值
|
||||
fontSize: 14.sp, // 将 14sp 替换为相应的值
|
||||
),
|
||||
),
|
||||
|
||||
@ -21,7 +21,7 @@ class _WebViewContainerState extends State<WebviewPage> {
|
||||
final url = Get.arguments['url'];
|
||||
var controller = WebViewController()
|
||||
..setJavaScriptMode(JavaScriptMode.unrestricted)
|
||||
..setBackgroundColor( Colors.transparent)
|
||||
..setBackgroundColor(Colors.white)
|
||||
..setNavigationDelegate(
|
||||
NavigationDelegate(
|
||||
onProgress: (int progress) {
|
||||
@ -57,6 +57,7 @@ class _WebViewContainerState extends State<WebviewPage> {
|
||||
Expanded(
|
||||
child: WebViewWidget(
|
||||
controller: controller,
|
||||
|
||||
),
|
||||
),
|
||||
],
|
||||
@ -66,5 +67,7 @@ class _WebViewContainerState extends State<WebviewPage> {
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -247,12 +247,17 @@ class Open_vip_tipPage extends StatelessWidget {
|
||||
SizedBox(
|
||||
width: 2.sp,
|
||||
),
|
||||
Text(
|
||||
'《合伙人协议》',
|
||||
style: TextStyle(
|
||||
color: const Color(0xff00FFF4),
|
||||
fontSize: 11.sp,
|
||||
fontWeight: FontWeight.w400,
|
||||
GestureDetector(
|
||||
onTap: (){
|
||||
navigateToPartnerAgreement();
|
||||
},
|
||||
child: Text(
|
||||
'《合伙人协议》',
|
||||
style: TextStyle(
|
||||
color: const Color(0xff00FFF4),
|
||||
fontSize: 11.sp,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@ -107,7 +107,7 @@ double calculateTextHeight(String value, fontSize, FontWeight fontWeight,
|
||||
TextPainter painter = TextPainter(
|
||||
|
||||
///AUTO:华为手机如果不指定locale的时候,该方法算出来的文字高度是比系统计算偏小的。
|
||||
locale: WidgetsBinding.instance!.window.locale,
|
||||
locale: WidgetsBinding.instance.window.locale,
|
||||
maxLines: maxLines,
|
||||
textDirection: TextDirection.ltr,
|
||||
textScaleFactor: 1,
|
||||
@ -267,20 +267,35 @@ Future<String> getLibraryDirectoryPath() async {
|
||||
}
|
||||
|
||||
//跳转到用户协议
|
||||
navigateToUserAgreement() {
|
||||
void navigateToUserAgreement() {
|
||||
Get.toNamed(AppRoutes.WebViewActivity, arguments: {
|
||||
'title': "用户协议",
|
||||
"url": "https://docs.qq.com/doc/DZVV1SkttZGlPUW1H"
|
||||
"url": Platform.isIOS?"https://docs.qq.com/doc/DZVV1SkttZGlPUW1H":"https://iquanpai.com/app-h5/4_163.html"
|
||||
});
|
||||
}
|
||||
|
||||
//跳转到隐私政策
|
||||
navigateToPrivacyPolicy() {
|
||||
void navigateToPrivacyPolicy() {
|
||||
Get.toNamed(AppRoutes.WebViewActivity, arguments: {
|
||||
'title': "隐私协议",
|
||||
"url": "https://docs.qq.com/doc/DZXhvcXV6b1RNTUx1"
|
||||
"url": Platform.isIOS?"https://docs.qq.com/doc/DZXhvcXV6b1RNTUx1":"https://iquanpai.com/app-h5/4_164.html"
|
||||
});
|
||||
}
|
||||
//发布内容规范
|
||||
void navigateToContentGuidelines() {
|
||||
Get.toNamed(AppRoutes.WebViewActivity, arguments: {
|
||||
'title': "发布内容规范",
|
||||
"url": Platform.isIOS?"https://docs.qq.com/doc/DZVhLamZDQnJ0eHds":"https://iquanpai.com/app-h5/4_165.html"
|
||||
});
|
||||
}
|
||||
|
||||
//发布内容规范
|
||||
//合伙人协议
|
||||
void navigateToPartnerAgreement() {
|
||||
Get.toNamed(AppRoutes.WebViewActivity, arguments: {
|
||||
'title': "合伙人协议",
|
||||
"url": Platform.isIOS?"https://docs.qq.com/doc/DZUpwWFdNcGlsYld4":"https://iquanpai.com/app-h5/4_166.html"
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user