绑定邮箱 意见反馈 注销账号 举报 看大图 增加七牛云sdk

This commit is contained in:
YangYuhao 2023-06-15 17:01:07 +08:00
parent 13d35dc640
commit 2312ab7084
39 changed files with 3154 additions and 593 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

@ -25,7 +25,7 @@ class AccountPage extends StatelessWidget {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: MyAppBar( appBar: MyAppBar(
centerTitle: '设置', centerTitle: '账号中心',
), ),
body: Scaffold( body: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
@ -53,35 +53,39 @@ class AccountPage extends StatelessWidget {
// ], // ],
// ), // ),
// ), // ),
GestureDetector(
// Container( onTap: () {
// margin: EdgeInsets.only(top: 16.0), Get.toNamed(AppRoutes.PhotoActivity);
// child: Row( },
// children: [ child: Container(
// Text( margin: EdgeInsets.only(top: 16.0),
// "换绑手机号", child: Row(
// style: TextStyle( children: [
// color: Color(0xFFF7FAFA), Text(
// fontSize: 16.0, "换绑手机号",
// ), style: TextStyle(
// ), color: Color(0xFFF7FAFA),
// Spacer(), fontSize: 16.0,
// Text( ),
// "16677778888", ),
// style: TextStyle( Spacer(),
// color: Color(0xFFB7BECC), Text(
// fontSize: 16.0, "16677778888",
// ), style: TextStyle(
// ), color: Color(0xFFB7BECC),
// SizedBox(width: 8.0), fontSize: 16.0,
// Image.asset( ),
// getHomeImage("icon_in"), ),
// width: 24.0, SizedBox(width: 8.0),
// height: 24.0, Image.asset(
// ), getHomeImage("icon_in"),
// ], width: 24.0,
// ), height: 24.0,
// ), ),
],
),
),
),
// Container( // Container(
// margin: EdgeInsets.only(top: 16.0), // margin: EdgeInsets.only(top: 16.0),
// child: Row( // child: Row(
@ -102,149 +106,160 @@ class AccountPage extends StatelessWidget {
// ], // ],
// ), // ),
// ), // ),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
Get.toNamed(AppRoutes.OffAccountActivity);
},
child: Container(
margin: EdgeInsets.only(top: 16.0),
child: Row(
children: [
Text(
"注销账号",
style: TextStyle(
color: Color(0xFFF7FAFA),
fontSize: 16.0,
),
),
Spacer(),
Image.asset(
getHomeImage("icon_in"),
width: 24.0,
height: 24.0,
),
],
),
) ,)
,
// Container( // Container(
// margin: EdgeInsets.only(top: 16.0), // margin: EdgeInsets.only(top: 0.0.sp, left: 0.sp),
// child: Text(
// "账号绑定",
// style: TextStyle(
// color: Color(0xFFF7FAFA),
// fontSize: 16.0.sp,
// ),
// ),
// ),
// Container(
// margin: EdgeInsets.only(top: 16.0.sp),
// child: Row( // child: Row(
// children: [ // children: [
// Text( // Text(
// "注销账号", // "已绑定手机",
// style: TextStyle( // style: TextStyle(
// color: Color(0xFFF7FAFA), // color: Color(0xFFB7BECC),
// fontSize: 16.0, // fontSize: 16.0.sp,
// ), // ),
// ), // ),
// Spacer(), // Spacer(),
// Image.asset( // Container(
// getHomeImage("icon_in"), // alignment: Alignment.center,
// width: 24.0, // width: 60.sp,
// height: 24.0, // height: 28.sp,
// ), // decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(14.0.sp),
// border: Border.all(
// width: 0.4.sp,
// color: Colors.white,
// ),
// ),
// child: GestureDetector(
// onTap: (){
// Get.toNamed(AppRoutes.PhotoActivity);
// },
// child:Text(
// "换绑",
// style: TextStyle(
// color: Color(0xFFB7BECC),
// fontSize: 14.0.sp,
// ),
// )) ,)
// ], // ],
// ), // ),
// ), // ),
Container( // Container(
margin: EdgeInsets.only(top: 0.0.sp, left: 16.0.sp), // margin: EdgeInsets.only(top: 16.0.sp),
child: Text( // child: Row(
"账号绑定", // children: [
style: TextStyle( // Text(
color: Color(0xFFF7FAFA), // "微信",
fontSize: 16.0.sp, // style: TextStyle(
), // color: Color(0xFFB7BECC),
), // fontSize: 16.0.sp,
), // ),
Container( // ),
margin: EdgeInsets.only(top: 16.0.sp), // Spacer(),
child: Row( // Container(
children: [ // alignment: Alignment.center,
Text( // width: 60.sp,
"已绑定手机号", // height: 28.sp,
style: TextStyle( // decoration: BoxDecoration(
color: Color(0xFFB7BECC), // borderRadius: BorderRadius.circular(14.0.sp),
fontSize: 16.0.sp, // border: Border.all(
), // width: 0.4.sp,
), // color: Colors.white,
Spacer(), // ),
Container( // ),
alignment: Alignment.center, // child: Text(
width: 60.sp, // "去绑定",
height: 28.sp, // style: TextStyle(
decoration: BoxDecoration( // color: Color(0xFFB7BECC),
borderRadius: BorderRadius.circular(14.0.sp), // fontSize: 14.0.sp,
border: Border.all( // ),
width: 0.4.sp, // )),
color: Colors.white, // ],
), // ),
), // ),
child: GestureDetector( // Container(
onTap: (){ // margin: EdgeInsets.only(top: 16.0.sp),
Get.toNamed(AppRoutes.PhotoActivity); // child: Row(
}, // children: [
child:Text( // Text(
"换绑", // "邮箱",
style: TextStyle( // style: TextStyle(
color: Color(0xFFB7BECC), // color: Color(0xFFB7BECC),
fontSize: 14.0.sp, // fontSize: 16.0.sp,
), // ),
)) ,) // ),
], // Spacer(),
), // GestureDetector(
), // onTap: (){
Container( // Get.toNamed(AppRoutes.BindMailActivity);
margin: EdgeInsets.only(top: 16.0.sp), // },
child: Row( // child: Container(
children: [ // alignment: Alignment.center,
Text( // width: 60.sp,
"微信", // height: 28.sp,
style: TextStyle( // decoration: BoxDecoration(
color: Color(0xFFB7BECC), // borderRadius: BorderRadius.circular(14.0.sp),
fontSize: 16.0.sp, // border: Border.all(
), // width: 0.4.sp,
), // color: Colors.white,
Spacer(), // ),
Container( // ),
alignment: Alignment.center, // child: Text(
width: 60.sp, // "去绑定",
height: 28.sp, // style: TextStyle(
decoration: BoxDecoration( // color: Color(0xFFB7BECC),
borderRadius: BorderRadius.circular(14.0.sp), // fontSize: 14.0.sp,
border: Border.all( // ),
width: 0.4.sp, // )),)
color: Colors.white, //
), // ],
), // ),
child: Text( // ),
"去绑定", // Container(
style: TextStyle( // margin: EdgeInsets.only(top: 16.0.sp),
color: Color(0xFFB7BECC), // child: Text(
fontSize: 14.0.sp, // "温馨提示:完成账号绑定后,手机丢失或忘记密码也可以通过其他方式登录",
), // style: TextStyle(
)), // color: Color(0xFFB7BECC),
], // fontSize: 12.0.sp,
), // ),
), // ),
Container( // ),
margin: EdgeInsets.only(top: 16.0.sp),
child: Row(
children: [
Text(
"邮箱",
style: TextStyle(
color: Color(0xFFB7BECC),
fontSize: 16.0.sp,
),
),
Spacer(),
Container(
alignment: Alignment.center,
width: 60.sp,
height: 28.sp,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14.0.sp),
border: Border.all(
width: 0.4.sp,
color: Colors.white,
),
),
child: Text(
"去绑定",
style: TextStyle(
color: Color(0xFFB7BECC),
fontSize: 14.0.sp,
),
)),
],
),
),
Container(
margin: EdgeInsets.only(top: 16.0.sp),
child: Text(
"温馨提示:完成账号绑定后,手机丢失或忘记密码也可以通过其他方式登录",
style: TextStyle(
color: Color(0xFFB7BECC),
fontSize: 12.0.sp,
),
),
),
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: 40.0.sp, left: 72.0.sp, right: 72.0.sp), top: 40.0.sp, left: 72.0.sp, right: 72.0.sp),

View File

@ -0,0 +1,10 @@
import 'package:get/get.dart';
import 'logic.dart';
class BindmailBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut(() => BindmailLogic());
}
}

View File

@ -0,0 +1,7 @@
import 'package:get/get.dart';
import 'state.dart';
class BindmailLogic extends GetxController {
final BindmailState state = BindmailState();
}

View File

@ -0,0 +1,5 @@
class BindmailState {
BindmailState() {
///Initialize variables
}
}

View File

@ -0,0 +1,208 @@
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);
@override
_BindmailPageState createState() => _BindmailPageState();
}
class _BindmailPageState extends State<BindmailPage> {
int _countdownSeconds = 60;
bool _isCountingDown = false;
Timer? _timer;
@override
void dispose() {
_timer?.cancel();
super.dispose();
}
void startCountdown() {
setState(() {
_isCountingDown = true;
_countdownSeconds = 60;
});
_timer = Timer.periodic(Duration(seconds: 1), (timer) {
setState(() {
if (_countdownSeconds > 0) {
_countdownSeconds--;
} else {
_isCountingDown = false;
_timer?.cancel();
}
});
});
}
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(getBaseImage("home_back")),
fit: BoxFit.cover,
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(
centerTitle: '绑定邮箱',
),
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Existing code...
Container(
margin: EdgeInsets.only(
left: 16.0.sp,
top: 16.0.sp,
right: 16.0.sp,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.0.sp),
color: Color(0xff282733),
),
height: 40.0.sp,
child: Row(
// mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
alignment: Alignment.centerLeft,
padding: EdgeInsets.only(left: 16.0.sp, right: 10.sp),
child: Text(
" 邮箱 ",
style: TextStyle(
color: Colors.white,
fontSize: 14.0.sp,
),
)),
Expanded(
child: Container(
height: 32.sp,
alignment: Alignment.center,
child: TextField(
textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "请输入邮箱",
hintStyle: TextStyle(
color: Colors.grey.shade300,
fontSize: 14.0,
),
border: InputBorder.none,
),
style: TextStyle(
color: Colors.white,
fontSize: 14.0,
height: 1.0,
),
),
),
)
],
),
),
Row(
children: [
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.fromLTRB(
16.0.sp, 20.0.sp, 8.0.sp, 0.0.sp),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.0.sp),
color: Color(0xff282733),
),
height: 40.0.sp,
child: Row(
children: [
Container(
alignment: Alignment.centerLeft,
padding: EdgeInsets.only(
left: 10.0.sp, right: 10.sp),
child: Text(
"验证码",
style: TextStyle(color: Colors.white),
),
),
Expanded(
child: Container(
height: 32.sp,
alignment: Alignment.center,
child: TextField(
textAlignVertical:
TextAlignVertical.center,
decoration: InputDecoration(
hintText: "请输入验证码",
hintStyle: TextStyle(
color: Colors.grey.shade300,
fontSize: 14.0,
),
border: InputBorder.none,
),
style: TextStyle(
color: Colors.white,
fontSize: 14.0,
height: 1.0,
),
),
),
)
],
),
),
),
Expanded(
flex: 2,
child: GestureDetector(
onTap: () {
if (!_isCountingDown) {
// Only start countdown if not already counting down
startCountdown();
}
},
child: Container(
margin: EdgeInsets.fromLTRB(
8.0.sp, 20.0.sp, 16.0.sp, 0.0.sp),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.0.sp),
color: Color(0xff282733),
),
height: 40.0.sp,
child: Center(
child: Text(
_isCountingDown
? '$_countdownSeconds'
: '获取验证码',
style: TextStyle(
color: _isCountingDown
? Colors.grey.shade400
: Colors.white,
fontSize: 14.0.sp,
),
),
),
),
),
),
],
),
// Existing code...
],
),
),
),
);
}
}

