|
@@ -28,8 +28,11 @@ class RewardsHistorySpentPage extends HookConsumerWidget {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // listitem
|
|
|
+ // listitem
|
|
|
Widget _buildSaleItem(BuildContext context, WidgetRef ref, item, _vm) {
|
|
|
+ String shortDescription = item['short_description'] ?? '';
|
|
|
+ String createdAt = item['created_at'] ?? '';
|
|
|
+ int point = item['point'] ?? 0;
|
|
|
return Container(
|
|
|
padding: const EdgeInsets.only(top: 15, bottom: 15, left: 18, right: 18),
|
|
|
decoration: BoxDecoration(
|
|
@@ -47,14 +50,14 @@ class RewardsHistorySpentPage extends HookConsumerWidget {
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
children: [
|
|
|
Text(
|
|
|
- 'Daily Login',
|
|
|
+ shortDescription,
|
|
|
style: TextStyle(
|
|
|
fontSize: 15.0,
|
|
|
color: ColorUtils.string2Color('#000000'),
|
|
|
fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
).marginOnly(bottom: 6),
|
|
|
Text(
|
|
|
- '14 Oct 2024 10:00PM',
|
|
|
+ createdAt,
|
|
|
style: TextStyle(
|
|
|
fontSize: 13.0,
|
|
|
color: ColorUtils.string2Color('#808DAF'),
|
|
@@ -63,7 +66,7 @@ class RewardsHistorySpentPage extends HookConsumerWidget {
|
|
|
],
|
|
|
),
|
|
|
Text(
|
|
|
- '-4.500',
|
|
|
+ '$point',
|
|
|
style: TextStyle(
|
|
|
fontSize: 20.0,
|
|
|
color: ColorUtils.string2Color('#4161D0'),
|
|
@@ -73,7 +76,6 @@ class RewardsHistorySpentPage extends HookConsumerWidget {
|
|
|
),
|
|
|
);
|
|
|
}
|
|
|
-
|
|
|
// list
|
|
|
Widget _buildSaleList(BuildContext context, WidgetRef ref, _vm) {
|
|
|
final state = ref.watch(rewardsHistorySpentVmProvider);
|
|
@@ -100,7 +102,10 @@ class RewardsHistorySpentPage extends HookConsumerWidget {
|
|
|
body: SizedBox(
|
|
|
width: double.infinity,
|
|
|
height: double.infinity,
|
|
|
- child: EasyRefresh(
|
|
|
+ child: Container(
|
|
|
+ color: ColorUtils.string2Color('#F2F3F6'),
|
|
|
+ padding: const EdgeInsets.only(top: 15),
|
|
|
+ child: EasyRefresh(
|
|
|
controller: vm.refreshController,
|
|
|
// 上拉加载
|
|
|
onLoad: () async {
|
|
@@ -112,10 +117,7 @@ class RewardsHistorySpentPage extends HookConsumerWidget {
|
|
|
Log.d("----onRefresh");
|
|
|
vm.onRefresh();
|
|
|
},
|
|
|
- child: Container(
|
|
|
- color: ColorUtils.string2Color('#F2F3F6'),
|
|
|
- padding: const EdgeInsets.only(top: 15),
|
|
|
- child: Container(
|
|
|
+ child: Container(
|
|
|
decoration: BoxDecoration(
|
|
|
color: Colors.white,
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
@@ -132,7 +134,7 @@ class RewardsHistorySpentPage extends HookConsumerWidget {
|
|
|
vm.retryRequest();
|
|
|
},
|
|
|
successSliverWidget: [_buildSaleList(context, ref, vm)],
|
|
|
- )),
|
|
|
+ )).marginOnly(left: 20,right: 20),
|
|
|
))),
|
|
|
);
|
|
|
}
|