2023-09-22 16:06:08 +08:00
|
|
|
|
2024-06-14 15:46:43 +08:00
|
|
|
import 'dart:async';
|
|
|
|
|
|
2023-09-22 16:06:08 +08:00
|
|
|
import 'package:star_lock/tools/baseGetXController.dart';
|
|
|
|
|
import '../../../../network/api_repository.dart';
|
2024-03-21 09:35:43 +08:00
|
|
|
import 'transferSmartLock_entity.dart';
|
2023-09-22 16:06:08 +08:00
|
|
|
import 'transferSmartLock_state.dart';
|
|
|
|
|
|
|
|
|
|
class TransferSmartLockLogic extends BaseGetXController{
|
|
|
|
|
TransferSmartLockState state = TransferSmartLockState();
|
|
|
|
|
|
|
|
|
|
// 获取锁列表
|
2024-03-21 09:35:43 +08:00
|
|
|
Future<TransferSmartLockEntity> getTransferLockListData() async{
|
2024-06-14 15:46:43 +08:00
|
|
|
final TransferSmartLockEntity entity = await ApiRepository.to.getTransferLockListData(searchStr: state.searchController.text);
|
2023-09-22 16:06:08 +08:00
|
|
|
if(entity.errorCode!.codeIsSuccessful){
|
|
|
|
|
state.transferSmartLockListData.value = entity.data!.list!;
|
|
|
|
|
}
|
2024-03-21 09:35:43 +08:00
|
|
|
return entity;
|
2023-09-22 16:06:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|