opt: silent info widget

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-14 13:46:02 +08:00
parent e2761836bf
commit ba8d7b871c
2 changed files with 26 additions and 21 deletions

View File

@@ -267,6 +267,7 @@ class UserInfoCard extends StatelessWidget {
Builder(builder: (context) {
bool isLight = Theme.of(context).brightness == Brightness.light;
return Container(
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6),
color: isLight
@@ -275,24 +276,29 @@ class UserInfoCard extends StatelessWidget {
),
margin: const EdgeInsets.only(left: 20, top: 8, right: 20),
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
child: Row(
children: [
Icon(
Icons.info,
size: MediaQuery.textScalerOf(context).scale(18),
color: isLight
? Theme.of(context).colorScheme.onErrorContainer
: Theme.of(context).colorScheme.onError,
),
Text(
' 该账号封禁中${endTime ?? ''}',
style: TextStyle(
color: isLight
? Theme.of(context).colorScheme.onErrorContainer
: Theme.of(context).colorScheme.onError,
child: Text.rich(
TextSpan(
children: [
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: Icon(
Icons.info,
size: 17,
color: isLight
? Theme.of(context).colorScheme.onErrorContainer
: Theme.of(context).colorScheme.onError,
),
),
),
],
TextSpan(
text: ' 该账号封禁中${endTime ?? ''}',
style: TextStyle(
color: isLight
? Theme.of(context).colorScheme.onErrorContainer
: Theme.of(context).colorScheme.onError,
),
),
],
),
),
);
}),

View File

@@ -165,16 +165,14 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
children: [
Icon(
Icons.shield_outlined,
size:
MediaQuery.textScalerOf(context).scale(16),
size: 16,
color: Theme.of(context)
.colorScheme
.onSecondaryContainer,
),
Icon(
Icons.play_arrow_rounded,
size:
MediaQuery.textScalerOf(context).scale(12),
size: 12,
color: Theme.of(context)
.colorScheme
.onSecondaryContainer,
@@ -183,6 +181,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
),
Text(
videoDetailCtr.videoLabel.value,
textScaler: TextScaler.linear(1),
strutStyle: StrutStyle(leading: 0, height: 1),
style: TextStyle(
height: 1,