View File

@ -0,0 +1,10 @@
import 'package:get/get.dart';
import 'logic.dart';
class FeedbackBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut(() => FeedbackLogic());
}
}

View File

@ -0,0 +1,40 @@
import 'dart:io';
import 'package:get/get.dart';
import 'package:image_picker/image_picker.dart';
import 'package:qiniu_flutter_sdk/qiniu_flutter_sdk.dart';
import 'state.dart';
class FeedbackLogic extends GetxController {
final FeedbackState state = FeedbackState();
final ImagePicker _picker = ImagePicker();
var storage = Storage();
Future getImageFile() async {
try {
final XFile? pickedFile = await _picker.pickImage(
source: ImageSource.gallery,
);
_setImageFileListFromFile(pickedFile!);
// setState(() {
// _setImageFileListFromFile(pickedFile);
// });
} catch (e) {
// setState(() {
// _pickImageError = e;
// });
}
}
void _setImageFileListFromFile(XFile pickedFile) {
PutController putController = PutController();
//
putController.addStatusListener((StorageStatus status) {
print('状态变化: 当前任务状态:$status');
});
storage.putFile(File(pickedFile.path), "",options: PutOptions(controller: putController));
}
}

View File

@ -0,0 +1,5 @@
class FeedbackState {
FeedbackState() {
///Initialize variables
}
}

View File

@ -0,0 +1,131 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.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 FeedbackPage extends StatelessWidget {
FeedbackPage({Key? key}) : super(key: key);
final logic = Get.find<FeedbackLogic>();
final state = Get
.find<FeedbackLogic>()
.state;
@override
Widget build(BuildContext context) {
return GetBuilder(builder: (FeedbackLogic controller){
return Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(getBaseImage("home_back")),
fit: BoxFit.cover,
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(
centerTitle: '意见反馈',
),
body: SingleChildScrollView(child: SafeArea(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 200,
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 20),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(13),
color: Color(
0xFF4C3E5F), // Use your desired background color
),
padding: EdgeInsets.all(13),
child: TextField(
decoration: InputDecoration(
hintText: '请补充详细问题和意见,我们会认真看完的哦~',
hintStyle: TextStyle(
color: Color(0xFFB7BECC), fontSize: 14.sp),
border: InputBorder.none,
),
maxLines: null,
maxLength: 200,
inputFormatters: [
LengthLimitingTextInputFormatter(200),
],
style: TextStyle(color: Colors.white),
),
),
Container(
height: 120.sp,
margin: EdgeInsets.only(left: 16.sp,right: 16.sp),
child: GridView.builder(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3, //
),
itemCount: 4, // Replace with your item count
itemBuilder: (context, index) {
if (index == 0) {
//
return GestureDetector(
onTap: () {
controller.getImageFile();
},
child: Container(
margin: EdgeInsets.all(5.sp),
child: Image(
image: AssetImage(getMineImage("icon_img_add")),
),
),
);
} else {
//
// data
// var itemData = data[index - 1]; //
return Container(
margin: EdgeInsets.all(5.sp),
child: Center(
// child: _buildImageItem(
// 'https://book.flutterchina.club/assets/img/logo.png'),
),
);
}
},
),
),
Padding(
padding: EdgeInsets.only(left: 16, top: 10),
child: Text(
'最多选择3张图片',
style: TextStyle(color: Color(0xFFB7BECC), fontSize: 12),
),
),
SizedBox(height: 50),
Container(
margin: EdgeInsets.symmetric(horizontal: 72),
height: 42,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(21),
color: Color(0xFF21BEAB),
),
child: Center(
child: Text(
'提交',
style: TextStyle(color: Colors.white, fontSize: 16),
),
),
),
],
),
),)
),
);
});
}
}

View File

