fix:增加下拉刷新

This commit is contained in:
liyi 2025-02-22 09:42:06 +08:00
parent 6d720e92a2
commit 344ca40ace

View File

@ -267,26 +267,31 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(16.w), borderRadius: BorderRadius.circular(16.w),
), ),
child: Obx( child: Obx(() => EasyRefreshTool(
() => state.lockLogItemList.isNotEmpty onRefresh: () async {
? Timeline.tileBuilder( logic.mockNetworkDataRequest(isRefresh: true);
builder: _timelineBuilderWidget(), },
theme: TimelineThemeData( onLoad: () async {
nodePosition: 0.04, // logic.mockNetworkDataRequest(isRefresh: false);
connectorTheme: const ConnectorThemeData( },
thickness: 1.0, child: state.lockLogItemList.isNotEmpty
color: AppColors.greyLineColor, ? Timeline.tileBuilder(
indent: 0.5, builder: _timelineBuilderWidget(),
theme: TimelineThemeData(
nodePosition: 0.04, //
connectorTheme: const ConnectorThemeData(
thickness: 1.0,
color: AppColors.greyLineColor,
indent: 0.5,
),
indicatorTheme: const IndicatorThemeData(
size: 8.0,
color: AppColors.greyLineColor,
position: 0.4,
),
), ),
indicatorTheme: const IndicatorThemeData( )
size: 8.0, : NoData())),
color: AppColors.greyLineColor,
position: 0.45,
),
),
)
: NoData(),
),
); );
} }
@ -347,6 +352,9 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
if (recordData.videoUrl != null && recordData.videoUrl!.isNotEmpty) { if (recordData.videoUrl != null && recordData.videoUrl!.isNotEmpty) {
final lockLogItemList = state.lockLogItemList.value; final lockLogItemList = state.lockLogItemList.value;
final list = lockLogItemList final list = lockLogItemList
.where((e) =>
(e.videoUrl != null && e.videoUrl!.isNotEmpty) ||
(e.imagesUrl != null && e.imagesUrl!.isNotEmpty))
.map( .map(
(e) => RecordListData( (e) => RecordListData(
videoUrl: e.videoUrl, videoUrl: e.videoUrl,