|
|
@@ -52,6 +52,9 @@ class CharacterCustomListPage extends BasePage<CharacterCustomListController> {
|
|
|
SizedBox(height: 26.h),
|
|
|
Expanded(
|
|
|
child: Obx(() {
|
|
|
+ if (controller.characterList.isEmpty) {
|
|
|
+ return _buildCustomListEmpty();
|
|
|
+ }
|
|
|
return EasyRefresh(
|
|
|
controller: controller.refreshController,
|
|
|
header: const ClassicHeader(),
|
|
|
@@ -116,7 +119,7 @@ class CharacterCustomListPage extends BasePage<CharacterCustomListController> {
|
|
|
StringName.characterCustomHistory,
|
|
|
style: Styles.getTextStyleBlack204W500(17.sp),
|
|
|
),
|
|
|
- SizedBox(width: 24.w,height: 24.w,),
|
|
|
+ SizedBox(width: 24.w, height: 24.w),
|
|
|
],
|
|
|
),
|
|
|
);
|
|
|
@@ -203,7 +206,7 @@ class CharacterCustomListPage extends BasePage<CharacterCustomListController> {
|
|
|
colors: [Color(0xffebe6ff), Color(0xffffe6fe)],
|
|
|
),
|
|
|
),
|
|
|
- child:ClipRRect(
|
|
|
+ child: ClipRRect(
|
|
|
borderRadius: BorderRadius.circular(8.r),
|
|
|
child: CachedNetworkImage(
|
|
|
imageUrl: imageUrl ?? "",
|
|
|
@@ -212,10 +215,10 @@ class CharacterCustomListPage extends BasePage<CharacterCustomListController> {
|
|
|
fit: BoxFit.contain,
|
|
|
errorWidget:
|
|
|
(_, __, ___) => Assets.images.iconSystemKeyboard.image(
|
|
|
- width: 60.r,
|
|
|
- height: 60.r,
|
|
|
- fit: BoxFit.contain,
|
|
|
- ),
|
|
|
+ width: 60.r,
|
|
|
+ height: 60.r,
|
|
|
+ fit: BoxFit.contain,
|
|
|
+ ),
|
|
|
),
|
|
|
),
|
|
|
);
|
|
|
@@ -273,13 +276,11 @@ class CharacterCustomListPage extends BasePage<CharacterCustomListController> {
|
|
|
margin: EdgeInsets.only(left: 8.w),
|
|
|
decoration: BoxDecoration(
|
|
|
borderRadius: BorderRadius.circular(50.r),
|
|
|
- gradient:
|
|
|
- const LinearGradient(
|
|
|
- colors: [Color(0xFF7D46FC), Color(0xFFBC87FF)],
|
|
|
- begin: Alignment.topLeft,
|
|
|
- end: Alignment.bottomRight,
|
|
|
- ),
|
|
|
-
|
|
|
+ gradient: const LinearGradient(
|
|
|
+ colors: [Color(0xFF7D46FC), Color(0xFFBC87FF)],
|
|
|
+ begin: Alignment.topLeft,
|
|
|
+ end: Alignment.bottomRight,
|
|
|
+ ),
|
|
|
),
|
|
|
child: Row(
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
@@ -305,4 +306,58 @@ class CharacterCustomListPage extends BasePage<CharacterCustomListController> {
|
|
|
),
|
|
|
);
|
|
|
}
|
|
|
+
|
|
|
+ Widget _buildCustomListEmpty() {
|
|
|
+ return Column(
|
|
|
+ children: [
|
|
|
+ SizedBox(height: 120.w),
|
|
|
+ Assets.images.iconCharacterCustomListEmpty.image(
|
|
|
+ width: 161.w,
|
|
|
+ height: 139.w,
|
|
|
+ ),
|
|
|
+ Text(
|
|
|
+ StringName.characterCustomListEmpty,
|
|
|
+ style: TextStyle(
|
|
|
+ color: Colors.black.withAlpha(178),
|
|
|
+ fontSize: 14.sp,
|
|
|
+ fontWeight: FontWeight.w400,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ SizedBox(height: 47.w),
|
|
|
+ InkWell(
|
|
|
+ onTap: () {
|
|
|
+ controller.clickBack();
|
|
|
+ },
|
|
|
+ child: Container(
|
|
|
+ width: 162.w,
|
|
|
+ height: 48.w,
|
|
|
+ alignment: Alignment.center,
|
|
|
+ decoration: ShapeDecoration(
|
|
|
+ gradient: LinearGradient(
|
|
|
+ begin: Alignment.centerLeft,
|
|
|
+ end: Alignment.centerRight,
|
|
|
+ transform: GradientRotation(0.5),
|
|
|
+ colors: [const Color(0xFF7D46FC), const Color(0xFFBC87FF)],
|
|
|
+ ),
|
|
|
+ shape: RoundedRectangleBorder(
|
|
|
+ borderRadius: BorderRadius.circular(50.r),
|
|
|
+ ),
|
|
|
+ shadows: [
|
|
|
+ BoxShadow(
|
|
|
+ color: Color(0x66BDA8C9),
|
|
|
+ blurRadius: 10,
|
|
|
+ offset: Offset(0, 4),
|
|
|
+ spreadRadius: 0,
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ child: Text(
|
|
|
+ StringName.characterCustomListEmptyBtnDesc,
|
|
|
+ style: Styles.getTextStyleWhiteW500(16.sp),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|