@ -3,6 +3,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import '../../components/my_app_bar.dart'; import '../../components/my_app_bar.dart';
import '../../router/app_routers.dart';
import '../../util/util.dart'; import '../../util/util.dart';
import 'logic.dart'; import 'logic.dart';
@ -28,13 +29,13 @@ class HelpPage extends StatelessWidget {
), ),
body: SafeArea( body: SafeArea(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( Padding(
padding: EdgeInsets.only(top: 30.sp), padding: EdgeInsets.only(top: 30.sp),
child: Center( child: Center(
child: Text( child: Text(
'04-10 19:50', '04-10 19:51',
style: TextStyle( style: TextStyle(
color: Color(0xFFB7BECC), color: Color(0xFFB7BECC),
fontSize: 12.sp, fontSize: 12.sp,
@ -44,10 +45,20 @@ class HelpPage extends StatelessWidget {
), ),
SizedBox(height: 16.sp), SizedBox(height: 16.sp),
Padding( Padding(
padding: EdgeInsets.only(left: 16.sp,right: 16.sp), padding: EdgeInsets.only(left: 16.sp, right: 16.sp),
child: Row( child: Row(
children: [ children: [
Image.asset(getMineImage("im_feedback"),width: 32.sp,height: 32.sp,), Container(
height: 200.sp,
child: Align(
alignment: Alignment.topCenter,
child: Image.asset(
getMineImage("im_feedback"),
width: 32.sp,
height: 32.sp,
),
),
),
SizedBox(width: 8.sp), SizedBox(width: 8.sp),
Expanded( Expanded(
child: Container( child: Container(
@ -91,9 +102,14 @@ class HelpPage extends StatelessWidget {
children: [ children: [
TextButton.icon( TextButton.icon(
onPressed: () { onPressed: () {
Get.toNamed(AppRoutes.FeedbackActivity);
// Handle feedback button press // Handle feedback button press
}, },
icon: Image.asset(getMineImage("im_feedback_write"),width: 14.sp,height: 14.sp,), icon: Image.asset(
getMineImage("im_feedback_write"),
width: 14.sp,
height: 14.sp,
),
label: Text( label: Text(
'意见反馈', '意见反馈',
style: TextStyle( style: TextStyle(
@ -103,18 +119,23 @@ class HelpPage extends StatelessWidget {
), ),
style: TextButton.styleFrom( style: TextButton.styleFrom(
backgroundColor: Color(0xFF21BEAB), backgroundColor: Color(0xFF21BEAB),
padding: EdgeInsets.symmetric(horizontal: 16.sp, vertical: 4.sp), padding: EdgeInsets.symmetric(
horizontal: 16.sp, vertical: 4.sp),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20.sp), borderRadius: BorderRadius.circular(20.sp),
), ),
), ),
), ),
SizedBox(width: 10), SizedBox(width: 20),
TextButton.icon( TextButton.icon(
onPressed: () { onPressed: () {
// Handle contact service button press // Handle contact service button press
}, },
icon: Image.asset(getMineImage("im_service"),width: 14.sp,height: 14.sp,), icon: Image.asset(
getMineImage("im_service"),
width: 14.sp,
height: 14.sp,
),
label: Text( label: Text(
'联系客服', '联系客服',
style: TextStyle( style: TextStyle(
@ -124,7 +145,8 @@ class HelpPage extends StatelessWidget {
), ),
style: TextButton.styleFrom( style: TextButton.styleFrom(
backgroundColor: Color(0xFF21BEAB), backgroundColor: Color(0xFF21BEAB),
padding: EdgeInsets.symmetric(horizontal: 16.sp, vertical: 4.sp), padding: EdgeInsets.symmetric(
horizontal: 16.sp, vertical: 4.sp),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20.sp), borderRadius: BorderRadius.circular(20.sp),
), ),
@ -139,7 +161,4 @@ class HelpPage extends StatelessWidget {
), ),
); );
} }
} }

View File

@ -9,7 +9,7 @@ import 'state.dart';
class Complete_materialLogic extends GetxController { class Complete_materialLogic extends GetxController {
final Complete_materialState state = Complete_materialState(); final Complete_materialState state = Complete_materialState();
final ImagePicker _picker = ImagePicker(); final ImagePicker _picker = ImagePicker();
var type = Get.arguments ?? "";
Future getImageFile() async { Future getImageFile() async {
try { try {
final XFile? pickedFile = await _picker.pickImage( final XFile? pickedFile = await _picker.pickImage(

View File

@ -18,6 +18,7 @@ class Complete_materialPage extends StatelessWidget {
// PickerStyle pickerStyle = PickerStyle(); // PickerStyle pickerStyle = PickerStyle();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GetBuilder(builder: (Complete_materialLogic controller) { return GetBuilder(builder: (Complete_materialLogic controller) {
return Stack( return Stack(
children: [ children: [
@ -179,7 +180,12 @@ class Complete_materialPage extends StatelessWidget {
), ),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
controller.pushHome(); if(controller.type=="user"){
Navigator.pop(context);
}else{
controller.pushHome();
}
// controller.checkInfo(); // controller.checkInfo();
}, },
child: Container( child: Container(
@ -192,7 +198,7 @@ class Complete_materialPage extends StatelessWidget {
image: AssetImage(getLoginImage('start_bg'))), image: AssetImage(getLoginImage('start_bg'))),
), ),
child: Text( child: Text(
'开启小圈之旅', controller.type=="user"? "完成" : '开启小圈之旅',
style: TextStyle( style: TextStyle(
color: Color(0xff00FFF4), color: Color(0xff00FFF4),
fontSize: 16.sp, fontSize: 16.sp,
@ -211,6 +217,7 @@ class Complete_materialPage extends StatelessWidget {
}); });
} }
Widget funcWidget( Widget funcWidget(
String leftStr, Widget tipWidget, GestureTapCallback callback, String leftStr, Widget tipWidget, GestureTapCallback callback,
{String img = 'down_arr'}) { {String img = 'down_arr'}) {

View File

@ -9,7 +9,7 @@ import 'logic.dart';
class MinefragmentPage extends StatelessWidget { class MinefragmentPage extends StatelessWidget {
MinefragmentPage({Key? key}) : super(key: key); MinefragmentPage({Key? key}) : super(key: key);
// final logic = Get.lazyPut(() => MinefragmentLogic()); // final logic = Get.lazyPut(() => MinefragmentLogic());
// final state = Get.find<MinefragmentLogic>().state; // final state = Get.find<MinefragmentLogic>().state;
@ -59,55 +59,53 @@ class MinefragmentPage extends StatelessWidget {
} }
Widget _SetUpItemView() { Widget _SetUpItemView() {
return GestureDetector( return GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
Get.toNamed(AppRoutes.SetUpActivity); Get.toNamed(AppRoutes.SetUpActivity);
// controller.state.hearUrl // controller.state.hearUrl
},
}, child: Container(
child: Container( // color: Colors.red,
// color: Colors.red, margin: EdgeInsets.only(top: 18),
margin: EdgeInsets.only(top: 18), child: Row(
child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
children: [ Row(
Row( children: [
children: [ Image(
Image( image: AssetImage(getHomeImage("mine_setup")),
image: AssetImage(getHomeImage("mine_setup")), width: 24,
width: 24, height: 24,
height: 24, ),
), SizedBox(width: 10),
SizedBox(width: 10), Text(
Text( "设置",
"设置", style: TextStyle(color: Colors.white),
style: TextStyle(color: Colors.white), ),
), ],
], ),
), Row(
Row( children: [
children: [ Image(
Image( image: AssetImage(getHomeImage("icon_in")),
image: AssetImage(getHomeImage("icon_in")), width: 24,
width: 24, height: 24,
height: 24, ),
), ],
], )
) ],
],
),
), ),
); ),
);
} }
Widget _HelpItemView() { Widget _HelpItemView() {
return GestureDetector( return GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
Get.toNamed(AppRoutes.HelpActivity); Get.toNamed(AppRoutes.HelpActivity);
// controller.state.hearUrl // controller.state.hearUrl
}, },
child: Container( child: Container(
margin: EdgeInsets.only(top: 18), margin: EdgeInsets.only(top: 18),
@ -194,7 +192,7 @@ class MinefragmentPage extends StatelessWidget {
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
print("我喜欢的"); print("我喜欢的");
Get.toNamed(AppRoutes.FriendsActivity,arguments: "0"); Get.toNamed(AppRoutes.FriendsActivity, arguments: "0");
}, },
child: Container( child: Container(
child: Column( child: Column(
@ -230,9 +228,9 @@ class MinefragmentPage extends StatelessWidget {
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
print("喜欢我的"); print("喜欢我的");
Get.toNamed(AppRoutes.FriendsActivity,arguments: "1"); Get.toNamed(AppRoutes.FriendsActivity, arguments: "1");
}, },
child: Stack( child: Stack(
children: [ children: [
Column( Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -285,9 +283,9 @@ class MinefragmentPage extends StatelessWidget {
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
print("最近来访"); print("最近来访");
Get.toNamed(AppRoutes.FriendsActivity,arguments: "2"); Get.toNamed(AppRoutes.FriendsActivity, arguments: "2");
}, },
child: Stack( child: Stack(
children: [ children: [
Column( Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -336,8 +334,6 @@ class MinefragmentPage extends StatelessWidget {
], ],
), ),
), ),
], ],
), ),
), ),
@ -348,7 +344,7 @@ class MinefragmentPage extends StatelessWidget {
return GestureDetector( return GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
Get.toNamed(AppRoutes.UserInfoActivity,arguments: ""); Get.toNamed(AppRoutes.UserInfoActivity, arguments: "");
}, },
child: Container( child: Container(
width: Get.width, width: Get.width,
@ -378,12 +374,10 @@ class MinefragmentPage extends StatelessWidget {
} }
Widget _buildAvatar1() { Widget _buildAvatar1() {
return ClipOval( return ClipOval(
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
// controller.state.hearUrl = // Get.toNamed(AppRoutes.Swiper,arguments:imgList);
// 'https://book.flutterchina.club/assets/img/logo.png';
// controller.update();
}, },
child: Image.network( child: Image.network(
'https://book.flutterchina.club/assets/img/logo.png', 'https://book.flutterchina.club/assets/img/logo.png',
@ -391,8 +385,8 @@ class MinefragmentPage extends StatelessWidget {
height: 65, height: 65,
), ),
), ),
);
);
} }
Widget _buildNameRow() { Widget _buildNameRow() {

View File

@ -0,0 +1,10 @@
import 'package:get/get.dart';
import 'logic.dart';
class OffaccountBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut(() => OffaccountLogic());
}
}

View File

@ -0,0 +1,10 @@
import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';
import 'state.dart';
class OffaccountLogic extends GetxController {
final OffaccountState state = OffaccountState();
}

View File

@ -0,0 +1,12 @@
import 'package:flutter/cupertino.dart';
class OffaccountState {
OffaccountState() {
///Initialize variables
}
String offReasonMsg = "请选择";
TextEditingController photoController = TextEditingController();
}

View File

@ -0,0 +1,322 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.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 OffaccountPage extends StatefulWidget {
OffaccountPage({Key? key}) : super(key: key);
@override
_OffaccountState createState() => _OffaccountState();
}
class _OffaccountState extends State<OffaccountPage> {
int countdown = 10; //
bool isButtonDisabled = false; //
late Timer timer;
@override
void initState() {
super.initState();
startCountdown();
}
@override
void dispose() {
timer.cancel();
super.dispose();
}
void startCountdown() {
timer = Timer.periodic(Duration(seconds: 1), (Timer t) {
setState(() {
if (countdown > 0) {
countdown--;
} else {
timer.cancel();
}
});
});
}
void handleLogout(OffaccountLogic logic) {
if(countdown > 0 ){
}else{
showToast(logic.state.photoController.text.toString()+"");
}
//
}
@override
Widget build(BuildContext context) {
return GetBuilder<OffaccountLogic>(builder: (logic) {
return Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(getBaseImage("home_back")),
fit: BoxFit.cover,
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(centerTitle: '注销账号'),
body: Scaffold(
backgroundColor: Colors.transparent,
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
//
Text(
"注销后,你的账号将",
style: TextStyle(
color: Colors.white,
fontSize: 16,
),
),
SizedBox(height: 8),
Text(
"1、无法登录跨友app",
style: TextStyle(
color: Color(0xFFB7BECC),
fontSize: 12,
),
),
Text(
"2、所有信息将被永远删除身份信息、账户信息、会员、喊话、相册等内容",
style: TextStyle(
color: Color(0xFFB7BECC),
fontSize: 12,
),
),
Text(
"3、您的好友无法与你取得联系(包括关注、粉丝等);",
style: TextStyle(
color: Color(0xFFB7BECC),
fontSize: 12,
),
),
Text(
"4、注销后一个月内该手机号将无法注册新的账号。",
style: TextStyle(
color: Color(0xFFB7BECC),
fontSize: 12,
),
),
SizedBox(height: 10),
//
Text(
"请输入绑定的手机号",
style: TextStyle(
color: Color(0xFF898F99),
fontSize: 10,
),
),
SizedBox(height: 10),
TextFormField(
controller: logic.state.photoController,
keyboardType: TextInputType.phone,
inputFormatters: [
FilteringTextInputFormatter.digitsOnly,
FilteringTextInputFormatter.deny(RegExp('[^0-9]')),
],
decoration: InputDecoration(
hintText: "请输入手机号",
hintStyle: TextStyle(
color: Colors.white,
fontSize: 14,
),
filled: true,
fillColor: Color(0xFF000000),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(4),
borderSide: BorderSide.none,
),
contentPadding: EdgeInsets.symmetric(horizontal: 16),
),
style: TextStyle(
color: Colors.white,
fontSize: 14,
),
// enabled: countdown == 0, //
),
SizedBox(height: 16),
//
Text(
"请选择你的注销原因",
style: TextStyle(
color: Color(0xFF898F99),
fontSize: 10,
),
),
SizedBox(height: 10),
GestureDetector(onTap: () {
showBottomSheetDialog(context,logic);
},
child: Container(
width: double.infinity,
height: 40,
margin: EdgeInsets.only(top: 10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
color: Color(0xFF000000),
),
child: Row(
children: [
Expanded(
child: TextFormField(
enabled: false,
decoration: InputDecoration(
hintText: logic.state.offReasonMsg,
hintStyle: TextStyle(
color: Color(0xFFF7FAFA),
fontSize: 14,
),
border: InputBorder.none,
contentPadding: EdgeInsets.only(left: 16),
),
style: TextStyle(
color: Color(0xFFF7FAFA),
fontSize: 14,
),
),
),
Image.asset(
getHomeImage("icon_in"),
width: 14,
height: 14,
),
],
),
),)
,
SizedBox(height: 42),
//
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
}, child: Align(
alignment: Alignment.bottomCenter,
child: Container(
width: 160,
child: ElevatedButton(
onPressed: (){
handleLogout(logic);
},
child: Text(
countdown > 0 ? "注销($countdown s" : "注销",
),
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(
countdown > 0 ? Colors.grey : Color(0xFF21BEAB),
),
shape: MaterialStateProperty.all<OutlinedBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(17),
),
),
),
),
),
),)
,
],
),
),
),
),
),
);
});
}
void showBottomSheetDialog(BuildContext context,OffaccountLogic logic) {
showModalBottomSheet(
context: context,
backgroundColor: Colors.transparent,
builder: (BuildContext context) {
return Container(
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.6),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(20),
topRight: Radius.circular(20),
),
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
buildOptionItem("体验太差", context,logic),
buildDivider(),
buildOptionItem("换平台了", context,logic),
buildDivider(),
buildOptionItem("担心隐私泄露", context,logic),
],
),
);
},
);
}
Widget buildOptionItem(String title, BuildContext context,OffaccountLogic logic) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
//
Navigator.pop(context);
logic.state.offReasonMsg = title;
logic.update();
//
// switch (title) {
// case "体验太差":
//
// //
// break;
// case "换平台了":
// //
// break;
// case "担心隐私泄露":
// //
// break;
// }
},
child: Container(
width: Get.width,
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 16),
child: Text(
title,
style: TextStyle(
fontSize: 16,
color: Colors.white,
),
),
),
);
}
Widget buildDivider() {
return Container(
height: 0.5,
color: Color(0xff2E2E3B),
margin: EdgeInsets.symmetric(horizontal: 16),
);
}
}

View File

@ -1,7 +1,11 @@
import 'package:circle_app/util/util.dart';
import 'package:flutter/cupertino.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'state.dart'; import 'state.dart';
class PhotoinfoLogic extends GetxController { class PhotoinfoLogic extends GetxController {
final PhotoinfoState state = PhotoinfoState(); final PhotoinfoState state = PhotoinfoState();
} }

View File

@ -1,4 +1,7 @@
import 'dart:async';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
@ -6,281 +9,373 @@ import '../../components/my_app_bar.dart';
import '../../util/util.dart'; import '../../util/util.dart';
import 'logic.dart'; import 'logic.dart';
class PhotoinfoPage extends StatelessWidget { class PhotoinfoPage extends StatefulWidget {
PhotoinfoPage({Key? key}) : super(key: key); PhotoinfoPage({Key? key}) : super(key: key);
final logic = Get.find<PhotoinfoLogic>(); @override
final state = Get.find<PhotoinfoLogic>().state; _PhotoinfoPage createState() => _PhotoinfoPage();
}
class _PhotoinfoPage extends State<PhotoinfoPage> {
int _countdownSeconds = 60;
bool _isCountingDown = false;
Timer? _timer;
TextEditingController _photoController = TextEditingController();
TextEditingController _passwordController = TextEditingController();
TextEditingController _newPhotoController = TextEditingController();
TextEditingController _codeController = TextEditingController();
@override
void dispose() {
_timer?.cancel();
super.dispose();
}
void startCountdown() {
setState(() {
_isCountingDown = true;
_countdownSeconds = 60;
});
_timer = Timer.periodic(Duration(seconds: 1), (timer) {
setState(() {
if (_countdownSeconds > 0) {
_countdownSeconds--;
} else {
_isCountingDown = false;
_timer?.cancel();
}
});
});
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return GetBuilder<PhotoinfoLogic>(builder: (logic) {
decoration: BoxDecoration(
image: DecorationImage( return Container(
image: AssetImage(getBaseImage("home_back")), decoration: BoxDecoration(
fit: BoxFit.cover, image: DecorationImage(
image: AssetImage(getBaseImage("home_back")),
fit: BoxFit.cover,
),
), ),
), child: Scaffold(
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(
centerTitle: '换绑手机号',
),
body: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
body: SingleChildScrollView( appBar: MyAppBar(
child: Column( centerTitle: '换绑手机号',
crossAxisAlignment: CrossAxisAlignment.start, ),
children: [ body: Scaffold(
Container( backgroundColor: Colors.transparent,
margin: EdgeInsets.only( body: SingleChildScrollView(
left: 16.0.sp, child: Column(
top: 16.0.sp, crossAxisAlignment: CrossAxisAlignment.start,
right: 16.0.sp, children: [
), Container(
decoration: BoxDecoration( margin: EdgeInsets.only(
borderRadius: BorderRadius.circular(4.0.sp), left: 16.0.sp,
color: Color(0xff282733), top: 16.0.sp,
), right: 16.0.sp,
height: 40.0.sp, ),
child: Row( decoration: BoxDecoration(
// mainAxisAlignment: MainAxisAlignment.center, borderRadius: BorderRadius.circular(4.0.sp),
children: [ color: Color(0xff282733),
Container( ),
alignment: Alignment.centerLeft, height: 40.0.sp,
padding: EdgeInsets.only(left: 16.0.sp, right: 10.sp), child: Row(
child: Text( // mainAxisAlignment: MainAxisAlignment.center,
"+86", children: [
style: TextStyle( Container(
color: Colors.white, alignment: Alignment.centerLeft,
fontSize: 14.0.sp, padding: EdgeInsets.only(
), left: 16.0.sp, right: 10.sp),
)),
Expanded(
child: Container(
height: 32.sp,
alignment: Alignment.center,
child: TextField(
textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "请输入已绑定手机号",
hintStyle: TextStyle(
color: Colors.grey.shade300,
fontSize: 14.0,
),
border: InputBorder.none,
),
style: TextStyle(
color: Colors.white,
fontSize: 14.0,
height: 1.0,
),
),
),
)
],
),
),
Container(
margin: EdgeInsets.fromLTRB(16.0, 20.0, 16.0, 0.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.0),
color: Color(0xff282733),
),
height: 40.0,
child: Row(
children: [
Container(
alignment: Alignment.centerLeft,
padding: EdgeInsets.only(left: 10.0.sp, right: 10.sp),
child: Image(
image: AssetImage(getMineImage("im_lock")),
width: 24.sp,
height: 24.sp,
),
),
Expanded(
child: Container(
height: 32.sp,
alignment: Alignment.center,
child: TextField(
textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "请输入密码",
hintStyle: TextStyle(
color: Colors.grey.shade300,
fontSize: 14.0,
),
border: InputBorder.none,
),
style: TextStyle(
color: Colors.white,
fontSize: 14.0,
height: 1.0,
),
),
),
)
],
),
),
Container(
margin:
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),
),
height: 40.0.sp,
child: Row(
children: [
Padding(
padding: EdgeInsets.only(left: 16.0.sp,right: 10.sp),
child: Center(
child: Text( child: Text(
"+86", "+86",
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 14.0.sp, fontSize: 14.0.sp,
), ),
), )),
)), Expanded(
Expanded( child: Container(
child: Container( height: 32.sp,
height: 32.sp, alignment: Alignment.center,
alignment: Alignment.center, child: TextField(
child: TextField( controller: _photoController,
textAlignVertical: TextAlignVertical.center, textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration( inputFormatters: [
hintText: "请输入新手机号", FilteringTextInputFormatter.digitsOnly,
hintStyle: TextStyle( FilteringTextInputFormatter.deny(RegExp('[^0-9]')),
color: Colors.grey.shade300, ],
fontSize: 14.0, keyboardType: TextInputType.phone,
decoration: InputDecoration(
hintText: "请输入已绑定手机号",
hintStyle: TextStyle(
color: Colors.grey.shade300,
fontSize: 14.0,
),
border: InputBorder.none,
),
style: TextStyle(
color: Colors.white,
fontSize: 14.0,
height: 1.0,
), ),
border: InputBorder.none,
),
style: TextStyle(
color: Colors.white,
fontSize: 14.0,
height: 1.0,
), ),
), ),
), )
) ],
], ),
), ),
), Container(
Row( margin: EdgeInsets.fromLTRB(16.0, 20.0, 16.0, 0.0),
children: [ decoration: BoxDecoration(
Expanded( borderRadius: BorderRadius.circular(4.0),
flex: 4, color: Color(0xff282733),
child: Container( ),
margin: EdgeInsets.fromLTRB( height: 40.0,
16.0.sp, 20.0.sp, 8.0.sp, 0.0.sp), child: Row(
decoration: BoxDecoration( children: [
borderRadius: BorderRadius.circular(4.0.sp), Container(
color: Color(0xff282733), alignment: Alignment.centerLeft,
padding: EdgeInsets.only(left: 10.0.sp, right: 10.sp),
child: Image(
image: AssetImage(getMineImage("im_lock")),
width: 24.sp,
height: 24.sp,
),
), ),
height: 40.0.sp, Expanded(
child: Row( child: Container(
children: [ height: 32.sp,
Container( alignment: Alignment.center,
alignment: Alignment.centerLeft, child: TextField(
padding: EdgeInsets.only(left: 10.0.sp, right: 10.sp), controller: _passwordController,
child: Image( textAlignVertical: TextAlignVertical.center,
image: AssetImage(getMineImage("im_shield")), obscureText: true, // true以隐藏用户输入的内容
width: 24.sp,
height: 24.sp, decoration: InputDecoration(
hintText: "请输入密码",
hintStyle: TextStyle(
color: Colors.grey.shade300,
fontSize: 14.0,
),
border: InputBorder.none,
),
style: TextStyle(
color: Colors.white,
fontSize: 14.0,
height: 1.0,
), ),
), ),
Expanded( ),
child: Container( )
height: 32.sp, ],
alignment: Alignment.center, ),
child: TextField( ),
textAlignVertical: TextAlignVertical.center, Container(
decoration: InputDecoration( margin:
hintText: "请输入验证码", EdgeInsets.fromLTRB(16.0.sp, 20.0.sp, 16.0.sp, 0.0.sp),
hintStyle: TextStyle( decoration: BoxDecoration(
color: Colors.grey.shade300, borderRadius: BorderRadius.circular(4.0.sp),
fontSize: 14.0, color: Color(0xff282733),
), ),
border: InputBorder.none, height: 40.0.sp,
), child: Row(
style: TextStyle( children: [
color: Colors.white, Padding(
fontSize: 14.0, padding: EdgeInsets.only(
height: 1.0, left: 16.0.sp, right: 10.sp),
), child: Center(
child: Text(
"+86",
style: TextStyle(
color: Colors.white,
fontSize: 14.0.sp,
), ),
), ),
) )),
], Expanded(
child: Container(
height: 32.sp,
alignment: Alignment.center,
child: TextField(
controller: _newPhotoController,
textAlignVertical: TextAlignVertical.center,
keyboardType: TextInputType.phone,
inputFormatters: [
FilteringTextInputFormatter.digitsOnly,
FilteringTextInputFormatter.deny(RegExp('[^0-9]')),
],
decoration: InputDecoration(
hintText: "请输入新手机号",
hintStyle: TextStyle(
color: Colors.grey.shade300,
fontSize: 14.0,
),
border: InputBorder.none,
),
style: TextStyle(
color: Colors.white,
fontSize: 14.0,
height: 1.0,
),
),
),
)
],
),
),
Row(
children: [
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.fromLTRB(
16.0.sp, 20.0.sp, 8.0.sp, 0.0.sp),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.0.sp),
color: Color(0xff282733),
),
height: 40.0.sp,
child: Row(
children: [
Container(
alignment: Alignment.centerLeft,
padding: EdgeInsets.only(
left: 10.0.sp, right: 10.sp),
child: Image(
image: AssetImage(getMineImage("im_shield")),
width: 24.sp,
height: 24.sp,
),
),
Expanded(
child: Container(
height: 32.sp,
alignment: Alignment.center,
child: TextField(
controller: _codeController,
textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "请输入验证码",
hintStyle: TextStyle(
color: Colors.grey.shade300,
fontSize: 14.0,
),
border: InputBorder.none,
),
style: TextStyle(
color: Colors.white,
fontSize: 14.0,
height: 1.0,
),
),
),
)
],
),
), ),
), ),
), Expanded(
Expanded( flex: 2,
flex: 2, child: GestureDetector(
child: Container( onTap: () {
margin: EdgeInsets.fromLTRB( if (!_isCountingDown) {
8.0.sp, 20.0.sp, 16.0.sp, 0.0.sp), // Only start countdown if not already counting down
decoration: BoxDecoration( startCountdown();
borderRadius: BorderRadius.circular(4.0.sp), }
color: Color(0xff282733), },
), child: Container(
height: 40.0.sp, margin: EdgeInsets.fromLTRB(
child: Center( 8.0.sp, 20.0.sp, 16.0.sp, 0.0.sp),
child: Text( decoration: BoxDecoration(
"获取验证码", borderRadius: BorderRadius.circular(4.0.sp),
style: TextStyle( color: Color(0xff282733),
color: Colors.grey.shade400, ),
fontSize: 14.0.sp, height: 40.0.sp,
child: Center(
child: Text(
_isCountingDown
? '$_countdownSeconds'
: '获取验证码',
style: TextStyle(
color: _isCountingDown
? Colors.grey.shade400
: Colors.white,
fontSize: 14.0.sp,
),
),
), ),
), ),
), ),
), ),
), ],
], ),
), Padding(
Padding( padding:
padding: EdgeInsets.fromLTRB(20.0.sp, 20.0.sp, 20.0.sp, 0.0.sp),
EdgeInsets.fromLTRB(20.0.sp, 20.0.sp, 20.0.sp, 0.0.sp), child: Text(
child: Text( "温馨提示:换绑成功后,将退出软件使用新手机号重新登录,旧手机号无法登录此账号,但可以重新注册。",
"温馨提示:换绑成功后,将退出软件使用新手机号重新登录,旧手机号无法登录此账号,但可以重新注册。", style: TextStyle(
style: TextStyle( color: Colors.grey.shade400,
color: Colors.grey.shade400, fontSize: 12.0.sp,
fontSize: 12.0.sp, ),
), ),
), ),
), GestureDetector(
GestureDetector( onTap: () {
onTap: () { String photo = _photoController.text;
// Perform action on button press String password = _passwordController.text;
}, String newphoto = _newPhotoController.text;
child: Container( String code = _codeController.text;
margin: if(photo==""||photo.length<11){
EdgeInsets.fromLTRB(72.0.sp, 40.0.sp, 72.0.sp, 0.0.sp), showToast("已绑定的手机号输入有误");
height: 42.0.sp, return ;
decoration: BoxDecoration( }
borderRadius: BorderRadius.circular(21.0.sp), if(password==""){
color: Colors.blue, showToast("请输入密码");
), return ;
child: Center( }
child: Text( if(newphoto==""||newphoto.length<11){
"确定", showToast("新手机号输入有误");
style: TextStyle( return ;
color: Colors.white, }
fontSize: 16.0.sp, if(code==""){
showToast("请输入验证码");
return ;
}
// Perform action on button press
},
child: Container(
margin:
EdgeInsets.fromLTRB(72.0.sp, 40.0.sp, 72.0.sp, 0.0.sp),
height: 42.0.sp,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(21.0.sp),
color: Colors.blue,
),
child: Center(
child: Text(
"确定",
style: TextStyle(
color: Colors.white,
fontSize: 16.0.sp,
),
), ),
), ),
), ),
), ),
), ],
], ),
), ),
), ),
), ),
), );
); });
} }
} }

