push devices managment screen

This commit is contained in:
ashrafzarkanisala
2024-11-25 10:15:31 +03:00
parent 19694bec98
commit 8b76429714

View File

@ -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'));
// } }
// }, },
// ); );
// }), }),
), ),
); );
} }