mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: show staff verf
Closes #259 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -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'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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) {
|
||||||
@@ -460,15 +461,49 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Row(
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Stack(
|
||||||
|
clipBehavior: Clip.none,
|
||||||
children: [
|
children: [
|
||||||
NetworkImgLayer(
|
NetworkImgLayer(
|
||||||
type: 'avatar',
|
type: 'avatar',
|
||||||
src: videoItem['staff'][index].face,
|
src: videoItem['staff'][index]
|
||||||
|
.face,
|
||||||
width: 35,
|
width: 35,
|
||||||
height: 35,
|
height: 35,
|
||||||
fadeInDuration: Duration.zero,
|
fadeInDuration: Duration.zero,
|
||||||
fadeOutDuration: 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(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
|||||||
Reference in New Issue
Block a user