View File

@ -0,0 +1,10 @@
import 'package:get/get.dart';
import 'logic.dart';
class ReportBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut(() => ReportLogic());
}
}

View File

@ -0,0 +1,44 @@
import 'package:get/get.dart';
import 'package:image_picker/image_picker.dart';
import 'state.dart';
class ReportLogic extends GetxController {
final ReportState state = ReportState();
List<MyObject> arrList = <MyObject>[
MyObject("涉嫌欺诈", false),
MyObject("色情低俗", false),
MyObject("侮辱谩骂", false),
MyObject("骚扰广告", false),
MyObject("扰乱平台", false),
MyObject("散布谣言", false),
MyObject("盗图侵权", false),
MyObject("其他违规", false)
];
List<MyObject> getItemList() {
return arrList;
}
final ImagePicker _picker = ImagePicker();
Future getImageFile() async {
try {
final XFile? pickedFile = await _picker.pickImage(
source: ImageSource.gallery,
);
// setState(() {
// _setImageFileListFromFile(pickedFile);
// });
} catch (e) {
// setState(() {
// _pickImageError = e;
// });
}
}
}
class MyObject {
String name;
bool isSelect;
MyObject(this.name, this.isSelect);
}

View File

@ -0,0 +1,13 @@
import 'logic.dart';
class ReportState {
ReportState() {
///Initialize variables
///
}
}

