mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-11-26 20:44:54 +00:00
Hide unused widgets
This commit is contained in:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user