mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-27 12:36:27 +08:00
@@ -32,7 +32,8 @@ class PgcReviewController
|
||||
|
||||
@override
|
||||
void checkIsEnd(int length) {
|
||||
if (count.value != null && length >= count.value!) {
|
||||
final count = this.count.value;
|
||||
if (count != null && length >= count) {
|
||||
isEnd = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -375,12 +375,15 @@ class _PgcReviewChildPageState extends State<PgcReviewChildPage>
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Obx(
|
||||
() => _controller.count.value == null
|
||||
? const SizedBox.shrink()
|
||||
: Text(
|
||||
'${NumUtil.numFormat(_controller.count.value)}条点评',
|
||||
style: const TextStyle(fontSize: 13),
|
||||
),
|
||||
() {
|
||||
final count = _controller.count.value;
|
||||
return count == null
|
||||
? const SizedBox.shrink()
|
||||
: Text(
|
||||
'${NumUtil.numFormat(count)}条点评',
|
||||
style: const TextStyle(fontSize: 13),
|
||||
);
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
height: 35,
|
||||
|
||||
@@ -117,23 +117,26 @@ class _PgcReviewPostPanelState
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: Obx(
|
||||
() => Text(
|
||||
switch (_score.value) {
|
||||
1 => '很差',
|
||||
2 => '较差',
|
||||
3 => '还行',
|
||||
4 => '很好',
|
||||
5 => '佳作',
|
||||
_ => '轻触评分',
|
||||
},
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: _score.value == 0
|
||||
? theme.colorScheme.outline
|
||||
: const Color(0xFFFFAD35),
|
||||
),
|
||||
),
|
||||
() {
|
||||
final score = _score.value;
|
||||
return Text(
|
||||
switch (score) {
|
||||
1 => '很差',
|
||||
2 => '较差',
|
||||
3 => '还行',
|
||||
4 => '很好',
|
||||
5 => '佳作',
|
||||
_ => '轻触评分',
|
||||
},
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: score == 0
|
||||
? theme.colorScheme.outline
|
||||
: const Color(0xFFFFAD35),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
@@ -157,7 +160,8 @@ class _PgcReviewPostPanelState
|
||||
onTap: () => _shareFeed.value = !_shareFeed.value,
|
||||
child: Obx(
|
||||
() {
|
||||
Color color = _shareFeed.value
|
||||
final shareFeed = _shareFeed.value;
|
||||
Color color = shareFeed
|
||||
? theme.colorScheme.primary
|
||||
: theme.colorScheme.outline;
|
||||
return Row(
|
||||
@@ -165,7 +169,7 @@ class _PgcReviewPostPanelState
|
||||
children: [
|
||||
Icon(
|
||||
size: 22,
|
||||
_shareFeed.value
|
||||
shareFeed
|
||||
? Icons.check_box_outlined
|
||||
: Icons.check_box_outline_blank_outlined,
|
||||
color: color,
|
||||
|
||||
Reference in New Issue
Block a user