登陆修改
This commit is contained in:
parent
c4fc6909bb
commit
6bed1fdb37
|
|
@ -26,7 +26,10 @@ class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
|
||||||
barrierDismissible: false,
|
barrierDismissible: false,
|
||||||
context: context1,
|
context: context1,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return AlertDialog(title: quickText("提示信息"), content: quickText("您确定要退出登录吗?"), actions: <Widget>[
|
return AlertDialog(
|
||||||
|
title: quickText("提示信息"),
|
||||||
|
content: quickText("您确定要退出登录吗?"),
|
||||||
|
actions: <Widget>[
|
||||||
TextButton(
|
TextButton(
|
||||||
child: quickText("取消"),
|
child: quickText("取消"),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
|
@ -38,8 +41,9 @@ class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
try {
|
try {
|
||||||
UserStore.to.erase();
|
UserStore.to.erase();
|
||||||
var msg = await StorageService.to.erase();
|
await StorageService.to.erase();
|
||||||
print(msg);
|
StorageService.to
|
||||||
|
.write(AppStorageKey.privacyAgreement.value, true);
|
||||||
Navigator.pop(context, "Ok");
|
Navigator.pop(context, "Ok");
|
||||||
Get.offAllNamed(Routes.login);
|
Get.offAllNamed(Routes.login);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
@ -66,7 +70,8 @@ class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
|
||||||
fontSize: 13.sp,
|
fontSize: 13.sp,
|
||||||
);
|
);
|
||||||
|
|
||||||
return OrientationBuilder(builder: (BuildContext context, Orientation orientation) {
|
return OrientationBuilder(
|
||||||
|
builder: (BuildContext context, Orientation orientation) {
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
|
@ -123,7 +128,8 @@ class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
|
||||||
margin: EdgeInsets.only(top: 0.h),
|
margin: EdgeInsets.only(top: 0.h),
|
||||||
child: Text(
|
child: Text(
|
||||||
userInfo.value?.name ?? '请前往登录',
|
userInfo.value?.name ?? '请前往登录',
|
||||||
style: TextStyle(fontSize: 13.sp, color: Colors.white),
|
style: TextStyle(
|
||||||
|
fontSize: 13.sp, color: Colors.white),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -138,8 +144,10 @@ class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
|
||||||
),
|
),
|
||||||
SizedBox(height: 14.h),
|
SizedBox(height: 14.h),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.symmetric(vertical: 22.h, horizontal: 16.w),
|
margin:
|
||||||
padding: EdgeInsets.symmetric(vertical: 22.h, horizontal: 16.w),
|
EdgeInsets.symmetric(vertical: 22.h, horizontal: 16.w),
|
||||||
|
padding:
|
||||||
|
EdgeInsets.symmetric(vertical: 22.h, horizontal: 16.w),
|
||||||
height: 180.h,
|
height: 180.h,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(6.w)),
|
borderRadius: BorderRadius.all(Radius.circular(6.w)),
|
||||||
|
|
@ -158,7 +166,11 @@ class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [Text('账号', style: personalInfoTitleStly), Text(userInfo.value?.name ?? '请前往登录', style: personalInfoValStly)],
|
children: [
|
||||||
|
Text('账号', style: personalInfoTitleStly),
|
||||||
|
Text(userInfo.value?.name ?? '请前往登录',
|
||||||
|
style: personalInfoValStly)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
height: 1.w,
|
height: 1.w,
|
||||||
|
|
@ -166,7 +178,11 @@ class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [Text('所在学校', style: personalInfoTitleStly), Text(userInfo.value?.schoolName ?? '', style: personalInfoValStly)],
|
children: [
|
||||||
|
Text('所在学校', style: personalInfoTitleStly),
|
||||||
|
Text(userInfo.value?.schoolName ?? '',
|
||||||
|
style: personalInfoValStly)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
/* Row(
|
/* Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
|
@ -200,7 +216,9 @@ class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),*/
|
),*/
|
||||||
Container(height: 1.w, color: const Color.fromRGBO(240, 243, 255, 1)),
|
Container(
|
||||||
|
height: 1.w,
|
||||||
|
color: const Color.fromRGBO(240, 243, 255, 1)),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(top: 10.h),
|
padding: EdgeInsets.only(top: 10.h),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
|
|
@ -241,7 +259,8 @@ class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: const Color.fromRGBO(46, 91, 255, 0.2),
|
color:
|
||||||
|
const Color.fromRGBO(46, 91, 255, 0.2),
|
||||||
offset: Offset(2.w, 2.h), //阴影y轴偏移量
|
offset: Offset(2.w, 2.h), //阴影y轴偏移量
|
||||||
blurRadius: 14, //阴影模糊程度
|
blurRadius: 14, //阴影模糊程度
|
||||||
spreadRadius: 0.5, //阴影扩散程度
|
spreadRadius: 0.5, //阴影扩散程度
|
||||||
|
|
@ -255,14 +274,18 @@ class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
|
||||||
Icon(
|
Icon(
|
||||||
Icons.exit_to_app_outlined,
|
Icons.exit_to_app_outlined,
|
||||||
size: 13.sp,
|
size: 13.sp,
|
||||||
color: const Color.fromRGBO(148, 163, 182, 1),
|
color:
|
||||||
|
const Color.fromRGBO(148, 163, 182, 1),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
width: 6.w,
|
width: 6.w,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'退出登录',
|
'退出登录',
|
||||||
style: TextStyle(color: const Color.fromRGBO(148, 163, 182, 1), fontSize: 13.sp),
|
style: TextStyle(
|
||||||
|
color: const Color.fromRGBO(
|
||||||
|
148, 163, 182, 1),
|
||||||
|
fontSize: 13.sp),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,10 @@ class Protocol extends Dialog {
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
quickText('用户协议与隐私政策', size: 15.sp, color: const Color.fromRGBO(37, 37, 37, 1), fontWeight: FontWeight.bold),
|
quickText('用户协议与隐私政策',
|
||||||
|
size: 15.sp,
|
||||||
|
color: const Color.fromRGBO(37, 37, 37, 1),
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ListView(
|
child: ListView(
|
||||||
physics: const BouncingScrollPhysics(),
|
physics: const BouncingScrollPhysics(),
|
||||||
|
|
@ -35,15 +38,22 @@ class Protocol extends Dialog {
|
||||||
children: [
|
children: [
|
||||||
Text.rich(TextSpan(children: [
|
Text.rich(TextSpan(children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: '感谢您选择点智学APP ! 我们非常重视您的个人信息和隐私保护。为了更好地保障您的个人权益,在您使用我们的产品前,请务必审慎阅读',
|
text:
|
||||||
style: TextStyle(fontSize: 13.sp, color: Color.fromRGBO(51, 51, 51, 1)),
|
'感谢您选择点智学APP ! 我们非常重视您的个人信息和隐私保护。为了更好地保障您的个人权益,在您使用我们的产品前,请务必审慎阅读',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 13.sp,
|
||||||
|
color: const Color.fromRGBO(51, 51, 51, 1)),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: '《隐私政策》',
|
text: '《隐私政策》',
|
||||||
style: TextStyle(fontSize: 13.sp, color: Color.fromRGBO(233, 85, 119, 1)),
|
style: TextStyle(
|
||||||
|
fontSize: 13.sp,
|
||||||
|
color: Theme.of(context).primaryColor),
|
||||||
recognizer: TapGestureRecognizer()
|
recognizer: TapGestureRecognizer()
|
||||||
..onTap = () async {
|
..onTap = () async {
|
||||||
Get.toNamed(Routes.agreementPage, arguments: {"type": AGREEMENT_KEY.PRIVACY_GREEMENT.name});
|
Get.toNamed(Routes.agreementPage, arguments: {
|
||||||
|
"type": AGREEMENT_KEY.PRIVACY_GREEMENT.name
|
||||||
|
});
|
||||||
// RouterManager.router.navigateTo(
|
// RouterManager.router.navigateTo(
|
||||||
// context,
|
// context,
|
||||||
// '${RouterManager.agreementPath}?type=${AGREEMENT_KEY.PRIVACY_GREEMENT.name}',
|
// '${RouterManager.agreementPath}?type=${AGREEMENT_KEY.PRIVACY_GREEMENT.name}',
|
||||||
|
|
@ -53,14 +63,20 @@ class Protocol extends Dialog {
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: '和',
|
text: '和',
|
||||||
style: TextStyle(fontSize: 13.sp, color: Color.fromRGBO(51, 51, 51, 1)),
|
style: TextStyle(
|
||||||
|
fontSize: 13.sp,
|
||||||
|
color: Color.fromRGBO(51, 51, 51, 1)),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: '《用户协议》',
|
text: '《用户协议》',
|
||||||
style: TextStyle(fontSize: 13.sp, color: Color.fromRGBO(233, 85, 119, 1)),
|
style: TextStyle(
|
||||||
|
fontSize: 13.sp,
|
||||||
|
color: Theme.of(context).primaryColor),
|
||||||
recognizer: TapGestureRecognizer()
|
recognizer: TapGestureRecognizer()
|
||||||
..onTap = () async {
|
..onTap = () async {
|
||||||
Get.toNamed(Routes.agreementPage, arguments: {"type": AGREEMENT_KEY.USER_AGREEMENT.name});
|
Get.toNamed(Routes.agreementPage, arguments: {
|
||||||
|
"type": AGREEMENT_KEY.USER_AGREEMENT.name
|
||||||
|
});
|
||||||
// RouterManager.router.navigateTo(
|
// RouterManager.router.navigateTo(
|
||||||
// context,
|
// context,
|
||||||
// '${RouterManager.agreementPath}?type=${AGREEMENT_KEY.USER_AGREEMENT.name}',
|
// '${RouterManager.agreementPath}?type=${AGREEMENT_KEY.USER_AGREEMENT.name}',
|
||||||
|
|
@ -71,7 +87,9 @@ class Protocol extends Dialog {
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text:
|
text:
|
||||||
'内的所有条款,尤其是:1.我们对您的个人信息的收集/保存/使用/对外提供/保护等规则条款,以及您的用户权利等条款;2.约定我们的限制责任、免责条款;3.其他以颜色或加粗进行标识的重要条款。如您对以上协议有任何疑问,可通过发邮件至yuanxuanjiaoyu@gmail.com与我们联系。您点击"同意并继续”的行为即表示您已阅读完毕并同意以上协议的全部内容。如您同意以上协议内容,请点击"同意并继续”,开始使用我们的产品和服务!',
|
'内的所有条款,尤其是:1.我们对您的个人信息的收集/保存/使用/对外提供/保护等规则条款,以及您的用户权利等条款;2.约定我们的限制责任、免责条款;3.其他以颜色或加粗进行标识的重要条款。如您对以上协议有任何疑问,可通过发邮件至yuanxuanjiaoyu@gmail.com与我们联系。您点击"同意并继续”的行为即表示您已阅读完毕并同意以上协议的全部内容。如您同意以上协议内容,请点击"同意并继续”,开始使用我们的产品和服务!',
|
||||||
style: TextStyle(fontSize: 13.sp, color: const Color.fromRGBO(51, 51, 51, 1)),
|
style: TextStyle(
|
||||||
|
fontSize: 13.sp,
|
||||||
|
color: const Color.fromRGBO(51, 51, 51, 1)),
|
||||||
),
|
),
|
||||||
])),
|
])),
|
||||||
],
|
],
|
||||||
|
|
@ -90,8 +108,12 @@ class Protocol extends Dialog {
|
||||||
padding: EdgeInsets.only(top: 15.h),
|
padding: EdgeInsets.only(top: 15.h),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border(
|
border: Border(
|
||||||
top: BorderSide(width: 0.5.r, color: const Color.fromRGBO(238, 238, 238, 1)),
|
top: BorderSide(
|
||||||
right: BorderSide(width: 0.5.r, color: const Color.fromRGBO(238, 238, 238, 1)),
|
width: 0.5.r,
|
||||||
|
color: const Color.fromRGBO(238, 238, 238, 1)),
|
||||||
|
right: BorderSide(
|
||||||
|
width: 0.5.r,
|
||||||
|
color: const Color.fromRGBO(238, 238, 238, 1)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: quickText('退出APP', size: 14.sp),
|
child: quickText('退出APP', size: 14.sp),
|
||||||
|
|
@ -101,7 +123,8 @@ class Protocol extends Dialog {
|
||||||
Expanded(
|
Expanded(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
StorageService.to.write(AppStorageKey.privacyAgreement.value, true);
|
StorageService.to
|
||||||
|
.write(AppStorageKey.privacyAgreement.value, true);
|
||||||
Navigator.of(context).pop(true);
|
Navigator.of(context).pop(true);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|
@ -109,10 +132,13 @@ class Protocol extends Dialog {
|
||||||
padding: EdgeInsets.only(top: 15.h),
|
padding: EdgeInsets.only(top: 15.h),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border(
|
border: Border(
|
||||||
top: BorderSide(width: 0.5.r, color: Color.fromRGBO(238, 238, 238, 1)),
|
top: BorderSide(
|
||||||
|
width: 0.5.r,
|
||||||
|
color: const Color.fromRGBO(238, 238, 238, 1)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: quickText('同意并继续', color: Color.fromRGBO(206, 97, 126, 1), size: 14.sp),
|
child: quickText('同意并继续',
|
||||||
|
color: Theme.of(context).primaryColor, size: 14.sp),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
@ -127,7 +153,8 @@ class Protocol extends Dialog {
|
||||||
|
|
||||||
/// 系统协议
|
/// 系统协议
|
||||||
Future<void> sysProtocol(BuildContext context) async {
|
Future<void> sysProtocol(BuildContext context) async {
|
||||||
bool? sysProtocol = StorageService.to.hasData(AppStorageKey.privacyAgreement.value);
|
bool? sysProtocol =
|
||||||
|
StorageService.to.hasData(AppStorageKey.privacyAgreement.value);
|
||||||
|
|
||||||
if (!sysProtocol) {
|
if (!sysProtocol) {
|
||||||
return showDialog(
|
return showDialog(
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,8 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(statusBarIconBrightness: Brightness.light));
|
SystemChrome.setSystemUIOverlayStyle(
|
||||||
|
const SystemUiOverlayStyle(statusBarIconBrightness: Brightness.light));
|
||||||
Future.delayed(Duration.zero, () => upgradeLogic.getAppUpgrade(context));
|
Future.delayed(Duration.zero, () => upgradeLogic.getAppUpgrade(context));
|
||||||
Future.delayed(Duration.zero, () => sysProtocol(context));
|
Future.delayed(Duration.zero, () => sysProtocol(context));
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
@ -39,7 +40,8 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(statusBarIconBrightness: Brightness.light));
|
SystemChrome.setSystemUIOverlayStyle(
|
||||||
|
const SystemUiOverlayStyle(statusBarIconBrightness: Brightness.light));
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
behavior: HitTestBehavior.translucent,
|
behavior: HitTestBehavior.translucent,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|
@ -76,12 +78,15 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 86.w,
|
height: 86.w,
|
||||||
width: 86.w,
|
width: 86.w,
|
||||||
child: Image.asset('assets/images/login_logo.png', fit: BoxFit.cover),
|
child: Image.asset('assets/images/login_logo.png',
|
||||||
|
fit: BoxFit.cover),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.h),
|
margin: EdgeInsets.symmetric(
|
||||||
padding: EdgeInsets.only(top: 34.h, bottom: 16.h, left: 22.w, right: 22.w),
|
horizontal: 32.w, vertical: 24.h),
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 34.h, bottom: 16.h, left: 22.w, right: 22.w),
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
/* decoration: BoxDecoration(
|
/* decoration: BoxDecoration(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
|
|
@ -101,8 +106,10 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
padding: EdgeInsets.symmetric(horizontal: 20.h),
|
padding: EdgeInsets.symmetric(horizontal: 20.h),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
border: Border.all(width: 1.w, color: const Color(0xFFFFFFFF)),
|
border: Border.all(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(17.w)),
|
width: 1.w, color: const Color(0xFFFFFFFF)),
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(17.w)),
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller: state.userNameController,
|
controller: state.userNameController,
|
||||||
|
|
@ -153,8 +160,10 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
padding: EdgeInsets.symmetric(horizontal: 20.h),
|
padding: EdgeInsets.symmetric(horizontal: 20.h),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
border: Border.all(width: 1.w, color: const Color(0xFFFFFFFF)),
|
border: Border.all(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(17.w)),
|
width: 1.w, color: const Color(0xFFFFFFFF)),
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(17.w)),
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
focusNode: state.pwdFocus,
|
focusNode: state.pwdFocus,
|
||||||
|
|
@ -189,12 +198,15 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
),
|
),
|
||||||
suffixIcon: InkWell(
|
suffixIcon: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
state.isShowPwd.value = !state.isShowPwd.value;
|
state.isShowPwd.value =
|
||||||
|
!state.isShowPwd.value;
|
||||||
},
|
},
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.only(right: 5.r),
|
padding: EdgeInsets.only(right: 5.r),
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
state.isShowPwd.value ? 'assets/images/eye_default.png' : 'assets/images/eye_active.png',
|
state.isShowPwd.value
|
||||||
|
? 'assets/images/eye_default.png'
|
||||||
|
: 'assets/images/eye_active.png',
|
||||||
width: 15.r,
|
width: 15.r,
|
||||||
height: 15.r,
|
height: 15.r,
|
||||||
),
|
),
|
||||||
|
|
@ -230,23 +242,34 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
child: Checkbox(
|
child: Checkbox(
|
||||||
// activeColor: Colors.transparent, //去掉勾选时背景颜色
|
// activeColor: Colors.transparent, //去掉勾选时背景颜色
|
||||||
|
|
||||||
activeColor: Theme.of(context).primaryColor,
|
activeColor:
|
||||||
|
Theme.of(context).primaryColor,
|
||||||
// checkColor: Colors.white,
|
// checkColor: Colors.white,
|
||||||
value: state.keepPwd.value,
|
value: state.keepPwd.value,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
// Get.focusScope?.nextFocus();
|
// Get.focusScope?.nextFocus();
|
||||||
FocusScope.of(context).requestFocus(state.pwdFocus);
|
FocusScope.of(context)
|
||||||
FocusScope.of(context).requestFocus(state.theFocus);
|
.requestFocus(state.pwdFocus);
|
||||||
state.keepPwd.value = value ?? false;
|
FocusScope.of(context)
|
||||||
|
.requestFocus(state.theFocus);
|
||||||
|
state.keepPwd.value =
|
||||||
|
value ?? false;
|
||||||
},
|
},
|
||||||
side: WidgetStateBorderSide.resolveWith(
|
side: WidgetStateBorderSide
|
||||||
|
.resolveWith(
|
||||||
(Set<WidgetState> states) {
|
(Set<WidgetState> states) {
|
||||||
if (states.contains(WidgetState.selected)) {
|
if (states.contains(
|
||||||
|
WidgetState.selected)) {
|
||||||
//修改勾选时边框颜色为红色
|
//修改勾选时边框颜色为红色
|
||||||
return BorderSide(width: 1.5.r, color: Theme.of(context).primaryColor);
|
return BorderSide(
|
||||||
|
width: 1.5.r,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.primaryColor);
|
||||||
}
|
}
|
||||||
//修改默认时边框颜色为绿色
|
//修改默认时边框颜色为绿色
|
||||||
return BorderSide(width: 1.5.r, color: Colors.white);
|
return BorderSide(
|
||||||
|
width: 1.5.r,
|
||||||
|
color: Colors.white);
|
||||||
},
|
},
|
||||||
)),
|
)),
|
||||||
);
|
);
|
||||||
|
|
@ -257,9 +280,12 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
Utils.hideKeyboard();
|
Utils.hideKeyboard();
|
||||||
Get.focusScope?.nextFocus();
|
Get.focusScope?.nextFocus();
|
||||||
Get.focusScope?.nextFocus();
|
Get.focusScope?.nextFocus();
|
||||||
FocusScope.of(context).requestFocus(state.pwdFocus);
|
FocusScope.of(context)
|
||||||
FocusScope.of(context).requestFocus(state.theFocus);
|
.requestFocus(state.pwdFocus);
|
||||||
state.keepPwd.value = !state.keepPwd.value;
|
FocusScope.of(context)
|
||||||
|
.requestFocus(state.theFocus);
|
||||||
|
state.keepPwd.value =
|
||||||
|
!state.keepPwd.value;
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'记住密码',
|
'记住密码',
|
||||||
|
|
@ -287,10 +313,13 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.symmetric(vertical: 10.h),
|
margin: EdgeInsets.symmetric(vertical: 10.h),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: state.canLogin.value ? const Color(0xFF4CC793) : const Color(0xFFdddddd),
|
color: state.canLogin.value
|
||||||
|
? const Color(0xFF4CC793)
|
||||||
|
: const Color(0xFFdddddd),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: const Color.fromRGBO(76, 199, 147, 0.5),
|
color:
|
||||||
|
const Color.fromRGBO(76, 199, 147, 0.5),
|
||||||
offset: Offset(6.w, 10.h), //阴影y轴偏移量
|
offset: Offset(6.w, 10.h), //阴影y轴偏移量
|
||||||
blurRadius: 14, //阴影模糊程度
|
blurRadius: 14, //阴影模糊程度
|
||||||
spreadRadius: 0.5, //阴影扩散程度
|
spreadRadius: 0.5, //阴影扩散程度
|
||||||
|
|
@ -303,7 +332,9 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 50.h,
|
height: 50.h,
|
||||||
child: Text('登 录', style: TextStyle(fontSize: 16.sp, color: Colors.white)),
|
child: Text('登 录',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16.sp, color: Colors.white)),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|
@ -325,16 +356,22 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
state.pwdFocus);
|
state.pwdFocus);
|
||||||
FocusScope.of(context).requestFocus(
|
FocusScope.of(context).requestFocus(
|
||||||
state.theFocus);*/
|
state.theFocus);*/
|
||||||
state.readAgreement.value = value ?? false;
|
state.readAgreement.value =
|
||||||
|
value ?? false;
|
||||||
},
|
},
|
||||||
side: WidgetStateBorderSide.resolveWith(
|
side: WidgetStateBorderSide.resolveWith(
|
||||||
(Set<WidgetState> states) {
|
(Set<WidgetState> states) {
|
||||||
if (states.contains(WidgetState.selected)) {
|
if (states
|
||||||
|
.contains(WidgetState.selected)) {
|
||||||
//修改勾选时边框颜色为红色
|
//修改勾选时边框颜色为红色
|
||||||
return BorderSide(width: 1.5.r, color: Theme.of(context).primaryColor);
|
return BorderSide(
|
||||||
|
width: 1.5.r,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.primaryColor);
|
||||||
}
|
}
|
||||||
//修改默认时边框颜色为绿色
|
//修改默认时边框颜色为绿色
|
||||||
return BorderSide(width: 1.5.r, color: Colors.white);
|
return BorderSide(
|
||||||
|
width: 1.5.r, color: Colors.white);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -343,7 +380,9 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(Routes.agreementPage, arguments: {"type": AGREEMENT_KEY.USER_AGREEMENT.name});
|
Get.toNamed(Routes.agreementPage, arguments: {
|
||||||
|
"type": AGREEMENT_KEY.USER_AGREEMENT.name
|
||||||
|
});
|
||||||
},
|
},
|
||||||
child: quickText(
|
child: quickText(
|
||||||
'请仔细阅读',
|
'请仔细阅读',
|
||||||
|
|
@ -352,11 +391,15 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(Routes.agreementPage, arguments: {"type": AGREEMENT_KEY.USER_AGREEMENT.name});
|
Get.toNamed(Routes.agreementPage, arguments: {
|
||||||
|
"type": AGREEMENT_KEY.USER_AGREEMENT.name
|
||||||
|
});
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'《用户协议》',
|
'《用户协议》',
|
||||||
style: TextStyle(fontSize: 12.r, color: Colors.deepOrangeAccent),
|
style: TextStyle(
|
||||||
|
fontSize: 12.r,
|
||||||
|
color: Theme.of(context).primaryColor),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue