基于自定义规则的番剧采集APP,支持流媒体在线观看,支持弹幕,支持实时超分辨率。
remain info_page summary on wide screen devices
ErBW_s547b38494fa0
diff --git a/lib/bean/card/bangumi_info_card.dart b/lib/bean/card/bangumi_info_card.dartindex 77e4f0b2..d9e0dfff 100644--- a/lib/bean/card/bangumi_info_card.dart+++ b/lib/bean/card/bangumi_info_card.dart@@ -16,7 +16,6 @@ class BangumiInfoCardV extends StatefulWidget {}class _BangumiInfoCardVState extends State<BangumiInfoCardV> {-@overrideWidget build(BuildContext context) {TextStyle style =@@ -55,10 +54,10 @@ class _BangumiInfoCardVState extends State<BangumiInfoCardV> {),),Positioned(- right: 5,- bottom: 5,- child: CollectButton(bangumiItem: widget.bangumiItem)- ),+ right: 5,+ bottom: 5,+ child:+ CollectButton(bangumiItem: widget.bangumiItem)),],);}),@@ -93,46 +92,31 @@ class _BangumiInfoCardVState extends State<BangumiInfoCardV> {),),Utils.isCompact() ? Container() : const SizedBox(height: 10),- Column(- crossAxisAlignment: CrossAxisAlignment.start,- children: [- FilledButton.tonal(- onPressed: () {},- style: OutlinedButton.styleFrom(- shape: RoundedRectangleBorder(- borderRadius: BorderRadius.circular(16),- ),- side: const BorderSide(- // width: 2,- ),- backgroundColor: Colors.transparent,- ),- child:- Text('#${widget.bangumiItem.rank}', style: style),- ),- Utils.isCompact()- ? Container()- : const SizedBox(height: 7),- FilledButton.tonal(- onPressed: () {},- style: OutlinedButton.styleFrom(- shape: RoundedRectangleBorder(- borderRadius: BorderRadius.circular(16),- ),- side: const BorderSide(- // width: 2,+ Expanded(+ child: Row(+ crossAxisAlignment: CrossAxisAlignment.start,+ children: [+ Column(+ crossAxisAlignment: CrossAxisAlignment.start,+ children: [+ FilledButton.tonal(+ onPressed: () {},+ style: OutlinedButton.styleFrom(+ shape: RoundedRectangleBorder(+ borderRadius: BorderRadius.circular(16),+ ),+ side: const BorderSide(+ // width: 2,+ ),+ backgroundColor: Colors.transparent,),- backgroundColor: Colors.transparent,- ),- child: Text(widget.bangumiItem.airDate,- style: style),- ),- Utils.isCompact()- ? Container()- : const SizedBox(height: 7),- Utils.isCompact()- ? Container()- : FilledButton.tonal(+ child: Text('#${widget.bangumiItem.rank}',+ style: style),+ ),+ Utils.isCompact()+ ? Container()+ : const SizedBox(height: 7),+ FilledButton.tonal(onPressed: () {},style: OutlinedButton.styleFrom(shape: RoundedRectangleBorder(@@ -143,11 +127,50 @@ class _BangumiInfoCardVState extends State<BangumiInfoCardV> {),backgroundColor: Colors.transparent,),- child: Text(- widget.bangumiItem.type == 2 ? '番剧' : '其他',+ child: Text(widget.bangumiItem.airDate,style: style),),- ],+ Utils.isCompact()+ ? Container()+ : const SizedBox(height: 7),+ Utils.isCompact()+ ? Container()+ : FilledButton.tonal(+ onPressed: () {},+ style: OutlinedButton.styleFrom(+ shape: RoundedRectangleBorder(+ borderRadius: BorderRadius.circular(16),+ ),+ side: const BorderSide(+ // width: 2,+ ),+ backgroundColor: Colors.transparent,+ ),+ child: Text(+ widget.bangumiItem.type == 2+ ? '番剧'+ : '其他',+ style: style),+ ),+ ],+ ),+ Utils.isCompact()+ ? Container()+ : const SizedBox(width: 10),+ // why there will overflow in the bottom?+ Utils.isCompact()+ ? Container()+ : Expanded(+ child: SingleChildScrollView(+ child: Text(+ widget.bangumiItem.summary,+ style: style,+ softWrap: true,+ ),+ ),+ ),+ ],+ ),),],),diff --git a/lib/pages/collect/collect_controller.dart b/lib/pages/collect/collect_controller.dartindex cd702f78..a1b1aa3f 100644--- a/lib/pages/collect/collect_controller.dart+++ b/lib/pages/collect/collect_controller.dart@@ -63,15 +63,15 @@ abstract class _CollectController with Store {}}- Future<void> updateLocalCollect(BangumiItem bangumiItem, {type = 1}) async {- try {- CollectedBangumi collectedBangumi = GStorage.collectibles.get(bangumiItem.id)!;+ Future<void> updateLocalCollect(BangumiItem bangumiItem) async {+ CollectedBangumi? collectedBangumi = GStorage.collectibles.get(bangumiItem.id);+ if (collectedBangumi == null) {+ return;+ } else {collectedBangumi.bangumiItem = bangumiItem;await GStorage.collectibles.put(bangumiItem.id, collectedBangumi);await GStorage.collectibles.flush();loadCollectibles();- } catch (e) {- KazumiLogger().log(Level.error, '更新 bangumi 失败 $e');}}