View File

@ -0,0 +1,234 @@
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 ReportPage extends StatelessWidget {
ReportPage({Key? key}) : super(key: key);
final logic = Get.find<ReportLogic>();
final state = Get.find<ReportLogic>().state;
@override
Widget build(BuildContext context) {
return GetBuilder(builder: (ReportLogic controller) {
return Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(getBaseImage("home_back")),
fit: BoxFit.cover,
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(
centerTitle: '举报',
actionWdiget: Text(
"提交",
style: TextStyle(color: Colors.white),
),
onPressed: () {
showToast("提交");
},
),
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(left: 16, top: 16),
child: Text(
'举报类目',
style: TextStyle(
color: Colors.white,
fontSize: 16,
),
),
),
Container(
height: 120.sp,
child: _reportAdapter(controller),
),
Expanded(
child: Padding(
padding: EdgeInsets.fromLTRB(16, 20, 16, 0),
child: ListView(
children: [
Text(
'详细截图(请至少上传一张图片,帮助审核处理)',
style: TextStyle(
color: Colors.white70,
fontSize: 16,
),
),
SizedBox(height: 20),
// RecyclerViewListView
// : MyRecyclerViewWidget(),
Container(
height: 130.sp,
child: _imageAdapter(controller)),
Text(
'补充说明',
style: TextStyle(
color: Colors.white,
fontSize: 14,
),
),
SizedBox(height: 30),
Container(
margin: EdgeInsets.only(left: 16, right: 16),
height: 200,
decoration: BoxDecoration(
color: Color(0xFF4C3E5F),
borderRadius: BorderRadius.circular(10),
),
padding: EdgeInsets.all(16.sp),
child: Stack(
children: [
TextField(
decoration: InputDecoration.collapsed(
hintText: '违规补充说明,帮助审核处理,选填',
hintStyle: TextStyle(
color: Color(0xFFB7BECC),
fontSize: 12,
),
),
maxLines: null,
maxLength: 200,
style: TextStyle(
color: Color(0xFF000000),
fontSize: 12,
),
),
],
),
),
],
),
),
),
],
),
),
);
});
}
Widget _reportAdapter(ReportLogic controller) {
return GridView.builder(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
// crossAxisSpacing: 6.sp,
childAspectRatio: 3,
),
itemCount: controller.getItemList().length,
shrinkWrap: true,
itemBuilder: (BuildContext context, int index) {
return GestureDetector(
onTap: () {
controller.arrList[index].isSelect =
!controller.arrList[index].isSelect;
controller.update();
},
child: _getItemSelect(controller.arrList[index]),
);
},
);
}
Widget _imageAdapter(ReportLogic controller) {
return GridView.builder(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3, //
),
itemCount: 20, //
itemBuilder: (BuildContext context, int index) {
if (index == 0) {
//
return GestureDetector(
onTap: () {
controller.getImageFile();
},
child: Container(
margin: EdgeInsets.all(5.sp),
child: Image(
image: AssetImage(getMineImage("icon_img_add")),
),
),
);
} else {
//
// data
// var itemData = data[index - 1]; //
return Container(
margin: EdgeInsets.all(5.sp),
child: Center(
// child: _buildImageItem(
// 'https://book.flutterchina.club/assets/img/logo.png'),
),
);
}
},
);
}
Widget _getItemSelect(MyObject bean) {
if (bean.isSelect) {
return Container(
margin:
EdgeInsets.only(left: 8.sp, right: 8.sp, top: 6.sp, bottom: 6.sp),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20.sp),
gradient: LinearGradient(
colors: [
Color(0xFF06F9FA),
Color(0xFFDC5BFD),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
padding:
EdgeInsets.only(top: 2.sp, bottom: 2.sp, left: 15.sp, right: 15.sp),
child: Center(
child: Text(
bean.name,
style: TextStyle(
color: Colors.white,
fontSize: 11.sp,
),
),
),
);
} else {
return Container(
margin:
EdgeInsets.only(left: 8.sp, right: 8.sp, top: 6.sp, bottom: 6.sp),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20.0), //
border: Border.all(
color: Color(0xFF392D53),
),
color: Color(0xFF392D53),
),
child: Padding(
padding: EdgeInsets.only(
top: 2.sp, bottom: 2.sp, left: 15.sp, right: 15.sp),
child: Center(
child: Text(
bean.name,
style: TextStyle(
fontSize: 11.0,
color: Colors.white,
),
),
),
),
),
);
}
}
}

View File

@ -0,0 +1,10 @@
import 'package:get/get.dart';
import 'logic.dart';
class SwiperBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut(() => SwiperLogic());
}
}

View File

@ -0,0 +1,8 @@
import 'package:get/get.dart';
import 'state.dart';
class SwiperLogic extends GetxController {
final SwiperState state = SwiperState();
List<Map> imgList = Get.arguments ;
}

View File

@ -0,0 +1,5 @@
class SwiperState {
SwiperState() {
///Initialize variables
}
}

View File

@ -0,0 +1,44 @@
import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:get/get_state_manager/src/simple/get_state.dart';
import 'logic.dart';
class SwiperPage extends StatefulWidget {
const SwiperPage({Key? key}) : super(key: key);
@override
State<SwiperPage> createState() => _SwiperPageState();
}
class _SwiperPageState extends State<SwiperPage> {
@override
Widget build(BuildContext context) {
return GetBuilder<SwiperLogic>(builder: (logic) {
return Scaffold(
appBar: null,
backgroundColor: Colors.black87,
body: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: (() {
//
Navigator.pop(context);
}),
child: Swiper(
itemBuilder: (BuildContext context, int index) {
return Container(
width: double.infinity,
child: Image.network(
logic.imgList[index]['url'], fit: BoxFit.contain,)
);
},
itemCount: logic.imgList.length,
pagination: SwiperPagination(), //
// control: new SwiperControl(), //,线
),
),
);
});
}
}

View File

@ -0,0 +1,10 @@
import 'package:get/get.dart';
import 'logic.dart';
class TextBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut(() => TextLogic());
}
}

View File

@ -0,0 +1,7 @@
import 'package:get/get.dart';
import 'state.dart';
class TextLogic extends GetxController {
final TextState state = TextState();
}

View File

@ -0,0 +1,5 @@
class TextState {
TextState() {
///Initialize variables
}
}

View File

