|
|
@@ -37,38 +37,39 @@ class LoginPage extends BasePage<LoginController> {
|
|
|
@override
|
|
|
Widget buildBody(BuildContext context) {
|
|
|
return PopScope(
|
|
|
- canPop: false,
|
|
|
- onPopInvokedWithResult: (didPop, result) async {
|
|
|
- if (didPop) {
|
|
|
- return;
|
|
|
- }
|
|
|
- controller.clickBack();
|
|
|
- },
|
|
|
- child: Stack(
|
|
|
- children: [
|
|
|
- Assets.images.bgLogin.image(fit: BoxFit.contain, width: 360.w),
|
|
|
- _buildTitle(),
|
|
|
- SafeArea(
|
|
|
- child: Column(
|
|
|
- children: [
|
|
|
- SizedBox(height: 225.w),
|
|
|
- buildPhoneTextFiled(),
|
|
|
- SizedBox(height: 16.w),
|
|
|
- buildCodeTextFiled(),
|
|
|
- SizedBox(height: 46.w),
|
|
|
- buildLoginButton(),
|
|
|
- SizedBox(height: 25.w),
|
|
|
- _buildPrivacy(),
|
|
|
- Spacer(),
|
|
|
- PlatformUtil.isAndroid ? buildOtherLogin() : Container(),
|
|
|
- SizedBox(height: 20.w),
|
|
|
- ],
|
|
|
+ canPop: false,
|
|
|
+ onPopInvokedWithResult: (didPop, result) async {
|
|
|
+ if (didPop) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ controller.clickBack();
|
|
|
+ },
|
|
|
+ child: Stack(
|
|
|
+ children: [
|
|
|
+ Assets.images.bgLogin.image(fit: BoxFit.contain, width: 360.w),
|
|
|
+ _buildTitle(),
|
|
|
+ SafeArea(
|
|
|
+ child: Column(
|
|
|
+ children: [
|
|
|
+ SizedBox(height: 225.w),
|
|
|
+ buildPhoneTextFiled(),
|
|
|
+ SizedBox(height: 16.w),
|
|
|
+ buildCodeTextFiled(),
|
|
|
+ SizedBox(height: 46.w),
|
|
|
+ buildLoginButton(),
|
|
|
+ SizedBox(height: 25.w),
|
|
|
+ _buildPrivacy(),
|
|
|
+ Spacer(),
|
|
|
+ buildOtherLogin(),
|
|
|
+ SizedBox(height: 20.w),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
),
|
|
|
- ),
|
|
|
-
|
|
|
- ],
|
|
|
- ));
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ );
|
|
|
}
|
|
|
+
|
|
|
_buildTitle() {
|
|
|
return SafeArea(
|
|
|
child: Container(
|
|
|
@@ -89,6 +90,7 @@ class LoginPage extends BasePage<LoginController> {
|
|
|
),
|
|
|
);
|
|
|
}
|
|
|
+
|
|
|
Widget buildPhoneTextFiled() {
|
|
|
return Container(
|
|
|
height: 48.w,
|
|
|
@@ -105,7 +107,7 @@ class LoginPage extends BasePage<LoginController> {
|
|
|
cursorHeight: 20.w,
|
|
|
style: TextStyle(
|
|
|
fontSize: 14.sp,
|
|
|
- color: Colors.black.withAlpha( 204),
|
|
|
+ color: Colors.black.withAlpha(204),
|
|
|
fontWeight: FontWeight.w500,
|
|
|
),
|
|
|
maxLines: 1,
|
|
|
@@ -154,7 +156,7 @@ class LoginPage extends BasePage<LoginController> {
|
|
|
cursorHeight: 20.w,
|
|
|
style: TextStyle(
|
|
|
fontSize: 14.sp,
|
|
|
- color: Colors.black.withAlpha( 204),
|
|
|
+ color: Colors.black.withAlpha(204),
|
|
|
fontWeight: FontWeight.w500,
|
|
|
),
|
|
|
maxLines: 1,
|
|
|
@@ -205,15 +207,15 @@ class LoginPage extends BasePage<LoginController> {
|
|
|
} else {
|
|
|
txt = StringName.loginResendCode;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
return Text(
|
|
|
txt,
|
|
|
style: TextStyle(
|
|
|
fontSize: 14.sp,
|
|
|
- color: controller.isFirstSend
|
|
|
- ? Colors.black.withAlpha(204)
|
|
|
- : Color(0xCC7D46FC)
|
|
|
+ color:
|
|
|
+ controller.isFirstSend
|
|
|
+ ? Colors.black.withAlpha(204)
|
|
|
+ : Color(0xCC7D46FC),
|
|
|
),
|
|
|
);
|
|
|
}),
|
|
|
@@ -267,65 +269,68 @@ class LoginPage extends BasePage<LoginController> {
|
|
|
controller.clickAgree();
|
|
|
},
|
|
|
child: Padding(
|
|
|
- padding: EdgeInsets.symmetric(vertical: 20.w,horizontal: 20.w),
|
|
|
+ padding: EdgeInsets.symmetric(vertical: 20.w, horizontal: 20.w),
|
|
|
child:
|
|
|
- controller.isAgree
|
|
|
- ? Assets.images.iconLoginAgreePrivacy.image(
|
|
|
- width: 14.w,
|
|
|
- height: 14.w,
|
|
|
- )
|
|
|
- : Container(
|
|
|
- width: 14.w,
|
|
|
- height: 14.w,
|
|
|
- child: Container(
|
|
|
- decoration: BoxDecoration(
|
|
|
- shape: BoxShape.circle,
|
|
|
- border: Border.all(
|
|
|
- color: Colors.black.withAlpha(153),
|
|
|
- width: 1.w,
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
+ controller.isAgree
|
|
|
+ ? Assets.images.iconLoginAgreePrivacy.image(
|
|
|
+ width: 14.w,
|
|
|
+ height: 14.w,
|
|
|
+ )
|
|
|
+ : Container(
|
|
|
+ width: 14.w,
|
|
|
+ height: 14.w,
|
|
|
+ child: Container(
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ shape: BoxShape.circle,
|
|
|
+ border: Border.all(
|
|
|
+ color: Colors.black.withAlpha(153),
|
|
|
+ width: 1.w,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
),
|
|
|
);
|
|
|
}),
|
|
|
- Transform.translate(offset: Offset(-17.w,0),child: Text.rich(
|
|
|
- TextSpan(
|
|
|
- children: [
|
|
|
- TextSpan(
|
|
|
- text: StringName.textSpanIHaveReadAndAgree,
|
|
|
- style: TextStyle(
|
|
|
- color: Colors.black.withAlpha(128),
|
|
|
+ Transform.translate(
|
|
|
+ offset: Offset(-17.w, 0),
|
|
|
+ child: Text.rich(
|
|
|
+ TextSpan(
|
|
|
+ children: [
|
|
|
+ TextSpan(
|
|
|
+ text: StringName.textSpanIHaveReadAndAgree,
|
|
|
+ style: TextStyle(
|
|
|
+ color: Colors.black.withAlpha(128),
|
|
|
+ fontSize: 12.sp,
|
|
|
+ fontWeight: FontWeight.w400,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ClickTextSpan(
|
|
|
+ text: StringName.textSpanPrivacyPolicy,
|
|
|
+ url: WebUrl.privacyPolicy,
|
|
|
fontSize: 12.sp,
|
|
|
- fontWeight: FontWeight.w400,
|
|
|
+ color: Colors.black.withAlpha(204),
|
|
|
),
|
|
|
- ),
|
|
|
- ClickTextSpan(
|
|
|
- text: StringName.textSpanPrivacyPolicy,
|
|
|
- url: WebUrl.privacyPolicy,
|
|
|
- fontSize: 12.sp,
|
|
|
- color: Colors.black.withAlpha(204),
|
|
|
- ),
|
|
|
|
|
|
- TextSpan(
|
|
|
- text: StringName.textSpanAnd,
|
|
|
- style: TextStyle(
|
|
|
- color: Colors.black.withAlpha(128),
|
|
|
- fontSize: 12.sp,
|
|
|
- fontWeight: FontWeight.w400,
|
|
|
+ TextSpan(
|
|
|
+ text: StringName.textSpanAnd,
|
|
|
+ style: TextStyle(
|
|
|
+ color: Colors.black.withAlpha(128),
|
|
|
+ fontSize: 12.sp,
|
|
|
+ fontWeight: FontWeight.w400,
|
|
|
+ ),
|
|
|
),
|
|
|
- ),
|
|
|
|
|
|
- ClickTextSpan(
|
|
|
- text: StringName.textSpanServiceTerms,
|
|
|
- url: WebUrl.serviceAgreement,
|
|
|
- color: Colors.black.withAlpha(204),
|
|
|
- fontSize: 12.sp,
|
|
|
- ),
|
|
|
- ],
|
|
|
+ ClickTextSpan(
|
|
|
+ text: StringName.textSpanServiceTerms,
|
|
|
+ url: WebUrl.serviceAgreement,
|
|
|
+ color: Colors.black.withAlpha(204),
|
|
|
+ fontSize: 12.sp,
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
),
|
|
|
- ),),
|
|
|
+ ),
|
|
|
],
|
|
|
);
|
|
|
}
|
|
|
@@ -343,35 +348,78 @@ class LoginPage extends BasePage<LoginController> {
|
|
|
),
|
|
|
),
|
|
|
SizedBox(height: 18.h),
|
|
|
- Material(
|
|
|
- color: Colors.white,
|
|
|
- shape: const CircleBorder(),
|
|
|
- child: InkWell(
|
|
|
- customBorder: const CircleBorder(), // 保证点击区域是圆的
|
|
|
- onTap: () {
|
|
|
- controller.clickWxLogin();
|
|
|
- },
|
|
|
- child: SizedBox(
|
|
|
- width: 44.w,
|
|
|
- height: 44.w,
|
|
|
- child: Center(
|
|
|
- child: Assets.images.iconWechatLogoBlack.image(
|
|
|
- width: 22.w,
|
|
|
- height: 22.w,
|
|
|
+ Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
+ children: [
|
|
|
+ Column(
|
|
|
+ children: [
|
|
|
+ Material(
|
|
|
+ color: Colors.white,
|
|
|
+ shape: const CircleBorder(),
|
|
|
+ child: InkWell(
|
|
|
+ customBorder: const CircleBorder(), // 保证点击区域是圆的
|
|
|
+ onTap: () {
|
|
|
+ controller.clickAppleLogin();
|
|
|
+ },
|
|
|
+ child: SizedBox(
|
|
|
+ width: 44.w,
|
|
|
+ height: 44.w,
|
|
|
+ child: Center(
|
|
|
+ child: Assets.images.iconLoginDialogApple.image(
|
|
|
+ width: 22.w,
|
|
|
+ height: 22.w,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
),
|
|
|
- ),
|
|
|
+ SizedBox(height: 6.w),
|
|
|
+ Text(
|
|
|
+ StringName.loginApple,
|
|
|
+ textAlign: TextAlign.center,
|
|
|
+ style: TextStyle(
|
|
|
+ color: Colors.black.withValues(alpha: 0.5),
|
|
|
+ fontSize: 12.sp,
|
|
|
+ height: 0,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
),
|
|
|
- ),
|
|
|
- ),
|
|
|
- SizedBox(height: 6.w),
|
|
|
- Text(
|
|
|
- StringName.wechat,
|
|
|
- textAlign: TextAlign.center,
|
|
|
- style: TextStyle(
|
|
|
- color: Colors.black.withValues(alpha: 0.5),
|
|
|
- fontSize: 12.sp,
|
|
|
- height: 0,
|
|
|
- ),
|
|
|
+ Column(
|
|
|
+ children: [
|
|
|
+ Material(
|
|
|
+ color: Colors.white,
|
|
|
+ shape: const CircleBorder(),
|
|
|
+ child: InkWell(
|
|
|
+ customBorder: const CircleBorder(), // 保证点击区域是圆的
|
|
|
+ onTap: () {
|
|
|
+ controller.clickWxLogin();
|
|
|
+ },
|
|
|
+ child: SizedBox(
|
|
|
+ width: 44.w,
|
|
|
+ height: 44.w,
|
|
|
+ child: Center(
|
|
|
+ child: Assets.images.iconWechatLogoBlack.image(
|
|
|
+ width: 22.w,
|
|
|
+ height: 22.w,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ SizedBox(height: 6.w),
|
|
|
+ Text(
|
|
|
+ StringName.wechat,
|
|
|
+ textAlign: TextAlign.center,
|
|
|
+ style: TextStyle(
|
|
|
+ color: Colors.black.withValues(alpha: 0.5),
|
|
|
+ fontSize: 12.sp,
|
|
|
+ height: 0,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ],
|
|
|
),
|
|
|
],
|
|
|
),
|