mod: show staff verf

Closes #259

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-15 13:26:04 +08:00
parent 6a68af77dc
commit ebfd98488e
2 changed files with 44 additions and 7 deletions

View File

@@ -291,6 +291,7 @@ class Staff {
String? name; String? name;
String? face; String? face;
Vip? vip; Vip? vip;
Map? official;
Staff({ Staff({
this.mid, this.mid,
@@ -306,6 +307,7 @@ class Staff {
name = json["name"]; name = json["name"];
face = json["face"]; face = json["face"];
vip = json["vip"] == null ? null : Vip.fromJson(json["vip"]); vip = json["vip"] == null ? null : Vip.fromJson(json["vip"]);
official = json['official'];
} }
} }

View File

@@ -223,6 +223,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
videoDetailCtr = Get.find<VideoDetailController>(tag: widget.heroTag); videoDetailCtr = Get.find<VideoDetailController>(tag: widget.heroTag);
if (videoIntroController.expandableCtr == null) { if (videoIntroController.expandableCtr == null) {
@@ -461,13 +462,47 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
}, },
child: Row( child: Row(
children: [ children: [
NetworkImgLayer( Stack(
type: 'avatar', clipBehavior: Clip.none,
src: videoItem['staff'][index].face, children: [
width: 35, NetworkImgLayer(
height: 35, type: 'avatar',
fadeInDuration: Duration.zero, src: videoItem['staff'][index]
fadeOutDuration: Duration.zero, .face,
width: 35,
height: 35,
fadeInDuration: Duration.zero,
fadeOutDuration: Duration.zero,
),
if ((videoItem['staff'][index]
.official?['type'] ??
-1) !=
-1)
Positioned(
right: -2,
bottom: -2,
child: Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Theme.of(context)
.colorScheme
.surface,
),
child: Icon(
Icons.offline_bolt,
color: videoItem['staff']
[index]
.official?[
'type'] ==
0
? Colors.yellow
: Colors
.lightBlueAccent,
size: 14,
),
),
),
],
), ),
const SizedBox(width: 8), const SizedBox(width: 8),
Column( Column(