fix:增加下拉刷新
This commit is contained in:
parent
6d720e92a2
commit
344ca40ace
@ -267,8 +267,14 @@ 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 {
|
||||||
|
logic.mockNetworkDataRequest(isRefresh: true);
|
||||||
|
},
|
||||||
|
onLoad: () async {
|
||||||
|
logic.mockNetworkDataRequest(isRefresh: false);
|
||||||
|
},
|
||||||
|
child: state.lockLogItemList.isNotEmpty
|
||||||
? Timeline.tileBuilder(
|
? Timeline.tileBuilder(
|
||||||
builder: _timelineBuilderWidget(),
|
builder: _timelineBuilderWidget(),
|
||||||
theme: TimelineThemeData(
|
theme: TimelineThemeData(
|
||||||
@ -281,12 +287,11 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
|
|||||||
indicatorTheme: const IndicatorThemeData(
|
indicatorTheme: const IndicatorThemeData(
|
||||||
size: 8.0,
|
size: 8.0,
|
||||||
color: AppColors.greyLineColor,
|
color: AppColors.greyLineColor,
|
||||||
position: 0.45,
|
position: 0.4,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: NoData(),
|
: 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,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user