diff --git a/lib/common/widgets/badge.dart b/lib/common/widgets/badge.dart index 378cd612e..1814b080a 100644 --- a/lib/common/widgets/badge.dart +++ b/lib/common/widgets/badge.dart @@ -42,8 +42,8 @@ class PBadge extends StatelessWidget { color = Colors.white; } if (type == 'color') { - bgColor = t.primaryContainer.withOpacity(0.5); - color = t.primary; + bgColor = t.secondaryContainer.withOpacity(0.5); + color = t.onSecondaryContainer; } if (type == 'line') { bgColor = Colors.transparent; diff --git a/lib/main.dart b/lib/main.dart index 8c1b5f51d..7718f62d6 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -221,11 +221,7 @@ class MyApp extends StatelessWidget { titleTextStyle: TextStyle(fontSize: 16, color: colorScheme.onSurface), ), navigationBarTheme: NavigationBarThemeData( - surfaceTintColor: isDynamic - ? colorScheme.surfaceTint - : isDark - ? colorScheme.surfaceTint - : null, + surfaceTintColor: isDynamic ? colorScheme.onSurfaceVariant : null, ), snackBarTheme: SnackBarThemeData( actionTextColor: colorScheme.primary, @@ -242,27 +238,16 @@ class MyApp extends StatelessWidget { }, ), popupMenuTheme: PopupMenuThemeData( - surfaceTintColor: - isDynamic || variant == FlexSchemeVariant.material3Legacy - ? isDark - ? colorScheme.surfaceTint - : null - : null, + surfaceTintColor: isDynamic ? colorScheme.onSurfaceVariant : null, ), cardTheme: CardTheme( elevation: 1, - surfaceTintColor: isDynamic - ? colorScheme.surfaceTint - : variant == FlexSchemeVariant.material3Legacy - ? isDark - ? colorScheme.surfaceTint - : null - : null, + surfaceTintColor: isDark ? colorScheme.onSurfaceVariant : null, shadowColor: Colors.transparent, ), - dialogTheme: DialogTheme( - surfaceTintColor: isDark ? colorScheme.surfaceTint : null, - ), + // dialogTheme: DialogTheme( + // surfaceTintColor: isDark ? colorScheme.onSurfaceVariant : null, + // ), progressIndicatorTheme: ProgressIndicatorThemeData( refreshBackgroundColor: colorScheme.onSecondary, ), diff --git a/lib/pages/member/new/widget/user_info_card.dart b/lib/pages/member/new/widget/user_info_card.dart index d3e6d8d8d..8b441368a 100644 --- a/lib/pages/member/new/widget/user_info_card.dart +++ b/lib/pages/member/new/widget/user_info_card.dart @@ -101,69 +101,73 @@ class UserInfoCard extends StatelessWidget { _buildLeft(BuildContext context) => [ Padding( padding: const EdgeInsets.symmetric(horizontal: 20), - child: Wrap( - spacing: 5, - runSpacing: 8, - crossAxisAlignment: WrapCrossAlignment.center, - children: [ - GestureDetector( - onTap: () => Utils.copyText(card.name ?? ''), - child: Text( - card.name ?? '', - style: TextStyle( - height: 1, - fontSize: 17, - fontWeight: FontWeight.bold, - color: (card.vip?.vipStatus ?? -1) > 0 && - card.vip?.vipType == 2 - ? context.vipColor - : null, + child: FittedBox( + child: Row( + children: [ + GestureDetector( + onTap: () => Utils.copyText(card.name ?? ''), + child: Text( + card.name ?? '', + style: TextStyle( + height: 1, + fontSize: 17, + fontWeight: FontWeight.bold, + color: (card.vip?.vipStatus ?? -1) > 0 && + card.vip?.vipType == 2 + ? context.vipColor + : null, + ), ), ), - ), - Image.asset( - 'assets/images/lv/lv${card.levelInfo?.currentLevel}.png', - height: 11, - semanticLabel: '等级${card.levelInfo?.currentLevel}', - ), - if (card.vip?.vipStatus == 1) - CachedNetworkImage( - imageUrl: card.vip!.label!.image!, - height: 20, + const SizedBox(width: 8), + Image.asset( + 'assets/images/lv/lv${card.levelInfo?.currentLevel}.png', + height: 11, + semanticLabel: '等级${card.levelInfo?.currentLevel}', ), - // if (card.nameplate?.image?.isNotEmpty == true) - // CachedNetworkImage( - // imageUrl: card.nameplate!.image!, - // height: 20, - // ), - // GestureDetector( - // onTap: () { - // Utils.copyText(card.mid.toString()); - // }, - // child: Container( - // padding: - // const EdgeInsets.symmetric(horizontal: 8, vertical: 2.5), - // decoration: BoxDecoration( - // color: Theme.of(context).colorScheme.secondaryContainer, - // borderRadius: const BorderRadius.all(Radius.circular(12)), - // ), - // child: Text( - // 'uid: ${card.mid}', - // style: TextStyle( - // height: 1, - // fontSize: 12, - // fontWeight: FontWeight.w500, - // color: Theme.of(context).colorScheme.onSecondaryContainer, - // ), - // strutStyle: const StrutStyle( - // height: 1, - // leading: 0, - // fontSize: 12, - // ), - // ), - // ), - // ), - ], + if (card.vip?.vipStatus == 1) ...[ + const SizedBox(width: 8), + CachedNetworkImage( + imageUrl: card.vip!.label!.image!, + height: 20, + ), + ], + if (card.nameplate?.image?.isNotEmpty == true) ...[ + const SizedBox(width: 8), + CachedNetworkImage( + imageUrl: card.nameplate!.image!, + height: 20, + ), + ], + // GestureDetector( + // onTap: () { + // Utils.copyText(card.mid.toString()); + // }, + // child: Container( + // padding: + // const EdgeInsets.symmetric(horizontal: 8, vertical: 2.5), + // decoration: BoxDecoration( + // color: Theme.of(context).colorScheme.secondaryContainer, + // borderRadius: const BorderRadius.all(Radius.circular(12)), + // ), + // child: Text( + // 'uid: ${card.mid}', + // style: TextStyle( + // height: 1, + // fontSize: 12, + // fontWeight: FontWeight.w500, + // color: Theme.of(context).colorScheme.onSecondaryContainer, + // ), + // strutStyle: const StrutStyle( + // height: 1, + // leading: 0, + // fontSize: 12, + // ), + // ), + // ), + // ), + ], + ), ), ), if (card.officialVerify?.desc?.isNotEmpty == true) @@ -275,25 +279,21 @@ class UserInfoCard extends StatelessWidget { children: List.generate( 5, (index) => index % 2 == 0 - ? Padding( - padding: const EdgeInsets.symmetric(horizontal: 20), - child: _countWidget( - title: ['粉丝', '关注', '获赞'][index ~/ 2], - count: index == 0 - ? card.fans - : index == 2 - ? card.attention - : card.likes?.likeNum ?? 0, - onTap: () { - if (index == 0) { - Get.toNamed( - '/fan?mid=${card.mid}&name=${card.name}'); - } else if (index == 2) { - Get.toNamed( - '/follow?mid=${card.mid}&name=${card.name}'); - } - }, - ), + ? _countWidget( + title: ['粉丝', '关注', '获赞'][index ~/ 2], + count: index == 0 + ? card.fans + : index == 2 + ? card.attention + : card.likes?.likeNum ?? 0, + onTap: () { + if (index == 0) { + Get.toNamed('/fan?mid=${card.mid}&name=${card.name}'); + } else if (index == 2) { + Get.toNamed( + '/follow?mid=${card.mid}&name=${card.name}'); + } + }, ) : SizedBox( height: 15, @@ -462,6 +462,7 @@ class UserInfoCard extends StatelessWidget { child: _buildBadge(context), ), Positioned( + left: 120, top: 140, right: 20, child: _buildRight(context), diff --git a/lib/pages/video/detail/reply/widgets/reply_item.dart b/lib/pages/video/detail/reply/widgets/reply_item.dart index 8a861f39b..fae8d3702 100644 --- a/lib/pages/video/detail/reply/widgets/reply_item.dart +++ b/lib/pages/video/detail/reply/widgets/reply_item.dart @@ -686,7 +686,7 @@ class ReplyItem extends StatelessWidget { TextSpan( text: matchStr, style: TextStyle( - color: Theme.of(context).colorScheme.primary, + color: Theme.of(context).colorScheme.primary.withOpacity(0.8), ), recognizer: TapGestureRecognizer() ..onTap = () { diff --git a/lib/pages/video/detail/reply/widgets/reply_item_grpc.dart b/lib/pages/video/detail/reply/widgets/reply_item_grpc.dart index a3372e53d..ea6fa19f6 100644 --- a/lib/pages/video/detail/reply/widgets/reply_item_grpc.dart +++ b/lib/pages/video/detail/reply/widgets/reply_item_grpc.dart @@ -709,7 +709,7 @@ class ReplyItemGrpc extends StatelessWidget { TextSpan( text: matchStr, style: TextStyle( - color: Theme.of(context).colorScheme.primary, + color: Theme.of(context).colorScheme.primary.withOpacity(0.8), ), recognizer: TapGestureRecognizer() ..onTap = () {