mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: member info: live widget
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -500,42 +500,7 @@ class UserInfoCard extends StatelessWidget {
|
|||||||
Positioned(
|
Positioned(
|
||||||
top: 180,
|
top: 180,
|
||||||
left: 20,
|
left: 20,
|
||||||
child: GestureDetector(
|
child: _buildLiveBadge(context),
|
||||||
onTap: () {
|
|
||||||
Get.toNamed('/liveRoom?roomid=${live['roomid']}');
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
width: 85,
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: Badge(
|
|
||||||
label: Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.equalizer_rounded,
|
|
||||||
size: MediaQuery.textScalerOf(context).scale(16),
|
|
||||||
color: Theme.of(context)
|
|
||||||
.colorScheme
|
|
||||||
.onSecondaryContainer,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'直播中',
|
|
||||||
style: TextStyle(height: 1),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
padding: const EdgeInsets.symmetric(
|
|
||||||
horizontal: 5,
|
|
||||||
vertical: 1,
|
|
||||||
),
|
|
||||||
alignment: Alignment.center,
|
|
||||||
textColor:
|
|
||||||
Theme.of(context).colorScheme.onSecondaryContainer,
|
|
||||||
backgroundColor:
|
|
||||||
Theme.of(context).colorScheme.secondaryContainer,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
left: 120,
|
left: 120,
|
||||||
@@ -558,6 +523,39 @@ class UserInfoCard extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
_buildLiveBadge(context) => GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Get.toNamed('/liveRoom?roomid=${live['roomid']}');
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 85,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Badge(
|
||||||
|
label: Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
Icons.equalizer_rounded,
|
||||||
|
size: MediaQuery.textScalerOf(context).scale(16),
|
||||||
|
color: Theme.of(context).colorScheme.onSecondaryContainer,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'直播中',
|
||||||
|
style: TextStyle(height: 1),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 5,
|
||||||
|
vertical: 1,
|
||||||
|
),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
textColor: Theme.of(context).colorScheme.onSecondaryContainer,
|
||||||
|
backgroundColor: Theme.of(context).colorScheme.secondaryContainer,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
_buildH(BuildContext context) => Column(
|
_buildH(BuildContext context) => Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
@@ -571,6 +569,7 @@ class UserInfoCard extends StatelessWidget {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||||
child: Stack(
|
child: Stack(
|
||||||
|
clipBehavior: Clip.none,
|
||||||
children: [
|
children: [
|
||||||
_buildAvatar(context),
|
_buildAvatar(context),
|
||||||
if (card.officialVerify?.icon?.isNotEmpty == true ||
|
if (card.officialVerify?.icon?.isNotEmpty == true ||
|
||||||
@@ -580,6 +579,13 @@ class UserInfoCard extends StatelessWidget {
|
|||||||
bottom: 0,
|
bottom: 0,
|
||||||
child: _buildBadge(context),
|
child: _buildBadge(context),
|
||||||
),
|
),
|
||||||
|
if (live is Map && ((live['liveStatus'] as int?) ?? 0) == 1)
|
||||||
|
Positioned(
|
||||||
|
left: 0,
|
||||||
|
bottom: -5,
|
||||||
|
right: 0,
|
||||||
|
child: _buildLiveBadge(context),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user