mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
push devices managment screen
This commit is contained in:
@ -88,32 +88,31 @@ class DeviceManagementPage extends StatelessWidget with HelperResponsiveLayout {
|
|||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
rightBody: const NavigateHomeGridView(),
|
rightBody: const NavigateHomeGridView(),
|
||||||
scaffoldBody: CreateNewRoutineView(),
|
scaffoldBody: BlocBuilder<SwitchTabsBloc, SwitchTabsState>(
|
||||||
// BlocBuilder<SwitchTabsBloc, SwitchTabsState>(
|
builder: (context, state) {
|
||||||
// builder: (context, state) {
|
if (state is SelectedTabState && state.selectedTab) {
|
||||||
// if (state is SelectedTabState && state.selectedTab) {
|
return const RoutinesView();
|
||||||
// return const RoutinesView();
|
}
|
||||||
// }
|
if (state is ShowCreateRoutineState && state.showCreateRoutine) {
|
||||||
// if (state is ShowCreateRoutineState && state.showCreateRoutine) {
|
return const CreateNewRoutineView();
|
||||||
// return const CreateNewRoutineView();
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
// return BlocBuilder<DeviceManagementBloc, DeviceManagementState>(
|
return BlocBuilder<DeviceManagementBloc, DeviceManagementState>(
|
||||||
// builder: (context, deviceState) {
|
builder: (context, deviceState) {
|
||||||
// if (deviceState is DeviceManagementLoading) {
|
if (deviceState is DeviceManagementLoading) {
|
||||||
// return const Center(child: CircularProgressIndicator());
|
return const Center(child: CircularProgressIndicator());
|
||||||
// } else if (deviceState is DeviceManagementLoaded ||
|
} else if (deviceState is DeviceManagementLoaded ||
|
||||||
// deviceState is DeviceManagementFiltered) {
|
deviceState is DeviceManagementFiltered) {
|
||||||
// final devices = (deviceState as dynamic).devices ??
|
final devices = (deviceState as dynamic).devices ??
|
||||||
// (deviceState as DeviceManagementFiltered).filteredDevices;
|
(deviceState as DeviceManagementFiltered).filteredDevices;
|
||||||
|
|
||||||
// return DeviceManagementBody(devices: devices);
|
return DeviceManagementBody(devices: devices);
|
||||||
// } else {
|
} else {
|
||||||
// return const Center(child: Text('Error fetching Devices'));
|
return const Center(child: Text('Error fetching Devices'));
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
// );
|
);
|
||||||
// }),
|
}),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user