更新消息设置
This commit is contained in:
@@ -188,10 +188,9 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
|
||||
final targetPosition = index * (itemHeight + spacing);
|
||||
|
||||
// 根据当前类型选择对应的ScrollController
|
||||
final currentScrollController =
|
||||
bodyDeviceController.model.type == 1
|
||||
? _myDeviceScrollController
|
||||
: _cloudDeviceScrollController;
|
||||
final currentScrollController = bodyDeviceController.model.type == 1
|
||||
? _myDeviceScrollController
|
||||
: _cloudDeviceScrollController;
|
||||
|
||||
if (currentScrollController.hasClients) {
|
||||
currentScrollController.animateTo(
|
||||
@@ -619,8 +618,11 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
|
||||
children: [
|
||||
// 我的e护页面
|
||||
Obx(() {
|
||||
final myDeviceList = bodyDeviceController.deviceList.value
|
||||
.where((device) => device['type'] == 1 || device['bind_type'] == 1)
|
||||
final myDeviceList = bodyDeviceController
|
||||
.deviceList.value
|
||||
.where((device) =>
|
||||
device['type'] == 1 ||
|
||||
device['bind_type'] == 1)
|
||||
.toList();
|
||||
return myDeviceList.isEmpty
|
||||
? NullDataWidget()
|
||||
@@ -643,8 +645,11 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
|
||||
}),
|
||||
// 云关爱页面
|
||||
Obx(() {
|
||||
final cloudDeviceList = bodyDeviceController.deviceList.value
|
||||
.where((device) => device['type'] == 2 || device['bind_type'] == 2)
|
||||
final cloudDeviceList = bodyDeviceController
|
||||
.deviceList.value
|
||||
.where((device) =>
|
||||
device['type'] == 2 ||
|
||||
device['bind_type'] == 2)
|
||||
.toList();
|
||||
return cloudDeviceList.isEmpty
|
||||
? NullDataWidget()
|
||||
@@ -652,7 +657,8 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
30.rpx, 26.rpx, 30.rpx, 0),
|
||||
child: SingleChildScrollView(
|
||||
controller: _cloudDeviceScrollController,
|
||||
controller:
|
||||
_cloudDeviceScrollController,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: cloudDeviceList
|
||||
@@ -724,4 +730,4 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user