|
|
@@ -61,14 +61,15 @@ class ProfilePage extends BasePage<ProfileController> {
|
|
|
)
|
|
|
else
|
|
|
SliverList(
|
|
|
- delegate: SliverChildBuilderDelegate((context,
|
|
|
- index,) {
|
|
|
-
|
|
|
+ delegate: SliverChildBuilderDelegate((
|
|
|
+ context,
|
|
|
+ index,
|
|
|
+ ) {
|
|
|
return Obx(() {
|
|
|
final keyboardInfo = list[index];
|
|
|
final isChosen =
|
|
|
keyboardInfo.id ==
|
|
|
- controller.currentCustomKeyboardInfo.id;
|
|
|
+ controller.currentCustomKeyboardInfo.id;
|
|
|
return _buildKeyboardListItem(
|
|
|
keyboardInfo: keyboardInfo,
|
|
|
isChosen: isChosen,
|
|
|
@@ -139,27 +140,27 @@ class ProfilePage extends BasePage<ProfileController> {
|
|
|
),
|
|
|
),
|
|
|
child:
|
|
|
- (intimacy != null)
|
|
|
- ? Center(
|
|
|
- child: Text(
|
|
|
- IntimacyUtil.getIntimacyName(intimacy),
|
|
|
- style: TextStyle(
|
|
|
- color: const Color(0xFFFF73E0),
|
|
|
- fontSize: 11.sp,
|
|
|
- fontWeight: FontWeight.w500,
|
|
|
- ),
|
|
|
- ),
|
|
|
- )
|
|
|
- : Center(
|
|
|
- child: Text(
|
|
|
- "?",
|
|
|
- style: TextStyle(
|
|
|
- color: const Color(0xFFFF73E0),
|
|
|
- fontSize: 11.sp,
|
|
|
- fontWeight: FontWeight.w500,
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
+ (intimacy != null)
|
|
|
+ ? Center(
|
|
|
+ child: Text(
|
|
|
+ IntimacyUtil.getIntimacyName(intimacy),
|
|
|
+ style: TextStyle(
|
|
|
+ color: const Color(0xFFFF73E0),
|
|
|
+ fontSize: 11.sp,
|
|
|
+ fontWeight: FontWeight.w500,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ : Center(
|
|
|
+ child: Text(
|
|
|
+ "?",
|
|
|
+ style: TextStyle(
|
|
|
+ color: const Color(0xFFFF73E0),
|
|
|
+ fontSize: 11.sp,
|
|
|
+ fontWeight: FontWeight.w500,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
),
|
|
|
],
|
|
|
),
|
|
|
@@ -210,38 +211,38 @@ class ProfilePage extends BasePage<ProfileController> {
|
|
|
|
|
|
return GestureDetector(
|
|
|
onTap:
|
|
|
- hasKeyboard
|
|
|
- ? () => controller.clickOnChangeKeyboard(keyboardInfo!)
|
|
|
- : null,
|
|
|
+ hasKeyboard
|
|
|
+ ? () => controller.clickOnChangeKeyboard(keyboardInfo!)
|
|
|
+ : null,
|
|
|
child: Container(
|
|
|
height: 164.h,
|
|
|
margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 12.h),
|
|
|
decoration:
|
|
|
- isChosen
|
|
|
- ? ShapeDecoration(
|
|
|
- gradient: LinearGradient(
|
|
|
- begin: Alignment(0.02, 0.04),
|
|
|
- end: Alignment(1.00, 1.00),
|
|
|
- colors: [const Color(0xFFE7A0FF), const Color(0xFFAB8FFA)],
|
|
|
- ),
|
|
|
- shape: RoundedRectangleBorder(
|
|
|
- borderRadius: BorderRadius.circular(22.r),
|
|
|
- ),
|
|
|
- shadows: [
|
|
|
- BoxShadow(
|
|
|
- color: Color(0x1CD6C1FF),
|
|
|
- blurRadius: 4.r,
|
|
|
- offset: Offset(0, 4.r),
|
|
|
- spreadRadius: 0,
|
|
|
- ),
|
|
|
- ],
|
|
|
- )
|
|
|
- : ShapeDecoration(
|
|
|
- color: Colors.white,
|
|
|
- shape: RoundedRectangleBorder(
|
|
|
- borderRadius: BorderRadius.circular(20.r),
|
|
|
- ),
|
|
|
- ),
|
|
|
+ isChosen
|
|
|
+ ? ShapeDecoration(
|
|
|
+ gradient: LinearGradient(
|
|
|
+ begin: Alignment(0.02, 0.04),
|
|
|
+ end: Alignment(1.00, 1.00),
|
|
|
+ colors: [const Color(0xFFE7A0FF), const Color(0xFFAB8FFA)],
|
|
|
+ ),
|
|
|
+ shape: RoundedRectangleBorder(
|
|
|
+ borderRadius: BorderRadius.circular(22.r),
|
|
|
+ ),
|
|
|
+ shadows: [
|
|
|
+ BoxShadow(
|
|
|
+ color: Color(0x1CD6C1FF),
|
|
|
+ blurRadius: 4.r,
|
|
|
+ offset: Offset(0, 4.r),
|
|
|
+ spreadRadius: 0,
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ )
|
|
|
+ : ShapeDecoration(
|
|
|
+ color: Colors.white,
|
|
|
+ shape: RoundedRectangleBorder(
|
|
|
+ borderRadius: BorderRadius.circular(20.r),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
child: Stack(
|
|
|
children: [
|
|
|
if (isChosen)
|
|
|
@@ -260,11 +261,23 @@ class ProfilePage extends BasePage<ProfileController> {
|
|
|
Text(
|
|
|
title,
|
|
|
style: TextStyle(
|
|
|
- color: const Color(0xFF202020),
|
|
|
+ color:
|
|
|
+ isChosen ? Colors.white : const Color(0xFF202020),
|
|
|
fontSize: 16.sp,
|
|
|
fontWeight: FontWeight.w700,
|
|
|
),
|
|
|
),
|
|
|
+ const Spacer(),
|
|
|
+ isChosen ?Text(StringName.profileSelect,style: TextStyle(
|
|
|
+ color: Colors.white,
|
|
|
+ fontSize: 14.sp,
|
|
|
+ fontWeight: FontWeight.w400,
|
|
|
+ ),):SizedBox(),
|
|
|
+ SizedBox(width: 4.w),
|
|
|
+ isChosen?Assets.images.iconProfileKeyboardSelect.image(
|
|
|
+ width: 17.w,
|
|
|
+ height: 17.w,
|
|
|
+ ):SizedBox(),
|
|
|
],
|
|
|
),
|
|
|
),
|
|
|
@@ -279,12 +292,12 @@ class ProfilePage extends BasePage<ProfileController> {
|
|
|
Expanded(
|
|
|
child: Container(
|
|
|
margin:
|
|
|
- isChosen
|
|
|
- ? EdgeInsets.symmetric(
|
|
|
- horizontal: 4.w,
|
|
|
- vertical: 4.w,
|
|
|
- )
|
|
|
- : EdgeInsets.zero,
|
|
|
+ isChosen
|
|
|
+ ? EdgeInsets.symmetric(
|
|
|
+ horizontal: 4.w,
|
|
|
+ vertical: 4.w,
|
|
|
+ )
|
|
|
+ : EdgeInsets.zero,
|
|
|
decoration: ShapeDecoration(
|
|
|
color: Colors.white,
|
|
|
shape: RoundedRectangleBorder(
|
|
|
@@ -313,19 +326,18 @@ class ProfilePage extends BasePage<ProfileController> {
|
|
|
SizedBox(width: 8.w),
|
|
|
hasKeyboard
|
|
|
? _buildProfileAvatar(
|
|
|
- imageUrl: keyboardAvatar,
|
|
|
- gender: gender,
|
|
|
- onTap:
|
|
|
- () =>
|
|
|
- controller.clickAvatar(
|
|
|
- isUser: false,
|
|
|
- keyboardInfo: keyboardInfo,
|
|
|
- ),
|
|
|
- genderIconAlignment: Alignment.topLeft,
|
|
|
- )
|
|
|
+ imageUrl: keyboardAvatar,
|
|
|
+ gender: gender,
|
|
|
+ onTap:
|
|
|
+ () => controller.clickAvatar(
|
|
|
+ isUser: false,
|
|
|
+ keyboardInfo: keyboardInfo,
|
|
|
+ ),
|
|
|
+ genderIconAlignment: Alignment.topLeft,
|
|
|
+ )
|
|
|
: _buildKeyboardListEmptyAvatar(
|
|
|
- onTap: () => controller.clickAddButton(),
|
|
|
- ),
|
|
|
+ onTap: () => controller.clickAddButton(),
|
|
|
+ ),
|
|
|
],
|
|
|
),
|
|
|
),
|
|
|
@@ -358,13 +370,13 @@ class ProfilePage extends BasePage<ProfileController> {
|
|
|
decoration: ShapeDecoration(
|
|
|
color: gender == 1 ? const Color(0xFFB7B6FF) : null,
|
|
|
gradient:
|
|
|
- gender == 1
|
|
|
- ? null
|
|
|
- : const LinearGradient(
|
|
|
- begin: Alignment(0.5, 0),
|
|
|
- end: Alignment(0.5, 1.0),
|
|
|
- colors: [Color(0xFFEBE6FF), Color(0xFFFFE6FE)],
|
|
|
- ),
|
|
|
+ gender == 1
|
|
|
+ ? null
|
|
|
+ : const LinearGradient(
|
|
|
+ begin: Alignment(0.5, 0),
|
|
|
+ end: Alignment(0.5, 1.0),
|
|
|
+ colors: [Color(0xFFEBE6FF), Color(0xFFFFE6FE)],
|
|
|
+ ),
|
|
|
shape: RoundedRectangleBorder(
|
|
|
side: BorderSide(width: 1.5.w, color: Colors.white),
|
|
|
borderRadius: BorderRadius.circular(40.r),
|
|
|
@@ -375,7 +387,7 @@ class ProfilePage extends BasePage<ProfileController> {
|
|
|
imageUrl: imageUrl,
|
|
|
size: 78.w,
|
|
|
borderWidth: 0.r,
|
|
|
- borderColor: Colors.transparent,
|
|
|
+ borderColor: Colors.transparent,
|
|
|
placeholder: (_, __) {
|
|
|
return const CupertinoActivityIndicator();
|
|
|
},
|
|
|
@@ -387,15 +399,15 @@ class ProfilePage extends BasePage<ProfileController> {
|
|
|
left: genderIconAlignment == Alignment.topLeft ? 0 : null,
|
|
|
right: genderIconAlignment == Alignment.topRight ? 0 : null,
|
|
|
child:
|
|
|
- gender == 1
|
|
|
- ? Assets.images.iconProfileMale.image(
|
|
|
- width: 20.w,
|
|
|
- height: 20.w,
|
|
|
- )
|
|
|
- : Assets.images.iconProfileFemale.image(
|
|
|
- width: 20.w,
|
|
|
- height: 20.w,
|
|
|
- ),
|
|
|
+ gender == 1
|
|
|
+ ? Assets.images.iconProfileMale.image(
|
|
|
+ width: 20.w,
|
|
|
+ height: 20.w,
|
|
|
+ )
|
|
|
+ : Assets.images.iconProfileFemale.image(
|
|
|
+ width: 20.w,
|
|
|
+ height: 20.w,
|
|
|
+ ),
|
|
|
),
|
|
|
Positioned(
|
|
|
child: Container(
|