diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index db9d83a3e..f9eeb9953 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -9,7 +9,7 @@ on: env: flutter_channel: 'stable' # or: 'dev' or 'beta' - flutter_version: '3.3.6' + flutter_version: '3.7.6' jobs: build: diff --git a/assets/translations/be-RU.json b/assets/translations/be-RU.json index d0978f83e..c71b0b569 100644 --- a/assets/translations/be-RU.json +++ b/assets/translations/be-RU.json @@ -24,8 +24,7 @@ "Smart_Speakers": "Умные колонки", "Smart_Devices_page": "Страница со Smart-устройствами", "History": "История", - "Scene": "Сцена", - "Scene": "Сцены", + "Scene": "Сцены", "Lamps": "Лампы", "Devices": "Устройства", "Email_is_required": "Требуется Email-адрес", @@ -69,7 +68,7 @@ "Medical": "Медицинские", "Phones": "Телефоны", "Speakers": "Колонки", - "Send": "Отправить" + "Send": "Отправить", "All_Devices": "Все устройства", "Summary": "Итог", "Switches": "Переключатели", diff --git a/assets/translations/gj-IN.json b/assets/translations/gj-IN.json index 2c3db619c..f523cafa4 100644 --- a/assets/translations/gj-IN.json +++ b/assets/translations/gj-IN.json @@ -69,7 +69,7 @@ "Medical": "મેડિકલ", "Phones": "ફોન્સ", "Speakers": "સ્પિકર્સ", - "Send": "મોકલો" + "Send": "મોકલો", "All_Devices": "બધાઉપકરણો", "Summary": "સારાંશ", "Switches": "સ્વીચો", diff --git a/assets/translations/hi-PK.json b/assets/translations/hi-PK.json index e1962b17e..16eae34bd 100644 --- a/assets/translations/hi-PK.json +++ b/assets/translations/hi-PK.json @@ -14,9 +14,6 @@ "Down": "नीचे", "Stop": "रुकें", "Up": "ऊपर", - "Smart_Devices_Settings_Page": "स्मार्ट उपकरण समायोजन पृष्ठ", - "Air_Conditioners": "एयर कंडिशनर", - "Blinds": "चिलमन", "Smart_Devices_Settings_Page": "स्मार्ट डिवाइस सेटिंग्स पेज", "Air_Conditioners": "वातानुकूलक", "Blinds": "पर्देा", @@ -52,8 +49,6 @@ "Device_type:_": "उपकरण का प्रकार: {}", "Room_name_is_required": "कमरे का नाम आवश्यक है", "Room_name:": "कमरे का नाम:", - "Device_name_is_required": "उपकरण का नाम आवश्यक है", - "Device_name:": "उपकरण का नाम:", "Device_name_is_required": "यन्त्र का नाम आवश्यक है", "Device_name:": "यन्त्र का नाम:", "Update": "अपडेट करें", diff --git a/assets/translations/mr-IN.json b/assets/translations/mr-IN.json index 960533d26..9336ce2e3 100644 --- a/assets/translations/mr-IN.json +++ b/assets/translations/mr-IN.json @@ -1,113 +1,112 @@ { -"Create_new_account": "नवीन खाते तयार करा," -"Actions_History": "क्रिया इतिहास," -"Empty_history": "रिकामा इतिहास," -"History_Settings_Page": "इतिहास सेटिंग्ज पृष्ठ," -"Lamps_Page": "दिवे पान," -"Name_": "नाव {}," -"Room_": "खोली {}," -"Lamps_Settings_Page": "दिवे सेटिंग्ज पृष्ठ," -"Welcome_to_your_Smart_Home": "तुमच्या स्मार्ट होममध्ये स्वागत आहे," -"Scene_Settings_Page": "दृश्य सेटिंग्ज पृष्ठ," -"Move_to_blinds_full_settings_page": "आंधळे पूर्ण सेटिंग्ज पृष्ठावर जा," -"Blinds_Page": "आंधळे पृष्ठ," -"Down": "खाली," -"Stop": "थांबा," -"Up": "वर," -"Smart_Devices_Settings_Page": "स्मार्ट डिव्हाइस सेटिंग्ज पृष्ठ," -"Air_Conditioners": "एअर कंडिशनर," -"Blinds": "पट्ट्या," -"Medical_Device": "वैद्यकीय उपकरण," -"Medical_Devices": "वैद्यकीय उपकरणे," -"Smart_Phone": "स्मार्ट फोन," -"Smart_Phones": "स्मार्ट फोन," -"Smart_Speakers": "स्मार्ट स्पीकर्स," -"Smart_Devices_page": "स्मार्ट उपकरण पृष्ठ," -"History": "इतिहास," -"Scene": "देखावा," -"Scenes": "दृश्ये," -"Lamps": "दिवे," -"Devices": "उपकरणे," -"Email_is_required": "ईमेल आवश्यक आहे," -"Email_cannot_contain_spaces": "ईमेलमध्ये स्पेस असू शकत नाही," -"Email_is_invalid": "ईमेल अवैध आहे," -"Email": "ईमेल," -"Password_is_required": "पासवर्ड आवश्यक आहे," -"Password_cannot_contain_spaces": "पासवर्डमध्ये मोकळी जागा असू शकत नाही," -"Password_must_be_bigger_than__characters": "पासवर्ड {} वर्णांपेक्षा मोठा असणे आवश्यक आहे," -"Password": "पासवर्ड," -"Log_In": "लॉग इन," -"Forgot_password": "पासवर्ड विसरलात," -"Forgot_password?": "पासवर्ड विसरलात?," -"title": "शीर्षक," -"number": "संख्या" -"IP_is_required": "आयपी आवश्यक आहे," -"IP_syntax_is_incorrect": "IP वाक्यरचना चुकीची आहे," -"Add_Smart_Device": "स्मार्ट डिव्हाइस जोडा," -"Cancel": "रद्द करा," -"Add": "जोडा," -"Light": "प्रकाश," -"Device_ip_": "डिव्हाइस ip {}," -"New_devices": "नवीन उपकरणे," -"Add_devices": "उपकरणे जोडा," -"Device_type_": "डिव्हाइस प्रकार {}," -"Room_name_is_required": "खोलीचे नाव आवश्यक आहे," -"Room_name": "खोलीचे नाव," -"Device_name_is_required": "डिव्हाइसचे नाव आवश्यक आहे," -"Device_name": "उपकरणाचे नाव ," -"Update": "अपडेट करा," -"IP": "आयपी," -"This_is_firebase": "हे फायरबेस आहे," -"Device_with_ip_": "ip {} सह उपकरण," -"Update_WiFi_configuration": "वायफाय कॉन्फिगरेशन अपडेट करा," -"WiFi_name_is_required": "वायफाय नाव आवश्यक आहे," -"WiFi_Name": "वायफाय नाव," -"WiFi_password_is_required": "वायफाय पासवर्ड आवश्यक आहे," -"WiFi_Password": "वायफाय पासवर्ड," -"Insert_WiFi_Credentials": "वायफाय क्रेडेन्शियल्स घाला," -"Conditioners": "कंडिशनर्स," -"Medical": "वैद्यकीय," -"Phones": "फोन," -"Speakers": "वक्ते," -"Send": "पाठवा," -"All_Devices": "सर्व उपकरणे," -"Summary": "सारांश," -"Switches": "स्विचेस," -"Boilers": "बॉयलर," -"Lights": "दिवे," -"RGBw_Lights": "RGBw दिवे," -"_Switches": "{} स्विचेस," -"_SmartTvs": "{} स्मार्टटीव्ही," -"_RGBW_Lights": "{} RGBW दिवे," -"_Lights": "{} दिवे," -"_Boilers": "{} बॉयलर," -"_Blinds": "{} पट्ट्या," -"Rooms": "खोल्या," -"_device": "{} साधन," -"_devices": "{} उपकरणे," -"_SmartPlugs": "{} स्मार्टप्लग," -"On": "चालू," -"Off": "बंद," -"Color": "रंग," -"White": "पांढरा," -"Area": "क्षेत्रफळ," -"Areas": "क्षेत्रे," -"Automations": "ऑटोमेशन," -"Scenes_In_Folder": "फोल्डरमधील दृश्ये," -"Select": "निवडा," -"Exist": "अस्तित्वात आहे," -"OK": "ठीक आहे," -"Nothing": "काही नाही," -"No_need_here": "इथे गरज नाही," -"Do_not_need": "गरज नाही," -"Finish": "समाप्त," -"Select_Purposes_Of_The_Area": "क्षेत्राची उद्दिष्टे निवडा," -"Pulling_Up_all_blinds": "सर्व पट्ट्या वर खेचणे," -"Stopping_all_blinds": "सर्व पट्ट्या थांबवून," -"Pulling_down_all_blinds": "सर्व पट्ट्या खाली खेचणे," -"Turning_On_boiler": "बॉयलर चालू करणे," -"Turning_Off_boiler": "बॉयलर बंद करणे," -"Waiting_for_user_to_get_connected_to_WiFi": "वापरकर्ता वायफायशी कनेक्ट होण्याची वाट पाहत आहे," -"Can't_add_unsupported_device": "असमर्थित डिव्हाइस जोडू शकत नाही" - -} + "Create_new_account": "नवीन खाते तयार करा,", + "Actions_History": "क्रिया इतिहास,", + "Empty_history": "रिकामा इतिहास,", + "History_Settings_Page": "इतिहास सेटिंग्ज पृष्ठ,", + "Lamps_Page": "दिवे पान,", + "Name_": "नाव {},", + "Room_": "खोली {},", + "Lamps_Settings_Page": "दिवे सेटिंग्ज पृष्ठ,", + "Welcome_to_your_Smart_Home": "तुमच्या स्मार्ट होममध्ये स्वागत आहे,", + "Scene_Settings_Page": "दृश्य सेटिंग्ज पृष्ठ,", + "Move_to_blinds_full_settings_page": "आंधळे पूर्ण सेटिंग्ज पृष्ठावर जा,", + "Blinds_Page": "आंधळे पृष्ठ,", + "Down": "खाली,", + "Stop": "थांबा,", + "Up": "वर,", + "Smart_Devices_Settings_Page": "स्मार्ट डिव्हाइस सेटिंग्ज पृष्ठ,", + "Air_Conditioners": "एअर कंडिशनर,", + "Blinds": "पट्ट्या,", + "Medical_Device": "वैद्यकीय उपकरण,", + "Medical_Devices": "वैद्यकीय उपकरणे,", + "Smart_Phone": "स्मार्ट फोन,", + "Smart_Phones": "स्मार्ट फोन,", + "Smart_Speakers": "स्मार्ट स्पीकर्स,", + "Smart_Devices_page": "स्मार्ट उपकरण पृष्ठ,", + "History": "इतिहास,", + "Scene": "देखावा,", + "Scenes": "दृश्ये,", + "Lamps": "दिवे,", + "Devices": "उपकरणे,", + "Email_is_required": "ईमेल आवश्यक आहे,", + "Email_cannot_contain_spaces": "ईमेलमध्ये स्पेस असू शकत नाही,", + "Email_is_invalid": "ईमेल अवैध आहे,", + "Email": "ईमेल,", + "Password_is_required": "पासवर्ड आवश्यक आहे,", + "Password_cannot_contain_spaces": "पासवर्डमध्ये मोकळी जागा असू शकत नाही,", + "Password_must_be_bigger_than__characters": "पासवर्ड {} वर्णांपेक्षा मोठा असणे आवश्यक आहे,", + "Password": "पासवर्ड,", + "Log_In": "लॉग इन,", + "Forgot_password": "पासवर्ड विसरलात,", + "Forgot_password?": "पासवर्ड विसरलात?,", + "title": "शीर्षक,", + "number": "संख्या", + "IP_is_required": "आयपी आवश्यक आहे,", + "IP_syntax_is_incorrect": "IP वाक्यरचना चुकीची आहे,", + "Add_Smart_Device": "स्मार्ट डिव्हाइस जोडा,", + "Cancel": "रद्द करा,", + "Add": "जोडा,", + "Light": "प्रकाश,", + "Device_ip_": "डिव्हाइस ip {},", + "New_devices": "नवीन उपकरणे,", + "Add_devices": "उपकरणे जोडा,", + "Device_type_": "डिव्हाइस प्रकार {},", + "Room_name_is_required": "खोलीचे नाव आवश्यक आहे,", + "Room_name": "खोलीचे नाव,", + "Device_name_is_required": "डिव्हाइसचे नाव आवश्यक आहे,", + "Device_name": "उपकरणाचे नाव ,", + "Update": "अपडेट करा,", + "IP": "आयपी,", + "This_is_firebase": "हे फायरबेस आहे,", + "Device_with_ip_": "ip {} सह उपकरण,", + "Update_WiFi_configuration": "वायफाय कॉन्फिगरेशन अपडेट करा,", + "WiFi_name_is_required": "वायफाय नाव आवश्यक आहे,", + "WiFi_Name": "वायफाय नाव,", + "WiFi_password_is_required": "वायफाय पासवर्ड आवश्यक आहे,", + "WiFi_Password": "वायफाय पासवर्ड,", + "Insert_WiFi_Credentials": "वायफाय क्रेडेन्शियल्स घाला,", + "Conditioners": "कंडिशनर्स,", + "Medical": "वैद्यकीय,", + "Phones": "फोन,", + "Speakers": "वक्ते,", + "Send": "पाठवा,", + "All_Devices": "सर्व उपकरणे,", + "Summary": "सारांश,", + "Switches": "स्विचेस,", + "Boilers": "बॉयलर,", + "Lights": "दिवे,", + "RGBw_Lights": "RGBw दिवे,", + "_Switches": "{} स्विचेस,", + "_SmartTvs": "{} स्मार्टटीव्ही,", + "_RGBW_Lights": "{} RGBW दिवे,", + "_Lights": "{} दिवे,", + "_Boilers": "{} बॉयलर,", + "_Blinds": "{} पट्ट्या,", + "Rooms": "खोल्या,", + "_device": "{} साधन,", + "_devices": "{} उपकरणे,", + "_SmartPlugs": "{} स्मार्टप्लग,", + "On": "चालू,", + "Off": "बंद,", + "Color": "रंग,", + "White": "पांढरा,", + "Area": "क्षेत्रफळ,", + "Areas": "क्षेत्रे,", + "Automations": "ऑटोमेशन,", + "Scenes_In_Folder": "फोल्डरमधील दृश्ये,", + "Select": "निवडा,", + "Exist": "अस्तित्वात आहे,", + "OK": "ठीक आहे,", + "Nothing": "काही नाही,", + "No_need_here": "इथे गरज नाही,", + "Do_not_need": "गरज नाही,", + "Finish": "समाप्त,", + "Select_Purposes_Of_The_Area": "क्षेत्राची उद्दिष्टे निवडा,", + "Pulling_Up_all_blinds": "सर्व पट्ट्या वर खेचणे,", + "Stopping_all_blinds": "सर्व पट्ट्या थांबवून,", + "Pulling_down_all_blinds": "सर्व पट्ट्या खाली खेचणे,", + "Turning_On_boiler": "बॉयलर चालू करणे,", + "Turning_Off_boiler": "बॉयलर बंद करणे,", + "Waiting_for_user_to_get_connected_to_WiFi": "वापरकर्ता वायफायशी कनेक्ट होण्याची वाट पाहत आहे,", + "Can't_add_unsupported_device": "असमर्थित डिव्हाइस जोडू शकत नाही" +} \ No newline at end of file diff --git a/assets/translations/ru-RU.json b/assets/translations/ru-RU.json index d0978f83e..0fb087ce3 100644 --- a/assets/translations/ru-RU.json +++ b/assets/translations/ru-RU.json @@ -25,7 +25,6 @@ "Smart_Devices_page": "Страница со Smart-устройствами", "History": "История", "Scene": "Сцена", - "Scene": "Сцены", "Lamps": "Лампы", "Devices": "Устройства", "Email_is_required": "Требуется Email-адрес", @@ -69,7 +68,7 @@ "Medical": "Медицинские", "Phones": "Телефоны", "Speakers": "Колонки", - "Send": "Отправить" + "Send": "Отправить", "All_Devices": "Все устройства", "Summary": "Итог", "Switches": "Переключатели", diff --git a/assets/translations/ta-IN.json b/assets/translations/ta-IN.json index 624908cdb..b1ab8326b 100644 --- a/assets/translations/ta-IN.json +++ b/assets/translations/ta-IN.json @@ -101,7 +101,7 @@ "No_need_here": "இங்கே தேவையில்லை", "Do_not_need": "தேவையில்லை", "Finish": "முடிக்கவும்", - "Select_Purposes_Of_The_Area": "பகுதியின் நோக்கங்களைத் தேர்ந்தெடுக்கவும்" + "Select_Purposes_Of_The_Area": "பகுதியின் நோக்கங்களைத் தேர்ந்தெடுக்கவும்", "Pulling_Up_all_blinds": "திரைசீலைகளை உருவுவது", "Stopping_all_blinds": "திரைசீலைகளை நிருத்துவது", "Pulling_down_all_blinds": "திரைசீலைகளை இழுப்பது", diff --git a/lib/application/esphome_auth/esphome_sign_in_form/esphome_sign_in_form_bloc.dart b/lib/application/esphome_auth/esphome_sign_in_form/esphome_sign_in_form_bloc.dart new file mode 100644 index 000000000..5ef514abe --- /dev/null +++ b/lib/application/esphome_auth/esphome_sign_in_form/esphome_sign_in_form_bloc.dart @@ -0,0 +1,58 @@ +import 'dart:async'; + +import 'package:bloc/bloc.dart'; +import 'package:cybear_jinni/domain/vendors/esphome_login/generic_esphome_login_entity.dart'; +import 'package:cybear_jinni/domain/vendors/esphome_login/generic_esphome_login_value_objects.dart'; +import 'package:cybear_jinni/domain/vendors/i_vendor_repository.dart'; +import 'package:cybear_jinni/domain/vendors/login_abstract/core_login_failures.dart'; +import 'package:cybear_jinni/domain/vendors/login_abstract/value_login_objects_core.dart'; +import 'package:dartz/dartz.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:injectable/injectable.dart'; + +part 'esphome_sign_in_form_bloc.freezed.dart'; +part 'esphome_sign_in_form_event.dart'; +part 'esphome_sign_in_form_state.dart'; + +@injectable +class EspHomeSignInFormBloc + extends Bloc { + EspHomeSignInFormBloc(this._vendorRepository) + : super(EspHomeSignInFormState.initial()) { + on(_apiKeyChanged); + on(_signInWithApiKey); + } + + final IVendorsRepository _vendorRepository; + + // + // @override + // SignInFormState get initialStat`e => SignInFormState.initial(); + + Future _apiKeyChanged( + ApiKeyChanged event, + Emitter emit, + ) async { + emit( + state.copyWith( + espHomeDevicePassword: + GenericEspHomeDeviceLoginApiPass(event.apiKeyStr), + authFailureOrSuccessOption: none(), + ), + ); + } + + Future _signInWithApiKey( + SignInWithApiKey event, + Emitter emit, + ) async { + final GenericEspHomeLoginDE genericEspHomeDE = GenericEspHomeLoginDE( + senderUniqueId: CoreLoginSenderId.fromUniqueString('Me'), + espHomeDevicePass: GenericEspHomeDeviceLoginApiPass( + state.espHomeDevicePassword.getOrCrash()), + ); + _vendorRepository.loginWithEspHome(genericEspHomeDE); + // emit(* _performActionOnAuthFacadeWithEmailAndPassword( + // _authFacade.registerWithEmailAndPassword, + } +} diff --git a/lib/application/esphome_auth/esphome_sign_in_form/esphome_sign_in_form_event.dart b/lib/application/esphome_auth/esphome_sign_in_form/esphome_sign_in_form_event.dart new file mode 100644 index 000000000..5712ba2e4 --- /dev/null +++ b/lib/application/esphome_auth/esphome_sign_in_form/esphome_sign_in_form_event.dart @@ -0,0 +1,9 @@ +part of 'esphome_sign_in_form_bloc.dart'; + +@freezed +class EspHomeSignInFormEvent with _$EspHomeSignInFormEvent { + const factory EspHomeSignInFormEvent.apiKeyChanged(String apiKeyStr) = + ApiKeyChanged; + + const factory EspHomeSignInFormEvent.signInWithApiKey() = SignInWithApiKey; +} diff --git a/lib/application/esphome_auth/esphome_sign_in_form/esphome_sign_in_form_state.dart b/lib/application/esphome_auth/esphome_sign_in_form/esphome_sign_in_form_state.dart new file mode 100644 index 000000000..0b66ba623 --- /dev/null +++ b/lib/application/esphome_auth/esphome_sign_in_form/esphome_sign_in_form_state.dart @@ -0,0 +1,18 @@ +part of 'esphome_sign_in_form_bloc.dart'; + +@freezed +class EspHomeSignInFormState with _$EspHomeSignInFormState { + const factory EspHomeSignInFormState({ + required GenericEspHomeDeviceLoginApiPass espHomeDevicePassword, + required bool showErrorMessages, + required bool isSubmitting, + required Option> authFailureOrSuccessOption, + }) = _EspHomeSignInFormState; + + factory EspHomeSignInFormState.initial() => EspHomeSignInFormState( + espHomeDevicePassword: GenericEspHomeDeviceLoginApiPass(''), + showErrorMessages: false, + isSubmitting: false, + authFailureOrSuccessOption: none(), + ); +} diff --git a/lib/domain/devices/generic_light_with_brightness_device/generic_light_with_brightness_entity.dart b/lib/domain/devices/generic_light_with_brightness_device/generic_light_with_brightness_entity.dart new file mode 100644 index 000000000..95f462035 --- /dev/null +++ b/lib/domain/devices/generic_light_with_brightness_device/generic_light_with_brightness_entity.dart @@ -0,0 +1,171 @@ +import 'package:cybear_jinni/domain/devices/abstract_device/core_failures.dart'; +import 'package:cybear_jinni/domain/devices/abstract_device/device_entity_abstract.dart'; +import 'package:cybear_jinni/domain/devices/abstract_device/value_objects_core.dart'; +import 'package:cybear_jinni/domain/devices/generic_light_with_brightness_device/generic_light_with_brightness_value_objects.dart'; +import 'package:cybear_jinni/infrastructure/core/gen/cbj_hub_server/protoc_as_dart/cbj_hub_server.pbgrpc.dart'; +import 'package:cybear_jinni/infrastructure/generic_devices/abstract_device/device_entity_dto_abstract.dart'; +import 'package:cybear_jinni/infrastructure/generic_devices/generic_light_with_brightness_device/generic_light_with_brightness_device_dtos.dart'; +import 'package:cybear_jinni/utils.dart'; +import 'package:dartz/dartz.dart'; + +/// Abstract smart GenericLightWithBrightness that exist inside a computer, the +/// implementations will be actual GenericLightWithBrightness like blinds lights and more +class GenericLightWithBrightnessDE extends DeviceEntityAbstract { + /// All public field of GenericLightWithBrightness entity + GenericLightWithBrightnessDE({ + required super.uniqueId, + required super.vendorUniqueId, + required super.deviceVendor, + required super.defaultName, + required super.deviceStateGRPC, + required super.stateMassage, + required super.senderDeviceOs, + required super.senderDeviceModel, + required super.senderId, + required super.compUuid, + required this.lightSwitchState, + required this.lightBrightness, + DevicePowerConsumption? powerConsumption, + }) : super( + // TODO: add new type named lightLightWithBrightness + deviceTypes: DeviceType(DeviceTypes.light.toString()), + ); + + /// Empty instance of GenericLightWithBrightnessEntity + factory GenericLightWithBrightnessDE.empty() => GenericLightWithBrightnessDE( + uniqueId: CoreUniqueId(), + vendorUniqueId: VendorUniqueId(), + defaultName: DeviceDefaultName(''), + deviceStateGRPC: DeviceState(''), + senderDeviceOs: DeviceSenderDeviceOs(''), + senderDeviceModel: DeviceSenderDeviceModel(''), + stateMassage: DeviceStateMassage(''), + senderId: DeviceSenderId(), + deviceVendor: DeviceVendor(''), + compUuid: DeviceCompUuid(''), + powerConsumption: DevicePowerConsumption(''), + lightSwitchState: + GenericLightWithBrightnessSwitchState(DeviceActions.off.toString()), + lightBrightness: GenericLightWithBrightnessBrightness(''), + ); + + /// State of the light on/off + GenericLightWithBrightnessSwitchState? lightSwitchState; + + /// Brightness 0-100% + GenericLightWithBrightnessBrightness lightBrightness; + + // + // /// Will return failure if any of the fields failed or return unit if fields + // /// have legit values + Option> get failureOption => + defaultName.value.fold((f) => some(f), (_) => none()); + + // + // return body.failureOrUnit + // .andThen(todos.failureOrUnit) + // .andThen( + // todos + // .getOrCrash() + // // Getting the failureOption from the TodoItem ENTITY - NOT a failureOrUnit from a VALUE OBJECT + // .map((todoItem) => todoItem.failureOption) + // .filter((o) => o.isSome()) + // // If we can't get the 0th element, the list is empty. In such a case, it's valid. + // .getOrElse(0, (_) => none()) + // .fold(() => right(unit), (f) => left(f)), + // ) + // .fold((f) => some(f), (_) => none()); + // } + + @override + String getDeviceId() { + return uniqueId.getOrCrash(); + } + + /// Return a list of all valid actions for this device + @override + List getAllValidActions() { + return GenericLightWithBrightnessSwitchState.lightValidActions(); + } + + @override + DeviceEntityDtoAbstract toInfrastructure() { + return GenericLightWithBrightnessDeviceDtos( + deviceDtoClass: (GenericLightWithBrightnessDeviceDtos).toString(), + id: uniqueId.getOrCrash(), + vendorUniqueId: vendorUniqueId.getOrCrash(), + defaultName: defaultName.getOrCrash(), + deviceStateGRPC: deviceStateGRPC.getOrCrash(), + stateMassage: stateMassage.getOrCrash(), + senderDeviceOs: senderDeviceOs.getOrCrash(), + senderDeviceModel: senderDeviceModel.getOrCrash(), + senderId: senderId.getOrCrash(), + deviceTypes: deviceTypes.getOrCrash(), + compUuid: compUuid.getOrCrash(), + lightSwitchState: lightSwitchState!.getOrCrash(), + deviceVendor: deviceVendor.getOrCrash(), + lightBrightness: lightBrightness.getOrCrash(), + // serverTimeStamp: FieldValue.serverTimestamp(), + ); + } + + /// Please override the following methods + @override + Future> executeDeviceAction({ + required DeviceEntityAbstract newEntity, + }) async { + logger.w('Please override this method in the non generic implementation'); + return left( + const CoreFailure.actionExcecuter( + failedValue: 'Action does not exist', + ), + ); + } + + /// Please override the following methods + Future> turnOnLight() async { + logger.w('Please override this method in the non generic implementation'); + return left( + const CoreFailure.actionExcecuter( + failedValue: 'Action does not exist', + ), + ); + } + + /// Please override the following methods + Future> turnOffLight() async { + logger.w('Please override this method in the non generic implementation'); + return left( + const CoreFailure.actionExcecuter( + failedValue: 'Action does not exist', + ), + ); + } + + /// Please override the following methods + Future> setBrightness(String brightness) async { + logger.w('Please override this method in the non generic implementation'); + return left( + const CoreFailure.actionExcecuter( + failedValue: 'Action does not exist', + ), + ); + } + + @override + bool replaceActionIfExist(String action) { + if (GenericLightWithBrightnessSwitchState.lightValidActions() + .contains(action)) { + lightSwitchState = GenericLightWithBrightnessSwitchState(action); + return true; + } + return false; + } + + @override + List getListOfPropertiesToChange() { + return [ + 'lightSwitchState', + ]; + } +} diff --git a/lib/domain/devices/generic_light_with_brightness_device/generic_light_with_brightness_validators.dart b/lib/domain/devices/generic_light_with_brightness_device/generic_light_with_brightness_validators.dart new file mode 100644 index 000000000..bedb84e5d --- /dev/null +++ b/lib/domain/devices/generic_light_with_brightness_device/generic_light_with_brightness_validators.dart @@ -0,0 +1,24 @@ +import 'package:cybear_jinni/domain/devices/abstract_device/core_failures.dart'; +import 'package:cybear_jinni/infrastructure/core/gen/cbj_hub_server/protoc_as_dart/cbj_hub_server.pbgrpc.dart'; +import 'package:dartz/dartz.dart'; + +Either, String> + validateGenericLightWithBrightnessStateNotEmpty( + String input, +) { + return right(input); +} + +Either, String> validateGenericLightBrightnessNotEmpty( + String input, +) { + return right(input); +} + +/// Return all the valid actions for blinds +List lightAllValidActions() { + return [ + DeviceActions.off.toString(), + DeviceActions.on.toString(), + ]; +} diff --git a/lib/domain/devices/generic_light_with_brightness_device/generic_light_with_brightness_value_objects.dart b/lib/domain/devices/generic_light_with_brightness_device/generic_light_with_brightness_value_objects.dart new file mode 100644 index 000000000..d2257d901 --- /dev/null +++ b/lib/domain/devices/generic_light_with_brightness_device/generic_light_with_brightness_value_objects.dart @@ -0,0 +1,36 @@ +import 'package:cybear_jinni/domain/devices/abstract_device/core_failures.dart'; +import 'package:cybear_jinni/domain/devices/abstract_device/value_objects_core.dart'; +import 'package:cybear_jinni/domain/devices/generic_light_with_brightness_device/generic_light_with_brightness_validators.dart'; +import 'package:dartz/dartz.dart'; + +class GenericLightWithBrightnessSwitchState extends ValueObjectCore { + factory GenericLightWithBrightnessSwitchState(String? input) { + assert(input != null); + return GenericLightWithBrightnessSwitchState._( + validateGenericLightWithBrightnessStateNotEmpty(input!), + ); + } + + const GenericLightWithBrightnessSwitchState._(this.value); + + @override + final Either, String> value; + + static List lightValidActions() { + return lightAllValidActions(); + } +} + +class GenericLightWithBrightnessBrightness extends ValueObjectCore { + factory GenericLightWithBrightnessBrightness(String? input) { + assert(input != null); + return GenericLightWithBrightnessBrightness._( + validateGenericLightBrightnessNotEmpty(input!), + ); + } + + const GenericLightWithBrightnessBrightness._(this.value); + + @override + final Either, String> value; +} diff --git a/lib/domain/vendors/esphome_login/generic_esphome_login_entity.dart b/lib/domain/vendors/esphome_login/generic_esphome_login_entity.dart new file mode 100644 index 000000000..acf062540 --- /dev/null +++ b/lib/domain/vendors/esphome_login/generic_esphome_login_entity.dart @@ -0,0 +1,63 @@ +import 'package:cybear_jinni/domain/vendors/esphome_login/generic_esphome_login_value_objects.dart'; +import 'package:cybear_jinni/domain/vendors/login_abstract/core_login_failures.dart'; +import 'package:cybear_jinni/domain/vendors/login_abstract/login_entity_abstract.dart'; +import 'package:cybear_jinni/domain/vendors/login_abstract/value_login_objects_core.dart'; +import 'package:cybear_jinni/infrastructure/core/gen/cbj_hub_server/protoc_as_dart/cbj_hub_server.pbgrpc.dart'; +import 'package:cybear_jinni/infrastructure/generic_vendors_login/generic_esphome_login/generic_esphome_login_dtos.dart'; +import 'package:cybear_jinni/infrastructure/generic_vendors_login/generic_login_abstract/login_entity_dto_abstract.dart'; +import 'package:dartz/dartz.dart'; + +/// Abstract smart GenericEspHome that exist inside a computer, the +/// implementations will be actual GenericEspHome like blinds esphomes and more +class GenericEspHomeLoginDE extends LoginEntityAbstract { + /// All public field of GenericEspHome entity + GenericEspHomeLoginDE({ + required super.senderUniqueId, + required this.espHomeDevicePass, + }) : super( + loginVendor: CoreLoginVendor(VendorsAndServices.espHome.name), + ); + + /// Empty instance of GenericEspHomeEntity + factory GenericEspHomeLoginDE.empty() => GenericEspHomeLoginDE( + senderUniqueId: CoreLoginSenderId.fromUniqueString(''), + espHomeDevicePass: GenericEspHomeDeviceLoginApiPass(''), + ); + + /// EspHome api key + GenericEspHomeDeviceLoginApiPass espHomeDevicePass; + + Option> get failureOption => + senderUniqueId.value.fold((f) => some(f), (_) => none()); + + // + // /// Will return failure if any of the fields failed or return unit if fields + // /// have legit values + // Option> get failureOption { + // return defaultName!.value.fold((f) => some(f), (_) => none()); + // + // return body.failureOrUnit + // .andThen(todos.failureOrUnit) + // .andThen( + // todos + // .getOrCrash() + // // Getting the failureOption from the TodoItem ENTITY - NOT a failureOrUnit from a VALUE OBJECT + // .map((todoItem) => todoItem.failureOption) + // .filter((o) => o.isSome()) + // // If we can't get the 0th element, the list is empty. In such a case, it's valid. + // .getOrElse(0, (_) => none()) + // .fold(() => right(unit), (f) => left(f)), + // ) + // .fold((f) => some(f), (_) => none()); + // } + + @override + LoginEntityDtoAbstract toInfrastructure() { + return GenericEspHomeLoginDtos( + senderUniqueId: senderUniqueId.getOrCrash(), + loginVendor: loginVendor.getOrCrash(), + esphomeDevicePass: espHomeDevicePass.getOrCrash(), + // serverTimeStamp: FieldValue.serverTimestamp(), + ); + } +} diff --git a/lib/domain/vendors/esphome_login/generic_esphome_login_validators.dart b/lib/domain/vendors/esphome_login/generic_esphome_login_validators.dart new file mode 100644 index 000000000..2bc3b8fb5 --- /dev/null +++ b/lib/domain/vendors/esphome_login/generic_esphome_login_validators.dart @@ -0,0 +1,9 @@ +import 'package:cybear_jinni/domain/vendors/login_abstract/core_login_failures.dart'; +import 'package:dartz/dartz.dart'; + +Either, String> + validateGenericEspHomeDeviceLoginPassiNotEmty( + String input, +) { + return right(input); +} diff --git a/lib/domain/vendors/esphome_login/generic_esphome_login_value_objects.dart b/lib/domain/vendors/esphome_login/generic_esphome_login_value_objects.dart new file mode 100644 index 000000000..2e6d202c7 --- /dev/null +++ b/lib/domain/vendors/esphome_login/generic_esphome_login_value_objects.dart @@ -0,0 +1,18 @@ +import 'package:cybear_jinni/domain/vendors/esphome_login/generic_esphome_login_validators.dart'; +import 'package:cybear_jinni/domain/vendors/login_abstract/core_login_failures.dart'; +import 'package:cybear_jinni/domain/vendors/login_abstract/value_login_objects_core.dart'; +import 'package:dartz/dartz.dart'; + +class GenericEspHomeDeviceLoginApiPass extends ValueObjectCoreLogin { + factory GenericEspHomeDeviceLoginApiPass(String? input) { + assert(input != null); + return GenericEspHomeDeviceLoginApiPass._( + validateGenericEspHomeDeviceLoginPassiNotEmty(input!), + ); + } + + const GenericEspHomeDeviceLoginApiPass._(this.value); + + @override + final Either, String> value; +} diff --git a/lib/domain/vendors/i_vendor_repository.dart b/lib/domain/vendors/i_vendor_repository.dart index fba289809..d934863a5 100644 --- a/lib/domain/vendors/i_vendor_repository.dart +++ b/lib/domain/vendors/i_vendor_repository.dart @@ -1,3 +1,4 @@ +import 'package:cybear_jinni/domain/vendors/esphome_login/generic_esphome_login_entity.dart'; import 'package:cybear_jinni/domain/vendors/lifx_login/generic_lifx_login_entity.dart'; import 'package:cybear_jinni/domain/vendors/login_abstract/core_login_failures.dart'; import 'package:cybear_jinni/domain/vendors/tuya_login/generic_tuya_login_entity.dart'; @@ -9,6 +10,10 @@ import 'package:kt_dart/kt.dart'; abstract class IVendorsRepository { Future>> getVendors(); + Future> loginWithEspHome( + GenericEspHomeLoginDE genericEspHomeDE, + ); + Future> loginWithLifx( GenericLifxLoginDE genericLifxDE, ); diff --git a/lib/infrastructure/generic_devices/generic_light_with_brightness_device/generic_light_with_brightness_device_dtos.dart b/lib/infrastructure/generic_devices/generic_light_with_brightness_device/generic_light_with_brightness_device_dtos.dart new file mode 100644 index 000000000..c8580114a --- /dev/null +++ b/lib/infrastructure/generic_devices/generic_light_with_brightness_device/generic_light_with_brightness_device_dtos.dart @@ -0,0 +1,88 @@ +import 'package:cybear_jinni/domain/devices/abstract_device/device_entity_abstract.dart'; +import 'package:cybear_jinni/domain/devices/abstract_device/value_objects_core.dart'; +import 'package:cybear_jinni/domain/devices/generic_light_with_brightness_device/generic_light_with_brightness_entity.dart'; +import 'package:cybear_jinni/domain/devices/generic_light_with_brightness_device/generic_light_with_brightness_value_objects.dart'; +import 'package:cybear_jinni/infrastructure/generic_devices/abstract_device/device_entity_dto_abstract.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'generic_light_with_brightness_device_dtos.freezed.dart'; +part 'generic_light_with_brightness_device_dtos.g.dart'; + +@freezed +abstract class GenericLightWithBrightnessDeviceDtos + implements _$GenericLightWithBrightnessDeviceDtos, DeviceEntityDtoAbstract { + factory GenericLightWithBrightnessDeviceDtos({ + // @JsonKey(ignore: true) + required String id, + required String vendorUniqueId, + required String? defaultName, + required String? deviceStateGRPC, + required String? senderDeviceOs, + required String? senderDeviceModel, + required String? senderId, + required String? lightSwitchState, + required String? deviceTypes, + required String? compUuid, + required String? deviceVendor, + required String? lightBrightness, + String? deviceDtoClass, + String? stateMassage, + + // required ServerTimestampConverter() FieldValue serverTimeStamp, + }) = _GenericLightWithBrightnessDeviceDtos; + + GenericLightWithBrightnessDeviceDtos._(); + + factory GenericLightWithBrightnessDeviceDtos.fromDomain( + GenericLightWithBrightnessDE genericLightWithBrightnessDE, + ) { + return GenericLightWithBrightnessDeviceDtos( + deviceDtoClass: (GenericLightWithBrightnessDeviceDtos).toString(), + id: genericLightWithBrightnessDE.uniqueId.getOrCrash(), + vendorUniqueId: genericLightWithBrightnessDE.vendorUniqueId.getOrCrash(), + defaultName: genericLightWithBrightnessDE.defaultName.getOrCrash(), + deviceStateGRPC: + genericLightWithBrightnessDE.deviceStateGRPC.getOrCrash(), + stateMassage: genericLightWithBrightnessDE.stateMassage.getOrCrash(), + senderDeviceOs: genericLightWithBrightnessDE.senderDeviceOs.getOrCrash(), + senderDeviceModel: + genericLightWithBrightnessDE.senderDeviceModel.getOrCrash(), + senderId: genericLightWithBrightnessDE.senderId.getOrCrash(), + lightSwitchState: + genericLightWithBrightnessDE.lightSwitchState!.getOrCrash(), + deviceTypes: genericLightWithBrightnessDE.deviceTypes.getOrCrash(), + compUuid: genericLightWithBrightnessDE.compUuid.getOrCrash(), + deviceVendor: genericLightWithBrightnessDE.deviceVendor.getOrCrash(), + lightBrightness: + genericLightWithBrightnessDE.lightBrightness.getOrCrash(), + + // serverTimeStamp: FieldValue.serverTimestamp(), + ); + } + + factory GenericLightWithBrightnessDeviceDtos.fromJson( + Map json) => + _$GenericLightWithBrightnessDeviceDtosFromJson(json); + + @override + final String deviceDtoClassInstance = + (GenericLightWithBrightnessDeviceDtos).toString(); + + @override + DeviceEntityAbstract toDomain() { + return GenericLightWithBrightnessDE( + uniqueId: CoreUniqueId.fromUniqueString(id), + vendorUniqueId: VendorUniqueId.fromUniqueString(vendorUniqueId), + defaultName: DeviceDefaultName(defaultName), + deviceStateGRPC: DeviceState(deviceStateGRPC), + stateMassage: DeviceStateMassage(stateMassage), + senderDeviceOs: DeviceSenderDeviceOs(senderDeviceOs), + senderDeviceModel: DeviceSenderDeviceModel(senderDeviceModel), + senderId: DeviceSenderId.fromUniqueString(senderId), + deviceVendor: DeviceVendor(deviceVendor), + compUuid: DeviceCompUuid(compUuid), + lightSwitchState: GenericLightWithBrightnessSwitchState(lightSwitchState), + lightBrightness: GenericLightWithBrightnessBrightness(lightBrightness), + ); + } +} diff --git a/lib/infrastructure/generic_vendors_login/generic_esphome_login/generic_esphome_login_dtos.dart b/lib/infrastructure/generic_vendors_login/generic_esphome_login/generic_esphome_login_dtos.dart new file mode 100644 index 000000000..a9bbd8fee --- /dev/null +++ b/lib/infrastructure/generic_vendors_login/generic_esphome_login/generic_esphome_login_dtos.dart @@ -0,0 +1,61 @@ +import 'package:cybear_jinni/domain/vendors/esphome_login/generic_esphome_login_entity.dart'; +import 'package:cybear_jinni/domain/vendors/esphome_login/generic_esphome_login_value_objects.dart'; +import 'package:cybear_jinni/domain/vendors/login_abstract/login_entity_abstract.dart'; +import 'package:cybear_jinni/domain/vendors/login_abstract/value_login_objects_core.dart'; +import 'package:cybear_jinni/infrastructure/generic_vendors_login/generic_login_abstract/login_entity_dto_abstract.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'generic_esphome_login_dtos.freezed.dart'; +part 'generic_esphome_login_dtos.g.dart'; + +@freezed +abstract class GenericEspHomeLoginDtos + implements _$GenericEspHomeLoginDtos, LoginEntityDtoAbstract { + factory GenericEspHomeLoginDtos({ + // @JsonKey(ignore: true) + required String? senderUniqueId, + required String? loginVendor, + required String? esphomeDevicePass, + // required ServerTimestampConverter() FieldValue serverTimeStamp, + }) = _GenericEspHomeLoginDtos; + + GenericEspHomeLoginDtos._(); + + factory GenericEspHomeLoginDtos.fromDomain( + GenericEspHomeLoginDE genericEspHomeDE, + ) { + return GenericEspHomeLoginDtos( + senderUniqueId: genericEspHomeDE.senderUniqueId.getOrCrash(), + loginVendor: genericEspHomeDE.loginVendor.getOrCrash(), + esphomeDevicePass: genericEspHomeDE.espHomeDevicePass.getOrCrash(), + + // serverTimeStamp: FieldValue.serverTimestamp(), + ); + } + + factory GenericEspHomeLoginDtos.fromJson(Map json) => + _$GenericEspHomeLoginDtosFromJson(json); + + @override + final String loginDtoClassInstance = (GenericEspHomeLoginDtos).toString(); + + @override + LoginEntityAbstract toDomain() { + return GenericEspHomeLoginDE( + senderUniqueId: CoreLoginSenderId.fromUniqueString(senderUniqueId), + espHomeDevicePass: GenericEspHomeDeviceLoginApiPass(esphomeDevicePass), + ); + } +} + +// class ServerTimestampConverter implements JsonConverter { +// const ServerTimestampConverter(); +// +// @override +// FieldValue fromJson(Object json) { +// return FieldValue.serverTimestamp(); +// } +// +// @override +// Object toJson(FieldValue fieldValue) => fieldValue; +// } diff --git a/lib/infrastructure/vendors/vendors_repository.dart b/lib/infrastructure/vendors/vendors_repository.dart index 7733a298e..ba7b8a0ed 100644 --- a/lib/infrastructure/vendors/vendors_repository.dart +++ b/lib/infrastructure/vendors/vendors_repository.dart @@ -1,3 +1,4 @@ +import 'package:cybear_jinni/domain/vendors/esphome_login/generic_esphome_login_entity.dart'; import 'package:cybear_jinni/domain/vendors/i_vendor_repository.dart'; import 'package:cybear_jinni/domain/vendors/lifx_login/generic_lifx_login_entity.dart'; import 'package:cybear_jinni/domain/vendors/login_abstract/core_login_failures.dart'; @@ -26,7 +27,6 @@ class VendorsRepository implements IVendorsRepository { if (vendorName == VendorsAndServices.vendorsAndServicesNotSupported.name || vendorName == VendorsAndServices.miHome.name || - vendorName == VendorsAndServices.philipsHue.name || vendorName == VendorsAndServices.sonoffDiy.name || vendorName == VendorsAndServices.sonoffEweLink.name || vendorName == VendorsAndServices.ikea.name || @@ -38,7 +38,10 @@ class VendorsRepository implements IVendorsRepository { vendorName == VendorsAndServices.xiaomi.name || vendorName == VendorsAndServices.wiz.name || vendorName == VendorsAndServices.switchBot.name || - vendorName == VendorsAndServices.somfy.name) { + vendorName == VendorsAndServices.somfy.name || + vendorName == VendorsAndServices.tuyaSmart.name || + vendorName == VendorsAndServices.smartLife.name || + vendorName == VendorsAndServices.jinvooSmart.name) { continue; } Vendor v = vendorPlusImageFromVandorName(vendorName); @@ -108,6 +111,12 @@ class VendorsRepository implements IVendorsRepository { return left(const CoreLoginFailure.unexpected()); } } + + @override + Future> loginWithEspHome( + GenericEspHomeLoginDE genericEspHomeDE) { + return loginWithVendor(genericEspHomeDE); + } } class VendorsMocDataWithImages { diff --git a/lib/presentation/add_new_automation_process/add_action/widgets/action_choose_information.dart b/lib/presentation/add_new_automation_process/add_action/widgets/action_choose_information.dart index 2b12db931..cbfd18e14 100644 --- a/lib/presentation/add_new_automation_process/add_action/widgets/action_choose_information.dart +++ b/lib/presentation/add_new_automation_process/add_action/widgets/action_choose_information.dart @@ -152,7 +152,7 @@ class ActionChooseInformation extends StatelessWidget { gravity: ToastGravity.BOTTOM, backgroundColor: Colors.purple, textColor: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16.0, ); diff --git a/lib/presentation/add_new_automation_process/add_bindings/widgets/add_binding_widget.dart b/lib/presentation/add_new_automation_process/add_bindings/widgets/add_binding_widget.dart index ded92ac50..d73fff7da 100644 --- a/lib/presentation/add_new_automation_process/add_bindings/widgets/add_binding_widget.dart +++ b/lib/presentation/add_new_automation_process/add_bindings/widgets/add_binding_widget.dart @@ -118,7 +118,7 @@ class AddBindingWidget extends StatelessWidget { backgroundColor: Colors.blueGrey, textColor: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, fontSize: 16.0, ); @@ -141,7 +141,7 @@ class AddBindingWidget extends StatelessWidget { backgroundColor: Colors.blueGrey, textColor: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, fontSize: 16.0, ); @@ -168,7 +168,7 @@ class AddBindingWidget extends StatelessWidget { gravity: ToastGravity.CENTER, backgroundColor: Colors.blueGrey, textColor: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16.0, ); context.read().add( diff --git a/lib/presentation/add_new_automation_process/add_routine/pick_repeat_time/pick_repeat_time_page.dart b/lib/presentation/add_new_automation_process/add_routine/pick_repeat_time/pick_repeat_time_page.dart index 07fae0fbd..f302c4d50 100644 --- a/lib/presentation/add_new_automation_process/add_routine/pick_repeat_time/pick_repeat_time_page.dart +++ b/lib/presentation/add_new_automation_process/add_routine/pick_repeat_time/pick_repeat_time_page.dart @@ -88,10 +88,10 @@ class PickRepeatTimePage extends StatelessWidget { const SizedBox( height: 2, ), - createInlinePicker( - context: context, + showPicker( + isInlinePicker: true, is24HrFormat: true, - value: const TimeOfDay(hour: 4, minute: 44), + value: Time(hour: 4, minute: 44), onChange: (TimeOfDay dateTimePicked) { hourToRepeat = RoutineCbjRepeatDateHour( dateTimePicked.hour.toString(), @@ -102,7 +102,7 @@ class PickRepeatTimePage extends StatelessWidget { }, cancelText: '', okText: 'Confirm Time', - ), + ) as Widget, const SizedBox( height: 40, ), diff --git a/lib/presentation/add_new_automation_process/add_routine/widgets/add_routine_widget.dart b/lib/presentation/add_new_automation_process/add_routine/widgets/add_routine_widget.dart index e4b28b211..9d7cc9be3 100644 --- a/lib/presentation/add_new_automation_process/add_routine/widgets/add_routine_widget.dart +++ b/lib/presentation/add_new_automation_process/add_routine/widgets/add_routine_widget.dart @@ -118,7 +118,7 @@ class AddRoutineWidget extends StatelessWidget { backgroundColor: Colors.blueGrey, textColor: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, fontSize: 16.0, ); @@ -141,7 +141,7 @@ class AddRoutineWidget extends StatelessWidget { backgroundColor: Colors.blueGrey, textColor: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, fontSize: 16.0, ); @@ -168,7 +168,7 @@ class AddRoutineWidget extends StatelessWidget { gravity: ToastGravity.CENTER, backgroundColor: Colors.blueGrey, textColor: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16.0, ); context.read().add( diff --git a/lib/presentation/add_new_automation_process/add_scene/widgets/add_scene_widget.dart b/lib/presentation/add_new_automation_process/add_scene/widgets/add_scene_widget.dart index 5b9703a10..2f90ed220 100644 --- a/lib/presentation/add_new_automation_process/add_scene/widgets/add_scene_widget.dart +++ b/lib/presentation/add_new_automation_process/add_scene/widgets/add_scene_widget.dart @@ -118,7 +118,7 @@ class AddSceneWidget extends StatelessWidget { backgroundColor: Colors.blueGrey, textColor: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, fontSize: 16.0, ); @@ -141,7 +141,7 @@ class AddSceneWidget extends StatelessWidget { backgroundColor: Colors.blueGrey, textColor: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, fontSize: 16.0, ); @@ -168,7 +168,7 @@ class AddSceneWidget extends StatelessWidget { gravity: ToastGravity.CENTER, backgroundColor: Colors.blueGrey, textColor: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16.0, ); context.read().add( diff --git a/lib/presentation/add_new_devices/smart_device_to_configure.dart b/lib/presentation/add_new_devices/smart_device_to_configure.dart index bef87ea06..50350b9f2 100644 --- a/lib/presentation/add_new_devices/smart_device_to_configure.dart +++ b/lib/presentation/add_new_devices/smart_device_to_configure.dart @@ -32,7 +32,7 @@ class SmartDeviceToConfigure extends StatelessWidget { child: Text( 'Edit device', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ) diff --git a/lib/presentation/add_new_devices_process/choose_device_vendor_to_add/choose_device_vendor_to_add_page.dart b/lib/presentation/add_new_devices_process/choose_device_vendor_to_add/choose_device_vendor_to_add_page.dart index 48d6b564b..854449f41 100644 --- a/lib/presentation/add_new_devices_process/choose_device_vendor_to_add/choose_device_vendor_to_add_page.dart +++ b/lib/presentation/add_new_devices_process/choose_device_vendor_to_add/choose_device_vendor_to_add_page.dart @@ -21,7 +21,7 @@ class ChooseDeviceVendorToAddPage extends StatelessWidget { backgroundColor: Colors.black, systemOverlayStyle: SystemUiOverlayStyle.light, ), - body: Container( + body: ColoredBox( color: HexColor('#FBF5F9'), child: Column( children: [ diff --git a/lib/presentation/add_new_devices_process/choose_device_vendor_to_add/widgets/vendor_widget.dart b/lib/presentation/add_new_devices_process/choose_device_vendor_to_add/widgets/vendor_widget.dart index 6d3085bce..8a37f2146 100644 --- a/lib/presentation/add_new_devices_process/choose_device_vendor_to_add/widgets/vendor_widget.dart +++ b/lib/presentation/add_new_devices_process/choose_device_vendor_to_add/widgets/vendor_widget.dart @@ -34,13 +34,16 @@ class VendorWidget extends StatelessWidget { context.router.push(const AddJinvooSmartVendorRoute()); } else if (vendorName == VendorsAndServices.espHome.name.toLowerCase()) { + context.router.push(const AddEspHomeVendorRoute()); + } else if (vendorName == + VendorsAndServices.philipsHue.name.toLowerCase()) { Fluttertoast.showToast( - msg: '${vendor.name.getOrCrash()} devices can only be added ' - 'manually in the Hub', + msg: + 'Please press the button on top of the Philips Hue Hub for and wait 20s', toastLength: Toast.LENGTH_LONG, gravity: ToastGravity.SNACKBAR, backgroundColor: Colors.orangeAccent, - textColor: Theme.of(context).textTheme.bodyText1!.color, + textColor: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16.0, ); } else { @@ -50,7 +53,7 @@ class VendorWidget extends StatelessWidget { toastLength: Toast.LENGTH_SHORT, gravity: ToastGravity.SNACKBAR, backgroundColor: Colors.lightBlue, - textColor: Theme.of(context).textTheme.bodyText1!.color, + textColor: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16.0, ); } diff --git a/lib/presentation/add_new_devices_process/computer_connection_check/widgets/computer_connection_check_widget.dart b/lib/presentation/add_new_devices_process/computer_connection_check/widgets/computer_connection_check_widget.dart index 22ad73fa6..1017517c8 100644 --- a/lib/presentation/add_new_devices_process/computer_connection_check/widgets/computer_connection_check_widget.dart +++ b/lib/presentation/add_new_devices_process/computer_connection_check/widgets/computer_connection_check_widget.dart @@ -62,7 +62,7 @@ class ComputerConnectionCheckWidget extends StatelessWidget { 'Connecting computer to WiFi', style: TextStyle( fontSize: 25, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -79,7 +79,7 @@ class ComputerConnectionCheckWidget extends StatelessWidget { valueColor: const AlwaysStoppedAnimation(Colors.pink), backgroundColor: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, borderColor: Colors.red.withOpacity(0.9), borderWidth: 4.0, center: const Text( @@ -95,7 +95,7 @@ class ComputerConnectionCheckWidget extends StatelessWidget { Text( 'Searching for CyBear Jinni Hub in your WiFi network', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ], diff --git a/lib/presentation/add_new_devices_process/configure_new_cbj_comp/widgets/configure_new_cbj_comp_widget.dart b/lib/presentation/add_new_devices_process/configure_new_cbj_comp/widgets/configure_new_cbj_comp_widget.dart index b7b534f15..67ca6352d 100644 --- a/lib/presentation/add_new_devices_process/configure_new_cbj_comp/widgets/configure_new_cbj_comp_widget.dart +++ b/lib/presentation/add_new_devices_process/configure_new_cbj_comp/widgets/configure_new_cbj_comp_widget.dart @@ -105,7 +105,7 @@ class ConfigureNewCbjCompWidgets extends StatelessWidget { child: TextFormField( controller: textEditingControllerTemp, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), decoration: InputDecoration( filled: true, @@ -113,18 +113,18 @@ class ConfigureNewCbjCompWidgets extends StatelessWidget { focusedBorder: OutlineInputBorder( borderSide: BorderSide( color: - (Theme.of(context).textTheme.bodyText1!.color)!, + (Theme.of(context).textTheme.bodyLarge!.color)!, width: 2.0, ), borderRadius: BorderRadius.circular(15.0), ), prefixIcon: Icon( FontAwesomeIcons.solidLightbulb, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), labelText: '${device.deviceTypes.getOrCrash()} Name', labelStyle: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), autocorrect: false, @@ -150,7 +150,7 @@ class ConfigureNewCbjCompWidgets extends StatelessWidget { child: Text( 'Type ${device.deviceTypes.getOrCrash()} is not supported yet', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -187,7 +187,7 @@ class ConfigureNewCbjCompWidgets extends StatelessWidget { return Text( 'Configure devices', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ); }, @@ -209,7 +209,7 @@ class ConfigureNewCbjCompWidgets extends StatelessWidget { 'Connecting computer to WiFi', style: TextStyle( fontSize: 25, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -226,7 +226,7 @@ class ConfigureNewCbjCompWidgets extends StatelessWidget { valueColor: const AlwaysStoppedAnimation(Colors.pink), backgroundColor: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, borderColor: Colors.red.withOpacity(0.9), borderWidth: 4.0, center: const Text( @@ -242,7 +242,7 @@ class ConfigureNewCbjCompWidgets extends StatelessWidget { Text( 'Please wait as we are setting your new computer', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ], @@ -262,7 +262,7 @@ class ConfigureNewCbjCompWidgets extends StatelessWidget { return Text( 'Error in the process.', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ); }, @@ -275,7 +275,7 @@ class ConfigureNewCbjCompWidgets extends StatelessWidget { return Text( 'Computer have been configured.', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ); }, diff --git a/lib/presentation/add_new_devices_process/connect_to_home_wifi/connect_to_home_wifi_page.dart b/lib/presentation/add_new_devices_process/connect_to_home_wifi/connect_to_home_wifi_page.dart index dca7991af..7dcb3804e 100644 --- a/lib/presentation/add_new_devices_process/connect_to_home_wifi/connect_to_home_wifi_page.dart +++ b/lib/presentation/add_new_devices_process/connect_to_home_wifi/connect_to_home_wifi_page.dart @@ -60,7 +60,7 @@ class ConnectToHomeWifiPage extends StatelessWidget { 'Connect Hub To Home WiFi', style: TextStyle( fontSize: 25, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), diff --git a/lib/presentation/add_new_devices_process/connect_to_home_wifi/widgets/connect_to_home_wifi_widget.dart b/lib/presentation/add_new_devices_process/connect_to_home_wifi/widgets/connect_to_home_wifi_widget.dart index 2122fe877..1fb402f04 100644 --- a/lib/presentation/add_new_devices_process/connect_to_home_wifi/widgets/connect_to_home_wifi_widget.dart +++ b/lib/presentation/add_new_devices_process/connect_to_home_wifi/widgets/connect_to_home_wifi_widget.dart @@ -7,8 +7,6 @@ import 'package:flutter_bloc/flutter_bloc.dart'; class ConnectToHomeWiFiWidget extends StatelessWidget { @override Widget build(BuildContext context) { - final Size screenSize = MediaQuery.of(context).size; - return BlocBuilder( builder: (context, state) { return SingleChildScrollView( @@ -49,7 +47,7 @@ class ConnectToHomeWiFiWidget extends StatelessWidget { width: 300, child: TextFormField( style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), decoration: InputDecoration( filled: true, @@ -57,12 +55,12 @@ class ConnectToHomeWiFiWidget extends StatelessWidget { prefixIcon: Icon( Icons.wifi, color: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, ), labelText: 'WiFi Name', labelStyle: TextStyle( color: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, ), ), autocorrect: false, @@ -81,7 +79,7 @@ class ConnectToHomeWiFiWidget extends StatelessWidget { width: 300, child: TextFormField( style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), decoration: InputDecoration( filled: true, @@ -89,12 +87,12 @@ class ConnectToHomeWiFiWidget extends StatelessWidget { prefixIcon: Icon( Icons.vpn_key, color: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, ), labelText: 'Password', labelStyle: TextStyle( color: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, ), ), autocorrect: false, @@ -122,7 +120,7 @@ class ConnectToHomeWiFiWidget extends StatelessWidget { child: Text( 'Connect to WiFi', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), diff --git a/lib/presentation/add_new_devices_process/open_access_point/open_access_pointi_page.dart b/lib/presentation/add_new_devices_process/open_access_point/open_access_pointi_page.dart index e3a081f89..b90ba25e1 100644 --- a/lib/presentation/add_new_devices_process/open_access_point/open_access_pointi_page.dart +++ b/lib/presentation/add_new_devices_process/open_access_point/open_access_pointi_page.dart @@ -60,7 +60,7 @@ class OpenAccessPointPage extends StatelessWidget { 'Open Access Point', style: TextStyle( fontSize: 25, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), diff --git a/lib/presentation/add_new_devices_process/open_access_point/widgets/open_access_point_widget.dart b/lib/presentation/add_new_devices_process/open_access_point/widgets/open_access_point_widget.dart index 6c7c65c5b..fb7cb56f5 100644 --- a/lib/presentation/add_new_devices_process/open_access_point/widgets/open_access_point_widget.dart +++ b/lib/presentation/add_new_devices_process/open_access_point/widgets/open_access_point_widget.dart @@ -80,7 +80,7 @@ class OpenAccessPointWidget extends StatelessWidget { backgroundColor: Colors.lightBlue, textColor: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, fontSize: 16.0, ), @@ -128,7 +128,7 @@ class OpenAccessPointWidget extends StatelessWidget { backgroundColor: Colors.lightBlue, textColor: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, fontSize: 16.0, ), diff --git a/lib/presentation/add_new_devices_process/scan_for_new_cbj_comps/widgets/cbj_comp_card.dart b/lib/presentation/add_new_devices_process/scan_for_new_cbj_comps/widgets/cbj_comp_card.dart index 63f11494c..3505f605a 100644 --- a/lib/presentation/add_new_devices_process/scan_for_new_cbj_comps/widgets/cbj_comp_card.dart +++ b/lib/presentation/add_new_devices_process/scan_for_new_cbj_comps/widgets/cbj_comp_card.dart @@ -25,10 +25,10 @@ class CBJCompCard extends StatelessWidget { decoration: BoxDecoration( border: Border( top: BorderSide( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), bottom: BorderSide( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), ), ), @@ -49,7 +49,7 @@ class CBJCompCard extends StatelessWidget { style: TextStyle( color: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, ), ), @@ -60,7 +60,7 @@ class CBJCompCard extends StatelessWidget { 'Type not supported ' '${compEntity.deviceTypes.getOrCrash()} yet', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ); } @@ -85,7 +85,7 @@ class CBJCompCard extends StatelessWidget { child: Text( 'Set up computer', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), diff --git a/lib/presentation/add_new_devices_process/scan_for_new_cbj_comps/widgets/cbj_comp_card_with_devices_controll.dart b/lib/presentation/add_new_devices_process/scan_for_new_cbj_comps/widgets/cbj_comp_card_with_devices_controll.dart index 22bbeff57..7ceae0621 100644 --- a/lib/presentation/add_new_devices_process/scan_for_new_cbj_comps/widgets/cbj_comp_card_with_devices_controll.dart +++ b/lib/presentation/add_new_devices_process/scan_for_new_cbj_comps/widgets/cbj_comp_card_with_devices_controll.dart @@ -33,7 +33,7 @@ class CBJCompCardWithDevicesControll extends StatelessWidget { child: Text( 'Type: ${deviceEntity.deviceTypes.getOrCrash()}', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -46,7 +46,7 @@ class CBJCompCardWithDevicesControll extends StatelessWidget { child: Text( 'Type ${deviceEntity.deviceTypes.getOrCrash()} is not supported', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -73,7 +73,7 @@ class CBJCompCardWithDevicesControll extends StatelessWidget { padding: const EdgeInsets.all(3.0), decoration: BoxDecoration( border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), color: Colors.purpleAccent.withOpacity(0.2), ), @@ -83,10 +83,10 @@ class CBJCompCardWithDevicesControll extends StatelessWidget { decoration: BoxDecoration( border: Border( top: BorderSide( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), bottom: BorderSide( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), ), ), @@ -99,25 +99,25 @@ class CBJCompCardWithDevicesControll extends StatelessWidget { initial: (_) => Text( 'Initial', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), actionInProgress: (_) => Text( 'actionInProgress', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), deleteFailure: (_) => Text( 'deleteFailure', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), deleteSuccess: (_) => Text( 'deleteSuccess', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -135,7 +135,7 @@ class CBJCompCardWithDevicesControll extends StatelessWidget { child: Text( 'Set up computer', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), diff --git a/lib/presentation/add_new_devices_process/scan_for_new_cbj_comps/widgets/scan_for_new_cbj_comps_widget.dart b/lib/presentation/add_new_devices_process/scan_for_new_cbj_comps/widgets/scan_for_new_cbj_comps_widget.dart index 240da396e..7bcc23adc 100644 --- a/lib/presentation/add_new_devices_process/scan_for_new_cbj_comps/widgets/scan_for_new_cbj_comps_widget.dart +++ b/lib/presentation/add_new_devices_process/scan_for_new_cbj_comps/widgets/scan_for_new_cbj_comps_widget.dart @@ -11,10 +11,6 @@ import 'package:flutter_bloc/flutter_bloc.dart'; class ScanForNewCBJCompsWidget extends StatelessWidget { @override Widget build(BuildContext context) { - final Size screenSize = MediaQuery.of(context).size; - final double sizeBoxWidth = screenSize.width * 0.25; - final List cbjCompEntityList = []; - return BlocBuilder( builder: (context, state) { return state.map( @@ -28,7 +24,7 @@ class ScanForNewCBJCompsWidget extends StatelessWidget { Text( 'Scanning For Devices', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 26, ), ), diff --git a/lib/presentation/add_new_room/widgets/add_new_room_form.dart b/lib/presentation/add_new_room/widgets/add_new_room_form.dart index 1437a4228..20284b9e9 100644 --- a/lib/presentation/add_new_room/widgets/add_new_room_form.dart +++ b/lib/presentation/add_new_room/widgets/add_new_room_form.dart @@ -118,7 +118,7 @@ class AddNewRoomForm extends StatelessWidget { gravity: ToastGravity.BOTTOM, backgroundColor: Colors.purple, textColor: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16.0, ); Navigator.pop(context); diff --git a/lib/presentation/add_user_to_home/widgets/add_user_to_home_widget.dart b/lib/presentation/add_user_to_home/widgets/add_user_to_home_widget.dart index 5956f92e6..2e4fdf3d3 100644 --- a/lib/presentation/add_user_to_home/widgets/add_user_to_home_widget.dart +++ b/lib/presentation/add_user_to_home/widgets/add_user_to_home_widget.dart @@ -7,7 +7,6 @@ import 'package:fluttertoast/fluttertoast.dart'; class AddUserToHomeWidget extends StatelessWidget { @override Widget build(BuildContext context) { - final Size screenSize = MediaQuery.of(context).size; String userToAddEmail = ''; return BlocConsumer( @@ -47,18 +46,18 @@ class AddUserToHomeWidget extends StatelessWidget { width: 300, child: TextFormField( style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), decoration: InputDecoration( filled: true, fillColor: Colors.greenAccent.withOpacity(0.3), prefixIcon: Icon( Icons.alternate_email, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), labelText: 'Email', labelStyle: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), autocorrect: false, @@ -86,7 +85,7 @@ class AddUserToHomeWidget extends StatelessWidget { child: Text( 'Add User', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -109,7 +108,7 @@ class AddUserToHomeWidget extends StatelessWidget { Text( 'User have been add successfully', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 20, ), ), @@ -122,7 +121,7 @@ class AddUserToHomeWidget extends StatelessWidget { Text( 'Copy home ID', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 20, ), ), @@ -143,7 +142,7 @@ class AddUserToHomeWidget extends StatelessWidget { gravity: ToastGravity.SNACKBAR, backgroundColor: Colors.lightBlue, textColor: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16.0, ), ); @@ -156,7 +155,7 @@ class AddUserToHomeWidget extends StatelessWidget { style: TextStyle( color: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, fontWeight: FontWeight.bold, fontSize: 20, @@ -169,7 +168,7 @@ class AddUserToHomeWidget extends StatelessWidget { 'Please give home id to the user, he needs it to' ' join the home.', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 15, ), ), @@ -182,7 +181,7 @@ class AddUserToHomeWidget extends StatelessWidget { 'Adding user Failed.\n' 'Did the user already created account with that email?', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ); }, diff --git a/lib/presentation/add_vendors_pages/add_esphome_vendor/add_esphome_vendor_page.dart b/lib/presentation/add_vendors_pages/add_esphome_vendor/add_esphome_vendor_page.dart new file mode 100644 index 000000000..6fdbea0d0 --- /dev/null +++ b/lib/presentation/add_vendors_pages/add_esphome_vendor/add_esphome_vendor_page.dart @@ -0,0 +1,21 @@ +import 'package:cybear_jinni/application/esphome_auth/esphome_sign_in_form/esphome_sign_in_form_bloc.dart'; +import 'package:cybear_jinni/injection.dart'; +import 'package:cybear_jinni/presentation/add_vendors_pages/add_esphome_vendor/widgets/esphome_sign_in_form.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; + +class AddEspHomeVendorPage extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + backgroundColor: Colors.black, + title: const Text('EspHome Sign In'), + ), + body: BlocProvider( + create: (context) => getIt(), + child: EspHomeSignInForm(), + ), + ); + } +} diff --git a/lib/presentation/add_vendors_pages/add_esphome_vendor/widgets/esphome_sign_in_form.dart b/lib/presentation/add_vendors_pages/add_esphome_vendor/widgets/esphome_sign_in_form.dart new file mode 100644 index 000000000..c607851f0 --- /dev/null +++ b/lib/presentation/add_vendors_pages/add_esphome_vendor/widgets/esphome_sign_in_form.dart @@ -0,0 +1,137 @@ +import 'package:another_flushbar/flushbar_helper.dart'; +import 'package:auto_route/auto_route.dart'; +import 'package:cybear_jinni/application/esphome_auth/esphome_sign_in_form/esphome_sign_in_form_bloc.dart'; +import 'package:cybear_jinni/domain/vendors/login_abstract/core_login_failures.dart'; +import 'package:cybear_jinni/presentation/routes/app_router.gr.dart'; +import 'package:dartz/dartz.dart'; +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:fluttertoast/fluttertoast.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; + +class EspHomeSignInForm extends StatelessWidget { + @override + Widget build(BuildContext context) { + final Size screenSize = MediaQuery.of(context).size; + + return BlocConsumer( + listener: (context, state) { + state.authFailureOrSuccessOption.fold( + () {}, + (Either either) => either.fold( + (CoreLoginFailure failure) => { + FlushbarHelper.createError( + message: 'Validation error', + // failure.map( + // cancelledByUser: (_) => 'Cancelled', + // serverError: (_) => 'Server error', + // invalidApiKey: (_) => 'Email already in use', + // ), + ).show(context), + }, (_) { + context.router.push(const WhereToLoginRouteMinimalRoute()); + + // context + // .read()() + // .add(const EspHomeSignInFormEvent.()); + }), + ); + }, + builder: (context, state) { + return Form( + autovalidateMode: AutovalidateMode.onUserInteraction, + child: ListView( + padding: const EdgeInsets.all(8), + children: [ + Hero( + tag: 'Logo', + child: CircleAvatar( + backgroundColor: Colors.transparent, + radius: screenSize.height * 0.1, + child: Container( + width: 180, + height: 180, + decoration: const BoxDecoration( + image: DecorationImage( + image: NetworkImage( + 'https://i.ibb.co/W2YG23s/ESPHome-logo.png', + ), + fit: BoxFit.fitHeight, + ), + ), + ), + // Image.asset('assets/cbj_logo.png'), + ), + ), + const SizedBox( + height: 8, + ), + TextFormField( + decoration: const InputDecoration( + prefixIcon: FaIcon( + FontAwesomeIcons.key, + ), + labelText: 'ESPHome device password', + ), + autocorrect: false, + onChanged: (value) => context + .read() + .add(EspHomeSignInFormEvent.apiKeyChanged(value)), + validator: (_) => context + .read() + .state + .espHomeDevicePassword + .value + .fold( + (CoreLoginFailure f) => 'Validation error', + // f.maybeMap( + // invalidEmail: (result) => result.failedValue, + // containsSpace: (result) => result.failedValue, + // orElse: () => null, + // ), + (r) => null, + ), + ), + const SizedBox( + height: 8, + ), + Row( + children: [ + Expanded( + child: TextButton( + onPressed: () { + context.read().add( + const EspHomeSignInFormEvent.signInWithApiKey(), + ); + + Fluttertoast.showToast( + msg: 'Sign in to ESPHome, devices will appear in the ' + 'app after getting discovered', + toastLength: Toast.LENGTH_LONG, + gravity: ToastGravity.BOTTOM, + backgroundColor: Colors.deepPurple, + textColor: + Theme.of(context).textTheme.bodyLarge!.color, + fontSize: 16.0, + ); + Navigator.pop(context); + }, + child: const Text('SIGN IN').tr(), + ), + ), + ], + ), + if (state.isSubmitting) ...[ + const SizedBox( + height: 8, + ), + const LinearProgressIndicator() + ], + ], + ), + ); + }, + ); + } +} diff --git a/lib/presentation/add_vendors_pages/add_jinvoo_smart_vendor/widgets/jinvoo_smart_sign_in_form.dart b/lib/presentation/add_vendors_pages/add_jinvoo_smart_vendor/widgets/jinvoo_smart_sign_in_form.dart index 984a85ecf..d61429de7 100644 --- a/lib/presentation/add_vendors_pages/add_jinvoo_smart_vendor/widgets/jinvoo_smart_sign_in_form.dart +++ b/lib/presentation/add_vendors_pages/add_jinvoo_smart_vendor/widgets/jinvoo_smart_sign_in_form.dart @@ -201,14 +201,14 @@ class JinvooSmartSignInForm extends StatelessWidget { ); Fluttertoast.showToast( - msg: 'Sign in to Jinvoo Smart, please restart ' - 'the app to see the new devices', + msg: + 'Sign in to Jinvoo Smart, devices will appear in the shortly', toastLength: Toast.LENGTH_LONG, gravity: ToastGravity.BOTTOM, backgroundColor: Colors.indigo, textColor: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, fontSize: 16.0, ); diff --git a/lib/presentation/add_vendors_pages/add_lifx_vendor/widgets/lifx_sign_in_form.dart b/lib/presentation/add_vendors_pages/add_lifx_vendor/widgets/lifx_sign_in_form.dart index a13f3dd40..72eb15c9a 100644 --- a/lib/presentation/add_vendors_pages/add_lifx_vendor/widgets/lifx_sign_in_form.dart +++ b/lib/presentation/add_vendors_pages/add_lifx_vendor/widgets/lifx_sign_in_form.dart @@ -111,14 +111,14 @@ class LifxSignInForm extends StatelessWidget { ); Fluttertoast.showToast( - msg: 'Sign in to Lifix, please restart the app ' - 'to see the new devices', + msg: + 'Sign in to Lifx, devices will appear in the shortly', toastLength: Toast.LENGTH_LONG, gravity: ToastGravity.BOTTOM, backgroundColor: Colors.deepPurple, textColor: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, fontSize: 16.0, ); @@ -151,7 +151,7 @@ class LifxSignInForm extends StatelessWidget { child: Text( 'Get Lifx API key from Lifx website', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(), ), diff --git a/lib/presentation/add_vendors_pages/add_smart_life_vendor/widgets/smart_life_sign_in_form.dart b/lib/presentation/add_vendors_pages/add_smart_life_vendor/widgets/smart_life_sign_in_form.dart index c9a20f0d9..d96491053 100644 --- a/lib/presentation/add_vendors_pages/add_smart_life_vendor/widgets/smart_life_sign_in_form.dart +++ b/lib/presentation/add_vendors_pages/add_smart_life_vendor/widgets/smart_life_sign_in_form.dart @@ -209,7 +209,7 @@ class SmartLifeSignInForm extends StatelessWidget { backgroundColor: Colors.lightBlueAccent, textColor: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, fontSize: 16.0, ); diff --git a/lib/presentation/add_vendors_pages/add_tuya_vendor/widgets/tuya_sign_in_form.dart b/lib/presentation/add_vendors_pages/add_tuya_vendor/widgets/tuya_sign_in_form.dart index 0a774dde6..3279c433a 100644 --- a/lib/presentation/add_vendors_pages/add_tuya_vendor/widgets/tuya_sign_in_form.dart +++ b/lib/presentation/add_vendors_pages/add_tuya_vendor/widgets/tuya_sign_in_form.dart @@ -201,14 +201,14 @@ class TuyaSignInForm extends StatelessWidget { ); Fluttertoast.showToast( - msg: 'Sign in to Tuya, please restart the app ' - 'to see the new devices', + msg: + 'Sign in to Tuya, devices will appear in the shortly', toastLength: Toast.LENGTH_LONG, gravity: ToastGravity.BOTTOM, backgroundColor: Colors.deepOrange, textColor: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, fontSize: 16.0, ); diff --git a/lib/presentation/change_room_for_devices/widgets/change_room_for_devices_widget.dart b/lib/presentation/change_room_for_devices/widgets/change_room_for_devices_widget.dart index 164d7b803..dfcc73a35 100644 --- a/lib/presentation/change_room_for_devices/widgets/change_room_for_devices_widget.dart +++ b/lib/presentation/change_room_for_devices/widgets/change_room_for_devices_widget.dart @@ -115,7 +115,7 @@ class ChangeRoomForDevicesWidget extends StatelessWidget { toastLength: Toast.LENGTH_LONG, gravity: ToastGravity.BOTTOM, backgroundColor: Colors.purple, - textColor: Theme.of(context).textTheme.bodyText1!.color, + textColor: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16.0, ); context.read().add( diff --git a/lib/presentation/connect_to_hub/connect_to_hub_page.dart b/lib/presentation/connect_to_hub/connect_to_hub_page.dart index cb14400e6..f139a2576 100644 --- a/lib/presentation/connect_to_hub/connect_to_hub_page.dart +++ b/lib/presentation/connect_to_hub/connect_to_hub_page.dart @@ -120,7 +120,7 @@ class ConnectToHubPage extends StatelessWidget { // toastLength: Toast.LENGTH_SHORT, // gravity: ToastGravity.SNACKBAR, // backgroundColor: Colors.lightBlue, - // textColor: Theme.of(context).textTheme.bodyText1!.color, + // textColor: Theme.of(context).textTheme.bodyLarge!.color, // fontSize: 16.0, // ); }, diff --git a/lib/presentation/core/devices_cards/blinds_card.dart b/lib/presentation/core/devices_cards/blinds_card.dart index 8153ec458..ebfb1bbeb 100644 --- a/lib/presentation/core/devices_cards/blinds_card.dart +++ b/lib/presentation/core/devices_cards/blinds_card.dart @@ -9,9 +9,6 @@ class BlindsCard extends StatelessWidget { @override Widget build(BuildContext context) { - final Size screenSize = MediaQuery.of(context).size; - final double sizeBoxWidth = screenSize.width * 0.25; - final deviceState = _deviceEntity.deviceStateGRPC.getOrCrash(); final deviceAction = _deviceEntity.lightSwitchState!.getOrCrash(); @@ -51,10 +48,10 @@ class BlindsCard extends StatelessWidget { // activeToggleColor: const Color(0xFF2F363D), // inactiveToggleColor: Theme.of(context).primaryColor, // activeSwitchBorder: Border.all( - // color: (Theme.of(context).textTheme.bodyText1!.color)!, + // color: (Theme.of(context).textTheme.bodyLarge!.color)!, // ), // inactiveSwitchBorder: Border.all( - // color: (Theme.of(context).textTheme.bodyText1!.color)!, + // color: (Theme.of(context).textTheme.bodyLarge!.color)!, // ), // activeColor: toggleColor, // inactiveColor: toggleColor, @@ -64,7 +61,7 @@ class BlindsCard extends StatelessWidget { // ), // inactiveIcon: Icon( // FontAwesomeIcons.lightbulb, - // color: (Theme.of(context).textTheme.bodyText1!.color)!, + // color: (Theme.of(context).textTheme.bodyLarge!.color)!, // ), // onToggle: (bool value) => _onChange(context, value) // // _onChange(context, value), diff --git a/lib/presentation/core/devices_cards/light_card.dart b/lib/presentation/core/devices_cards/light_card.dart index fe9ae0d0d..4f01785aa 100644 --- a/lib/presentation/core/devices_cards/light_card.dart +++ b/lib/presentation/core/devices_cards/light_card.dart @@ -64,10 +64,10 @@ class LightCard extends StatelessWidget { activeToggleColor: const Color(0xFF2F363D), inactiveToggleColor: Theme.of(context).primaryColor, activeSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), inactiveSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), activeColor: toggleColor, inactiveColor: toggleColor, @@ -77,7 +77,7 @@ class LightCard extends StatelessWidget { ), inactiveIcon: Icon( FontAwesomeIcons.lightbulb, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onToggle: (bool value) => _onChange(context, value) // _onChange(context, value), diff --git a/lib/presentation/create_home/widgets/create_home_widget.dart b/lib/presentation/create_home/widgets/create_home_widget.dart index a92223447..7d9701336 100644 --- a/lib/presentation/create_home/widgets/create_home_widget.dart +++ b/lib/presentation/create_home/widgets/create_home_widget.dart @@ -28,17 +28,17 @@ class CreateHomeWidget extends StatelessWidget { width: 300, child: TextFormField( style: - TextStyle(color: Theme.of(context).textTheme.bodyText1!.color), + TextStyle(color: Theme.of(context).textTheme.bodyLarge!.color), decoration: InputDecoration( filled: true, fillColor: Colors.greenAccent.withOpacity(0.3), prefixIcon: Icon( Icons.home_outlined, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), labelText: 'Home Name', labelStyle: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), autocorrect: false, @@ -65,17 +65,17 @@ class CreateHomeWidget extends StatelessWidget { width: 300, child: TextFormField( style: - TextStyle(color: Theme.of(context).textTheme.bodyText1!.color), + TextStyle(color: Theme.of(context).textTheme.bodyLarge!.color), decoration: InputDecoration( filled: true, fillColor: Colors.greenAccent.withOpacity(0.3), prefixIcon: Icon( Icons.alternate_email, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), labelText: 'Email for smart devices', labelStyle: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), autocorrect: false, @@ -93,7 +93,7 @@ class CreateHomeWidget extends StatelessWidget { 'Smart devices needs account to function.\nPlease enter new email.', style: TextStyle( fontSize: 15, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -112,7 +112,7 @@ class CreateHomeWidget extends StatelessWidget { child: Text( 'Create Home', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), diff --git a/lib/presentation/device_full_screen_page/blinds/blinds_in_the_room/blinds_in_the_room_widget.dart b/lib/presentation/device_full_screen_page/blinds/blinds_in_the_room/blinds_in_the_room_widget.dart index af1bcb56f..032f9769c 100644 --- a/lib/presentation/device_full_screen_page/blinds/blinds_in_the_room/blinds_in_the_room_widget.dart +++ b/lib/presentation/device_full_screen_page/blinds/blinds_in_the_room/blinds_in_the_room_widget.dart @@ -44,21 +44,21 @@ class BlindsInTheRoomWidget extends StatelessWidget { border: InputBorder.none, hintText: products[index]['title'.tr()].toString(), hintStyle: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), subtitle: Text( products[index]['number'.tr()].toString(), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), trailing: IconButton( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, icon: const FaIcon(FontAwesomeIcons.pen), onPressed: () {}, ), diff --git a/lib/presentation/device_full_screen_page/blinds/settings_page_of_blinds.dart b/lib/presentation/device_full_screen_page/blinds/settings_page_of_blinds.dart index 4e9e17037..824abdec5 100644 --- a/lib/presentation/device_full_screen_page/blinds/settings_page_of_blinds.dart +++ b/lib/presentation/device_full_screen_page/blinds/settings_page_of_blinds.dart @@ -32,25 +32,25 @@ class SettingsPageOfBlinds extends StatelessWidget { title: Text( 'Name:_', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(args: [lightName]), subtitle: Text( 'Room:_', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(args: [roomName]), trailing: IconButton( icon: FaIcon( FontAwesomeIcons.pen, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onPressed: () {}, ), ), Divider( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ], ); diff --git a/lib/presentation/device_full_screen_page/blinds/smart_blind_widget.dart b/lib/presentation/device_full_screen_page/blinds/smart_blind_widget.dart index 210baa1c3..7f1a68e91 100644 --- a/lib/presentation/device_full_screen_page/blinds/smart_blind_widget.dart +++ b/lib/presentation/device_full_screen_page/blinds/smart_blind_widget.dart @@ -81,7 +81,7 @@ class _SmartBlindPage extends State { _blind!.defaultName.getOrCrash()!, // Show blind name style: TextStyle( fontSize: 19.0, - color: Theme.of(context).textTheme.bodyText2!.color, + color: Theme.of(context).textTheme.bodyMedium!.color, ), ), const SizedBox( @@ -100,10 +100,10 @@ class _SmartBlindPage extends State { activeToggleColor: const Color(0xFF2F363D), inactiveToggleColor: Theme.of(context).primaryColor, activeSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), inactiveSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), activeColor: const Color(0xFFFFDF5D), inactiveColor: Theme.of(context).primaryColorDark, @@ -113,7 +113,7 @@ class _SmartBlindPage extends State { ), inactiveIcon: Icon( MdiIcons.blinds, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onToggle: (bool value) => _onChange(value), ), diff --git a/lib/presentation/device_full_screen_page/blinds/widgets/blind_widget.dart b/lib/presentation/device_full_screen_page/blinds/widgets/blind_widget.dart index 2694675d7..209ad2e02 100644 --- a/lib/presentation/device_full_screen_page/blinds/widgets/blind_widget.dart +++ b/lib/presentation/device_full_screen_page/blinds/widgets/blind_widget.dart @@ -16,7 +16,6 @@ class BlindWidget extends StatelessWidget { @override Widget build(BuildContext context) { final Size screenSize = MediaQuery.of(context).size; - final double sizeBoxWidth = screenSize.width * 0.25; final deviceState = _deviceEntity.deviceStateGRPC.getOrCrash(); final deviceAction = _deviceEntity.blindsSwitchState!.getOrCrash(); @@ -70,12 +69,12 @@ class BlindWidget extends StatelessWidget { child: Tab( icon: FaIcon( FontAwesomeIcons.arrowDown, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), child: Text( 'Down', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16, ), ).tr(), @@ -108,12 +107,12 @@ class BlindWidget extends StatelessWidget { child: Tab( icon: FaIcon( FontAwesomeIcons.solidHand, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), child: Text( 'Stop', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16, ), ).tr(), @@ -146,12 +145,12 @@ class BlindWidget extends StatelessWidget { child: Tab( icon: FaIcon( FontAwesomeIcons.arrowUp, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), child: Text( 'Up', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16, ), ).tr(), diff --git a/lib/presentation/device_full_screen_page/blinds/widgets/room_blinds.dart b/lib/presentation/device_full_screen_page/blinds/widgets/room_blinds.dart index d4fe54b82..3b27f9897 100644 --- a/lib/presentation/device_full_screen_page/blinds/widgets/room_blinds.dart +++ b/lib/presentation/device_full_screen_page/blinds/widgets/room_blinds.dart @@ -23,8 +23,6 @@ class RoomBlinds extends StatelessWidget { final int maxLightsToShow; - final int _maxLightsInRow = 2; - final String _roomEntity; final List? _gradientColor; @@ -32,7 +30,6 @@ class RoomBlinds extends StatelessWidget { @override Widget build(BuildContext context) { final Size screenSize = MediaQuery.of(context).size; - final double sizeBoxWidth = screenSize.width * 0.25; Widget createSwitchTableWidget() { final List columnOfLights = []; @@ -54,7 +51,7 @@ class RoomBlinds extends StatelessWidget { maxLines: 1, maxFontSize: 19, style: TextStyle( - color: Theme.of(context).textTheme.bodyText2!.color, + color: Theme.of(context).textTheme.bodyMedium!.color, ), ), const SizedBox( @@ -94,7 +91,7 @@ class RoomBlinds extends StatelessWidget { ), borderRadius: const BorderRadius.all(Radius.circular(24)), border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, width: 0.6, ), ), @@ -128,7 +125,7 @@ class RoomBlinds extends StatelessWidget { Text( _roomEntity, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 25, decoration: TextDecoration.underline, ), @@ -136,7 +133,7 @@ class RoomBlinds extends StatelessWidget { if (_deviceEntityList.size > maxLightsToShow) FaIcon( FontAwesomeIcons.arrowRight, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 20, ), ], diff --git a/lib/presentation/device_full_screen_page/blinds/widgets/room_blinds_toggles_block.dart b/lib/presentation/device_full_screen_page/blinds/widgets/room_blinds_toggles_block.dart index 5406cc945..83a6b9f2c 100644 --- a/lib/presentation/device_full_screen_page/blinds/widgets/room_blinds_toggles_block.dart +++ b/lib/presentation/device_full_screen_page/blinds/widgets/room_blinds_toggles_block.dart @@ -81,7 +81,7 @@ class RoomBlindsTogglesBlock extends StatelessWidget { ), borderRadius: const BorderRadius.all(Radius.circular(24)), border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, width: 0.6, ), ), @@ -117,7 +117,7 @@ class RoomBlindsTogglesBlock extends StatelessWidget { Text( _smartRoomObject.getRoomName(), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 25, decoration: TextDecoration.underline, ), @@ -126,7 +126,7 @@ class RoomBlindsTogglesBlock extends StatelessWidget { _smartRoomObject.getLights()!.length > maxLightsToShow!) FaIcon( FontAwesomeIcons.arrowRight, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 20, ), ], diff --git a/lib/presentation/device_full_screen_page/blinds/widgets/rooms_blinds_widget.dart b/lib/presentation/device_full_screen_page/blinds/widgets/rooms_blinds_widget.dart index 33260ab4d..645a1045b 100644 --- a/lib/presentation/device_full_screen_page/blinds/widgets/rooms_blinds_widget.dart +++ b/lib/presentation/device_full_screen_page/blinds/widgets/rooms_blinds_widget.dart @@ -109,7 +109,7 @@ class RoomsBlindsWidget extends StatelessWidget { 'Blinds does not exist.', style: TextStyle( fontSize: 30, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), diff --git a/lib/presentation/device_full_screen_page/boilers/boilers_in_the_room/boilers_in_the_room_widget.dart b/lib/presentation/device_full_screen_page/boilers/boilers_in_the_room/boilers_in_the_room_widget.dart index 69e110778..63402b4c1 100644 --- a/lib/presentation/device_full_screen_page/boilers/boilers_in_the_room/boilers_in_the_room_widget.dart +++ b/lib/presentation/device_full_screen_page/boilers/boilers_in_the_room/boilers_in_the_room_widget.dart @@ -44,21 +44,21 @@ class BoilersInTheRoomWidget extends StatelessWidget { border: InputBorder.none, hintText: products[index]['title'.tr()].toString(), hintStyle: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), subtitle: Text( products[index]['number'.tr()].toString(), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), trailing: IconButton( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, icon: const FaIcon(FontAwesomeIcons.pen), onPressed: () {}, ), diff --git a/lib/presentation/device_full_screen_page/boilers/settings_page_of_boilers.dart b/lib/presentation/device_full_screen_page/boilers/settings_page_of_boilers.dart index 39a6270d1..0a2e24c62 100644 --- a/lib/presentation/device_full_screen_page/boilers/settings_page_of_boilers.dart +++ b/lib/presentation/device_full_screen_page/boilers/settings_page_of_boilers.dart @@ -32,25 +32,25 @@ class SettingsPageOfBoilers extends StatelessWidget { title: Text( 'Name:_', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(args: [lightName]), subtitle: Text( 'Room:_', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(args: [roomName]), trailing: IconButton( icon: FaIcon( FontAwesomeIcons.pen, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onPressed: () {}, ), ), Divider( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ], ); diff --git a/lib/presentation/device_full_screen_page/boilers/smart_boiler_widget.dart b/lib/presentation/device_full_screen_page/boilers/smart_boiler_widget.dart index f842e2b16..486559fa5 100644 --- a/lib/presentation/device_full_screen_page/boilers/smart_boiler_widget.dart +++ b/lib/presentation/device_full_screen_page/boilers/smart_boiler_widget.dart @@ -81,7 +81,7 @@ class _SmartBoilerPage extends State { _boiler!.defaultName.getOrCrash()!, // Show boiler name style: TextStyle( fontSize: 19.0, - color: Theme.of(context).textTheme.bodyText2!.color, + color: Theme.of(context).textTheme.bodyMedium!.color, ), ), const SizedBox( @@ -100,10 +100,10 @@ class _SmartBoilerPage extends State { activeToggleColor: const Color(0xFF2F363D), inactiveToggleColor: Theme.of(context).primaryColor, activeSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), inactiveSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), activeColor: const Color(0xFFFFDF5D), inactiveColor: Theme.of(context).primaryColorDark, @@ -113,7 +113,7 @@ class _SmartBoilerPage extends State { ), inactiveIcon: Icon( FontAwesomeIcons.temperatureHigh, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onToggle: (bool value) => _onChange(value), ), diff --git a/lib/presentation/device_full_screen_page/boilers/widgets/boilers_widget.dart b/lib/presentation/device_full_screen_page/boilers/widgets/boilers_widget.dart index a8b16ac65..93c1eb594 100644 --- a/lib/presentation/device_full_screen_page/boilers/widgets/boilers_widget.dart +++ b/lib/presentation/device_full_screen_page/boilers/widgets/boilers_widget.dart @@ -69,10 +69,10 @@ class BoilersWidget extends StatelessWidget { activeToggleColor: const Color(0xFF2F363D), inactiveToggleColor: Colors.deepPurple, activeSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), inactiveSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), activeColor: toggleColor, inactiveColor: toggleColor, @@ -82,7 +82,7 @@ class BoilersWidget extends StatelessWidget { ), inactiveIcon: Icon( FontAwesomeIcons.temperatureThreeQuarters, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onToggle: (bool value) => _onChange(context, value) // _onChange(context, value), diff --git a/lib/presentation/device_full_screen_page/boilers/widgets/room_boilers.dart b/lib/presentation/device_full_screen_page/boilers/widgets/room_boilers.dart index 67f239694..7968b16e6 100644 --- a/lib/presentation/device_full_screen_page/boilers/widgets/room_boilers.dart +++ b/lib/presentation/device_full_screen_page/boilers/widgets/room_boilers.dart @@ -67,7 +67,7 @@ class RoomBoilers extends StatelessWidget { maxLines: 1, maxFontSize: 19, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), const SizedBox( @@ -122,7 +122,7 @@ class RoomBoilers extends StatelessWidget { ), borderRadius: const BorderRadius.all(Radius.circular(24)), border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, width: 0.6, ), ), @@ -157,7 +157,7 @@ class RoomBoilers extends StatelessWidget { Text( _roomEntity!, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 25, decoration: TextDecoration.underline, ), @@ -166,7 +166,7 @@ class RoomBoilers extends StatelessWidget { _deviceEntityList!.size > maxBoilersToShow!) FaIcon( FontAwesomeIcons.arrowRight, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 20, ), ], diff --git a/lib/presentation/device_full_screen_page/boilers/widgets/room_boilers_toggles_block.dart b/lib/presentation/device_full_screen_page/boilers/widgets/room_boilers_toggles_block.dart index 6058f4503..ea0d1e30f 100644 --- a/lib/presentation/device_full_screen_page/boilers/widgets/room_boilers_toggles_block.dart +++ b/lib/presentation/device_full_screen_page/boilers/widgets/room_boilers_toggles_block.dart @@ -79,7 +79,7 @@ class RoomBoilersTogglesBlock extends StatelessWidget { ), borderRadius: const BorderRadius.all(Radius.circular(24)), border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, width: 0.6, ), ), @@ -114,7 +114,7 @@ class RoomBoilersTogglesBlock extends StatelessWidget { Text( _smartRoomObject!.getRoomName(), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 25, decoration: TextDecoration.underline, ), @@ -124,7 +124,7 @@ class RoomBoilersTogglesBlock extends StatelessWidget { maxBoilersToShow!) FaIcon( FontAwesomeIcons.arrowRight, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 20, ), ], diff --git a/lib/presentation/device_full_screen_page/boilers/widgets/rooms_boilers_widget.dart b/lib/presentation/device_full_screen_page/boilers/widgets/rooms_boilers_widget.dart index 646b41618..067a5eaf2 100644 --- a/lib/presentation/device_full_screen_page/boilers/widgets/rooms_boilers_widget.dart +++ b/lib/presentation/device_full_screen_page/boilers/widgets/rooms_boilers_widget.dart @@ -109,7 +109,7 @@ class RoomsBoilersWidget extends StatelessWidget { 'Boilers does not exist.', style: TextStyle( fontSize: 30, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), diff --git a/lib/presentation/device_full_screen_page/lights/lights_in_the_room/lights_in_the_room_widget.dart b/lib/presentation/device_full_screen_page/lights/lights_in_the_room/lights_in_the_room_widget.dart index b7056beaf..b13dbdfe0 100644 --- a/lib/presentation/device_full_screen_page/lights/lights_in_the_room/lights_in_the_room_widget.dart +++ b/lib/presentation/device_full_screen_page/lights/lights_in_the_room/lights_in_the_room_widget.dart @@ -44,21 +44,21 @@ class LightsInTheRoomWidget extends StatelessWidget { border: InputBorder.none, hintText: products[index]['title'.tr()].toString(), hintStyle: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), subtitle: Text( products[index]['number'.tr()].toString(), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), trailing: IconButton( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, icon: const FaIcon(FontAwesomeIcons.pen), onPressed: () {}, ), diff --git a/lib/presentation/device_full_screen_page/lights/settings_page_of_lights.dart b/lib/presentation/device_full_screen_page/lights/settings_page_of_lights.dart index ef5128eb0..fee1ab651 100644 --- a/lib/presentation/device_full_screen_page/lights/settings_page_of_lights.dart +++ b/lib/presentation/device_full_screen_page/lights/settings_page_of_lights.dart @@ -32,25 +32,25 @@ class SettingsPageOfLights extends StatelessWidget { title: Text( 'Name:_', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(args: [lightName]), subtitle: Text( 'Room:_', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(args: [roomName]), trailing: IconButton( icon: FaIcon( FontAwesomeIcons.pen, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onPressed: () {}, ), ), Divider( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ], ); diff --git a/lib/presentation/device_full_screen_page/lights/smart_lighte_widget.dart b/lib/presentation/device_full_screen_page/lights/smart_lighte_widget.dart index a86e2485e..913110f0e 100644 --- a/lib/presentation/device_full_screen_page/lights/smart_lighte_widget.dart +++ b/lib/presentation/device_full_screen_page/lights/smart_lighte_widget.dart @@ -81,7 +81,7 @@ class _SmartLightPage extends State { _light!.defaultName.getOrCrash()!, // Show light name style: TextStyle( fontSize: 19.0, - color: Theme.of(context).textTheme.bodyText2!.color, + color: Theme.of(context).textTheme.bodyMedium!.color, ), ), const SizedBox( @@ -100,10 +100,10 @@ class _SmartLightPage extends State { activeToggleColor: const Color(0xFF2F363D), inactiveToggleColor: Theme.of(context).primaryColor, activeSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), inactiveSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), activeColor: const Color(0xFFFFDF5D), inactiveColor: Theme.of(context).primaryColorDark, @@ -113,7 +113,7 @@ class _SmartLightPage extends State { ), inactiveIcon: Icon( FontAwesomeIcons.lightbulb, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onToggle: (bool value) => _onChange(value), ), diff --git a/lib/presentation/device_full_screen_page/lights/widgets/light_widget.dart b/lib/presentation/device_full_screen_page/lights/widgets/light_widget.dart index 469bd047a..1b59528de 100644 --- a/lib/presentation/device_full_screen_page/lights/widgets/light_widget.dart +++ b/lib/presentation/device_full_screen_page/lights/widgets/light_widget.dart @@ -60,10 +60,10 @@ class LightWidget extends StatelessWidget { activeToggleColor: const Color(0xFF2F363D), inactiveToggleColor: Colors.deepPurple, activeSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), inactiveSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), activeColor: toggleColor, inactiveColor: toggleColor, @@ -73,7 +73,7 @@ class LightWidget extends StatelessWidget { ), inactiveIcon: Icon( FontAwesomeIcons.lightbulb, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onToggle: (bool value) => _onChange(context, value) // _onChange(context, value), diff --git a/lib/presentation/device_full_screen_page/lights/widgets/room_lights.dart b/lib/presentation/device_full_screen_page/lights/widgets/room_lights.dart index 582a69e72..f0fb39cd9 100644 --- a/lib/presentation/device_full_screen_page/lights/widgets/room_lights.dart +++ b/lib/presentation/device_full_screen_page/lights/widgets/room_lights.dart @@ -61,7 +61,7 @@ class RoomLights extends StatelessWidget { maxLines: 1, maxFontSize: 19, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), const SizedBox( @@ -116,7 +116,7 @@ class RoomLights extends StatelessWidget { ), borderRadius: const BorderRadius.all(Radius.circular(24)), border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, width: 0.6, ), ), @@ -148,7 +148,7 @@ class RoomLights extends StatelessWidget { Text( _roomEntity, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 25, decoration: TextDecoration.underline, ), @@ -156,7 +156,7 @@ class RoomLights extends StatelessWidget { if (_deviceEntityList.size > maxLightsToShow) FaIcon( FontAwesomeIcons.arrowRight, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 20, ), ], diff --git a/lib/presentation/device_full_screen_page/lights/widgets/room_lights_toggles_block.dart b/lib/presentation/device_full_screen_page/lights/widgets/room_lights_toggles_block.dart index 6cc443bda..b30378001 100644 --- a/lib/presentation/device_full_screen_page/lights/widgets/room_lights_toggles_block.dart +++ b/lib/presentation/device_full_screen_page/lights/widgets/room_lights_toggles_block.dart @@ -81,7 +81,7 @@ class RoomLightsTogglesBlock extends StatelessWidget { ), borderRadius: const BorderRadius.all(Radius.circular(24)), border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, width: 0.6, ), ), @@ -115,7 +115,7 @@ class RoomLightsTogglesBlock extends StatelessWidget { Text( _smartRoomObject!.getRoomName(), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 25, decoration: TextDecoration.underline, ), @@ -124,7 +124,7 @@ class RoomLightsTogglesBlock extends StatelessWidget { _smartRoomObject!.getLights()!.length > maxLightsToShow!) FaIcon( FontAwesomeIcons.arrowRight, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 20, ), ], diff --git a/lib/presentation/device_full_screen_page/lights/widgets/rooms_lights_widget.dart b/lib/presentation/device_full_screen_page/lights/widgets/rooms_lights_widget.dart index 7d42031e0..88e4583b2 100644 --- a/lib/presentation/device_full_screen_page/lights/widgets/rooms_lights_widget.dart +++ b/lib/presentation/device_full_screen_page/lights/widgets/rooms_lights_widget.dart @@ -111,7 +111,7 @@ class RoomsLightsWidget extends StatelessWidget { 'Lights does not exist.', style: TextStyle( fontSize: 30, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), diff --git a/lib/presentation/device_full_screen_page/printers/printer_widget.dart b/lib/presentation/device_full_screen_page/printers/printer_widget.dart index b373eaaa7..4b78acb77 100644 --- a/lib/presentation/device_full_screen_page/printers/printer_widget.dart +++ b/lib/presentation/device_full_screen_page/printers/printer_widget.dart @@ -76,7 +76,7 @@ class _SmartPrinterPage extends State { _switch!.defaultName.getOrCrash()!, // Show switch name style: TextStyle( fontSize: 19.0, - color: Theme.of(context).textTheme.bodyText2!.color, + color: Theme.of(context).textTheme.bodyMedium!.color, ), ), const SizedBox( diff --git a/lib/presentation/device_full_screen_page/printers/printers_in_the_room/printers_in_the_room_widget.dart b/lib/presentation/device_full_screen_page/printers/printers_in_the_room/printers_in_the_room_widget.dart index 07528f669..a373851c8 100644 --- a/lib/presentation/device_full_screen_page/printers/printers_in_the_room/printers_in_the_room_widget.dart +++ b/lib/presentation/device_full_screen_page/printers/printers_in_the_room/printers_in_the_room_widget.dart @@ -45,21 +45,21 @@ class PrintersInTheRoomWidget extends StatelessWidget { border: InputBorder.none, hintText: products[index]['title'.tr()].toString(), hintStyle: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), subtitle: Text( products[index]['number'.tr()].toString(), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), trailing: IconButton( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, icon: const FaIcon(FontAwesomeIcons.pen), onPressed: () {}, ), diff --git a/lib/presentation/device_full_screen_page/printers/settings_page_of_printers.dart b/lib/presentation/device_full_screen_page/printers/settings_page_of_printers.dart index b7ce76c85..b4f523a77 100644 --- a/lib/presentation/device_full_screen_page/printers/settings_page_of_printers.dart +++ b/lib/presentation/device_full_screen_page/printers/settings_page_of_printers.dart @@ -33,25 +33,25 @@ class SettingsPageOfPrinters extends StatelessWidget { title: Text( 'Name:_', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(args: [switchName]), subtitle: Text( 'Room:_', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(args: [roomName]), trailing: IconButton( icon: FaIcon( FontAwesomeIcons.pen, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onPressed: () {}, ), ), Divider( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ], ); diff --git a/lib/presentation/device_full_screen_page/printers/widgets/printer_widget.dart b/lib/presentation/device_full_screen_page/printers/widgets/printer_widget.dart index 6a6c456c4..2537ada7b 100644 --- a/lib/presentation/device_full_screen_page/printers/widgets/printer_widget.dart +++ b/lib/presentation/device_full_screen_page/printers/widgets/printer_widget.dart @@ -35,7 +35,6 @@ class PrinterWidget extends StatelessWidget { @override Widget build(BuildContext context) { final Size screenSize = MediaQuery.of(context).size; - final double sizeBoxWidth = screenSize.width * 0.15; return BlocConsumer( listener: (context, state) {}, @@ -65,12 +64,12 @@ class PrinterWidget extends StatelessWidget { child: Tab( icon: FaIcon( FontAwesomeIcons.link, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), child: Text( "Open Printer's Web Page", style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16, ), ).tr(), diff --git a/lib/presentation/device_full_screen_page/printers/widgets/room_printers.dart b/lib/presentation/device_full_screen_page/printers/widgets/room_printers.dart index 5c7c3f324..a0784617a 100644 --- a/lib/presentation/device_full_screen_page/printers/widgets/room_printers.dart +++ b/lib/presentation/device_full_screen_page/printers/widgets/room_printers.dart @@ -33,7 +33,6 @@ class RoomPrinters extends StatelessWidget { @override Widget build(BuildContext context) { final Size screenSize = MediaQuery.of(context).size; - final double sizeBoxWidth = screenSize.width * 0.25; Widget createSwitchTableWidget() { final List columnOfPrinters = []; @@ -62,7 +61,7 @@ class RoomPrinters extends StatelessWidget { maxLines: 1, maxFontSize: 19, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), Container( @@ -113,7 +112,7 @@ class RoomPrinters extends StatelessWidget { ), borderRadius: const BorderRadius.all(Radius.circular(24)), border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, width: 0.6, ), ), @@ -145,7 +144,7 @@ class RoomPrinters extends StatelessWidget { Text( _roomEntity, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 25, decoration: TextDecoration.underline, ), @@ -153,7 +152,7 @@ class RoomPrinters extends StatelessWidget { if (_deviceEntityList.size > maxPrintersToShow) FaIcon( FontAwesomeIcons.arrowRight, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 20, ), ], diff --git a/lib/presentation/device_full_screen_page/printers/widgets/room_printers_toggles_block.dart b/lib/presentation/device_full_screen_page/printers/widgets/room_printers_toggles_block.dart index 4cd953e99..5a803357c 100644 --- a/lib/presentation/device_full_screen_page/printers/widgets/room_printers_toggles_block.dart +++ b/lib/presentation/device_full_screen_page/printers/widgets/room_printers_toggles_block.dart @@ -82,7 +82,7 @@ class RoomPrintersTogglesBlock extends StatelessWidget { ), borderRadius: const BorderRadius.all(Radius.circular(24)), border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, width: 0.6, ), ), @@ -117,7 +117,7 @@ class RoomPrintersTogglesBlock extends StatelessWidget { Text( _smartRoomObject!.getRoomName(), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 25, decoration: TextDecoration.underline, ), @@ -127,7 +127,7 @@ class RoomPrintersTogglesBlock extends StatelessWidget { maxPrintersToShow!) FaIcon( FontAwesomeIcons.arrowRight, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 20, ), ], diff --git a/lib/presentation/device_full_screen_page/printers/widgets/rooms_printers_widget.dart b/lib/presentation/device_full_screen_page/printers/widgets/rooms_printers_widget.dart index a94ccd25b..b5216901a 100644 --- a/lib/presentation/device_full_screen_page/printers/widgets/rooms_printers_widget.dart +++ b/lib/presentation/device_full_screen_page/printers/widgets/rooms_printers_widget.dart @@ -113,7 +113,7 @@ class RoomsPrintersWidget extends StatelessWidget { 'Printers does not exist.', style: TextStyle( fontSize: 30, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), diff --git a/lib/presentation/device_full_screen_page/rgbw_lights/rgbw_lights_in_the_room/rgbw_lights_in_the_room_widget.dart b/lib/presentation/device_full_screen_page/rgbw_lights/rgbw_lights_in_the_room/rgbw_lights_in_the_room_widget.dart index 7cf508bac..73a61c018 100644 --- a/lib/presentation/device_full_screen_page/rgbw_lights/rgbw_lights_in_the_room/rgbw_lights_in_the_room_widget.dart +++ b/lib/presentation/device_full_screen_page/rgbw_lights/rgbw_lights_in_the_room/rgbw_lights_in_the_room_widget.dart @@ -44,21 +44,21 @@ class RgbwLightsInTheRoomWidget extends StatelessWidget { border: InputBorder.none, hintText: products[index]['title'.tr()].toString(), hintStyle: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), subtitle: Text( products[index]['number'.tr()].toString(), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), trailing: IconButton( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, icon: const FaIcon(FontAwesomeIcons.pen), onPressed: () {}, ), diff --git a/lib/presentation/device_full_screen_page/rgbw_lights/settings_page_of_rgbw_lights.dart b/lib/presentation/device_full_screen_page/rgbw_lights/settings_page_of_rgbw_lights.dart index 7ac4835c9..d3d568b50 100644 --- a/lib/presentation/device_full_screen_page/rgbw_lights/settings_page_of_rgbw_lights.dart +++ b/lib/presentation/device_full_screen_page/rgbw_lights/settings_page_of_rgbw_lights.dart @@ -32,25 +32,25 @@ class SettingsPageOfRgbwLights extends StatelessWidget { title: Text( 'Name:_', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(args: [lightName]), subtitle: Text( 'Room:_', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(args: [roomName]), trailing: IconButton( icon: FaIcon( FontAwesomeIcons.pen, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onPressed: () {}, ), ), Divider( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ], ); diff --git a/lib/presentation/device_full_screen_page/rgbw_lights/smart_rgbw_lighte_widget.dart b/lib/presentation/device_full_screen_page/rgbw_lights/smart_rgbw_lighte_widget.dart index 37f37985b..70c679ca5 100644 --- a/lib/presentation/device_full_screen_page/rgbw_lights/smart_rgbw_lighte_widget.dart +++ b/lib/presentation/device_full_screen_page/rgbw_lights/smart_rgbw_lighte_widget.dart @@ -81,7 +81,7 @@ class _SmartRgbwLightPage extends State { _rgbwLight!.defaultName.getOrCrash()!, // Show rgbwLight name style: TextStyle( fontSize: 19.0, - color: Theme.of(context).textTheme.bodyText2!.color, + color: Theme.of(context).textTheme.bodyMedium!.color, ), ), const SizedBox( @@ -100,10 +100,10 @@ class _SmartRgbwLightPage extends State { activeToggleColor: const Color(0xFF2F363D), inactiveToggleColor: Theme.of(context).primaryColor, activeSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), inactiveSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), activeColor: const Color(0xFFFFDF5D), inactiveColor: Theme.of(context).primaryColorDark, @@ -113,7 +113,7 @@ class _SmartRgbwLightPage extends State { ), inactiveIcon: Icon( FontAwesomeIcons.lightbulb, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onToggle: (bool value) => _onChange(value), ), diff --git a/lib/presentation/device_full_screen_page/rgbw_lights/widgets/rgbw_light_widget.dart b/lib/presentation/device_full_screen_page/rgbw_lights/widgets/rgbw_light_widget.dart index 6f911e2f8..b6191a1f1 100644 --- a/lib/presentation/device_full_screen_page/rgbw_lights/widgets/rgbw_light_widget.dart +++ b/lib/presentation/device_full_screen_page/rgbw_lights/widgets/rgbw_light_widget.dart @@ -89,7 +89,7 @@ class RgbwLightWidget extends StatelessWidget { ), inactiveIcon: Icon( FontAwesomeIcons.lightbulb, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onToggle: (bool value) => _onChange(context, value), ), diff --git a/lib/presentation/device_full_screen_page/rgbw_lights/widgets/room_rgbw_lights.dart b/lib/presentation/device_full_screen_page/rgbw_lights/widgets/room_rgbw_lights.dart index 9bcf9d2cd..d0c123165 100644 --- a/lib/presentation/device_full_screen_page/rgbw_lights/widgets/room_rgbw_lights.dart +++ b/lib/presentation/device_full_screen_page/rgbw_lights/widgets/room_rgbw_lights.dart @@ -106,7 +106,7 @@ class RoomRgbwLights extends StatelessWidget { ), borderRadius: const BorderRadius.all(Radius.circular(24)), border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, width: 0.6, ), ), @@ -138,7 +138,7 @@ class RoomRgbwLights extends StatelessWidget { Text( _roomEntity, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 25, decoration: TextDecoration.underline, ), @@ -146,7 +146,7 @@ class RoomRgbwLights extends StatelessWidget { if (_deviceEntityList.size > maxLightsToShow) FaIcon( FontAwesomeIcons.arrowRight, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 20, ), ], diff --git a/lib/presentation/device_full_screen_page/rgbw_lights/widgets/room_rgbw_lights_toggles_block.dart b/lib/presentation/device_full_screen_page/rgbw_lights/widgets/room_rgbw_lights_toggles_block.dart index 5200d286a..89f2f517d 100644 --- a/lib/presentation/device_full_screen_page/rgbw_lights/widgets/room_rgbw_lights_toggles_block.dart +++ b/lib/presentation/device_full_screen_page/rgbw_lights/widgets/room_rgbw_lights_toggles_block.dart @@ -84,7 +84,7 @@ class RoomRgbwLightsTogglesBlock extends StatelessWidget { ), borderRadius: const BorderRadius.all(Radius.circular(24)), border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, width: 0.6, ), ), @@ -118,7 +118,7 @@ class RoomRgbwLightsTogglesBlock extends StatelessWidget { Text( _smartRoomObject!.getRoomName(), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 25, decoration: TextDecoration.underline, ), @@ -127,7 +127,7 @@ class RoomRgbwLightsTogglesBlock extends StatelessWidget { _smartRoomObject!.getLights()!.length > maxLightsToShow!) FaIcon( FontAwesomeIcons.arrowRight, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 20, ), ], diff --git a/lib/presentation/device_full_screen_page/rgbw_lights/widgets/rooms_rgbw_lights_widget.dart b/lib/presentation/device_full_screen_page/rgbw_lights/widgets/rooms_rgbw_lights_widget.dart index 46af2c4cd..714b58f24 100644 --- a/lib/presentation/device_full_screen_page/rgbw_lights/widgets/rooms_rgbw_lights_widget.dart +++ b/lib/presentation/device_full_screen_page/rgbw_lights/widgets/rooms_rgbw_lights_widget.dart @@ -112,7 +112,7 @@ class RoomsRgbwLightsWidget extends StatelessWidget { 'Lights does not exist.', style: TextStyle( fontSize: 30, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), diff --git a/lib/presentation/device_full_screen_page/smart_computers/settings_page_of_smart_computers.dart b/lib/presentation/device_full_screen_page/smart_computers/settings_page_of_smart_computers.dart index 289bdfa53..626036786 100644 --- a/lib/presentation/device_full_screen_page/smart_computers/settings_page_of_smart_computers.dart +++ b/lib/presentation/device_full_screen_page/smart_computers/settings_page_of_smart_computers.dart @@ -33,25 +33,25 @@ class SettingsPageOfSmartComputers extends StatelessWidget { title: Text( 'Name:_', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(args: [switchName]), subtitle: Text( 'Room:_', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(args: [roomName]), trailing: IconButton( icon: FaIcon( FontAwesomeIcons.pen, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onPressed: () {}, ), ), Divider( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ], ); diff --git a/lib/presentation/device_full_screen_page/smart_computers/smart_computer_widget.dart b/lib/presentation/device_full_screen_page/smart_computers/smart_computer_widget.dart index d445636e2..8a9e674d6 100644 --- a/lib/presentation/device_full_screen_page/smart_computers/smart_computer_widget.dart +++ b/lib/presentation/device_full_screen_page/smart_computers/smart_computer_widget.dart @@ -76,7 +76,7 @@ class _SmartSmartComputerPage extends State { _switch!.defaultName.getOrCrash()!, // Show switch name style: TextStyle( fontSize: 19.0, - color: Theme.of(context).textTheme.bodyText2!.color, + color: Theme.of(context).textTheme.bodyMedium!.color, ), ), const SizedBox( diff --git a/lib/presentation/device_full_screen_page/smart_computers/smart_computers_in_the_room/smart_computers_in_the_room_widget.dart b/lib/presentation/device_full_screen_page/smart_computers/smart_computers_in_the_room/smart_computers_in_the_room_widget.dart index 2ee45ca4c..1b4647d9c 100644 --- a/lib/presentation/device_full_screen_page/smart_computers/smart_computers_in_the_room/smart_computers_in_the_room_widget.dart +++ b/lib/presentation/device_full_screen_page/smart_computers/smart_computers_in_the_room/smart_computers_in_the_room_widget.dart @@ -45,21 +45,21 @@ class SmartComputersInTheRoomWidget extends StatelessWidget { border: InputBorder.none, hintText: products[index]['title'.tr()].toString(), hintStyle: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), subtitle: Text( products[index]['number'.tr()].toString(), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), trailing: IconButton( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, icon: const FaIcon(FontAwesomeIcons.pen), onPressed: () {}, ), diff --git a/lib/presentation/device_full_screen_page/smart_computers/widgets/room_smart_computers.dart b/lib/presentation/device_full_screen_page/smart_computers/widgets/room_smart_computers.dart index 620fe3890..e79edb66c 100644 --- a/lib/presentation/device_full_screen_page/smart_computers/widgets/room_smart_computers.dart +++ b/lib/presentation/device_full_screen_page/smart_computers/widgets/room_smart_computers.dart @@ -64,7 +64,7 @@ class RoomSmartComputers extends StatelessWidget { maxLines: 1, maxFontSize: 19, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), Container( @@ -116,7 +116,7 @@ class RoomSmartComputers extends StatelessWidget { ), borderRadius: const BorderRadius.all(Radius.circular(24)), border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, width: 0.6, ), ), @@ -148,7 +148,7 @@ class RoomSmartComputers extends StatelessWidget { Text( _roomEntity, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 25, decoration: TextDecoration.underline, ), @@ -156,7 +156,7 @@ class RoomSmartComputers extends StatelessWidget { if (_deviceEntityList.size > maxSmartComputersToShow) FaIcon( FontAwesomeIcons.arrowRight, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 20, ), ], diff --git a/lib/presentation/device_full_screen_page/smart_computers/widgets/room_smart_computers_toggles_block.dart b/lib/presentation/device_full_screen_page/smart_computers/widgets/room_smart_computers_toggles_block.dart index c69839aa3..bbc9473d6 100644 --- a/lib/presentation/device_full_screen_page/smart_computers/widgets/room_smart_computers_toggles_block.dart +++ b/lib/presentation/device_full_screen_page/smart_computers/widgets/room_smart_computers_toggles_block.dart @@ -86,7 +86,7 @@ class RoomSmartComputersTogglesBlock extends StatelessWidget { ), borderRadius: const BorderRadius.all(Radius.circular(24)), border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, width: 0.6, ), ), @@ -121,7 +121,7 @@ class RoomSmartComputersTogglesBlock extends StatelessWidget { Text( _smartRoomObject!.getRoomName(), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 25, decoration: TextDecoration.underline, ), @@ -131,7 +131,7 @@ class RoomSmartComputersTogglesBlock extends StatelessWidget { maxSmartComputersToShow!) FaIcon( FontAwesomeIcons.arrowRight, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 20, ), ], diff --git a/lib/presentation/device_full_screen_page/smart_computers/widgets/rooms_smart_computers_widget.dart b/lib/presentation/device_full_screen_page/smart_computers/widgets/rooms_smart_computers_widget.dart index 4c303f1e4..611347bad 100644 --- a/lib/presentation/device_full_screen_page/smart_computers/widgets/rooms_smart_computers_widget.dart +++ b/lib/presentation/device_full_screen_page/smart_computers/widgets/rooms_smart_computers_widget.dart @@ -113,7 +113,7 @@ class RoomsSmartComputersWidget extends StatelessWidget { 'SmartComputers does not exist.', style: TextStyle( fontSize: 30, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), diff --git a/lib/presentation/device_full_screen_page/smart_computers/widgets/smart_computer_widget.dart b/lib/presentation/device_full_screen_page/smart_computers/widgets/smart_computer_widget.dart index 02ab738ba..419255722 100644 --- a/lib/presentation/device_full_screen_page/smart_computers/widgets/smart_computer_widget.dart +++ b/lib/presentation/device_full_screen_page/smart_computers/widgets/smart_computer_widget.dart @@ -35,7 +35,6 @@ class SmartComputerWidget extends StatelessWidget { @override Widget build(BuildContext context) { final Size screenSize = MediaQuery.of(context).size; - final double sizeBoxWidth = screenSize.width * 0.15; return BlocConsumer( listener: (context, state) {}, @@ -65,12 +64,12 @@ class SmartComputerWidget extends StatelessWidget { child: Tab( icon: FaIcon( FontAwesomeIcons.moon, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), child: Text( 'Sleep', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16, ), ).tr(), @@ -98,12 +97,12 @@ class SmartComputerWidget extends StatelessWidget { child: Tab( icon: FaIcon( FontAwesomeIcons.powerOff, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), child: Text( 'Shutdown', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16, ), ).tr(), diff --git a/lib/presentation/device_full_screen_page/smart_plugs/settings_page_of_smart_plug.dart b/lib/presentation/device_full_screen_page/smart_plugs/settings_page_of_smart_plug.dart index 5a24a1c94..091834c1c 100644 --- a/lib/presentation/device_full_screen_page/smart_plugs/settings_page_of_smart_plug.dart +++ b/lib/presentation/device_full_screen_page/smart_plugs/settings_page_of_smart_plug.dart @@ -34,25 +34,25 @@ class SettingsPageOfSmartPlugs extends StatelessWidget { title: Text( 'Name:_', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(args: [smartPlugName]), subtitle: Text( 'Room:_', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(args: [roomName]), trailing: IconButton( icon: FaIcon( FontAwesomeIcons.pen, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onPressed: () {}, ), ), Divider( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ], ); diff --git a/lib/presentation/device_full_screen_page/smart_plugs/smart_plug_widget.dart b/lib/presentation/device_full_screen_page/smart_plugs/smart_plug_widget.dart index 209de18b7..16a429ffe 100644 --- a/lib/presentation/device_full_screen_page/smart_plugs/smart_plug_widget.dart +++ b/lib/presentation/device_full_screen_page/smart_plugs/smart_plug_widget.dart @@ -81,7 +81,7 @@ class _SmartSmartPlugPage extends State { _smartPlug!.defaultName.getOrCrash()!, // Show smartPlug name style: TextStyle( fontSize: 19.0, - color: Theme.of(context).textTheme.bodyText2!.color, + color: Theme.of(context).textTheme.bodyMedium!.color, ), ), const SizedBox( @@ -100,10 +100,10 @@ class _SmartSmartPlugPage extends State { activeToggleColor: const Color(0xFF2F363D), inactiveToggleColor: Theme.of(context).primaryColor, activeSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), inactiveSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), activeColor: const Color(0xFFFFDF5D), inactiveColor: Theme.of(context).primaryColorDark, @@ -113,7 +113,7 @@ class _SmartSmartPlugPage extends State { ), inactiveIcon: Icon( MdiIcons.powerSocketAu, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onToggle: (bool value) => _onChange(value), ), diff --git a/lib/presentation/device_full_screen_page/smart_plugs/smart_plugs_in_the_room/smart_plugs_in_the_room_widget.dart b/lib/presentation/device_full_screen_page/smart_plugs/smart_plugs_in_the_room/smart_plugs_in_the_room_widget.dart index 1caee2319..8803f84f1 100644 --- a/lib/presentation/device_full_screen_page/smart_plugs/smart_plugs_in_the_room/smart_plugs_in_the_room_widget.dart +++ b/lib/presentation/device_full_screen_page/smart_plugs/smart_plugs_in_the_room/smart_plugs_in_the_room_widget.dart @@ -45,21 +45,21 @@ class SmartPlugsInTheRoomWidget extends StatelessWidget { border: InputBorder.none, hintText: products[index]['title'.tr()].toString(), hintStyle: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), subtitle: Text( products[index]['number'.tr()].toString(), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), trailing: IconButton( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, icon: const FaIcon(FontAwesomeIcons.pen), onPressed: () {}, ), diff --git a/lib/presentation/device_full_screen_page/smart_plugs/widgets/room_smart_plugs.dart b/lib/presentation/device_full_screen_page/smart_plugs/widgets/room_smart_plugs.dart index 124dbd5d8..5d395cbea 100644 --- a/lib/presentation/device_full_screen_page/smart_plugs/widgets/room_smart_plugs.dart +++ b/lib/presentation/device_full_screen_page/smart_plugs/widgets/room_smart_plugs.dart @@ -62,7 +62,7 @@ class RoomSmartPlugs extends StatelessWidget { maxLines: 1, maxFontSize: 19, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), Container( @@ -114,7 +114,7 @@ class RoomSmartPlugs extends StatelessWidget { ), borderRadius: const BorderRadius.all(Radius.circular(24)), border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, width: 0.6, ), ), @@ -146,7 +146,7 @@ class RoomSmartPlugs extends StatelessWidget { Text( _roomEntity, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 25, decoration: TextDecoration.underline, ), @@ -154,7 +154,7 @@ class RoomSmartPlugs extends StatelessWidget { if (_deviceEntityList.size > maxSmartPlugsToShow) FaIcon( FontAwesomeIcons.arrowRight, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 20, ), ], diff --git a/lib/presentation/device_full_screen_page/smart_plugs/widgets/room_smart_plugs_toggles_block.dart b/lib/presentation/device_full_screen_page/smart_plugs/widgets/room_smart_plugs_toggles_block.dart index 14c08d063..f850c1b2a 100644 --- a/lib/presentation/device_full_screen_page/smart_plugs/widgets/room_smart_plugs_toggles_block.dart +++ b/lib/presentation/device_full_screen_page/smart_plugs/widgets/room_smart_plugs_toggles_block.dart @@ -82,7 +82,7 @@ class RoomSmartPlugsTogglesBlock extends StatelessWidget { ), borderRadius: const BorderRadius.all(Radius.circular(24)), border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, width: 0.6, ), ), @@ -117,7 +117,7 @@ class RoomSmartPlugsTogglesBlock extends StatelessWidget { Text( _smartRoomObject!.getRoomName(), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 25, decoration: TextDecoration.underline, ), @@ -127,7 +127,7 @@ class RoomSmartPlugsTogglesBlock extends StatelessWidget { maxSmartPlugsToShow!) FaIcon( FontAwesomeIcons.arrowRight, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 20, ), ], diff --git a/lib/presentation/device_full_screen_page/smart_plugs/widgets/rooms_smart_plugs_widget.dart b/lib/presentation/device_full_screen_page/smart_plugs/widgets/rooms_smart_plugs_widget.dart index 936c9e391..adf81d233 100644 --- a/lib/presentation/device_full_screen_page/smart_plugs/widgets/rooms_smart_plugs_widget.dart +++ b/lib/presentation/device_full_screen_page/smart_plugs/widgets/rooms_smart_plugs_widget.dart @@ -114,7 +114,7 @@ class RoomsSmartPlugsWidget extends StatelessWidget { 'SmartPlugs does not exist.', style: TextStyle( fontSize: 30, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), diff --git a/lib/presentation/device_full_screen_page/smart_plugs/widgets/smart_plugs_widget.dart b/lib/presentation/device_full_screen_page/smart_plugs/widgets/smart_plugs_widget.dart index 7cb1c9525..a8dbe7b6a 100644 --- a/lib/presentation/device_full_screen_page/smart_plugs/widgets/smart_plugs_widget.dart +++ b/lib/presentation/device_full_screen_page/smart_plugs/widgets/smart_plugs_widget.dart @@ -57,10 +57,10 @@ class SmartPlugWidget extends StatelessWidget { activeToggleColor: const Color(0xFF2F363D), inactiveToggleColor: Colors.deepPurple, activeSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), inactiveSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), activeColor: toggleColor, inactiveColor: toggleColor, diff --git a/lib/presentation/device_full_screen_page/smart_tv/settings_page_of_smart_tvs.dart b/lib/presentation/device_full_screen_page/smart_tv/settings_page_of_smart_tvs.dart index 7ec20cb92..470e4f7c8 100644 --- a/lib/presentation/device_full_screen_page/smart_tv/settings_page_of_smart_tvs.dart +++ b/lib/presentation/device_full_screen_page/smart_tv/settings_page_of_smart_tvs.dart @@ -33,25 +33,25 @@ class SettingsPageOfSmartTvs extends StatelessWidget { title: Text( 'Name:_', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(args: [switchName]), subtitle: Text( 'Room:_', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(args: [roomName]), trailing: IconButton( icon: FaIcon( FontAwesomeIcons.pen, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onPressed: () {}, ), ), Divider( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ], ); diff --git a/lib/presentation/device_full_screen_page/smart_tv/smart_tv_widget.dart b/lib/presentation/device_full_screen_page/smart_tv/smart_tv_widget.dart index 6f597f81f..cadc4e7d6 100644 --- a/lib/presentation/device_full_screen_page/smart_tv/smart_tv_widget.dart +++ b/lib/presentation/device_full_screen_page/smart_tv/smart_tv_widget.dart @@ -76,7 +76,7 @@ class _SmartSmartTvPage extends State { _switch!.defaultName.getOrCrash()!, // Show switch name style: TextStyle( fontSize: 19.0, - color: Theme.of(context).textTheme.bodyText2!.color, + color: Theme.of(context).textTheme.bodyMedium!.color, ), ), const SizedBox( diff --git a/lib/presentation/device_full_screen_page/smart_tv/smart_tvs_in_the_room/smart_computers_in_the_room_widget.dart b/lib/presentation/device_full_screen_page/smart_tv/smart_tvs_in_the_room/smart_computers_in_the_room_widget.dart index 10cdc8cfc..1a56a6949 100644 --- a/lib/presentation/device_full_screen_page/smart_tv/smart_tvs_in_the_room/smart_computers_in_the_room_widget.dart +++ b/lib/presentation/device_full_screen_page/smart_tv/smart_tvs_in_the_room/smart_computers_in_the_room_widget.dart @@ -45,21 +45,21 @@ class SmartTvsInTheRoomWidget extends StatelessWidget { border: InputBorder.none, hintText: products[index]['title'.tr()].toString(), hintStyle: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), subtitle: Text( products[index]['number'.tr()].toString(), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), trailing: IconButton( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, icon: const FaIcon(FontAwesomeIcons.pen), onPressed: () {}, ), diff --git a/lib/presentation/device_full_screen_page/smart_tv/widgets/room_smart_tvs.dart b/lib/presentation/device_full_screen_page/smart_tv/widgets/room_smart_tvs.dart index a63dcc7d1..18de12e2d 100644 --- a/lib/presentation/device_full_screen_page/smart_tv/widgets/room_smart_tvs.dart +++ b/lib/presentation/device_full_screen_page/smart_tv/widgets/room_smart_tvs.dart @@ -33,7 +33,6 @@ class RoomSmartTvs extends StatelessWidget { @override Widget build(BuildContext context) { final Size screenSize = MediaQuery.of(context).size; - final double sizeBoxWidth = screenSize.width * 0.25; Widget createSwitchTableWidget() { final List columnOfSmartTvs = []; @@ -62,7 +61,7 @@ class RoomSmartTvs extends StatelessWidget { maxLines: 1, maxFontSize: 40, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), Container( @@ -114,7 +113,7 @@ class RoomSmartTvs extends StatelessWidget { ), borderRadius: const BorderRadius.all(Radius.circular(24)), border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, width: 0.6, ), ), @@ -146,7 +145,7 @@ class RoomSmartTvs extends StatelessWidget { Text( _roomEntity, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 25, decoration: TextDecoration.underline, ), @@ -154,7 +153,7 @@ class RoomSmartTvs extends StatelessWidget { if (_deviceEntityList.size > maxSmartTvsToShow) FaIcon( FontAwesomeIcons.arrowRight, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 20, ), ], diff --git a/lib/presentation/device_full_screen_page/smart_tv/widgets/room_smart_tvs_toggles_block.dart b/lib/presentation/device_full_screen_page/smart_tv/widgets/room_smart_tvs_toggles_block.dart index 60e9047bf..ebef22c96 100644 --- a/lib/presentation/device_full_screen_page/smart_tv/widgets/room_smart_tvs_toggles_block.dart +++ b/lib/presentation/device_full_screen_page/smart_tv/widgets/room_smart_tvs_toggles_block.dart @@ -82,7 +82,7 @@ class RoomSmartTvsTogglesBlock extends StatelessWidget { ), borderRadius: const BorderRadius.all(Radius.circular(24)), border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, width: 0.6, ), ), @@ -117,7 +117,7 @@ class RoomSmartTvsTogglesBlock extends StatelessWidget { Text( _smartRoomObject!.getRoomName(), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 25, decoration: TextDecoration.underline, ), @@ -127,7 +127,7 @@ class RoomSmartTvsTogglesBlock extends StatelessWidget { maxSmartTvsToShow!) FaIcon( FontAwesomeIcons.arrowRight, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 20, ), ], diff --git a/lib/presentation/device_full_screen_page/smart_tv/widgets/rooms_smart_tvs_widget.dart b/lib/presentation/device_full_screen_page/smart_tv/widgets/rooms_smart_tvs_widget.dart index cdf9542f9..e3884af19 100644 --- a/lib/presentation/device_full_screen_page/smart_tv/widgets/rooms_smart_tvs_widget.dart +++ b/lib/presentation/device_full_screen_page/smart_tv/widgets/rooms_smart_tvs_widget.dart @@ -113,7 +113,7 @@ class RoomsSmartTvsWidget extends StatelessWidget { 'SmartTvs does not exist.', style: TextStyle( fontSize: 30, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), diff --git a/lib/presentation/device_full_screen_page/smart_tv/widgets/smart_tv_widget.dart b/lib/presentation/device_full_screen_page/smart_tv/widgets/smart_tv_widget.dart index 6dc424767..a8be49562 100644 --- a/lib/presentation/device_full_screen_page/smart_tv/widgets/smart_tv_widget.dart +++ b/lib/presentation/device_full_screen_page/smart_tv/widgets/smart_tv_widget.dart @@ -74,9 +74,6 @@ class SmartTvWidget extends StatelessWidget { @override Widget build(BuildContext context) { - final Size screenSize = MediaQuery.of(context).size; - final double sizeBoxWidth = screenSize.width * 0.15; - return BlocConsumer( listener: (context, state) {}, builder: (context, state) { @@ -114,12 +111,12 @@ class SmartTvWidget extends StatelessWidget { child: Tab( icon: FaIcon( FontAwesomeIcons.video, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), child: Text( 'Open Video', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16, ), ).tr(), @@ -147,12 +144,12 @@ class SmartTvWidget extends StatelessWidget { child: Tab( icon: FaIcon( FontAwesomeIcons.xmark, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), child: Text( 'Close', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16, ), ).tr(), @@ -180,12 +177,12 @@ class SmartTvWidget extends StatelessWidget { child: Tab( icon: FaIcon( FontAwesomeIcons.pause, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), child: Text( 'Pause', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16, ), ).tr(), @@ -213,12 +210,12 @@ class SmartTvWidget extends StatelessWidget { child: Tab( icon: FaIcon( FontAwesomeIcons.play, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), child: Text( 'Play', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16, ), ).tr(), @@ -254,12 +251,12 @@ class SmartTvWidget extends StatelessWidget { // child: Tab( // icon: FaIcon( // FontAwesomeIcons.backwardStep, - // color: Theme.of(context).textTheme.bodyText1!.color, + // color: Theme.of(context).textTheme.bodyLarge!.color, // ), // child: Text( // 'Queue Prev', // style: TextStyle( - // color: Theme.of(context).textTheme.bodyText1!.color, + // color: Theme.of(context).textTheme.bodyLarge!.color, // fontSize: 16, // ), // ).tr(), @@ -287,12 +284,12 @@ class SmartTvWidget extends StatelessWidget { // child: Tab( // icon: FaIcon( // FontAwesomeIcons.forwardStep, - // color: Theme.of(context).textTheme.bodyText1!.color, + // color: Theme.of(context).textTheme.bodyLarge!.color, // ), // child: Text( // 'Queue Next', // style: TextStyle( - // color: Theme.of(context).textTheme.bodyText1!.color, + // color: Theme.of(context).textTheme.bodyLarge!.color, // fontSize: 16, // ), // ).tr(), diff --git a/lib/presentation/device_full_screen_page/switches/settings_page_of_switches.dart b/lib/presentation/device_full_screen_page/switches/settings_page_of_switches.dart index 05c4110c7..bb0b7adde 100644 --- a/lib/presentation/device_full_screen_page/switches/settings_page_of_switches.dart +++ b/lib/presentation/device_full_screen_page/switches/settings_page_of_switches.dart @@ -33,25 +33,25 @@ class SettingsPageOfSwitches extends StatelessWidget { title: Text( 'Name:_', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(args: [switchName]), subtitle: Text( 'Room:_', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(args: [roomName]), trailing: IconButton( icon: FaIcon( FontAwesomeIcons.pen, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onPressed: () {}, ), ), Divider( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ], ); diff --git a/lib/presentation/device_full_screen_page/switches/smart_switch_widget.dart b/lib/presentation/device_full_screen_page/switches/smart_switch_widget.dart index 42626c27d..d4e3c69f8 100644 --- a/lib/presentation/device_full_screen_page/switches/smart_switch_widget.dart +++ b/lib/presentation/device_full_screen_page/switches/smart_switch_widget.dart @@ -81,7 +81,7 @@ class _SmartSwitchPage extends State { _switch!.defaultName.getOrCrash()!, // Show switch name style: TextStyle( fontSize: 19.0, - color: Theme.of(context).textTheme.bodyText2!.color, + color: Theme.of(context).textTheme.bodyMedium!.color, ), ), const SizedBox( @@ -100,10 +100,10 @@ class _SmartSwitchPage extends State { activeToggleColor: const Color(0xFF2F363D), inactiveToggleColor: Theme.of(context).primaryColor, activeSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), inactiveSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), activeColor: const Color(0xFFFFDF5D), inactiveColor: Theme.of(context).primaryColorDark, @@ -113,7 +113,7 @@ class _SmartSwitchPage extends State { ), inactiveIcon: Icon( MdiIcons.lightSwitch, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onToggle: (bool value) => _onChange(value), ), diff --git a/lib/presentation/device_full_screen_page/switches/switches_in_the_room/switches_in_the_room_widget.dart b/lib/presentation/device_full_screen_page/switches/switches_in_the_room/switches_in_the_room_widget.dart index 9249b2723..5f3b2c82d 100644 --- a/lib/presentation/device_full_screen_page/switches/switches_in_the_room/switches_in_the_room_widget.dart +++ b/lib/presentation/device_full_screen_page/switches/switches_in_the_room/switches_in_the_room_widget.dart @@ -45,21 +45,21 @@ class SwitchesInTheRoomWidget extends StatelessWidget { border: InputBorder.none, hintText: products[index]['title'.tr()].toString(), hintStyle: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), subtitle: Text( products[index]['number'.tr()].toString(), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), trailing: IconButton( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, icon: const FaIcon(FontAwesomeIcons.pen), onPressed: () {}, ), diff --git a/lib/presentation/device_full_screen_page/switches/widgets/room_switches.dart b/lib/presentation/device_full_screen_page/switches/widgets/room_switches.dart index 80ce5ec41..951399a70 100644 --- a/lib/presentation/device_full_screen_page/switches/widgets/room_switches.dart +++ b/lib/presentation/device_full_screen_page/switches/widgets/room_switches.dart @@ -62,7 +62,7 @@ class RoomSwitches extends StatelessWidget { maxLines: 1, maxFontSize: 19, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), Container( @@ -114,7 +114,7 @@ class RoomSwitches extends StatelessWidget { ), borderRadius: const BorderRadius.all(Radius.circular(24)), border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, width: 0.6, ), ), @@ -146,7 +146,7 @@ class RoomSwitches extends StatelessWidget { Text( _roomEntity, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 25, decoration: TextDecoration.underline, ), @@ -154,7 +154,7 @@ class RoomSwitches extends StatelessWidget { if (_deviceEntityList.size > maxSwitchesToShow) FaIcon( FontAwesomeIcons.arrowRight, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 20, ), ], diff --git a/lib/presentation/device_full_screen_page/switches/widgets/room_switches_toggles_block.dart b/lib/presentation/device_full_screen_page/switches/widgets/room_switches_toggles_block.dart index 624520867..709e961d6 100644 --- a/lib/presentation/device_full_screen_page/switches/widgets/room_switches_toggles_block.dart +++ b/lib/presentation/device_full_screen_page/switches/widgets/room_switches_toggles_block.dart @@ -82,7 +82,7 @@ class RoomSwitchesTogglesBlock extends StatelessWidget { ), borderRadius: const BorderRadius.all(Radius.circular(24)), border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, width: 0.6, ), ), @@ -117,7 +117,7 @@ class RoomSwitchesTogglesBlock extends StatelessWidget { Text( _smartRoomObject!.getRoomName(), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 25, decoration: TextDecoration.underline, ), @@ -127,7 +127,7 @@ class RoomSwitchesTogglesBlock extends StatelessWidget { maxSwitchesToShow!) FaIcon( FontAwesomeIcons.arrowRight, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 20, ), ], diff --git a/lib/presentation/device_full_screen_page/switches/widgets/rooms_switches_widget.dart b/lib/presentation/device_full_screen_page/switches/widgets/rooms_switches_widget.dart index 6f3993e58..e0f956a3a 100644 --- a/lib/presentation/device_full_screen_page/switches/widgets/rooms_switches_widget.dart +++ b/lib/presentation/device_full_screen_page/switches/widgets/rooms_switches_widget.dart @@ -113,7 +113,7 @@ class RoomsSwitchesWidget extends StatelessWidget { 'Switches does not exist.', style: TextStyle( fontSize: 30, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), diff --git a/lib/presentation/device_full_screen_page/switches/widgets/switches_widget.dart b/lib/presentation/device_full_screen_page/switches/widgets/switches_widget.dart index 7d563cd5c..25c8b9197 100644 --- a/lib/presentation/device_full_screen_page/switches/widgets/switches_widget.dart +++ b/lib/presentation/device_full_screen_page/switches/widgets/switches_widget.dart @@ -57,10 +57,10 @@ class SwitchWidget extends StatelessWidget { activeToggleColor: const Color(0xFF2F363D), inactiveToggleColor: Colors.deepPurple, activeSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), inactiveSwitchBorder: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), activeColor: toggleColor, inactiveColor: toggleColor, diff --git a/lib/presentation/home_page/bottom_navigation_bar_home_page.dart b/lib/presentation/home_page/bottom_navigation_bar_home_page.dart index c4c538158..0a03c8556 100644 --- a/lib/presentation/home_page/bottom_navigation_bar_home_page.dart +++ b/lib/presentation/home_page/bottom_navigation_bar_home_page.dart @@ -1,6 +1,6 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:material_design_icons_flutter/material_design_icons_flutter.dart'; class BottomNavigationBarHomePage extends StatelessWidget { const BottomNavigationBarHomePage(this.callback, this.pageIndex); @@ -18,11 +18,13 @@ class BottomNavigationBarHomePage extends StatelessWidget { onTap: (value) => callback(value), items: [ BottomNavigationBarItem( - icon: const FaIcon(FontAwesomeIcons.sitemap), + activeIcon: const Icon(MdiIcons.sitemap), + icon: const Icon(MdiIcons.sitemapOutline), label: 'Automations'.tr(), ), BottomNavigationBarItem( - icon: const FaIcon(FontAwesomeIcons.solidLightbulb), + activeIcon: const Icon(MdiIcons.lightbulbOn), + icon: const Icon(MdiIcons.lightbulbOutline), label: 'Devices'.tr(), ), // BottomNavigationBarItem( diff --git a/lib/presentation/home_page/left_navigation_drawer_home_page.dart b/lib/presentation/home_page/left_navigation_drawer_home_page.dart index ff66e12f2..339353e09 100644 --- a/lib/presentation/home_page/left_navigation_drawer_home_page.dart +++ b/lib/presentation/home_page/left_navigation_drawer_home_page.dart @@ -38,14 +38,14 @@ class LeftNavigationDrawerHomePage extends StatelessWidget { Text( 'Settings', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 18, ), ) ], ), Divider( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), Row( children: [ @@ -62,7 +62,7 @@ class LeftNavigationDrawerHomePage extends StatelessWidget { Text( 'CyBear Jinni', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 20, ), ), @@ -82,20 +82,20 @@ class LeftNavigationDrawerHomePage extends StatelessWidget { Divider( thickness: 0.5, height: 0.5, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), Container( color: Colors.greenAccent.withOpacity(0.8), child: ListTile( leading: FaIcon( FontAwesomeIcons.rightToBracket, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 25, ), title: Text( 'Log Out', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), onTap: () { @@ -106,20 +106,20 @@ class LeftNavigationDrawerHomePage extends StatelessWidget { Divider( thickness: 0.5, height: 0.5, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), Container( color: Colors.orangeAccent, child: ListTile( leading: FaIcon( FontAwesomeIcons.info, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 25, ), title: Text( 'Software Info', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), onTap: () { @@ -130,20 +130,20 @@ class LeftNavigationDrawerHomePage extends StatelessWidget { Divider( thickness: 0.5, height: 0.5, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), Container( color: Colors.blue, child: ListTile( leading: FaIcon( FontAwesomeIcons.globe, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, size: 25, ), title: Text( 'Add Remote Control Support', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), onTap: () { @@ -154,20 +154,20 @@ class LeftNavigationDrawerHomePage extends StatelessWidget { Divider( thickness: 0.5, height: 0.5, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), // Container( // color: Colors.redAccent, // child: ListTile( // leading: FaIcon( // FontAwesomeIcons.userPlus, - // color: Theme.of(context).textTheme.bodyText1!.color, + // color: Theme.of(context).textTheme.bodyLarge!.color, // size: 25, // ), // title: Text( // 'Manage Users', // style: TextStyle( - // color: Theme.of(context).textTheme.bodyText1!.color, + // color: Theme.of(context).textTheme.bodyLarge!.color, // ), // ), // onTap: () { @@ -178,7 +178,7 @@ class LeftNavigationDrawerHomePage extends StatelessWidget { // Divider( // thickness: 0.5, // height: 0.5, - // color: Theme.of(context).textTheme.bodyText1!.color, + // color: Theme.of(context).textTheme.bodyLarge!.color, // ), ], ), diff --git a/lib/presentation/home_page/tabs/bindings_tab/add_bindings/add_bindings_page.dart b/lib/presentation/home_page/tabs/bindings_tab/add_bindings/add_bindings_page.dart index 22ac5b8e3..4882a6400 100644 --- a/lib/presentation/home_page/tabs/bindings_tab/add_bindings/add_bindings_page.dart +++ b/lib/presentation/home_page/tabs/bindings_tab/add_bindings/add_bindings_page.dart @@ -65,7 +65,7 @@ class AddBindingsPage extends StatelessWidget { child: Text( 'Set Home Location', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), diff --git a/lib/presentation/home_page/tabs/bindings_tab/bindings_page.dart b/lib/presentation/home_page/tabs/bindings_tab/bindings_page.dart index 63b9f7fda..a0c617689 100644 --- a/lib/presentation/home_page/tabs/bindings_tab/bindings_page.dart +++ b/lib/presentation/home_page/tabs/bindings_tab/bindings_page.dart @@ -55,7 +55,7 @@ class BindingsPage extends StatelessWidget { toastLength: Toast.LENGTH_LONG, gravity: ToastGravity.CENTER, backgroundColor: Colors.blueGrey, - textColor: Theme.of(context).textTheme.bodyText1!.color, + textColor: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16.0, ); }, diff --git a/lib/presentation/home_page/tabs/history_tab/history_tab.dart b/lib/presentation/home_page/tabs/history_tab/history_tab.dart index fe8377feb..6f1eae244 100644 --- a/lib/presentation/home_page/tabs/history_tab/history_tab.dart +++ b/lib/presentation/home_page/tabs/history_tab/history_tab.dart @@ -16,7 +16,7 @@ class HistoryTab extends StatelessWidget { child: IconButton( icon: FaIcon( FontAwesomeIcons.gear, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onPressed: () => Navigator.push( context, @@ -30,7 +30,7 @@ class HistoryTab extends StatelessWidget { 'Actions_History', style: TextStyle( fontSize: 23.0, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, decoration: TextDecoration.underline, ), ).tr(), diff --git a/lib/presentation/home_page/tabs/history_tab/settings_page_of_history.dart b/lib/presentation/home_page/tabs/history_tab/settings_page_of_history.dart index 2cea54f7d..eb12ccef5 100644 --- a/lib/presentation/home_page/tabs/history_tab/settings_page_of_history.dart +++ b/lib/presentation/home_page/tabs/history_tab/settings_page_of_history.dart @@ -40,7 +40,7 @@ class SettingsPageOfHistory extends StatelessWidget { child: IconButton( icon: FaIcon( FontAwesomeIcons.arrowLeft, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onPressed: () => Navigator.pop(context), ), @@ -49,7 +49,7 @@ class SettingsPageOfHistory extends StatelessWidget { 'History_Settings_Page', style: TextStyle( fontSize: 23.0, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, decoration: TextDecoration.underline, ), ).tr(), diff --git a/lib/presentation/home_page/tabs/scenes_in_folders_tab/scenes_in_folders_tab.dart b/lib/presentation/home_page/tabs/scenes_in_folders_tab/scenes_in_folders_tab.dart index bbf8f78ce..83e853a2a 100644 --- a/lib/presentation/home_page/tabs/scenes_in_folders_tab/scenes_in_folders_tab.dart +++ b/lib/presentation/home_page/tabs/scenes_in_folders_tab/scenes_in_folders_tab.dart @@ -29,7 +29,7 @@ class ScenesInFoldersTab extends StatelessWidget { toastLength: Toast.LENGTH_LONG, gravity: ToastGravity.CENTER, backgroundColor: Colors.blueGrey, - textColor: Theme.of(context).textTheme.bodyText1!.color, + textColor: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16.0, ); }, diff --git a/lib/presentation/home_page/tabs/scenes_in_folders_tab/widgets/scenes_in_folders_l.dart b/lib/presentation/home_page/tabs/scenes_in_folders_tab/widgets/scenes_in_folders_l.dart index d70a2694f..679878858 100644 --- a/lib/presentation/home_page/tabs/scenes_in_folders_tab/widgets/scenes_in_folders_l.dart +++ b/lib/presentation/home_page/tabs/scenes_in_folders_tab/widgets/scenes_in_folders_l.dart @@ -8,8 +8,6 @@ import 'package:flutter_bloc/flutter_bloc.dart'; class ScenesInFoldersL extends StatelessWidget { @override Widget build(BuildContext context) { - final Size screenSize = MediaQuery.of(context).size; - return BlocBuilder( builder: (context, state) { return state.map( @@ -101,7 +99,7 @@ class ScenesInFoldersL extends StatelessWidget { child: Text( folderOfScenes.defaultName.getOrCrash(), style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 30, ), textAlign: TextAlign.center, diff --git a/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/blinds_in_the_room.dart b/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/blinds_in_the_room.dart index 5c32e7f80..b78e86724 100644 --- a/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/blinds_in_the_room.dart +++ b/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/blinds_in_the_room.dart @@ -97,7 +97,7 @@ class BlindsInTheRoom extends StatelessWidget { border: Border.all( color: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color! .withOpacity(0.5), ), @@ -108,7 +108,7 @@ class BlindsInTheRoom extends StatelessWidget { textAlign: TextAlign.center, style: TextStyle( fontSize: 13, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -135,7 +135,7 @@ class BlindsInTheRoom extends StatelessWidget { deviceText, maxLines: 1, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ], @@ -171,14 +171,14 @@ class BlindsInTheRoom extends StatelessWidget { }, child: FaIcon( FontAwesomeIcons.chevronDown, - color: Theme.of(context).textTheme.bodyText2!.color, + color: Theme.of(context).textTheme.bodyMedium!.color, ), ), Text( '·', style: TextStyle( fontSize: 14, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), TextButton( @@ -203,7 +203,7 @@ class BlindsInTheRoom extends StatelessWidget { }, child: FaIcon( FontAwesomeIcons.chevronUp, - color: Theme.of(context).textTheme.bodyText2!.color, + color: Theme.of(context).textTheme.bodyMedium!.color, ), ), ], diff --git a/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/boilers_in_the_room.dart b/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/boilers_in_the_room.dart index e8c2a713a..50f42882c 100644 --- a/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/boilers_in_the_room.dart +++ b/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/boilers_in_the_room.dart @@ -95,7 +95,7 @@ class BoilersInTheRoom extends StatelessWidget { border: Border.all( color: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color! .withOpacity(0.5), ), @@ -106,7 +106,7 @@ class BoilersInTheRoom extends StatelessWidget { textAlign: TextAlign.center, style: TextStyle( fontSize: 13, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -135,7 +135,7 @@ class BoilersInTheRoom extends StatelessWidget { deviceText, maxLines: 1, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ], diff --git a/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/lights_in_the_room_block.dart b/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/lights_in_the_room_block.dart index 746879455..415eb91dc 100644 --- a/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/lights_in_the_room_block.dart +++ b/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/lights_in_the_room_block.dart @@ -97,7 +97,7 @@ class LightsInTheRoomBlock extends StatelessWidget { border: Border.all( color: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color! .withOpacity(0.5), ), @@ -108,7 +108,7 @@ class LightsInTheRoomBlock extends StatelessWidget { textAlign: TextAlign.center, style: TextStyle( fontSize: 13, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -135,7 +135,7 @@ class LightsInTheRoomBlock extends StatelessWidget { deviceText, maxLines: 1, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ], @@ -170,7 +170,7 @@ class LightsInTheRoomBlock extends StatelessWidget { 'Off', style: TextStyle( fontSize: 14, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(), ), @@ -178,7 +178,7 @@ class LightsInTheRoomBlock extends StatelessWidget { '·', style: TextStyle( fontSize: 14, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), TextButton( @@ -202,7 +202,7 @@ class LightsInTheRoomBlock extends StatelessWidget { 'On', style: TextStyle( fontSize: 14, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(), ), diff --git a/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/printers_in_the_room_block.dart b/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/printers_in_the_room_block.dart index eaaba9860..2aa077d92 100644 --- a/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/printers_in_the_room_block.dart +++ b/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/printers_in_the_room_block.dart @@ -95,7 +95,7 @@ class PrintersInTheRoomBlock extends StatelessWidget { border: Border.all( color: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color! .withOpacity(0.5), ), @@ -106,7 +106,7 @@ class PrintersInTheRoomBlock extends StatelessWidget { textAlign: TextAlign.center, style: TextStyle( fontSize: 13, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -135,7 +135,7 @@ class PrintersInTheRoomBlock extends StatelessWidget { textAlign: TextAlign.center, maxLines: 1, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ], diff --git a/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/rgbw_lights_in_the_room_block.dart b/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/rgbw_lights_in_the_room_block.dart index ea58ccc3b..a2005436c 100644 --- a/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/rgbw_lights_in_the_room_block.dart +++ b/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/rgbw_lights_in_the_room_block.dart @@ -98,7 +98,7 @@ class RgbwLightsInTheRoomBlock extends StatelessWidget { border: Border.all( color: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color! .withOpacity(0.5), ), @@ -109,7 +109,7 @@ class RgbwLightsInTheRoomBlock extends StatelessWidget { textAlign: TextAlign.center, style: TextStyle( fontSize: 13, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -136,7 +136,7 @@ class RgbwLightsInTheRoomBlock extends StatelessWidget { deviceText, maxLines: 1, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ], @@ -171,7 +171,7 @@ class RgbwLightsInTheRoomBlock extends StatelessWidget { 'Off', style: TextStyle( fontSize: 14, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(), ), @@ -179,7 +179,7 @@ class RgbwLightsInTheRoomBlock extends StatelessWidget { '·', style: TextStyle( fontSize: 14, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), TextButton( @@ -203,7 +203,7 @@ class RgbwLightsInTheRoomBlock extends StatelessWidget { 'On', style: TextStyle( fontSize: 14, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(), ), diff --git a/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/smart_computers_in_the_room_block.dart b/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/smart_computers_in_the_room_block.dart index d8dcd990b..050a3b1dc 100644 --- a/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/smart_computers_in_the_room_block.dart +++ b/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/smart_computers_in_the_room_block.dart @@ -96,7 +96,7 @@ class SmartComputersInTheRoomBlock extends StatelessWidget { border: Border.all( color: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color! .withOpacity(0.5), ), @@ -107,7 +107,7 @@ class SmartComputersInTheRoomBlock extends StatelessWidget { textAlign: TextAlign.center, style: TextStyle( fontSize: 13, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -134,7 +134,7 @@ class SmartComputersInTheRoomBlock extends StatelessWidget { deviceText, maxLines: 1, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ], diff --git a/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/smart_plug_in_the_room_block.dart b/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/smart_plug_in_the_room_block.dart index 4a67783a1..c47266b71 100644 --- a/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/smart_plug_in_the_room_block.dart +++ b/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/smart_plug_in_the_room_block.dart @@ -98,7 +98,7 @@ class SmartPlugsInTheRoomBlock extends StatelessWidget { border: Border.all( color: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color! .withOpacity(0.5), ), @@ -109,7 +109,7 @@ class SmartPlugsInTheRoomBlock extends StatelessWidget { textAlign: TextAlign.center, style: TextStyle( fontSize: 13, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -136,7 +136,7 @@ class SmartPlugsInTheRoomBlock extends StatelessWidget { deviceText, maxLines: 1, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ], @@ -171,7 +171,7 @@ class SmartPlugsInTheRoomBlock extends StatelessWidget { 'Off', style: TextStyle( fontSize: 14, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(), ), @@ -179,7 +179,7 @@ class SmartPlugsInTheRoomBlock extends StatelessWidget { '·', style: TextStyle( fontSize: 14, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), TextButton( @@ -203,7 +203,7 @@ class SmartPlugsInTheRoomBlock extends StatelessWidget { 'On', style: TextStyle( fontSize: 14, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(), ), diff --git a/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/smart_tv_in_the_room.dart b/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/smart_tv_in_the_room.dart index 4e6279d02..c7cedf8b2 100644 --- a/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/smart_tv_in_the_room.dart +++ b/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/smart_tv_in_the_room.dart @@ -95,7 +95,7 @@ class SmartTvInTheRoom extends StatelessWidget { border: Border.all( color: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color! .withOpacity(0.5), ), @@ -106,7 +106,7 @@ class SmartTvInTheRoom extends StatelessWidget { textAlign: TextAlign.center, style: TextStyle( fontSize: 13, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -133,7 +133,7 @@ class SmartTvInTheRoom extends StatelessWidget { deviceText, maxLines: 1, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ], diff --git a/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/switches_in_the_room_block.dart b/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/switches_in_the_room_block.dart index 80677a2f7..de94cce6a 100644 --- a/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/switches_in_the_room_block.dart +++ b/lib/presentation/home_page/tabs/smart_devices_tab/devices_in_the_room_blocks/switches_in_the_room_block.dart @@ -97,7 +97,7 @@ class SwitchesInTheRoomBlock extends StatelessWidget { border: Border.all( color: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color! .withOpacity(0.5), ), @@ -108,7 +108,7 @@ class SwitchesInTheRoomBlock extends StatelessWidget { textAlign: TextAlign.center, style: TextStyle( fontSize: 13, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -135,7 +135,7 @@ class SwitchesInTheRoomBlock extends StatelessWidget { deviceText, maxLines: 1, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ], @@ -170,7 +170,7 @@ class SwitchesInTheRoomBlock extends StatelessWidget { 'Off', style: TextStyle( fontSize: 14, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(), ), @@ -178,7 +178,7 @@ class SwitchesInTheRoomBlock extends StatelessWidget { '·', style: TextStyle( fontSize: 14, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), TextButton( @@ -202,7 +202,7 @@ class SwitchesInTheRoomBlock extends StatelessWidget { 'On', style: TextStyle( fontSize: 14, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(), ), diff --git a/lib/presentation/home_page/tabs/smart_devices_tab/rooms_widgets/rom_widget.dart b/lib/presentation/home_page/tabs/smart_devices_tab/rooms_widgets/rom_widget.dart index bec474ee8..788a65b11 100644 --- a/lib/presentation/home_page/tabs/smart_devices_tab/rooms_widgets/rom_widget.dart +++ b/lib/presentation/home_page/tabs/smart_devices_tab/rooms_widgets/rom_widget.dart @@ -119,7 +119,7 @@ class RoomWidget extends StatelessWidget { .getOrCrash(), style: TextStyle( fontSize: 23, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ], diff --git a/lib/presentation/home_page/tabs/smart_devices_tab/settings_page_of_smart_devices.dart b/lib/presentation/home_page/tabs/smart_devices_tab/settings_page_of_smart_devices.dart index 074982945..4a80c74f8 100644 --- a/lib/presentation/home_page/tabs/smart_devices_tab/settings_page_of_smart_devices.dart +++ b/lib/presentation/home_page/tabs/smart_devices_tab/settings_page_of_smart_devices.dart @@ -57,7 +57,7 @@ class SettingsPageSmartDevices extends StatelessWidget { 'Open Access Point', style: TextStyle( fontSize: 25, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), diff --git a/lib/presentation/home_page/tabs/smart_devices_tab/smart_devices_by_rooms.dart b/lib/presentation/home_page/tabs/smart_devices_tab/smart_devices_by_rooms.dart index d5401f35d..3c90fac47 100644 --- a/lib/presentation/home_page/tabs/smart_devices_tab/smart_devices_by_rooms.dart +++ b/lib/presentation/home_page/tabs/smart_devices_tab/smart_devices_by_rooms.dart @@ -76,7 +76,7 @@ class SmartDevicesByRooms extends StatelessWidget { style: TextStyle( fontSize: 35, color: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(), ], @@ -98,7 +98,7 @@ class SmartDevicesByRooms extends StatelessWidget { toastLength: Toast.LENGTH_LONG, gravity: ToastGravity.CENTER, backgroundColor: Colors.blueGrey, - textColor: Theme.of(context).textTheme.bodyText1!.color, + textColor: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16.0, ); }, diff --git a/lib/presentation/home_page/tabs/smart_devices_tab/smart_devices_widgets.dart b/lib/presentation/home_page/tabs/smart_devices_tab/smart_devices_widgets.dart index a78c1602b..bebe998e5 100644 --- a/lib/presentation/home_page/tabs/smart_devices_tab/smart_devices_widgets.dart +++ b/lib/presentation/home_page/tabs/smart_devices_tab/smart_devices_widgets.dart @@ -32,7 +32,7 @@ class SmartDevicesWidgets extends StatelessWidget { // toastLength: Toast.LENGTH_LONG, // gravity: ToastGravity.CENTER, // backgroundColor: Colors.blueGrey, - // textColor: Theme.of(context).textTheme.bodyText1!.color, + // textColor: Theme.of(context).textTheme.bodyLarge!.color, // fontSize: 16.0, // ); Navigator.push( diff --git a/lib/presentation/introduction_screen/introduction_screen_body.dart b/lib/presentation/introduction_screen/introduction_screen_body.dart index bc31d548b..17d6d8f6c 100644 --- a/lib/presentation/introduction_screen/introduction_screen_body.dart +++ b/lib/presentation/introduction_screen/introduction_screen_body.dart @@ -8,8 +8,6 @@ import 'package:introduction_screen/introduction_screen.dart'; class IntroductionScreenBody extends StatelessWidget { @override Widget build(BuildContext context) { - final Size screenSize = MediaQuery.of(context).size; - return Container( decoration: const BoxDecoration( // Box decoration takes a gradient @@ -31,7 +29,7 @@ class IntroductionScreenBody extends StatelessWidget { dotsDecorator: DotsDecorator( size: const Size.square(10.0), activeSize: const Size(20.0, 10.0), - activeColor: Theme.of(context).textTheme.bodyText1!.color, + activeColor: Theme.of(context).textTheme.bodyLarge!.color, color: Colors.black26, spacing: const EdgeInsets.symmetric(horizontal: 3.0), activeShape: RoundedRectangleBorder( @@ -68,7 +66,7 @@ class IntroductionScreenBody extends StatelessWidget { 'CyBear Jinni', style: TextStyle( fontSize: 48, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ], @@ -78,12 +76,12 @@ class IntroductionScreenBody extends StatelessWidget { bodyWidget: IntroductionScreenBodyWelcomePage(), decoration: PageDecoration( titleTextStyle: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 25, ), pageColor: Colors.transparent, bodyTextStyle: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontWeight: FontWeight.w700, fontSize: 20.0, ), @@ -98,7 +96,7 @@ class IntroductionScreenBody extends StatelessWidget { Text( 'Our Vision', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 30, ), ), @@ -107,12 +105,12 @@ class IntroductionScreenBody extends StatelessWidget { bodyWidget: IntroductionScreenBodyAboutPage(), decoration: PageDecoration( titleTextStyle: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 30, ), pageColor: Colors.transparent, bodyTextStyle: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontWeight: FontWeight.w700, fontSize: 20.0, ), @@ -123,7 +121,7 @@ class IntroductionScreenBody extends StatelessWidget { 'Done', style: TextStyle( fontWeight: FontWeight.w600, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), onDone: () { diff --git a/lib/presentation/introduction_screen/introductions_view_model_body/introduction_screen_body_about_page.dart b/lib/presentation/introduction_screen/introductions_view_model_body/introduction_screen_body_about_page.dart index 874f7e3ea..76a4a55cc 100644 --- a/lib/presentation/introduction_screen/introductions_view_model_body/introduction_screen_body_about_page.dart +++ b/lib/presentation/introduction_screen/introductions_view_model_body/introduction_screen_body_about_page.dart @@ -10,10 +10,10 @@ class IntroductionScreenBodyAboutPage extends StatelessWidget { ), Container( decoration: BoxDecoration( - color: (Theme.of(context).textTheme.bodyText1!.color)! + color: (Theme.of(context).textTheme.bodyLarge!.color)! .withOpacity(0.55), border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), // Make rounded corners borderRadius: BorderRadius.circular(30), diff --git a/lib/presentation/introduction_screen/introductions_view_model_body/introduction_screen_body_welcome_page.dart b/lib/presentation/introduction_screen/introductions_view_model_body/introduction_screen_body_welcome_page.dart index 85c417a85..e5d275ba5 100644 --- a/lib/presentation/introduction_screen/introductions_view_model_body/introduction_screen_body_welcome_page.dart +++ b/lib/presentation/introduction_screen/introductions_view_model_body/introduction_screen_body_welcome_page.dart @@ -14,7 +14,7 @@ class IntroductionScreenBodyWelcomePage extends StatelessWidget { 'We', style: TextStyle( fontSize: 17.0, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), const SizedBox(width: 10.0), @@ -24,56 +24,56 @@ class IntroductionScreenBodyWelcomePage extends StatelessWidget { 'are OPEN SOURCE', textStyle: TextStyle( fontSize: 20.0, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), TypewriterAnimatedText( 'are FAIR', textStyle: TextStyle( fontSize: 20.0, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), TypewriterAnimatedText( 'are INNOVATIVE', textStyle: TextStyle( fontSize: 20.0, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), TypewriterAnimatedText( 'are PRIVATE', textStyle: TextStyle( fontSize: 20.0, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), TypewriterAnimatedText( 'are SECURE', textStyle: TextStyle( fontSize: 20.0, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), TypewriterAnimatedText( 'are EASY TO USE', textStyle: TextStyle( fontSize: 20.0, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), TypewriterAnimatedText( 'support LOCAL CONNECTION', textStyle: TextStyle( fontSize: 20.0, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), TypewriterAnimatedText( 'want a BETTER FUTURE', textStyle: TextStyle( fontSize: 20.0, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ], @@ -83,10 +83,10 @@ class IntroductionScreenBodyWelcomePage extends StatelessWidget { ), Container( decoration: BoxDecoration( - color: ((Theme.of(context).textTheme.bodyText1!.color)!) + color: ((Theme.of(context).textTheme.bodyLarge!.color)!) .withOpacity(0.3), border: Border.all( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), // Make rounded corners borderRadius: BorderRadius.circular(30), diff --git a/lib/presentation/join_home_by_id/widgets/join_home_by_id_widget.dart b/lib/presentation/join_home_by_id/widgets/join_home_by_id_widget.dart index abbe244fa..6f35b064c 100644 --- a/lib/presentation/join_home_by_id/widgets/join_home_by_id_widget.dart +++ b/lib/presentation/join_home_by_id/widgets/join_home_by_id_widget.dart @@ -8,7 +8,6 @@ import 'package:flutter_bloc/flutter_bloc.dart'; class JoinHomeByIdWidget extends StatelessWidget { @override Widget build(BuildContext context) { - final Size screenSize = MediaQuery.of(context).size; String homeId = ''; return BlocConsumer( @@ -49,7 +48,7 @@ class JoinHomeByIdWidget extends StatelessWidget { child: Text( 'Paste and search', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -69,18 +68,18 @@ class JoinHomeByIdWidget extends StatelessWidget { width: 250, child: TextFormField( style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), decoration: InputDecoration( filled: true, fillColor: Colors.greenAccent.withOpacity(0.3), prefixIcon: Icon( Icons.login, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), labelText: 'Home ID', labelStyle: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), autocorrect: false, @@ -106,7 +105,7 @@ class JoinHomeByIdWidget extends StatelessWidget { child: Text( 'Join Home from text form', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), diff --git a/lib/presentation/manage_users/widgets/user_card_widget.dart b/lib/presentation/manage_users/widgets/user_card_widget.dart index cac7b3390..81c96e111 100644 --- a/lib/presentation/manage_users/widgets/user_card_widget.dart +++ b/lib/presentation/manage_users/widgets/user_card_widget.dart @@ -16,10 +16,10 @@ class UserCard extends StatelessWidget { decoration: BoxDecoration( border: Border( top: BorderSide( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), bottom: BorderSide( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), ), ), @@ -28,7 +28,7 @@ class UserCard extends StatelessWidget { child: ListTile( leading: FaIcon( FontAwesomeIcons.userGraduate, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), title: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -36,7 +36,7 @@ class UserCard extends StatelessWidget { Text( homeUser!.email!.getOrCrash()!, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ], diff --git a/lib/presentation/plus_button/widgets/plus_button_wighet.dart b/lib/presentation/plus_button/widgets/plus_button_wighet.dart index 1502edffc..3dec566a2 100644 --- a/lib/presentation/plus_button/widgets/plus_button_wighet.dart +++ b/lib/presentation/plus_button/widgets/plus_button_wighet.dart @@ -13,8 +13,6 @@ import 'package:url_launcher/url_launcher.dart'; class PlusButtonWidget extends StatelessWidget { @override Widget build(BuildContext context) { - final Size screenSize = MediaQuery.of(context).size; - return BlocBuilder( builder: (context, state) { return state.map( @@ -52,7 +50,7 @@ class PlusButtonWidget extends StatelessWidget { leading: FaIcon( FontAwesomeIcons.sitemap, color: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, size: 25, ), title: Text( @@ -60,7 +58,7 @@ class PlusButtonWidget extends StatelessWidget { style: TextStyle( color: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, ), ), @@ -79,7 +77,7 @@ class PlusButtonWidget extends StatelessWidget { leading: FaIcon( FontAwesomeIcons.solidLightbulb, color: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, size: 25, ), title: Text( @@ -87,7 +85,7 @@ class PlusButtonWidget extends StatelessWidget { style: TextStyle( color: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, ), ), @@ -106,7 +104,7 @@ class PlusButtonWidget extends StatelessWidget { leading: FaIcon( FontAwesomeIcons.globe, color: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, size: 25, ), title: Text( @@ -114,7 +112,7 @@ class PlusButtonWidget extends StatelessWidget { style: TextStyle( color: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, ), ), @@ -159,7 +157,7 @@ class PlusButtonWidget extends StatelessWidget { leading: Iconify( SimpleIcons.node_red, color: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, size: 23, ), title: Text( @@ -167,7 +165,7 @@ class PlusButtonWidget extends StatelessWidget { style: TextStyle( color: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, ), ), @@ -204,7 +202,7 @@ class PlusButtonWidget extends StatelessWidget { leading: FaIcon( FontAwesomeIcons.info, color: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, size: 25, ), title: Text( @@ -212,7 +210,7 @@ class PlusButtonWidget extends StatelessWidget { style: TextStyle( color: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, ), ), @@ -230,7 +228,7 @@ class PlusButtonWidget extends StatelessWidget { leading: FaIcon( FontAwesomeIcons.rightFromBracket, color: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, size: 25, ), title: Text( @@ -238,7 +236,7 @@ class PlusButtonWidget extends StatelessWidget { style: TextStyle( color: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, ), ), diff --git a/lib/presentation/remote_pipes/widgets/manage_remote_pipes_widget.dart b/lib/presentation/remote_pipes/widgets/manage_remote_pipes_widget.dart index d32ed0e75..5df2f7513 100644 --- a/lib/presentation/remote_pipes/widgets/manage_remote_pipes_widget.dart +++ b/lib/presentation/remote_pipes/widgets/manage_remote_pipes_widget.dart @@ -9,9 +9,6 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; class RemotePipesWidget extends StatelessWidget { @override Widget build(BuildContext context) { - final Size screenSize = MediaQuery.of(context).size; - final double sizeBoxWidth = screenSize.width * 0.25; - return BlocBuilder( builder: (context, state) { return Container( @@ -60,7 +57,7 @@ class RemotePipesWidget extends StatelessWidget { toastLength: Toast.LENGTH_LONG, gravity: ToastGravity.BOTTOM, backgroundColor: Colors.blueGrey, - textColor: Theme.of(context).textTheme.bodyText1!.color, + textColor: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16.0, ); context.read().add( diff --git a/lib/presentation/remote_pipes/widgets/remote_pipes_card_widget.dart b/lib/presentation/remote_pipes/widgets/remote_pipes_card_widget.dart index c266263dd..f725ba71d 100644 --- a/lib/presentation/remote_pipes/widgets/remote_pipes_card_widget.dart +++ b/lib/presentation/remote_pipes/widgets/remote_pipes_card_widget.dart @@ -16,10 +16,10 @@ class RemotePipesCard extends StatelessWidget { decoration: BoxDecoration( border: Border( top: BorderSide( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), bottom: BorderSide( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), ), ), @@ -28,7 +28,7 @@ class RemotePipesCard extends StatelessWidget { child: ListTile( leading: FaIcon( FontAwesomeIcons.userGraduate, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), title: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -36,7 +36,7 @@ class RemotePipesCard extends StatelessWidget { Text( homeUser!.email!.getOrCrash()!, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ], diff --git a/lib/presentation/routes/app_router.dart b/lib/presentation/routes/app_router.dart index 1c9bac046..1b1735df6 100644 --- a/lib/presentation/routes/app_router.dart +++ b/lib/presentation/routes/app_router.dart @@ -14,6 +14,7 @@ import 'package:cybear_jinni/presentation/add_new_devices_process/open_access_po import 'package:cybear_jinni/presentation/add_new_devices_process/scan_for_new_cbj_comps/scan_for_new_cbj_comps_page.dart'; import 'package:cybear_jinni/presentation/add_new_room/add_new_room_page.dart'; import 'package:cybear_jinni/presentation/add_user_to_home/add_user_to_home_page.dart'; +import 'package:cybear_jinni/presentation/add_vendors_pages/add_esphome_vendor/add_esphome_vendor_page.dart'; import 'package:cybear_jinni/presentation/add_vendors_pages/add_jinvoo_smart_vendor/add_jinvoo_smart_vendor_page.dart'; import 'package:cybear_jinni/presentation/add_vendors_pages/add_lifx_vendor/add_lifx_vendor_page.dart'; import 'package:cybear_jinni/presentation/add_vendors_pages/add_smart_life_vendor/add_smart_life_vendor_page.dart'; @@ -79,6 +80,7 @@ import 'package:cybear_jinni/presentation/where_to_login_page/where_to_login_pag AutoRoute(page: ChooseAutomationTypeToAddPage), AutoRoute(page: ChooseDeviceVendorToAddPage), AutoRoute(page: AddLifxVendorPage), + AutoRoute(page: AddEspHomeVendorPage), AutoRoute(page: AddTuyaVendorPage), AutoRoute(page: AddSmartLifeVendorPage), AutoRoute(page: AddJinvooSmartVendorPage), @@ -118,6 +120,7 @@ class $AppRouter { late ChooseAutomationTypeToAddPage chooseAutomationTypeToAddPage; late ChooseDeviceVendorToAddPage chooseDeviceVendorToAddPage; late AddLifxVendorPage addLifxVendorPage; + late AddEspHomeVendorPage addEspHomeVendorPage; late AddTuyaVendorPage addTuyaVendorPage; late AddSmartLifeVendorPage addSmartLifeVendorPage; late AddJinvooSmartVendorPage addJinvooSmartVendorPage; diff --git a/lib/presentation/scenes/widgets/scene_widget.dart b/lib/presentation/scenes/widgets/scene_widget.dart index 8001e6851..eb010d34c 100644 --- a/lib/presentation/scenes/widgets/scene_widget.dart +++ b/lib/presentation/scenes/widgets/scene_widget.dart @@ -40,7 +40,7 @@ class SceneWidget extends StatelessWidget { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(30), side: BorderSide( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, width: 0.6, ), ), @@ -53,7 +53,7 @@ class SceneWidget extends StatelessWidget { toastLength: Toast.LENGTH_SHORT, gravity: ToastGravity.BOTTOM, backgroundColor: Colors.purple, - textColor: Theme.of(context).textTheme.bodyText1!.color, + textColor: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 16.0, ); @@ -78,7 +78,7 @@ class SceneWidget extends StatelessWidget { currentScene.name.getOrCrash(), style: TextStyle( fontSize: 23, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), textAlign: TextAlign.center, ), diff --git a/lib/presentation/shared_widgets/error_message.dart b/lib/presentation/shared_widgets/error_message.dart index aa3cb5077..7e700c2b2 100644 --- a/lib/presentation/shared_widgets/error_message.dart +++ b/lib/presentation/shared_widgets/error_message.dart @@ -6,7 +6,7 @@ class ErrorMessage extends StatelessWidget { // TODO: implement Error Message Widget return Container( decoration: - BoxDecoration(color: Theme.of(context).textTheme.bodyText1!.color), + BoxDecoration(color: Theme.of(context).textTheme.bodyLarge!.color), ); } } diff --git a/lib/presentation/shared_widgets/loader.dart b/lib/presentation/shared_widgets/loader.dart index c47661c92..b13099922 100644 --- a/lib/presentation/shared_widgets/loader.dart +++ b/lib/presentation/shared_widgets/loader.dart @@ -6,7 +6,7 @@ class Loader extends StatelessWidget { // TODO: implement Loader Widget return Container( decoration: - BoxDecoration(color: Theme.of(context).textTheme.bodyText1!.color), + BoxDecoration(color: Theme.of(context).textTheme.bodyLarge!.color), ); } } diff --git a/lib/presentation/shared_widgets/smart_device_type_and_toggle_bar.dart b/lib/presentation/shared_widgets/smart_device_type_and_toggle_bar.dart index c5da0eb08..a083fe66d 100644 --- a/lib/presentation/shared_widgets/smart_device_type_and_toggle_bar.dart +++ b/lib/presentation/shared_widgets/smart_device_type_and_toggle_bar.dart @@ -39,9 +39,9 @@ class SmartDeviceTypeAndToggleBar extends StatelessWidget { textAlign: TextAlign.center, style: TextStyle( fontSize: 20, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, backgroundColor: Colors.blueGrey -// color: (Theme.of(context).textTheme.bodyText1!.color)!, +// color: (Theme.of(context).textTheme.bodyLarge!.color)!, , ), ).tr(args: [EnumHelperCbj.dTToString(deviceType)]), diff --git a/lib/presentation/shared_widgets/top_navigation_bar.dart b/lib/presentation/shared_widgets/top_navigation_bar.dart index a790ab60c..ee139f150 100644 --- a/lib/presentation/shared_widgets/top_navigation_bar.dart +++ b/lib/presentation/shared_widgets/top_navigation_bar.dart @@ -60,7 +60,7 @@ class TopNavigationBar extends StatelessWidget { icon: FaIcon( leftIcon, size: 19, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), onPressed: () => leftIconFunction!(context), ), @@ -71,7 +71,7 @@ class TopNavigationBar extends StatelessWidget { pageName!, style: TextStyle( fontSize: 16.0, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ).tr(), ], @@ -92,7 +92,7 @@ class TopNavigationBar extends StatelessWidget { child: FaIcon( rightSecondIcon, size: 19, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -108,7 +108,7 @@ class TopNavigationBar extends StatelessWidget { child: Icon( rightIcon, size: 26, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), diff --git a/lib/presentation/sign_in_page/widgets/sign_in_form_widget.dart b/lib/presentation/sign_in_page/widgets/sign_in_form_widget.dart index 9af38a3da..d725cc97e 100644 --- a/lib/presentation/sign_in_page/widgets/sign_in_form_widget.dart +++ b/lib/presentation/sign_in_page/widgets/sign_in_form_widget.dart @@ -146,7 +146,7 @@ class SignInFormWidget extends StatelessWidget { child: TextButton( style: ButtonStyle( backgroundColor: MaterialStateProperty.all( - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, ), ), onPressed: () { @@ -155,7 +155,7 @@ class SignInFormWidget extends StatelessWidget { child: Text( 'For More Options', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), diff --git a/lib/presentation/software_info/widgets/software_info_card_widget.dart b/lib/presentation/software_info/widgets/software_info_card_widget.dart index 081136e93..5c3908668 100644 --- a/lib/presentation/software_info/widgets/software_info_card_widget.dart +++ b/lib/presentation/software_info/widgets/software_info_card_widget.dart @@ -16,10 +16,10 @@ class SoftwareInfoCard extends StatelessWidget { decoration: BoxDecoration( border: Border( top: BorderSide( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), bottom: BorderSide( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), ), ), @@ -28,7 +28,7 @@ class SoftwareInfoCard extends StatelessWidget { child: ListTile( leading: FaIcon( FontAwesomeIcons.userGraduate, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), title: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -36,7 +36,7 @@ class SoftwareInfoCard extends StatelessWidget { Text( homeUser!.email!.getOrCrash()!, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ], diff --git a/lib/presentation/software_info/widgets/software_info_widget.dart b/lib/presentation/software_info/widgets/software_info_widget.dart index fcc1dce8e..be24e80fd 100644 --- a/lib/presentation/software_info/widgets/software_info_widget.dart +++ b/lib/presentation/software_info/widgets/software_info_widget.dart @@ -8,9 +8,6 @@ import 'package:flutter_bloc/flutter_bloc.dart'; class SoftwareInfoWidget extends StatelessWidget { @override Widget build(BuildContext context) { - final Size screenSize = MediaQuery.of(context).size; - final double sizeBoxWidth = screenSize.width * 0.25; - return BlocBuilder( builder: (context, state) { return state.map( @@ -35,7 +32,7 @@ class SoftwareInfoWidget extends StatelessWidget { style: const TextStyle(fontSize: 26), ), ListTileTheme( - textColor: Theme.of(context).textTheme.bodyText1!.color, + textColor: Theme.of(context).textTheme.bodyLarge!.color, child: Column( children: [ ListTile( diff --git a/lib/presentation/where_to_login_page/where_to_login_page_minimal/where_to_login_page_minimal_page.dart b/lib/presentation/where_to_login_page/where_to_login_page_minimal/where_to_login_page_minimal_page.dart index 58b50d49d..d18025417 100644 --- a/lib/presentation/where_to_login_page/where_to_login_page_minimal/where_to_login_page_minimal_page.dart +++ b/lib/presentation/where_to_login_page/where_to_login_page_minimal/where_to_login_page_minimal_page.dart @@ -40,7 +40,7 @@ class WhereToLoginPageMinimalPage extends StatelessWidget { 'What would you like to do', style: TextStyle( fontSize: 25, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -68,7 +68,7 @@ class WhereToLoginPageMinimalPage extends StatelessWidget { children: [ FaIcon( FontAwesomeIcons.doorOpen, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), const SizedBox( width: 20, @@ -78,7 +78,7 @@ class WhereToLoginPageMinimalPage extends StatelessWidget { style: TextStyle( fontSize: 25, color: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, ), ), ], @@ -107,7 +107,7 @@ class WhereToLoginPageMinimalPage extends StatelessWidget { children: [ FaIcon( FontAwesomeIcons.userGroup, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), const SizedBox( width: 20, @@ -117,7 +117,7 @@ class WhereToLoginPageMinimalPage extends StatelessWidget { style: TextStyle( fontSize: 25, color: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, ), ), ], diff --git a/lib/presentation/where_to_login_page/where_to_login_page_minimal/widgets/home_card_widget.dart b/lib/presentation/where_to_login_page/where_to_login_page_minimal/widgets/home_card_widget.dart index 823fd0746..1bc18e968 100644 --- a/lib/presentation/where_to_login_page/where_to_login_page_minimal/widgets/home_card_widget.dart +++ b/lib/presentation/where_to_login_page/where_to_login_page_minimal/widgets/home_card_widget.dart @@ -42,10 +42,10 @@ class HomeCardWidget extends StatelessWidget { decoration: BoxDecoration( border: Border( top: BorderSide( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), bottom: BorderSide( - color: (Theme.of(context).textTheme.bodyText1!.color)!, + color: (Theme.of(context).textTheme.bodyLarge!.color)!, ), ), ), @@ -54,7 +54,7 @@ class HomeCardWidget extends StatelessWidget { child: ListTile( leading: FaIcon( FontAwesomeIcons.houseUser, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), title: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -62,7 +62,7 @@ class HomeCardWidget extends StatelessWidget { Text( home!.name!.getOrCrash()!, style: TextStyle( - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ], diff --git a/lib/presentation/where_to_login_page/where_to_login_page_offline.dart b/lib/presentation/where_to_login_page/where_to_login_page_offline.dart index 1bd3f114c..8e528766e 100644 --- a/lib/presentation/where_to_login_page/where_to_login_page_offline.dart +++ b/lib/presentation/where_to_login_page/where_to_login_page_offline.dart @@ -34,7 +34,7 @@ class WhereToLoginPageOffline extends StatelessWidget { 'What would you like to do', style: TextStyle( fontSize: 25, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ), @@ -62,7 +62,7 @@ class WhereToLoginPageOffline extends StatelessWidget { FaIcon( FontAwesomeIcons.vial, color: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, ), const SizedBox( width: 20, @@ -73,7 +73,7 @@ class WhereToLoginPageOffline extends StatelessWidget { fontSize: 25, color: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, ), ), @@ -104,7 +104,7 @@ class WhereToLoginPageOffline extends StatelessWidget { FaIcon( FontAwesomeIcons.tree, color: - Theme.of(context).textTheme.bodyText1!.color, + Theme.of(context).textTheme.bodyLarge!.color, ), const SizedBox( width: 20, @@ -115,7 +115,7 @@ class WhereToLoginPageOffline extends StatelessWidget { fontSize: 25, color: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, ), ), diff --git a/pubspec.yaml b/pubspec.yaml index b3c476dd7..522550c93 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -8,6 +8,7 @@ publish_to: 'none' environment: sdk: ">=2.18.2 <3.0.0" +# Don't get confuse, this is from the package flutter_launcher_icons and not flutter_icons flutter_icons: ios: true android: true @@ -37,37 +38,36 @@ dependencies: # More customization when notifying your user. another_flushbar: ^1.12.29 # Utility classes to work with asynchronous computations. - async: ^2.10.0 + async: ^2.11.0 # Declarative routing solution, where everything needed for navigation is automatically generated for you. auto_route: ^5.0.4 # Automatically resizes text to fit perfectly within its bounds. auto_size_text: ^3.0.0 # Helps implement the BLoC pattern. - bloc: ^8.1.0 + bloc: ^8.1.1 # Copy text from and to clipboard clipboard: ^0.1.3 # Allow discover network connectivity - connectivity_plus: ^3.0.2 + connectivity_plus: ^3.0.3 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.5 # Functional programming thingies, let you use multiple return types dartz: ^0.10.1 # A day night time picker. - day_night_time_picker: ^1.1.5 + day_night_time_picker: ^1.2.0+2 # Helps us to select days in a week. day_picker: ^2.1.1 # Get current device information - device_info_plus: ^8.0.0 + device_info_plus: ^8.1.0 # Internationalization (Easy translations) easy_localization: ^3.0.1 # An "expansion" on the Flutter SDK's standard ExpansionTile expansion_tile_card: ^2.0.0 - flutter: sdk: flutter # Bloc for state management, replace StatefulWidget - flutter_bloc: ^8.1.1 + flutter_bloc: ^8.1.2 # HSV(HSB)/HSL/RGB/Material color picker flutter_colorpicker: ^1.0.3 # A cross platform plugin for displaying local notifications. @@ -77,9 +77,9 @@ dependencies: # Getting the local timezone of the os. flutter_timezone: ^1.0.4 # Toast Library for Flutter, Easily create toast messages in single line of code. - fluttertoast: ^8.1.2 + fluttertoast: ^8.2.1 # Font Awesome Icon pack available as Flutter Icons. - font_awesome_flutter: ^10.3.0 + font_awesome_flutter: ^10.4.0 # Annotations for freezed freezed_annotation: ^2.2.0 # Service locator @@ -99,7 +99,7 @@ dependencies: # Convenient code generator for get_it injectable: ^2.1.0 # Allow you to have a screen at launcher for example - introduction_screen: ^3.1.4 + introduction_screen: ^3.1.7 # Extremely fast, easy to use, and fully async NoSQL database for Flutter. isar: ^3.0.5 # Isar Core binaries for the Isar Database. Needs to be included for Flutter apps. @@ -107,7 +107,7 @@ dependencies: # Defines the annotations used by json_serializable to create code for JSON serialization and deserialization. json_annotation: ^4.8.0 # Dart Build System builders for handling JSON. - json_serializable: ^6.6.0 + json_serializable: ^6.6.1 # Port of Kotlin's Kotlin Standard library for Dart/Flutter projects kt_dart: ^1.0.0 # Liquid progress indicator for Flutter. @@ -115,21 +115,21 @@ dependencies: # Handles getting a location on location: ^4.4.0 # Small, easy to use and extensible logger which prints beautiful logs. - logger: ^1.1.0 + logger: ^1.3.0 # The Material Design Icons designed by the community for Flutter material_design_icons_flutter: ^6.0.7096 # Creating multi-select widgets in a variety of ways multi_select_flutter: ^4.1.3 # Service discovery over multicast DNS (mDNS), Bonjour, and Avahi. - multicast_dns: ^0.3.2+2 + multicast_dns: ^0.3.2+3 # Discover network info and configure themselves accordingly - network_info_plus: ^3.0.1 + network_info_plus: ^3.0.2 # Helps you discover open ports, devices on subnet and more. network_tools: ^3.0.0+3 # Querying information about the application package, such as CFBundleVersion - package_info_plus: ^3.0.2 + package_info_plus: ^3.0.3 # Finding commonly used locations on the filesystem - path_provider: ^2.0.12 + path_provider: ^2.0.13 # Popup that ask for the requested permission permission_handler: ^10.2.0 # Provides runtime support for a Dart implementation of protobufs. @@ -139,11 +139,11 @@ dependencies: # Implementation of the popular reactiveX api for asynchronous programming rxdart: ^0.27.7 # Reading and writing simple key-value pairs - shared_preferences: ^2.0.17 + shared_preferences: ^2.0.18 # Highly customizable circular slider/progress bar & spinner. sleek_circular_slider: ^2.0.1 # Plugin for launching a URL - url_launcher: ^6.1.8 + url_launcher: ^6.1.10 # Simple, fast generation of RFC4122 UUIDs. uuid: ^3.0.7 # Get available wifi ssid list, user can connect to wifi with ssid and password, and create hotspot @@ -157,13 +157,12 @@ dev_dependencies: auto_route_generator: ^5.0.3 # A build system for Dart code generation and modular compilation. build_runner: ^2.3.3 - # Package which simplifies the task of updating your Flutter app's launcher icon. - flutter_launcher_icons: ^0.11.0 + flutter_launcher_icons: ^0.12.0 # Code generator for unions/pattern-matching/copy. freezed: ^2.3.2 # Convenient code generator for get_it. - injectable_generator: ^2.1.3 + injectable_generator: ^2.1.4 # Code generator for the Isar Database. Finds classes annotated with @Collection. isar_generator: ^3.0.5 # Collection of lint rules for Dart and Flutter projects. @@ -171,4 +170,4 @@ dev_dependencies: # # Mock framework with APIs for Fakes, Mocks, behavior verification, and stubbing. # mockito: ^5.3.0 # A full featured library for writing and running Dart tests across platforms. - test: ^1.22.2 + test: ^1.23.1