You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

118 lines
4.3 KiB

import 'package:dating_touchme_app/extension/ex_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
import '../../components/page_appbar.dart';
import '../../controller/mine/league_controller.dart';
class MatchLeaguePage extends StatelessWidget {
MatchLeaguePage({super.key});
final LeagueController controller = Get.put(LeagueController());
// 是否同意协议
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xffFFFFFF),
appBar: PageAppbar(title: "填写申请资料"),
body: Column(
children: [
SizedBox(height: 12),
TDInput(
type: TDInputType.cardStyle,
inputType: TextInputType.phone,
maxLength: 11,
cardStyle: TDCardStyle.topText,
width: MediaQuery.of(context).size.width - 40,
hintText: '请输入你的手机号',
onChanged: (text) {
}
),
SizedBox(height: 24),
TDInput(
type: TDInputType.cardStyle,
inputType: TextInputType.number,
maxLength: 6,
cardStyle: TDCardStyle.topText,
width: MediaQuery.of(context).size.width - 40,
hintText: '请输入验证码',
onChanged: (text) {
controller.verificationCode.value = text;
},
rightBtn: SizedBox(
width: 100,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: const EdgeInsets.only(right: 10),
child: Container(
width: 0.5,
height: 24,
color: TDTheme.of(context).grayColor3,
),
),
controller.countdownSeconds.value > 0 ?
TDText('${controller.countdownSeconds.value}秒后重试', textColor: TDTheme.of(context).fontGyColor4)
: TDText('获取验证码', textColor: Color(0xFF7562F9)),
],
),
),
needClear: false,
onBtnTap: () {
controller.getVerificationCode();
}
),
SizedBox(height: 24),
// 协议同意复选框
Row(
crossAxisAlignment: CrossAxisAlignment.center, // 垂直居中
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(width: 8),
Obx(() => Checkbox(
value: controller.agree.value,
onChanged: (value) {
controller.agree.value = value ?? false;
},
activeColor: Color(0xff7562F9),
side: const BorderSide(color: Colors.grey),
shape: const CircleBorder(),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
)),
Text('阅读并同意', style: TextStyle( fontSize: 14, color: Colors.black54 )),
Text(
'《趣招亲红娘代理协议》',
style: TextStyle( fontSize: 14, color: Color(0xFFEE811B) )
).onTap((){
}),
],
),
SizedBox(height: 32),
TDButton(
text: '下一步',
width: MediaQuery.of(context).size.width - 40,
size: TDButtonSize.large,
type: TDButtonType.fill,
shape: TDButtonShape.round,
style: TDButtonStyle(
textColor: Colors.white,
backgroundColor: Color(0xFF7562F9),
),
activeStyle: TDButtonStyle(
textColor: Colors.white,
backgroundColor: Color(0xC37562F9),
),
onTap: (){
controller.submitInfo();
},
),
],
),
);
}
}