formatted all files.

This commit is contained in:
Faris Armoush
2025-06-12 15:33:32 +03:00
parent 29959f567e
commit 04250ebc98
474 changed files with 5425 additions and 4338 deletions

View File

@ -16,10 +16,12 @@ class GateWayBloc extends Bloc<GateWayEvent, GateWayState> {
on<GateWayFactoryReset>(_onFactoryReset);
}
FutureOr<void> _getGatWayById(GatWayById event, Emitter<GateWayState> emit) async {
FutureOr<void> _getGatWayById(
GatWayById event, Emitter<GateWayState> emit) async {
emit(GatewayLoadingState());
try {
List<DeviceModel> devicesList = await DevicesManagementApi.getDevicesByGatewayId(event.getWayId);
final devicesList =
await DevicesManagementApi.getDevicesByGatewayId(event.getWayId);
emit(UpdateGatewayState(list: devicesList));
} catch (e) {
@ -28,7 +30,8 @@ class GateWayBloc extends Bloc<GateWayEvent, GateWayState> {
}
}
FutureOr<void> _onFactoryReset(GateWayFactoryReset event, Emitter<GateWayState> emit) async {
FutureOr<void> _onFactoryReset(
GateWayFactoryReset event, Emitter<GateWayState> emit) async {
emit(GatewayLoadingState());
try {
final response = await DevicesManagementApi().factoryReset(

View File

@ -6,7 +6,8 @@ import 'package:syncrow_web/pages/device_managment/shared/batch_control/factory_
// 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 GatewayBatchControlView extends StatelessWidget with HelperResponsiveLayout {
class GatewayBatchControlView extends StatelessWidget
with HelperResponsiveLayout {
const GatewayBatchControlView({super.key, required this.gatewayIds});
final List<String> gatewayIds;
@ -38,7 +39,8 @@ class GatewayBatchControlView extends StatelessWidget with HelperResponsiveLayou
context.read<GateWayBloc>().add(
GateWayFactoryReset(
deviceId: gatewayIds.first,
factoryReset: FactoryResetModel(devicesUuid: gatewayIds),
factoryReset:
FactoryResetModel(devicesUuid: gatewayIds),
),
);
},

View File

@ -37,21 +37,21 @@ class GateWayControlsView extends StatelessWidget with HelperResponsiveLayout {
mainAxisSize: MainAxisSize.min,
children: [
Text(
"Bluetooth Devices:",
'Bluetooth Devices:',
style: context.textTheme.bodyMedium!.copyWith(
color: ColorsManager.grayColor,
),
),
const SizedBox(height: 12),
Text(
"No devices found",
'No devices found',
style: context.textTheme.bodySmall!.copyWith(
color: ColorsManager.blackColor,
),
),
const SizedBox(height: 30),
Text(
"ZigBee Devices:",
'ZigBee Devices:',
style: context.textTheme.bodyMedium!.copyWith(
color: ColorsManager.grayColor,
),