fix: dynamic push & style
This commit is contained in:
@ -117,20 +117,23 @@ class DynamicsController extends GetxController {
|
||||
/// 点击评论action 直接查看评论
|
||||
if (action == 'comment') {
|
||||
Get.toNamed('/dynamicDetail',
|
||||
arguments: {'item': item, 'floor': floor, 'action': action});
|
||||
arguments: {'item': item, 'floor': floor, 'action': action},
|
||||
preventDuplicates: false);
|
||||
return false;
|
||||
}
|
||||
switch (item!.type) {
|
||||
/// 转发的动态
|
||||
case 'DYNAMIC_TYPE_FORWARD':
|
||||
Get.toNamed('/dynamicDetail',
|
||||
arguments: {'item': item, 'floor': floor});
|
||||
arguments: {'item': item, 'floor': floor},
|
||||
preventDuplicates: false);
|
||||
break;
|
||||
|
||||
/// 图文动态查看
|
||||
case 'DYNAMIC_TYPE_DRAW':
|
||||
Get.toNamed('/dynamicDetail',
|
||||
arguments: {'item': item, 'floor': floor});
|
||||
arguments: {'item': item, 'floor': floor},
|
||||
preventDuplicates: false);
|
||||
break;
|
||||
case 'DYNAMIC_TYPE_AV':
|
||||
String bvid = item.modules.moduleDynamic.major.archive.bvid;
|
||||
@ -188,7 +191,8 @@ class DynamicsController extends GetxController {
|
||||
case 'DYNAMIC_TYPE_WORD':
|
||||
print('纯文本');
|
||||
Get.toNamed('/dynamicDetail',
|
||||
arguments: {'item': item, 'floor': floor});
|
||||
arguments: {'item': item, 'floor': floor},
|
||||
preventDuplicates: false);
|
||||
break;
|
||||
case 'DYNAMIC_TYPE_LIVE_RCMD':
|
||||
DynamicLiveModel liveRcmd = item.modules.moduleDynamic.major.liveRcmd;
|
||||
|
@ -1,3 +1,5 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:easy_debounce/easy_throttle.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@ -61,6 +63,7 @@ class _OverlayPanelState extends State<OverlayPanel>
|
||||
|
||||
void onClickUp(data, i, {type = 'click'}) {
|
||||
if (type == 'click') {
|
||||
data.hasUpdate = false;
|
||||
pageController.jumpToPage(i);
|
||||
}
|
||||
}
|
||||
@ -81,11 +84,11 @@ class _OverlayPanelState extends State<OverlayPanel>
|
||||
color: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 50,
|
||||
child: TabBar(
|
||||
child: BackdropFilter(
|
||||
filter: ImageFilter.blur(sigmaX: 8.0, sigmaY: 8.0),
|
||||
child: Column(
|
||||
children: [
|
||||
TabBar(
|
||||
controller: _tabController,
|
||||
dividerColor: Colors.transparent,
|
||||
automaticIndicatorColorAdjustment: false,
|
||||
@ -106,25 +109,26 @@ class _OverlayPanelState extends State<OverlayPanel>
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: PageView.builder(
|
||||
itemCount: upList.length,
|
||||
controller: pageController,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return Container(
|
||||
clipBehavior: Clip.antiAlias,
|
||||
margin: const EdgeInsets.fromLTRB(10, 12, 10, 0),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: UpDyanmicsPage(upInfo: upList[index], ctr: widget.ctr),
|
||||
);
|
||||
},
|
||||
Expanded(
|
||||
child: PageView.builder(
|
||||
itemCount: upList.length,
|
||||
controller: pageController,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return Container(
|
||||
clipBehavior: Clip.antiAlias,
|
||||
margin: const EdgeInsets.fromLTRB(10, 12, 10, 0),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child:
|
||||
UpDyanmicsPage(upInfo: upList[index], ctr: widget.ctr),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@ -139,8 +143,8 @@ class _OverlayPanelState extends State<OverlayPanel>
|
||||
duration: const Duration(milliseconds: 200),
|
||||
scale: currentMid == data.mid ? 1 : 0.9,
|
||||
child: NetworkImgLayer(
|
||||
width: contentWidth,
|
||||
height: contentWidth,
|
||||
width: 46,
|
||||
height: 46,
|
||||
src: data.face,
|
||||
type: 'avatar',
|
||||
),
|
||||
|
@ -44,6 +44,7 @@ class _UpPanelState extends State<UpPanel> {
|
||||
|
||||
void onClickUp(data, i) {
|
||||
currentMid.value = data.mid;
|
||||
data.hasUpdate = false;
|
||||
Navigator.push(
|
||||
context,
|
||||
PlPopupRoute(
|
||||
|
Reference in New Issue
Block a user