|
@@ -70,9 +70,10 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
titleDarkColor: Colors.white,
|
|
|
showBackButton: true,
|
|
|
backgroundColor: context.appColors.btnBgDefault,
|
|
|
- systemUiOverlayStyle: MediaQuery.of(context).platformBrightness == Brightness.dark
|
|
|
- ? ThemeConfig.systemUiOverlayStyleDarkTheme
|
|
|
- : ThemeConfig.systemUiOverlayStyleLightThemeWhite,
|
|
|
+ systemUiOverlayStyle:
|
|
|
+ MediaQuery.of(context).platformBrightness == Brightness.dark
|
|
|
+ ? ThemeConfig.systemUiOverlayStyleDarkTheme
|
|
|
+ : ThemeConfig.systemUiOverlayStyleLightThemeWhite,
|
|
|
actions: [
|
|
|
const MyAssetImage(
|
|
|
Assets.rewardsRewardsIconWen,
|
|
@@ -81,7 +82,10 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
).marginOnly(right: 15).onTap(() {
|
|
|
// 去详情
|
|
|
// _vm.launchURL(url);
|
|
|
- GlobalWebPage.startInstance(context: context, title: S.current.how_do_i_earn_points, url: 'https://yyjobs.sg/terms/PointsRules.html');
|
|
|
+ GlobalWebPage.startInstance(
|
|
|
+ context: context,
|
|
|
+ title: S.current.how_do_i_earn_points,
|
|
|
+ url: 'https://yyjobs.sg/terms/PointsRules.html');
|
|
|
})
|
|
|
]),
|
|
|
body: Column(children: [
|
|
@@ -105,7 +109,9 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
children: [
|
|
|
_buildSearch(context, ref, _vm, list),
|
|
|
_buildSwiper(context, ref, _vm, list),
|
|
|
- list?.points != 0 ? _buildList(context, ref, _vm, list) : const SizedBox.shrink(),
|
|
|
+ list?.points != 0
|
|
|
+ ? _buildList(context, ref, _vm, list)
|
|
|
+ : const SizedBox.shrink(),
|
|
|
_buildHistory(context, ref, _vm, list),
|
|
|
],
|
|
|
), // 使用负数margin
|
|
@@ -118,7 +124,8 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- Widget _buildTop(BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
|
|
|
+ Widget _buildTop(
|
|
|
+ BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
|
|
|
int points = list?.points ?? 0;
|
|
|
return Container(
|
|
|
decoration: BoxDecoration(
|
|
@@ -143,7 +150,10 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
children: [
|
|
|
Text(
|
|
|
S.current.available_points,
|
|
|
- style: const TextStyle(fontSize: 17.0, color: Colors.white, fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
+ style: const TextStyle(
|
|
|
+ fontSize: 17.0,
|
|
|
+ color: Colors.white,
|
|
|
+ fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
),
|
|
|
Container(
|
|
|
decoration: BoxDecoration(
|
|
@@ -159,7 +169,10 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
).marginOnly(right: 5),
|
|
|
Text(
|
|
|
'$points',
|
|
|
- style: const TextStyle(fontSize: 15.0, color: Colors.white, fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
+ style: const TextStyle(
|
|
|
+ fontSize: 15.0,
|
|
|
+ color: Colors.white,
|
|
|
+ fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
),
|
|
|
],
|
|
|
).paddingOnly(left: 10, top: 7, bottom: 7, right: 10),
|
|
@@ -174,17 +187,24 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- Widget _buildSearch(BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
|
|
|
+ Widget _buildSearch(
|
|
|
+ BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
|
|
|
final dateFormat = DateFormat('yyyy-MM-dd');
|
|
|
final now = DateFormat('yyyy-MM-dd').format(DateTime.now());
|
|
|
// final date = list.continuous.currentWeekCheckin[0] ?? now;
|
|
|
final date = now;
|
|
|
- final date0 = DateFormat('MM-dd').format(dateFormat.parse(date).subtract(const Duration(days: 1)));
|
|
|
- final date1 = DateFormat('MM-dd').format(dateFormat.parse(date).add(const Duration(days: 1)));
|
|
|
- final date2 = DateFormat('MM-dd').format(dateFormat.parse(date).add(const Duration(days: 2)));
|
|
|
- final date3 = DateFormat('MM-dd').format(dateFormat.parse(date).add(const Duration(days: 3)));
|
|
|
- final date4 = DateFormat('MM-dd').format(dateFormat.parse(date).add(const Duration(days: 4)));
|
|
|
- final date5 = DateFormat('MM-dd').format(dateFormat.parse(date).add(const Duration(days: 5)));
|
|
|
+ final date0 = DateFormat('MM-dd')
|
|
|
+ .format(dateFormat.parse(date).subtract(const Duration(days: 1)));
|
|
|
+ final date1 = DateFormat('MM-dd')
|
|
|
+ .format(dateFormat.parse(date).add(const Duration(days: 1)));
|
|
|
+ final date2 = DateFormat('MM-dd')
|
|
|
+ .format(dateFormat.parse(date).add(const Duration(days: 2)));
|
|
|
+ final date3 = DateFormat('MM-dd')
|
|
|
+ .format(dateFormat.parse(date).add(const Duration(days: 3)));
|
|
|
+ final date4 = DateFormat('MM-dd')
|
|
|
+ .format(dateFormat.parse(date).add(const Duration(days: 4)));
|
|
|
+ final date5 = DateFormat('MM-dd')
|
|
|
+ .format(dateFormat.parse(date).add(const Duration(days: 5)));
|
|
|
// final nextDate = date.add(Duration(days: 1));
|
|
|
return Container(
|
|
|
width: MediaQuery.of(context).size.width - 30,
|
|
@@ -199,7 +219,10 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
children: [
|
|
|
Text(
|
|
|
S.current.continuous_login_8_day,
|
|
|
- style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 15.0,
|
|
|
+ color: context.appColors.textBlack,
|
|
|
+ fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
),
|
|
|
Flex(
|
|
|
direction: Axis.horizontal,
|
|
@@ -210,7 +233,8 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
decoration: BoxDecoration(
|
|
|
color: context.appColors.whiteSecondBG,
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
- border: Border.all(color: context.appColors.textPrimary, width: 1),
|
|
|
+ border: Border.all(
|
|
|
+ color: context.appColors.textPrimary, width: 1),
|
|
|
),
|
|
|
height: 78,
|
|
|
child: Column(
|
|
@@ -219,7 +243,10 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
children: [
|
|
|
Text(
|
|
|
date0,
|
|
|
- style: TextStyle(fontSize: 13.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 13.0,
|
|
|
+ color: context.appColors.textPrimary,
|
|
|
+ fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
),
|
|
|
const MyAssetImage(
|
|
|
Assets.rewardsRewardsIconJb,
|
|
@@ -228,7 +255,10 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
),
|
|
|
Text(
|
|
|
'+2',
|
|
|
- style: TextStyle(fontSize: 15.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 15.0,
|
|
|
+ color: context.appColors.textPrimary,
|
|
|
+ fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
),
|
|
|
],
|
|
|
),
|
|
@@ -241,7 +271,8 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
decoration: BoxDecoration(
|
|
|
color: AppColorsTheme.colorPrimary,
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
- border: Border.all(color:AppColorsTheme.colorPrimary, width: 1),
|
|
|
+ border: Border.all(
|
|
|
+ color: AppColorsTheme.colorPrimary, width: 1),
|
|
|
),
|
|
|
height: 78,
|
|
|
child: Column(
|
|
@@ -250,7 +281,10 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
children: [
|
|
|
Text(
|
|
|
'Today',
|
|
|
- style: TextStyle(fontSize: 13.0, color: ColorUtils.string2Color('#ffffff'), fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 13.0,
|
|
|
+ color: ColorUtils.string2Color('#ffffff'),
|
|
|
+ fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
),
|
|
|
const MyAssetImage(
|
|
|
Assets.rewardsRewardsIconJb,
|
|
@@ -259,7 +293,10 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
),
|
|
|
Text(
|
|
|
'+2',
|
|
|
- style: TextStyle(fontSize: 15.0, color: ColorUtils.string2Color('#ffffff'), fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 15.0,
|
|
|
+ color: ColorUtils.string2Color('#ffffff'),
|
|
|
+ fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
),
|
|
|
],
|
|
|
),
|
|
@@ -272,7 +309,8 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
decoration: BoxDecoration(
|
|
|
color: ColorUtils.string2Color('#F2F3F6'),
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
- border: Border.all(color: ColorUtils.string2Color('#F2F3F6'), width: 1),
|
|
|
+ border: Border.all(
|
|
|
+ color: ColorUtils.string2Color('#F2F3F6'), width: 1),
|
|
|
),
|
|
|
height: 78,
|
|
|
child: Column(
|
|
@@ -281,7 +319,10 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
children: [
|
|
|
Text(
|
|
|
'$date1',
|
|
|
- style: TextStyle(fontSize: 13.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 13.0,
|
|
|
+ color: ColorUtils.string2Color('#000000'),
|
|
|
+ fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
),
|
|
|
const MyAssetImage(
|
|
|
Assets.rewardsRewardsIconJb,
|
|
@@ -290,7 +331,10 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
),
|
|
|
Text(
|
|
|
'+2',
|
|
|
- style: TextStyle(fontSize: 15.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 15.0,
|
|
|
+ color: ColorUtils.string2Color('#000000'),
|
|
|
+ fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
),
|
|
|
],
|
|
|
),
|
|
@@ -303,7 +347,8 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
decoration: BoxDecoration(
|
|
|
color: ColorUtils.string2Color('#F2F3F6'),
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
- border: Border.all(color: ColorUtils.string2Color('#F2F3F6'), width: 1),
|
|
|
+ border: Border.all(
|
|
|
+ color: ColorUtils.string2Color('#F2F3F6'), width: 1),
|
|
|
),
|
|
|
height: 78,
|
|
|
child: Column(
|
|
@@ -312,7 +357,10 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
children: [
|
|
|
Text(
|
|
|
'$date2',
|
|
|
- style: TextStyle(fontSize: 13.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 13.0,
|
|
|
+ color: ColorUtils.string2Color('#000000'),
|
|
|
+ fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
),
|
|
|
const MyAssetImage(
|
|
|
Assets.rewardsRewardsIconJb,
|
|
@@ -321,7 +369,10 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
),
|
|
|
Text(
|
|
|
'+2',
|
|
|
- style: TextStyle(fontSize: 15.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 15.0,
|
|
|
+ color: ColorUtils.string2Color('#000000'),
|
|
|
+ fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
),
|
|
|
],
|
|
|
),
|
|
@@ -338,7 +389,8 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
decoration: BoxDecoration(
|
|
|
color: ColorUtils.string2Color('#F2F3F6'),
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
- border: Border.all(color: ColorUtils.string2Color('#F2F3F6'), width: 1),
|
|
|
+ border: Border.all(
|
|
|
+ color: ColorUtils.string2Color('#F2F3F6'), width: 1),
|
|
|
),
|
|
|
height: 78,
|
|
|
child: Column(
|
|
@@ -347,7 +399,10 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
children: [
|
|
|
Text(
|
|
|
'$date3',
|
|
|
- style: TextStyle(fontSize: 13.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 13.0,
|
|
|
+ color: ColorUtils.string2Color('#000000'),
|
|
|
+ fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
),
|
|
|
const MyAssetImage(
|
|
|
Assets.rewardsRewardsIconJb,
|
|
@@ -356,7 +411,10 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
),
|
|
|
Text(
|
|
|
'+2',
|
|
|
- style: TextStyle(fontSize: 15.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 15.0,
|
|
|
+ color: ColorUtils.string2Color('#000000'),
|
|
|
+ fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
),
|
|
|
],
|
|
|
),
|
|
@@ -369,7 +427,8 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
decoration: BoxDecoration(
|
|
|
color: ColorUtils.string2Color('#F2F3F6'),
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
- border: Border.all(color: ColorUtils.string2Color('#F2F3F6'), width: 1),
|
|
|
+ border: Border.all(
|
|
|
+ color: ColorUtils.string2Color('#F2F3F6'), width: 1),
|
|
|
),
|
|
|
height: 78,
|
|
|
child: Column(
|
|
@@ -378,7 +437,10 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
children: [
|
|
|
Text(
|
|
|
'$date4',
|
|
|
- style: TextStyle(fontSize: 13.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 13.0,
|
|
|
+ color: ColorUtils.string2Color('#000000'),
|
|
|
+ fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
),
|
|
|
const MyAssetImage(
|
|
|
Assets.rewardsRewardsIconJb,
|
|
@@ -387,7 +449,10 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
),
|
|
|
Text(
|
|
|
'+2',
|
|
|
- style: TextStyle(fontSize: 15.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 15.0,
|
|
|
+ color: ColorUtils.string2Color('#000000'),
|
|
|
+ fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
),
|
|
|
],
|
|
|
),
|
|
@@ -400,7 +465,8 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
decoration: BoxDecoration(
|
|
|
color: ColorUtils.string2Color('#F2F3F6'),
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
- border: Border.all(color: ColorUtils.string2Color('#F2F3F6'), width: 1),
|
|
|
+ border: Border.all(
|
|
|
+ color: ColorUtils.string2Color('#F2F3F6'), width: 1),
|
|
|
),
|
|
|
height: 78,
|
|
|
child: Row(
|
|
@@ -413,11 +479,17 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
children: [
|
|
|
Text(
|
|
|
'$date5',
|
|
|
- style: TextStyle(fontSize: 13.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 13.0,
|
|
|
+ color: ColorUtils.string2Color('#000000'),
|
|
|
+ fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
),
|
|
|
Text(
|
|
|
'+ More',
|
|
|
- style: TextStyle(fontSize: 12.0, color: ColorUtils.string2Color('#000000'), fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 12.0,
|
|
|
+ color: ColorUtils.string2Color('#000000'),
|
|
|
+ fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
),
|
|
|
],
|
|
|
),
|
|
@@ -437,7 +509,8 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- Widget _buildSwiper(BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
|
|
|
+ Widget _buildSwiper(
|
|
|
+ BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
|
|
|
int points = list?.points ?? 0;
|
|
|
return Container(
|
|
|
// color: Colors.white,
|
|
@@ -453,17 +526,24 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
children: [
|
|
|
Text(
|
|
|
S.current.how_to_get_rewards,
|
|
|
- style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 15.0,
|
|
|
+ color: context.appColors.textBlack,
|
|
|
+ fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
),
|
|
|
Container(
|
|
|
- padding: const EdgeInsets.only(top: 10, bottom: 10, left: 17, right: 17),
|
|
|
+ padding:
|
|
|
+ const EdgeInsets.only(top: 10, bottom: 10, left: 17, right: 17),
|
|
|
decoration: BoxDecoration(
|
|
|
color: context.appColors.btnBgDefaultDark,
|
|
|
borderRadius: BorderRadius.circular(5),
|
|
|
),
|
|
|
child: Text(
|
|
|
S.current.rewards,
|
|
|
- style: TextStyle(fontSize: 14.0, color: ColorUtils.string2Color('#ffffff'), fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 14.0,
|
|
|
+ color: ColorUtils.string2Color('#ffffff'),
|
|
|
+ fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
).onTap(() {
|
|
|
RewardsHomePage.startInstance(points: points);
|
|
|
}),
|
|
@@ -473,9 +553,11 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
).marginOnly(top: 12, bottom: 12);
|
|
|
}
|
|
|
|
|
|
- Widget _buildList(BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
|
|
|
+ Widget _buildList(
|
|
|
+ BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
|
|
|
bool newsFeed = list?.tasks?.newsFeedPost ?? false;
|
|
|
int giveLikes = list?.tasks?.give10Likes ?? 0;
|
|
|
+ final viewModel = ref.watch(rewardsVmProvider.notifier);
|
|
|
return Container(
|
|
|
decoration: BoxDecoration(
|
|
|
color: context.appColors.whiteBG,
|
|
@@ -487,7 +569,8 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
children: [
|
|
|
Container(
|
|
|
- padding: const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
|
|
|
+ padding:
|
|
|
+ const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
|
|
|
decoration: BoxDecoration(
|
|
|
border: Border(
|
|
|
bottom: BorderSide(
|
|
@@ -501,7 +584,8 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
Row(
|
|
|
children: [
|
|
|
Container(
|
|
|
- padding: const EdgeInsets.only(top: 10, bottom: 10, left: 17, right: 17),
|
|
|
+ padding: const EdgeInsets.only(
|
|
|
+ top: 10, bottom: 10, left: 17, right: 17),
|
|
|
decoration: BoxDecoration(
|
|
|
color: ColorUtils.string2Color('#f2f3f6'),
|
|
|
borderRadius: BorderRadius.circular(5),
|
|
@@ -518,13 +602,19 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
children: [
|
|
|
Text(
|
|
|
S.current.daily_login,
|
|
|
- style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 15.0,
|
|
|
+ color: context.appColors.textBlack,
|
|
|
+ fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
).marginOnly(bottom: 6),
|
|
|
Row(
|
|
|
children: [
|
|
|
Text(
|
|
|
'+2',
|
|
|
- style: TextStyle(fontSize: 15.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 15.0,
|
|
|
+ color: context.appColors.textPrimary,
|
|
|
+ fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
),
|
|
|
const MyAssetImage(
|
|
|
Assets.rewardsRewardsIconJb,
|
|
@@ -543,12 +633,17 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
decoration: BoxDecoration(
|
|
|
color: Colors.transparent,
|
|
|
borderRadius: BorderRadius.circular(5),
|
|
|
- border: Border.all(color: context.appColors.btnBgDefaultDark, width: 1),
|
|
|
+ border: Border.all(
|
|
|
+ color: context.appColors.disEnableGray, width: 1),
|
|
|
),
|
|
|
child: Center(
|
|
|
child: Text(
|
|
|
- S.current.check_in,
|
|
|
- style: TextStyle(fontSize: 14.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
+ // S.current.check_in,
|
|
|
+ S.current.completed,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 14.0,
|
|
|
+ color: context.appColors.disEnableGray,
|
|
|
+ fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
),
|
|
|
),
|
|
|
),
|
|
@@ -556,7 +651,8 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
),
|
|
|
),
|
|
|
Container(
|
|
|
- padding: const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
|
|
|
+ padding:
|
|
|
+ const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
|
|
|
decoration: BoxDecoration(
|
|
|
border: Border(
|
|
|
bottom: BorderSide(
|
|
@@ -570,7 +666,8 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
Row(
|
|
|
children: [
|
|
|
Container(
|
|
|
- padding: const EdgeInsets.only(top: 10, bottom: 10, left: 17, right: 17),
|
|
|
+ padding: const EdgeInsets.only(
|
|
|
+ top: 10, bottom: 10, left: 17, right: 17),
|
|
|
decoration: BoxDecoration(
|
|
|
color: ColorUtils.string2Color('#f2f3f6'),
|
|
|
borderRadius: BorderRadius.circular(5),
|
|
@@ -587,13 +684,19 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
children: [
|
|
|
Text(
|
|
|
S.current.news_feed_post,
|
|
|
- style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 15.0,
|
|
|
+ color: context.appColors.textBlack,
|
|
|
+ fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
).marginOnly(bottom: 6),
|
|
|
Row(
|
|
|
children: [
|
|
|
Text(
|
|
|
'+2',
|
|
|
- style: TextStyle(fontSize: 15.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 15.0,
|
|
|
+ color: context.appColors.textPrimary,
|
|
|
+ fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
),
|
|
|
const MyAssetImage(
|
|
|
Assets.rewardsRewardsIconJb,
|
|
@@ -606,26 +709,54 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
)
|
|
|
],
|
|
|
),
|
|
|
- Container(
|
|
|
- width: 86,
|
|
|
- height: 30,
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: Colors.transparent,
|
|
|
- borderRadius: BorderRadius.circular(5),
|
|
|
- border: Border.all(color: context.appColors.btnBgDefaultDark, width: 1),
|
|
|
- ),
|
|
|
- child: Center(
|
|
|
- child: Text(
|
|
|
- newsFeed == true ? S.current.completed : S.current.incomplete,
|
|
|
- style: TextStyle(fontSize: 14.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
+ newsFeed == true
|
|
|
+ ? Container(
|
|
|
+ width: 86,
|
|
|
+ height: 30,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: Colors.transparent,
|
|
|
+ borderRadius: BorderRadius.circular(5),
|
|
|
+ border: Border.all(
|
|
|
+ color: context.appColors.disEnableGray, width: 1),
|
|
|
+ ),
|
|
|
+ child: Center(
|
|
|
+ child: Text(
|
|
|
+ S.current.completed,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 14.0,
|
|
|
+ color: context.appColors.disEnableGray,
|
|
|
+ fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ : Container(
|
|
|
+ width: 86,
|
|
|
+ height: 30,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: Colors.transparent,
|
|
|
+ borderRadius: BorderRadius.circular(5),
|
|
|
+ border: Border.all(
|
|
|
+ color: context.appColors.btnBgDefaultDark,
|
|
|
+ width: 1),
|
|
|
+ ),
|
|
|
+ child: Center(
|
|
|
+ child: Text(
|
|
|
+ S.current.incomplete,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 14.0,
|
|
|
+ color: context.appColors.textPrimary,
|
|
|
+ fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ).onTap(() {
|
|
|
+ viewModel.gotoCommunityPage();
|
|
|
+ }),
|
|
|
],
|
|
|
),
|
|
|
),
|
|
|
Container(
|
|
|
- padding: const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
|
|
|
+ padding:
|
|
|
+ const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
|
|
|
decoration: BoxDecoration(
|
|
|
border: Border(
|
|
|
bottom: BorderSide(
|
|
@@ -639,7 +770,8 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
Row(
|
|
|
children: [
|
|
|
Container(
|
|
|
- padding: const EdgeInsets.only(top: 10, bottom: 10, left: 17, right: 17),
|
|
|
+ padding: const EdgeInsets.only(
|
|
|
+ top: 10, bottom: 10, left: 17, right: 17),
|
|
|
decoration: BoxDecoration(
|
|
|
color: ColorUtils.string2Color('#f2f3f6'),
|
|
|
borderRadius: BorderRadius.circular(5),
|
|
@@ -656,13 +788,19 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
children: [
|
|
|
Text(
|
|
|
S.current.give_10_likes,
|
|
|
- style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 15.0,
|
|
|
+ color: context.appColors.textBlack,
|
|
|
+ fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
).marginOnly(bottom: 6),
|
|
|
Row(
|
|
|
children: [
|
|
|
Text(
|
|
|
'+2',
|
|
|
- style: TextStyle(fontSize: 15.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 15.0,
|
|
|
+ color: context.appColors.textPrimary,
|
|
|
+ fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
),
|
|
|
const MyAssetImage(
|
|
|
Assets.rewardsRewardsIconJb,
|
|
@@ -675,21 +813,49 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
)
|
|
|
],
|
|
|
),
|
|
|
- Container(
|
|
|
- width: 86,
|
|
|
- height: 30,
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: Colors.transparent,
|
|
|
- borderRadius: BorderRadius.circular(5),
|
|
|
- border: Border.all(color: context.appColors.btnBgDefaultDark, width: 1),
|
|
|
- ),
|
|
|
- child: Center(
|
|
|
- child: Text(
|
|
|
- giveLikes == 10 ? S.current.completed : '$giveLikes/10',
|
|
|
- style: TextStyle(fontSize: 14.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
+ giveLikes == 10
|
|
|
+ ? Container(
|
|
|
+ width: 86,
|
|
|
+ height: 30,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: Colors.transparent,
|
|
|
+ borderRadius: BorderRadius.circular(5),
|
|
|
+ border: Border.all(
|
|
|
+ color: context.appColors.disEnableGray, width: 1),
|
|
|
+ ),
|
|
|
+ child: Center(
|
|
|
+ child: Text(
|
|
|
+ S.current.completed,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 14.0,
|
|
|
+ color: context.appColors.disEnableGray,
|
|
|
+ fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ : Container(
|
|
|
+ width: 86,
|
|
|
+ height: 30,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: Colors.transparent,
|
|
|
+ borderRadius: BorderRadius.circular(5),
|
|
|
+ border: Border.all(
|
|
|
+ color: context.appColors.btnBgDefaultDark,
|
|
|
+ width: 1),
|
|
|
+ ),
|
|
|
+ child: Center(
|
|
|
+ child: Text(
|
|
|
+ '$giveLikes/10',
|
|
|
+
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 14.0,
|
|
|
+ color: context.appColors.textPrimary,
|
|
|
+ fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ).onTap(() {
|
|
|
+ viewModel.gotoCommunityPage();
|
|
|
+ }),
|
|
|
],
|
|
|
),
|
|
|
)
|
|
@@ -698,7 +864,8 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
).marginOnly(bottom: 12);
|
|
|
}
|
|
|
|
|
|
- Widget _buildHistory(BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
|
|
|
+ Widget _buildHistory(
|
|
|
+ BuildContext context, WidgetRef ref, _vm, RewardsIndexEntity? list) {
|
|
|
List latest = list?.latest ?? [];
|
|
|
return Container(
|
|
|
decoration: BoxDecoration(
|
|
@@ -710,25 +877,35 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
children: [
|
|
|
- Row(crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
|
|
|
- Text(
|
|
|
- S.current.points_history,
|
|
|
- style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
- ),
|
|
|
- Text(
|
|
|
- S.current.more_arrow,
|
|
|
- style: TextStyle(fontSize: 15.0, color: context.appColors.textPrimary, fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
- ).onTap(() {
|
|
|
- RewardsHistoryPage.startInstance();
|
|
|
- })
|
|
|
- ]).paddingOnly(left: 15, right: 15, top: 15, bottom: 5),
|
|
|
+ Row(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
+ children: [
|
|
|
+ Text(
|
|
|
+ S.current.points_history,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 15.0,
|
|
|
+ color: context.appColors.textBlack,
|
|
|
+ fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
+ ),
|
|
|
+ Text(
|
|
|
+ S.current.more_arrow,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 15.0,
|
|
|
+ color: context.appColors.textPrimary,
|
|
|
+ fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
+ ).onTap(() {
|
|
|
+ RewardsHistoryPage.startInstance();
|
|
|
+ })
|
|
|
+ ]).paddingOnly(left: 15, right: 15, top: 15, bottom: 5),
|
|
|
Column(
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
children: List.generate(latest.length, (index) {
|
|
|
int point = latest[index]['point'];
|
|
|
return Container(
|
|
|
- padding: const EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15),
|
|
|
+ padding: const EdgeInsets.only(
|
|
|
+ top: 15, bottom: 15, left: 15, right: 15),
|
|
|
decoration: BoxDecoration(
|
|
|
border: Border(
|
|
|
bottom: BorderSide(
|
|
@@ -745,13 +922,18 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
children: [
|
|
|
Text(
|
|
|
latest[index]['short_description'],
|
|
|
- style: TextStyle(fontSize: 15.0, color: context.appColors.textBlack, fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 15.0,
|
|
|
+ color: context.appColors.textBlack,
|
|
|
+ fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
).marginOnly(bottom: 6),
|
|
|
Text(
|
|
|
latest[index]['created_at'],
|
|
|
style: TextStyle(
|
|
|
fontSize: 13.0,
|
|
|
- color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#808DAF'), darkColor: Colors.white),
|
|
|
+ color: DarkThemeUtil.multiColors(
|
|
|
+ context, ColorUtils.string2Color('#808DAF'),
|
|
|
+ darkColor: Colors.white),
|
|
|
fontWeight: FontWeight.w400), // 设置字体大小
|
|
|
),
|
|
|
],
|
|
@@ -760,7 +942,9 @@ class RewardsPage extends HookConsumerWidget {
|
|
|
"$point",
|
|
|
style: TextStyle(
|
|
|
fontSize: 20.0,
|
|
|
- color: DarkThemeUtil.multiColors(context, ColorUtils.string2Color('#FDB429'), darkColor: Colors.white),
|
|
|
+ color: DarkThemeUtil.multiColors(
|
|
|
+ context, ColorUtils.string2Color('#FDB429'),
|
|
|
+ darkColor: Colors.white),
|
|
|
fontWeight: FontWeight.w500), // 设置字体大小
|
|
|
),
|
|
|
],
|