diff --git a/lib/models/model_hot_video_item.dart b/lib/models/model_hot_video_item.dart index b65c079d6..4d59d15ec 100644 --- a/lib/models/model_hot_video_item.dart +++ b/lib/models/model_hot_video_item.dart @@ -61,7 +61,7 @@ class HotVideoItemModel extends BaseRecVideoItemModel with MultiSelectData { class HotStat extends Stat { int? reply; int? favorite; - int? coin; + num? coin; int? share; int? nowRank; int? hisRank; diff --git a/lib/models/pgc_lcf.dart b/lib/models/pgc_lcf.dart index 76e60f56a..51ed9c4e3 100644 --- a/lib/models/pgc_lcf.dart +++ b/lib/models/pgc_lcf.dart @@ -1,5 +1,5 @@ class PgcLCF { - int? coinNumber; + num? coinNumber; int? favorite; int? isOriginal; int? like; diff --git a/lib/models_new/account_myinfo/data.dart b/lib/models_new/account_myinfo/data.dart index 1573dc90b..557338548 100644 --- a/lib/models_new/account_myinfo/data.dart +++ b/lib/models_new/account_myinfo/data.dart @@ -2,7 +2,7 @@ class AccountMyInfoData { int? mid; String? name; String? sign; - int? coins; + num? coins; String? birthday; String? face; int? faceNftNew; @@ -46,7 +46,7 @@ class AccountMyInfoData { mid: json['mid'] as int?, name: json['name'] as String?, sign: json['sign'] as String?, - coins: json['coins'] as int?, + coins: json['coins'] as num?, birthday: json['birthday'] as String?, face: json['face'] as String?, faceNftNew: json['face_nft_new'] as int?, diff --git a/lib/models_new/article/article_info/data.dart b/lib/models_new/article/article_info/data.dart index 812ee317a..5fe8b4086 100644 --- a/lib/models_new/article/article_info/data.dart +++ b/lib/models_new/article/article_info/data.dart @@ -5,7 +5,7 @@ class ArticleInfoData { int? like; bool? attention; bool? favorite; - int? coin; + num? coin; Stats? stats; String? title; String? bannerUrl; @@ -57,7 +57,7 @@ class ArticleInfoData { like: json['like'] as int?, attention: json['attention'] as bool?, favorite: json['favorite'] as bool?, - coin: json['coin'] as int?, + coin: json['coin'] as num?, stats: json['stats'] == null ? null : Stats.fromJson(json['stats'] as Map), diff --git a/lib/models_new/article/article_info/stats.dart b/lib/models_new/article/article_info/stats.dart index ddd0702ec..09f5ad609 100644 --- a/lib/models_new/article/article_info/stats.dart +++ b/lib/models_new/article/article_info/stats.dart @@ -5,7 +5,7 @@ class Stats { int? dislike; int? reply; int? share; - int? coin; + num? coin; int? dynam1c; Stats({ @@ -26,7 +26,7 @@ class Stats { dislike: json['dislike'] as int?, reply: json['reply'] as int?, share: json['share'] as int?, - coin: json['coin'] as int?, + coin: json['coin'] as num?, dynam1c: json['dynamic'] as int?, ); } diff --git a/lib/models_new/article/article_list/stats.dart b/lib/models_new/article/article_list/stats.dart index ddd0702ec..09f5ad609 100644 --- a/lib/models_new/article/article_list/stats.dart +++ b/lib/models_new/article/article_list/stats.dart @@ -5,7 +5,7 @@ class Stats { int? dislike; int? reply; int? share; - int? coin; + num? coin; int? dynam1c; Stats({ @@ -26,7 +26,7 @@ class Stats { dislike: json['dislike'] as int?, reply: json['reply'] as int?, share: json['share'] as int?, - coin: json['coin'] as int?, + coin: json['coin'] as num?, dynam1c: json['dynamic'] as int?, ); } diff --git a/lib/models_new/article/article_view/stats.dart b/lib/models_new/article/article_view/stats.dart index ddd0702ec..09f5ad609 100644 --- a/lib/models_new/article/article_view/stats.dart +++ b/lib/models_new/article/article_view/stats.dart @@ -5,7 +5,7 @@ class Stats { int? dislike; int? reply; int? share; - int? coin; + num? coin; int? dynam1c; Stats({ @@ -26,7 +26,7 @@ class Stats { dislike: json['dislike'] as int?, reply: json['reply'] as int?, share: json['share'] as int?, - coin: json['coin'] as int?, + coin: json['coin'] as num?, dynam1c: json['dynamic'] as int?, ); } diff --git a/lib/models_new/fav/fav_detail/cnt_info.dart b/lib/models_new/fav/fav_detail/cnt_info.dart index 73b824998..4db550e69 100644 --- a/lib/models_new/fav/fav_detail/cnt_info.dart +++ b/lib/models_new/fav/fav_detail/cnt_info.dart @@ -6,7 +6,7 @@ class CntInfo { int? share; int? reply; int? danmaku; - int? coin; + num? coin; int? vt; int? playSwitch; String? viewText1; @@ -33,7 +33,7 @@ class CntInfo { share: json['share'] as int?, reply: json['reply'] as int?, danmaku: json['danmaku'] as int?, - coin: json['coin'] as int?, + coin: json['coin'] as num?, vt: json['vt'] as int?, playSwitch: json['play_switch'] as int?, viewText1: json['view_text_1'] as String?, diff --git a/lib/models_new/fav/fav_pgc/stat.dart b/lib/models_new/fav/fav_pgc/stat.dart index 2e8af9b3f..7ba3bc624 100644 --- a/lib/models_new/fav/fav_pgc/stat.dart +++ b/lib/models_new/fav/fav_pgc/stat.dart @@ -3,7 +3,7 @@ class Stat { int? view; int? danmaku; int? reply; - int? coin; + num? coin; int? seriesFollow; int? seriesView; int? likes; @@ -26,7 +26,7 @@ class Stat { view: json['view'] as int?, danmaku: json['danmaku'] as int?, reply: json['reply'] as int?, - coin: json['coin'] as int?, + coin: json['coin'] as num?, seriesFollow: json['series_follow'] as int?, seriesView: json['series_view'] as int?, likes: json['likes'] as int?, diff --git a/lib/models_new/later/stat.dart b/lib/models_new/later/stat.dart index a85b01f71..a6dfbd6b8 100644 --- a/lib/models_new/later/stat.dart +++ b/lib/models_new/later/stat.dart @@ -4,7 +4,7 @@ class Stat { int? danmaku; int? reply; int? favorite; - int? coin; + num? coin; int? share; int? nowRank; int? hisRank; @@ -35,7 +35,7 @@ class Stat { danmaku: json['danmaku'] as int?, reply: json['reply'] as int?, favorite: json['favorite'] as int?, - coin: json['coin'] as int?, + coin: json['coin'] as num?, share: json['share'] as int?, nowRank: json['now_rank'] as int?, hisRank: json['his_rank'] as int?, diff --git a/lib/models_new/media_list/coin.dart b/lib/models_new/media_list/coin.dart index 3306d1433..c9b9a0561 100644 --- a/lib/models_new/media_list/coin.dart +++ b/lib/models_new/media_list/coin.dart @@ -1,11 +1,11 @@ class Coin { - int? maxNum; - int? coinNumber; + num? maxNum; + num? coinNumber; Coin({this.maxNum, this.coinNumber}); factory Coin.fromJson(Map json) => Coin( - maxNum: json['max_num'] as int?, - coinNumber: json['coin_number'] as int?, + maxNum: json['max_num'] as num?, + coinNumber: json['coin_number'] as num?, ); } diff --git a/lib/models_new/pgc/pgc_info_model/stat.dart b/lib/models_new/pgc/pgc_info_model/stat.dart index 52357a96f..bc0a3b2c6 100644 --- a/lib/models_new/pgc/pgc_info_model/stat.dart +++ b/lib/models_new/pgc/pgc_info_model/stat.dart @@ -1,5 +1,5 @@ class Stat { - int? coins; + num? coins; int? danmakus; int? favorite; int? favorites; diff --git a/lib/models_new/pgc/pgc_info_model/stat_for_unity.dart b/lib/models_new/pgc/pgc_info_model/stat_for_unity.dart index 62865da3e..d5be058d5 100644 --- a/lib/models_new/pgc/pgc_info_model/stat_for_unity.dart +++ b/lib/models_new/pgc/pgc_info_model/stat_for_unity.dart @@ -2,7 +2,7 @@ import 'package:PiliPlus/models_new/pgc/pgc_info_model/danmaku.dart'; import 'package:PiliPlus/models_new/pgc/pgc_info_model/vt.dart'; class StatForUnity { - int? coin; + num? coin; Danmaku? danmaku; int? likes; int? reply; @@ -11,7 +11,7 @@ class StatForUnity { StatForUnity({this.coin, this.danmaku, this.likes, this.reply, this.vt}); factory StatForUnity.fromJson(Map json) => StatForUnity( - coin: json['coin'] as int?, + coin: json['coin'] as num?, danmaku: json['danmaku'] == null ? null : Danmaku.fromJson(json['danmaku'] as Map), diff --git a/lib/models_new/space/space/stats.dart b/lib/models_new/space/space/stats.dart index ddd0702ec..09f5ad609 100644 --- a/lib/models_new/space/space/stats.dart +++ b/lib/models_new/space/space/stats.dart @@ -5,7 +5,7 @@ class Stats { int? dislike; int? reply; int? share; - int? coin; + num? coin; int? dynam1c; Stats({ @@ -26,7 +26,7 @@ class Stats { dislike: json['dislike'] as int?, reply: json['reply'] as int?, share: json['share'] as int?, - coin: json['coin'] as int?, + coin: json['coin'] as num?, dynam1c: json['dynamic'] as int?, ); } diff --git a/lib/models_new/space/space_article/stats.dart b/lib/models_new/space/space_article/stats.dart index ddd0702ec..09f5ad609 100644 --- a/lib/models_new/space/space_article/stats.dart +++ b/lib/models_new/space/space_article/stats.dart @@ -5,7 +5,7 @@ class Stats { int? dislike; int? reply; int? share; - int? coin; + num? coin; int? dynam1c; Stats({ @@ -26,7 +26,7 @@ class Stats { dislike: json['dislike'] as int?, reply: json['reply'] as int?, share: json['share'] as int?, - coin: json['coin'] as int?, + coin: json['coin'] as num?, dynam1c: json['dynamic'] as int?, ); } diff --git a/lib/models_new/space/space_audio/item.dart b/lib/models_new/space/space_audio/item.dart index 6220d894f..69c4a00d0 100644 --- a/lib/models_new/space/space_audio/item.dart +++ b/lib/models_new/space/space_audio/item.dart @@ -21,7 +21,7 @@ class SpaceAudioItem { int? limit; int? activityId; String? limitdesc; - int? coinNum; + num? coinNum; int? ctime; Statistic? statistic; dynamic vipInfo; @@ -78,7 +78,7 @@ class SpaceAudioItem { limit: json['limit'] as int?, activityId: json['activityId'] as int?, limitdesc: json['limitdesc'] as String?, - coinNum: json['coin_num'] as int?, + coinNum: json['coin_num'] as num?, ctime: json['ctime'] as int?, statistic: json['statistic'] == null ? null diff --git a/lib/models_new/triple/pgc_triple.dart b/lib/models_new/triple/pgc_triple.dart index 23a021107..3b4ca62ca 100644 --- a/lib/models_new/triple/pgc_triple.dart +++ b/lib/models_new/triple/pgc_triple.dart @@ -1,6 +1,6 @@ class PgcTriple { - int? coin; - int? coinNumber; + num? coin; + num? coinNumber; int? favorite; int? fmid; int? follow; diff --git a/lib/models_new/video/video_detail/stat.dart b/lib/models_new/video/video_detail/stat.dart index dcecbdfef..90ddbaaaf 100644 --- a/lib/models_new/video/video_detail/stat.dart +++ b/lib/models_new/video/video_detail/stat.dart @@ -4,7 +4,7 @@ class Stat { int? danmaku; int? reply; int? favorite; - int? coin; + num? coin; int? share; int? nowRank; int? hisRank; @@ -35,7 +35,7 @@ class Stat { danmaku: json['danmaku'] as int?, reply: json['reply'] as int?, favorite: json['favorite'] as int?, - coin: json['coin'] as int?, + coin: json['coin'] as num?, share: json['share'] as int?, nowRank: json['now_rank'] as int?, hisRank: json['his_rank'] as int?, diff --git a/lib/models_new/video/video_relation/data.dart b/lib/models_new/video/video_relation/data.dart index b5000910a..53e9a4c00 100644 --- a/lib/models_new/video/video_relation/data.dart +++ b/lib/models_new/video/video_relation/data.dart @@ -4,7 +4,7 @@ class VideoRelation { bool? seasonFav; bool? like; bool? dislike; - int? coin; + num? coin; VideoRelation({ this.attention, @@ -21,6 +21,6 @@ class VideoRelation { seasonFav: json['season_fav'] as bool?, like: json['like'] as bool?, dislike: json['dislike'] as bool?, - coin: json['coin'] as int?, + coin: json['coin'] as num?, ); } diff --git a/lib/pages/common/common_intro_controller.dart b/lib/pages/common/common_intro_controller.dart index a5d020a5c..952da7c8e 100644 --- a/lib/pages/common/common_intro_controller.dart +++ b/lib/pages/common/common_intro_controller.dart @@ -14,7 +14,7 @@ abstract class CommonIntroController extends GetxController { // 是否点赞 RxBool hasLike = false.obs; // 投币数量 - final RxInt coinNum = 0.obs; + final RxNum coinNum = RxNum(0); // 是否投币 bool get hasCoin => coinNum.value != 0; // 是否收藏 diff --git a/lib/pages/member_profile/view.dart b/lib/pages/member_profile/view.dart index 1ed0e58b4..b6482b6ac 100644 --- a/lib/pages/member_profile/view.dart +++ b/lib/pages/member_profile/view.dart @@ -131,6 +131,8 @@ class _EditProfilePageState extends State { padding: const EdgeInsets.symmetric(vertical: 5), child: ClipOval( child: CachedNetworkImage( + width: 55, + height: 55, imageUrl: ImageUtil.thumbnailUrl(response.face), ), ), @@ -190,11 +192,11 @@ class _EditProfilePageState extends State { _item( theme: theme, title: '个性签名', - text: response.sign.isNullOrEmpty ? '无' : response.sign!, + text: response.sign, onTap: () => _editDialog( type: ProfileType.sign, title: '个性签名', - text: response.sign!, + text: response.sign ?? '', ), ), divider1, @@ -273,6 +275,7 @@ class _EditProfilePageState extends State { required String text, }) { _textController.text = text; + final lines = type == ProfileType.uname ? 1 : 4; showDialog( context: context, builder: (BuildContext context) { @@ -281,8 +284,8 @@ class _EditProfilePageState extends State { title: Text('修改$title'), content: TextField( controller: _textController, - minLines: type == ProfileType.uname ? 1 : 4, - maxLines: type == ProfileType.uname ? 1 : 4, + minLines: lines, + maxLines: lines, autofocus: true, style: const TextStyle(fontSize: 14), textInputAction: @@ -427,18 +430,20 @@ class _EditProfilePageState extends State { fontWeight: FontWeight.normal, ), ), - trailing: Row( - mainAxisSize: MainAxisSize.min, + title: Row( + mainAxisAlignment: MainAxisAlignment.end, children: [ if (text != null) - Text( - text, - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.normal, - color: theme.colorScheme.outline, + Flexible( + child: Text( + text, + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: theme.colorScheme.outline, + ), ), ) else if (widget != null) @@ -448,6 +453,8 @@ class _EditProfilePageState extends State { Icons.keyboard_arrow_right, color: theme.colorScheme.outline, ) + else + const SizedBox(width: 24) ], ), ); diff --git a/lib/pages/save_panel/view.dart b/lib/pages/save_panel/view.dart index bffd30289..fe7e211c5 100644 --- a/lib/pages/save_panel/view.dart +++ b/lib/pages/save_panel/view.dart @@ -368,10 +368,9 @@ class _SavePanelState extends State { if (pubdate != null) ...[ const Spacer(), Text( - DateTime.fromMillisecondsSinceEpoch( - pubdate! * 1000) - .toString() - .substring(0, 19), + DateUtil.format(pubdate, + format: + DateUtil.longFormatDs), style: TextStyle( color: theme.colorScheme.outline, diff --git a/lib/pages/video/reply/widgets/reply_item_grpc.dart b/lib/pages/video/reply/widgets/reply_item_grpc.dart index 80a429f03..208b13b90 100644 --- a/lib/pages/video/reply/widgets/reply_item_grpc.dart +++ b/lib/pages/video/reply/widgets/reply_item_grpc.dart @@ -238,7 +238,8 @@ class ReplyItemGrpc extends StatelessWidget { children: [ Text( replyLevel == 0 - ? DateUtil.longFormatDs.format(DateTime.now()) + ? DateUtil.format(replyItem.ctime.toInt(), + format: DateUtil.longFormatDs) : DateUtil.dateFormat(replyItem.ctime.toInt()), style: TextStyle( fontSize: theme.textTheme.labelSmall!.fontSize,