From b0ed84489370ecaaaf7000d8c4e5fb0641e4e2e2 Mon Sep 17 00:00:00 2001 From: Faris Armoush Date: Sun, 1 Jun 2025 14:37:22 +0300 Subject: [PATCH] made events and state class `final`s, to better document that they shouldn't be extended. --- .../blocs/device_location/device_location_event.dart | 4 ++-- .../blocs/device_location/device_location_state.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pages/analytics/modules/air_quality/blocs/device_location/device_location_event.dart b/lib/pages/analytics/modules/air_quality/blocs/device_location/device_location_event.dart index 376d055b..37137e4a 100644 --- a/lib/pages/analytics/modules/air_quality/blocs/device_location/device_location_event.dart +++ b/lib/pages/analytics/modules/air_quality/blocs/device_location/device_location_event.dart @@ -7,7 +7,7 @@ sealed class DeviceLocationEvent extends Equatable { List get props => []; } -class LoadDeviceLocationEvent extends DeviceLocationEvent { +final class LoadDeviceLocationEvent extends DeviceLocationEvent { const LoadDeviceLocationEvent(this.param); final GetDeviceLocationDataParam param; @@ -16,6 +16,6 @@ class LoadDeviceLocationEvent extends DeviceLocationEvent { List get props => [param]; } -class ClearDeviceLocationEvent extends DeviceLocationEvent { +final class ClearDeviceLocationEvent extends DeviceLocationEvent { const ClearDeviceLocationEvent(); } diff --git a/lib/pages/analytics/modules/air_quality/blocs/device_location/device_location_state.dart b/lib/pages/analytics/modules/air_quality/blocs/device_location/device_location_state.dart index 15c681b6..8f66ad28 100644 --- a/lib/pages/analytics/modules/air_quality/blocs/device_location/device_location_state.dart +++ b/lib/pages/analytics/modules/air_quality/blocs/device_location/device_location_state.dart @@ -2,7 +2,7 @@ part of 'device_location_bloc.dart'; enum DeviceLocationStatus { initial, loading, success, failure } -class DeviceLocationState extends Equatable { +final class DeviceLocationState extends Equatable { const DeviceLocationState({ this.status = DeviceLocationStatus.initial, this.locationInfo,