mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00
add all devices fetch
This commit is contained in:
@ -28,10 +28,19 @@ class _SceneControlDevicesViewState extends State<SceneControlDevicesView>
|
||||
@override
|
||||
void initState() {
|
||||
rooms = HomeCubit.getInstance().selectedSpace?.rooms;
|
||||
rooms?.insert(
|
||||
0,
|
||||
RoomModel(
|
||||
name: 'All Devices', devices: [], id: '-1', type: SpaceType.Room));
|
||||
if (rooms != null) {
|
||||
if (rooms![0].id != '-1') {
|
||||
rooms?.insert(
|
||||
0,
|
||||
RoomModel(
|
||||
name: 'All Devices',
|
||||
devices: [],
|
||||
id: '-1',
|
||||
type: SpaceType.Room,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
_tabController =
|
||||
TabController(length: rooms!.length, vsync: this, initialIndex: 0);
|
||||
|
Reference in New Issue
Block a user