Hide unused widgets

This commit is contained in:
Abdullah Alassaf
2024-12-17 01:55:08 +03:00
parent 4490715b55
commit c362973c94
25 changed files with 378 additions and 428 deletions

View File

@ -6,21 +6,19 @@ import 'package:syncrow_web/pages/device_managment/power_clamp/bloc/smart_power_
import 'package:syncrow_web/pages/device_managment/power_clamp/bloc/smart_power_state.dart';
import 'package:syncrow_web/pages/device_managment/power_clamp/models/power_clamp_batch_model.dart';
import 'package:syncrow_web/pages/device_managment/shared/batch_control/factory_reset.dart';
import 'package:syncrow_web/pages/device_managment/shared/batch_control/firmware_update.dart';
// import 'package:syncrow_web/pages/device_managment/shared/batch_control/firmware_update.dart';
import 'package:syncrow_web/utils/helpers/responsice_layout_helper/responsive_layout_helper.dart';
class PowerClampBatchControlView extends StatelessWidget
with HelperResponsiveLayout {
class PowerClampBatchControlView extends StatelessWidget with HelperResponsiveLayout {
final List<String> deviceIds;
const PowerClampBatchControlView({Key? key, required this.deviceIds})
: super(key: key);
const PowerClampBatchControlView({Key? key, required this.deviceIds}) : super(key: key);
@override
Widget build(BuildContext context) {
return BlocProvider(
create: (context) => SmartPowerBloc(deviceId: deviceIds.first)
..add(SmartPowerFetchBatchEvent(deviceIds)),
create: (context) =>
SmartPowerBloc(deviceId: deviceIds.first)..add(SmartPowerFetchBatchEvent(deviceIds)),
child: BlocBuilder<SmartPowerBloc, SmartPowerState>(
builder: (context, state) {
if (state is SmartPowerLoading) {
@ -37,18 +35,17 @@ class PowerClampBatchControlView extends StatelessWidget
);
}
Widget _buildStatusControls(
BuildContext context, PowerClampBatchModel status) {
Widget _buildStatusControls(BuildContext context, PowerClampBatchModel status) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: 170,
// height: 140,
child: FirmwareUpdateWidget(deviceId: deviceIds.first, version: 2)),
const SizedBox(
width: 12,
),
// SizedBox(
// width: 170,
// // height: 140,
// child: FirmwareUpdateWidget(deviceId: deviceIds.first, version: 2)),
// const SizedBox(
// width: 12,
// ),
SizedBox(
width: 170,
height: 140,