@ -0,0 +1,998 @@
import 'package:circle_app/app/text/logic.dart';
import 'package:circle_app/util/util.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get_core/src/get_main.dart';
import 'package:get/get_state_manager/src/simple/get_state.dart';
import '../../components/my_app_bar.dart';
class TextPage extends StatefulWidget {
@override
State<TextPage> createState() => _MyTabbedScreenState();
}
class _MyTabbedScreenState extends State<TextPage>
with SingleTickerProviderStateMixin {
late TabController _tabController;
ScrollController scrollController = ScrollController();
bool isShowBlackTitle = false;
@override
void initState() {
super.initState();
_tabController = TabController(length: 2, vsync: this);
}
@override
void dispose() {
_tabController.dispose();
super.dispose();
}
void _onScroll(offset) {
if (offset > 100) {
setState(() {
isShowBlackTitle = true;
});
} else {
setState(() {
isShowBlackTitle = false;
});
}
}
@override
Widget build(BuildContext context) {
return GetBuilder(builder: (TextLogic controller) {
return Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(getBaseImage("home_back")),
fit: BoxFit.cover,
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(
centerTitle: '个人主页',
),
body:Container(
margin: EdgeInsets.all(10.sp),
child: Stack(children: [
NotificationListener(
onNotification: (scrollNotification) {
if (scrollNotification is ScrollUpdateNotification &&
scrollNotification.depth == 0) {
//
_onScroll(scrollNotification.metrics.pixels);
}
return true;
},
child: Stack(
children: <Widget>[
NestedScrollView(
headerSliverBuilder:
(BuildContext context, bool innerBoxIsScrolled) {
return <Widget>[
SliverOverlapAbsorber(
handle: NestedScrollView
.sliverOverlapAbsorberHandleFor(context),
sliver: SliverAppBar(
leading: new Container(
child: Container(),
),
title: isShowBlackTitle ? Text('') : Text(''),
centerTitle: false,
pinned: false,
floating: false,
snap: false,
primary: false,
expandedHeight: 165.0.sp,
backgroundColor: Colors.transparent,
elevation: 0,
//innerBoxIsScrolled
forceElevated: innerBoxIsScrolled,
actions: <Widget>[
new Container(
margin: EdgeInsets.only(
right: 10, top: 20, bottom: 10),
child: Container(),
),
new Container(
margin: EdgeInsets.only(
right: 10, top: 20, bottom: 10),
child: Container(),
),
],
flexibleSpace: FlexibleSpaceBar(
collapseMode: CollapseMode.pin,
background: new Column(
children: <Widget>[
new Container(
height: 165.sp,
child: new Column(
children: <Widget>[
Row(
children: [
_imagelistView(controller),
Flexible(
child: buildUserContainer(),
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
Row(
children: [
Text(
"name",
style: TextStyle(
color: Color.fromRGBO(
247, 250, 250, 1.0),
fontSize: 16,
),
),
SizedBox(width: 10.sp),
_buildInfoRow(),
],
),
Row(
children: [
Container(
margin: EdgeInsets.only(
right: 5.sp),
width: 10.sp,
height: 10.sp,
decoration: BoxDecoration(
shape: BoxShape.circle,
color:
Color(0xFF00FFF4),
),
),
Text(
"在线·深圳",
style: TextStyle(
color: Color(
0xFF00FFF4)),
)
],
),
],
),
Container(
// margin: EdgeInsets.only(top: 18.sp, bottom: 18.sp),
height: 59.sp,
child: ListView.builder(
itemCount: 8,
// item
scrollDirection:
Axis.horizontal,
//
padding: EdgeInsets.symmetric(
vertical: 18.sp),
//
itemBuilder: (context, index) {
return Container(
margin: EdgeInsets.only(
right: 11.sp),
// item
child: Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius
.circular(17.0),
//
gradient:
LinearGradient(
colors: [
Color(0xFF06F9FA),
Color(0xFFDC5BFD),
],
),
color:
Color(0xFF392D53),
),
child: Container(
margin: EdgeInsets.all(
0.2.sp),
decoration:
BoxDecoration(
borderRadius:
BorderRadius
.circular(
17.0),
// shape: BoxShape.circle,
color:
Color(0xFF392D53),
),
child: Padding(
padding:
EdgeInsets.only(
top: 2.sp,
bottom: 2.sp,
left: 15.sp,
right: 15.sp),
child: Center(
child: Text(
"圆角背景边框",
style: TextStyle(
fontSize: 11.0,
color: Colors
.white,
),
),
),
),
),
), //
);
},
),
),
],
),
),
],
),
),
),
),
SliverPersistentHeader(
delegate: _SliverAppBarDelegate2(titleTab()),
pinned: true,
),
];
},
body: Container(
margin: EdgeInsets.all(0),
child: TabBarView(
controller: _tabController,
children: [
_imageAdapter(controller),
_imageAdapter(controller),
],
),
),
),
],
)),
Positioned(
bottom: 27.sp,
width:100,
child: _MeInfoButton(controller),
)
]),),
));
});
}
Widget _MeInfoButton(TextLogic controller) {
if ("" == "") {
return GestureDetector(
onTap: () {
// showToast("完善资料");
// Get.toNamed(AppRoutes.TextActivity);
// Get.toNamed(AppRoutes.Complete_materialPage, arguments: "user");
},
child: Center(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17),
gradient: LinearGradient(
colors: [
Color(0xFF06F9FA),
Color(0xFFDC5BFD),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
padding: EdgeInsets.only(
top: 10.sp, bottom: 10.sp, left: 55.sp, right: 55.sp),
child: Text(
"完善个人形象照",
style: TextStyle(
color: Colors.white,
fontSize: 12,
),
),
),
),
);
} else {
return Container(
margin: EdgeInsets.only(left: 18.sp, right: 18.sp),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
GestureDetector(
onTap: () {
showToast("鼓掌");
_showBottomSheet(context);
},
child: Image(
image: AssetImage(getMineImage("icon_like")),
width: 40.sp,
height: 40.sp,
),
),
GestureDetector(
onTap: () {
showToast("喜欢");
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17.sp),
gradient: LinearGradient(
colors: [
Color(0xFF06F9FA),
Color(0xFFDC5BFD),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
padding: EdgeInsets.only(
top: 10.sp, bottom: 10.sp, left: 52.sp, right: 52.sp),
child: Text(
"喜欢",
style: TextStyle(
color: Colors.white,
fontSize: 12.sp,
),
),
),
),
GestureDetector(
onTap: () {
showToast("私聊");
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17.sp),
gradient: LinearGradient(
colors: [
Color(0x26FFFFFF),
Color(0x26FFFFFF),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
padding: EdgeInsets.only(
top: 10.sp, bottom: 10.sp, left: 52.sp, right: 52.sp),
child: Text(
"私聊",
style: TextStyle(
color: Colors.white,
fontSize: 12.sp,
),
),
),
)
],
),
);
}
}
Widget buildContent(TextLogic controller) {
return Container(
padding: EdgeInsets.symmetric(horizontal: 19.sp, vertical: 14.sp),
child: Column(
children: [
Row(
children: [
_imagelistView(controller),
Flexible(
child: buildUserContainer(),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Text(
"name",
style: TextStyle(
color: Color.fromRGBO(247, 250, 250, 1.0),
fontSize: 16,
),
),
SizedBox(width: 10.sp),
_buildInfoRow(),
],
),
Row(
children: [
Container(
margin: EdgeInsets.only(right: 5.sp),
width: 10.sp,
height: 10.sp,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Color(0xFF00FFF4),
),
),
Text(
"在线·深圳",
style: TextStyle(color: Color(0xFF00FFF4)),
)
],
),
],
),
Container(
// margin: EdgeInsets.only(top: 18.sp, bottom: 18.sp),
height: 59.sp,
child: ListView.builder(
itemCount: 8,
// item
scrollDirection: Axis.horizontal,
//
padding: EdgeInsets.symmetric(vertical: 18.sp),
//
itemBuilder: (context, index) {
return Container(
margin: EdgeInsets.only(right: 11.sp), // item
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17.0), //
gradient: LinearGradient(
colors: [
Color(0xFF06F9FA),
Color(0xFFDC5BFD),
],
),
color: Color(0xFF392D53),
),
child: Container(
margin: EdgeInsets.all(0.2.sp),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17.0),
// shape: BoxShape.circle,
color: Color(0xFF392D53),
),
child: Padding(
padding: EdgeInsets.only(
top: 2.sp, bottom: 2.sp, left: 15.sp, right: 15.sp),
child: Center(
child: Text(
"圆角背景边框",
style: TextStyle(
fontSize: 11.0,
color: Colors.white,
),
),
),
),
),
), //
);
},
),
),
titleTab(),
Container(
margin: EdgeInsets.only(top: 18.sp, bottom: 14.sp),
child: Text(
"1314位圈友感兴趣其中10位已催您更新",
style: TextStyle(color: Colors.white30),
)),
Expanded(
child: Container(
// color: Colors.blue,
child: TabBarView(
controller: _tabController,
children: [
_imageAdapter(controller),
Text("喊话"),
],
),
))
],
),
);
}
// Widget titleTab1() {
// return SliverAppBar(
// backgroundColor: Colors.transparent,
// pinned: true,
// floating: true,
// expandedHeight: 100.sp,
// flexibleSpace: FlexibleSpaceBar(
// background: Container(
// padding: EdgeInsets.symmetric(horizontal: 16.sp),
// alignment: Alignment.bottomLeft,
// child: Text(
// '标题',
// style: TextStyle(
// color: Colors.white,
// fontSize: 24.sp,
// fontWeight: FontWeight.bold,
// ),
// ),
// ),
// ),
// );
// }
Column titleTab(){
return Column(
children: [
Container(
alignment: Alignment.centerLeft,
height: 27.sp,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
TabBar(
isScrollable: true,
controller: _tabController,
indicatorColor: Color(0xFF00FFF4),
indicatorWeight: 2.sp,
labelColor: Color(0xFF00FFF4),
unselectedLabelColor: Color(0xB3FFFFFF),
indicatorSize: TabBarIndicatorSize.label,
tabs: [
Tab(
text: "形象照",
),
Tab(text: "喊话")
],
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17),
gradient: LinearGradient(
colors: [
Color(0xFF06F9FA),
Color(0xFFDC5BFD),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
padding: EdgeInsets.only(
top: 2.sp, bottom: 2.sp, left: 12.sp, right: 12.sp),
child: Text(
"完成",
style: TextStyle(
color: Colors.white,
fontSize: 12,
),
),
),
],
)),
],
);
}
Widget _imageAdapter(TextLogic controller) {
return GridView.builder(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3, //
),
itemCount: 20, //
itemBuilder: (BuildContext context, int index) {
if (index == 0) {
//
return GestureDetector(
onTap: () {
// controller.getImageFile();
},
child: Container(
margin: EdgeInsets.all(5.sp),
child: Image(
image: AssetImage(getMineImage("icon_img_add")),
),
),
);
} else {
//
// data
// var itemData = data[index - 1]; //
return Container(
margin: EdgeInsets.all(5.sp),
child: Center(
child: _buildImageItem(
'https://book.flutterchina.club/assets/img/logo.png',
controller)),
);
}
},
);
}
Widget _buildInfoRow() {
return Row(
children: [
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17),
gradient: LinearGradient(
colors: [
Color.fromRGBO(141, 255, 248, 1.0),
Color.fromRGBO(181, 211, 255, 1.0),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
padding: EdgeInsets.only(
top: 2.sp, bottom: 2.sp, left: 10.sp, right: 10.sp),
child: Text(
"33CD",
style: TextStyle(
color: Colors.black,
fontSize: 10,
),
),
),
SizedBox(width: 6.sp),
Image(
image: AssetImage(getBaseImage("vip")),
width: 44.sp,
height: 18.sp,
),
],
);
}
Widget buildUserContainer() {
return Container(
margin: EdgeInsets.symmetric(horizontal: 1.sp, vertical: 14.sp),
height: 58.sp,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(getMineImage("icon_user_content")),
fit: BoxFit.fill,
),
),
child: Container(
margin: EdgeInsets.only(left: 24.sp),
child: Center(
child: Text(
'动物是灵性的动物是灵性的动物是灵性的动物是灵性的动物是灵性的动物是灵性的动物是灵性的,不同于植物。 你若孤独, 它陪伴你。在阳光的午后,蜷缩在你的...',
maxLines: 2,
style: TextStyle(color: Colors.white),
overflow: TextOverflow.ellipsis,
),
),
),
);
}
Widget _imagelistView(TextLogic controller) {
return Stack(
alignment: Alignment.center,
children: [
Container(
width: 68.sp,
height: 68.sp,
decoration: BoxDecoration(
shape: BoxShape.circle,
gradient: LinearGradient(
colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
),
),
),
SizedBox(
width: 66.sp,
height: 66.sp,
child: _buildAvatar1(controller),
)
],
);
}
Widget _buildAvatar1(TextLogic controller) {
return ClipOval(
child: GestureDetector(
onTap: () {},
child: Image.network(
'https://book.flutterchina.club/assets/img/logo.png',
width: 66.sp,
height: 66.sp,
),
),
);
}
Widget _buildImageItem(String url, TextLogic controller) {
return Stack(
children: [
ClipRRect(
borderRadius: BorderRadius.circular(0.0),
child: GestureDetector(
onTap: () {
showToast("点击了图片");
},
child: Image.network(
url,
),
),
),
if ("" == "")
Positioned(
top: 0,
right: 0,
child: GestureDetector(
onTap: () {
showToast("删除");
},
child: Image(
image: AssetImage(getMineImage("icon_img_del")),
width: 20.sp,
height: 20.sp,
),
))
],
);
}
void _showBottomSheet(BuildContext context) {
showModalBottomSheet(
context: context,
backgroundColor: Colors.transparent,
builder: (BuildContext context) {
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(16.0),
topRight: Radius.circular(16.0),
),
gradient: LinearGradient(
colors: [
Color(0xFF4A3E5D),
Color(0xFF344143),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
height: 118.0,
width: double.infinity,
child: Container(
alignment: Alignment.center,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
GestureDetector(
onTap: () {
Navigator.pop(context);
// Get.toNamed(AppRoutes.ReportActivity);
},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image(
image: AssetImage(getMineImage("icon_report")),
width: 40.sp,
height: 40.sp,
),
Container(
margin: EdgeInsets.only(top: 2.sp),
child: Text(
"举报",
style: TextStyle(color: Colors.white),
),
)
],
),
),
SizedBox(width: 75.sp),
GestureDetector(
onTap: () {
Navigator.pop(context);
_showReportDialog(context);
},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image(
image: AssetImage(getMineImage("icon_block")),
width: 40.sp,
height: 40.sp,
),
Container(
margin: EdgeInsets.only(top: 2.sp),
child: Text(
"拉黑",
style: TextStyle(color: Colors.white),
),
)
],
),
),
],
),
));
},
);
}
void _showReportDialog(BuildContext context) {
showDialog(
context: context,
builder: (BuildContext context) {
return Dialog(
backgroundColor: Colors.transparent,
child: Container(
height: 277.sp,
padding: EdgeInsets.all(1.0),
child: Stack(
children: [
Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(10.0),
gradient: LinearGradient(
colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
),
),
),
Container(
margin: EdgeInsets.all(1.sp),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(10.0),
gradient: LinearGradient(
colors: [Color(0xFF4C3E5F), Color(0xFF324140)],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
),
),
),
Container(
margin: EdgeInsets.only(top: 24.sp),
child: Column(
children: [
Center(
child: Text(
"是否拉黑",
style:
TextStyle(color: Colors.white, fontSize: 16.sp),
),
),
Container(
margin: EdgeInsets.only(top: 14.sp),
alignment: Alignment.center,
child: Image(
image: AssetImage(getMineImage("icon_dialog_black")),
width: 70.sp,
height: 70.sp,
),
),
Container(
margin: EdgeInsets.only(
top: 12.sp, left: 14.sp, right: 14.sp),
alignment: Alignment.center,
child: Text(
"拉黑后,你将屏蔽对方的任何信息若您关注了对方,将自动取消关注。",
textAlign: TextAlign.center,
style: TextStyle(
color: Color(0xCCF7FAFA), fontSize: 16.sp),
),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
GestureDetector(
onTap: () {
Navigator.pop(context);
},
child: Container(
margin: EdgeInsets.only(top: 24.sp),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17),
gradient: LinearGradient(
colors: [
Color(0x26FFFFFF),
Color(0x26FFFFFF),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
padding: EdgeInsets.only(
top: 10.sp,
bottom: 10.sp,
left: 52.sp,
right: 52.sp),
child: Text(
"",
style: TextStyle(
color: Colors.white,
fontSize: 12,
),
),
),
),
SizedBox(width: 24.sp),
GestureDetector(
onTap: () {},
child: Container(
margin: EdgeInsets.only(top: 24.sp),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17),
gradient: LinearGradient(
colors: [
Color(0xFF06F9FA),
Color(0xFFDC5BFD),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
padding: EdgeInsets.only(
top: 10.sp,
bottom: 10.sp,
left: 52.sp,
right: 52.sp),
child: Text(
"",
style: TextStyle(
color: Colors.white,
fontSize: 12,
),
),
),
)
],
)
],
),
)
],
),
),
);
},
);
}
}
class _SliverAppBarDelegate2 extends SliverPersistentHeaderDelegate {
_SliverAppBarDelegate2(this._tabBar);
final Column _tabBar;
@override
Widget build(
BuildContext context, double shrinkOffset, bool overlapsContent) {
return _tabBar;
}
@override
double get maxExtent => 52;
@override
double get minExtent => 52;
@override
bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) {
return true;
}
}

