diff --git a/lib/common/widgets/extra_hit_test_widget.dart b/lib/common/widgets/extra_hit_test_widget.dart
deleted file mode 100644
index c1e30612f..000000000
--- a/lib/common/widgets/extra_hit_test_widget.dart
+++ /dev/null
@@ -1,31 +0,0 @@
-import 'package:flutter/rendering.dart' show RenderProxyBox, BoxHitTestResult;
-import 'package:flutter/widgets.dart';
-
-class ExtraHitTestWidget extends SingleChildRenderObjectWidget {
- const ExtraHitTestWidget({
- super.key,
- required this.width,
- required Widget super.child,
- });
-
- final double width;
-
- @override
- RenderObject createRenderObject(BuildContext context) {
- return RenderExtraHitTestWidget(width: width);
- }
-}
-
-class RenderExtraHitTestWidget extends RenderProxyBox {
- RenderExtraHitTestWidget({
- required this._width,
- });
-
- final double _width;
-
- @override
- bool hitTestChildren(BoxHitTestResult result, {required Offset position}) {
- return super.hitTestChildren(result, position: position) ||
- position.dx <= _width;
- }
-}
diff --git a/lib/common/widgets/flutter/refresh_indicator.dart b/lib/common/widgets/flutter/refresh_indicator.dart
index c350875a7..f1963f344 100644
--- a/lib/common/widgets/flutter/refresh_indicator.dart
+++ b/lib/common/widgets/flutter/refresh_indicator.dart
@@ -9,8 +9,7 @@ import 'dart:io' show Platform;
import 'package:PiliPlus/common/widgets/scroll_behavior.dart';
import 'package:PiliPlus/utils/storage_pref.dart';
-import 'package:extended_nested_scroll_view/extended_nested_scroll_view.dart'
- show RefreshScrollPhysics;
+import 'package:extended_nested_scroll_view/src/refresh.dart';
import 'package:flutter/foundation.dart' show clampDouble;
import 'package:flutter/material.dart' hide RefreshIndicator;
@@ -618,10 +617,26 @@ class RefreshScrollBehavior extends CustomScrollBehavior {
required this.scrollPhysics,
});
- final RefreshScrollPhysics scrollPhysics;
+ final RefreshScrollPhysicsMixin scrollPhysics;
@override
ScrollPhysics getScrollPhysics(BuildContext context) {
return scrollPhysics;
}
}
+
+class RefreshScrollPhysics extends ClampingScrollPhysics
+ with RefreshScrollPhysicsMixin {
+ const RefreshScrollPhysics({
+ super.parent,
+ required this.onDrag,
+ });
+
+ @override
+ final OnDrag onDrag;
+
+ @override
+ RefreshScrollPhysics applyTo(ScrollPhysics? ancestor) {
+ return RefreshScrollPhysics(parent: buildParent(ancestor), onDrag: onDrag);
+ }
+}
diff --git a/lib/common/widgets/translucent_column.dart b/lib/common/widgets/translucent_column.dart
index 989f7d0b2..12965731b 100644
--- a/lib/common/widgets/translucent_column.dart
+++ b/lib/common/widgets/translucent_column.dart
@@ -48,23 +48,6 @@ class TranslucentColumn extends Flex {
spacing: spacing,
);
}
-
- @override
- void updateRenderObject(
- BuildContext context,
- RenderTranslucentColumn renderObject,
- ) {
- renderObject
- ..direction = direction
- ..mainAxisAlignment = mainAxisAlignment
- ..mainAxisSize = mainAxisSize
- ..crossAxisAlignment = crossAxisAlignment
- ..textDirection = getEffectiveTextDirection(context)
- ..verticalDirection = verticalDirection
- ..textBaseline = textBaseline
- ..clipBehavior = clipBehavior
- ..spacing = spacing;
- }
}
class RenderTranslucentColumn extends RenderFlex {
diff --git a/lib/common/widgets/translucent_row.dart b/lib/common/widgets/translucent_row.dart
new file mode 100644
index 000000000..c3faccafd
--- /dev/null
+++ b/lib/common/widgets/translucent_row.dart
@@ -0,0 +1,99 @@
+/*
+ * This file is part of PiliPlus
+ *
+ * PiliPlus is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * PiliPlus is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with PiliPlus. If not, see .
+ */
+
+import 'package:flutter/rendering.dart'
+ show BoxHitTestResult, RenderFlex, FlexParentData;
+import 'package:flutter/widgets.dart';
+
+class TranslucentRow extends Flex {
+ const TranslucentRow({
+ super.key,
+ super.mainAxisAlignment,
+ super.mainAxisSize,
+ super.crossAxisAlignment,
+ super.textDirection,
+ super.verticalDirection,
+ super.textBaseline,
+ super.spacing,
+ super.children,
+ required this.extraWidth,
+ }) : super(direction: Axis.horizontal);
+
+ final double extraWidth;
+
+ @override
+ RenderTranslucentRow createRenderObject(BuildContext context) {
+ return RenderTranslucentRow(
+ direction: direction,
+ mainAxisAlignment: mainAxisAlignment,
+ mainAxisSize: mainAxisSize,
+ crossAxisAlignment: crossAxisAlignment,
+ textDirection: getEffectiveTextDirection(context),
+ verticalDirection: verticalDirection,
+ textBaseline: textBaseline,
+ clipBehavior: clipBehavior,
+ spacing: spacing,
+ extraWidth: extraWidth,
+ );
+ }
+}
+
+class RenderTranslucentRow extends RenderFlex {
+ RenderTranslucentRow({
+ super.children,
+ super.direction,
+ super.mainAxisSize,
+ super.mainAxisAlignment,
+ super.crossAxisAlignment,
+ super.textDirection,
+ super.verticalDirection,
+ super.textBaseline,
+ super.clipBehavior,
+ super.spacing,
+ required this.extraWidth,
+ });
+
+ final double extraWidth;
+
+ @override
+ bool hitTestChildren(BoxHitTestResult result, {required Offset position}) {
+ if (position.dx >= 0.0 &&
+ position.dx <= extraWidth &&
+ position.dy >= 0.0 &&
+ position.dy < size.height) {
+ return true;
+ }
+ RenderBox? child = lastChild;
+ while (child != null) {
+ final childParentData = child.parentData! as FlexParentData;
+ final bool isHit = result.addWithPaintOffset(
+ offset: childParentData.offset,
+ position: position,
+ hitTest: (BoxHitTestResult result, Offset transformed) {
+ assert(transformed == position - childParentData.offset);
+ final hit = child!.hitTest(result, position: transformed);
+ return hit || child.size.contains(transformed);
+ },
+ );
+ if (isHit) {
+ return true;
+ }
+ child = childParentData.previousSibling;
+ }
+ return false;
+ }
+}
diff --git a/lib/models/dynamics/result.dart b/lib/models/dynamics/result.dart
index 110ed9d25..fd2c2120c 100644
--- a/lib/models/dynamics/result.dart
+++ b/lib/models/dynamics/result.dart
@@ -428,9 +428,10 @@ class ModuleAuthorModel extends Avatar {
}
type = json['type'];
if (PendantAvatar.showDecorate) {
- decorate = json['decorate'] == null
- ? null
- : Decorate.fromJson(json['decorate']);
+ final decorate = json['decorate'] ?? json['decoration_card'];
+ if (decorate != null) {
+ this.decorate = Decorate.fromJson(decorate);
+ }
} else {
pendant = null;
}
@@ -465,7 +466,7 @@ class Fan {
factory Fan.fromJson(Map json) => Fan(
color: json["color"],
- numStr: json["num_str"],
+ numStr: json["num_str"] ?? json['num_desc'],
);
}
diff --git a/lib/pages/article/view.dart b/lib/pages/article/view.dart
index 75b827ceb..59f206839 100644
--- a/lib/pages/article/view.dart
+++ b/lib/pages/article/view.dart
@@ -67,7 +67,7 @@ class _ArticlePageState extends CommonDynPageState {
child: _buildBottom(),
),
);
- return fabAnimWrapper(child);
+ return fabAnimWrapper(child: child);
}
Widget _buildPage() {
diff --git a/lib/pages/common/dyn/common_dyn_page.dart b/lib/pages/common/dyn/common_dyn_page.dart
index 96eeba42a..3a2315d29 100644
--- a/lib/pages/common/dyn/common_dyn_page.dart
+++ b/lib/pages/common/dyn/common_dyn_page.dart
@@ -86,6 +86,14 @@ mixin CommonDynPageMixin
padding = MediaQuery.viewPaddingOf(context);
}
+ @override
+ bool onNotification(UserScrollNotification notification) {
+ if (notification.metrics.axisDirection == .down) {
+ return super.onNotification(notification);
+ }
+ return false;
+ }
+
Widget buildReplyHeader() {
final secondary = theme.colorScheme.secondary;
return SliverPinnedHeader(
@@ -331,22 +339,4 @@ mixin CommonDynPageMixin
tooltip: '评论',
child: const Icon(Icons.reply),
);
-
- Widget fabAnimWrapper(Widget child) {
- return NotificationListener(
- onNotification: (notification) {
- if (notification.metrics.axisDirection == .down) {
- switch (notification.direction) {
- case .forward:
- showFab();
- case .reverse:
- hideFab();
- default:
- }
- }
- return false;
- },
- child: child,
- );
- }
}
diff --git a/lib/pages/common/fab_mixin.dart b/lib/pages/common/fab_mixin.dart
index 365c823e0..ef6be052f 100644
--- a/lib/pages/common/fab_mixin.dart
+++ b/lib/pages/common/fab_mixin.dart
@@ -34,6 +34,24 @@ mixin BaseFabMixin on State, TickerProvider {
fabAnimationCtr.forward();
}
}
+
+ Widget fabAnimWrapper({required Widget child}) {
+ return NotificationListener(
+ onNotification: onNotification,
+ child: child,
+ );
+ }
+
+ bool onNotification(UserScrollNotification notification) {
+ switch (notification.direction) {
+ case .forward:
+ showFab();
+ case .reverse:
+ hideFab();
+ default:
+ }
+ return false;
+ }
}
mixin FabMixin on BaseFabMixin {
diff --git a/lib/pages/dynamics/widgets/author_panel.dart b/lib/pages/dynamics/widgets/author_panel.dart
index 008cb5bb8..2ace4f543 100644
--- a/lib/pages/dynamics/widgets/author_panel.dart
+++ b/lib/pages/dynamics/widgets/author_panel.dart
@@ -4,8 +4,8 @@ import 'package:PiliPlus/common/assets.dart';
import 'package:PiliPlus/common/style.dart';
import 'package:PiliPlus/common/widgets/custom_icon.dart';
import 'package:PiliPlus/common/widgets/dialog/report.dart';
-import 'package:PiliPlus/common/widgets/extra_hit_test_widget.dart';
import 'package:PiliPlus/common/widgets/pendant_avatar.dart';
+import 'package:PiliPlus/common/widgets/translucent_row.dart';
import 'package:PiliPlus/http/constants.dart';
import 'package:PiliPlus/http/loading_state.dart';
import 'package:PiliPlus/http/reply.dart';
@@ -94,49 +94,51 @@ class AuthorPanel extends StatelessWidget {
);
}
}
- Widget header = GestureDetector(
- onTap: moduleAuthor.type == 'AUTHOR_TYPE_NORMAL'
- ? () {
- feedBack();
- Get.toNamed('/member?mid=${moduleAuthor.mid}');
- }
- : null,
- child: ExtraHitTestWidget(
- width: 50,
- child: Row(
- spacing: 10,
+ final children = [
+ PendantAvatar(
+ size: 40,
+ moduleAuthor.face,
+ pendantImage: moduleAuthor.pendant?.image,
+ ),
+ Flexible(
+ child: Column(
+ crossAxisAlignment: .start,
children: [
- PendantAvatar(
- size: 40,
- moduleAuthor.face,
- pendantImage: moduleAuthor.pendant?.image,
- ),
- Expanded(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- moduleAuthor.name!,
- maxLines: 1,
- overflow: .ellipsis,
- style: TextStyle(
- color:
- moduleAuthor.vip != null &&
- moduleAuthor.vip!.status > 0 &&
- moduleAuthor.vip!.type == 2
- ? theme.colorScheme.vipColor
- : theme.colorScheme.onSurface,
- fontSize: theme.textTheme.titleSmall!.fontSize,
- ),
- ),
- ?pubTs,
- ],
+ Text(
+ moduleAuthor.name!,
+ maxLines: 1,
+ overflow: .ellipsis,
+ style: TextStyle(
+ color:
+ moduleAuthor.vip != null &&
+ moduleAuthor.vip!.status > 0 &&
+ moduleAuthor.vip!.type == 2
+ ? theme.colorScheme.vipColor
+ : theme.colorScheme.onSurface,
+ fontSize: theme.textTheme.titleSmall!.fontSize,
),
),
+ ?pubTs,
],
),
),
- );
+ ];
+ Widget header;
+ if (moduleAuthor.type == 'AUTHOR_TYPE_NORMAL') {
+ header = GestureDetector(
+ onTap: () => {
+ feedBack(),
+ Get.toNamed('/member?mid=${moduleAuthor.mid}'),
+ },
+ child: TranslucentRow(
+ spacing: 10,
+ extraWidth: 50,
+ children: children,
+ ),
+ );
+ } else {
+ header = Row(spacing: 10, children: children);
+ }
Widget? moreBtn = isSave
? null
: SizedBox(
diff --git a/lib/pages/dynamics_detail/view.dart b/lib/pages/dynamics_detail/view.dart
index 1c4a9e47e..11f8cefa8 100644
--- a/lib/pages/dynamics_detail/view.dart
+++ b/lib/pages/dynamics_detail/view.dart
@@ -506,7 +506,7 @@ class _DynamicDetailPageState
} else {
child = _buildHorizontal(padding);
}
- return fabAnimWrapper(child);
+ return fabAnimWrapper(child: child);
}
Widget _buildBottom() {
diff --git a/lib/pages/dynamics_topic/view.dart b/lib/pages/dynamics_topic/view.dart
index 863dea601..b74be8ead 100644
--- a/lib/pages/dynamics_topic/view.dart
+++ b/lib/pages/dynamics_topic/view.dart
@@ -65,16 +65,7 @@ class _DynTopicPageState extends State
children: [
refreshIndicator(
onRefresh: _controller.onRefresh,
- child: NotificationListener(
- onNotification: (notification) {
- final direction = notification.direction;
- if (direction == .forward) {
- showFab();
- } else if (direction == .reverse) {
- hideFab();
- }
- return false;
- },
+ child: fabAnimWrapper(
child: CustomScrollView(
controller: _controller.scrollController,
physics: const AlwaysScrollableScrollPhysics(),
diff --git a/lib/pages/follow/child/child_view.dart b/lib/pages/follow/child/child_view.dart
index adbeda4ab..bf4e69946 100644
--- a/lib/pages/follow/child/child_view.dart
+++ b/lib/pages/follow/child/child_view.dart
@@ -112,18 +112,7 @@ class _FollowChildPageState extends State
return Stack(
clipBehavior: Clip.none,
children: [
- NotificationListener(
- onNotification: (notification) {
- final direction = notification.direction;
- if (direction == .forward) {
- showFab();
- } else if (direction == .reverse) {
- hideFab();
- }
- return false;
- },
- child: child,
- ),
+ fabAnimWrapper(child: child),
Positioned(
right: kFloatingActionButtonMargin + padding.right,
bottom: 0,
diff --git a/lib/pages/main_reply/view.dart b/lib/pages/main_reply/view.dart
index c46a04ef7..371bfdc44 100644
--- a/lib/pages/main_reply/view.dart
+++ b/lib/pages/main_reply/view.dart
@@ -60,16 +60,7 @@ class _MainReplyPageState extends State
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(title: const Text('查看评论')),
- body: NotificationListener(
- onNotification: (notification) {
- final direction = notification.direction;
- if (direction == .forward) {
- showFab();
- } else if (direction == .reverse) {
- hideFab();
- }
- return false;
- },
+ body: fabAnimWrapper(
child: refreshIndicator(
onRefresh: _controller.onRefresh,
child: Padding(
diff --git a/lib/pages/match_info/view.dart b/lib/pages/match_info/view.dart
index 882d78693..c72a1623b 100644
--- a/lib/pages/match_info/view.dart
+++ b/lib/pages/match_info/view.dart
@@ -62,7 +62,7 @@ class _MatchInfoPageState extends CommonDynPageState {
child: fabButton,
),
);
- return fabAnimWrapper(child);
+ return fabAnimWrapper(child: child);
}
Widget _buildInfo(LoadingState infoState) {
diff --git a/lib/pages/member_opus/view.dart b/lib/pages/member_opus/view.dart
index b4e0b1c77..a5f244e50 100644
--- a/lib/pages/member_opus/view.dart
+++ b/lib/pages/member_opus/view.dart
@@ -59,16 +59,7 @@ class _MemberOpusState extends State
children: [
refreshIndicator(
onRefresh: _controller.onRefresh,
- child: NotificationListener(
- onNotification: (notification) {
- final direction = notification.direction;
- if (direction == .forward) {
- showFab();
- } else if (direction == .reverse) {
- hideFab();
- }
- return false;
- },
+ child: fabAnimWrapper(
child: CustomScrollView(
physics: const AlwaysScrollableScrollPhysics(),
slivers: [
diff --git a/lib/pages/member_video/view.dart b/lib/pages/member_video/view.dart
index 3f608f583..0b1a1ea79 100644
--- a/lib/pages/member_video/view.dart
+++ b/lib/pages/member_video/view.dart
@@ -119,18 +119,7 @@ class _MemberVideoState extends State
return Stack(
clipBehavior: Clip.none,
children: [
- NotificationListener(
- onNotification: (notification) {
- final direction = notification.direction;
- if (direction == .forward) {
- showFab();
- } else if (direction == .reverse) {
- hideFab();
- }
- return false;
- },
- child: child,
- ),
+ fabAnimWrapper(child: child),
Obx(
() => !_controller.isLocating.value
? Positioned(
diff --git a/lib/pages/music/view.dart b/lib/pages/music/view.dart
index 452c471b7..b3a754f1f 100644
--- a/lib/pages/music/view.dart
+++ b/lib/pages/music/view.dart
@@ -67,7 +67,7 @@ class _MusicDetailPageState extends CommonDynPageState {
: _buildBody(),
),
);
- return fabAnimWrapper(child);
+ return fabAnimWrapper(child: child);
}
PreferredSizeWidget _buildAppBar() => AppBar(
diff --git a/lib/pages/video/reply/view.dart b/lib/pages/video/reply/view.dart
index 130b49058..382c433f0 100644
--- a/lib/pages/video/reply/view.dart
+++ b/lib/pages/video/reply/view.dart
@@ -68,17 +68,7 @@ class _VideoReplyPanelState extends State
@override
Widget build(BuildContext context) {
super.build(context);
- final child = NotificationListener(
- onNotification: (notification) {
- switch (notification.direction) {
- case .forward:
- showFab();
- case .reverse:
- hideFab();
- case _:
- }
- return false;
- },
+ final child = fabAnimWrapper(
child: refreshIndicator(
onRefresh: _videoReplyController.onRefresh,
isClampingScrollPhysics: widget.isNested,
diff --git a/lib/pages/video/reply/widgets/reply_item_grpc.dart b/lib/pages/video/reply/widgets/reply_item_grpc.dart
index d0ed4ac10..94ee8c98a 100644
--- a/lib/pages/video/reply/widgets/reply_item_grpc.dart
+++ b/lib/pages/video/reply/widgets/reply_item_grpc.dart
@@ -7,13 +7,13 @@ import 'package:PiliPlus/common/widgets/badge.dart';
import 'package:PiliPlus/common/widgets/custom_icon.dart';
import 'package:PiliPlus/common/widgets/dialog/dialog.dart';
import 'package:PiliPlus/common/widgets/dialog/report.dart';
-import 'package:PiliPlus/common/widgets/extra_hit_test_widget.dart';
import 'package:PiliPlus/common/widgets/flutter/text/text.dart' as custom_text;
import 'package:PiliPlus/common/widgets/gesture/tap_gesture_recognizer.dart';
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
import 'package:PiliPlus/common/widgets/image_grid/image_grid_view.dart';
import 'package:PiliPlus/common/widgets/pendant_avatar.dart';
import 'package:PiliPlus/common/widgets/selection_text.dart';
+import 'package:PiliPlus/common/widgets/translucent_row.dart';
import 'package:PiliPlus/grpc/bilibili/main/community/reply/v1.pb.dart'
show ReplyInfo, ReplyControl, Content, Url, ReplyControl_VoteOption, Emote;
import 'package:PiliPlus/grpc/reply.dart';
@@ -32,7 +32,6 @@ import 'package:PiliPlus/utils/app_scheme.dart';
import 'package:PiliPlus/utils/bili_utils.dart';
import 'package:PiliPlus/utils/color_utils.dart';
import 'package:PiliPlus/utils/danmaku_utils.dart';
-import 'package:PiliPlus/utils/date_utils.dart';
import 'package:PiliPlus/utils/duration_utils.dart';
import 'package:PiliPlus/utils/extension/context_ext.dart';
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
@@ -153,105 +152,87 @@ class ReplyItemGrpc extends StatelessWidget {
feedBack();
Get.toNamed('/member?mid=${replyItem.mid}');
},
- child: ExtraHitTestWidget(
- width: 46,
- child: Row(
- crossAxisAlignment: .center,
- spacing: 12,
- children: [
- PendantAvatar(
- member.face,
- size: 34,
- badgeSize: 14,
- vipStatus: member.vipStatus.toInt(),
- officialType: member.officialVerifyType.toInt(),
- pendantImage: member.hasGarbPendantImage()
- ? member.garbPendantImage
- : null,
- ),
- Expanded(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisSize: MainAxisSize.min,
- children: [
- Row(
- spacing: 6,
- children: [
- Flexible(
- child: Text(
- member.name,
- maxLines: 1,
- overflow: .ellipsis,
- style: TextStyle(
- color: (member.vipStatus > 0 && member.vipType == 2)
- ? colorScheme.vipColor
- : colorScheme.outline,
- fontSize: 13,
- ),
- ),
- ),
- BiliUtils.levelPicture(
- member.level.toInt(),
- isSeniorMember: member.isSeniorMember == 1,
- height: 11,
- ),
- if (replyItem.mid == upMid)
- const PBadge(
- text: 'UP',
- size: PBadgeSize.small,
- isStack: false,
- fontSize: 9,
- )
- else if (GlobalData().showMedal &&
- member.hasFansMedalLevel())
- MedalWidget(
- medalName: member.fansMedalName,
- level: member.fansMedalLevel.toInt(),
- backgroundColor: DmUtils.decimalToColor(
- member.fansMedalColor.toInt(),
- ),
- nameColor: DmUtils.decimalToColor(
- member.fansMedalColorName.toInt(),
- ),
- padding: const .symmetric(
- horizontal: 6,
- vertical: 1.5,
- ),
- ),
- ],
- ),
- Row(
- mainAxisSize: MainAxisSize.min,
- children: [
- Text(
- replyLevel == 0
- ? DateFormatUtils.format(
- replyItem.ctime.toInt(),
- format: DateFormatUtils.longFormatDs,
- )
- : DateFormatUtils.dateFormat(
- replyItem.ctime.toInt(),
- ),
+ child: TranslucentRow(
+ spacing: 12,
+ extraWidth: 46,
+ children: [
+ PendantAvatar(
+ member.face,
+ size: 34,
+ badgeSize: 14,
+ vipStatus: member.vipStatus.toInt(),
+ officialType: member.officialVerifyType.toInt(),
+ pendantImage: member.hasGarbPendantImage()
+ ? member.garbPendantImage
+ : null,
+ ),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Row(
+ spacing: 6,
+ children: [
+ Flexible(
+ child: Text(
+ member.name,
+ maxLines: 1,
+ overflow: .ellipsis,
style: TextStyle(
- fontSize: 11,
- color: colorScheme.outline,
+ color: (member.vipStatus > 0 && member.vipType == 2)
+ ? colorScheme.vipColor
+ : colorScheme.outline,
+ fontSize: 13,
),
),
- if (replyItem.replyControl.hasLocation())
- Text(
- ' • ${replyItem.replyControl.location}',
- style: TextStyle(
- fontSize: 11,
- color: colorScheme.outline,
- ),
+ ),
+ BiliUtils.levelPicture(
+ member.level.toInt(),
+ isSeniorMember: member.isSeniorMember == 1,
+ height: 11,
+ ),
+ if (replyItem.mid == upMid)
+ const PBadge(
+ text: 'UP',
+ size: PBadgeSize.small,
+ isStack: false,
+ fontSize: 9,
+ )
+ else if (GlobalData().showMedal &&
+ member.hasFansMedalLevel())
+ MedalWidget(
+ medalName: member.fansMedalName,
+ level: member.fansMedalLevel.toInt(),
+ backgroundColor: DmUtils.decimalToColor(
+ member.fansMedalColor.toInt(),
),
- ],
- ),
- ],
- ),
+ nameColor: DmUtils.decimalToColor(
+ member.fansMedalColorName.toInt(),
+ ),
+ padding: const .symmetric(
+ horizontal: 6,
+ vertical: 1.5,
+ ),
+ ),
+ ],
+ ),
+ Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Text(
+ ' • ${replyItem.replyControl.location}',
+ style: TextStyle(
+ fontSize: 11,
+ color: colorScheme.outline,
+ ),
+ ),
+ ],
+ ),
+ ],
),
- ],
- ),
+ ),
+ ],
),
);
if (PendantAvatar.showDecorate) {
diff --git a/pubspec.lock b/pubspec.lock
index 61870546f..3151ee9fe 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -476,8 +476,8 @@ packages:
dependency: "direct main"
description:
path: "."
- ref: mod
- resolved-ref: "161cd202c20bf0ba2394e3a86381d58864dc9e4e"
+ ref: dev
+ resolved-ref: "7cd9461210185bd9e67368b8081195384dc8b919"
url: "https://github.com/bggRGjQaUbCoE/extended_nested_scroll_view.git"
source: git
version: "6.2.1"
@@ -518,7 +518,7 @@ packages:
description:
path: "."
ref: dev
- resolved-ref: "97109c6473e743495e93c5bf378528eca4d6501c"
+ resolved-ref: "2f3fa1f93519b24a2d0e52ad4c45d72024b51114"
url: "https://github.com/bggRGjQaUbCoE/flutter_file_picker.git"
source: git
version: "12.0.0-beta.8"
diff --git a/pubspec.yaml b/pubspec.yaml
index 2144d9777..193258f75 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -82,7 +82,7 @@ dependencies:
extended_nested_scroll_view:
git:
url: https://github.com/bggRGjQaUbCoE/extended_nested_scroll_view.git
- ref: mod
+ ref: dev
file_picker:
git:
url: https://github.com/bggRGjQaUbCoE/flutter_file_picker.git