diff --git a/.idea/modules.xml b/.idea/modules.xml
index 0b3ce545..deb74bef 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,15 +5,15 @@
+
+
-
-
diff --git a/apps/mobile_app/lib/navigation/app_router.dart b/apps/mobile_app/lib/navigation/app_router.dart
index f4e9ba72..79182af9 100644
--- a/apps/mobile_app/lib/navigation/app_router.dart
+++ b/apps/mobile_app/lib/navigation/app_router.dart
@@ -3,8 +3,8 @@ import 'package:activity/activity.dart';
import 'package:auth/auth.dart';
import 'package:customer_service/customer_service.dart';
import 'package:dashboard_shell/dashboard_builder.dart';
-import 'package:functions/functions.dart';
-import 'package:hub/hub.dart';
+import 'package:device_management/device_management.dart';
+import 'package:control_panel/control_panel.dart';
import 'package:legacy_dashboard_shell/legacy_dashboard_builder.dart';
import 'package:flutter/material.dart';
import 'package:get_it/get_it.dart';
@@ -39,74 +39,79 @@ void configureAppRouter() {
StatefulShellBranch(
routes: [
GoRoute(
- path: AppRoutes.dashboardHub,
- name: 'hub',
- pageBuilder: const HubBuilder().buildPage,
+ path: AppRoutes.controlPanel,
+ name: 'control_panel',
+ pageBuilder: const ControlPanelBuilder().buildPage,
+ routes: [
+ GoRoute(
+ path: 'customer_service',
+ name: 'customer_service',
+ pageBuilder: CustomerServiceBuilder().buildPage,
+ ),
+ GoRoute(
+ path: 'account_settings',
+ name: 'account_settings',
+ pageBuilder: AccountSettingsBuilder().buildPage,
+ routes: [
+ GoRoute(
+ path: 'personal_data',
+ name: 'personal_data',
+ pageBuilder: PersonalDataBuilder().buildPage,
+ ),
+ GoRoute(
+ path: 'change_password',
+ name: 'change_password',
+ pageBuilder: ChangePasswordBuilder().buildPage,
+ ),
+ GoRoute(
+ path: 'linked_devices',
+ name: 'linked_devices',
+ pageBuilder: LinkedDevicesBuilder().buildPage,
+ ),
+ GoRoute(
+ path: 'app_users',
+ name: 'app_users',
+ pageBuilder: AppUsersBuilder().buildPage,
+ ),
+ GoRoute(
+ path: 'delete_account',
+ name: 'delete_account',
+ pageBuilder: DeleteAccountBuilder().buildPage,
+ ),
+ ],
+ ),
+ ],
),
],
),
StatefulShellBranch(
routes: [
GoRoute(
- path: AppRoutes.dashboardFunctions,
- name: 'functions',
- pageBuilder: FunctionsBuilder().buildPage,
+ path: AppRoutes.deviceManagement,
+ name: 'device_management',
+ pageBuilder: DeviceManagementBuilder().buildPage,
+ routes: [
+ GoRoute(
+ path: 'contacts',
+ name: 'contacts',
+ pageBuilder: ContactsBuilder().buildPage,
+ ),
+ GoRoute(
+ path: 'remote_connection',
+ name: 'remote_connection',
+ pageBuilder: RemoteConnectionBuilder().buildPage,
+ ),
+ GoRoute(
+ path: 'locate_device',
+ name: 'locate_device',
+ pageBuilder: LocateDeviceBuilder().buildPage,
+ ),
+ ],
),
],
),
],
),
- GoRoute(
- path: AppRoutes.contacts,
- name: 'contacts',
- pageBuilder: ContactsBuilder().buildPage,
- ),
- GoRoute(
- path: AppRoutes.remoteConnection,
- name: 'remote_connection',
- pageBuilder: RemoteConnectionBuilder().buildPage,
- ),
- GoRoute(
- path: AppRoutes.locateDevice,
- name: 'locate_device',
- pageBuilder: LocateDeviceBuilder().buildPage,
- ),
- GoRoute(
- path: AppRoutes.accountSettings,
- name: 'account_settings',
- pageBuilder: AccountSettingsBuilder().buildPage,
- ),
- GoRoute(
- path: AppRoutes.personalData,
- name: 'personal_data',
- pageBuilder: PersonalDataBuilder().buildPage,
- ),
- GoRoute(
- path: AppRoutes.changePassword,
- name: 'change_password',
- pageBuilder: ChangePasswordBuilder().buildPage,
- ),
- GoRoute(
- path: AppRoutes.linkedDevices,
- name: 'linked_devices',
- pageBuilder: LinkedDevicesBuilder().buildPage,
- ),
- GoRoute(
- path: AppRoutes.appUsers,
- name: 'app_users',
- pageBuilder: AppUsersBuilder().buildPage,
- ),
- GoRoute(
- path: AppRoutes.deleteAccount,
- name: 'delete_account',
- pageBuilder: DeleteAccountBuilder().buildPage,
- ),
-
- GoRoute(
- path: AppRoutes.customerService,
- name: 'customer_service',
- pageBuilder: CustomerServiceBuilder().buildPage,
- ),
GoRoute(
path: AppRoutes.login,
name: 'login',
diff --git a/apps/mobile_app/pubspec.lock b/apps/mobile_app/pubspec.lock
index 7b12d1bb..8511bff6 100644
--- a/apps/mobile_app/pubspec.lock
+++ b/apps/mobile_app/pubspec.lock
@@ -206,6 +206,13 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.7.0"
+ control_panel:
+ dependency: "direct main"
+ description:
+ path: "../../modules/legacy/modules/control_panel"
+ relative: true
+ source: path
+ version: "1.0.0+1"
convert:
dependency: transitive
description:
@@ -307,6 +314,13 @@ packages:
relative: true
source: path
version: "0.0.1"
+ device_management:
+ dependency: "direct main"
+ description:
+ path: "../../modules/legacy/modules/device_management"
+ relative: true
+ source: path
+ version: "1.0.0+1"
diacritic:
dependency: transitive
description:
@@ -493,13 +507,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.0.0"
- functions:
- dependency: "direct main"
- description:
- path: "../../modules/legacy/modules/functions"
- relative: true
- source: path
- version: "1.0.0+1"
get_it:
dependency: "direct main"
description:
@@ -579,13 +586,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.1.2"
- hub:
- dependency: "direct main"
- description:
- path: "../../modules/legacy/modules/hub"
- relative: true
- source: path
- version: "1.0.0+1"
image:
dependency: transitive
description:
diff --git a/apps/mobile_app/pubspec.yaml b/apps/mobile_app/pubspec.yaml
index e682aac4..a97c1719 100644
--- a/apps/mobile_app/pubspec.yaml
+++ b/apps/mobile_app/pubspec.yaml
@@ -51,16 +51,16 @@ dependencies:
path: ../../modules/dashboard_shell
legacy_dashboard_shell:
path: ../../modules/legacy/modules/legacy_dashboard_shell
- hub:
- path: ../../modules/legacy/modules/hub
+ control_panel:
+ path: ../../modules/legacy/modules/control_panel
customer_service:
path: ../../modules/legacy/modules/customer_service
splash:
path: ../../modules/splash
account:
path: ../../modules/legacy/modules/account
- functions:
- path: ../../modules/legacy/modules/functions
+ device_management:
+ path: ../../modules/legacy/modules/device_management
#packages dependencies go here
navigation:
path: ../../packages/navigation
diff --git a/apps/mobile_app/pubspec_overrides.yaml b/apps/mobile_app/pubspec_overrides.yaml
index c9e7f957..caf849a2 100644
--- a/apps/mobile_app/pubspec_overrides.yaml
+++ b/apps/mobile_app/pubspec_overrides.yaml
@@ -1,4 +1,4 @@
-# melos_managed_dependency_overrides: account,activity,auth,customer_service,dashboard_shell,design_system,flutter_treezor_entrust_sdk_bridge,fonts,functions,home,hub,legacy_dashboard_shell,legacy_shared,navigation,notifications,payments,profile,sca_treezor,sf_infrastructure,sf_localizations,sf_shared,splash,utils
+# melos_managed_dependency_overrides: account,activity,auth,customer_service,dashboard_shell,design_system,flutter_treezor_entrust_sdk_bridge,fonts,home,legacy_dashboard_shell,legacy_shared,navigation,notifications,payments,profile,sca_treezor,sf_infrastructure,sf_localizations,sf_shared,splash,utils,control_panel,device_management
dependency_overrides:
account:
path: ../../modules/legacy/modules/account
@@ -6,22 +6,22 @@ dependency_overrides:
path: ../../modules/activity
auth:
path: ../../modules/auth
+ control_panel:
+ path: ../../modules/legacy/modules/control_panel
customer_service:
path: ../../modules/legacy/modules/customer_service
dashboard_shell:
path: ../../modules/dashboard_shell
design_system:
path: ../../packages/design_system
+ device_management:
+ path: ../../modules/legacy/modules/device_management
flutter_treezor_entrust_sdk_bridge:
path: ../../packages/flutter_treezor_entrust_sdk_bridge
fonts:
path: ../../packages/fonts
- functions:
- path: ../../modules/legacy/modules/functions
home:
path: ../../modules/home
- hub:
- path: ../../modules/legacy/modules/hub
legacy_dashboard_shell:
path: ../../modules/legacy/modules/legacy_dashboard_shell
legacy_shared:
diff --git a/modules/legacy/modules/account/lib/src/features/change_password/presentation/change_password_screen.dart b/modules/legacy/modules/account/lib/src/features/change_password/presentation/change_password_screen.dart
index 56b6c93a..f61c84c9 100644
--- a/modules/legacy/modules/account/lib/src/features/change_password/presentation/change_password_screen.dart
+++ b/modules/legacy/modules/account/lib/src/features/change_password/presentation/change_password_screen.dart
@@ -65,7 +65,7 @@ theme: theme,
onPressed: () async {
final bool res = await vm.changePassword();
if (res){
- Navigator.pop(context);
+ navigationContract.goBack();
}
},
text: context.translate('OK'),
diff --git a/modules/legacy/modules/hub/.gitignore b/modules/legacy/modules/control_panel/.gitignore
similarity index 100%
rename from modules/legacy/modules/hub/.gitignore
rename to modules/legacy/modules/control_panel/.gitignore
diff --git a/modules/legacy/modules/hub/.metadata b/modules/legacy/modules/control_panel/.metadata
similarity index 100%
rename from modules/legacy/modules/hub/.metadata
rename to modules/legacy/modules/control_panel/.metadata
diff --git a/modules/legacy/modules/hub/README.md b/modules/legacy/modules/control_panel/README.md
similarity index 100%
rename from modules/legacy/modules/hub/README.md
rename to modules/legacy/modules/control_panel/README.md
diff --git a/modules/legacy/modules/hub/analysis_options.yaml b/modules/legacy/modules/control_panel/analysis_options.yaml
similarity index 100%
rename from modules/legacy/modules/hub/analysis_options.yaml
rename to modules/legacy/modules/control_panel/analysis_options.yaml
diff --git a/modules/legacy/modules/control_panel/lib/control_panel.dart b/modules/legacy/modules/control_panel/lib/control_panel.dart
new file mode 100644
index 00000000..f25a06fe
--- /dev/null
+++ b/modules/legacy/modules/control_panel/lib/control_panel.dart
@@ -0,0 +1 @@
+export 'src/features/control_panel/control_panel_builder.dart';
\ No newline at end of file
diff --git a/modules/legacy/modules/hub/lib/src/core/data/datasource/hub_remote_datasource.dart b/modules/legacy/modules/control_panel/lib/src/core/data/datasource/control_panel_remote_datasource.dart
similarity index 58%
rename from modules/legacy/modules/hub/lib/src/core/data/datasource/hub_remote_datasource.dart
rename to modules/legacy/modules/control_panel/lib/src/core/data/datasource/control_panel_remote_datasource.dart
index 2f14ce30..bf947107 100644
--- a/modules/legacy/modules/hub/lib/src/core/data/datasource/hub_remote_datasource.dart
+++ b/modules/legacy/modules/control_panel/lib/src/core/data/datasource/control_panel_remote_datasource.dart
@@ -1,7 +1,7 @@
-import 'package:hub/src/features/hub/domain/entities/position_entity.dart';
+import 'package:control_panel/src/features/control_panel/domain/entities/position_entity.dart';
import 'package:legacy_shared/legacy_shared.dart';
-abstract class HomeRemoteDatasource {
+abstract class ControlPanelRemoteDatasource {
Future> getDevices({required String userId});
Future> getLatestPositions({required String deviceId});
diff --git a/modules/legacy/modules/hub/lib/src/core/data/datasource/hub_remote_datasource_impl.dart b/modules/legacy/modules/control_panel/lib/src/core/data/datasource/control_panel_remote_datasource_impl.dart
similarity index 91%
rename from modules/legacy/modules/hub/lib/src/core/data/datasource/hub_remote_datasource_impl.dart
rename to modules/legacy/modules/control_panel/lib/src/core/data/datasource/control_panel_remote_datasource_impl.dart
index 9b5fa376..1dfb9609 100644
--- a/modules/legacy/modules/hub/lib/src/core/data/datasource/hub_remote_datasource_impl.dart
+++ b/modules/legacy/modules/control_panel/lib/src/core/data/datasource/control_panel_remote_datasource_impl.dart
@@ -1,15 +1,15 @@
import 'dart:convert';
import 'package:dio/dio.dart';
-import 'package:hub/src/core/data/datasource/hub_remote_datasource.dart';
-import 'package:hub/src/core/data/models/get_devices_response_model.dart';
-import 'package:hub/src/core/data/models/latest_positions_response_model.dart';
-import 'package:hub/src/features/hub/domain/entities/position_entity.dart';
+import 'package:control_panel/src/core/data/datasource/control_panel_remote_datasource.dart';
+import 'package:control_panel/src/core/data/models/get_devices_response_model.dart';
+import 'package:control_panel/src/core/data/models/latest_positions_response_model.dart';
+import 'package:control_panel/src/features/control_panel/domain/entities/position_entity.dart';
import 'package:legacy_shared/legacy_shared.dart';
import 'package:sf_infrastructure/sf_infrastructure.dart';
-class HomeRemoteDatasourceImpl implements HomeRemoteDatasource {
- HomeRemoteDatasourceImpl(this._repository);
+class ControlPanelRemoteDatasourceImpl implements ControlPanelRemoteDatasource {
+ ControlPanelRemoteDatasourceImpl(this._repository);
final QuestiaRepository _repository;
diff --git a/modules/legacy/modules/hub/lib/src/core/data/models/get_devices_response_model.dart b/modules/legacy/modules/control_panel/lib/src/core/data/models/get_devices_response_model.dart
similarity index 100%
rename from modules/legacy/modules/hub/lib/src/core/data/models/get_devices_response_model.dart
rename to modules/legacy/modules/control_panel/lib/src/core/data/models/get_devices_response_model.dart
diff --git a/modules/legacy/modules/hub/lib/src/core/data/models/get_devices_response_model.freezed.dart b/modules/legacy/modules/control_panel/lib/src/core/data/models/get_devices_response_model.freezed.dart
similarity index 100%
rename from modules/legacy/modules/hub/lib/src/core/data/models/get_devices_response_model.freezed.dart
rename to modules/legacy/modules/control_panel/lib/src/core/data/models/get_devices_response_model.freezed.dart
diff --git a/modules/legacy/modules/hub/lib/src/core/data/models/get_devices_response_model.g.dart b/modules/legacy/modules/control_panel/lib/src/core/data/models/get_devices_response_model.g.dart
similarity index 100%
rename from modules/legacy/modules/hub/lib/src/core/data/models/get_devices_response_model.g.dart
rename to modules/legacy/modules/control_panel/lib/src/core/data/models/get_devices_response_model.g.dart
diff --git a/modules/legacy/modules/hub/lib/src/core/data/models/latest_positions_response_model.dart b/modules/legacy/modules/control_panel/lib/src/core/data/models/latest_positions_response_model.dart
similarity index 92%
rename from modules/legacy/modules/hub/lib/src/core/data/models/latest_positions_response_model.dart
rename to modules/legacy/modules/control_panel/lib/src/core/data/models/latest_positions_response_model.dart
index b3fac765..2b73e8ac 100644
--- a/modules/legacy/modules/hub/lib/src/core/data/models/latest_positions_response_model.dart
+++ b/modules/legacy/modules/control_panel/lib/src/core/data/models/latest_positions_response_model.dart
@@ -1,7 +1,7 @@
import 'package:freezed_annotation/freezed_annotation.dart';
-import 'package:hub/src/features/hub/domain/entities/address_entity.dart';
-import 'package:hub/src/features/hub/domain/entities/network_entity.dart';
-import 'package:hub/src/features/hub/domain/entities/position_entity.dart';
+import 'package:control_panel/src/features/control_panel/domain/entities/address_entity.dart';
+import 'package:control_panel/src/features/control_panel/domain/entities/network_entity.dart';
+import 'package:control_panel/src/features/control_panel/domain/entities/position_entity.dart';
part 'latest_positions_response_model.freezed.dart';
part 'latest_positions_response_model.g.dart';
diff --git a/modules/legacy/modules/hub/lib/src/core/data/models/latest_positions_response_model.freezed.dart b/modules/legacy/modules/control_panel/lib/src/core/data/models/latest_positions_response_model.freezed.dart
similarity index 100%
rename from modules/legacy/modules/hub/lib/src/core/data/models/latest_positions_response_model.freezed.dart
rename to modules/legacy/modules/control_panel/lib/src/core/data/models/latest_positions_response_model.freezed.dart
diff --git a/modules/legacy/modules/hub/lib/src/core/data/models/latest_positions_response_model.g.dart b/modules/legacy/modules/control_panel/lib/src/core/data/models/latest_positions_response_model.g.dart
similarity index 100%
rename from modules/legacy/modules/hub/lib/src/core/data/models/latest_positions_response_model.g.dart
rename to modules/legacy/modules/control_panel/lib/src/core/data/models/latest_positions_response_model.g.dart
diff --git a/modules/legacy/modules/control_panel/lib/src/core/data/repositories/control_panel_repository_impl.dart b/modules/legacy/modules/control_panel/lib/src/core/data/repositories/control_panel_repository_impl.dart
new file mode 100644
index 00000000..359e522e
--- /dev/null
+++ b/modules/legacy/modules/control_panel/lib/src/core/data/repositories/control_panel_repository_impl.dart
@@ -0,0 +1,20 @@
+import 'package:control_panel/src/core/data/datasource/control_panel_remote_datasource.dart';
+import 'package:control_panel/src/core/domain/repositories/control_panel_repository.dart';
+import 'package:control_panel/src/features/control_panel/domain/entities/position_entity.dart';
+import 'package:legacy_shared/legacy_shared.dart';
+
+class ControlPanelRepositoryImpl implements ControlPanelRepository {
+ const ControlPanelRepositoryImpl(this._remote);
+
+ final ControlPanelRemoteDatasource _remote;
+
+ @override
+ Future> getDevices({required String userId}) async {
+ return _remote.getDevices(userId: userId);
+ }
+
+ @override
+ Future> getLatestPositions({required String deviceId}) async {
+ return _remote.getLatestPositions(deviceId: deviceId);
+ }
+}
diff --git a/modules/legacy/modules/hub/lib/src/core/domain/repositories/hub_repository.dart b/modules/legacy/modules/control_panel/lib/src/core/domain/repositories/control_panel_repository.dart
similarity index 59%
rename from modules/legacy/modules/hub/lib/src/core/domain/repositories/hub_repository.dart
rename to modules/legacy/modules/control_panel/lib/src/core/domain/repositories/control_panel_repository.dart
index f0eff890..66a158d3 100644
--- a/modules/legacy/modules/hub/lib/src/core/domain/repositories/hub_repository.dart
+++ b/modules/legacy/modules/control_panel/lib/src/core/domain/repositories/control_panel_repository.dart
@@ -1,7 +1,7 @@
-import 'package:hub/src/features/hub/domain/entities/position_entity.dart';
+import 'package:control_panel/src/features/control_panel/domain/entities/position_entity.dart';
import 'package:legacy_shared/legacy_shared.dart';
-abstract class HomeRepository {
+abstract class ControlPanelRepository {
Future> getDevices({required String userId});
Future> getLatestPositions({required String deviceId});
diff --git a/modules/legacy/modules/control_panel/lib/src/core/providers/control_panel_remote_datasource_provider.dart b/modules/legacy/modules/control_panel/lib/src/core/providers/control_panel_remote_datasource_provider.dart
new file mode 100644
index 00000000..557b52bb
--- /dev/null
+++ b/modules/legacy/modules/control_panel/lib/src/core/providers/control_panel_remote_datasource_provider.dart
@@ -0,0 +1,9 @@
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:control_panel/src/core/data/datasource/control_panel_remote_datasource.dart';
+import 'package:control_panel/src/core/data/datasource/control_panel_remote_datasource_impl.dart';
+import 'package:sf_infrastructure/sf_infrastructure.dart';
+
+final controlPanelRemoteDatasourceProvider = Provider((ref) {
+ final questiaRepository = getIt();
+ return ControlPanelRemoteDatasourceImpl(questiaRepository);
+});
diff --git a/modules/legacy/modules/control_panel/lib/src/core/providers/control_panel_repository_provider.dart b/modules/legacy/modules/control_panel/lib/src/core/providers/control_panel_repository_provider.dart
new file mode 100644
index 00000000..6be3d8d7
--- /dev/null
+++ b/modules/legacy/modules/control_panel/lib/src/core/providers/control_panel_repository_provider.dart
@@ -0,0 +1,9 @@
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:control_panel/src/core/data/repositories/control_panel_repository_impl.dart';
+import 'package:control_panel/src/core/domain/repositories/control_panel_repository.dart';
+import 'package:control_panel/src/core/providers/control_panel_remote_datasource_provider.dart';
+
+final controlPanelRepositoryProvider = Provider((ref) {
+ final remote = ref.read(controlPanelRemoteDatasourceProvider);
+ return ControlPanelRepositoryImpl(remote);
+});
diff --git a/modules/legacy/modules/hub/lib/src/features/hub/hub_builder.dart b/modules/legacy/modules/control_panel/lib/src/features/control_panel/control_panel_builder.dart
similarity index 60%
rename from modules/legacy/modules/hub/lib/src/features/hub/hub_builder.dart
rename to modules/legacy/modules/control_panel/lib/src/features/control_panel/control_panel_builder.dart
index 9f154583..934bd4a0 100644
--- a/modules/legacy/modules/hub/lib/src/features/hub/hub_builder.dart
+++ b/modules/legacy/modules/control_panel/lib/src/features/control_panel/control_panel_builder.dart
@@ -1,18 +1,18 @@
-import 'package:hub/src/features/hub/presentation/hub_screen.dart';
+import 'package:control_panel/src/features/control_panel/presentation/control_panel_screen.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:get_it/get_it.dart';
import 'package:navigation/navigation.dart';
-class HubBuilder {
- const HubBuilder();
+class ControlPanelBuilder {
+ const ControlPanelBuilder();
Page buildPage(BuildContext context, GoRouterState state) {
final NavigationContract navigationContract = GetIt.I();
return MaterialPage(
key: state.pageKey,
- child: HubScreen(navigationContract: navigationContract, routerState: state),
+ child: ControlPanelScreen(navigationContract: navigationContract, routerState: state),
);
}
}
diff --git a/modules/legacy/modules/hub/lib/src/features/hub/domain/entities/address_entity.dart b/modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/entities/address_entity.dart
similarity index 100%
rename from modules/legacy/modules/hub/lib/src/features/hub/domain/entities/address_entity.dart
rename to modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/entities/address_entity.dart
diff --git a/modules/legacy/modules/hub/lib/src/features/hub/domain/entities/address_entity.freezed.dart b/modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/entities/address_entity.freezed.dart
similarity index 100%
rename from modules/legacy/modules/hub/lib/src/features/hub/domain/entities/address_entity.freezed.dart
rename to modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/entities/address_entity.freezed.dart
diff --git a/modules/legacy/modules/hub/lib/src/features/hub/domain/entities/get_devices_request_entity.dart b/modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/entities/get_devices_request_entity.dart
similarity index 100%
rename from modules/legacy/modules/hub/lib/src/features/hub/domain/entities/get_devices_request_entity.dart
rename to modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/entities/get_devices_request_entity.dart
diff --git a/modules/legacy/modules/hub/lib/src/features/hub/domain/entities/get_devices_request_entity.freezed.dart b/modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/entities/get_devices_request_entity.freezed.dart
similarity index 100%
rename from modules/legacy/modules/hub/lib/src/features/hub/domain/entities/get_devices_request_entity.freezed.dart
rename to modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/entities/get_devices_request_entity.freezed.dart
diff --git a/modules/legacy/modules/hub/lib/src/features/hub/domain/entities/network_entity.dart b/modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/entities/network_entity.dart
similarity index 100%
rename from modules/legacy/modules/hub/lib/src/features/hub/domain/entities/network_entity.dart
rename to modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/entities/network_entity.dart
diff --git a/modules/legacy/modules/hub/lib/src/features/hub/domain/entities/network_entity.freezed.dart b/modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/entities/network_entity.freezed.dart
similarity index 100%
rename from modules/legacy/modules/hub/lib/src/features/hub/domain/entities/network_entity.freezed.dart
rename to modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/entities/network_entity.freezed.dart
diff --git a/modules/legacy/modules/hub/lib/src/features/hub/domain/entities/position_entity.dart b/modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/entities/position_entity.dart
similarity index 79%
rename from modules/legacy/modules/hub/lib/src/features/hub/domain/entities/position_entity.dart
rename to modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/entities/position_entity.dart
index ffdab2a2..3d6e72d0 100644
--- a/modules/legacy/modules/hub/lib/src/features/hub/domain/entities/position_entity.dart
+++ b/modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/entities/position_entity.dart
@@ -1,6 +1,6 @@
import 'package:freezed_annotation/freezed_annotation.dart';
-import 'package:hub/src/features/hub/domain/entities/address_entity.dart';
-import 'package:hub/src/features/hub/domain/entities/network_entity.dart';
+import 'package:control_panel/src/features/control_panel/domain/entities/address_entity.dart';
+import 'package:control_panel/src/features/control_panel/domain/entities/network_entity.dart';
part 'position_entity.freezed.dart';
diff --git a/modules/legacy/modules/hub/lib/src/features/hub/domain/entities/position_entity.freezed.dart b/modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/entities/position_entity.freezed.dart
similarity index 100%
rename from modules/legacy/modules/hub/lib/src/features/hub/domain/entities/position_entity.freezed.dart
rename to modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/entities/position_entity.freezed.dart
diff --git a/modules/legacy/modules/hub/lib/src/features/hub/domain/get_devices_use_case.dart b/modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/get_devices_use_case.dart
similarity index 100%
rename from modules/legacy/modules/hub/lib/src/features/hub/domain/get_devices_use_case.dart
rename to modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/get_devices_use_case.dart
diff --git a/modules/legacy/modules/hub/lib/src/features/hub/domain/get_devices_use_case_impl.dart b/modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/get_devices_use_case_impl.dart
similarity index 56%
rename from modules/legacy/modules/hub/lib/src/features/hub/domain/get_devices_use_case_impl.dart
rename to modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/get_devices_use_case_impl.dart
index e7877039..b0cad8be 100644
--- a/modules/legacy/modules/hub/lib/src/features/hub/domain/get_devices_use_case_impl.dart
+++ b/modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/get_devices_use_case_impl.dart
@@ -1,11 +1,11 @@
-import 'package:hub/src/core/domain/repositories/hub_repository.dart';
-import 'package:hub/src/features/hub/domain/get_devices_use_case.dart';
+import 'package:control_panel/src/core/domain/repositories/control_panel_repository.dart';
+import 'package:control_panel/src/features/control_panel/domain/get_devices_use_case.dart';
import 'package:legacy_shared/legacy_shared.dart';
class GetDevicesUseCaseImpl implements GetDevicesUseCase {
GetDevicesUseCaseImpl(this._repository);
- final HomeRepository _repository;
+ final ControlPanelRepository _repository;
@override
Future> getDevices({required String userId}) async {
return _repository.getDevices(userId: userId);
diff --git a/modules/legacy/modules/hub/lib/src/features/hub/domain/get_latest_positions_use_case.dart b/modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/get_latest_positions_use_case.dart
similarity index 56%
rename from modules/legacy/modules/hub/lib/src/features/hub/domain/get_latest_positions_use_case.dart
rename to modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/get_latest_positions_use_case.dart
index cabea1e3..ed31d6ed 100644
--- a/modules/legacy/modules/hub/lib/src/features/hub/domain/get_latest_positions_use_case.dart
+++ b/modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/get_latest_positions_use_case.dart
@@ -1,4 +1,4 @@
-import 'package:hub/src/features/hub/domain/entities/position_entity.dart';
+import 'package:control_panel/src/features/control_panel/domain/entities/position_entity.dart';
abstract class GetLatestPositionsUseCase {
Future> getLatestPositions({required String deviceId});
diff --git a/modules/legacy/modules/hub/lib/src/features/hub/domain/get_latest_positions_use_case_impl.dart b/modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/get_latest_positions_use_case_impl.dart
similarity index 52%
rename from modules/legacy/modules/hub/lib/src/features/hub/domain/get_latest_positions_use_case_impl.dart
rename to modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/get_latest_positions_use_case_impl.dart
index 5fc5ea3a..9ec47d08 100644
--- a/modules/legacy/modules/hub/lib/src/features/hub/domain/get_latest_positions_use_case_impl.dart
+++ b/modules/legacy/modules/control_panel/lib/src/features/control_panel/domain/get_latest_positions_use_case_impl.dart
@@ -1,11 +1,11 @@
-import 'package:hub/src/core/domain/repositories/hub_repository.dart';
-import 'package:hub/src/features/hub/domain/entities/position_entity.dart';
-import 'package:hub/src/features/hub/domain/get_latest_positions_use_case.dart';
+import 'package:control_panel/src/core/domain/repositories/control_panel_repository.dart';
+import 'package:control_panel/src/features/control_panel/domain/entities/position_entity.dart';
+import 'package:control_panel/src/features/control_panel/domain/get_latest_positions_use_case.dart';
class GetLatestPositionsUseCaseImpl implements GetLatestPositionsUseCase {
GetLatestPositionsUseCaseImpl(this._repository);
- final HomeRepository _repository;
+ final ControlPanelRepository _repository;
@override
Future> getLatestPositions({required String deviceId}) async {
await Future.delayed(const Duration(milliseconds: 2000));
diff --git a/modules/legacy/modules/hub/lib/src/features/hub/presentation/hub_screen.dart b/modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/control_panel_screen.dart
similarity index 95%
rename from modules/legacy/modules/hub/lib/src/features/hub/presentation/hub_screen.dart
rename to modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/control_panel_screen.dart
index d9977408..972c318b 100644
--- a/modules/legacy/modules/hub/lib/src/features/hub/presentation/hub_screen.dart
+++ b/modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/control_panel_screen.dart
@@ -1,6 +1,6 @@
import 'package:flutter_svg/svg.dart';
import 'package:go_router/go_router.dart';
-import 'package:hub/src/features/hub/presentation/state/hub_view_model.dart';
+import 'package:control_panel/src/features/control_panel/presentation/state/control_panel_view_model.dart';
import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
@@ -11,11 +11,11 @@ import 'package:navigation/navigation.dart';
import 'package:sf_localizations/sf_localizations.dart';
import 'package:utils/utils.dart';
-class HubScreen extends ConsumerWidget {
+class ControlPanelScreen extends ConsumerWidget {
final NavigationContract navigationContract;
final GoRouterState routerState;
- const HubScreen({
+ const ControlPanelScreen({
super.key,
required this.navigationContract,
required this.routerState,
@@ -65,8 +65,8 @@ class _Header extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
- final state = ref.watch(hubViewModelProvider);
- final vm = ref.read(hubViewModelProvider.notifier);
+ final state = ref.watch(controlPanelViewModelProvider);
+ final vm = ref.read(controlPanelViewModelProvider.notifier);
return Stack(
children: [
@@ -143,7 +143,7 @@ class _MenuSection extends ConsumerWidget {
SizedBox(height: SizeUtils.getByScreen(small: 8, big: 7)),
_SectionButton(
onPressed: () {
- navigationContract.pushTo(AppRoutes.dashboardFunctions);
+ navigationContract.pushTo(AppRoutes.deviceManagement);
},
icon: SFIcons.functions,
text: I18n.functions,
@@ -235,8 +235,8 @@ class _Minimap extends ConsumerWidget {
Widget build(BuildContext context, WidgetRef ref) {
final theme = ref.watch(themePortProvider);
- final viewState = ref.watch(hubViewModelProvider);
- final viewModel = ref.read(hubViewModelProvider.notifier);
+ final viewState = ref.watch(controlPanelViewModelProvider);
+ final viewModel = ref.read(controlPanelViewModelProvider.notifier);
return FlutterMap(
mapController: viewModel.mapController,
@@ -295,7 +295,7 @@ class _LocationBanner extends ConsumerWidget {
Widget build(BuildContext context, WidgetRef ref) {
final theme = ref.read(themePortProvider);
- final viewState = ref.watch(hubViewModelProvider);
+ final viewState = ref.watch(controlPanelViewModelProvider);
final battery = viewState.selectedPosition?.ncell ?? 0;
final IconData batteryIcon = toBatteryIcon(battery);
diff --git a/modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/providers/get_devices_use_case_provider.dart b/modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/providers/get_devices_use_case_provider.dart
new file mode 100644
index 00000000..2b7048db
--- /dev/null
+++ b/modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/providers/get_devices_use_case_provider.dart
@@ -0,0 +1,10 @@
+import 'package:control_panel/src/core/providers/control_panel_repository_provider.dart';
+import 'package:control_panel/src/features/control_panel/domain/get_devices_use_case.dart';
+import 'package:control_panel/src/features/control_panel/domain/get_devices_use_case_impl.dart';
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+
+final getDevicesUseCaseProvider =
+Provider.autoDispose((ref) {
+ final authRepository = ref.read(controlPanelRepositoryProvider);
+ return GetDevicesUseCaseImpl(authRepository);
+});
diff --git a/modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/providers/get_latest_positions_use_case_provider.dart b/modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/providers/get_latest_positions_use_case_provider.dart
new file mode 100644
index 00000000..57e802a0
--- /dev/null
+++ b/modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/providers/get_latest_positions_use_case_provider.dart
@@ -0,0 +1,10 @@
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:control_panel/src/core/providers/control_panel_repository_provider.dart';
+import 'package:control_panel/src/features/control_panel/domain/get_latest_positions_use_case.dart';
+import 'package:control_panel/src/features/control_panel/domain/get_latest_positions_use_case_impl.dart';
+
+final getLatestPositionsUseCaseProvider =
+Provider.autoDispose((ref) {
+ final authRepository = ref.read(controlPanelRepositoryProvider);
+ return GetLatestPositionsUseCaseImpl(authRepository);
+});
diff --git a/modules/legacy/modules/hub/lib/src/features/hub/presentation/state/hub_view_model.dart b/modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/state/control_panel_view_model.dart
similarity index 71%
rename from modules/legacy/modules/hub/lib/src/features/hub/presentation/state/hub_view_model.dart
rename to modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/state/control_panel_view_model.dart
index e25e8be4..e3bdada8 100644
--- a/modules/legacy/modules/hub/lib/src/features/hub/presentation/state/hub_view_model.dart
+++ b/modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/state/control_panel_view_model.dart
@@ -1,22 +1,22 @@
import 'dart:async';
import 'package:flutter_map/flutter_map.dart';
-import 'package:hub/src/features/hub/domain/entities/position_entity.dart';
-import 'package:hub/src/features/hub/domain/get_devices_use_case.dart';
-import 'package:hub/src/features/hub/domain/get_latest_positions_use_case.dart';
-import 'package:hub/src/features/hub/presentation/providers/get_devices_use_case_provider.dart';
-import 'package:hub/src/features/hub/presentation/providers/get_latest_positions_use_case_provider.dart';
-import 'package:hub/src/features/hub/presentation/state/hub_view_state.dart';
+import 'package:control_panel/src/features/control_panel/domain/entities/position_entity.dart';
+import 'package:control_panel/src/features/control_panel/domain/get_devices_use_case.dart';
+import 'package:control_panel/src/features/control_panel/domain/get_latest_positions_use_case.dart';
+import 'package:control_panel/src/features/control_panel/presentation/providers/get_devices_use_case_provider.dart';
+import 'package:control_panel/src/features/control_panel/presentation/providers/get_latest_positions_use_case_provider.dart';
+import 'package:control_panel/src/features/control_panel/presentation/state/control_panel_view_state.dart';
import 'package:legacy_shared/legacy_shared.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:latlong2/latlong.dart';
-final hubViewModelProvider =
-NotifierProvider.autoDispose(
- HubViewModel.new,
+final controlPanelViewModelProvider =
+NotifierProvider.autoDispose(
+ ControlPanelViewModel.new,
);
-class HubViewModel extends Notifier {
+class ControlPanelViewModel extends Notifier {
late final GetDevicesUseCase _getDevicesUseCase;
late final GetLatestPositionsUseCase _getLatestPositionsUseCase;
@@ -25,7 +25,7 @@ class HubViewModel extends Notifier {
late final MapController mapController;
@override
- HubViewState build() {
+ ControlPanelViewState build() {
_getDevicesUseCase = ref.read(getDevicesUseCaseProvider);
_getLatestPositionsUseCase = ref.read(getLatestPositionsUseCaseProvider);
@@ -57,7 +57,7 @@ class HubViewModel extends Notifier {
ref.onDispose(disposeControllers);
- return HubViewState();
+ return ControlPanelViewState();
}
void setPositions(List> positions) {
diff --git a/modules/legacy/modules/hub/lib/src/features/hub/presentation/state/hub_view_state.dart b/modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/state/control_panel_view_state.dart
similarity index 53%
rename from modules/legacy/modules/hub/lib/src/features/hub/presentation/state/hub_view_state.dart
rename to modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/state/control_panel_view_state.dart
index 02abd604..e511e5b2 100644
--- a/modules/legacy/modules/hub/lib/src/features/hub/presentation/state/hub_view_state.dart
+++ b/modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/state/control_panel_view_state.dart
@@ -1,16 +1,16 @@
-import 'package:hub/src/features/hub/domain/entities/position_entity.dart';
+import 'package:control_panel/src/features/control_panel/domain/entities/position_entity.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:legacy_shared/legacy_shared.dart';
-part 'hub_view_state.freezed.dart';
+part 'control_panel_view_state.freezed.dart';
@freezed
-abstract class HubViewState with _$HubViewState {
- const factory HubViewState({
+abstract class ControlPanelViewState with _$ControlPanelViewState {
+ const factory ControlPanelViewState({
UserEntity? loggedUser,
@Default([]) List devices,
DeviceEntity? selectedDevice,
@Default([]) List positions,
PositionEntity? selectedPosition
- }) = _HubViewState;
+ }) = _ControlPanelViewState;
}
diff --git a/modules/legacy/modules/hub/lib/src/features/hub/presentation/state/hub_view_state.freezed.dart b/modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/state/control_panel_view_state.freezed.dart
similarity index 72%
rename from modules/legacy/modules/hub/lib/src/features/hub/presentation/state/hub_view_state.freezed.dart
rename to modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/state/control_panel_view_state.freezed.dart
index 578f4431..40acd0a9 100644
--- a/modules/legacy/modules/hub/lib/src/features/hub/presentation/state/hub_view_state.freezed.dart
+++ b/modules/legacy/modules/control_panel/lib/src/features/control_panel/presentation/state/control_panel_view_state.freezed.dart
@@ -3,7 +3,7 @@
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
-part of 'hub_view_state.dart';
+part of 'control_panel_view_state.dart';
// **************************************************************************
// FreezedGenerator
@@ -12,20 +12,20 @@ part of 'hub_view_state.dart';
// dart format off
T _$identity(T value) => value;
/// @nodoc
-mixin _$HubViewState {
+mixin _$ControlPanelViewState {
UserEntity? get loggedUser; List get devices; DeviceEntity? get selectedDevice; List get positions; PositionEntity? get selectedPosition;
-/// Create a copy of HubViewState
+/// Create a copy of ControlPanelViewState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
-$HubViewStateCopyWith get copyWith => _$HubViewStateCopyWithImpl(this as HubViewState, _$identity);
+$ControlPanelViewStateCopyWith get copyWith => _$ControlPanelViewStateCopyWithImpl(this as ControlPanelViewState, _$identity);
@override
bool operator ==(Object other) {
- return identical(this, other) || (other.runtimeType == runtimeType&&other is HubViewState&&(identical(other.loggedUser, loggedUser) || other.loggedUser == loggedUser)&&const DeepCollectionEquality().equals(other.devices, devices)&&(identical(other.selectedDevice, selectedDevice) || other.selectedDevice == selectedDevice)&&const DeepCollectionEquality().equals(other.positions, positions)&&(identical(other.selectedPosition, selectedPosition) || other.selectedPosition == selectedPosition));
+ return identical(this, other) || (other.runtimeType == runtimeType&&other is ControlPanelViewState&&(identical(other.loggedUser, loggedUser) || other.loggedUser == loggedUser)&&const DeepCollectionEquality().equals(other.devices, devices)&&(identical(other.selectedDevice, selectedDevice) || other.selectedDevice == selectedDevice)&&const DeepCollectionEquality().equals(other.positions, positions)&&(identical(other.selectedPosition, selectedPosition) || other.selectedPosition == selectedPosition));
}
@@ -34,15 +34,15 @@ int get hashCode => Object.hash(runtimeType,loggedUser,const DeepCollectionEqual
@override
String toString() {
- return 'HubViewState(loggedUser: $loggedUser, devices: $devices, selectedDevice: $selectedDevice, positions: $positions, selectedPosition: $selectedPosition)';
+ return 'ControlPanelViewState(loggedUser: $loggedUser, devices: $devices, selectedDevice: $selectedDevice, positions: $positions, selectedPosition: $selectedPosition)';
}
}
/// @nodoc
-abstract mixin class $HubViewStateCopyWith<$Res> {
- factory $HubViewStateCopyWith(HubViewState value, $Res Function(HubViewState) _then) = _$HubViewStateCopyWithImpl;
+abstract mixin class $ControlPanelViewStateCopyWith<$Res> {
+ factory $ControlPanelViewStateCopyWith(ControlPanelViewState value, $Res Function(ControlPanelViewState) _then) = _$ControlPanelViewStateCopyWithImpl;
@useResult
$Res call({
UserEntity? loggedUser, List devices, DeviceEntity? selectedDevice, List positions, PositionEntity? selectedPosition
@@ -53,14 +53,14 @@ $UserEntityCopyWith<$Res>? get loggedUser;$DeviceEntityCopyWith<$Res>? get selec
}
/// @nodoc
-class _$HubViewStateCopyWithImpl<$Res>
- implements $HubViewStateCopyWith<$Res> {
- _$HubViewStateCopyWithImpl(this._self, this._then);
+class _$ControlPanelViewStateCopyWithImpl<$Res>
+ implements $ControlPanelViewStateCopyWith<$Res> {
+ _$ControlPanelViewStateCopyWithImpl(this._self, this._then);
- final HubViewState _self;
- final $Res Function(HubViewState) _then;
+ final ControlPanelViewState _self;
+ final $Res Function(ControlPanelViewState) _then;
-/// Create a copy of HubViewState
+/// Create a copy of ControlPanelViewState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? loggedUser = freezed,Object? devices = null,Object? selectedDevice = freezed,Object? positions = null,Object? selectedPosition = freezed,}) {
return _then(_self.copyWith(
@@ -72,7 +72,7 @@ as List,selectedPosition: freezed == selectedPosition ? _self.se
as PositionEntity?,
));
}
-/// Create a copy of HubViewState
+/// Create a copy of ControlPanelViewState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
@@ -84,7 +84,7 @@ $UserEntityCopyWith<$Res>? get loggedUser {
return $UserEntityCopyWith<$Res>(_self.loggedUser!, (value) {
return _then(_self.copyWith(loggedUser: value));
});
-}/// Create a copy of HubViewState
+}/// Create a copy of ControlPanelViewState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
@@ -96,7 +96,7 @@ $DeviceEntityCopyWith<$Res>? get selectedDevice {
return $DeviceEntityCopyWith<$Res>(_self.selectedDevice!, (value) {
return _then(_self.copyWith(selectedDevice: value));
});
-}/// Create a copy of HubViewState
+}/// Create a copy of ControlPanelViewState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
@@ -112,8 +112,8 @@ $PositionEntityCopyWith<$Res>? get selectedPosition {
}
-/// Adds pattern-matching-related methods to [HubViewState].
-extension HubViewStatePatterns on HubViewState {
+/// Adds pattern-matching-related methods to [ControlPanelViewState].
+extension ControlPanelViewStatePatterns on ControlPanelViewState {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
@@ -126,10 +126,10 @@ extension HubViewStatePatterns on HubViewState {
/// }
/// ```
-@optionalTypeArgs TResult maybeMap(TResult Function( _HubViewState value)? $default,{required TResult orElse(),}){
+@optionalTypeArgs TResult maybeMap(TResult Function( _ControlPanelViewState value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
-case _HubViewState() when $default != null:
+case _ControlPanelViewState() when $default != null:
return $default(_that);case _:
return orElse();
@@ -148,10 +148,10 @@ return $default(_that);case _:
/// }
/// ```
-@optionalTypeArgs TResult map(TResult Function( _HubViewState value) $default,){
+@optionalTypeArgs TResult map(TResult Function( _ControlPanelViewState value) $default,){
final _that = this;
switch (_that) {
-case _HubViewState():
+case _ControlPanelViewState():
return $default(_that);case _:
throw StateError('Unexpected subclass');
@@ -169,10 +169,10 @@ return $default(_that);case _:
/// }
/// ```
-@optionalTypeArgs TResult? mapOrNull(TResult? Function( _HubViewState value)? $default,){
+@optionalTypeArgs TResult? mapOrNull(TResult? Function( _ControlPanelViewState value)? $default,){
final _that = this;
switch (_that) {
-case _HubViewState() when $default != null:
+case _ControlPanelViewState() when $default != null:
return $default(_that);case _:
return null;
@@ -192,7 +192,7 @@ return $default(_that);case _:
@optionalTypeArgs TResult maybeWhen(TResult Function( UserEntity? loggedUser, List devices, DeviceEntity? selectedDevice, List positions, PositionEntity? selectedPosition)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
-case _HubViewState() when $default != null:
+case _ControlPanelViewState() when $default != null:
return $default(_that.loggedUser,_that.devices,_that.selectedDevice,_that.positions,_that.selectedPosition);case _:
return orElse();
@@ -213,7 +213,7 @@ return $default(_that.loggedUser,_that.devices,_that.selectedDevice,_that.positi
@optionalTypeArgs TResult when(TResult Function( UserEntity? loggedUser, List devices, DeviceEntity? selectedDevice, List positions, PositionEntity? selectedPosition) $default,) {final _that = this;
switch (_that) {
-case _HubViewState():
+case _ControlPanelViewState():
return $default(_that.loggedUser,_that.devices,_that.selectedDevice,_that.positions,_that.selectedPosition);case _:
throw StateError('Unexpected subclass');
@@ -233,7 +233,7 @@ return $default(_that.loggedUser,_that.devices,_that.selectedDevice,_that.positi
@optionalTypeArgs TResult? whenOrNull(TResult? Function( UserEntity? loggedUser, List devices, DeviceEntity? selectedDevice, List positions, PositionEntity? selectedPosition)? $default,) {final _that = this;
switch (_that) {
-case _HubViewState() when $default != null:
+case _ControlPanelViewState() when $default != null:
return $default(_that.loggedUser,_that.devices,_that.selectedDevice,_that.positions,_that.selectedPosition);case _:
return null;
@@ -245,8 +245,8 @@ return $default(_that.loggedUser,_that.devices,_that.selectedDevice,_that.positi
/// @nodoc
-class _HubViewState implements HubViewState {
- const _HubViewState({this.loggedUser, final List devices = const [], this.selectedDevice, final List positions = const [], this.selectedPosition}): _devices = devices,_positions = positions;
+class _ControlPanelViewState implements ControlPanelViewState {
+ const _ControlPanelViewState({this.loggedUser, final List devices = const [], this.selectedDevice, final List positions = const [], this.selectedPosition}): _devices = devices,_positions = positions;
@override final UserEntity? loggedUser;
@@ -267,17 +267,17 @@ class _HubViewState implements HubViewState {
@override final PositionEntity? selectedPosition;
-/// Create a copy of HubViewState
+/// Create a copy of ControlPanelViewState
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
-_$HubViewStateCopyWith<_HubViewState> get copyWith => __$HubViewStateCopyWithImpl<_HubViewState>(this, _$identity);
+_$ControlPanelViewStateCopyWith<_ControlPanelViewState> get copyWith => __$ControlPanelViewStateCopyWithImpl<_ControlPanelViewState>(this, _$identity);
@override
bool operator ==(Object other) {
- return identical(this, other) || (other.runtimeType == runtimeType&&other is _HubViewState&&(identical(other.loggedUser, loggedUser) || other.loggedUser == loggedUser)&&const DeepCollectionEquality().equals(other._devices, _devices)&&(identical(other.selectedDevice, selectedDevice) || other.selectedDevice == selectedDevice)&&const DeepCollectionEquality().equals(other._positions, _positions)&&(identical(other.selectedPosition, selectedPosition) || other.selectedPosition == selectedPosition));
+ return identical(this, other) || (other.runtimeType == runtimeType&&other is _ControlPanelViewState&&(identical(other.loggedUser, loggedUser) || other.loggedUser == loggedUser)&&const DeepCollectionEquality().equals(other._devices, _devices)&&(identical(other.selectedDevice, selectedDevice) || other.selectedDevice == selectedDevice)&&const DeepCollectionEquality().equals(other._positions, _positions)&&(identical(other.selectedPosition, selectedPosition) || other.selectedPosition == selectedPosition));
}
@@ -286,15 +286,15 @@ int get hashCode => Object.hash(runtimeType,loggedUser,const DeepCollectionEqual
@override
String toString() {
- return 'HubViewState(loggedUser: $loggedUser, devices: $devices, selectedDevice: $selectedDevice, positions: $positions, selectedPosition: $selectedPosition)';
+ return 'ControlPanelViewState(loggedUser: $loggedUser, devices: $devices, selectedDevice: $selectedDevice, positions: $positions, selectedPosition: $selectedPosition)';
}
}
/// @nodoc
-abstract mixin class _$HubViewStateCopyWith<$Res> implements $HubViewStateCopyWith<$Res> {
- factory _$HubViewStateCopyWith(_HubViewState value, $Res Function(_HubViewState) _then) = __$HubViewStateCopyWithImpl;
+abstract mixin class _$ControlPanelViewStateCopyWith<$Res> implements $ControlPanelViewStateCopyWith<$Res> {
+ factory _$ControlPanelViewStateCopyWith(_ControlPanelViewState value, $Res Function(_ControlPanelViewState) _then) = __$ControlPanelViewStateCopyWithImpl;
@override @useResult
$Res call({
UserEntity? loggedUser, List devices, DeviceEntity? selectedDevice, List positions, PositionEntity? selectedPosition
@@ -305,17 +305,17 @@ $Res call({
}
/// @nodoc
-class __$HubViewStateCopyWithImpl<$Res>
- implements _$HubViewStateCopyWith<$Res> {
- __$HubViewStateCopyWithImpl(this._self, this._then);
+class __$ControlPanelViewStateCopyWithImpl<$Res>
+ implements _$ControlPanelViewStateCopyWith<$Res> {
+ __$ControlPanelViewStateCopyWithImpl(this._self, this._then);
- final _HubViewState _self;
- final $Res Function(_HubViewState) _then;
+ final _ControlPanelViewState _self;
+ final $Res Function(_ControlPanelViewState) _then;
-/// Create a copy of HubViewState
+/// Create a copy of ControlPanelViewState
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? loggedUser = freezed,Object? devices = null,Object? selectedDevice = freezed,Object? positions = null,Object? selectedPosition = freezed,}) {
- return _then(_HubViewState(
+ return _then(_ControlPanelViewState(
loggedUser: freezed == loggedUser ? _self.loggedUser : loggedUser // ignore: cast_nullable_to_non_nullable
as UserEntity?,devices: null == devices ? _self._devices : devices // ignore: cast_nullable_to_non_nullable
as List,selectedDevice: freezed == selectedDevice ? _self.selectedDevice : selectedDevice // ignore: cast_nullable_to_non_nullable
@@ -325,7 +325,7 @@ as PositionEntity?,
));
}
-/// Create a copy of HubViewState
+/// Create a copy of ControlPanelViewState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
@@ -337,7 +337,7 @@ $UserEntityCopyWith<$Res>? get loggedUser {
return $UserEntityCopyWith<$Res>(_self.loggedUser!, (value) {
return _then(_self.copyWith(loggedUser: value));
});
-}/// Create a copy of HubViewState
+}/// Create a copy of ControlPanelViewState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
@@ -349,7 +349,7 @@ $DeviceEntityCopyWith<$Res>? get selectedDevice {
return $DeviceEntityCopyWith<$Res>(_self.selectedDevice!, (value) {
return _then(_self.copyWith(selectedDevice: value));
});
-}/// Create a copy of HubViewState
+}/// Create a copy of ControlPanelViewState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
diff --git a/modules/legacy/modules/hub/pubspec.lock b/modules/legacy/modules/control_panel/pubspec.lock
similarity index 100%
rename from modules/legacy/modules/hub/pubspec.lock
rename to modules/legacy/modules/control_panel/pubspec.lock
diff --git a/modules/legacy/modules/hub/pubspec.yaml b/modules/legacy/modules/control_panel/pubspec.yaml
similarity index 99%
rename from modules/legacy/modules/hub/pubspec.yaml
rename to modules/legacy/modules/control_panel/pubspec.yaml
index 4618b474..4ce6b174 100644
--- a/modules/legacy/modules/hub/pubspec.yaml
+++ b/modules/legacy/modules/control_panel/pubspec.yaml
@@ -1,4 +1,4 @@
-name: hub
+name: control_panel
description: "A new Flutter project."
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
diff --git a/modules/legacy/modules/hub/pubspec_overrides.yaml b/modules/legacy/modules/control_panel/pubspec_overrides.yaml
similarity index 100%
rename from modules/legacy/modules/hub/pubspec_overrides.yaml
rename to modules/legacy/modules/control_panel/pubspec_overrides.yaml
diff --git a/modules/legacy/modules/functions/lib/functions.dart b/modules/legacy/modules/device_management/lib/device_management.dart
similarity index 74%
rename from modules/legacy/modules/functions/lib/functions.dart
rename to modules/legacy/modules/device_management/lib/device_management.dart
index b385565e..ed03eb98 100644
--- a/modules/legacy/modules/functions/lib/functions.dart
+++ b/modules/legacy/modules/device_management/lib/device_management.dart
@@ -1,6 +1,6 @@
library functions;
-export 'src/features/functions/functions_builder.dart';
+export 'src/features/device_management/device_management_builder.dart';
export 'src/features/contacts/contacts_builder.dart';
export 'src/features/remote_connection/remote_connection_builder.dart';
export 'src/features/locate_device/locate_device_builder.dart';
diff --git a/modules/legacy/modules/functions/lib/src/core/data/datasources/functions_remote_datasource.dart b/modules/legacy/modules/device_management/lib/src/core/data/datasources/functions_remote_datasource.dart
similarity index 52%
rename from modules/legacy/modules/functions/lib/src/core/data/datasources/functions_remote_datasource.dart
rename to modules/legacy/modules/device_management/lib/src/core/data/datasources/functions_remote_datasource.dart
index 4db51388..f89bf227 100644
--- a/modules/legacy/modules/functions/lib/src/core/data/datasources/functions_remote_datasource.dart
+++ b/modules/legacy/modules/device_management/lib/src/core/data/datasources/functions_remote_datasource.dart
@@ -1,6 +1,6 @@
-import 'package:functions/src/core/data/models/entities/locate_device_request_entity.dart';
-import 'package:functions/src/features/contacts/domain/entities/contact_entity.dart';
-import 'package:functions/src/features/remote_connection/domain/entities/picture_entity.dart';
+import 'package:device_management/src/core/data/models/entities/locate_device_request_entity.dart';
+import 'package:device_management/src/features/contacts/domain/entities/contact_entity.dart';
+import 'package:device_management/src/features/remote_connection/domain/entities/picture_entity.dart';
abstract class FunctionsRemoteDatasource {
Future> getContacts({required String userId});
diff --git a/modules/legacy/modules/functions/lib/src/core/data/datasources/functions_remote_datasource_impl.dart b/modules/legacy/modules/device_management/lib/src/core/data/datasources/functions_remote_datasource_impl.dart
similarity index 89%
rename from modules/legacy/modules/functions/lib/src/core/data/datasources/functions_remote_datasource_impl.dart
rename to modules/legacy/modules/device_management/lib/src/core/data/datasources/functions_remote_datasource_impl.dart
index 86d658b4..f7be842e 100644
--- a/modules/legacy/modules/functions/lib/src/core/data/datasources/functions_remote_datasource_impl.dart
+++ b/modules/legacy/modules/device_management/lib/src/core/data/datasources/functions_remote_datasource_impl.dart
@@ -2,11 +2,11 @@ import 'dart:convert';
import 'package:dio/dio.dart';
// import 'package:flutter/material.dart';
-import 'package:functions/src/core/data/datasources/functions_remote_datasource.dart';
-import 'package:functions/src/core/data/models/entities/locate_device_request_entity.dart';
-import 'package:functions/src/core/data/models/send_command_request_model.dart';
-import 'package:functions/src/features/contacts/domain/entities/contact_entity.dart';
-import 'package:functions/src/features/remote_connection/domain/entities/picture_entity.dart';
+import 'package:device_management/src/core/data/datasources/functions_remote_datasource.dart';
+import 'package:device_management/src/core/data/models/entities/locate_device_request_entity.dart';
+import 'package:device_management/src/core/data/models/send_command_request_model.dart';
+import 'package:device_management/src/features/contacts/domain/entities/contact_entity.dart';
+import 'package:device_management/src/features/remote_connection/domain/entities/picture_entity.dart';
import 'package:sf_infrastructure/sf_infrastructure.dart';
class FunctionsRemoteDatasourceImpl implements FunctionsRemoteDatasource {
diff --git a/modules/legacy/modules/functions/lib/src/core/data/models/entities/locate_device_request_entity.dart b/modules/legacy/modules/device_management/lib/src/core/data/models/entities/locate_device_request_entity.dart
similarity index 100%
rename from modules/legacy/modules/functions/lib/src/core/data/models/entities/locate_device_request_entity.dart
rename to modules/legacy/modules/device_management/lib/src/core/data/models/entities/locate_device_request_entity.dart
diff --git a/modules/legacy/modules/functions/lib/src/core/data/models/entities/locate_device_request_entity.freezed.dart b/modules/legacy/modules/device_management/lib/src/core/data/models/entities/locate_device_request_entity.freezed.dart
similarity index 100%
rename from modules/legacy/modules/functions/lib/src/core/data/models/entities/locate_device_request_entity.freezed.dart
rename to modules/legacy/modules/device_management/lib/src/core/data/models/entities/locate_device_request_entity.freezed.dart
diff --git a/modules/legacy/modules/functions/lib/src/core/data/models/send_command_request_model.dart b/modules/legacy/modules/device_management/lib/src/core/data/models/send_command_request_model.dart
similarity index 87%
rename from modules/legacy/modules/functions/lib/src/core/data/models/send_command_request_model.dart
rename to modules/legacy/modules/device_management/lib/src/core/data/models/send_command_request_model.dart
index 296155ec..f0aed64f 100644
--- a/modules/legacy/modules/functions/lib/src/core/data/models/send_command_request_model.dart
+++ b/modules/legacy/modules/device_management/lib/src/core/data/models/send_command_request_model.dart
@@ -1,5 +1,5 @@
import 'package:freezed_annotation/freezed_annotation.dart';
-import 'package:functions/src/core/data/models/entities/locate_device_request_entity.dart';
+import 'package:device_management/src/core/data/models/entities/locate_device_request_entity.dart';
part 'send_command_request_model.freezed.dart';
part 'send_command_request_model.g.dart';
diff --git a/modules/legacy/modules/functions/lib/src/core/data/models/send_command_request_model.freezed.dart b/modules/legacy/modules/device_management/lib/src/core/data/models/send_command_request_model.freezed.dart
similarity index 100%
rename from modules/legacy/modules/functions/lib/src/core/data/models/send_command_request_model.freezed.dart
rename to modules/legacy/modules/device_management/lib/src/core/data/models/send_command_request_model.freezed.dart
diff --git a/modules/legacy/modules/functions/lib/src/core/data/models/send_command_request_model.g.dart b/modules/legacy/modules/device_management/lib/src/core/data/models/send_command_request_model.g.dart
similarity index 100%
rename from modules/legacy/modules/functions/lib/src/core/data/models/send_command_request_model.g.dart
rename to modules/legacy/modules/device_management/lib/src/core/data/models/send_command_request_model.g.dart
diff --git a/modules/legacy/modules/functions/lib/src/core/data/repositories/functions_repository_impl.dart b/modules/legacy/modules/device_management/lib/src/core/data/repositories/functions_repository_impl.dart
similarity index 65%
rename from modules/legacy/modules/functions/lib/src/core/data/repositories/functions_repository_impl.dart
rename to modules/legacy/modules/device_management/lib/src/core/data/repositories/functions_repository_impl.dart
index 59cf7ac5..86914f7e 100644
--- a/modules/legacy/modules/functions/lib/src/core/data/repositories/functions_repository_impl.dart
+++ b/modules/legacy/modules/device_management/lib/src/core/data/repositories/functions_repository_impl.dart
@@ -1,8 +1,8 @@
-import 'package:functions/src/core/data/datasources/functions_remote_datasource.dart';
-import 'package:functions/src/core/data/models/entities/locate_device_request_entity.dart';
-import 'package:functions/src/core/domain/repositories/functions_repository.dart';
-import 'package:functions/src/features/contacts/domain/entities/contact_entity.dart';
-import 'package:functions/src/features/remote_connection/domain/entities/picture_entity.dart';
+import 'package:device_management/src/core/data/datasources/functions_remote_datasource.dart';
+import 'package:device_management/src/core/data/models/entities/locate_device_request_entity.dart';
+import 'package:device_management/src/core/domain/repositories/functions_repository.dart';
+import 'package:device_management/src/features/contacts/domain/entities/contact_entity.dart';
+import 'package:device_management/src/features/remote_connection/domain/entities/picture_entity.dart';
class FunctionsRepositoryImpl implements FunctionsRepository {
const FunctionsRepositoryImpl(this._remote);
diff --git a/modules/legacy/modules/functions/lib/src/core/domain/repositories/functions_repository.dart b/modules/legacy/modules/device_management/lib/src/core/domain/repositories/functions_repository.dart
similarity index 51%
rename from modules/legacy/modules/functions/lib/src/core/domain/repositories/functions_repository.dart
rename to modules/legacy/modules/device_management/lib/src/core/domain/repositories/functions_repository.dart
index 44813f87..da0e1204 100644
--- a/modules/legacy/modules/functions/lib/src/core/domain/repositories/functions_repository.dart
+++ b/modules/legacy/modules/device_management/lib/src/core/domain/repositories/functions_repository.dart
@@ -1,6 +1,6 @@
-import 'package:functions/src/core/data/models/entities/locate_device_request_entity.dart';
-import 'package:functions/src/features/contacts/domain/entities/contact_entity.dart';
-import 'package:functions/src/features/remote_connection/domain/entities/picture_entity.dart';
+import 'package:device_management/src/core/data/models/entities/locate_device_request_entity.dart';
+import 'package:device_management/src/features/contacts/domain/entities/contact_entity.dart';
+import 'package:device_management/src/features/remote_connection/domain/entities/picture_entity.dart';
abstract class FunctionsRepository {
Future> getContacts({required String userId});
diff --git a/modules/legacy/modules/functions/lib/src/core/providers/functions_remote_datasource_provider.dart b/modules/legacy/modules/device_management/lib/src/core/providers/functions_remote_datasource_provider.dart
similarity index 62%
rename from modules/legacy/modules/functions/lib/src/core/providers/functions_remote_datasource_provider.dart
rename to modules/legacy/modules/device_management/lib/src/core/providers/functions_remote_datasource_provider.dart
index 062ca5d4..2fb67453 100644
--- a/modules/legacy/modules/functions/lib/src/core/providers/functions_remote_datasource_provider.dart
+++ b/modules/legacy/modules/device_management/lib/src/core/providers/functions_remote_datasource_provider.dart
@@ -1,6 +1,6 @@
import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:functions/src/core/data/datasources/functions_remote_datasource.dart';
-import 'package:functions/src/core/data/datasources/functions_remote_datasource_impl.dart';
+import 'package:device_management/src/core/data/datasources/functions_remote_datasource.dart';
+import 'package:device_management/src/core/data/datasources/functions_remote_datasource_impl.dart';
import 'package:sf_infrastructure/sf_infrastructure.dart';
final functionsRemoteDatasourceProvider = Provider((ref) {
diff --git a/modules/legacy/modules/device_management/lib/src/core/providers/functions_repository_provider.dart b/modules/legacy/modules/device_management/lib/src/core/providers/functions_repository_provider.dart
new file mode 100644
index 00000000..63dd98dc
--- /dev/null
+++ b/modules/legacy/modules/device_management/lib/src/core/providers/functions_repository_provider.dart
@@ -0,0 +1,9 @@
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:device_management/src/core/providers/functions_remote_datasource_provider.dart';
+import 'package:device_management/src/core/data/repositories/functions_repository_impl.dart';
+import 'package:device_management/src/core/domain/repositories/functions_repository.dart';
+
+final functionsRepositoryProvider = Provider((ref) {
+ final remote = ref.read(functionsRemoteDatasourceProvider);
+ return FunctionsRepositoryImpl(remote);
+});
diff --git a/modules/legacy/modules/functions/lib/src/features/contacts/contacts_builder.dart b/modules/legacy/modules/device_management/lib/src/features/contacts/contacts_builder.dart
similarity index 100%
rename from modules/legacy/modules/functions/lib/src/features/contacts/contacts_builder.dart
rename to modules/legacy/modules/device_management/lib/src/features/contacts/contacts_builder.dart
diff --git a/modules/legacy/modules/functions/lib/src/features/contacts/domain/entities/contact_entity.dart b/modules/legacy/modules/device_management/lib/src/features/contacts/domain/entities/contact_entity.dart
similarity index 100%
rename from modules/legacy/modules/functions/lib/src/features/contacts/domain/entities/contact_entity.dart
rename to modules/legacy/modules/device_management/lib/src/features/contacts/domain/entities/contact_entity.dart
diff --git a/modules/legacy/modules/functions/lib/src/features/contacts/domain/entities/contact_entity.freezed.dart b/modules/legacy/modules/device_management/lib/src/features/contacts/domain/entities/contact_entity.freezed.dart
similarity index 100%
rename from modules/legacy/modules/functions/lib/src/features/contacts/domain/entities/contact_entity.freezed.dart
rename to modules/legacy/modules/device_management/lib/src/features/contacts/domain/entities/contact_entity.freezed.dart
diff --git a/modules/legacy/modules/functions/lib/src/features/contacts/domain/get_contacts_use_case.dart b/modules/legacy/modules/device_management/lib/src/features/contacts/domain/get_contacts_use_case.dart
similarity index 53%
rename from modules/legacy/modules/functions/lib/src/features/contacts/domain/get_contacts_use_case.dart
rename to modules/legacy/modules/device_management/lib/src/features/contacts/domain/get_contacts_use_case.dart
index 122ed392..6e9bc982 100644
--- a/modules/legacy/modules/functions/lib/src/features/contacts/domain/get_contacts_use_case.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/contacts/domain/get_contacts_use_case.dart
@@ -1,4 +1,4 @@
-import 'package:functions/src/features/contacts/domain/entities/contact_entity.dart';
+import 'package:device_management/src/features/contacts/domain/entities/contact_entity.dart';
abstract class GetContactsUseCase {
Future> getContacts({required String userId});
diff --git a/modules/legacy/modules/functions/lib/src/features/contacts/domain/get_contacts_use_case_impl.dart b/modules/legacy/modules/device_management/lib/src/features/contacts/domain/get_contacts_use_case_impl.dart
similarity index 51%
rename from modules/legacy/modules/functions/lib/src/features/contacts/domain/get_contacts_use_case_impl.dart
rename to modules/legacy/modules/device_management/lib/src/features/contacts/domain/get_contacts_use_case_impl.dart
index b94fb73c..6434920b 100644
--- a/modules/legacy/modules/functions/lib/src/features/contacts/domain/get_contacts_use_case_impl.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/contacts/domain/get_contacts_use_case_impl.dart
@@ -1,6 +1,6 @@
-import 'package:functions/src/core/domain/repositories/functions_repository.dart';
-import 'package:functions/src/features/contacts/domain/entities/contact_entity.dart';
-import 'package:functions/src/features/contacts/domain/get_contacts_use_case.dart';
+import 'package:device_management/src/core/domain/repositories/functions_repository.dart';
+import 'package:device_management/src/features/contacts/domain/entities/contact_entity.dart';
+import 'package:device_management/src/features/contacts/domain/get_contacts_use_case.dart';
class GetContactsUseCaseImpl implements GetContactsUseCase {
GetContactsUseCaseImpl(this._repository);
diff --git a/modules/legacy/modules/functions/lib/src/features/contacts/presentation/contacts_screen.dart b/modules/legacy/modules/device_management/lib/src/features/contacts/presentation/contacts_screen.dart
similarity index 96%
rename from modules/legacy/modules/functions/lib/src/features/contacts/presentation/contacts_screen.dart
rename to modules/legacy/modules/device_management/lib/src/features/contacts/presentation/contacts_screen.dart
index 319c5f97..38b70d0c 100644
--- a/modules/legacy/modules/functions/lib/src/features/contacts/presentation/contacts_screen.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/contacts/presentation/contacts_screen.dart
@@ -1,9 +1,9 @@
import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:functions/src/features/contacts/domain/entities/contact_entity.dart';
-import 'package:functions/src/features/contacts/presentation/edit_contact_screen.dart';
-import 'package:functions/src/features/contacts/presentation/state/contacts_view_model.dart';
+import 'package:device_management/src/features/contacts/domain/entities/contact_entity.dart';
+import 'package:device_management/src/features/contacts/presentation/edit_contact_screen.dart';
+import 'package:device_management/src/features/contacts/presentation/state/contacts_view_model.dart';
import 'package:navigation/navigation.dart';
import 'package:sf_localizations/sf_localizations.dart';
import 'package:utils/utils.dart';
@@ -35,7 +35,7 @@ class ContactsScreen extends ConsumerWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
- IconButton(onPressed: () {Navigator.pop(context);},
+ IconButton(onPressed: () {navigationContract.goBack();},
icon: Icon(Icons.arrow_back)),
if (!state.isEditing) ...[
DecoratedBox(
diff --git a/modules/legacy/modules/functions/lib/src/features/contacts/presentation/edit_contact_screen.dart b/modules/legacy/modules/device_management/lib/src/features/contacts/presentation/edit_contact_screen.dart
similarity index 96%
rename from modules/legacy/modules/functions/lib/src/features/contacts/presentation/edit_contact_screen.dart
rename to modules/legacy/modules/device_management/lib/src/features/contacts/presentation/edit_contact_screen.dart
index ab4eab27..c9283145 100644
--- a/modules/legacy/modules/functions/lib/src/features/contacts/presentation/edit_contact_screen.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/contacts/presentation/edit_contact_screen.dart
@@ -2,8 +2,8 @@ import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/flutter_svg.dart';
-import 'package:functions/src/features/contacts/domain/entities/contact_entity.dart';
-import 'package:functions/src/features/contacts/presentation/state/contacts_view_model.dart';
+import 'package:device_management/src/features/contacts/domain/entities/contact_entity.dart';
+import 'package:device_management/src/features/contacts/presentation/state/contacts_view_model.dart';
// import 'package:navigation/navigation.dart';
import 'package:sf_localizations/sf_localizations.dart';
import 'package:utils/utils.dart';
diff --git a/modules/legacy/modules/device_management/lib/src/features/contacts/presentation/providers/get_contacts_use_case_provider.dart b/modules/legacy/modules/device_management/lib/src/features/contacts/presentation/providers/get_contacts_use_case_provider.dart
new file mode 100644
index 00000000..c0d1255e
--- /dev/null
+++ b/modules/legacy/modules/device_management/lib/src/features/contacts/presentation/providers/get_contacts_use_case_provider.dart
@@ -0,0 +1,9 @@
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:device_management/src/core/providers/functions_repository_provider.dart';
+import 'package:device_management/src/features/contacts/domain/get_contacts_use_case.dart';
+import 'package:device_management/src/features/contacts/domain/get_contacts_use_case_impl.dart';
+
+final getContactsUseCaseProvider = Provider.autoDispose((ref) {
+ final functionsRepository = ref.read(functionsRepositoryProvider);
+ return GetContactsUseCaseImpl(functionsRepository);
+});
diff --git a/modules/legacy/modules/functions/lib/src/features/contacts/presentation/state/contacts_view_model.dart b/modules/legacy/modules/device_management/lib/src/features/contacts/presentation/state/contacts_view_model.dart
similarity index 83%
rename from modules/legacy/modules/functions/lib/src/features/contacts/presentation/state/contacts_view_model.dart
rename to modules/legacy/modules/device_management/lib/src/features/contacts/presentation/state/contacts_view_model.dart
index d199d571..c4e034c0 100644
--- a/modules/legacy/modules/functions/lib/src/features/contacts/presentation/state/contacts_view_model.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/contacts/presentation/state/contacts_view_model.dart
@@ -1,9 +1,9 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:functions/src/features/contacts/domain/entities/contact_entity.dart';
-import 'package:functions/src/features/contacts/domain/get_contacts_use_case.dart';
-import 'package:functions/src/features/contacts/presentation/providers/get_contacts_use_case_provider.dart';
-import 'package:functions/src/features/contacts/presentation/state/contacts_view_state.dart';
+import 'package:device_management/src/features/contacts/domain/entities/contact_entity.dart';
+import 'package:device_management/src/features/contacts/domain/get_contacts_use_case.dart';
+import 'package:device_management/src/features/contacts/presentation/providers/get_contacts_use_case_provider.dart';
+import 'package:device_management/src/features/contacts/presentation/state/contacts_view_state.dart';
// import 'package:legacy_shared/src/providers/logged_user_provider.dart';
// import 'package:legacy_shared/src/data/models/entities/user_entity.dart';
// import 'package:sf_localizations/sf_localizations.dart';
diff --git a/modules/legacy/modules/functions/lib/src/features/contacts/presentation/state/contacts_view_state.dart b/modules/legacy/modules/device_management/lib/src/features/contacts/presentation/state/contacts_view_state.dart
similarity index 82%
rename from modules/legacy/modules/functions/lib/src/features/contacts/presentation/state/contacts_view_state.dart
rename to modules/legacy/modules/device_management/lib/src/features/contacts/presentation/state/contacts_view_state.dart
index b3b17bd5..58ce6961 100644
--- a/modules/legacy/modules/functions/lib/src/features/contacts/presentation/state/contacts_view_state.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/contacts/presentation/state/contacts_view_state.dart
@@ -1,5 +1,5 @@
import 'package:freezed_annotation/freezed_annotation.dart';
-import 'package:functions/src/features/contacts/domain/entities/contact_entity.dart';
+import 'package:device_management/src/features/contacts/domain/entities/contact_entity.dart';
part 'contacts_view_state.freezed.dart';
diff --git a/modules/legacy/modules/functions/lib/src/features/contacts/presentation/state/contacts_view_state.freezed.dart b/modules/legacy/modules/device_management/lib/src/features/contacts/presentation/state/contacts_view_state.freezed.dart
similarity index 100%
rename from modules/legacy/modules/functions/lib/src/features/contacts/presentation/state/contacts_view_state.freezed.dart
rename to modules/legacy/modules/device_management/lib/src/features/contacts/presentation/state/contacts_view_state.freezed.dart
diff --git a/modules/legacy/modules/functions/lib/src/features/functions/functions_builder.dart b/modules/legacy/modules/device_management/lib/src/features/device_management/device_management_builder.dart
similarity index 61%
rename from modules/legacy/modules/functions/lib/src/features/functions/functions_builder.dart
rename to modules/legacy/modules/device_management/lib/src/features/device_management/device_management_builder.dart
index 186a46cb..4fc0c528 100644
--- a/modules/legacy/modules/functions/lib/src/features/functions/functions_builder.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/device_management/device_management_builder.dart
@@ -1,18 +1,18 @@
import 'package:flutter/material.dart';
-import 'package:functions/src/features/functions/functions_screen.dart';
+import 'package:device_management/src/features/device_management/device_management_screen.dart';
import 'package:go_router/go_router.dart';
import 'package:get_it/get_it.dart';
import 'package:navigation/navigation.dart';
-class FunctionsBuilder {
- const FunctionsBuilder();
+class DeviceManagementBuilder {
+ const DeviceManagementBuilder();
Page buildPage(BuildContext context, GoRouterState state) {
final NavigationContract navigationContract = GetIt.I();
return MaterialPage(
key: state.pageKey,
- child: FunctionsScreen(navigationContract: navigationContract),
+ child: DeviceManagementScreen(navigationContract: navigationContract),
);
}
}
diff --git a/modules/legacy/modules/functions/lib/src/features/functions/functions_screen.dart b/modules/legacy/modules/device_management/lib/src/features/device_management/device_management_screen.dart
similarity index 95%
rename from modules/legacy/modules/functions/lib/src/features/functions/functions_screen.dart
rename to modules/legacy/modules/device_management/lib/src/features/device_management/device_management_screen.dart
index 700865de..609c9ae5 100644
--- a/modules/legacy/modules/functions/lib/src/features/functions/functions_screen.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/device_management/device_management_screen.dart
@@ -1,16 +1,16 @@
import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:functions/src/features/functions/widgets/call_watch_dialog.dart';
+import 'package:device_management/src/features/device_management/widgets/call_watch_dialog.dart';
import 'package:legacy_shared/legacy_shared.dart';
import 'package:navigation/navigation.dart';
import 'package:sf_localizations/sf_localizations.dart';
import 'package:utils/utils.dart';
-class FunctionsScreen extends ConsumerWidget {
+class DeviceManagementScreen extends ConsumerWidget {
final NavigationContract navigationContract;
- const FunctionsScreen({super.key, required this.navigationContract});
+ const DeviceManagementScreen({super.key, required this.navigationContract});
@override
Widget build(BuildContext context, WidgetRef ref) {
diff --git a/modules/legacy/modules/functions/lib/src/features/functions/state/call_watch_view_model.dart b/modules/legacy/modules/device_management/lib/src/features/device_management/state/call_watch_view_model.dart
similarity index 93%
rename from modules/legacy/modules/functions/lib/src/features/functions/state/call_watch_view_model.dart
rename to modules/legacy/modules/device_management/lib/src/features/device_management/state/call_watch_view_model.dart
index cc749ff4..608f2a08 100644
--- a/modules/legacy/modules/functions/lib/src/features/functions/state/call_watch_view_model.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/device_management/state/call_watch_view_model.dart
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:functions/src/features/functions/state/call_watch_view_state.dart';
+import 'package:device_management/src/features/device_management/state/call_watch_view_state.dart';
import 'package:url_launcher/url_launcher.dart';
final callWatchViewModelProvider =
diff --git a/modules/legacy/modules/functions/lib/src/features/functions/state/call_watch_view_state.dart b/modules/legacy/modules/device_management/lib/src/features/device_management/state/call_watch_view_state.dart
similarity index 100%
rename from modules/legacy/modules/functions/lib/src/features/functions/state/call_watch_view_state.dart
rename to modules/legacy/modules/device_management/lib/src/features/device_management/state/call_watch_view_state.dart
diff --git a/modules/legacy/modules/functions/lib/src/features/functions/state/call_watch_view_state.freezed.dart b/modules/legacy/modules/device_management/lib/src/features/device_management/state/call_watch_view_state.freezed.dart
similarity index 100%
rename from modules/legacy/modules/functions/lib/src/features/functions/state/call_watch_view_state.freezed.dart
rename to modules/legacy/modules/device_management/lib/src/features/device_management/state/call_watch_view_state.freezed.dart
diff --git a/modules/legacy/modules/functions/lib/src/features/functions/widgets/call_watch_dialog.dart b/modules/legacy/modules/device_management/lib/src/features/device_management/widgets/call_watch_dialog.dart
similarity index 96%
rename from modules/legacy/modules/functions/lib/src/features/functions/widgets/call_watch_dialog.dart
rename to modules/legacy/modules/device_management/lib/src/features/device_management/widgets/call_watch_dialog.dart
index 2770ad94..e0f3425a 100644
--- a/modules/legacy/modules/functions/lib/src/features/functions/widgets/call_watch_dialog.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/device_management/widgets/call_watch_dialog.dart
@@ -1,7 +1,7 @@
import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:functions/src/features/functions/state/call_watch_view_model.dart';
+import 'package:device_management/src/features/device_management/state/call_watch_view_model.dart';
import 'package:sf_localizations/sf_localizations.dart';
import 'package:utils/utils.dart';
diff --git a/modules/legacy/modules/functions/lib/src/features/locate_device/domain/locate_device_use_case.dart b/modules/legacy/modules/device_management/lib/src/features/locate_device/domain/locate_device_use_case.dart
similarity index 53%
rename from modules/legacy/modules/functions/lib/src/features/locate_device/domain/locate_device_use_case.dart
rename to modules/legacy/modules/device_management/lib/src/features/locate_device/domain/locate_device_use_case.dart
index e6fc5bfd..f0daecd3 100644
--- a/modules/legacy/modules/functions/lib/src/features/locate_device/domain/locate_device_use_case.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/locate_device/domain/locate_device_use_case.dart
@@ -1,4 +1,4 @@
-import 'package:functions/src/core/data/models/entities/locate_device_request_entity.dart';
+import 'package:device_management/src/core/data/models/entities/locate_device_request_entity.dart';
abstract class LocateDeviceUseCase {
Future locateDevice({required LocateDeviceRequestEntity request});
diff --git a/modules/legacy/modules/functions/lib/src/features/locate_device/domain/locate_device_use_case_impl.dart b/modules/legacy/modules/device_management/lib/src/features/locate_device/domain/locate_device_use_case_impl.dart
similarity index 51%
rename from modules/legacy/modules/functions/lib/src/features/locate_device/domain/locate_device_use_case_impl.dart
rename to modules/legacy/modules/device_management/lib/src/features/locate_device/domain/locate_device_use_case_impl.dart
index 0acc44d2..21831843 100644
--- a/modules/legacy/modules/functions/lib/src/features/locate_device/domain/locate_device_use_case_impl.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/locate_device/domain/locate_device_use_case_impl.dart
@@ -1,6 +1,6 @@
-import 'package:functions/src/core/data/models/entities/locate_device_request_entity.dart';
-import 'package:functions/src/core/domain/repositories/functions_repository.dart';
-import 'package:functions/src/features/locate_device/domain/locate_device_use_case.dart';
+import 'package:device_management/src/core/data/models/entities/locate_device_request_entity.dart';
+import 'package:device_management/src/core/domain/repositories/functions_repository.dart';
+import 'package:device_management/src/features/locate_device/domain/locate_device_use_case.dart';
class LocateDeviceUseCaseImpl implements LocateDeviceUseCase {
LocateDeviceUseCaseImpl(this._repository);
diff --git a/modules/legacy/modules/functions/lib/src/features/locate_device/locate_device_builder.dart b/modules/legacy/modules/device_management/lib/src/features/locate_device/locate_device_builder.dart
similarity index 83%
rename from modules/legacy/modules/functions/lib/src/features/locate_device/locate_device_builder.dart
rename to modules/legacy/modules/device_management/lib/src/features/locate_device/locate_device_builder.dart
index 8120c702..7da9f2fa 100644
--- a/modules/legacy/modules/functions/lib/src/features/locate_device/locate_device_builder.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/locate_device/locate_device_builder.dart
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
-import 'package:functions/src/features/locate_device/presentation/locate_device_screen.dart';
+import 'package:device_management/src/features/locate_device/presentation/locate_device_screen.dart';
import 'package:go_router/go_router.dart';
import 'package:get_it/get_it.dart';
import 'package:navigation/navigation.dart';
diff --git a/modules/legacy/modules/functions/lib/src/features/locate_device/presentation/locate_device_screen.dart b/modules/legacy/modules/device_management/lib/src/features/locate_device/presentation/locate_device_screen.dart
similarity index 94%
rename from modules/legacy/modules/functions/lib/src/features/locate_device/presentation/locate_device_screen.dart
rename to modules/legacy/modules/device_management/lib/src/features/locate_device/presentation/locate_device_screen.dart
index 4d044b23..f7f27bb8 100644
--- a/modules/legacy/modules/functions/lib/src/features/locate_device/presentation/locate_device_screen.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/locate_device/presentation/locate_device_screen.dart
@@ -1,7 +1,7 @@
import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:functions/src/features/locate_device/presentation/widgets/locate_device_dialog.dart';
+import 'package:device_management/src/features/locate_device/presentation/widgets/locate_device_dialog.dart';
import 'package:navigation/navigation.dart';
import 'package:sf_localizations/sf_localizations.dart';
import 'package:utils/utils.dart';
diff --git a/modules/legacy/modules/device_management/lib/src/features/locate_device/presentation/providers/locate_device_use_case_provider.dart b/modules/legacy/modules/device_management/lib/src/features/locate_device/presentation/providers/locate_device_use_case_provider.dart
new file mode 100644
index 00000000..819da240
--- /dev/null
+++ b/modules/legacy/modules/device_management/lib/src/features/locate_device/presentation/providers/locate_device_use_case_provider.dart
@@ -0,0 +1,9 @@
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:device_management/src/core/providers/functions_repository_provider.dart';
+import 'package:device_management/src/features/locate_device/domain/locate_device_use_case.dart';
+import 'package:device_management/src/features/locate_device/domain/locate_device_use_case_impl.dart';
+
+final locateDeviceUseCaseProvider = Provider.autoDispose((ref) {
+ final functionsRepository = ref.read(functionsRepositoryProvider);
+ return LocateDeviceUseCaseImpl(functionsRepository);
+});
diff --git a/modules/legacy/modules/functions/lib/src/features/locate_device/presentation/state/locate_device_view_model.dart b/modules/legacy/modules/device_management/lib/src/features/locate_device/presentation/state/locate_device_view_model.dart
similarity index 77%
rename from modules/legacy/modules/functions/lib/src/features/locate_device/presentation/state/locate_device_view_model.dart
rename to modules/legacy/modules/device_management/lib/src/features/locate_device/presentation/state/locate_device_view_model.dart
index 779431ce..72688c88 100644
--- a/modules/legacy/modules/functions/lib/src/features/locate_device/presentation/state/locate_device_view_model.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/locate_device/presentation/state/locate_device_view_model.dart
@@ -1,9 +1,9 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:functions/src/core/data/models/entities/locate_device_request_entity.dart';
-import 'package:functions/src/features/locate_device/domain/locate_device_use_case.dart';
-import 'package:functions/src/features/locate_device/presentation/providers/locate_device_use_case_provider.dart';
-import 'package:functions/src/features/locate_device/presentation/state/locate_device_view_state.dart';
+import 'package:device_management/src/core/data/models/entities/locate_device_request_entity.dart';
+import 'package:device_management/src/features/locate_device/domain/locate_device_use_case.dart';
+import 'package:device_management/src/features/locate_device/presentation/providers/locate_device_use_case_provider.dart';
+import 'package:device_management/src/features/locate_device/presentation/state/locate_device_view_state.dart';
// import 'package:legacy_shared/src/providers/logged_user_provider.dart';
// import 'package:sf_localizations/sf_localizations.dart';
diff --git a/modules/legacy/modules/functions/lib/src/features/locate_device/presentation/state/locate_device_view_state.dart b/modules/legacy/modules/device_management/lib/src/features/locate_device/presentation/state/locate_device_view_state.dart
similarity index 100%
rename from modules/legacy/modules/functions/lib/src/features/locate_device/presentation/state/locate_device_view_state.dart
rename to modules/legacy/modules/device_management/lib/src/features/locate_device/presentation/state/locate_device_view_state.dart
diff --git a/modules/legacy/modules/functions/lib/src/features/locate_device/presentation/state/locate_device_view_state.freezed.dart b/modules/legacy/modules/device_management/lib/src/features/locate_device/presentation/state/locate_device_view_state.freezed.dart
similarity index 100%
rename from modules/legacy/modules/functions/lib/src/features/locate_device/presentation/state/locate_device_view_state.freezed.dart
rename to modules/legacy/modules/device_management/lib/src/features/locate_device/presentation/state/locate_device_view_state.freezed.dart
diff --git a/modules/legacy/modules/functions/lib/src/features/locate_device/presentation/widgets/locate_device_dialog.dart b/modules/legacy/modules/device_management/lib/src/features/locate_device/presentation/widgets/locate_device_dialog.dart
similarity index 97%
rename from modules/legacy/modules/functions/lib/src/features/locate_device/presentation/widgets/locate_device_dialog.dart
rename to modules/legacy/modules/device_management/lib/src/features/locate_device/presentation/widgets/locate_device_dialog.dart
index eefa1d35..827bf789 100644
--- a/modules/legacy/modules/functions/lib/src/features/locate_device/presentation/widgets/locate_device_dialog.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/locate_device/presentation/widgets/locate_device_dialog.dart
@@ -1,7 +1,7 @@
import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:functions/src/features/locate_device/presentation/state/locate_device_view_model.dart';
+import 'package:device_management/src/features/locate_device/presentation/state/locate_device_view_model.dart';
import 'package:sf_localizations/sf_localizations.dart';
import 'package:utils/utils.dart';
diff --git a/modules/legacy/modules/functions/lib/src/features/remote_connection/domain/entities/picture_entity.dart b/modules/legacy/modules/device_management/lib/src/features/remote_connection/domain/entities/picture_entity.dart
similarity index 100%
rename from modules/legacy/modules/functions/lib/src/features/remote_connection/domain/entities/picture_entity.dart
rename to modules/legacy/modules/device_management/lib/src/features/remote_connection/domain/entities/picture_entity.dart
diff --git a/modules/legacy/modules/functions/lib/src/features/remote_connection/domain/entities/picture_entity.freezed.dart b/modules/legacy/modules/device_management/lib/src/features/remote_connection/domain/entities/picture_entity.freezed.dart
similarity index 100%
rename from modules/legacy/modules/functions/lib/src/features/remote_connection/domain/entities/picture_entity.freezed.dart
rename to modules/legacy/modules/device_management/lib/src/features/remote_connection/domain/entities/picture_entity.freezed.dart
diff --git a/modules/legacy/modules/functions/lib/src/features/remote_connection/domain/get_pictures_use_case.dart b/modules/legacy/modules/device_management/lib/src/features/remote_connection/domain/get_pictures_use_case.dart
similarity index 51%
rename from modules/legacy/modules/functions/lib/src/features/remote_connection/domain/get_pictures_use_case.dart
rename to modules/legacy/modules/device_management/lib/src/features/remote_connection/domain/get_pictures_use_case.dart
index 225c09cf..73c57508 100644
--- a/modules/legacy/modules/functions/lib/src/features/remote_connection/domain/get_pictures_use_case.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/remote_connection/domain/get_pictures_use_case.dart
@@ -1,4 +1,4 @@
-import 'package:functions/src/features/remote_connection/domain/entities/picture_entity.dart';
+import 'package:device_management/src/features/remote_connection/domain/entities/picture_entity.dart';
abstract class GetPicturesUseCase {
Future> getPictures({required String userId});
diff --git a/modules/legacy/modules/functions/lib/src/features/remote_connection/domain/get_pictures_use_case_impl.dart b/modules/legacy/modules/device_management/lib/src/features/remote_connection/domain/get_pictures_use_case_impl.dart
similarity index 78%
rename from modules/legacy/modules/functions/lib/src/features/remote_connection/domain/get_pictures_use_case_impl.dart
rename to modules/legacy/modules/device_management/lib/src/features/remote_connection/domain/get_pictures_use_case_impl.dart
index d7dac0b8..fb37593e 100644
--- a/modules/legacy/modules/functions/lib/src/features/remote_connection/domain/get_pictures_use_case_impl.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/remote_connection/domain/get_pictures_use_case_impl.dart
@@ -1,6 +1,6 @@
-import 'package:functions/src/core/domain/repositories/functions_repository.dart';
-import 'package:functions/src/features/remote_connection/domain/entities/picture_entity.dart';
-import 'package:functions/src/features/remote_connection/domain/get_pictures_use_case.dart';
+import 'package:device_management/src/core/domain/repositories/functions_repository.dart';
+import 'package:device_management/src/features/remote_connection/domain/entities/picture_entity.dart';
+import 'package:device_management/src/features/remote_connection/domain/get_pictures_use_case.dart';
class GetPicturesUseCaseImpl implements GetPicturesUseCase {
GetPicturesUseCaseImpl(this._repository);
diff --git a/modules/legacy/modules/device_management/lib/src/features/remote_connection/domain/take_picture_use_case.dart b/modules/legacy/modules/device_management/lib/src/features/remote_connection/domain/take_picture_use_case.dart
new file mode 100644
index 00000000..aaef5b9d
--- /dev/null
+++ b/modules/legacy/modules/device_management/lib/src/features/remote_connection/domain/take_picture_use_case.dart
@@ -0,0 +1,5 @@
+import 'package:device_management/src/features/remote_connection/domain/entities/picture_entity.dart';
+
+abstract class TakePictureUseCase {
+ Future takePicture({required String userId});
+}
diff --git a/modules/legacy/modules/device_management/lib/src/features/remote_connection/domain/take_picture_use_case_impl.dart b/modules/legacy/modules/device_management/lib/src/features/remote_connection/domain/take_picture_use_case_impl.dart
new file mode 100644
index 00000000..7a1b7a81
--- /dev/null
+++ b/modules/legacy/modules/device_management/lib/src/features/remote_connection/domain/take_picture_use_case_impl.dart
@@ -0,0 +1,14 @@
+import 'package:device_management/src/core/domain/repositories/functions_repository.dart';
+import 'package:device_management/src/features/remote_connection/domain/entities/picture_entity.dart';
+import 'package:device_management/src/features/remote_connection/domain/take_picture_use_case.dart';
+
+class TakePictureUseCaseImpl implements TakePictureUseCase {
+ TakePictureUseCaseImpl(this._repository);
+
+ final FunctionsRepository _repository;
+
+ @override
+ Future takePicture({required String userId}) {
+ return _repository.takePicture(userId: userId);
+ }
+}
\ No newline at end of file
diff --git a/modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/providers/get_pictures_use_case_provider.dart b/modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/providers/get_pictures_use_case_provider.dart
new file mode 100644
index 00000000..9af3b9aa
--- /dev/null
+++ b/modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/providers/get_pictures_use_case_provider.dart
@@ -0,0 +1,9 @@
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:device_management/src/core/providers/functions_repository_provider.dart';
+import 'package:device_management/src/features/remote_connection/domain/get_pictures_use_case.dart';
+import 'package:device_management/src/features/remote_connection/domain/get_pictures_use_case_impl.dart';
+
+final getPicturesUseCaseProvider = Provider.autoDispose((ref) {
+ final functionsRepository = ref.read(functionsRepositoryProvider);
+ return GetPicturesUseCaseImpl(functionsRepository);
+});
diff --git a/modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/providers/take_picture_use_case_provider.dart b/modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/providers/take_picture_use_case_provider.dart
new file mode 100644
index 00000000..01ab9f5e
--- /dev/null
+++ b/modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/providers/take_picture_use_case_provider.dart
@@ -0,0 +1,9 @@
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:device_management/src/core/providers/functions_repository_provider.dart';
+import 'package:device_management/src/features/remote_connection/domain/take_picture_use_case.dart';
+import 'package:device_management/src/features/remote_connection/domain/take_picture_use_case_impl.dart';
+
+final takePictureUseCaseProvider = Provider.autoDispose((ref) {
+ final functionsRepository = ref.read(functionsRepositoryProvider);
+ return TakePictureUseCaseImpl(functionsRepository);
+});
diff --git a/modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/remote_camera_screen.dart b/modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/remote_camera_screen.dart
similarity index 94%
rename from modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/remote_camera_screen.dart
rename to modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/remote_camera_screen.dart
index 8f4c77b8..f37d8907 100644
--- a/modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/remote_camera_screen.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/remote_camera_screen.dart
@@ -1,8 +1,8 @@
import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:functions/src/features/remote_connection/presentation/state/remote_connection_view_model.dart';
-import 'package:functions/src/features/remote_connection/presentation/widgets/show_picture_dialog.dart';
+import 'package:device_management/src/features/remote_connection/presentation/state/remote_connection_view_model.dart';
+import 'package:device_management/src/features/remote_connection/presentation/widgets/show_picture_dialog.dart';
import 'package:navigation/navigation.dart';
import 'package:sf_localizations/sf_localizations.dart';
import 'package:utils/utils.dart';
diff --git a/modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/remote_connection_screen.dart b/modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/remote_connection_screen.dart
similarity index 92%
rename from modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/remote_connection_screen.dart
rename to modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/remote_connection_screen.dart
index a5d19125..084013be 100644
--- a/modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/remote_connection_screen.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/remote_connection_screen.dart
@@ -1,8 +1,8 @@
import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:functions/src/features/remote_connection/presentation/remote_camera_screen.dart';
-import 'package:functions/src/features/remote_connection/presentation/widgets/spy_call_dialog.dart';
+import 'package:device_management/src/features/remote_connection/presentation/remote_camera_screen.dart';
+import 'package:device_management/src/features/remote_connection/presentation/widgets/spy_call_dialog.dart';
import 'package:legacy_shared/legacy_shared.dart';
import 'package:navigation/navigation.dart';
import 'package:sf_localizations/sf_localizations.dart';
diff --git a/modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/state/remote_connection_view_model.dart b/modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/state/remote_connection_view_model.dart
similarity index 81%
rename from modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/state/remote_connection_view_model.dart
rename to modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/state/remote_connection_view_model.dart
index 96ab5dfa..425de315 100644
--- a/modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/state/remote_connection_view_model.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/state/remote_connection_view_model.dart
@@ -1,11 +1,11 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:functions/src/features/remote_connection/domain/entities/picture_entity.dart';
-import 'package:functions/src/features/remote_connection/domain/get_pictures_use_case.dart';
-import 'package:functions/src/features/remote_connection/domain/take_picture_use_case.dart';
-import 'package:functions/src/features/remote_connection/presentation/providers/get_pictures_use_case_provider.dart';
-import 'package:functions/src/features/remote_connection/presentation/providers/take_picture_use_case_provider.dart';
-import 'package:functions/src/features/remote_connection/presentation/state/remote_connection_view_state.dart';
+import 'package:device_management/src/features/remote_connection/domain/entities/picture_entity.dart';
+import 'package:device_management/src/features/remote_connection/domain/get_pictures_use_case.dart';
+import 'package:device_management/src/features/remote_connection/domain/take_picture_use_case.dart';
+import 'package:device_management/src/features/remote_connection/presentation/providers/get_pictures_use_case_provider.dart';
+import 'package:device_management/src/features/remote_connection/presentation/providers/take_picture_use_case_provider.dart';
+import 'package:device_management/src/features/remote_connection/presentation/state/remote_connection_view_state.dart';
import 'package:legacy_shared/legacy_shared.dart';
final remoteConnectionViewModelProvider =
diff --git a/modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/state/remote_connection_view_state.dart b/modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/state/remote_connection_view_state.dart
similarity index 84%
rename from modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/state/remote_connection_view_state.dart
rename to modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/state/remote_connection_view_state.dart
index 4ea3be87..687e65d4 100644
--- a/modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/state/remote_connection_view_state.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/state/remote_connection_view_state.dart
@@ -1,5 +1,5 @@
import 'package:freezed_annotation/freezed_annotation.dart';
-import 'package:functions/src/features/remote_connection/domain/entities/picture_entity.dart';
+import 'package:device_management/src/features/remote_connection/domain/entities/picture_entity.dart';
part 'remote_connection_view_state.freezed.dart';
diff --git a/modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/state/remote_connection_view_state.freezed.dart b/modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/state/remote_connection_view_state.freezed.dart
similarity index 100%
rename from modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/state/remote_connection_view_state.freezed.dart
rename to modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/state/remote_connection_view_state.freezed.dart
diff --git a/modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/widgets/show_picture_dialog.dart b/modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/widgets/show_picture_dialog.dart
similarity index 91%
rename from modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/widgets/show_picture_dialog.dart
rename to modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/widgets/show_picture_dialog.dart
index b5eac26f..29f54a31 100644
--- a/modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/widgets/show_picture_dialog.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/widgets/show_picture_dialog.dart
@@ -2,8 +2,8 @@ import 'package:design_system/design_system.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:functions/src/features/remote_connection/domain/entities/picture_entity.dart';
-import 'package:functions/src/features/remote_connection/presentation/state/remote_connection_view_model.dart';
+import 'package:device_management/src/features/remote_connection/domain/entities/picture_entity.dart';
+import 'package:device_management/src/features/remote_connection/presentation/state/remote_connection_view_model.dart';
import 'package:utils/utils.dart';
class ShowPictureDialog extends ConsumerWidget {
diff --git a/modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/widgets/spy_call_dialog.dart b/modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/widgets/spy_call_dialog.dart
similarity index 97%
rename from modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/widgets/spy_call_dialog.dart
rename to modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/widgets/spy_call_dialog.dart
index 1e1da73a..98512933 100644
--- a/modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/widgets/spy_call_dialog.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/remote_connection/presentation/widgets/spy_call_dialog.dart
@@ -1,7 +1,7 @@
import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:functions/src/features/remote_connection/presentation/state/remote_connection_view_model.dart';
+import 'package:device_management/src/features/remote_connection/presentation/state/remote_connection_view_model.dart';
import 'package:sf_localizations/sf_localizations.dart';
import 'package:utils/utils.dart';
diff --git a/modules/legacy/modules/functions/lib/src/features/remote_connection/remote_connection_builder.dart b/modules/legacy/modules/device_management/lib/src/features/remote_connection/remote_connection_builder.dart
similarity index 82%
rename from modules/legacy/modules/functions/lib/src/features/remote_connection/remote_connection_builder.dart
rename to modules/legacy/modules/device_management/lib/src/features/remote_connection/remote_connection_builder.dart
index db019964..6c7e29d0 100644
--- a/modules/legacy/modules/functions/lib/src/features/remote_connection/remote_connection_builder.dart
+++ b/modules/legacy/modules/device_management/lib/src/features/remote_connection/remote_connection_builder.dart
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
-import 'package:functions/src/features/remote_connection/presentation/remote_connection_screen.dart';
+import 'package:device_management/src/features/remote_connection/presentation/remote_connection_screen.dart';
import 'package:go_router/go_router.dart';
import 'package:get_it/get_it.dart';
import 'package:navigation/navigation.dart';
diff --git a/modules/legacy/modules/functions/melos_functions.iml b/modules/legacy/modules/device_management/melos_device_management.iml
similarity index 100%
rename from modules/legacy/modules/functions/melos_functions.iml
rename to modules/legacy/modules/device_management/melos_device_management.iml
diff --git a/modules/legacy/modules/device_management/melos_functions.iml b/modules/legacy/modules/device_management/melos_functions.iml
new file mode 100644
index 00000000..9fc8ce79
--- /dev/null
+++ b/modules/legacy/modules/device_management/melos_functions.iml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/legacy/modules/functions/pubspec.lock b/modules/legacy/modules/device_management/pubspec.lock
similarity index 100%
rename from modules/legacy/modules/functions/pubspec.lock
rename to modules/legacy/modules/device_management/pubspec.lock
diff --git a/modules/legacy/modules/functions/pubspec.yaml b/modules/legacy/modules/device_management/pubspec.yaml
similarity index 99%
rename from modules/legacy/modules/functions/pubspec.yaml
rename to modules/legacy/modules/device_management/pubspec.yaml
index 3f784c19..4648f90b 100644
--- a/modules/legacy/modules/functions/pubspec.yaml
+++ b/modules/legacy/modules/device_management/pubspec.yaml
@@ -1,4 +1,4 @@
-name: functions
+name: device_management
description: "A new Flutter project."
# The following defines the version and build number for your application.
diff --git a/modules/legacy/modules/functions/pubspec_overrides.yaml b/modules/legacy/modules/device_management/pubspec_overrides.yaml
similarity index 100%
rename from modules/legacy/modules/functions/pubspec_overrides.yaml
rename to modules/legacy/modules/device_management/pubspec_overrides.yaml
diff --git a/modules/legacy/modules/functions/lib/src/core/providers/functions_repository_provider.dart b/modules/legacy/modules/functions/lib/src/core/providers/functions_repository_provider.dart
deleted file mode 100644
index 325fa7f8..00000000
--- a/modules/legacy/modules/functions/lib/src/core/providers/functions_repository_provider.dart
+++ /dev/null
@@ -1,9 +0,0 @@
-import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:functions/src/core/providers/functions_remote_datasource_provider.dart';
-import 'package:functions/src/core/data/repositories/functions_repository_impl.dart';
-import 'package:functions/src/core/domain/repositories/functions_repository.dart';
-
-final functionsRepositoryProvider = Provider((ref) {
- final remote = ref.read(functionsRemoteDatasourceProvider);
- return FunctionsRepositoryImpl(remote);
-});
diff --git a/modules/legacy/modules/functions/lib/src/features/contacts/presentation/providers/get_contacts_use_case_provider.dart b/modules/legacy/modules/functions/lib/src/features/contacts/presentation/providers/get_contacts_use_case_provider.dart
deleted file mode 100644
index 913d152f..00000000
--- a/modules/legacy/modules/functions/lib/src/features/contacts/presentation/providers/get_contacts_use_case_provider.dart
+++ /dev/null
@@ -1,9 +0,0 @@
-import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:functions/src/core/providers/functions_repository_provider.dart';
-import 'package:functions/src/features/contacts/domain/get_contacts_use_case.dart';
-import 'package:functions/src/features/contacts/domain/get_contacts_use_case_impl.dart';
-
-final getContactsUseCaseProvider = Provider.autoDispose((ref) {
- final functionsRepository = ref.read(functionsRepositoryProvider);
- return GetContactsUseCaseImpl(functionsRepository);
-});
diff --git a/modules/legacy/modules/functions/lib/src/features/locate_device/presentation/providers/locate_device_use_case_provider.dart b/modules/legacy/modules/functions/lib/src/features/locate_device/presentation/providers/locate_device_use_case_provider.dart
deleted file mode 100644
index 05e7ac49..00000000
--- a/modules/legacy/modules/functions/lib/src/features/locate_device/presentation/providers/locate_device_use_case_provider.dart
+++ /dev/null
@@ -1,9 +0,0 @@
-import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:functions/src/core/providers/functions_repository_provider.dart';
-import 'package:functions/src/features/locate_device/domain/locate_device_use_case.dart';
-import 'package:functions/src/features/locate_device/domain/locate_device_use_case_impl.dart';
-
-final locateDeviceUseCaseProvider = Provider.autoDispose((ref) {
- final functionsRepository = ref.read(functionsRepositoryProvider);
- return LocateDeviceUseCaseImpl(functionsRepository);
-});
diff --git a/modules/legacy/modules/functions/lib/src/features/remote_connection/domain/take_picture_use_case.dart b/modules/legacy/modules/functions/lib/src/features/remote_connection/domain/take_picture_use_case.dart
deleted file mode 100644
index f994cd62..00000000
--- a/modules/legacy/modules/functions/lib/src/features/remote_connection/domain/take_picture_use_case.dart
+++ /dev/null
@@ -1,5 +0,0 @@
-import 'package:functions/src/features/remote_connection/domain/entities/picture_entity.dart';
-
-abstract class TakePictureUseCase {
- Future takePicture({required String userId});
-}
diff --git a/modules/legacy/modules/functions/lib/src/features/remote_connection/domain/take_picture_use_case_impl.dart b/modules/legacy/modules/functions/lib/src/features/remote_connection/domain/take_picture_use_case_impl.dart
deleted file mode 100644
index 3ab8c59c..00000000
--- a/modules/legacy/modules/functions/lib/src/features/remote_connection/domain/take_picture_use_case_impl.dart
+++ /dev/null
@@ -1,14 +0,0 @@
-import 'package:functions/src/core/domain/repositories/functions_repository.dart';
-import 'package:functions/src/features/remote_connection/domain/entities/picture_entity.dart';
-import 'package:functions/src/features/remote_connection/domain/take_picture_use_case.dart';
-
-class TakePictureUseCaseImpl implements TakePictureUseCase {
- TakePictureUseCaseImpl(this._repository);
-
- final FunctionsRepository _repository;
-
- @override
- Future takePicture({required String userId}) {
- return _repository.takePicture(userId: userId);
- }
-}
\ No newline at end of file
diff --git a/modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/providers/get_pictures_use_case_provider.dart b/modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/providers/get_pictures_use_case_provider.dart
deleted file mode 100644
index 47bcc413..00000000
--- a/modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/providers/get_pictures_use_case_provider.dart
+++ /dev/null
@@ -1,9 +0,0 @@
-import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:functions/src/core/providers/functions_repository_provider.dart';
-import 'package:functions/src/features/remote_connection/domain/get_pictures_use_case.dart';
-import 'package:functions/src/features/remote_connection/domain/get_pictures_use_case_impl.dart';
-
-final getPicturesUseCaseProvider = Provider.autoDispose((ref) {
- final functionsRepository = ref.read(functionsRepositoryProvider);
- return GetPicturesUseCaseImpl(functionsRepository);
-});
diff --git a/modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/providers/take_picture_use_case_provider.dart b/modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/providers/take_picture_use_case_provider.dart
deleted file mode 100644
index 9c46b688..00000000
--- a/modules/legacy/modules/functions/lib/src/features/remote_connection/presentation/providers/take_picture_use_case_provider.dart
+++ /dev/null
@@ -1,9 +0,0 @@
-import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:functions/src/core/providers/functions_repository_provider.dart';
-import 'package:functions/src/features/remote_connection/domain/take_picture_use_case.dart';
-import 'package:functions/src/features/remote_connection/domain/take_picture_use_case_impl.dart';
-
-final takePictureUseCaseProvider = Provider.autoDispose((ref) {
- final functionsRepository = ref.read(functionsRepositoryProvider);
- return TakePictureUseCaseImpl(functionsRepository);
-});
diff --git a/modules/legacy/modules/hub/lib/hub.dart b/modules/legacy/modules/hub/lib/hub.dart
deleted file mode 100644
index aecabee0..00000000
--- a/modules/legacy/modules/hub/lib/hub.dart
+++ /dev/null
@@ -1 +0,0 @@
-export 'src/features/hub/hub_builder.dart';
\ No newline at end of file
diff --git a/modules/legacy/modules/hub/lib/src/core/data/repositories/hub_repository_impl.dart b/modules/legacy/modules/hub/lib/src/core/data/repositories/hub_repository_impl.dart
deleted file mode 100644
index 4dbb96d2..00000000
--- a/modules/legacy/modules/hub/lib/src/core/data/repositories/hub_repository_impl.dart
+++ /dev/null
@@ -1,20 +0,0 @@
-import 'package:hub/src/core/data/datasource/hub_remote_datasource.dart';
-import 'package:hub/src/core/domain/repositories/hub_repository.dart';
-import 'package:hub/src/features/hub/domain/entities/position_entity.dart';
-import 'package:legacy_shared/legacy_shared.dart';
-
-class HomeRepositoryImpl implements HomeRepository {
- const HomeRepositoryImpl(this._remote);
-
- final HomeRemoteDatasource _remote;
-
- @override
- Future> getDevices({required String userId}) async {
- return _remote.getDevices(userId: userId);
- }
-
- @override
- Future> getLatestPositions({required String deviceId}) async {
- return _remote.getLatestPositions(deviceId: deviceId);
- }
-}
diff --git a/modules/legacy/modules/hub/lib/src/core/providers/hub_remote_datasource_provier.dart b/modules/legacy/modules/hub/lib/src/core/providers/hub_remote_datasource_provier.dart
deleted file mode 100644
index f390c698..00000000
--- a/modules/legacy/modules/hub/lib/src/core/providers/hub_remote_datasource_provier.dart
+++ /dev/null
@@ -1,9 +0,0 @@
-import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:hub/src/core/data/datasource/hub_remote_datasource.dart';
-import 'package:hub/src/core/data/datasource/hub_remote_datasource_impl.dart';
-import 'package:sf_infrastructure/sf_infrastructure.dart';
-
-final homeRemoteDatasourceProvider = Provider((ref) {
- final questiaRepository = getIt();
- return HomeRemoteDatasourceImpl(questiaRepository);
-});
diff --git a/modules/legacy/modules/hub/lib/src/core/providers/hub_repository_provider.dart b/modules/legacy/modules/hub/lib/src/core/providers/hub_repository_provider.dart
deleted file mode 100644
index b27525fb..00000000
--- a/modules/legacy/modules/hub/lib/src/core/providers/hub_repository_provider.dart
+++ /dev/null
@@ -1,9 +0,0 @@
-import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:hub/src/core/data/repositories/hub_repository_impl.dart';
-import 'package:hub/src/core/domain/repositories/hub_repository.dart';
-import 'package:hub/src/core/providers/hub_remote_datasource_provier.dart';
-
-final homeRepositoryProvider = Provider((ref) {
- final remote = ref.read(homeRemoteDatasourceProvider);
- return HomeRepositoryImpl(remote);
-});
diff --git a/modules/legacy/modules/hub/lib/src/features/hub/presentation/providers/get_devices_use_case_provider.dart b/modules/legacy/modules/hub/lib/src/features/hub/presentation/providers/get_devices_use_case_provider.dart
deleted file mode 100644
index 1779071f..00000000
--- a/modules/legacy/modules/hub/lib/src/features/hub/presentation/providers/get_devices_use_case_provider.dart
+++ /dev/null
@@ -1,10 +0,0 @@
-import 'package:hub/src/core/providers/hub_repository_provider.dart';
-import 'package:hub/src/features/hub/domain/get_devices_use_case.dart';
-import 'package:hub/src/features/hub/domain/get_devices_use_case_impl.dart';
-import 'package:flutter_riverpod/flutter_riverpod.dart';
-
-final getDevicesUseCaseProvider =
-Provider.autoDispose((ref) {
- final authRepository = ref.read(homeRepositoryProvider);
- return GetDevicesUseCaseImpl(authRepository);
-});
diff --git a/modules/legacy/modules/hub/lib/src/features/hub/presentation/providers/get_latest_positions_use_case_provider.dart b/modules/legacy/modules/hub/lib/src/features/hub/presentation/providers/get_latest_positions_use_case_provider.dart
deleted file mode 100644
index fa7ca0e4..00000000
--- a/modules/legacy/modules/hub/lib/src/features/hub/presentation/providers/get_latest_positions_use_case_provider.dart
+++ /dev/null
@@ -1,10 +0,0 @@
-import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:hub/src/core/providers/hub_repository_provider.dart';
-import 'package:hub/src/features/hub/domain/get_latest_positions_use_case.dart';
-import 'package:hub/src/features/hub/domain/get_latest_positions_use_case_impl.dart';
-
-final getLatestPositionsUseCaseProvider =
-Provider.autoDispose((ref) {
- final authRepository = ref.read(homeRepositoryProvider);
- return GetLatestPositionsUseCaseImpl(authRepository);
-});
diff --git a/modules/legacy/modules/legacy_dashboard_shell/pubspec.yaml b/modules/legacy/modules/legacy_dashboard_shell/pubspec.yaml
index f62a16a0..b5e30c7a 100644
--- a/modules/legacy/modules/legacy_dashboard_shell/pubspec.yaml
+++ b/modules/legacy/modules/legacy_dashboard_shell/pubspec.yaml
@@ -14,8 +14,8 @@ dependencies:
sdk: flutter
#modules dependencies go here
- hub:
- path: ../../modules/hub
+ control_panel:
+ path: ../../modules/control_panel
#packages dependencies go here
design_system:
path: ../../../../packages/design_system
diff --git a/modules/legacy/modules/legacy_dashboard_shell/pubspec_overrides.yaml b/modules/legacy/modules/legacy_dashboard_shell/pubspec_overrides.yaml
index 0fe762a3..a13e4121 100644
--- a/modules/legacy/modules/legacy_dashboard_shell/pubspec_overrides.yaml
+++ b/modules/legacy/modules/legacy_dashboard_shell/pubspec_overrides.yaml
@@ -1,9 +1,11 @@
-# melos_managed_dependency_overrides: activity,auth,dashboard_shell,design_system,flutter_treezor_entrust_sdk_bridge,fonts,home,hub,legacy_shared,navigation,notifications,payments,profile,sca_treezor,sf_infrastructure,sf_localizations,sf_shared,utils
+# melos_managed_dependency_overrides: activity,auth,dashboard_shell,design_system,flutter_treezor_entrust_sdk_bridge,fonts,home,legacy_shared,navigation,notifications,payments,profile,sca_treezor,sf_infrastructure,sf_localizations,sf_shared,utils,control_panel
dependency_overrides:
activity:
path: ../../../activity
auth:
path: ../../../auth
+ control_panel:
+ path: ../control_panel
dashboard_shell:
path: ../../../dashboard_shell
design_system:
@@ -14,8 +16,6 @@ dependency_overrides:
path: ../../../../packages/fonts
home:
path: ../../../home
- hub:
- path: ../hub
legacy_shared:
path: ../../packages/legacy_shared
navigation:
diff --git a/packages/navigation/lib/app_routes.dart b/packages/navigation/lib/app_routes.dart
index 69cc0bf7..c2532849 100644
--- a/packages/navigation/lib/app_routes.dart
+++ b/packages/navigation/lib/app_routes.dart
@@ -40,22 +40,20 @@ class AppRoutes {
static const hipayWebView = '/hipay_webview';
static const legacy = '/legacy';
+ static const legacyDashboard = '$legacy/dashboard';
- static const customerService = '$legacy/customer_service';
+ static const controlPanel = '$legacyDashboard/control_panel';
+ static const customerService = '$controlPanel/customer_service';
- static const accountSettings = '$legacy/account_settings';
+ static const deviceManagement = '$legacyDashboard/device_management';
+ static const contacts = '$deviceManagement/contacts';
+ static const remoteConnection = '$deviceManagement/remote_connection';
+ static const locateDevice = '$deviceManagement/locate_device';
+
+ static const accountSettings = '$controlPanel/account_settings';
static const personalData = '$accountSettings/personal_data';
static const changePassword = '$accountSettings/change_password';
static const linkedDevices = '$accountSettings/linked_devices';
static const appUsers = '$accountSettings/app_users';
static const deleteAccount = '$accountSettings/delete_account';
-
- static const legacyDashboard = '$legacy/dashboard';
-
- static const dashboardHub = '$legacyDashboard/hub';
- static const dashboardFunctions = '$legacyDashboard/functions';
-
- static const contacts = '$dashboardFunctions/contacts';
- static const remoteConnection = '$dashboardFunctions/remote_connection';
- static const locateDevice = '$dashboardFunctions/locateDevice';
}