View File

@ -4,6 +4,7 @@ import 'package:image_picker/image_picker.dart';
import 'state.dart'; import 'state.dart';
class UserinfoLogic extends GetxController { class UserinfoLogic extends GetxController {
var userId = Get.arguments ?? "";
final UserinfoState state = UserinfoState(); final UserinfoState state = UserinfoState();
final ImagePicker _picker = ImagePicker(); final ImagePicker _picker = ImagePicker();
Future getImageFile() async { Future getImageFile() async {

View File

@ -3,6 +3,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import '../../components/my_app_bar.dart'; import '../../components/my_app_bar.dart';
import '../../router/app_routers.dart';
import '../../util/util.dart'; import '../../util/util.dart';
import 'logic.dart'; import 'logic.dart';
@ -15,11 +16,12 @@ class _MyTabbedScreenState extends State<UserinfoPage>
with SingleTickerProviderStateMixin { with SingleTickerProviderStateMixin {
late TabController _tabController; late TabController _tabController;
get data => null; ScrollController scrollController = ScrollController();
bool isShowBlackTitle = false;
@override @override
void initState() { void initState() {
// TODO: implement initState
super.initState(); super.initState();
_tabController = TabController(length: 2, vsync: this); _tabController = TabController(length: 2, vsync: this);
} }
@ -29,13 +31,27 @@ class _MyTabbedScreenState extends State<UserinfoPage>
_tabController.dispose(); _tabController.dispose();
super.dispose(); super.dispose();
} }
void _onScroll(offset) {
if (offset > 100) {
setState(() {
isShowBlackTitle = true;
});
} else {
setState(() {
isShowBlackTitle = false;
});
}
}
final logic = Get.find<UserinfoLogic>(); final logic = Get.find<UserinfoLogic>();
final state = Get.find<UserinfoLogic>().state; final state = Get.find<UserinfoLogic>().state;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var userId = Get.arguments ?? "";
return GetBuilder(builder: (UserinfoLogic controller) { return GetBuilder(builder: (UserinfoLogic controller) {
return Container( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
@ -57,7 +73,7 @@ class _MyTabbedScreenState extends State<UserinfoPage>
Positioned( Positioned(
bottom: 27.sp, bottom: 27.sp,
width: Get.width, width: Get.width,
child: _MeInfoButton(userId), child: _MeInfoButton(controller),
) )
], ],
), ),
@ -65,11 +81,12 @@ class _MyTabbedScreenState extends State<UserinfoPage>
}); });
} }
Widget _MeInfoButton(String userId) { Widget _MeInfoButton(UserinfoLogic controller) {
if (userId == "1") { if (controller.userId == "") {
return GestureDetector( return GestureDetector(
onTap: () { onTap: () {
showToast("完善资料"); // showToast("完善资料");
Get.toNamed(AppRoutes.Complete_materialPage, arguments: "user");
}, },
child: Center( child: Center(
child: Container( child: Container(
@ -118,7 +135,6 @@ class _MyTabbedScreenState extends State<UserinfoPage>
showToast("喜欢"); showToast("喜欢");
}, },
child: Container( child: Container(
// height: 40,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17.sp), borderRadius: BorderRadius.circular(17.sp),
gradient: LinearGradient( gradient: LinearGradient(
@ -181,7 +197,7 @@ class _MyTabbedScreenState extends State<UserinfoPage>
children: [ children: [
Row( Row(
children: [ children: [
_headView(), _imagelistView(controller),
Flexible( Flexible(
child: buildUserContainer(), child: buildUserContainer(),
), ),
@ -223,87 +239,56 @@ class _MyTabbedScreenState extends State<UserinfoPage>
], ],
), ),
Container( Container(
// margin: EdgeInsets.only(top: 18.sp, bottom: 18.sp), // margin: EdgeInsets.only(top: 18.sp, bottom: 18.sp),
height: 59.sp, height: 59.sp,
child: ListView.builder( child: ListView.builder(
itemCount: 8, itemCount: 8,
// item // item
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
// //
padding: EdgeInsets.symmetric( vertical: 18.sp), padding: EdgeInsets.symmetric(vertical: 18.sp),
// //
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Container( return Container(
margin: EdgeInsets.only(right: 11.sp), // item margin: EdgeInsets.only(right: 11.sp), // item
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.0), // borderRadius: BorderRadius.circular(17.0), //
border: Border.all(
color: Color(0xFF392D53), //
width: 1.0, //
),
color: Color(0xFF392D53),
),
child: Padding(
padding: EdgeInsets.only(top: 2.sp,bottom: 2.sp,left: 15.sp,right: 15.sp),
child: Center(
child: Text(
"圆角背景边框",
style: TextStyle(
fontSize: 11.0,
color: Colors.white,
),
),),),
),//
);
},
),
),
Container(
alignment: Alignment.centerLeft,
height: 27.sp,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
TabBar(
isScrollable: true,
controller: _tabController,
indicatorColor: Color(0xFF00FFF4),
indicatorWeight: 2.sp,
labelColor: Color(0xFF00FFF4),
unselectedLabelColor: Color(0xB3FFFFFF),
indicatorSize: TabBarIndicatorSize.label,
tabs: [
Tab(
text: "形象照",
),
Tab(text: "喊话")
],
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17),
gradient: LinearGradient( gradient: LinearGradient(
colors: [ colors: [
Color(0xFF06F9FA), Color(0xFF06F9FA),
Color(0xFFDC5BFD), Color(0xFFDC5BFD),
], ],
begin: Alignment.centerLeft, ),
end: Alignment.centerRight, color: Color(0xFF392D53),
),
child: Container(
margin: EdgeInsets.all(0.2.sp),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17.0),
// shape: BoxShape.circle,
color: Color(0xFF392D53),
),
child: Padding(
padding: EdgeInsets.only(
top: 2.sp, bottom: 2.sp, left: 15.sp, right: 15.sp),
child: Center(
child: Text(
"圆角背景边框",
style: TextStyle(
fontSize: 11.0,
color: Colors.white,
),
),
),
), ),
), ),
padding: EdgeInsets.only( ), //
top: 2.sp, bottom: 2.sp, left: 12.sp, right: 12.sp), );
child: Text( },
"完成", ),
style: TextStyle( ),
color: Colors.white, titleTab(),
fontSize: 12,
),
),
),
],
)),
Container( Container(
margin: EdgeInsets.only(top: 18.sp, bottom: 14.sp), margin: EdgeInsets.only(top: 18.sp, bottom: 14.sp),
child: Text( child: Text(
@ -325,6 +310,53 @@ class _MyTabbedScreenState extends State<UserinfoPage>
), ),
); );
} }
Widget titleTab(){
return Container(
alignment: Alignment.centerLeft,
height: 27.sp,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
TabBar(
isScrollable: true,
controller: _tabController,
indicatorColor: Color(0xFF00FFF4),
indicatorWeight: 2.sp,
labelColor: Color(0xFF00FFF4),
unselectedLabelColor: Color(0xB3FFFFFF),
indicatorSize: TabBarIndicatorSize.label,
tabs: [
Tab(
text: "形象照",
),
Tab(text: "喊话")
],
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17),
gradient: LinearGradient(
colors: [
Color(0xFF06F9FA),
Color(0xFFDC5BFD),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
padding: EdgeInsets.only(
top: 2.sp, bottom: 2.sp, left: 12.sp, right: 12.sp),
child: Text(
"完成",
style: TextStyle(
color: Colors.white,
fontSize: 12,
),
),
),
],
));
}
Widget _imageAdapter(UserinfoLogic controller) { Widget _imageAdapter(UserinfoLogic controller) {
return GridView.builder( return GridView.builder(
@ -353,9 +385,9 @@ class _MyTabbedScreenState extends State<UserinfoPage>
return Container( return Container(
margin: EdgeInsets.all(5.sp), margin: EdgeInsets.all(5.sp),
child: Center( child: Center(
child: _buildImageItem( child: _buildImageItem(
'https://book.flutterchina.club/assets/img/logo.png'), 'https://book.flutterchina.club/assets/img/logo.png',
), controller)),
); );
} }
}, },
@ -377,7 +409,8 @@ class _MyTabbedScreenState extends State<UserinfoPage>
end: Alignment.centerRight, end: Alignment.centerRight,
), ),
), ),
padding: EdgeInsets.only(top: 2.sp, bottom: 2.sp, left: 10.sp, right: 10.sp), padding: EdgeInsets.only(
top: 2.sp, bottom: 2.sp, left: 10.sp, right: 10.sp),
child: Text( child: Text(
"33CD", "33CD",
style: TextStyle( style: TextStyle(
@ -420,7 +453,7 @@ class _MyTabbedScreenState extends State<UserinfoPage>
); );
} }
Widget _headView() { Widget _imagelistView(UserinfoLogic controller) {
return Stack( return Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
@ -439,13 +472,13 @@ class _MyTabbedScreenState extends State<UserinfoPage>
SizedBox( SizedBox(
width: 66.sp, width: 66.sp,
height: 66.sp, height: 66.sp,
child: _buildAvatar1(), child: _buildAvatar1(controller),
) )
], ],
); );
} }
Widget _buildAvatar1() { Widget _buildAvatar1(UserinfoLogic controller) {
return ClipOval( return ClipOval(
child: GestureDetector( child: GestureDetector(
onTap: () {}, onTap: () {},
@ -458,7 +491,7 @@ class _MyTabbedScreenState extends State<UserinfoPage>
); );
} }
Widget _buildImageItem(String url) { Widget _buildImageItem(String url, UserinfoLogic controller) {
return Stack( return Stack(
children: [ children: [
ClipRRect( ClipRRect(
@ -472,61 +505,246 @@ class _MyTabbedScreenState extends State<UserinfoPage>
), ),
), ),
), ),
Positioned( if (controller.userId == "")
top: 0, Positioned(
right: 0, top: 0,
child: GestureDetector( right: 0,
onTap: () { child: GestureDetector(
showToast("删除"); onTap: () {
}, showToast("删除");
child: Image( },
image: AssetImage(getMineImage("icon_img_del")), child: Image(
width: 20.sp, image: AssetImage(getMineImage("icon_img_del")),
height: 20.sp, width: 20.sp,
), height: 20.sp,
)) ),
))
], ],
); );
} }
void _showBottomSheet(BuildContext context) { void _showBottomSheet(BuildContext context) {
showModalBottomSheet( showModalBottomSheet(
context: context, context: context,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
builder: (BuildContext context) { builder: (BuildContext context) {
return Container( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(16.0), topLeft: Radius.circular(16.0),
topRight: Radius.circular(16.0), topRight: Radius.circular(16.0),
),
gradient: LinearGradient(
colors: [
Color(0xFF4A3E5D),
Color(0xFF344143),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
), ),
gradient: LinearGradient( height: 118.0,
colors: [ width: double.infinity,
Color(0xFF4A3E5D), child: Container(
Color(0xFF344143), alignment: Alignment.center,
], child: Row(
begin: Alignment.centerLeft, mainAxisAlignment: MainAxisAlignment.center,
end: Alignment.centerRight, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
), children: [
), GestureDetector(
onTap: () {
height: 118.0, Navigator.pop(context);
width: double.infinity, Get.toNamed(AppRoutes.ReportActivity);
child: Text( },
'顶部圆角容器', child: Column(
textAlign: TextAlign.center, mainAxisAlignment: MainAxisAlignment.center,
style: TextStyle( children: [
fontSize: 20.0, Image(
color: Colors.white, image: AssetImage(getMineImage("icon_report")),
), width: 40.sp,
), height: 40.sp,
); ),
Container(
margin: EdgeInsets.only(top: 2.sp),
child: Text(
"举报",
style: TextStyle(color: Colors.white),
),
)
],
),
),
SizedBox(width: 75.sp),
GestureDetector(
onTap: () {
Navigator.pop(context);
_showReportDialog(context);
},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image(
image: AssetImage(getMineImage("icon_block")),
width: 40.sp,
height: 40.sp,
),
Container(
margin: EdgeInsets.only(top: 2.sp),
child: Text(
"拉黑",
style: TextStyle(color: Colors.white),
),
)
],
),
),
],
),
));
}, },
); );
} }
void _showReportDialog(BuildContext context) {
showDialog(
context: context,
builder: (BuildContext context) {
return Dialog(
backgroundColor: Colors.transparent,
child: Container(
height: 277.sp,
padding: EdgeInsets.all(1.0),
child: Stack(
children: [
Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(10.0),
gradient: LinearGradient(
colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
),
),
),
Container(
margin: EdgeInsets.all(1.sp),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(10.0),
gradient: LinearGradient(
colors: [Color(0xFF4C3E5F), Color(0xFF324140)],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
),
),
),
Container(
margin: EdgeInsets.only(top: 24.sp),
child: Column(
children: [
Center(
child: Text(
"是否拉黑",
style:
TextStyle(color: Colors.white, fontSize: 16.sp),
),
),
Container(
margin: EdgeInsets.only(top: 14.sp),
alignment: Alignment.center,
child: Image(
image: AssetImage(getMineImage("icon_dialog_black")),
width: 70.sp,
height: 70.sp,
),
),
Container(
margin: EdgeInsets.only(
top: 12.sp, left: 14.sp, right: 14.sp),
alignment: Alignment.center,
child: Text(
"拉黑后,你将屏蔽对方的任何信息若您关注了对方,将自动取消关注。",
textAlign: TextAlign.center,
style: TextStyle(
color: Color(0xCCF7FAFA), fontSize: 16.sp),
),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
GestureDetector(
onTap: () {
Navigator.pop(context);
},
child: Container(
margin: EdgeInsets.only(top: 24.sp),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17),
gradient: LinearGradient(
colors: [
Color(0x26FFFFFF),
Color(0x26FFFFFF),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
padding: EdgeInsets.only(
top: 10.sp,
bottom: 10.sp,
left: 52.sp,
right: 52.sp),
child: Text(
"",
style: TextStyle(
color: Colors.white,
fontSize: 12,
),
),
),
),
SizedBox(width: 24.sp),
GestureDetector(
onTap: () {},
child: Container(
margin: EdgeInsets.only(top: 24.sp),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17),
gradient: LinearGradient(
colors: [
Color(0xFF06F9FA),
Color(0xFFDC5BFD),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
padding: EdgeInsets.only(
top: 10.sp,
bottom: 10.sp,
left: 52.sp,
right: 52.sp),
child: Text(
"",
style: TextStyle(
color: Colors.white,
fontSize: 12,
),
),
),
)
],
)
],
),
)
],
),
),
);
},
);
}
} }

