diff --git a/.idea/CBJ_App.iml b/.idea/CBJ_App.iml index 36455ff6c..bf261f5d6 100644 --- a/.idea/CBJ_App.iml +++ b/.idea/CBJ_App.iml @@ -168,6 +168,18 @@ + + + + + + + + + + + + diff --git a/lib/domain/cbj_comp/cbj_comp_entity.dart b/lib/domain/cbj_comp/cbj_comp_entity.dart index f404caf09..9a4d1bf78 100644 --- a/lib/domain/cbj_comp/cbj_comp_entity.dart +++ b/lib/domain/cbj_comp/cbj_comp_entity.dart @@ -1,3 +1,4 @@ +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/cbj_comp/cbj_comp_failures.dart'; import 'package:cybearjinni/domain/cbj_comp/cbj_comp_value_objects.dart'; diff --git a/lib/domain/cbj_comp/cbj_comp_validators.dart b/lib/domain/cbj_comp/cbj_comp_validators.dart index dd19d3493..b1f2ab68b 100644 --- a/lib/domain/cbj_comp/cbj_comp_validators.dart +++ b/lib/domain/cbj_comp/cbj_comp_validators.dart @@ -1,3 +1,4 @@ +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/cbj_comp/cbj_comp_failures.dart'; import 'package:dartz/dartz.dart'; diff --git a/lib/domain/cbj_comp/cbj_comp_value_objects.dart b/lib/domain/cbj_comp/cbj_comp_value_objects.dart index bf4e491f8..ea05e28a7 100644 --- a/lib/domain/cbj_comp/cbj_comp_value_objects.dart +++ b/lib/domain/cbj_comp/cbj_comp_value_objects.dart @@ -1,3 +1,4 @@ +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/cbj_comp/cbj_comp_errors.dart'; import 'package:cybearjinni/domain/cbj_comp/cbj_comp_failures.dart'; @@ -5,7 +6,7 @@ import 'package:cybearjinni/domain/cbj_comp/cbj_comp_validators.dart'; import 'package:dartz/dartz.dart'; import 'package:flutter/foundation.dart'; import 'package:kt_dart/collection.dart'; -// ignore: depend_on_referenced_packages +// ignore: depend_on_referenced_packages a import 'package:uuid/uuid.dart'; @immutable diff --git a/lib/domain/cbj_comp/i_cbj_comp_repository.dart b/lib/domain/cbj_comp/i_cbj_comp_repository.dart index c4ef939d4..771e46af8 100644 --- a/lib/domain/cbj_comp/i_cbj_comp_repository.dart +++ b/lib/domain/cbj_comp/i_cbj_comp_repository.dart @@ -1,5 +1,6 @@ import 'dart:async'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/cbj_comp/cbj_comp_entity.dart'; import 'package:cybearjinni/domain/cbj_comp/cbj_comp_failures.dart'; diff --git a/lib/domain/connections_service.dart b/lib/domain/connections_service.dart index 69cc00238..d5b4f6c7e 100644 --- a/lib/domain/connections_service.dart +++ b/lib/domain/connections_service.dart @@ -3,6 +3,7 @@ import 'dart:collection'; import 'dart:convert'; import 'dart:io'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:cybearjinni/infrastructure/core/injection.dart'; @@ -13,14 +14,16 @@ import 'package:flutter/foundation.dart'; import 'package:grpc/grpc.dart'; import 'package:location/location.dart'; import 'package:network_info_plus/network_info_plus.dart'; +// ignore: depend_on_referenced_packages a import 'package:network_tools_flutter/network_tools_flutter.dart'; +import 'package:path_provider/path_provider.dart'; import 'package:permission_handler/permission_handler.dart' as permission_handler; import 'package:rxdart/rxdart.dart'; part 'package:cybearjinni/infrastructure/connection_service/app_connection_service.dart'; -part 'package:cybearjinni/infrastructure/connection_service/hub_connection_service.dart'; part 'package:cybearjinni/infrastructure/connection_service/demo_connection_service.dart'; +part 'package:cybearjinni/infrastructure/connection_service/hub_connection_service.dart'; part 'package:cybearjinni/infrastructure/connection_service/none_connection_service.dart'; part 'package:cybearjinni/infrastructure/connection_service/remote_pipes_connection_service.dart'; @@ -75,7 +78,7 @@ abstract interface class ConnectionsService { void setEntityState(RequestActionObject action); - Future setEtitiesToArea(String areaId, HashSet entities); + Future setEntitiesToArea(String areaId, HashSet entities); Future> get getEntities; diff --git a/lib/domain/home_user/home_user_value_objects.dart b/lib/domain/home_user/home_user_value_objects.dart index 7e36a1129..b83c3e4ae 100644 --- a/lib/domain/home_user/home_user_value_objects.dart +++ b/lib/domain/home_user/home_user_value_objects.dart @@ -3,7 +3,7 @@ import 'package:cybearjinni/domain/home_user/home_user_failures.dart'; import 'package:cybearjinni/domain/home_user/home_user_validators.dart'; import 'package:dartz/dartz.dart'; import 'package:flutter/foundation.dart'; -// ignore: depend_on_referenced_packages +// ignore: depend_on_referenced_packages a import 'package:uuid/uuid.dart'; @immutable diff --git a/lib/domain/manage_network/i_manage_network_repository.dart b/lib/domain/manage_network/i_manage_network_repository.dart index 2ebc3093d..15d243d9c 100644 --- a/lib/domain/manage_network/i_manage_network_repository.dart +++ b/lib/domain/manage_network/i_manage_network_repository.dart @@ -1,5 +1,6 @@ import 'dart:io'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/home_user/home_user_failures.dart'; import 'package:cybearjinni/domain/manage_network/manage_network_entity.dart'; diff --git a/lib/domain/security_bear/i_security_bear_connection_repository.dart b/lib/domain/security_bear/i_security_bear_connection_repository.dart index 176d24b18..87090db63 100644 --- a/lib/domain/security_bear/i_security_bear_connection_repository.dart +++ b/lib/domain/security_bear/i_security_bear_connection_repository.dart @@ -1,5 +1,6 @@ import 'dart:io'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:cybearjinni/domain/cbj_comp/cbj_comp_entity.dart'; @@ -16,6 +17,7 @@ import 'package:dartz/dartz.dart'; import 'package:flutter/foundation.dart'; import 'package:location/location.dart'; import 'package:network_info_plus/network_info_plus.dart'; +// ignore: depend_on_referenced_packages a import 'package:network_tools_flutter/network_tools_flutter.dart'; import 'package:permission_handler/permission_handler.dart' as permission_handler; diff --git a/lib/domain/software_info/i_software_info_repository.dart b/lib/domain/software_info/i_software_info_repository.dart index bbe487adf..a83628070 100644 --- a/lib/domain/software_info/i_software_info_repository.dart +++ b/lib/domain/software_info/i_software_info_repository.dart @@ -1,5 +1,6 @@ import 'dart:io'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/security_bear/i_security_bear_connection_repository.dart'; import 'package:cybearjinni/domain/security_bear/security_bear_failures.dart'; diff --git a/lib/domain/software_info/software_info_entity.dart b/lib/domain/software_info/software_info_entity.dart index 53bf021c7..05b4482e5 100644 --- a/lib/domain/software_info/software_info_entity.dart +++ b/lib/domain/software_info/software_info_entity.dart @@ -1,3 +1,4 @@ +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/software_info/software_info_failures.dart'; import 'package:cybearjinni/domain/software_info/software_info_value_objects.dart'; diff --git a/lib/infrastructure/app_commands.dart b/lib/infrastructure/app_commands.dart index d89682c28..f48bdd09b 100644 --- a/lib/infrastructure/app_commands.dart +++ b/lib/infrastructure/app_commands.dart @@ -1,5 +1,6 @@ import 'dart:io'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:device_info_plus/device_info_plus.dart'; import 'package:path_provider/path_provider.dart'; diff --git a/lib/infrastructure/cbj_app_server_d.dart b/lib/infrastructure/cbj_app_server_d.dart index 4ff328c95..7cce666bf 100644 --- a/lib/infrastructure/cbj_app_server_d.dart +++ b/lib/infrastructure/cbj_app_server_d.dart @@ -1,5 +1,6 @@ import 'dart:async'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/infrastructure/core/logger.dart'; import 'package:grpc/grpc.dart'; diff --git a/lib/infrastructure/connection_service/app_connection_service.dart b/lib/infrastructure/connection_service/app_connection_service.dart index 39683f077..cb757ef38 100644 --- a/lib/infrastructure/connection_service/app_connection_service.dart +++ b/lib/infrastructure/connection_service/app_connection_service.dart @@ -43,7 +43,7 @@ class _AppConnectionService implements ConnectionsService { } @override - Future setEtitiesToArea(String areaId, HashSet entities) => + Future setEntitiesToArea(String areaId, HashSet entities) => IcSynchronizer().setEtitiesToArea(areaId, entities); @override diff --git a/lib/infrastructure/connection_service/demo_connection_service.dart b/lib/infrastructure/connection_service/demo_connection_service.dart index e3a87c1aa..3f106533b 100644 --- a/lib/infrastructure/connection_service/demo_connection_service.dart +++ b/lib/infrastructure/connection_service/demo_connection_service.dart @@ -46,7 +46,7 @@ class _DemoConnectionService implements ConnectionsService { Future setNewArea(AreaEntity area) async {} @override - Future setEtitiesToArea(String areaId, HashSet entities) async {} + Future setEntitiesToArea(String areaId, HashSet entities) async {} @override Future addScene(SceneCbjEntity scene) async {} diff --git a/lib/infrastructure/connection_service/hub_connection_service.dart b/lib/infrastructure/connection_service/hub_connection_service.dart index 0717f2ed1..6c41ba6f1 100644 --- a/lib/infrastructure/connection_service/hub_connection_service.dart +++ b/lib/infrastructure/connection_service/hub_connection_service.dart @@ -196,7 +196,6 @@ class _HubConnectionService implements ConnectionsService { logger.i('Hub Search subnet IP $subnet'); - // TODO: Search for hub final Stream devicesWithPort = HostScannerService.instance.scanDevicesForSinglePort( subnet, @@ -254,7 +253,7 @@ class _HubConnectionService implements ConnectionsService { Future setNewArea(AreaEntity area) async {} @override - Future setEtitiesToArea(String areaId, HashSet entities) async {} + Future setEntitiesToArea(String areaId, HashSet entities) async {} @override Future addScene(SceneCbjEntity scene) async {} @@ -263,11 +262,51 @@ class _HubConnectionService implements ConnectionsService { Future activateScene(String id) async {} @override - Future loginVendor(VendorLoginEntity value) async {} + Future loginVendor(VendorLoginEntity value) async { + appMessagesToHub.sink.add( + ClientStatusRequests( + sendingType: SendingType.vendorLoginType.name, + allRemoteCommands: jsonEncode(value.toInfrastructure().toJson()), + ), + ); + } @override - Future> getVendors() async => - IcSynchronizer().getVendors(); + Future> getVendors() async { + appMessagesToHub.sink.add( + ClientStatusRequests( + sendingType: SendingType.getAllSupportedVendors.name, + ), + ); + + List vendorList = []; + + await for (final RequestsAndStatusFromHub message + in hubMessagesToApp.stream) { + final SendingType sendingType = + SendingTypeExtension.fromString(message.sendingType); + if (sendingType != SendingType.getAllSupportedVendors) { + continue; + } + + try { + final List decodedJson = + jsonDecode(jsonDecode(message.allRemoteCommands) as String) + as List; + vendorList = decodedJson + .map( + (e) => + VendorEntityInformation.fromJson(e as Map), + ) + .toList(); + } catch (e) { + logger.e('Error converting vendors\n$e'); + } + break; + } + + return vendorList; + } @override Future connect({String? address}) async { diff --git a/lib/infrastructure/connection_service/none_connection_service.dart b/lib/infrastructure/connection_service/none_connection_service.dart index 7908507ee..60bb42e26 100644 --- a/lib/infrastructure/connection_service/none_connection_service.dart +++ b/lib/infrastructure/connection_service/none_connection_service.dart @@ -41,7 +41,7 @@ class _NoneConnectionService implements ConnectionsService { Future setNewArea(AreaEntity area) async {} @override - Future setEtitiesToArea(String areaId, HashSet entities) async {} + Future setEntitiesToArea(String areaId, HashSet entities) async {} @override Future> get getScenes async => HashMap(); diff --git a/lib/infrastructure/connection_service/remote_pipes_connection_service.dart b/lib/infrastructure/connection_service/remote_pipes_connection_service.dart index f39203aa7..adccbfc06 100644 --- a/lib/infrastructure/connection_service/remote_pipes_connection_service.dart +++ b/lib/infrastructure/connection_service/remote_pipes_connection_service.dart @@ -175,7 +175,7 @@ class _RemotePipesConnectionService implements ConnectionsService { Future setNewArea(AreaEntity area) async {} @override - Future setEtitiesToArea(String areaId, HashSet entities) async {} + Future setEntitiesToArea(String areaId, HashSet entities) async {} @override Future addScene(SceneCbjEntity scene) async {} diff --git a/lib/infrastructure/core/logger.dart b/lib/infrastructure/core/logger.dart index 2ce9dbbb3..2eeac9ebc 100644 --- a/lib/infrastructure/core/logger.dart +++ b/lib/infrastructure/core/logger.dart @@ -3,5 +3,5 @@ import 'package:logger/logger.dart'; /// Instance of logger for all the app final logger = Logger( filter: ProductionFilter(), - printer: PrettyPrinter(methodCount: 0, printTime: true), + printer: PrettyPrinter(methodCount: 0), ); diff --git a/lib/infrastructure/mqtt.dart b/lib/infrastructure/mqtt.dart index e0541a15e..8c6cdbc55 100644 --- a/lib/infrastructure/mqtt.dart +++ b/lib/infrastructure/mqtt.dart @@ -1,8 +1,9 @@ +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/infrastructure/core/logger.dart'; import 'package:mqtt_client/mqtt_client.dart'; import 'package:mqtt_client/mqtt_server_client.dart'; -// ignore: implementation_imports +// ignore: implementation_imports a import 'package:mqtt_client/src/observable/src/records.dart'; class MqttServerRepository extends IMqttServerRepository { diff --git a/lib/infrastructure/network_utilities_flutter.dart b/lib/infrastructure/network_utilities_flutter.dart index 552177b43..4ec5fe4c5 100644 --- a/lib/infrastructure/network_utilities_flutter.dart +++ b/lib/infrastructure/network_utilities_flutter.dart @@ -1,8 +1,11 @@ import 'dart:async'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; +// ignore: depend_on_referenced_packages a import 'package:network_tools_flutter/network_tools_flutter.dart' as network_flutter; +// ignore: depend_on_referenced_packages a import 'package:network_tools_flutter/network_tools_flutter.dart'; class NetworkUtilitiesFlutter extends NetworkUtilities { diff --git a/lib/infrastructure/security_bear_client/security_bear_server_client.dart b/lib/infrastructure/security_bear_client/security_bear_server_client.dart index 48627657b..0e2db115b 100644 --- a/lib/infrastructure/security_bear_client/security_bear_server_client.dart +++ b/lib/infrastructure/security_bear_client/security_bear_server_client.dart @@ -1,5 +1,6 @@ import 'dart:async'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/infrastructure/core/logger.dart'; import 'package:grpc/grpc.dart'; diff --git a/lib/main.dart b/lib/main.dart index a370484f6..e8091367f 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -2,7 +2,6 @@ import 'package:cybearjinni/infrastructure/core/injection.dart'; import 'package:cybearjinni/presentation/core/app_widget.dart'; import 'package:cybearjinni/presentation/core/routes/app_router.dart'; import 'package:dartz/dartz.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; Future main() async { @@ -10,42 +9,44 @@ Future main() async { WidgetsFlutterBinding.ensureInitialized(); - await EasyLocalization.ensureInitialized(); + // await EasyLocalization.ensureInitialized(); getIt.registerSingleton(AppRouter()); runApp( + AppWidget(), + /// Use https://lingohub.com/developers/supported-locales/language-designators-with-regions /// Or https://www.contentstack.com/docs/developers/multilingual-content/list-of-supported-languages/ /// To find your language letters, and add the file letters below - EasyLocalization( - supportedLocales: const [ - Locale('cs', 'CZ'), - Locale('de', 'DE'), - Locale('en', 'GB'), - Locale('en', 'US'), - Locale('es', 'CO'), - Locale('es', 'MX'), - Locale('fr', 'BE'), - Locale('fr', 'CA'), - Locale('fr', 'FR'), - Locale('ge', 'GE'), - Locale('he', 'IL'), - Locale('hi', 'IN'), - Locale('hr', 'HR'), - Locale('id', 'ID'), - Locale('it', 'IT'), - Locale('ka', 'GE'), - Locale('nb', 'NO'), - Locale('pt', 'BR'), - Locale('ru', 'RU'), - Locale('te', 'IN'), - Locale('th', 'TH'), - Locale('zh', 'TW'), - ], - path: 'assets/translations', - fallbackLocale: const Locale('en', 'US'), - child: AppWidget(), - ), + // EasyLocalization( + // supportedLocales: const [ + // Locale('cs', 'CZ'), + // Locale('de', 'DE'), + // Locale('en', 'GB'), + // Locale('en', 'US'), + // Locale('es', 'CO'), + // Locale('es', 'MX'), + // Locale('fr', 'BE'), + // Locale('fr', 'CA'), + // Locale('fr', 'FR'), + // Locale('ge', 'GE'), + // Locale('he', 'IL'), + // Locale('hi', 'IN'), + // Locale('hr', 'HR'), + // Locale('id', 'ID'), + // Locale('it', 'IT'), + // Locale('ka', 'GE'), + // Locale('nb', 'NO'), + // Locale('pt', 'BR'), + // Locale('ru', 'RU'), + // Locale('te', 'IN'), + // Locale('th', 'TH'), + // Locale('zh', 'TW'), + // ], + // path: 'assets/translations', + // fallbackLocale: const Locale('en', 'US'), + // child: AppWidget(), + // ), ); return unit; } diff --git a/lib/presentation/atoms/button_atom.dart b/lib/presentation/atoms/button_atom.dart index 5540d2f98..12ac63b8c 100644 --- a/lib/presentation/atoms/button_atom.dart +++ b/lib/presentation/atoms/button_atom.dart @@ -40,7 +40,7 @@ class ButtonWidgetAtom extends StatelessWidget { style: FilledButton.styleFrom().copyWith( alignment: Alignment.center, backgroundColor: disabled - ? MaterialStateProperty.all(colorScheme.surfaceVariant) + ? WidgetStateProperty.all(colorScheme.surfaceContainerHighest) : null, ), icon: Icon(icon), diff --git a/lib/presentation/atoms/scene_atom.dart b/lib/presentation/atoms/scene_atom.dart index 658d228e0..5929c57f3 100644 --- a/lib/presentation/atoms/scene_atom.dart +++ b/lib/presentation/atoms/scene_atom.dart @@ -1,3 +1,4 @@ +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; diff --git a/lib/presentation/atoms/switch_atom.dart b/lib/presentation/atoms/switch_atom.dart index ff531820e..d6f673739 100644 --- a/lib/presentation/atoms/switch_atom.dart +++ b/lib/presentation/atoms/switch_atom.dart @@ -1,3 +1,4 @@ +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:flutter/material.dart'; @@ -105,22 +106,22 @@ class _SwitchAtomState extends State { // borderRadius: 25.0, // padding: 0.0, // activeToggleColor: colorScheme.onPrimary, - // inactiveToggleColor: colorScheme.surfaceVariant, + // inactiveToggleColor: colorScheme.surfaceContainerHighest, // activeSwitchBorder: Border.all( - // color: colorScheme.onBackground, + // color: colorScheme.onSurface, // ), // inactiveSwitchBorder: Border.all( // color: colorScheme.outline, // ), // activeColor: colorScheme.secondary, - // inactiveColor: colorScheme.onBackground, + // inactiveColor: colorScheme.onSurface, // activeIcon: Icon( // activeIcon, // color: colorScheme.secondary, // ), // inactiveIcon: Icon( // inactiveIcon, - // color: colorScheme.onBackground, + // color: colorScheme.onSurface, // ), // onToggle: onToggle, // ), diff --git a/lib/presentation/atoms/text_atom.dart b/lib/presentation/atoms/text_atom.dart index 540164919..9268d3081 100644 --- a/lib/presentation/atoms/text_atom.dart +++ b/lib/presentation/atoms/text_atom.dart @@ -1,4 +1,3 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; class TextAtom extends StatelessWidget { @@ -39,7 +38,8 @@ class TextAtom extends StatelessWidget { } return Text( - translate && text.isNotEmpty ? text.tr(args: translationArgs) : text, + // translate && text.isNotEmpty ? text.tr(args: translationArgs) : text, + text, style: tempStyle, maxLines: maxLines, overflow: overflow, diff --git a/lib/presentation/atoms/text_form_field_atom.dart b/lib/presentation/atoms/text_form_field_atom.dart index 981245608..ca38edd5f 100644 --- a/lib/presentation/atoms/text_form_field_atom.dart +++ b/lib/presentation/atoms/text_form_field_atom.dart @@ -1,4 +1,3 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; class TextFormFieldAtom extends StatelessWidget { @@ -17,7 +16,8 @@ class TextFormFieldAtom extends StatelessWidget { return TextFormField( decoration: InputDecoration( prefixIcon: prefixIcon, - labelText: labelText?.tr(), + // labelText: labelText?.tr(), + labelText: labelText, ), autocorrect: false, onChanged: onChanged, diff --git a/lib/presentation/core/app_widget.dart b/lib/presentation/core/app_widget.dart index 833900cc4..1ecb5a81b 100644 --- a/lib/presentation/core/app_widget.dart +++ b/lib/presentation/core/app_widget.dart @@ -2,7 +2,6 @@ import 'package:auto_route/auto_route.dart'; import 'package:cybearjinni/infrastructure/core/injection.dart'; import 'package:cybearjinni/presentation/core/color_schemes.dart'; import 'package:cybearjinni/presentation/core/routes/app_router.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; class AppWidget extends StatelessWidget { @@ -41,9 +40,9 @@ class AppWidget extends StatelessWidget { pageTransitionsTheme: pageTransitionsTheme(), ), title: 'CyBear Jinni App', - localizationsDelegates: context.localizationDelegates, - supportedLocales: context.supportedLocales, - locale: context.locale, + // localizationsDelegates: context.localizationDelegates, + // supportedLocales: context.supportedLocales, + // locale: context.locale, debugShowCheckedModeBanner: false, ); } diff --git a/lib/presentation/core/color_schemes.dart b/lib/presentation/core/color_schemes.dart index 63db46fc2..3380b6e01 100644 --- a/lib/presentation/core/color_schemes.dart +++ b/lib/presentation/core/color_schemes.dart @@ -18,11 +18,9 @@ const lightColorScheme = ColorScheme( errorContainer: Color(0xFFFFDAD6), onError: Color(0xFFFFFFFF), onErrorContainer: Color(0xFF410002), - background: Color(0xFFFAFCFF), - onBackground: Color(0xFF001F2A), surface: Color(0xFFFAFCFF), onSurface: Color(0xFF001F2A), - surfaceVariant: Color(0xFFE3E1EC), + surfaceContainerHighest: Color(0xFFE3E1EC), onSurfaceVariant: Color(0xFF46464F), outline: Color(0xFF767680), onInverseSurface: Color(0xFFE1F4FF), @@ -52,11 +50,9 @@ const darkColorScheme = ColorScheme( errorContainer: Color(0xFF93000A), onError: Color(0xFF690005), onErrorContainer: Color(0xFFFFDAD6), - background: Color(0xFF001F2A), - onBackground: Color(0xFFBFE9FF), surface: Color(0xFF001F2A), onSurface: Color(0xFFBFE9FF), - surfaceVariant: Color(0xFF46464F), + surfaceContainerHighest: Color(0xFF46464F), onSurfaceVariant: Color(0xFFC6C5D0), outline: Color(0xFF90909A), onInverseSurface: Color(0xFF001F2A), diff --git a/lib/presentation/core/entities_utils.dart b/lib/presentation/core/entities_utils.dart index e3ef9a371..085f40640 100644 --- a/lib/presentation/core/entities_utils.dart +++ b/lib/presentation/core/entities_utils.dart @@ -1,3 +1,4 @@ +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; diff --git a/lib/presentation/core/theme_data.dart b/lib/presentation/core/theme_data.dart index 35cedfd02..2b2bfdb30 100644 --- a/lib/presentation/core/theme_data.dart +++ b/lib/presentation/core/theme_data.dart @@ -62,8 +62,8 @@ class BackgroundGradient { colors: [ Colors.deepPurple, Theme.of(context).colorScheme.secondary, - Colors.deepPurple.withOpacity(0.9), - Theme.of(context).colorScheme.secondary.withOpacity(0.9), + Colors.deepPurple.withAlpha((0.9 * 255).toInt()), + Theme.of(context).colorScheme.secondary.withAlpha((0.9 * 255).toInt()), Colors.deepPurple, ], ); diff --git a/lib/presentation/molecules/bottom_navigation_bar_molecule.dart b/lib/presentation/molecules/bottom_navigation_bar_molecule.dart index 2ba702744..2f9357e08 100644 --- a/lib/presentation/molecules/bottom_navigation_bar_molecule.dart +++ b/lib/presentation/molecules/bottom_navigation_bar_molecule.dart @@ -26,7 +26,7 @@ class BottomNavigationBarMolecule extends StatelessWidget { Align( alignment: Alignment.bottomLeft, child: Divider( - color: colorScheme.onBackground, + color: colorScheme.onSurface, height: 1, thickness: 0.5, ), diff --git a/lib/presentation/molecules/device_by_type_molecule.dart b/lib/presentation/molecules/device_by_type_molecule.dart index 17f6d75ac..160ac1352 100644 --- a/lib/presentation/molecules/device_by_type_molecule.dart +++ b/lib/presentation/molecules/device_by_type_molecule.dart @@ -1,3 +1,4 @@ +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/presentation/molecules/molecules.dart'; import 'package:flutter/material.dart'; diff --git a/lib/presentation/molecules/devices/ac_molecule.dart b/lib/presentation/molecules/devices/ac_molecule.dart index 28c8c6af7..b46460081 100644 --- a/lib/presentation/molecules/devices/ac_molecule.dart +++ b/lib/presentation/molecules/devices/ac_molecule.dart @@ -1,10 +1,10 @@ import 'dart:collection'; import 'package:another_flushbar/flushbar_helper.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; class AcMolecule extends StatefulWidget { @@ -19,7 +19,8 @@ class AcMolecule extends StatefulWidget { class _AcMoleculeState extends State { Future _turnOnAllAcs() async { FlushbarHelper.createLoading( - message: 'Turning_On_ac'.tr(), + // message: 'Turning_On_ac'.tr(), + message: 'Turning_On_ac', linearProgressIndicator: const LinearProgressIndicator(), ).show(context); @@ -29,7 +30,7 @@ class _AcMoleculeState extends State { void setEntityState(EntityActions action) { final HashSet entitiesId = - HashSet.from([widget.entity.entitiyCbjUniqueId.getOrCrash()]); + HashSet.from([widget.entity.entityCbjUniqueId.getOrCrash()]); ConnectionsService.instance.setEntityState( RequestActionObject( @@ -42,7 +43,8 @@ class _AcMoleculeState extends State { Future _turnOffAllAcs() async { FlushbarHelper.createLoading( - message: 'Turning_Off_ac'.tr(), + // message: 'Turning_Off_ac'.tr(), + message: 'Turning_Off_ac', linearProgressIndicator: const LinearProgressIndicator(), ).show(context); diff --git a/lib/presentation/molecules/devices/blind_molecule.dart b/lib/presentation/molecules/devices/blind_molecule.dart index f0387e654..35252c685 100644 --- a/lib/presentation/molecules/devices/blind_molecule.dart +++ b/lib/presentation/molecules/devices/blind_molecule.dart @@ -1,11 +1,11 @@ import 'dart:collection'; import 'package:another_flushbar/flushbar_helper.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:cybearjinni/presentation/molecules/molecules.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -23,7 +23,8 @@ class BlindMolecule extends StatefulWidget { class _BlindMoleculeState extends State { Future _moveUpAllBlinds() async { FlushbarHelper.createLoading( - message: 'Pulling_Up_all_blinds'.tr(), + // message: 'Pulling_Up_all_blinds'.tr(), + message: 'Pulling_Up_all_blinds', linearProgressIndicator: const LinearProgressIndicator(), ).show(context); @@ -32,7 +33,7 @@ class _BlindMoleculeState extends State { void setEntityState(EntityActions action) { final HashSet uniqueIdByVendor = - HashSet.from([widget.entity.entitiyCbjUniqueId.getOrCrash()]); + HashSet.from([widget.entity.entityCbjUniqueId.getOrCrash()]); ConnectionsService.instance.setEntityState( RequestActionObject( @@ -45,7 +46,8 @@ class _BlindMoleculeState extends State { Future _stopAllBlinds(List blindsIdToStop) async { FlushbarHelper.createLoading( - message: 'Stopping_all_blinds'.tr(), + // message: 'Stopping_all_blinds'.tr(), + message: 'Stopping_all_blinds', linearProgressIndicator: const LinearProgressIndicator(), ).show(context); @@ -54,7 +56,8 @@ class _BlindMoleculeState extends State { Future _moveDownAllBlinds(List blindsIdToTurnDown) async { FlushbarHelper.createLoading( - message: 'Pulling_down_all_blinds'.tr(), + // message: 'Pulling_down_all_blinds'.tr(), + message: 'Pulling_down_all_blinds', linearProgressIndicator: const LinearProgressIndicator(), ).show(context); @@ -91,10 +94,10 @@ class _BlindMoleculeState extends State { children: [ TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( colorScheme.surface, ), - side: MaterialStateProperty.all( + side: WidgetStateProperty.all( BorderSide.lerp( const BorderSide(color: Colors.white60), const BorderSide(color: Colors.white60), @@ -126,10 +129,10 @@ class _BlindMoleculeState extends State { ), TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( colorScheme.surface, ), - side: MaterialStateProperty.all( + side: WidgetStateProperty.all( BorderSide.lerp( const BorderSide(color: Colors.white60), const BorderSide(color: Colors.white60), @@ -161,10 +164,10 @@ class _BlindMoleculeState extends State { ), TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( colorScheme.surface, ), - side: MaterialStateProperty.all( + side: WidgetStateProperty.all( BorderSide.lerp( const BorderSide(color: Colors.white60), const BorderSide(color: Colors.white60), diff --git a/lib/presentation/molecules/devices/blinds_card_molecule.dart b/lib/presentation/molecules/devices/blinds_card_molecule.dart index 933d98d36..7ef37bd17 100644 --- a/lib/presentation/molecules/devices/blinds_card_molecule.dart +++ b/lib/presentation/molecules/devices/blinds_card_molecule.dart @@ -1,3 +1,4 @@ +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:flutter/material.dart'; diff --git a/lib/presentation/molecules/devices/boiler_molecule.dart b/lib/presentation/molecules/devices/boiler_molecule.dart index 549787838..00ecbdfa5 100644 --- a/lib/presentation/molecules/devices/boiler_molecule.dart +++ b/lib/presentation/molecules/devices/boiler_molecule.dart @@ -1,10 +1,10 @@ import 'dart:collection'; import 'package:another_flushbar/flushbar_helper.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; class BoilerMolecule extends StatefulWidget { @@ -19,7 +19,8 @@ class BoilerMolecule extends StatefulWidget { class _BoilerMoleculeState extends State { Future _turnOnAllBoilers() async { FlushbarHelper.createLoading( - message: 'Turning_On_boiler'.tr(), + // message: 'Turning_On_boiler'.tr(), + message: 'Turning_On_boiler', linearProgressIndicator: const LinearProgressIndicator(), ).show(context); @@ -29,7 +30,7 @@ class _BoilerMoleculeState extends State { void setEntityState(EntityActions action) { final HashSet uniqueIdByVendor = - HashSet.from([widget.entity.entitiyCbjUniqueId.getOrCrash()]); + HashSet.from([widget.entity.entityCbjUniqueId.getOrCrash()]); ConnectionsService.instance.setEntityState( RequestActionObject( @@ -42,7 +43,8 @@ class _BoilerMoleculeState extends State { Future _turnOffAllBoilers() async { FlushbarHelper.createLoading( - message: 'Turning_Off_boiler'.tr(), + // message: 'Turning_Off_boiler'.tr(), + message: 'Turning_Off_boiler', linearProgressIndicator: const LinearProgressIndicator(), ).show(context); diff --git a/lib/presentation/molecules/devices/dimmable_light_molecule.dart b/lib/presentation/molecules/devices/dimmable_light_molecule.dart index a19c0691c..12694663b 100644 --- a/lib/presentation/molecules/devices/dimmable_light_molecule.dart +++ b/lib/presentation/molecules/devices/dimmable_light_molecule.dart @@ -1,5 +1,6 @@ import 'dart:collection'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; @@ -72,7 +73,7 @@ class _DimmableLightMoleculeState extends State { HashMap? value, }) { final HashSet uniqueIdByVendor = - HashSet.from([widget.entity.entitiyCbjUniqueId.getOrCrash()]); + HashSet.from([widget.entity.entityCbjUniqueId.getOrCrash()]); ConnectionsService.instance.setEntityState( RequestActionObject( @@ -113,7 +114,7 @@ class _DimmableLightMoleculeState extends State { ), Expanded( child: Slider( - thumbColor: colorScheme.onBackground, + thumbColor: colorScheme.onSurface, activeColor: colorScheme.tertiary, inactiveColor: colorScheme.outline, value: brightness, diff --git a/lib/presentation/molecules/devices/light_card_molecule.dart b/lib/presentation/molecules/devices/light_card_molecule.dart index 379ecf1e2..e603abd87 100644 --- a/lib/presentation/molecules/devices/light_card_molecule.dart +++ b/lib/presentation/molecules/devices/light_card_molecule.dart @@ -1,3 +1,4 @@ +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:flutter/material.dart'; @@ -14,11 +15,11 @@ class LightCardMolecule extends StatelessWidget { if (value) { // await IDeviceRepository.instance.turnOnDevices( - // devicesId: [tempDeviceEntity.entitiyCbjUniqueId.getOrCrash()], + // devicesId: [tempDeviceEntity.entityCbjUniqueId.getOrCrash()], // ); } else { // await IDeviceRepository.instance.turnOffDevices( - // devicesId: [tempDeviceEntity.entitiyCbjUniqueId.getOrCrash()], + // devicesId: [tempDeviceEntity.entityCbjUniqueId.getOrCrash()], // ); } } diff --git a/lib/presentation/molecules/devices/light_molecule.dart b/lib/presentation/molecules/devices/light_molecule.dart index e7ebf8829..c791c0488 100644 --- a/lib/presentation/molecules/devices/light_molecule.dart +++ b/lib/presentation/molecules/devices/light_molecule.dart @@ -1,5 +1,6 @@ import 'dart:collection'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; @@ -18,7 +19,7 @@ class LightMolecule extends StatelessWidget { void setEntityState(EntityActions action) { final HashSet uniqueIdByVendor = - HashSet.from([entity.entitiyCbjUniqueId.getOrCrash()]); + HashSet.from([entity.entityCbjUniqueId.getOrCrash()]); ConnectionsService.instance.setEntityState( RequestActionObject( diff --git a/lib/presentation/molecules/devices/printer_molecule.dart b/lib/presentation/molecules/devices/printer_molecule.dart index de2d9f15d..30f518113 100644 --- a/lib/presentation/molecules/devices/printer_molecule.dart +++ b/lib/presentation/molecules/devices/printer_molecule.dart @@ -1,4 +1,5 @@ import 'package:another_flushbar/flushbar_helper.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:cybearjinni/presentation/molecules/molecules.dart'; @@ -38,10 +39,10 @@ class _PrinterMoleculeState extends State { widget.entity.cbjEntityName.getOrCrash()!, TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( Colors.grey, ), - side: MaterialStateProperty.all( + side: WidgetStateProperty.all( BorderSide.lerp( const BorderSide(color: Colors.white60), const BorderSide(color: Colors.white60), diff --git a/lib/presentation/molecules/devices/rgb_light_molecule.dart b/lib/presentation/molecules/devices/rgb_light_molecule.dart index 5a9cec312..615c16f38 100644 --- a/lib/presentation/molecules/devices/rgb_light_molecule.dart +++ b/lib/presentation/molecules/devices/rgb_light_molecule.dart @@ -1,5 +1,6 @@ import 'dart:collection'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; @@ -65,7 +66,7 @@ class _RgbwLightMoleculeState extends State { HashMap? value, }) { final HashSet uniqueIdByVendor = - HashSet.from([widget.entity.entitiyCbjUniqueId.getOrCrash()]); + HashSet.from([widget.entity.entityCbjUniqueId.getOrCrash()]); ConnectionsService.instance.setEntityState( RequestActionObject( @@ -109,7 +110,7 @@ class _RgbwLightMoleculeState extends State { const FaIcon(FontAwesomeIcons.solidSun), Expanded( child: Slider( - thumbColor: colorScheme.onBackground, + thumbColor: colorScheme.onSurface, activeColor: colorScheme.tertiary, inactiveColor: colorScheme.outline, value: brightness, @@ -198,7 +199,7 @@ class _LightColorMods extends State { HashMap? value, }) { final HashSet uniqueIdByVendor = - HashSet.from([widget.entity.entitiyCbjUniqueId.getOrCrash()]); + HashSet.from([widget.entity.entityCbjUniqueId.getOrCrash()]); ConnectionsService.instance.setEntityState( RequestActionObject( @@ -254,7 +255,7 @@ class _LightColorMods extends State { ), ), child: Slider( - activeColor: Colors.black.withOpacity(0.8), + activeColor: Colors.black.withAlpha((0.8 * 255).toInt()), value: colorTemperature.toDouble(), min: 900, max: 10000, @@ -303,14 +304,14 @@ class _LightColorMods extends State { style: OutlinedButton.styleFrom( backgroundColor: (colorMode == ColorMode.white) ? colorScheme.secondary - : colorScheme.background, + : colorScheme.surface, ), child: TextAtom( 'White', style: TextStyle( color: (colorMode == ColorMode.white) ? colorScheme.onSecondary - : colorScheme.onBackground, + : colorScheme.onSurface, fontSize: 18, ), ), @@ -320,14 +321,14 @@ class _LightColorMods extends State { style: OutlinedButton.styleFrom( backgroundColor: (colorMode == ColorMode.rgb) ? colorScheme.secondary - : colorScheme.background, + : colorScheme.surface, ), child: TextAtom( 'Color', style: TextStyle( color: (colorMode == ColorMode.rgb) ? colorScheme.onSecondary - : colorScheme.onBackground, + : colorScheme.onSurface, fontSize: 18, ), ), diff --git a/lib/presentation/molecules/devices/security_camera_molecule.dart b/lib/presentation/molecules/devices/security_camera_molecule.dart index ec964caea..6e254a4ca 100644 --- a/lib/presentation/molecules/devices/security_camera_molecule.dart +++ b/lib/presentation/molecules/devices/security_camera_molecule.dart @@ -1,5 +1,6 @@ import 'package:another_flushbar/flushbar_helper.dart'; import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:cybearjinni/presentation/core/routes/app_router.gr.dart'; @@ -37,10 +38,10 @@ class _SecurityCameraMoleculeState extends State { widget.entity.cbjEntityName.getOrCrash()!, TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( Colors.grey, ), - side: MaterialStateProperty.all( + side: WidgetStateProperty.all( BorderSide.lerp( const BorderSide(color: Colors.white60), const BorderSide(color: Colors.white60), diff --git a/lib/presentation/molecules/devices/smart_computer_molecule.dart b/lib/presentation/molecules/devices/smart_computer_molecule.dart index 373de1722..c8588da95 100644 --- a/lib/presentation/molecules/devices/smart_computer_molecule.dart +++ b/lib/presentation/molecules/devices/smart_computer_molecule.dart @@ -1,4 +1,5 @@ import 'package:another_flushbar/flushbar_helper.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:cybearjinni/presentation/molecules/molecules.dart'; @@ -54,10 +55,10 @@ class _SmartComputerMoleculeState extends State { children: [ TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( Colors.grey, ), - side: MaterialStateProperty.all( + side: WidgetStateProperty.all( BorderSide.lerp( const BorderSide(color: Colors.white60), const BorderSide(color: Colors.white60), @@ -87,10 +88,10 @@ class _SmartComputerMoleculeState extends State { ), TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( Colors.grey, ), - side: MaterialStateProperty.all( + side: WidgetStateProperty.all( BorderSide.lerp( const BorderSide(color: Colors.white60), const BorderSide(color: Colors.white60), diff --git a/lib/presentation/molecules/devices/smart_plug_molecule.dart b/lib/presentation/molecules/devices/smart_plug_molecule.dart index b87156307..b52eca302 100644 --- a/lib/presentation/molecules/devices/smart_plug_molecule.dart +++ b/lib/presentation/molecules/devices/smart_plug_molecule.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'dart:collection'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; @@ -28,7 +29,7 @@ class _SmartPlugsMoleculeState extends State { void setEntityState(EntityActions action) { final HashSet uniqueIdByVendor = - HashSet.from([widget.entity.entitiyCbjUniqueId.getOrCrash()]); + HashSet.from([widget.entity.entityCbjUniqueId.getOrCrash()]); ConnectionsService.instance.setEntityState( RequestActionObject( diff --git a/lib/presentation/molecules/devices/smart_tv_molecule.dart b/lib/presentation/molecules/devices/smart_tv_molecule.dart index d86063cca..6184a3c13 100644 --- a/lib/presentation/molecules/devices/smart_tv_molecule.dart +++ b/lib/presentation/molecules/devices/smart_tv_molecule.dart @@ -1,6 +1,7 @@ import 'dart:collection'; import 'package:another_flushbar/flushbar_helper.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; @@ -78,7 +79,7 @@ class _SmartTvMoleculeState extends State { HashMap? value, }) { final HashSet uniqueIdByVendor = - HashSet.from([widget.entity.entitiyCbjUniqueId.getOrCrash()]); + HashSet.from([widget.entity.entityCbjUniqueId.getOrCrash()]); ConnectionsService.instance.setEntityState( RequestActionObject( @@ -118,8 +119,8 @@ class _SmartTvMoleculeState extends State { ).show(context); setEntityState( - EntityProperties.speekers, - EntityActions.speek, + EntityProperties.speakers, + EntityActions.speak, value: HashMap.from({ActionValues.text: text}), ); } @@ -283,10 +284,10 @@ class _SmartTvMoleculeState extends State { const SeparatorAtom(), TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( Colors.grey, ), - side: MaterialStateProperty.all( + side: WidgetStateProperty.all( BorderSide.lerp( const BorderSide(color: Colors.white60), const BorderSide(color: Colors.white60), @@ -312,10 +313,10 @@ class _SmartTvMoleculeState extends State { const SeparatorAtom(variant: SeparatorVariant.closeWidgets), TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( Colors.grey, ), - side: MaterialStateProperty.all( + side: WidgetStateProperty.all( BorderSide.lerp( const BorderSide(color: Colors.white60), const BorderSide(color: Colors.white60), @@ -341,10 +342,10 @@ class _SmartTvMoleculeState extends State { const SeparatorAtom(), TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( Colors.grey, ), - side: MaterialStateProperty.all( + side: WidgetStateProperty.all( BorderSide.lerp( const BorderSide(color: Colors.white60), const BorderSide(color: Colors.white60), @@ -370,10 +371,10 @@ class _SmartTvMoleculeState extends State { const SeparatorAtom(), TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( Colors.grey, ), - side: MaterialStateProperty.all( + side: WidgetStateProperty.all( BorderSide.lerp( const BorderSide(color: Colors.white60), const BorderSide(color: Colors.white60), @@ -399,10 +400,10 @@ class _SmartTvMoleculeState extends State { const SeparatorAtom(), TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( Colors.grey, ), - side: MaterialStateProperty.all( + side: WidgetStateProperty.all( BorderSide.lerp( const BorderSide(color: Colors.white60), const BorderSide(color: Colors.white60), @@ -428,10 +429,10 @@ class _SmartTvMoleculeState extends State { const SeparatorAtom(), TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( Colors.grey, ), - side: MaterialStateProperty.all( + side: WidgetStateProperty.all( BorderSide.lerp( const BorderSide(color: Colors.white60), const BorderSide(color: Colors.white60), @@ -457,10 +458,10 @@ class _SmartTvMoleculeState extends State { const SeparatorAtom(variant: SeparatorVariant.closeWidgets), TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( Colors.grey, ), - side: MaterialStateProperty.all( + side: WidgetStateProperty.all( BorderSide.lerp( const BorderSide(color: Colors.white60), const BorderSide(color: Colors.white60), diff --git a/lib/presentation/molecules/devices/switch_molecule.dart b/lib/presentation/molecules/devices/switch_molecule.dart index bd139bc5b..6134e20a0 100644 --- a/lib/presentation/molecules/devices/switch_molecule.dart +++ b/lib/presentation/molecules/devices/switch_molecule.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'dart:collection'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; @@ -28,7 +29,7 @@ class _SwitchMoleculeState extends State { void setEntityState(EntityActions action) { final HashSet uniqueIdByVendor = - HashSet.from([widget.entity.entitiyCbjUniqueId.getOrCrash()]); + HashSet.from([widget.entity.entityCbjUniqueId.getOrCrash()]); ConnectionsService.instance.setEntityState( RequestActionObject( diff --git a/lib/presentation/molecules/insert_login_molecule.dart b/lib/presentation/molecules/insert_login_molecule.dart index bf48c7701..dea4836ed 100644 --- a/lib/presentation/molecules/insert_login_molecule.dart +++ b/lib/presentation/molecules/insert_login_molecule.dart @@ -1,3 +1,4 @@ +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:flutter/material.dart'; @@ -9,7 +10,7 @@ class InsertLoginMolecule extends StatefulWidget { required this.onChange, }); - final InsertloginMoleculeType type; + final InsertLoginMoleculeType type; final VendorsAndServices vendorsAndServices; final Function(VendorLoginEntity) onChange; @@ -45,6 +46,13 @@ class _InsertLoginMoleculeState extends State { widget.onChange(loginEntity); } + void onPairingCodeChange(String value) { + loginEntity = + loginEntityCopyWith(loginEntity: loginEntity, pairingCode: value); + + widget.onChange(loginEntity); + } + void onAuthTokenChange(String value) { loginEntity = loginEntityCopyWith(loginEntity: loginEntity, authToken: value); @@ -58,6 +66,7 @@ class _InsertLoginMoleculeState extends State { String? authToken, String? email, String? password, + String? pairingCode, }) => VendorLoginEntity( loginEntity.vendor, @@ -65,22 +74,23 @@ class _InsertLoginMoleculeState extends State { authToken: authToken ?? loginEntity.authToken, email: email ?? loginEntity.email, password: password ?? loginEntity.password, + pairingCode: pairingCode ?? loginEntity.pairingCode, ); @override Widget build(BuildContext context) { switch (widget.type) { - case InsertloginMoleculeType.authToken: + case InsertLoginMoleculeType.authToken: return TextFormFieldAtom( onChanged: onAuthTokenChange, labelText: 'Auth Token', ); - case InsertloginMoleculeType.apiKey: + case InsertLoginMoleculeType.apiKey: return TextFormFieldAtom( onChanged: onApiKeyChange, labelText: 'Api Key', ); - case InsertloginMoleculeType.emailAndPassword: + case InsertLoginMoleculeType.emailAndPassword: return Column( children: [ TextFormFieldAtom( @@ -93,12 +103,18 @@ class _InsertLoginMoleculeState extends State { ), ], ); + case InsertLoginMoleculeType.addDeviceByPairingCode: + return TextFormFieldAtom( + onChanged: onPairingCodeChange, + labelText: 'Pairing Code', + ); } } } -enum InsertloginMoleculeType { +enum InsertLoginMoleculeType { authToken, apiKey, emailAndPassword, + addDeviceByPairingCode, } diff --git a/lib/presentation/molecules/loading_page_molecule.dart b/lib/presentation/molecules/loading_page_molecule.dart index 1e58d68e4..9d34e317d 100644 --- a/lib/presentation/molecules/loading_page_molecule.dart +++ b/lib/presentation/molecules/loading_page_molecule.dart @@ -8,7 +8,7 @@ class LoadingPageMolecule extends StatelessWidget { final ColorScheme colorScheme = themeData.colorScheme; return Scaffold( - backgroundColor: colorScheme.background, + backgroundColor: colorScheme.surface, body: const CircularProgressIndicatorAtom(), ); } diff --git a/lib/presentation/molecules/permissions_dialog_molecule.dart b/lib/presentation/molecules/permissions_dialog_molecule.dart index 83e6e72a1..89766d502 100644 --- a/lib/presentation/molecules/permissions_dialog_molecule.dart +++ b/lib/presentation/molecules/permissions_dialog_molecule.dart @@ -2,7 +2,6 @@ import 'dart:io'; import 'package:cybearjinni/presentation/atoms/button_atom.dart'; import 'package:cybearjinni/presentation/atoms/separator_atom.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; void permsissionsDialog(BuildContext context) => showDialog( @@ -30,7 +29,8 @@ class PermsissionsDialogMolecule extends StatelessWidget { '2. Please make sure location is on and permission grented.', style: textTheme.labelLarge, textAlign: TextAlign.center, - ).tr(), + // ).tr(), + ), const SeparatorAtom(), ButtonWidgetAtom( variant: ButtonVariant.primary, diff --git a/lib/presentation/molecules/scenes_grid_molecule.dart b/lib/presentation/molecules/scenes_grid_molecule.dart index 3fcb78b1a..8266ff5b4 100644 --- a/lib/presentation/molecules/scenes_grid_molecule.dart +++ b/lib/presentation/molecules/scenes_grid_molecule.dart @@ -1,3 +1,4 @@ +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:flutter/material.dart'; diff --git a/lib/presentation/molecules/top_bar_molecule.dart b/lib/presentation/molecules/top_bar_molecule.dart index 640fea8b0..0be1282e5 100644 --- a/lib/presentation/molecules/top_bar_molecule.dart +++ b/lib/presentation/molecules/top_bar_molecule.dart @@ -51,8 +51,8 @@ class TopBarMolecule extends StatelessWidget { return SafeArea( child: ColoredBox( color: backgroundColor != null - ? backgroundColor!.withOpacity(0.72) - : colorScheme.background, + ? backgroundColor!.withAlpha((0.72 * 255).toInt()) + : colorScheme.surface, child: Container( margin: const EdgeInsets.fromLTRB(9, 3, 9, 0), child: Row( @@ -88,7 +88,7 @@ class TopBarMolecule extends StatelessWidget { width: 70, child: TextButton( style: ButtonStyle( - padding: MaterialStateProperty.all( + padding: WidgetStateProperty.all( EdgeInsets.zero, ), ), @@ -104,7 +104,7 @@ class TopBarMolecule extends StatelessWidget { width: 25, child: TextButton( style: ButtonStyle( - padding: MaterialStateProperty.all( + padding: WidgetStateProperty.all( EdgeInsets.zero, ), ), diff --git a/lib/presentation/organisms/devices_list_view_organism.dart b/lib/presentation/organisms/devices_list_view_organism.dart index 8a09e4f69..0ee9bd2fc 100644 --- a/lib/presentation/organisms/devices_list_view_organism.dart +++ b/lib/presentation/organisms/devices_list_view_organism.dart @@ -1,5 +1,6 @@ import 'dart:collection'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:cybearjinni/presentation/core/entities_utils.dart'; diff --git a/lib/presentation/organisms/empty_open_area_organism.dart b/lib/presentation/organisms/empty_open_area_organism.dart index e3d462738..d3a13c493 100644 --- a/lib/presentation/organisms/empty_open_area_organism.dart +++ b/lib/presentation/organisms/empty_open_area_organism.dart @@ -19,7 +19,7 @@ class EmptyOpenAreaOrganism extends StatelessWidget { ), ), TextButton( - onPressed: context.router.pop, + onPressed: context.router.maybePop, child: TextAtom( 'No device found', style: TextStyle( diff --git a/lib/presentation/organisms/open_area_organism.dart b/lib/presentation/organisms/open_area_organism.dart index 336000deb..0657def89 100644 --- a/lib/presentation/organisms/open_area_organism.dart +++ b/lib/presentation/organisms/open_area_organism.dart @@ -1,6 +1,7 @@ import 'dart:collection'; import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:cybearjinni/presentation/core/routes/app_router.gr.dart'; @@ -41,7 +42,7 @@ class _OpenAreaOrganismState extends State { ColoredBox( color: colorScheme.onPrimary, child: ExpansionTile( - backgroundColor: colorScheme.background, + backgroundColor: colorScheme.surface, title: Text( '${widget.entities.length} ${widget.entities.first.entityTypes.type.name}', ), diff --git a/lib/presentation/organisms/page_organism.dart b/lib/presentation/organisms/page_organism.dart index 500a13409..321923ca9 100644 --- a/lib/presentation/organisms/page_organism.dart +++ b/lib/presentation/organisms/page_organism.dart @@ -24,7 +24,7 @@ class PageOrganism extends StatelessWidget { pageName: pageName, backgroundColor: topBarColor, leftIcon: FontAwesomeIcons.arrowLeft, - leftIconFunction: (_) => context.router.pop(), + leftIconFunction: (_) => context.router.maybePop(), ), ), Expanded( diff --git a/lib/presentation/pages/add_action_page.dart b/lib/presentation/pages/add_action_page.dart index 9cdcbd276..e54668f81 100644 --- a/lib/presentation/pages/add_action_page.dart +++ b/lib/presentation/pages/add_action_page.dart @@ -1,6 +1,7 @@ import 'dart:collection'; import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:cybearjinni/presentation/core/snack_bar_service.dart'; @@ -218,7 +219,7 @@ class _AddActionPageState extends State { ), ); context.router - .pop(entityActionObject); + .maybePop(entityActionObject); }, child: const TextAtom( 'Done', diff --git a/lib/presentation/pages/add_binding_page.dart b/lib/presentation/pages/add_binding_page.dart index 86ffb5f20..493df6d7d 100644 --- a/lib/presentation/pages/add_binding_page.dart +++ b/lib/presentation/pages/add_binding_page.dart @@ -3,6 +3,7 @@ import 'dart:collection'; import 'package:adaptive_action_sheet/adaptive_action_sheet.dart'; import 'package:auto_route/auto_route.dart'; import 'package:auto_size_text/auto_size_text.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; @@ -22,13 +23,13 @@ class AddBindingPage extends StatefulWidget { class _AddBindingPageState extends State { void backButtonFunction(BuildContext context) { - context.router.pop(); + context.router.maybePop(); } @override void initState() { super.initState(); - initialzeEntities(); + initializeEntities(); } HashMap? entities; @@ -41,7 +42,7 @@ class _AddBindingPageState extends State { bool showErrorMessages = false; bool isSubmitting = false; - Future initialzeEntities() async { + Future initializeEntities() async { final HashMap entitiesTemp = await ConnectionsService.instance.getEntities; @@ -111,7 +112,7 @@ class _AddBindingPageState extends State { return Container( margin: const EdgeInsets.symmetric(vertical: 1), child: ColoredBox( - color: Colors.blue.withOpacity(0.3), + color: Colors.blue.withAlpha((0.3 * 255).toInt()), child: ListTile( leading: const FaIcon( FontAwesomeIcons.lightbulb, @@ -134,7 +135,8 @@ class _AddBindingPageState extends State { const SizedBox(height: 30), Container( decoration: BoxDecoration( - color: Colors.lightBlueAccent.withOpacity(0.5), + color: + Colors.lightBlueAccent.withAlpha((0.5 * 255).toInt()), // Red border with the width is equal to 5 border: Border.all(), ), @@ -201,7 +203,8 @@ class _AddBindingPageState extends State { const SizedBox(height: 10), Container( decoration: BoxDecoration( - color: Colors.lightBlueAccent.withOpacity(0.5), + color: + Colors.lightBlueAccent.withAlpha((0.5 * 255).toInt()), // Red border with the width is equal to 5 border: Border.all(), ), diff --git a/lib/presentation/pages/add_new_area_page.dart b/lib/presentation/pages/add_new_area_page.dart index ff981d3d3..257c8fad1 100644 --- a/lib/presentation/pages/add_new_area_page.dart +++ b/lib/presentation/pages/add_new_area_page.dart @@ -1,9 +1,9 @@ import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:cybearjinni/presentation/core/snack_bar_service.dart'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:multi_select_flutter/multi_select_flutter.dart'; @@ -129,12 +129,18 @@ class _AddNewAreaFormState extends State { const SizedBox( height: 30, ), + // MultiSelectDialogField( + // buttonText: const Text( + // 'Select_Purposes_Of_The_Area', + // ).tr(), MultiSelectDialogField( buttonText: const Text( 'Select_Purposes_Of_The_Area', - ).tr(), - cancelText: const Text('CANCEL').tr(), - confirmText: const Text('OK').tr(), + ), + // cancelText: const Text('CANCEL').tr(), + cancelText: const Text('CANCEL'), + // confirmText: const Text('OK').tr(), + confirmText: const Text('OK'), title: const TextAtom('Select'), items: purposesList.map((AreaPurposesTypes areaPurposeType) { @@ -146,7 +152,7 @@ class _AddNewAreaFormState extends State { if (a[0] == a[0].toUpperCase()) { areaNameEdited += ' '; } - // ignore: use_string_buffers + // ignore: use_string_buffers a areaNameEdited += a; } @@ -181,7 +187,7 @@ class _AddNewAreaFormState extends State { return; } - context.router.pop(); + context.router.maybePop(); }, child: const TextAtom('ADD'), ), diff --git a/lib/presentation/pages/add_new_devices_process/choose_device_vendor_to_add/choose_device_vendor_to_add_page.dart b/lib/presentation/pages/add_new_devices_process/choose_device_vendor_to_add/choose_device_vendor_to_add_page.dart index 8a0c24e90..aa03412c3 100644 --- a/lib/presentation/pages/add_new_devices_process/choose_device_vendor_to_add/choose_device_vendor_to_add_page.dart +++ b/lib/presentation/pages/add_new_devices_process/choose_device_vendor_to_add/choose_device_vendor_to_add_page.dart @@ -8,7 +8,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @RoutePage() class ChooseDeviceVendorToAddPage extends StatelessWidget { void backButtonFunction(BuildContext context) { - context.router.pop(); + context.router.maybePop(); } @override diff --git a/lib/presentation/pages/add_new_devices_process/choose_device_vendor_to_add/widgets/vendor_widget.dart b/lib/presentation/pages/add_new_devices_process/choose_device_vendor_to_add/widgets/vendor_widget.dart index f6053bd7a..075a7543e 100644 --- a/lib/presentation/pages/add_new_devices_process/choose_device_vendor_to_add/widgets/vendor_widget.dart +++ b/lib/presentation/pages/add_new_devices_process/choose_device_vendor_to_add/widgets/vendor_widget.dart @@ -1,4 +1,5 @@ import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:cybearjinni/presentation/core/routes/app_router.gr.dart'; @@ -29,7 +30,7 @@ class VendorWidget extends StatelessWidget { }, child: Container( height: 100, - color: HexColor('#C4C4C4').withOpacity(0.2), + color: HexColor('#C4C4C4').withAlpha((0.2 * 255).toInt()), padding: const EdgeInsets.symmetric(horizontal: 5), child: Row( children: [ diff --git a/lib/presentation/pages/add_new_devices_process/choose_device_vendor_to_add/widgets/vendors_list.dart b/lib/presentation/pages/add_new_devices_process/choose_device_vendor_to_add/widgets/vendors_list.dart index f59c6113f..64de4f5d4 100644 --- a/lib/presentation/pages/add_new_devices_process/choose_device_vendor_to_add/widgets/vendors_list.dart +++ b/lib/presentation/pages/add_new_devices_process/choose_device_vendor_to_add/widgets/vendors_list.dart @@ -1,3 +1,4 @@ +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; diff --git a/lib/presentation/pages/add_new_devices_process/computer_connection_check/computer_connection_check_page.dart b/lib/presentation/pages/add_new_devices_process/computer_connection_check/computer_connection_check_page.dart index 0d8200bac..b12c5c0ff 100644 --- a/lib/presentation/pages/add_new_devices_process/computer_connection_check/computer_connection_check_page.dart +++ b/lib/presentation/pages/add_new_devices_process/computer_connection_check/computer_connection_check_page.dart @@ -14,7 +14,7 @@ class ComputerConnectionCheckPage extends StatelessWidget { final CbjCompEntity cbjCompEntity; void leftIconFunction(BuildContext context) { - context.router.pop(); + context.router.maybePop(); } @override diff --git a/lib/presentation/pages/add_new_devices_process/computer_connection_check/widgets/computer_connection_check_widget.dart b/lib/presentation/pages/add_new_devices_process/computer_connection_check/widgets/computer_connection_check_widget.dart index 1b4237ce3..216dad142 100644 --- a/lib/presentation/pages/add_new_devices_process/computer_connection_check/widgets/computer_connection_check_widget.dart +++ b/lib/presentation/pages/add_new_devices_process/computer_connection_check/widgets/computer_connection_check_widget.dart @@ -1,4 +1,5 @@ import 'package:another_flushbar/flushbar_helper.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/cbj_comp/cbj_comp_entity.dart'; import 'package:cybearjinni/domain/cbj_comp/cbj_comp_failures.dart'; @@ -202,7 +203,7 @@ class _ComputerConnectionCheckWidgetState valueColor: const AlwaysStoppedAnimation(Colors.pink), backgroundColor: Theme.of(context).textTheme.bodyLarge!.color, - borderColor: Colors.red.withOpacity(0.9), + borderColor: Colors.red.withAlpha((0.9 * 255).toInt()), borderWidth: 4.0, center: const TextAtom( 'Loading...', diff --git a/lib/presentation/pages/add_new_devices_process/configure_new_cbj_comp/configure_new_cbj_comp_page.dart b/lib/presentation/pages/add_new_devices_process/configure_new_cbj_comp/configure_new_cbj_comp_page.dart index 86096e395..7fb3ad853 100644 --- a/lib/presentation/pages/add_new_devices_process/configure_new_cbj_comp/configure_new_cbj_comp_page.dart +++ b/lib/presentation/pages/add_new_devices_process/configure_new_cbj_comp/configure_new_cbj_comp_page.dart @@ -14,7 +14,7 @@ class ConfigureNewCbjCompPage extends StatelessWidget { final CbjCompEntity cbjCompEntity; void leftIconFunction(BuildContext context) { - context.router.pop(); + context.router.maybePop(); } @override diff --git a/lib/presentation/pages/add_new_devices_process/configure_new_cbj_comp/widgets/configure_new_cbj_comp_widget.dart b/lib/presentation/pages/add_new_devices_process/configure_new_cbj_comp/widgets/configure_new_cbj_comp_widget.dart index 59efb79fb..3e624199e 100644 --- a/lib/presentation/pages/add_new_devices_process/configure_new_cbj_comp/widgets/configure_new_cbj_comp_widget.dart +++ b/lib/presentation/pages/add_new_devices_process/configure_new_cbj_comp/widgets/configure_new_cbj_comp_widget.dart @@ -1,4 +1,5 @@ import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/cbj_comp/cbj_comp_entity.dart'; import 'package:cybearjinni/domain/cbj_comp/cbj_comp_failures.dart'; @@ -159,7 +160,7 @@ class _ConfigureNewCbjCompWidgetsState textEditingControllerTemp; widgetList.add( Container( - color: Colors.yellow.withOpacity(0.8), + color: Colors.yellow.withAlpha((0.8 * 255).toInt()), padding: const EdgeInsets.symmetric(vertical: 10), margin: const EdgeInsets.symmetric(vertical: 30), child: Column( @@ -214,7 +215,7 @@ class _ConfigureNewCbjCompWidgetsState ), decoration: InputDecoration( filled: true, - fillColor: Colors.black.withOpacity(0.2), + fillColor: Colors.black.withAlpha((0.2 * 255).toInt()), focusedBorder: OutlineInputBorder( borderSide: BorderSide( color: Theme.of(context).textTheme.bodyLarge!.color!, @@ -244,7 +245,7 @@ class _ConfigureNewCbjCompWidgetsState } else { widgetList.add( Container( - color: Colors.grey.withOpacity(0.3), + color: Colors.grey.withAlpha((0.3 * 255).toInt()), padding: const EdgeInsets.symmetric(vertical: 30), margin: const EdgeInsets.only(top: 20), child: Row( @@ -311,7 +312,7 @@ class _ConfigureNewCbjCompWidgetsState valueColor: const AlwaysStoppedAnimation(Colors.pink), backgroundColor: Theme.of(context).textTheme.bodyLarge!.color, - borderColor: Colors.red.withOpacity(0.9), + borderColor: Colors.red.withAlpha((0.9 * 255).toInt()), borderWidth: 4.0, center: const TextAtom( 'Loading...', diff --git a/lib/presentation/pages/add_new_devices_process/connect_to_home_wifi/connect_to_home_wifi_page.dart b/lib/presentation/pages/add_new_devices_process/connect_to_home_wifi/connect_to_home_wifi_page.dart index 127093b64..6d247d2c2 100644 --- a/lib/presentation/pages/add_new_devices_process/connect_to_home_wifi/connect_to_home_wifi_page.dart +++ b/lib/presentation/pages/add_new_devices_process/connect_to_home_wifi/connect_to_home_wifi_page.dart @@ -8,7 +8,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @RoutePage() class ConnectToHomeWifiPage extends StatelessWidget { void backButtonFunction(BuildContext context) { - context.router.pop(); + context.router.maybePop(); } @override diff --git a/lib/presentation/pages/add_new_devices_process/connect_to_home_wifi/widgets/connect_to_home_wifi_widget.dart b/lib/presentation/pages/add_new_devices_process/connect_to_home_wifi/widgets/connect_to_home_wifi_widget.dart index b3c168499..567a26ac9 100644 --- a/lib/presentation/pages/add_new_devices_process/connect_to_home_wifi/widgets/connect_to_home_wifi_widget.dart +++ b/lib/presentation/pages/add_new_devices_process/connect_to_home_wifi/widgets/connect_to_home_wifi_widget.dart @@ -93,7 +93,7 @@ class _ConnectToHomeWiFiWidgetState extends State { ), decoration: InputDecoration( filled: true, - fillColor: Colors.greenAccent.withOpacity(0.3), + fillColor: Colors.greenAccent.withAlpha((0.3 * 255).toInt()), prefixIcon: Icon( Icons.wifi, color: Theme.of(context).textTheme.bodyLarge!.color, @@ -121,7 +121,7 @@ class _ConnectToHomeWiFiWidgetState extends State { ), decoration: InputDecoration( filled: true, - fillColor: Colors.greenAccent.withOpacity(0.3), + fillColor: Colors.greenAccent.withAlpha((0.3 * 255).toInt()), prefixIcon: Icon( Icons.vpn_key, color: Theme.of(context).textTheme.bodyLarge!.color, @@ -142,7 +142,7 @@ class _ConnectToHomeWiFiWidgetState extends State { ), TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( Colors.pinkAccent, ), ), diff --git a/lib/presentation/pages/add_new_devices_process/open_access_point/open_access_pointi_page.dart b/lib/presentation/pages/add_new_devices_process/open_access_point/open_access_pointi_page.dart index b5e500cf2..eb694cccd 100644 --- a/lib/presentation/pages/add_new_devices_process/open_access_point/open_access_pointi_page.dart +++ b/lib/presentation/pages/add_new_devices_process/open_access_point/open_access_pointi_page.dart @@ -8,7 +8,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @RoutePage() class OpenAccessPointPage extends StatelessWidget { void backButtonFunction(BuildContext context) { - context.router.pop(); + context.router.maybePop(); } @override diff --git a/lib/presentation/pages/add_new_devices_process/open_access_point/widgets/open_access_point_widget.dart b/lib/presentation/pages/add_new_devices_process/open_access_point/widgets/open_access_point_widget.dart index 6e742a211..16190aaf4 100644 --- a/lib/presentation/pages/add_new_devices_process/open_access_point/widgets/open_access_point_widget.dart +++ b/lib/presentation/pages/add_new_devices_process/open_access_point/widgets/open_access_point_widget.dart @@ -82,7 +82,7 @@ class _OpenAccessPointWidgetState extends State { case OpenAccessPointState.initial: return TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( Colors.greenAccent, ), ), @@ -116,11 +116,14 @@ class _OpenAccessPointWidgetState extends State { height: 70, child: TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( Colors.black12, ), ), onPressed: () { + if (!mounted) { + return; + } FlutterClipboard.copy('CyBear Jinni').then( (value) => SnackBarService().show( context, @@ -157,7 +160,7 @@ class _OpenAccessPointWidgetState extends State { height: 70, child: TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( Colors.black12, ), ), @@ -227,7 +230,7 @@ class _OpenAccessPointWidgetState extends State { ), TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( Colors.greenAccent, ), ), diff --git a/lib/presentation/pages/add_new_devices_process/scan_for_new_cbj_comps/widgets/cbj_comp_card.dart b/lib/presentation/pages/add_new_devices_process/scan_for_new_cbj_comps/widgets/cbj_comp_card.dart index b46cace96..de93fb7dc 100644 --- a/lib/presentation/pages/add_new_devices_process/scan_for_new_cbj_comps/widgets/cbj_comp_card.dart +++ b/lib/presentation/pages/add_new_devices_process/scan_for_new_cbj_comps/widgets/cbj_comp_card.dart @@ -1,4 +1,5 @@ import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/cbj_comp/cbj_comp_entity.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; @@ -65,7 +66,7 @@ class CBJCompCard extends StatelessWidget { ), TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( Colors.greenAccent, ), ), diff --git a/lib/presentation/pages/add_new_devices_process/scan_for_new_cbj_comps/widgets/cbj_comp_card_with_devices_controll.dart b/lib/presentation/pages/add_new_devices_process/scan_for_new_cbj_comps/widgets/cbj_comp_card_with_devices_controll.dart index 4af47166e..108f15176 100644 --- a/lib/presentation/pages/add_new_devices_process/scan_for_new_cbj_comps/widgets/cbj_comp_card_with_devices_controll.dart +++ b/lib/presentation/pages/add_new_devices_process/scan_for_new_cbj_comps/widgets/cbj_comp_card_with_devices_controll.dart @@ -1,4 +1,5 @@ import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/cbj_comp/cbj_comp_entity.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; @@ -24,7 +25,7 @@ class CBJCompCardWithDevicesControll extends StatelessWidget { EntityTypes.undefined.toString()) { typesList.add( ColoredBox( - color: Colors.yellowAccent.withOpacity(0.3), + color: Colors.yellowAccent.withAlpha((0.3 * 255).toInt()), child: TextAtom( 'Type: ${deviceEntity.entityTypes.getOrCrash()}', style: TextStyle( @@ -36,7 +37,7 @@ class CBJCompCardWithDevicesControll extends StatelessWidget { } else { typesList.add( ColoredBox( - color: Colors.orange.withOpacity(0.3), + color: Colors.orange.withAlpha((0.3 * 255).toInt()), child: TextAtom( 'Type ${deviceEntity.entityTypes.getOrCrash()} is not supported', style: TextStyle( @@ -67,7 +68,7 @@ class CBJCompCardWithDevicesControll extends StatelessWidget { border: Border.all( color: Theme.of(context).textTheme.bodyLarge!.color!, ), - color: Colors.purpleAccent.withOpacity(0.2), + color: Colors.purpleAccent.withAlpha((0.2 * 255).toInt()), ), child: Column( children: [ @@ -89,7 +90,7 @@ class CBJCompCardWithDevicesControll extends StatelessWidget { ), TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( Colors.greenAccent, ), ), diff --git a/lib/presentation/pages/add_routine_page.dart b/lib/presentation/pages/add_routine_page.dart index 2bbfb9263..cf4cb0341 100644 --- a/lib/presentation/pages/add_routine_page.dart +++ b/lib/presentation/pages/add_routine_page.dart @@ -3,6 +3,7 @@ import 'dart:collection'; import 'package:adaptive_action_sheet/adaptive_action_sheet.dart'; import 'package:auto_route/auto_route.dart'; import 'package:auto_size_text/auto_size_text.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; @@ -34,7 +35,7 @@ class _AddRoutinePageState extends State { @override void initState() { super.initState(); - initialzeEntities(); + initializeEntities(); } String? routineName; @@ -51,7 +52,7 @@ class _AddRoutinePageState extends State { bool isSubmitting = false; HashMap? entities; - Future initialzeEntities() async { + Future initializeEntities() async { final HashMap entitiesTemp = await ConnectionsService.instance.getEntities; @@ -88,7 +89,7 @@ class _AddRoutinePageState extends State { } void backButtonFunction(BuildContext context) { - context.router.pop(); + context.router.maybePop(); } @override @@ -135,7 +136,7 @@ class _AddRoutinePageState extends State { return Container( margin: const EdgeInsets.symmetric(vertical: 1), child: ColoredBox( - color: Colors.blue.withOpacity(0.3), + color: Colors.blue.withAlpha((0.3 * 255).toInt()), child: ListTile( leading: const FaIcon( FontAwesomeIcons.lightbulb, @@ -158,7 +159,8 @@ class _AddRoutinePageState extends State { const SizedBox(height: 30), Container( decoration: BoxDecoration( - color: Colors.lightBlueAccent.withOpacity(0.5), + color: + Colors.lightBlueAccent.withAlpha((0.5 * 255).toInt()), // Red border with the width is equal to 5 border: Border.all(), ), @@ -225,7 +227,8 @@ class _AddRoutinePageState extends State { const SizedBox(height: 10), Container( decoration: BoxDecoration( - color: Colors.lightBlueAccent.withOpacity(0.5), + color: + Colors.lightBlueAccent.withAlpha((0.5 * 255).toInt()), // Red border with the width is equal to 5 border: Border.all(), ), diff --git a/lib/presentation/pages/add_scene_page.dart b/lib/presentation/pages/add_scene_page.dart index 9cd4f1515..c2504cf2f 100644 --- a/lib/presentation/pages/add_scene_page.dart +++ b/lib/presentation/pages/add_scene_page.dart @@ -3,6 +3,7 @@ import 'dart:collection'; import 'package:adaptive_action_sheet/adaptive_action_sheet.dart'; import 'package:auto_route/auto_route.dart'; import 'package:auto_size_text/auto_size_text.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; @@ -24,7 +25,7 @@ class _AddScenePageState extends State { @override void initState() { super.initState(); - initialzeEntities(); + initializeEntities(); } String sceneName = ''; @@ -33,7 +34,7 @@ class _AddScenePageState extends State { /// List of devices with entities, will be treated as actions HashSet entitiesWithActions = HashSet(); - Future initialzeEntities() async { + Future initializeEntities() async { final HashMap entitiesTemp = await ConnectionsService.instance.getEntities; @@ -112,7 +113,7 @@ class _AddScenePageState extends State { return Container( margin: const EdgeInsets.symmetric(vertical: 1), child: ColoredBox( - color: Colors.blue.withOpacity(0.3), + color: Colors.blue.withAlpha((0.3 * 255).toInt()), child: ListTile( leading: FaIcon( EntitiesUtils.iconOfDeviceType( @@ -135,7 +136,7 @@ class _AddScenePageState extends State { const SizedBox(height: 30), DecoratedBox( decoration: BoxDecoration( - color: Colors.lightBlueAccent.withOpacity(0.5), + color: Colors.lightBlueAccent.withAlpha((0.5 * 255).toInt()), border: Border.all(), ), child: TextButton( @@ -196,13 +197,13 @@ class _AddScenePageState extends State { const SizedBox(height: 10), DecoratedBox( decoration: BoxDecoration( - color: Colors.lightBlueAccent.withOpacity(0.5), + color: Colors.lightBlueAccent.withAlpha((0.5 * 255).toInt()), // Red border with the width is equal to 5 border: Border.all(), ), child: TextButton( onPressed: () { - context.router.pop(); + context.router.maybePop(); SnackBarService().show( context, diff --git a/lib/presentation/pages/change_area_for_devices_page.dart b/lib/presentation/pages/change_area_for_devices_page.dart index 592ecb58f..62f1ac75f 100644 --- a/lib/presentation/pages/change_area_for_devices_page.dart +++ b/lib/presentation/pages/change_area_for_devices_page.dart @@ -1,6 +1,7 @@ import 'dart:collection'; import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; @@ -21,7 +22,7 @@ class ChangeAreaForDevicesPage extends StatelessWidget { TopBarMolecule( pageName: 'Change Area For Devices', leftIcon: FontAwesomeIcons.arrowLeft, - leftIconFunction: context.router.pop, + leftIconFunction: context.router.maybePop, ), ChangeAreaForDevicesWidget(), ], @@ -73,12 +74,12 @@ class _ChangeAreaForDevicesWidgetState }); } - Future _addEtitiesToArea() async { + Future _addEntitiesToArea() async { final String? id = selectedArea?.uniqueId.getOrCrash(); if (id == null) { return; } - ConnectionsService.instance.setEtitiesToArea(id, selectedEntities); + ConnectionsService.instance.setEntitiesToArea(id, selectedEntities); } void onAreaSelected(String? value) { @@ -184,7 +185,7 @@ class _ChangeAreaForDevicesWidgetState context, 'Changing devices for area', ); - _addEtitiesToArea(); + _addEntitiesToArea(); }, child: const TextAtom( 'Save', diff --git a/lib/presentation/pages/choose_automation_type_to_add_page.dart b/lib/presentation/pages/choose_automation_type_to_add_page.dart index 9f301304e..e62c8876b 100644 --- a/lib/presentation/pages/choose_automation_type_to_add_page.dart +++ b/lib/presentation/pages/choose_automation_type_to_add_page.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; @RoutePage() class ChooseAutomationTypeToAddPage extends StatelessWidget { void backButtonFunction(BuildContext context) { - context.router.pop(); + context.router.maybePop(); } @override diff --git a/lib/presentation/pages/comunication_method_page.dart b/lib/presentation/pages/comunication_method_page.dart index dde966f8c..561af5d75 100644 --- a/lib/presentation/pages/comunication_method_page.dart +++ b/lib/presentation/pages/comunication_method_page.dart @@ -1,4 +1,5 @@ import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; diff --git a/lib/presentation/pages/connect_to_hub/connect_to_hub_page.dart b/lib/presentation/pages/connect_to_hub/connect_to_hub_page.dart index feed20bd3..b9bd8462e 100644 --- a/lib/presentation/pages/connect_to_hub/connect_to_hub_page.dart +++ b/lib/presentation/pages/connect_to_hub/connect_to_hub_page.dart @@ -130,7 +130,8 @@ class ConnectToHubPage extends StatelessWidget { child: RichText( text: TextSpan( style: TextStyle( - color: Colors.white.withOpacity(0.9), + color: Colors.white + .withAlpha((0.9 * 255).toInt()), ), /*defining default style is optional */ children: const [ @@ -180,7 +181,8 @@ class ConnectToHubPage extends StatelessWidget { child: RichText( text: TextSpan( style: TextStyle( - color: Colors.white.withOpacity(0.9), + color: Colors.white + .withAlpha((0.9 * 255).toInt()), ), children: const [ TextSpan( diff --git a/lib/presentation/pages/connect_to_hub/widgets/cbj_hub_in_network_widget.dart b/lib/presentation/pages/connect_to_hub/widgets/cbj_hub_in_network_widget.dart index 111926335..6cb959f89 100644 --- a/lib/presentation/pages/connect_to_hub/widgets/cbj_hub_in_network_widget.dart +++ b/lib/presentation/pages/connect_to_hub/widgets/cbj_hub_in_network_widget.dart @@ -1,6 +1,7 @@ import 'dart:collection'; import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/infrastructure/core/logger.dart'; @@ -38,8 +39,9 @@ class _CbjHubInNetworkWidgetState extends State { ConnectionsService.setCurrentConnectionType( networkBssid: bssid, - connectionType: ConnectionType.appAsHub, + connectionType: ConnectionType.hub, ); + ConnectionsService.instance.connect(); bool foundEntity = false; ConnectionsService.instance.watchEntities().listen((event) { if (!mounted || foundEntity) { @@ -94,7 +96,7 @@ class _CbjHubInNetworkWidgetState extends State { ), TextButton( style: TextButton.styleFrom( - backgroundColor: Colors.white.withOpacity(0.8), + backgroundColor: Colors.white.withAlpha((0.8 * 255).toInt()), ), onPressed: () { _searchDevices(); diff --git a/lib/presentation/pages/connect_to_hub_more_page.dart b/lib/presentation/pages/connect_to_hub_more_page.dart index d5de65432..46b8aae98 100644 --- a/lib/presentation/pages/connect_to_hub_more_page.dart +++ b/lib/presentation/pages/connect_to_hub_more_page.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/infrastructure/core/logger.dart'; @@ -58,7 +59,7 @@ class ConnectToHubMorePage extends StatelessWidget { children: [ TextButton( onPressed: () async { - context.router.pop(); + context.router.maybePop(); }, style: TextButton.styleFrom( minimumSize: const Size(70, 30), @@ -199,7 +200,7 @@ class _ConnectToHubMoreWidgetState extends State { child: RichText( text: TextSpan( style: TextStyle( - color: Colors.white.withOpacity(0.9), + color: Colors.white.withAlpha((0.9 * 255).toInt()), ), children: const [ TextSpan( diff --git a/lib/presentation/pages/entities_in_area_page.dart b/lib/presentation/pages/entities_in_area_page.dart index ddb297c5b..5f88ba279 100644 --- a/lib/presentation/pages/entities_in_area_page.dart +++ b/lib/presentation/pages/entities_in_area_page.dart @@ -1,4 +1,5 @@ import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/circular_progress_indicator_atom.dart'; @@ -28,10 +29,10 @@ class _EntitiesInAreaPageState extends State { void initState() { super.initState(); showAllTypes = widget.entityTypes.isEmpty; - initialzeDevices(); + initializeDevices(); } - Future initialzeDevices() async { + Future initializeDevices() async { final Map entitiesMap = await ConnectionsService.instance.getEntities; final Set entityIdsInArea = diff --git a/lib/presentation/pages/entities_in_network_page.dart b/lib/presentation/pages/entities_in_network_page.dart index f2c608856..f1d2f747e 100644 --- a/lib/presentation/pages/entities_in_network_page.dart +++ b/lib/presentation/pages/entities_in_network_page.dart @@ -1,4 +1,5 @@ import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; @@ -55,7 +56,7 @@ class _EntitiesInNetworkPageState extends State { return Scaffold( appBar: AppBar( title: const TextAtom('Add and Manage'), - backgroundColor: Colors.purple.withOpacity(0.7), + backgroundColor: Colors.purple.withAlpha((0.7 * 255).toInt()), ), body: Container( margin: AppThemeData.generalHorizontalEdgeInsets, diff --git a/lib/presentation/pages/home_page/home_page.dart b/lib/presentation/pages/home_page/home_page.dart index 2fdca4388..fd899a6f7 100644 --- a/lib/presentation/pages/home_page/home_page.dart +++ b/lib/presentation/pages/home_page/home_page.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'dart:collection'; import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; @@ -80,10 +81,10 @@ class _HomePageState extends State { areas!.addEntries([areaEntery]); }); }); - _initialzeAreas(); + _initializeAreas(); } - Future _initialzeAreas() async { + Future _initializeAreas() async { final HashMap areasTemp = await ConnectionsService.instance.getAreas; setState(() { @@ -109,10 +110,10 @@ class _HomePageState extends State { entities!.addEntries([entityEntery]); }); }); - _initialzeEntities(); + _initializeEntities(); } - Future _initialzeEntities() async { + Future _initializeEntities() async { final HashMap entitiesTemp = await ConnectionsService.instance.getEntities; entitiesTemp.removeWhere( @@ -226,8 +227,8 @@ class _HomePageState extends State { await context.router.push(const PlusButtonRoute()); areas = null; entities = null; - _initialzeAreas(); - _initialzeEntities(); + _initializeAreas(); + _initializeEntities(); initializedScenes(); }, diff --git a/lib/presentation/pages/home_page/tabs/scenes_in_folders_tab.dart b/lib/presentation/pages/home_page/tabs/scenes_in_folders_tab.dart index c4db6287c..b565cabe4 100644 --- a/lib/presentation/pages/home_page/tabs/scenes_in_folders_tab.dart +++ b/lib/presentation/pages/home_page/tabs/scenes_in_folders_tab.dart @@ -1,6 +1,7 @@ import 'dart:collection'; import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:cybearjinni/presentation/core/routes/app_router.gr.dart'; @@ -33,14 +34,14 @@ class ScenesInFoldersTab extends StatelessWidget { ), borderRadius: const BorderRadius.all(Radius.circular(borderRadius)), border: Border.all( - color: Colors.black.withOpacity(0.7), + color: Colors.black.withAlpha((0.7 * 255).toInt()), width: 0.4, ), ), margin: const EdgeInsets.symmetric(vertical: 3, horizontal: 5), child: TextButton( style: ButtonStyle( - padding: MaterialStateProperty.all( + padding: WidgetStateProperty.all( EdgeInsets.zero, ), ), @@ -59,7 +60,8 @@ class ScenesInFoldersTab extends StatelessWidget { Container( width: double.infinity, decoration: BoxDecoration( - color: colorScheme.primaryContainer.withOpacity(0.7), + color: + colorScheme.primaryContainer.withAlpha((0.7 * 255).toInt()), borderRadius: const BorderRadius.only( bottomRight: Radius.circular(borderRadius), bottomLeft: Radius.circular(borderRadius), diff --git a/lib/presentation/pages/home_page/tabs/smart_devices_tab/areas_widgets/area_widget.dart b/lib/presentation/pages/home_page/tabs/smart_devices_tab/areas_widgets/area_widget.dart index f03b911cb..7b6c50d85 100644 --- a/lib/presentation/pages/home_page/tabs/smart_devices_tab/areas_widgets/area_widget.dart +++ b/lib/presentation/pages/home_page/tabs/smart_devices_tab/areas_widgets/area_widget.dart @@ -1,6 +1,7 @@ import 'dart:collection'; import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:cybearjinni/presentation/core/routes/app_router.gr.dart'; diff --git a/lib/presentation/pages/home_page/tabs/smart_devices_tab/areas_widgets/areas_list_view_widget.dart b/lib/presentation/pages/home_page/tabs/smart_devices_tab/areas_widgets/areas_list_view_widget.dart index ec395a85d..4cbad3fff 100644 --- a/lib/presentation/pages/home_page/tabs/smart_devices_tab/areas_widgets/areas_list_view_widget.dart +++ b/lib/presentation/pages/home_page/tabs/smart_devices_tab/areas_widgets/areas_list_view_widget.dart @@ -1,5 +1,6 @@ import 'dart:collection'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:cybearjinni/presentation/molecules/molecules.dart'; @@ -15,7 +16,7 @@ class AreasListViewWidget extends StatelessWidget { final HashMap entities; final HashMap areas; - HashMap> initialzeEntitiesByAreas() { + HashMap> initializeEntitiesByAreas() { final HashMap> devicesByAreas = HashMap(); devicesByAreas.addAll( @@ -27,7 +28,7 @@ class AreasListViewWidget extends StatelessWidget { @override Widget build(BuildContext context) { final HashMap> devicesByAreas = - initialzeEntitiesByAreas(); + initializeEntitiesByAreas(); return ListViewMolecule( ListViewVeriant.separated, diff --git a/lib/presentation/pages/home_page/tabs/smart_devices_tab/entities_by_area_tab.dart b/lib/presentation/pages/home_page/tabs/smart_devices_tab/entities_by_area_tab.dart index 318efca62..fe669cc0f 100644 --- a/lib/presentation/pages/home_page/tabs/smart_devices_tab/entities_by_area_tab.dart +++ b/lib/presentation/pages/home_page/tabs/smart_devices_tab/entities_by_area_tab.dart @@ -1,5 +1,6 @@ import 'dart:collection'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:cybearjinni/presentation/molecules/molecules.dart'; diff --git a/lib/presentation/pages/introduction_screen/introduction_screen_body.dart b/lib/presentation/pages/introduction_screen/introduction_screen_body.dart index 6fe7822e8..d0b979415 100644 --- a/lib/presentation/pages/introduction_screen/introduction_screen_body.dart +++ b/lib/presentation/pages/introduction_screen/introduction_screen_body.dart @@ -1,8 +1,4 @@ -import 'dart:collection'; - import 'package:auto_route/auto_route.dart'; -import 'package:cbj_integrations_controller/integrations_controller.dart'; -import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:cybearjinni/presentation/core/routes/app_router.gr.dart'; import 'package:cybearjinni/presentation/pages/introduction_screen/introductions_view_model_body/introduction_screen_body_about_page.dart'; @@ -115,15 +111,15 @@ class _IntroductionScreenBodyState extends State { style: textTheme.titleMedium!.copyWith(color: Colors.white), ), onDone: () async { - final HashMap entities = - await ConnectionsService.instance.getEntities; + // final HashMap entities = + // await ConnectionsService.instance.getEntities; if (!mounted) { return; } - if (entities.isNotEmpty) { - context.router.replace(const HomeRoute()); - return; - } + // if (entities.isNotEmpty) { + // context.router.replace(const HomeRoute()); + // return; + // } context.router.replace(const ConnectToHubRoute()); }, ), diff --git a/lib/presentation/pages/introduction_screen/introductions_view_model_body/introduction_screen_body_about_page.dart b/lib/presentation/pages/introduction_screen/introductions_view_model_body/introduction_screen_body_about_page.dart index be5d241ca..412b9221b 100644 --- a/lib/presentation/pages/introduction_screen/introductions_view_model_body/introduction_screen_body_about_page.dart +++ b/lib/presentation/pages/introduction_screen/introductions_view_model_body/introduction_screen_body_about_page.dart @@ -13,7 +13,7 @@ class IntroductionScreenBodyAboutPage extends StatelessWidget { const SeparatorAtom(), Container( decoration: BoxDecoration( - color: colorScheme.background, + color: colorScheme.surface, border: Border.all( color: Theme.of(context).textTheme.bodyLarge!.color!, ), @@ -38,8 +38,8 @@ class IntroductionScreenBodyAboutPage extends StatelessWidget { ' a lot of extra functionality (very recommended).\n' 'You can create a Hub by following the simple documentation from the site.\n\n' "Thanks for joining and let's continue to make the future better for everyone by choosing open-source technology.", - style: textTheme.bodyLarge! - .copyWith(color: colorScheme.onBackground), + style: + textTheme.bodyLarge!.copyWith(color: colorScheme.onSurface), ), ), ), diff --git a/lib/presentation/pages/login_vendor_page.dart b/lib/presentation/pages/login_vendor_page.dart index beffa50da..193becaf3 100644 --- a/lib/presentation/pages/login_vendor_page.dart +++ b/lib/presentation/pages/login_vendor_page.dart @@ -1,4 +1,5 @@ import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; @@ -31,21 +32,22 @@ class _LoginVendorPageState extends State { ); ConnectionsService.instance.loginVendor(loginEntity!); - context.router.pop(); + context.router.maybePop(); } Widget authTypeWidget() { - InsertloginMoleculeType type; + InsertLoginMoleculeType type; switch (widget.vendorInformation.loginType) { case VendorLoginTypes.notNeeded: return const TextAtom('Not needed'); case VendorLoginTypes.authToken: - type = InsertloginMoleculeType.authToken; + type = InsertLoginMoleculeType.authToken; case VendorLoginTypes.apiKey: - type = InsertloginMoleculeType.apiKey; - + type = InsertLoginMoleculeType.apiKey; case VendorLoginTypes.emailAndPassword: - type = InsertloginMoleculeType.emailAndPassword; + type = InsertLoginMoleculeType.emailAndPassword; + case VendorLoginTypes.addDeviceByPairingCode: + type = InsertLoginMoleculeType.addDeviceByPairingCode; } return InsertLoginMolecule( type: type, @@ -111,17 +113,17 @@ class _LoginVendorPageState extends State { ), ), ), - if (widget.vendorInformation.urlToLoginCredantials != null) + if (widget.vendorInformation.urlToLoginCredentials != null) Container( alignment: Alignment.bottomRight, child: TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all(Colors.pink), + backgroundColor: WidgetStateProperty.all(Colors.pink), ), onPressed: () { launchUrl( Uri.parse( - widget.vendorInformation.urlToLoginCredantials!, + widget.vendorInformation.urlToLoginCredentials!, ), ); }, diff --git a/lib/presentation/pages/pick_repeat_time_page.dart b/lib/presentation/pages/pick_repeat_time_page.dart index 07bd9bb1a..8d9bb19bc 100644 --- a/lib/presentation/pages/pick_repeat_time_page.dart +++ b/lib/presentation/pages/pick_repeat_time_page.dart @@ -1,4 +1,5 @@ import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:cybearjinni/presentation/core/routes/app_router.gr.dart'; @@ -13,7 +14,7 @@ import 'package:hexcolor/hexcolor.dart'; @RoutePage() class PickRepeatTimePage extends StatelessWidget { void backButtonFunction(BuildContext context) { - context.router.pop(); + context.router.maybePop(); } @override @@ -103,10 +104,10 @@ class PickRepeatTimePage extends StatelessWidget { ), TextButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( - Colors.blue.withOpacity(0.5), + backgroundColor: WidgetStateProperty.all( + Colors.blue.withAlpha((0.5 * 255).toInt()), ), - side: MaterialStateProperty.all( + side: WidgetStateProperty.all( BorderSide.lerp( const BorderSide(), const BorderSide(), diff --git a/lib/presentation/pages/plus_button.dart b/lib/presentation/pages/plus_button.dart index 49fd86437..5bb82fbdc 100644 --- a/lib/presentation/pages/plus_button.dart +++ b/lib/presentation/pages/plus_button.dart @@ -1,4 +1,5 @@ import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/infrastructure/core/logger.dart'; @@ -37,7 +38,7 @@ class PlusButtonPage extends StatelessWidget { TopBarMolecule( pageName: 'Add and Manage', leftIcon: FontAwesomeIcons.arrowLeft, - leftIconFunction: (_) => context.router.pop(), + leftIconFunction: (_) => context.router.maybePop(), ), SingleChildScrollView( child: Column( @@ -64,11 +65,11 @@ class PlusButtonPage extends StatelessWidget { height: 1, ), ColoredBox( - color: Colors.teal.withOpacity(0.9), + color: Colors.teal.withAlpha((0.9 * 255).toInt()), child: ListTile( leading: FaIcon( FontAwesomeIcons.solidLightbulb, - color: colorScheme.background, + color: colorScheme.surface, ), title: TextAtom( 'Manage Entities', @@ -85,11 +86,11 @@ class PlusButtonPage extends StatelessWidget { height: 1, ), ColoredBox( - color: Colors.brown.withOpacity(0.9), + color: Colors.brown.withAlpha((0.9 * 255).toInt()), child: ListTile( leading: FaIcon( FontAwesomeIcons.arrowRightToBracket, - color: colorScheme.background, + color: colorScheme.surface, ), title: TextAtom( 'Login To Vendor', @@ -106,11 +107,11 @@ class PlusButtonPage extends StatelessWidget { ), const SizedBox(height: 1), ColoredBox( - color: Colors.purple.withOpacity(0.7), + color: Colors.purple.withAlpha((0.7 * 255).toInt()), child: ListTile( leading: FaIcon( FontAwesomeIcons.sitemap, - color: colorScheme.background, + color: colorScheme.surface, ), title: TextAtom( 'Add Automation', @@ -127,11 +128,12 @@ class PlusButtonPage extends StatelessWidget { ), const SizedBox(height: 1), ColoredBox( - color: Colors.indigoAccent.withOpacity(0.7), + color: + Colors.indigoAccent.withAlpha((0.7 * 255).toInt()), child: ListTile( leading: FaIcon( FontAwesomeIcons.camera, - color: colorScheme.background, + color: colorScheme.surface, ), title: TextAtom( 'Turn Phone To a Security Camera', @@ -176,7 +178,7 @@ class PlusButtonPage extends StatelessWidget { child: ListTile( leading: FaIcon( FontAwesomeIcons.globe, - color: colorScheme.background, + color: colorScheme.surface, ), title: TextAtom( 'Comunication Method', @@ -193,11 +195,11 @@ class PlusButtonPage extends StatelessWidget { ), const SizedBox(height: 1), ColoredBox( - color: Colors.pink.withOpacity(0.9), + color: Colors.pink.withAlpha((0.9 * 255).toInt()), child: ListTile( leading: FaIcon( FontAwesomeIcons.computer, - color: colorScheme.background, + color: colorScheme.surface, ), title: TextAtom( 'All Entities in the network', @@ -216,11 +218,12 @@ class PlusButtonPage extends StatelessWidget { height: 1, ), ColoredBox( - color: Colors.redAccent.withOpacity(0.9), + color: + Colors.redAccent.withAlpha((0.9 * 255).toInt()), child: ListTile( leading: Iconify( SimpleIcons.node_red, - color: colorScheme.background, + color: colorScheme.surface, ), title: TextAtom( 'Open Node-RED of Hub', @@ -264,7 +267,7 @@ class PlusButtonPage extends StatelessWidget { child: ListTile( leading: FaIcon( FontAwesomeIcons.info, - color: colorScheme.background, + color: colorScheme.surface, ), title: TextAtom( 'Software Info', @@ -286,7 +289,7 @@ class PlusButtonPage extends StatelessWidget { child: ListTile( leading: FaIcon( FontAwesomeIcons.personThroughWindow, - color: colorScheme.background, + color: colorScheme.surface, ), title: TextAtom( 'Log Out', diff --git a/lib/presentation/pages/remote_pipes_page.dart b/lib/presentation/pages/remote_pipes_page.dart index 1781643e1..efc763938 100644 --- a/lib/presentation/pages/remote_pipes_page.dart +++ b/lib/presentation/pages/remote_pipes_page.dart @@ -1,5 +1,6 @@ import 'package:adaptive_action_sheet/adaptive_action_sheet.dart'; import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/infrastructure/core/logger.dart'; @@ -30,7 +31,7 @@ class RemotePipesPage extends StatelessWidget { } void leftIconFunction(BuildContext context) { - context.router.pop(); + context.router.maybePop(); } @override @@ -83,7 +84,7 @@ class _RemotePipesWidgetState extends State { connectionType: ConnectionType.remotePipes, ); ConnectionsService.instance.connect(address: remotePipesDomainName); - context.router.pop(); + context.router.maybePop(); } @override diff --git a/lib/presentation/pages/scenes_page.dart b/lib/presentation/pages/scenes_page.dart index d657a34ce..a1f306870 100644 --- a/lib/presentation/pages/scenes_page.dart +++ b/lib/presentation/pages/scenes_page.dart @@ -3,6 +3,7 @@ import 'dart:ui'; import 'package:adaptive_action_sheet/adaptive_action_sheet.dart'; import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; @@ -99,7 +100,7 @@ class _ScenesPageState extends State { pageName: 'Scenes_In_Folder', rightIconFunction: userCogFunction, leftIcon: FontAwesomeIcons.arrowLeft, - leftIconFunction: context.router.pop, + leftIconFunction: context.router.maybePop, // rightSecondIcon: FontAwesomeIcons.magnifyingGlass, ), Expanded( diff --git a/lib/presentation/pages/software_info_page.dart b/lib/presentation/pages/software_info_page.dart index 98a68610e..144afdf11 100644 --- a/lib/presentation/pages/software_info_page.dart +++ b/lib/presentation/pages/software_info_page.dart @@ -28,7 +28,7 @@ class SoftwareInfoPage extends StatelessWidget { } void leftIconFunction(BuildContext context) { - context.router.pop(); + context.router.maybePop(); } @override diff --git a/lib/presentation/pages/splash_page.dart b/lib/presentation/pages/splash_page.dart index d6146c2d8..5edf00657 100644 --- a/lib/presentation/pages/splash_page.dart +++ b/lib/presentation/pages/splash_page.dart @@ -2,18 +2,21 @@ import 'dart:collection'; import 'dart:io'; import 'package:auto_route/auto_route.dart'; +// ignore: depend_on_referenced_packages because this is our pacakge import 'package:cbj_integrations_controller/integrations_controller.dart'; import 'package:cybearjinni/domain/connections_service.dart'; import 'package:cybearjinni/domain/manage_network/i_manage_network_repository.dart'; import 'package:cybearjinni/infrastructure/app_commands.dart'; import 'package:cybearjinni/infrastructure/core/logger.dart'; import 'package:cybearjinni/infrastructure/mqtt.dart'; +import 'package:cybearjinni/infrastructure/network_utilities_flutter.dart'; import 'package:cybearjinni/presentation/atoms/atoms.dart'; import 'package:cybearjinni/presentation/core/routes/app_router.gr.dart'; import 'package:cybearjinni/presentation/molecules/permissions_dialog_molecule.dart'; import 'package:flutter/foundation.dart' show kIsWeb; import 'package:flutter/material.dart'; import 'package:hive_flutter/hive_flutter.dart'; +import 'package:path_provider/path_provider.dart'; @RoutePage() class SplashPage extends StatefulWidget { @@ -25,16 +28,19 @@ class _SplashPageState extends State { @override void initState() { super.initState(); - initilizeApp(); + initializeApp(); } - Future initilizeApp() async { + Future initializeApp() async { + await NetworkUtilitiesFlutter().configureNetworkTools( + (await getApplicationDocumentsDirectory()).path, + ); SystemCommandsBaseClassD.instance = AppCommands(); await Hive.initFlutter(); - await IDbRepository.instance.asyncConstactor(); + await IDbRepository.instance.asyncConstructor(); NetworksManager().loadFromDb(); - final bool sucess = await IManageNetworkRepository.instance.loadWifi(); - if (!sucess) { + final bool success = await IManageNetworkRepository.instance.loadWifi(); + if (!success) { if (mounted) { permsissionsDialog(context); } @@ -48,7 +54,7 @@ class _SplashPageState extends State { await IcSynchronizer().loadAllFromDb(); ConnectionsService.setCurrentConnectionType( networkBssid: bssid, - connectionType: ConnectionType.appAsHub, + connectionType: ConnectionType.hub, ); ConnectionsService.instance.searchDevices(); diff --git a/pubspec.yaml b/pubspec.yaml index 1a5be47a3..4ca608cec 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -29,14 +29,13 @@ dependencies: # Utility classes to work with asynchronous computations. async: ^2.11.0 # Declarative routing solution, where everything needed for navigation is automatically generated for you. - auto_route: ^7.8.4 + auto_route: ^8.3.0 # Automatically resizes text to fit perfectly within its bounds. auto_size_text: ^3.0.0 bonsoir: ^5.1.1 - cbj_integrations_controller: - git: https://github.com/CyBear-Jinni/cbj_integrations_controller.git cbj_smart_device_flutter: - git: https://github.com/CyBear-Jinni/cbj_smart_device_flutter.git +# git: https://github.com/CyBear-Jinni/cbj_smart_device_flutter.git + path: ../cbj_smart_device_flutter # Copy text from and to clipboard clipboard: ^0.1.3 # Package to create, convert, alter, and compare colors in a variety of colorspaces. @@ -54,8 +53,8 @@ dependencies: day_picker: ^2.2.0 # Get current device information device_info_plus: ^9.1.0 - # Internationalization (Easy translations) - easy_localization: ^3.0.3 + # # Internationalization (Easy translations) + # easy_localization: ^3.0.7+1 # An "expansion" on the Flutter SDK's standard ExpansionTile expansion_tile_card: ^3.0.0 flutter: @@ -63,7 +62,7 @@ dependencies: # HSV(HSB)/HSL/RGB/Material color picker flutter_colorpicker: ^1.0.3 # A cross platform plugin for displaying local notifications. - flutter_local_notifications: ^16.1.0 + flutter_local_notifications: ^18.0.1 # An easy to implement custom switch flutter_switch: ^0.3.2 # Getting the local timezone of the os. @@ -71,9 +70,9 @@ dependencies: # Font Awesome Icon pack available as Flutter Icons. font_awesome_flutter: ^10.6.0 # Annotations for freezed - freezed_annotation: ^2.4.1 + freezed_annotation: ^2.4.4 # Service locator - get_it: ^7.6.4 + get_it: ^8.0.3 # Google Mobile Ads google_mobile_ads: ^3.1.0 # Secure authentication system for signing in with a Google account on Android and iOS @@ -109,7 +108,7 @@ dependencies: # Handles getting a location on location: ^5.0.3 # Small, easy to use and extensible logger which prints beautiful logs. - logger: ^2.0.2+1 + logger: ^2.5.0 # The Material Design Icons designed by the community for Flutter material_design_icons_flutter: ^7.0.7296 # Creating multi-select widgets in a variety of ways @@ -121,11 +120,11 @@ dependencies: network_info_plus: ^4.1.0 # Helps you discover open ports, devices on subnet and more. # Querying information about the application package, such as CFBundleVersion - network_tools_flutter: - path: "../../network_tools_flutter" - # git: - # url: "https://github.com/guyluz11/network_tools_flutter.git" - # ref: "adding_mdns_ios_support" + # network_tools_flutter: + # path: "../../network_tools_flutter" + # git: + # url: "https://github.com/guyluz11/network_tools_flutter.git" + # ref: "adding_mdns_ios_support" package_info_plus: ^4.2.0 # Finding commonly used locations on the filesystem path_provider: ^2.1.1 @@ -151,9 +150,9 @@ dependencies: dev_dependencies: # Generator for auto_route library. - auto_route_generator: ^7.3.2 + auto_route_generator: ^8.0.0 # A build system for Dart code generation and modular compilation. - build_runner: ^2.4.6 + build_runner: ^2.4.12 # Package which simplifies the task of updating your Flutter app's launcher icon. flutter_launcher_icons: ^0.13.1 # Code generator for unions/pattern-matching/copy.