mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-11-27 14:44:56 +00:00
formatted all files.
This commit is contained in:
@ -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(
|
||||
|
||||
@ -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),
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
@ -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,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user