View File

@ -2,9 +2,13 @@ import 'package:circle_app/app/aboutapp/binding.dart';
import 'package:circle_app/app/aboutapp/view.dart'; import 'package:circle_app/app/aboutapp/view.dart';
import 'package:circle_app/app/account/binding.dart'; import 'package:circle_app/app/account/binding.dart';
import 'package:circle_app/app/account/view.dart'; import 'package:circle_app/app/account/view.dart';
import 'package:circle_app/app/bindmail/binding.dart';
import 'package:circle_app/app/bindmail/view.dart';
import 'package:circle_app/app/blacklist/binding.dart'; import 'package:circle_app/app/blacklist/binding.dart';
import 'package:circle_app/app/call_out/binding.dart'; import 'package:circle_app/app/call_out/binding.dart';
import 'package:circle_app/app/call_out/view.dart'; import 'package:circle_app/app/call_out/view.dart';
import 'package:circle_app/app/feedback/binding.dart';
import 'package:circle_app/app/feedback/view.dart';
import 'package:circle_app/app/friendslist/binding.dart'; import 'package:circle_app/app/friendslist/binding.dart';
import 'package:circle_app/app/friendslist/view.dart'; import 'package:circle_app/app/friendslist/view.dart';
import 'package:circle_app/app/help/binding.dart'; import 'package:circle_app/app/help/binding.dart';
@ -14,12 +18,20 @@ import 'package:circle_app/app/home/view.dart';
import 'package:circle_app/app/login/login/view.dart'; import 'package:circle_app/app/login/login/view.dart';
import 'package:circle_app/app/minefragment/binding.dart'; import 'package:circle_app/app/minefragment/binding.dart';
import 'package:circle_app/app/minefragment/view.dart'; import 'package:circle_app/app/minefragment/view.dart';
import 'package:circle_app/app/offaccount/binding.dart';
import 'package:circle_app/app/offaccount/view.dart';
import 'package:circle_app/app/photoinfo/binding.dart'; import 'package:circle_app/app/photoinfo/binding.dart';
import 'package:circle_app/app/photoinfo/view.dart'; import 'package:circle_app/app/photoinfo/view.dart';
import 'package:circle_app/app/report/binding.dart';
import 'package:circle_app/app/report/view.dart';
import 'package:circle_app/app/setup/binding.dart'; import 'package:circle_app/app/setup/binding.dart';
import 'package:circle_app/app/setup/view.dart'; import 'package:circle_app/app/setup/view.dart';
import 'package:circle_app/app/login/complete_material/binding.dart'; import 'package:circle_app/app/login/complete_material/binding.dart';
import 'package:circle_app/app/login/complete_material/view.dart'; import 'package:circle_app/app/login/complete_material/view.dart';
import 'package:circle_app/app/swiper/binding.dart';
import 'package:circle_app/app/swiper/view.dart';
import 'package:circle_app/app/text/binding.dart';
import 'package:circle_app/app/text/view.dart';
import 'package:circle_app/app/userinfo/binding.dart'; import 'package:circle_app/app/userinfo/binding.dart';
import 'package:circle_app/app/userinfo/view.dart'; import 'package:circle_app/app/userinfo/view.dart';
import 'package:get/get_navigation/src/routes/get_route.dart'; import 'package:get/get_navigation/src/routes/get_route.dart';
@ -91,6 +103,36 @@ class AppPages {
page: () => Call_outPage(), page: () => Call_outPage(),
binding: Call_outBinding(), binding: Call_outBinding(),
), ),
GetPage(name: AppRoutes.Login, page: () => LoginPage()) GetPage(name: AppRoutes.Login, page: () => LoginPage()),
GetPage(
name: AppRoutes.ReportActivity,
page: () => ReportPage(),
binding: ReportBinding(),
),
GetPage(
name: AppRoutes.FeedbackActivity,
page: () => FeedbackPage(),
binding: FeedbackBinding(),
),
GetPage(
name: AppRoutes.BindMailActivity,
page: () => BindmailPage(),
binding: BindmailBinding(),
),
GetPage(
name: AppRoutes.TextActivity,
page: () => TextPage(),
binding: TextBinding(),
),
GetPage(
name: AppRoutes.Swiper,
page: () => SwiperPage(),
binding: SwiperBinding(),
),
GetPage(
name: AppRoutes.OffAccountActivity,
page: () => OffaccountPage(),
binding: OffaccountBinding(),
),
]; ];
} }

View File

@ -12,4 +12,10 @@ abstract class AppRoutes {
static const HelpActivity = '/user/HelpActivity'; static const HelpActivity = '/user/HelpActivity';
static const FriendsActivity = '/user/FriendsActivity'; static const FriendsActivity = '/user/FriendsActivity';
static const UserInfoActivity = '/user/UserInfoActivity'; static const UserInfoActivity = '/user/UserInfoActivity';
static const ReportActivity = '/user/ReportActivity';
static const FeedbackActivity = '/user/FeedbackActivity';
static const BindMailActivity = '/user/BindMailActivity';
static const TextActivity = '/user/TextActivity';
static const Swiper = '/user/Swiper';
static const OffAccountActivity = '/user/OffAccountActivity';
} }

View File

@ -52,6 +52,8 @@ dependencies:
flutter_swiper: ^1.1.6 flutter_swiper: ^1.1.6
# 选择器弹窗 # 选择器弹窗
flutter_pickers: ^2.1.9 flutter_pickers: ^2.1.9
#七牛
qiniu_flutter_sdk: ^0.5.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test: