opt: member page

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-14 20:11:02 +08:00
parent e87a46706e
commit d8c23a3d8c
2 changed files with 68 additions and 63 deletions

View File

@@ -74,24 +74,30 @@ class _MemberVideoState extends State<MemberVideo>
delegate: CustomSliverPersistentHeaderDelegate( delegate: CustomSliverPersistentHeaderDelegate(
extent: 40, extent: 40,
bgColor: Theme.of(context).colorScheme.surface, bgColor: Theme.of(context).colorScheme.surface,
child: Container( child: SizedBox(
height: 40, height: 40,
padding: const EdgeInsets.fromLTRB(12, 0, 6, 0),
child: Row( child: Row(
children: [ children: [
const SizedBox(width: 8),
Obx( Obx(
() => Text( () => Padding(
_controller.count.value != -1 padding: const EdgeInsets.only(left: 6),
? '${_controller.count.value}视频' child: Text(
: '', _controller.count.value != -1
style: const TextStyle(fontSize: 13), ? '${_controller.count.value}视频'
: '',
style: const TextStyle(fontSize: 13),
),
), ),
), ),
Obx( Obx(
() => _controller.episodicButton.value.uri != null () => _controller.episodicButton.value.uri != null
? Container( ? Container(
height: 35, height: 35,
padding: const EdgeInsets.only(left: 5), padding: EdgeInsets.only(
left: _controller.count.value != -1
? 6
: 0),
child: TextButton.icon( child: TextButton.icon(
onPressed: _controller.toViewPlayAll, onPressed: _controller.toViewPlayAll,
icon: Icon( icon: Icon(
@@ -146,6 +152,7 @@ class _MemberVideoState extends State<MemberVideo>
), ),
), ),
), ),
const SizedBox(width: 8),
], ],
), ),
), ),

View File

@@ -176,48 +176,47 @@ class UserInfoCard extends StatelessWidget {
), ),
), ),
if (card.officialVerify?.desc?.isNotEmpty == true) if (card.officialVerify?.desc?.isNotEmpty == true)
Padding( Container(
padding: const EdgeInsets.only(left: 20, top: 8, right: 20), margin: const EdgeInsets.only(left: 20, top: 8, right: 20),
child: Container( padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 2),
padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2), decoration: BoxDecoration(
decoration: BoxDecoration( borderRadius: BorderRadius.circular(12),
borderRadius: BorderRadius.circular(12), color: Theme.of(context).colorScheme.onInverseSurface,
color: Theme.of(context).colorScheme.onInverseSurface), ),
child: Text.rich( child: Text.rich(
TextSpan( TextSpan(
children: [ children: [
if (card.officialVerify?.icon?.isNotEmpty == true) ...[ if (card.officialVerify?.icon?.isNotEmpty == true) ...[
WidgetSpan( WidgetSpan(
child: Container( alignment: PlaceholderAlignment.middle,
padding: const EdgeInsets.all(0.1), child: DecoratedBox(
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: Theme.of(context).colorScheme.surface, color: Theme.of(context).colorScheme.surface,
), ),
child: CachedNetworkImage( child: CachedNetworkImage(
width: 18, width: 18,
height: 18, height: 18,
imageUrl: card.officialVerify!.icon!.http2https, imageUrl: card.officialVerify!.icon!.http2https,
),
), ),
), ),
TextSpan( ),
text: ' ',
)
],
TextSpan( TextSpan(
text: card.officialVerify!.spliceTitle!, text: ' ',
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: Theme.of(context)
.colorScheme
.onSurface
.withOpacity(0.7),
),
) )
], ],
), TextSpan(
text: card.officialVerify!.spliceTitle!,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: Theme.of(context)
.colorScheme
.onSurface
.withOpacity(0.7),
),
)
],
), ),
), ),
), ),
@@ -425,25 +424,24 @@ class UserInfoCard extends StatelessWidget {
], ],
); );
_buildBadge(BuildContext context) => Container( _buildBadge(BuildContext context) => IgnorePointer(
padding: const EdgeInsets.all(0.01), child: DecoratedBox(
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: Theme.of(context).colorScheme.surface, color: Theme.of(context).colorScheme.surface,
),
child: card.officialVerify?.icon?.isNotEmpty == true
? CachedNetworkImage(
imageUrl: card.officialVerify!.icon!.http2https,
width: 24,
height: 24,
)
: Image.asset(
'assets/images/big-vip.png',
width: 24,
height: 24,
),
), ),
child: card.officialVerify?.icon?.isNotEmpty == true
? NetworkImgLayer(
src: card.officialVerify?.icon,
radius: null,
width: 24,
height: 24,
quality: 100,
)
: Image.asset(
'assets/images/big-vip.png',
width: 24,
height: 24,
),
); );
_buildAvatar(BuildContext context) => Hero( _buildAvatar(BuildContext context) => Hero(