From 827c5e1981f54298c88c346d4c6f4f3658682c1e Mon Sep 17 00:00:00 2001 From: Vadim <44135514+vodemn@users.noreply.github.com> Date: Thu, 26 Jan 2023 23:04:22 +0300 Subject: [PATCH] rename --- .../{ev_source_bloc.dart => bloc_base_ev_source.dart} | 6 +++--- lib/screens/metering/ev_source/camera/bloc_camera.dart | 4 ++-- .../metering/ev_source/light_sensor/bloc_light_sensor.dart | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) rename lib/screens/metering/ev_source/{ev_source_bloc.dart => bloc_base_ev_source.dart} (85%) diff --git a/lib/screens/metering/ev_source/ev_source_bloc.dart b/lib/screens/metering/ev_source/bloc_base_ev_source.dart similarity index 85% rename from lib/screens/metering/ev_source/ev_source_bloc.dart rename to lib/screens/metering/ev_source/bloc_base_ev_source.dart index eac25d8..5d8f9c2 100644 --- a/lib/screens/metering/ev_source/ev_source_bloc.dart +++ b/lib/screens/metering/ev_source/bloc_base_ev_source.dart @@ -4,11 +4,11 @@ import 'package:lightmeter/screens/metering/communication/bloc_communication_met import 'package:lightmeter/screens/metering/communication/state_communication_metering.dart' as communication_states; -abstract class EvSourceBloc extends Bloc { +abstract class EvSourceBlocBase extends Bloc { final MeteringCommunicationBloc communicationBloc; late final StreamSubscription _communicationSubscription; - EvSourceBloc(this.communicationBloc, super.initialState) { + EvSourceBlocBase(this.communicationBloc, super.initialState) { _communicationSubscription = communicationBloc.stream .where((event) => event is communication_states.SourceState) .map((event) => event as communication_states.SourceState) @@ -18,7 +18,7 @@ abstract class EvSourceBloc extends Bloc { @override Future close() async { await _communicationSubscription.cancel(); - super.close(); + return super.close(); } void onCommunicationState(communication_states.SourceState communicationState); diff --git a/lib/screens/metering/ev_source/camera/bloc_camera.dart b/lib/screens/metering/ev_source/camera/bloc_camera.dart index 4bd4409..d8e016c 100644 --- a/lib/screens/metering/ev_source/camera/bloc_camera.dart +++ b/lib/screens/metering/ev_source/camera/bloc_camera.dart @@ -7,7 +7,7 @@ import 'package:exif/exif.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:lightmeter/interactors/metering_interactor.dart'; -import 'package:lightmeter/screens/metering/ev_source/ev_source_bloc.dart'; +import 'package:lightmeter/screens/metering/ev_source/bloc_base_ev_source.dart'; import 'package:lightmeter/screens/metering/communication/bloc_communication_metering.dart'; import 'package:lightmeter/screens/metering/communication/event_communication_metering.dart' as communication_event; @@ -18,7 +18,7 @@ import 'package:lightmeter/utils/log_2.dart'; import 'event_camera.dart'; import 'state_camera.dart'; -class CameraBloc extends EvSourceBloc { +class CameraBloc extends EvSourceBlocBase { final MeteringInteractor _meteringInteractor; late final _WidgetsBindingObserver _observer; CameraController? _cameraController; diff --git a/lib/screens/metering/ev_source/light_sensor/bloc_light_sensor.dart b/lib/screens/metering/ev_source/light_sensor/bloc_light_sensor.dart index 0592223..2ad4afa 100644 --- a/lib/screens/metering/ev_source/light_sensor/bloc_light_sensor.dart +++ b/lib/screens/metering/ev_source/light_sensor/bloc_light_sensor.dart @@ -1,6 +1,6 @@ import 'dart:async'; import 'package:lightmeter/interactors/metering_interactor.dart'; -import 'package:lightmeter/screens/metering/ev_source/ev_source_bloc.dart'; +import 'package:lightmeter/screens/metering/ev_source/bloc_base_ev_source.dart'; import 'package:lightmeter/screens/metering/communication/bloc_communication_metering.dart'; import 'package:lightmeter/screens/metering/communication/event_communication_metering.dart' as communication_event; @@ -11,7 +11,7 @@ import 'package:lightmeter/utils/log_2.dart'; import 'event_light_sensor.dart'; import 'state_light_sensor.dart'; -class LightSensorBloc extends EvSourceBloc { +class LightSensorBloc extends EvSourceBlocBase { final MeteringInteractor _meteringInteractor; StreamSubscription? _luxSubscriptions;