From f63dd994cf8a4125a0a2c684b192d8021c42bebe Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Tue, 17 Dec 2024 12:14:22 -0300 Subject: [PATCH 01/25] =?UTF-8?q?milestone:=20indexa=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- integration_test/app_test.dart | 209 -------------- .../features/provisional_history_test.dart | 45 --- lib/backend/schema/structs/index.dart | 3 - .../_template_/bloc/bloc.dart} | 0 .../_template_/bloc/event.dart} | 0 .../_template_/bloc}/index.dart | 0 .../_template_/bloc/state.dart} | 0 .../_template_}/index.dart | 0 .../_template_/view_model}/index.dart | 0 .../_template_/view_model/view_model.dart} | 0 .../_template_/widgets}/index.dart | 0 .../_template_/widgets/screen.dart} | 0 .../_template_/widgets/widget.dart} | 0 .../image_cropper/image_cropper.dart | 0 .../term_of_use/atom_terms_of_use.dart | 0 ..._arrow_linked_locals_component_widget.dart | 64 ++-- .../schedule_visit_detail_model.dart | 11 +- .../schedule_visit_detail_widget.dart | 56 ++-- ...p_arrow_linked_locals_component_model.dart | 11 +- ..._arrow_linked_locals_component_widget.dart | 8 +- ...cation_modal_template_component_model.dart | 14 +- .../change_pass_widget.dart | 14 +- ...got_password_template_component_model.dart | 2 +- ...ot_password_template_component_widget.dart | 5 +- ...item_details_template_component_model.dart | 12 +- .../provisional_schedule_template_model.dart | 18 +- .../provisional_shcedule_template_widget.dart | 128 +++----- ...siter_vistor_template_component_model.dart | 12 +- ...iter_vistor_template_component_widget.dart | 90 ++---- .../sign_in_template_component_widget.dart | 4 +- .../sign_up_template_component_widget.dart | 8 +- .../view_visit_detail_model.dart | 11 +- .../view_visit_detail_widget.dart | 64 ++-- ...search_modal_template_component_model.dart | 11 +- ...earch_modal_template_component_widget.dart | 52 +--- .../index.dart} | 0 lib/core/meta/index.dart | 1 + .../_template_/application/index.dart | 1 + .../application/services/index.dart} | 0 lib/features/_template_/index.dart | 1 + .../authentication_service.dart | 50 ++-- lib/features/authentication/index.dart | 1 + .../backend/api_requests/api_calls.dart | 264 ++++++++--------- .../backend/api_requests/api_manager.dart | 0 .../api_requests/get_streamed_response.dart | 0 lib/features/backend/api_requests/index.dart | 3 + lib/features/backend/index.dart | 2 + .../backend/schema/enums/enums.dart | 0 lib/features/backend/schema/enums/index.dart | 1 + lib/features/backend/schema/index.dart | 3 + .../backend/schema/structs/device_struct.dart | 9 +- .../backend/schema/structs/index.dart | 1 + lib/features/backend/schema/util/index.dart | 1 + .../backend/schema/util/schema_util.dart | 8 +- .../blocs/access_history_bloc.dart | 11 +- .../blocs/provisional_history_bloc.dart | 9 +- .../pages/acess_history_page_widget.dart | 2 +- .../pages/provisional_history_page.dart | 2 +- .../home/presentation/blocs/home_bloc.dart | 22 +- .../home/presentation/pages/home_page.dart | 4 +- .../presentation/widgets/drawer_widget.dart | 6 +- .../locals/data/data_sources/index.dart | 0 .../locals_local_data_source.dart | 13 + .../locals_remote_data_source.dart | 35 +-- .../locals/data/index.dart | 0 lib/features/locals/data/models/index.dart | 0 .../locals/data/repositories/index.dart | 0 .../repositories/locals_repository_impl.dart | 30 +- .../locals/domain/entities/index.dart | 0 .../locals/domain/index.dart | 0 .../locals/domain/respositories/index.dart | 0 .../respositories/locals_repository.dart | 0 .../locals/domain/usecases/index.dart | 0 .../molecules => features}/locals/index.dart | 0 .../locals/presentation/blocs/index.dart | 0 .../blocs/local_profile_bloc.dart | 23 +- .../locals/presentation/index.dart | 0 .../locals/presentation/widgets/index.dart | 0 .../widgets/local_profile/index.dart | 0 .../local_profile/local_profile_widget.dart | 258 +++++++++++++++++ .../locals/utils/index.dart | 0 .../locals/utils/local_util.dart | 75 +++-- .../menu/data/data_sources/index.dart | 0 .../data_sources/menu_local_data_source.dart | 24 +- .../menu/data/index.dart | 0 lib/features/menu/data/models/index.dart | 0 .../menu/data/repositories/index.dart | 0 .../repositories/menu_repository_impl.dart | 27 +- .../menu/domain/entities/index.dart | 0 .../menu/domain/entities/menu_item.dart | 3 +- .../menu/domain/index.dart | 0 .../menu/domain/respositories/index.dart | 1 + .../domain/respositories/menu_repository.dart | 5 + lib/features/menu/domain/usecases/index.dart | 0 .../molecules => features}/menu/index.dart | 0 .../menu/presentation/blocs/index.dart | 0 .../menu/presentation/blocs/menu_bloc.dart | 18 +- .../presentation/blocs/menu_item_bloc.dart | 0 .../presentation/blocs/menu_view_bloc.dart | 0 .../menu/presentation/index.dart | 0 .../menu/presentation/mappers/index.dart | 0 .../menu/presentation/mappers/menu_entry.dart | 2 +- .../menu/presentation/widgets/index.dart | 0 .../presentation/widgets/menu_factory.dart | 10 +- .../presentation/widgets/menu_item/index.dart | 0 .../widgets/menu_item/menu_item_button.dart | 3 +- .../widgets/menu_item/menu_item_card.dart | 3 +- .../presentation/widgets/menu_view/index.dart | 0 .../widgets/menu_view/menu_list_view.dart | 2 +- .../menu_view/menu_staggered_view.dart | 2 +- .../modules/constants/index.dart | 0 .../modules/constants/license_constants.dart | 0 .../modules/data/data_sources/index.dart | 0 .../license_local_data_source.dart | 29 +- .../license_remote_data_source.dart | 50 +--- .../modules/data/index.dart | 0 .../modules/data/models/index.dart | 0 .../modules/data/models/license_model.dart | 0 .../data/models/license_model.freezed.dart | 0 .../modules/data/models/license_model.g.dart | 0 .../modules/data/models/module_model.dart | 0 .../data/models/module_model.freezed.dart | 0 .../modules/data/models/module_model.g.dart | 0 .../modules/data/repositories/index.dart | 0 .../repositories/license_repository_impl.dart | 19 +- .../modules/domain/entities/base_module.dart | 0 .../modules/domain/entities/index.dart | 0 .../modules/domain/entities/license.dart | 9 +- .../modules/domain/entities/module.dart | 9 +- .../modules/domain/index.dart | 0 .../modules/domain/respositories/index.dart | 0 .../respositories/license_repository.dart | 0 .../modules/domain/usecases/index.dart | 0 .../molecules => features}/modules/index.dart | 0 .../modules/presentation/blocs/index.dart | 0 .../modules/presentation/index.dart | 0 .../modules/presentation/widgets/index.dart | 0 .../notifications}/deep_link_service.dart | 2 +- .../firebase_messaging_service.dart | 11 +- lib/features/notifications/index.dart | 3 + .../notifications/notification_service.dart | 30 +- .../profile/data/data_sources/index.dart | 0 .../profile_local_data_source.dart} | 38 +-- lib/features/profile/data/index.dart | 3 + lib/features/profile/data/models/index.dart | 0 .../profile/data/repositories/index.dart | 0 .../profile/domain/entities/index.dart | 0 lib/features/profile/domain/index.dart | 3 + .../profile/domain/respositories/index.dart | 0 .../profile/domain/usecases/index.dart | 0 lib/features/profile/index.dart | 3 + .../profile/presentation/blocs/index.dart | 0 lib/features/profile/presentation/index.dart | 3 + .../profile/presentation/pages/index.dart | 0 .../profile/presentation/widgets/index.dart | 0 .../pages/about_property_screen.dart | 4 +- lib/features/storage/application/index.dart | 1 + .../service/database_service.dart} | 16 +- .../storage/application/service/index.dart | 1 + .../data_sources/database_storage_helper.dart | 33 +++ .../storage/data/data_sources/index.dart | 3 + .../data_sources/secure_storage_helper.dart} | 13 +- .../data_sources/shared_storage_helper.dart} | 2 +- lib/features/storage/data/index.dart | 3 + .../storage/data/models/database_storage.dart | 125 ++++++++ lib/features/storage/data/models/index.dart | 4 + .../storage/data/models/secure_storage.dart | 43 +++ .../storage/data/models/shared_storage.dart | 16 + lib/features/storage/data/models/storage.dart | 7 + .../storage/data/repositories/index.dart | 1 + .../repositories/storage_repository.dart} | 14 +- .../storage/domain/entities/base_storage.dart | 11 + .../domain/entities/database_storage.dart | 3 + .../storage/domain/entities/index.dart | 5 + .../domain/entities/secure_storage.dart | 3 + .../domain/entities/shared_storage.dart | 3 + .../storage/domain/entities/storage.dart | 1 + lib/features/storage/domain/index.dart | 3 + .../storage/domain/respositories/index.dart | 0 .../storage/domain/usecases/index.dart | 0 lib/features/storage/index.dart | 3 + .../flutter_flow_button_tabbar.dart | 2 +- lib/flutter_flow/index.dart | 23 ++ lib/flutter_flow/nav/index.dart | 2 + lib/flutter_flow/nav/nav.dart | 18 +- lib/flutter_flow/nav/serialization_util.dart | 14 +- lib/initialization.dart | 5 +- lib/main.dart | 7 +- .../fast_pass_page/fast_pass_page_widget.dart | 23 +- .../forgot_password_screen.dart | 25 +- .../liberation_history_model.dart | 18 +- .../liberation_history_widget.dart | 22 +- .../message_history_page_model.dart | 11 +- .../message_history_page_widget.dart | 6 +- .../package_order_page.dart | 73 ++--- .../people_on_the_property_page_widget.dart | 2 +- .../pets_history_screen.dart | 29 +- lib/pages/pets_page/pets_page_model.dart | 49 ++-- .../preferences_settings_model.dart | 39 +-- .../qr_code_page/qr_code_page_model.dart | 18 +- .../qr_code_page/qr_code_page_widget.dart | 30 +- .../reception_page/reception_page_model.dart | 5 +- .../reception_page/reception_page_widget.dart | 12 +- .../reservation_page_widget.dart | 24 +- .../residents_on_the_property_model.dart | 7 +- .../residents_on_the_property_screen.dart | 2 +- .../schedule_complete_visit_page_model.dart | 43 +-- .../schedule_complete_visit_page_widget.dart | 133 +++------ .../visit_history_page_widget.dart | 43 ++- .../sign_in_page/sign_in_page_widget.dart | 8 +- .../sign_up_page/sign_up_page_widget.dart | 7 +- .../vehicles_on_the_property.dart | 5 +- lib/pages/visits_on_the_property/model.dart | 104 ++++--- .../visits_on_the_property_screen.dart | 11 +- .../welcome_page/welcome_page_widget.dart | 9 +- .../locals_local_data_source.dart | 16 - .../local_profile/local_profile_widget.dart | 273 ------------------ .../domain/respositories/menu_repository.dart | 6 - lib/shared/enums/index.dart | 1 + lib/shared/extensions/index.dart | 3 + lib/shared/helpers/index.dart | 0 lib/shared/helpers/storage/base_storage.dart | 152 ---------- lib/shared/mixins/index.dart | 2 + lib/shared/services/index.dart | 0 lib/shared/utils/index.dart | 13 + lib/shared/utils/log_util.dart | 2 +- lib/shared/utils/share_util.dart | 7 +- test/widget_test.dart | 17 -- 228 files changed, 1511 insertions(+), 2128 deletions(-) delete mode 100644 integration_test/app_test.dart delete mode 100644 integration_test/features/provisional_history_test.dart delete mode 100644 lib/backend/schema/structs/index.dart rename lib/{shared/components/molecules/locals/data/models/index.dart => components/_template_/bloc/bloc.dart} (100%) rename lib/{shared/components/molecules/locals/domain/entities/index.dart => components/_template_/bloc/event.dart} (100%) rename lib/{shared/components/molecules/locals/domain/usecases => components/_template_/bloc}/index.dart (100%) rename lib/{shared/components/molecules/menu/data/models/index.dart => components/_template_/bloc/state.dart} (100%) rename lib/{shared/components/molecules/menu/domain/respositories => components/_template_}/index.dart (100%) rename lib/{shared/components/molecules/menu/domain/usecases => components/_template_/view_model}/index.dart (100%) rename lib/{shared/components/molecules/modules/domain/usecases/index.dart => components/_template_/view_model/view_model.dart} (100%) rename lib/{shared/components/molecules/modules/presentation/blocs => components/_template_/widgets}/index.dart (100%) rename lib/{shared/components/molecules/modules/presentation/widgets/index.dart => components/_template_/widgets/screen.dart} (100%) rename lib/{shared/components/templates/history/history_page_template.dart => components/_template_/widgets/widget.dart} (100%) rename lib/{shared/components/atoms => components/atomic_components}/image_cropper/image_cropper.dart (100%) rename lib/{shared/components/atoms => components/atomic_components}/term_of_use/atom_terms_of_use.dart (100%) rename lib/{shared/components/templates/home/home_page_template.dart => core/index.dart} (100%) create mode 100644 lib/core/meta/index.dart create mode 100644 lib/features/_template_/application/index.dart rename lib/{shared/components/templates/schedule/schedule_page_template.dart => features/_template_/application/services/index.dart} (100%) rename lib/{shared/services => features}/authentication/authentication_service.dart (79%) create mode 100644 lib/features/authentication/index.dart rename lib/{ => features}/backend/api_requests/api_calls.dart (86%) rename lib/{ => features}/backend/api_requests/api_manager.dart (100%) rename lib/{ => features}/backend/api_requests/get_streamed_response.dart (100%) create mode 100644 lib/features/backend/api_requests/index.dart create mode 100644 lib/features/backend/index.dart rename lib/{ => features}/backend/schema/enums/enums.dart (100%) create mode 100644 lib/features/backend/schema/enums/index.dart create mode 100644 lib/features/backend/schema/index.dart rename lib/{ => features}/backend/schema/structs/device_struct.dart (89%) create mode 100644 lib/features/backend/schema/structs/index.dart create mode 100644 lib/features/backend/schema/util/index.dart rename lib/{ => features}/backend/schema/util/schema_util.dart (86%) rename lib/{shared/components/molecules => features}/locals/data/data_sources/index.dart (100%) create mode 100644 lib/features/locals/data/data_sources/locals_local_data_source.dart rename lib/{shared/components/molecules => features}/locals/data/data_sources/locals_remote_data_source.dart (89%) rename lib/{shared/components/molecules => features}/locals/data/index.dart (100%) create mode 100644 lib/features/locals/data/models/index.dart rename lib/{shared/components/molecules => features}/locals/data/repositories/index.dart (100%) rename lib/{shared/components/molecules => features}/locals/data/repositories/locals_repository_impl.dart (73%) create mode 100644 lib/features/locals/domain/entities/index.dart rename lib/{shared/components/molecules => features}/locals/domain/index.dart (100%) rename lib/{shared/components/molecules => features}/locals/domain/respositories/index.dart (100%) rename lib/{shared/components/molecules => features}/locals/domain/respositories/locals_repository.dart (100%) create mode 100644 lib/features/locals/domain/usecases/index.dart rename lib/{shared/components/molecules => features}/locals/index.dart (100%) rename lib/{shared/components/molecules => features}/locals/presentation/blocs/index.dart (100%) rename lib/{shared/components/molecules => features}/locals/presentation/blocs/local_profile_bloc.dart (68%) rename lib/{shared/components/molecules => features}/locals/presentation/index.dart (100%) rename lib/{shared/components/molecules => features}/locals/presentation/widgets/index.dart (100%) rename lib/{shared/components/molecules => features}/locals/presentation/widgets/local_profile/index.dart (100%) create mode 100644 lib/features/locals/presentation/widgets/local_profile/local_profile_widget.dart rename lib/{shared/components/molecules => features}/locals/utils/index.dart (100%) rename lib/{shared/components/molecules => features}/locals/utils/local_util.dart (52%) rename lib/{shared/components/molecules => features}/menu/data/data_sources/index.dart (100%) rename lib/{shared/components/molecules => features}/menu/data/data_sources/menu_local_data_source.dart (89%) rename lib/{shared/components/molecules => features}/menu/data/index.dart (100%) create mode 100644 lib/features/menu/data/models/index.dart rename lib/{shared/components/molecules => features}/menu/data/repositories/index.dart (100%) rename lib/{shared/components/molecules => features}/menu/data/repositories/menu_repository_impl.dart (77%) rename lib/{shared/components/molecules => features}/menu/domain/entities/index.dart (100%) rename lib/{shared/components/molecules => features}/menu/domain/entities/menu_item.dart (93%) rename lib/{shared/components/molecules => features}/menu/domain/index.dart (100%) create mode 100644 lib/features/menu/domain/respositories/index.dart create mode 100644 lib/features/menu/domain/respositories/menu_repository.dart create mode 100644 lib/features/menu/domain/usecases/index.dart rename lib/{shared/components/molecules => features}/menu/index.dart (100%) rename lib/{shared/components/molecules => features}/menu/presentation/blocs/index.dart (100%) rename lib/{shared/components/molecules => features}/menu/presentation/blocs/menu_bloc.dart (74%) rename lib/{shared/components/molecules => features}/menu/presentation/blocs/menu_item_bloc.dart (100%) rename lib/{shared/components/molecules => features}/menu/presentation/blocs/menu_view_bloc.dart (100%) rename lib/{shared/components/molecules => features}/menu/presentation/index.dart (100%) rename lib/{shared/components/molecules => features}/menu/presentation/mappers/index.dart (100%) rename lib/{shared/components/molecules => features}/menu/presentation/mappers/menu_entry.dart (98%) rename lib/{shared/components/molecules => features}/menu/presentation/widgets/index.dart (100%) rename lib/{shared/components/molecules => features}/menu/presentation/widgets/menu_factory.dart (85%) rename lib/{shared/components/molecules => features}/menu/presentation/widgets/menu_item/index.dart (100%) rename lib/{shared/components/molecules => features}/menu/presentation/widgets/menu_item/menu_item_button.dart (98%) rename lib/{shared/components/molecules => features}/menu/presentation/widgets/menu_item/menu_item_card.dart (97%) rename lib/{shared/components/molecules => features}/menu/presentation/widgets/menu_view/index.dart (100%) rename lib/{shared/components/molecules => features}/menu/presentation/widgets/menu_view/menu_list_view.dart (98%) rename lib/{shared/components/molecules => features}/menu/presentation/widgets/menu_view/menu_staggered_view.dart (98%) rename lib/{shared/components/molecules => features}/modules/constants/index.dart (100%) rename lib/{shared/components/molecules => features}/modules/constants/license_constants.dart (100%) rename lib/{shared/components/molecules => features}/modules/data/data_sources/index.dart (100%) rename lib/{shared/components/molecules => features}/modules/data/data_sources/license_local_data_source.dart (72%) rename lib/{shared/components/molecules => features}/modules/data/data_sources/license_remote_data_source.dart (65%) rename lib/{shared/components/molecules => features}/modules/data/index.dart (100%) rename lib/{shared/components/molecules => features}/modules/data/models/index.dart (100%) rename lib/{shared/components/molecules => features}/modules/data/models/license_model.dart (100%) rename lib/{shared/components/molecules => features}/modules/data/models/license_model.freezed.dart (100%) rename lib/{shared/components/molecules => features}/modules/data/models/license_model.g.dart (100%) rename lib/{shared/components/molecules => features}/modules/data/models/module_model.dart (100%) rename lib/{shared/components/molecules => features}/modules/data/models/module_model.freezed.dart (100%) rename lib/{shared/components/molecules => features}/modules/data/models/module_model.g.dart (100%) rename lib/{shared/components/molecules => features}/modules/data/repositories/index.dart (100%) rename lib/{shared/components/molecules => features}/modules/data/repositories/license_repository_impl.dart (63%) rename lib/{shared/components/molecules => features}/modules/domain/entities/base_module.dart (100%) rename lib/{shared/components/molecules => features}/modules/domain/entities/index.dart (100%) rename lib/{shared/components/molecules => features}/modules/domain/entities/license.dart (93%) rename lib/{shared/components/molecules => features}/modules/domain/entities/module.dart (94%) rename lib/{shared/components/molecules => features}/modules/domain/index.dart (100%) rename lib/{shared/components/molecules => features}/modules/domain/respositories/index.dart (100%) rename lib/{shared/components/molecules => features}/modules/domain/respositories/license_repository.dart (100%) create mode 100644 lib/features/modules/domain/usecases/index.dart rename lib/{shared/components/molecules => features}/modules/index.dart (100%) create mode 100644 lib/features/modules/presentation/blocs/index.dart rename lib/{shared/components/molecules => features}/modules/presentation/index.dart (100%) create mode 100644 lib/features/modules/presentation/widgets/index.dart rename lib/{shared/services/deeplink => features/notifications}/deep_link_service.dart (97%) rename lib/{backend => features}/notifications/firebase_messaging_service.dart (82%) create mode 100644 lib/features/notifications/index.dart rename lib/{backend => features}/notifications/notification_service.dart (91%) create mode 100644 lib/features/profile/data/data_sources/index.dart rename lib/{shared/helpers/storage/keychain_storage.dart => features/profile/data/data_sources/profile_local_data_source.dart} (60%) create mode 100644 lib/features/profile/data/index.dart create mode 100644 lib/features/profile/data/models/index.dart create mode 100644 lib/features/profile/data/repositories/index.dart create mode 100644 lib/features/profile/domain/entities/index.dart create mode 100644 lib/features/profile/domain/index.dart create mode 100644 lib/features/profile/domain/respositories/index.dart create mode 100644 lib/features/profile/domain/usecases/index.dart create mode 100644 lib/features/profile/index.dart create mode 100644 lib/features/profile/presentation/blocs/index.dart create mode 100644 lib/features/profile/presentation/index.dart create mode 100644 lib/features/profile/presentation/pages/index.dart create mode 100644 lib/features/profile/presentation/widgets/index.dart create mode 100644 lib/features/storage/application/index.dart rename lib/{shared/helpers/database/database_helper.dart => features/storage/application/service/database_service.dart} (86%) create mode 100644 lib/features/storage/application/service/index.dart create mode 100644 lib/features/storage/data/data_sources/database_storage_helper.dart create mode 100644 lib/features/storage/data/data_sources/index.dart rename lib/{shared/helpers/storage/secure_storage.dart => features/storage/data/data_sources/secure_storage_helper.dart} (85%) rename lib/{shared/helpers/storage/shared_preferences_storage.dart => features/storage/data/data_sources/shared_storage_helper.dart} (93%) create mode 100644 lib/features/storage/data/index.dart create mode 100644 lib/features/storage/data/models/database_storage.dart create mode 100644 lib/features/storage/data/models/index.dart create mode 100644 lib/features/storage/data/models/secure_storage.dart create mode 100644 lib/features/storage/data/models/shared_storage.dart create mode 100644 lib/features/storage/data/models/storage.dart create mode 100644 lib/features/storage/data/repositories/index.dart rename lib/{shared/helpers/storage/storage_helper.dart => features/storage/data/repositories/storage_repository.dart} (80%) create mode 100644 lib/features/storage/domain/entities/base_storage.dart create mode 100644 lib/features/storage/domain/entities/database_storage.dart create mode 100644 lib/features/storage/domain/entities/index.dart create mode 100644 lib/features/storage/domain/entities/secure_storage.dart create mode 100644 lib/features/storage/domain/entities/shared_storage.dart create mode 100644 lib/features/storage/domain/entities/storage.dart create mode 100644 lib/features/storage/domain/index.dart create mode 100644 lib/features/storage/domain/respositories/index.dart create mode 100644 lib/features/storage/domain/usecases/index.dart create mode 100644 lib/features/storage/index.dart create mode 100644 lib/flutter_flow/index.dart create mode 100644 lib/flutter_flow/nav/index.dart delete mode 100644 lib/shared/components/molecules/locals/data/data_sources/locals_local_data_source.dart delete mode 100644 lib/shared/components/molecules/locals/presentation/widgets/local_profile/local_profile_widget.dart delete mode 100644 lib/shared/components/molecules/menu/domain/respositories/menu_repository.dart create mode 100644 lib/shared/enums/index.dart create mode 100644 lib/shared/extensions/index.dart create mode 100644 lib/shared/helpers/index.dart delete mode 100644 lib/shared/helpers/storage/base_storage.dart create mode 100644 lib/shared/mixins/index.dart create mode 100644 lib/shared/services/index.dart create mode 100644 lib/shared/utils/index.dart delete mode 100644 test/widget_test.dart diff --git a/integration_test/app_test.dart b/integration_test/app_test.dart deleted file mode 100644 index 28e5df89..00000000 --- a/integration_test/app_test.dart +++ /dev/null @@ -1,209 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:hub/flutter_flow/random_data_util.dart'; -import 'package:hub/initialization.dart'; -import 'package:hub/main.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; -import 'package:integration_test/integration_test.dart'; - -late WidgetTester widget; - -void main() { - IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - - group( - 'Initialization', - () { - group('Navigation', () { - setUpAll(() async => await initializeApp().then((_) async => await StorageHelper().set(SecureStorageKey.isLogged.value, 'false'))); - testWidgets('Test Welcome', (WidgetTester tester) async { - widget = tester; - await _testWelcome(); - }); - }); - - group('Terms of Use', () { - // Add tests for Terms of Use here - }); - }, - ); - - group('Authentication', () { - group('Sign in', () { - setUpAll(() async => await initializeApp().then((_) async => await StorageHelper().set(SecureStorageKey.isLogged.value, 'false'))); - testWidgets('Test Sign In', (WidgetTester tester) async { - widget = tester; - await _testSignIn(); - }); - }); - group('Sign up', () { - setUpAll(() async => await initializeApp().then((_) async => await StorageHelper().set(SecureStorageKey.isLogged.value, 'false'))); - testWidgets('Test Sign Up', (WidgetTester tester) async { - widget = tester; - await _testSignUp(); - }); - }); - group('Sign Out', () { - // Add tests for Sign Out here - }); - group('Forgot Password', () { - // setUpAll(() async => await initializeApp().then((_) => StorageUtil().isLogged = false)); - // testWidgets('Test Forgot Password', (WidgetTester tester) async { - // widget = tester; - // await _testForgotPassword(); - // }); - }); - }); - group('Localization', () { - // Add tests for Localization here - }); - group('Networking', () { - // Add tests for Networking here - }); - group('Functionality', () { - // Add tests for Functionality here - }); - group('Usability', () { - // Add tests for Usability here - }); - group('Performance', () { - // Add tests for Performance here - }); - group('Security', () { - // Add tests for Security here - }); - group('Accessibility', () { - // Add tests for Accessibility here - }); - group('Compatibility', () { - // Add tests for Compatibility here - }); - group('Internationalization', () { - // Add tests for Internationalization here - }); -} - -Future _testWelcome() async { - await widget.pumpWidget(const App()); - await widget.pumpAndSettle(); - await _navigateToSignIn(); - await _navigateToSignUp(); - await widget.pumpAndSettle(); - await widget.pumpWidget(const App()); - await widget.pumpAndSettle(); - await _navigateToSignUp(); - await _navigateToSignIn(); - await widget.pumpAndSettle(); -} - -Future _testSignIn() async { - await widget.pumpWidget(const App()); - await _navigateToSignIn(); - await _auth({'emailTextFormField': 'erro@exemplo.com', 'passwordTextFormField': '12345678'}); - await _auth({'emailTextFormField': 'email_app@exemplo.com', 'passwordTextFormField': '12345678'}); -} - -Future _testSignUp() async { - await widget.pumpWidget(const App()); - await _navigateToSignUp(); - - var credentials = {'nameTextFormField': 'app', 'emailTextFormField': 'email_app@exemplo.com', 'passwordTextFormField': '12345678'}; - await _auth(credentials); - - var name = randomString(7, 7, true, true, true); - var email = '$name@example.com'; - var password = '12345678'; - credentials = {'nameTextFormField': name, 'emailTextFormField': email, 'passwordTextFormField': password}; - await _navigateToSignUp(); - await _auth(credentials); - credentials = {'emailTextFormField': email, 'passwordTextFormField': password}; - await _auth(credentials); -} - -Future _testForgotPassword() async { - await widget.pumpWidget(const App()); - await _navigateToSignIn(); - await _recoveryPassword(); - - var addr = randomString(5, 5, true, true, true); - var credentials = {'recoveryTextFormField': '$addr@exemple.com'}; - await _send(credentials); - - await Future.delayed(const Duration(seconds: 2)); - - await _recoveryPassword(); - credentials = {'recoveryTextFormField': 'email_app@exemple.com'}; - await _send(credentials); -} - -Future _recoveryPassword() async { - await widget.pumpAndSettle(); - final Finder forgotPassword = find.byKey(const ValueKey('ForgotPassword')); - if (forgotPassword.evaluate().isNotEmpty) await widget.tap(forgotPassword); - await widget.ensureVisible(forgotPassword); - await widget.pumpAndSettle(); -} - -Future _navigateBackUsingSystemGesture() async => IntegrationTestWidgetsFlutterBinding.instance.keyboard.isLogicalKeyPressed(LogicalKeyboardKey.escape); -Future _navigateToSignUp() async { - await widget.pumpAndSettle(); - final Finder navToSignUp = find.byKey(const ValueKey('toggleSignUpPage')); - if (navToSignUp.evaluate().isNotEmpty) { - await widget.tap(navToSignUp); - await widget.pumpAndSettle(); - } -} - -Future _navigateToSignIn() async { - await widget.pumpAndSettle(); - final Finder navToSignIn = find.byKey(const ValueKey('toggleSignInPage')); - expect(navToSignIn, findsOneWidget); - if (navToSignIn.evaluate().isNotEmpty) { - await widget.tap(navToSignIn); - await widget.pumpAndSettle(); - } -} - -Future _auth(Map credentials) async { - await _enterCredentials(credentials); - await _submit('SubmitButtonWidget'); -} - -Future _send(Map credentials) async { - await _enterCredentials(credentials); - await _submit('SendButtonWidget'); -} - -Future _enterCredentials(Map credentials) async { - await widget.pumpAndSettle(); - for (var entry in credentials.entries) { - final Finder field = find.byKey(ValueKey(entry.key)); - await widget.pumpAndSettle(); - expect(field, findsOneWidget); - await widget.enterText(field, entry.value); - await widget.pumpAndSettle(); - } - await widget.pumpAndSettle(); -} - -Future _submit(String key) async { - await widget.pumpAndSettle(); - final Finder submitButton = find.byKey(ValueKey(key)); - await widget.pumpAndSettle(); - if (submitButton.evaluate().isNotEmpty) { - await widget.tap(submitButton); - await widget.pumpAndSettle(); - } - - final Finder throwExceptionWidget = find.byKey(const ValueKey('ThrowExceptionWidget')); - await widget.pumpAndSettle(); - if (throwExceptionWidget.evaluate().isNotEmpty) { - await widget.ensureVisible(throwExceptionWidget); - await widget.tap(throwExceptionWidget); - await widget.pumpAndSettle(); - } else { - await _navigateBackUsingSystemGesture(); - } -} diff --git a/integration_test/features/provisional_history_test.dart b/integration_test/features/provisional_history_test.dart deleted file mode 100644 index a95362d5..00000000 --- a/integration_test/features/provisional_history_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart'; -import 'package:hub/initialization.dart'; -import 'package:hub/main.dart' as app; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; -import 'package:integration_test/integration_test.dart'; - -void main() { - IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - - group('ProvisionalHistoryPage Integration Test', () { - setUpAll(() async => await initializeApp().then((_) async { - await StorageHelper().set(SecureStorageKey.isLogged.value, 'true'); - await StorageHelper().set(SecureStorageKey.haveLocal.value, 'true'); - await StorageHelper().set(KeychainStorageKey.devUUID.value, 'b5c3818753e76d85'); - await StorageHelper().set(KeychainStorageKey.userUUID.value, '649c45d7514a28.85876308'); - await StorageHelper().set(KeychainStorageKey.clientUUID.value, '7'); - })); - - testWidgets('Filter Provisional History', (WidgetTester tester) async { - app.main(); - await tester.pumpAndSettle(); - - final Finder menuButton = find.byIcon(Icons.person_search_outlined); - await tester.tap(menuButton); - await tester.pumpAndSettle(); - - final Finder filterButton = find.byIcon(Icons.filter_list); - await tester.tap(filterButton); - await tester.pumpAndSettle(); - - final Finder activeFilterOption = find.text('Active'); - await tester.tap(activeFilterOption); - await tester.pumpAndSettle(); - - final Finder applyFilterButton = find.text('Apply'); - await tester.tap(applyFilterButton); - await tester.pumpAndSettle(); - - expect(find.byType(CardItemTemplateComponentWidget), findsWidgets); - }); - }); -} diff --git a/lib/backend/schema/structs/index.dart b/lib/backend/schema/structs/index.dart deleted file mode 100644 index 4affa264..00000000 --- a/lib/backend/schema/structs/index.dart +++ /dev/null @@ -1,3 +0,0 @@ -export '/backend/schema/util/schema_util.dart'; - -export 'device_struct.dart'; diff --git a/lib/shared/components/molecules/locals/data/models/index.dart b/lib/components/_template_/bloc/bloc.dart similarity index 100% rename from lib/shared/components/molecules/locals/data/models/index.dart rename to lib/components/_template_/bloc/bloc.dart diff --git a/lib/shared/components/molecules/locals/domain/entities/index.dart b/lib/components/_template_/bloc/event.dart similarity index 100% rename from lib/shared/components/molecules/locals/domain/entities/index.dart rename to lib/components/_template_/bloc/event.dart diff --git a/lib/shared/components/molecules/locals/domain/usecases/index.dart b/lib/components/_template_/bloc/index.dart similarity index 100% rename from lib/shared/components/molecules/locals/domain/usecases/index.dart rename to lib/components/_template_/bloc/index.dart diff --git a/lib/shared/components/molecules/menu/data/models/index.dart b/lib/components/_template_/bloc/state.dart similarity index 100% rename from lib/shared/components/molecules/menu/data/models/index.dart rename to lib/components/_template_/bloc/state.dart diff --git a/lib/shared/components/molecules/menu/domain/respositories/index.dart b/lib/components/_template_/index.dart similarity index 100% rename from lib/shared/components/molecules/menu/domain/respositories/index.dart rename to lib/components/_template_/index.dart diff --git a/lib/shared/components/molecules/menu/domain/usecases/index.dart b/lib/components/_template_/view_model/index.dart similarity index 100% rename from lib/shared/components/molecules/menu/domain/usecases/index.dart rename to lib/components/_template_/view_model/index.dart diff --git a/lib/shared/components/molecules/modules/domain/usecases/index.dart b/lib/components/_template_/view_model/view_model.dart similarity index 100% rename from lib/shared/components/molecules/modules/domain/usecases/index.dart rename to lib/components/_template_/view_model/view_model.dart diff --git a/lib/shared/components/molecules/modules/presentation/blocs/index.dart b/lib/components/_template_/widgets/index.dart similarity index 100% rename from lib/shared/components/molecules/modules/presentation/blocs/index.dart rename to lib/components/_template_/widgets/index.dart diff --git a/lib/shared/components/molecules/modules/presentation/widgets/index.dart b/lib/components/_template_/widgets/screen.dart similarity index 100% rename from lib/shared/components/molecules/modules/presentation/widgets/index.dart rename to lib/components/_template_/widgets/screen.dart diff --git a/lib/shared/components/templates/history/history_page_template.dart b/lib/components/_template_/widgets/widget.dart similarity index 100% rename from lib/shared/components/templates/history/history_page_template.dart rename to lib/components/_template_/widgets/widget.dart diff --git a/lib/shared/components/atoms/image_cropper/image_cropper.dart b/lib/components/atomic_components/image_cropper/image_cropper.dart similarity index 100% rename from lib/shared/components/atoms/image_cropper/image_cropper.dart rename to lib/components/atomic_components/image_cropper/image_cropper.dart diff --git a/lib/shared/components/atoms/term_of_use/atom_terms_of_use.dart b/lib/components/atomic_components/term_of_use/atom_terms_of_use.dart similarity index 100% rename from lib/shared/components/atoms/term_of_use/atom_terms_of_use.dart rename to lib/components/atomic_components/term_of_use/atom_terms_of_use.dart diff --git a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart index 58be572b..69222d34 100644 --- a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart +++ b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart @@ -1,16 +1,15 @@ import 'package:flutter/material.dart'; import 'package:hub/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_model.dart'; import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart'; +import 'package:hub/features/backend/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; + import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; -import '../../../shared/services/authentication/authentication_service.dart'; -import '/backend/api_requests/api_calls.dart'; import '/flutter_flow/flutter_flow_theme.dart'; class BottomArrowLinkedLocalsComponentWidget extends StatefulWidget { @@ -105,10 +104,10 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State _fetchResponseLink(String status, String cliID) async { try { - await StorageHelper().set(KeychainStorageKey.clientUUID.value, cliID); + await StorageHelper().set(ProfileStorageKey.clientUUID.key, cliID); var response = await PhpGroup.resopndeVinculo.call(tarefa: status); if (response.jsonBody['error'] == false) { - return { - 'error': false, - 'error_msg': FFLocalizations.of(context) - .getVariableText(ptText: "Vínculo Ativado com Sucesso", enText: "Link Activated Successfully") - }; + return {'error': false, 'error_msg': FFLocalizations.of(context).getVariableText(ptText: "Vínculo Ativado com Sucesso", enText: "Link Activated Successfully")}; } else { - await StorageHelper().set(KeychainStorageKey.clientUUID.value, ''); + await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); return response.jsonBody; } } catch (e, s) { @@ -156,9 +151,8 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State _labelsHashMap(dynamic local) { - return Map.from({ - '${local['CLI_PREFIXO']}:': local['CLI_NOME'], - '${FFLocalizations.of(context).getVariableText(ptText: 'Propriedade', enText: 'Property')}:': - local['CLU_OWNER_DSC'] - }); + return Map.from( + {'${local['CLI_PREFIXO']}:': local['CLI_NOME'], '${FFLocalizations.of(context).getVariableText(ptText: 'Propriedade', enText: 'Property')}:': local['CLU_OWNER_DSC']}); } Map _statusHashMap(dynamic local) { return Map.from({ if (local['CLU_STATUS'] == 'A') - FFLocalizations.of(context).getVariableText(ptText: 'Ativo', enText: 'Active'): - FlutterFlowTheme.of(context).success + FFLocalizations.of(context).getVariableText(ptText: 'Ativo', enText: 'Active'): FlutterFlowTheme.of(context).success else if (local['CLU_STATUS'] == 'B') - FFLocalizations.of(context).getVariableText(ptText: 'Bloqueado', enText: 'Blocked'): - FlutterFlowTheme.of(context).error + FFLocalizations.of(context).getVariableText(ptText: 'Bloqueado', enText: 'Blocked'): FlutterFlowTheme.of(context).error else - FFLocalizations.of(context).getVariableText(ptText: 'Pendente', enText: 'Pending'): - FlutterFlowTheme.of(context).warning + FFLocalizations.of(context).getVariableText(ptText: 'Pendente', enText: 'Pending'): FlutterFlowTheme.of(context).warning }); } @@ -196,10 +184,10 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State initDB() async { - devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } @override diff --git a/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart b/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart index 29f8f48d..508e10d6 100644 --- a/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart +++ b/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart @@ -1,8 +1,8 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; import 'package:hub/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart'; +import 'package:hub/features/backend/index.dart'; import 'package:hub/flutter_flow/custom_functions.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; @@ -199,15 +199,13 @@ class _ScheduleVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), hintStyle: FlutterFlowTheme.of(context).labelMedium.override( fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -241,8 +239,7 @@ class _ScheduleVisitDetailWidgetState extends State { style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), ), validator: _model.textController1Validator.asValidator(context), ), @@ -273,8 +270,7 @@ class _ScheduleVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), hintText: FFLocalizations.of(context).getText( '0cp1e31d' /* dd/mm/yyyy */, @@ -283,8 +279,7 @@ class _ScheduleVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -319,8 +314,7 @@ class _ScheduleVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, fontSize: 12, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), ), textAlign: TextAlign.center, validator: _model.textController2Validator.asValidator(context), @@ -345,8 +339,7 @@ class _ScheduleVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), hintText: FFLocalizations.of(context).getText( 'kqralft4' /* dd/mm/yyyy */, @@ -355,8 +348,7 @@ class _ScheduleVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -391,8 +383,7 @@ class _ScheduleVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, fontSize: 12, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), ), textAlign: TextAlign.center, validator: _model.textController3Validator.asValidator(context), @@ -426,8 +417,7 @@ class _ScheduleVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), hintText: FFLocalizations.of(context).getText( '47oezdm6' /* Motivo */, @@ -436,8 +426,7 @@ class _ScheduleVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -471,8 +460,7 @@ class _ScheduleVisitDetailWidgetState extends State { style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), ), textAlign: TextAlign.center, validator: _model.textController4Validator.asValidator(context), @@ -497,8 +485,7 @@ class _ScheduleVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), hintText: FFLocalizations.of(context).getText( '3emmbbfv' /* Nível de Acesso */, @@ -507,8 +494,7 @@ class _ScheduleVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -542,8 +528,7 @@ class _ScheduleVisitDetailWidgetState extends State { style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), ), textAlign: TextAlign.center, validator: _model.textController5Validator.asValidator(context), @@ -572,15 +557,13 @@ class _ScheduleVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), hintStyle: FlutterFlowTheme.of(context).labelMedium.override( fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -614,8 +597,7 @@ class _ScheduleVisitDetailWidgetState extends State { style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), ), validator: _model.textController6Validator.asValidator(context), ), diff --git a/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart index 87665faa..b07f502c 100644 --- a/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart +++ b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart @@ -1,8 +1,7 @@ import 'package:flutter/material.dart'; import 'package:hub/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_model.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; class UpArrowLinkedLocalsComponentModel extends FlutterFlowModel { late final String devUUID; @@ -16,10 +15,10 @@ class UpArrowLinkedLocalsComponentModel extends FlutterFlowModel initDB() async { - devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; - cliName = (await StorageHelper().get(KeychainStorageKey.clientName.value)) ?? ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + cliName = (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; } @override diff --git a/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart index d371a85b..2cadee92 100644 --- a/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart +++ b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart @@ -2,8 +2,8 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; import 'package:hub/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart'; +import 'package:hub/features/backend/index.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; @@ -166,8 +166,7 @@ class _UpArrowLinkedLocalsComponentWidgetState extends State { +class AccessNotificationModalTemplateComponentModel extends FlutterFlowModel { late final String devUUID; late final String userUUID; late final String cliUUID; @@ -32,9 +30,9 @@ class AccessNotificationModalTemplateComponentModel } Future initDB() async { - devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } @override diff --git a/lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart b/lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart index e361442d..872d04e7 100644 --- a/lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart +++ b/lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart @@ -2,9 +2,8 @@ import 'package:easy_debounce/easy_debounce.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:google_fonts/google_fonts.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; @@ -148,8 +147,7 @@ class _PassKeyTemplateWidgetState extends State { Padding( padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0), child: Text( - FFLocalizations.of(context).getVariableText( - enText: 'Enter your password to continue', ptText: 'Digite sua senha para continuar'), + FFLocalizations.of(context).getVariableText(enText: 'Enter your password to continue', ptText: 'Digite sua senha para continuar'), style: FlutterFlowTheme.of(context).labelMedium.override( fontFamily: 'Plus Jakarta Sans', color: FlutterFlowTheme.of(context).primaryText, @@ -246,9 +244,7 @@ class _PassKeyTemplateWidgetState extends State { ), focusNode: FocusNode(skipTraversal: true), child: Icon( - _model.keyTextFieldVisibility1 - ? Icons.visibility_outlined - : Icons.visibility_off_outlined, + _model.keyTextFieldVisibility1 ? Icons.visibility_outlined : Icons.visibility_off_outlined, color: FlutterFlowTheme.of(context).accent1, size: 22.0, ), @@ -288,9 +284,7 @@ class _PassKeyTemplateWidgetState extends State { return; } await widget.toggleActionStatus?.call( - _model.keyTextFieldTextController1.text.isEmpty - ? _model.keyTextFieldTextController2.text - : _model.keyTextFieldTextController1.text, + _model.keyTextFieldTextController1.text.isEmpty ? _model.keyTextFieldTextController2.text : _model.keyTextFieldTextController1.text, ); // Navigator.pop(context, true); context.pop(true); diff --git a/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_model.dart b/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_model.dart index aff803ff..17bb87d4 100644 --- a/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_model.dart +++ b/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_model.dart @@ -1,6 +1,6 @@ +import 'package:hub/features/backend/index.dart'; import 'package:hub/shared/utils/validator_util.dart'; -import '/backend/api_requests/api_calls.dart'; import '/flutter_flow/flutter_flow_util.dart'; import 'forgot_password_template_component_widget.dart' show ForgotPasswordTemplateComponentWidget; import 'package:flutter/material.dart'; diff --git a/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart b/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart index 9feeeed9..ce4e0d6e 100644 --- a/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart +++ b/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart @@ -1,8 +1,8 @@ import 'package:easy_debounce/easy_debounce.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; +import 'package:hub/features/authentication/index.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/shared/services/authentication/authentication_service.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/validator_util.dart'; @@ -237,8 +237,7 @@ class _ForgotPasswordTemplateComponentWidgetState extends State('SendButtonWidget'), - onPressed: (_model.emailAddressTextController.text == '' || - !ValidatorUtil.isValidEmail(_model.emailAddressTextController.text)) + onPressed: (_model.emailAddressTextController.text == '' || !ValidatorUtil.isValidEmail(_model.emailAddressTextController.text)) ? null : () async => await AuthenticationService.forgotPassword( context, diff --git a/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_model.dart b/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_model.dart index 4a9c55bb..de73c3d2 100644 --- a/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_model.dart +++ b/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_model.dart @@ -1,11 +1,9 @@ import 'package:flutter/material.dart'; import 'package:hub/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_widget.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_model.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; -class LiberationHistoryItemDetailsTemplateComponentModel - extends FlutterFlowModel { +class LiberationHistoryItemDetailsTemplateComponentModel extends FlutterFlowModel { late final String devUUID; late final String userUUID; late final String cliUUID; @@ -27,9 +25,9 @@ class LiberationHistoryItemDetailsTemplateComponentModel void initState(BuildContext context) {} Future initDatabase() async { - devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; ; } diff --git a/lib/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart b/lib/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart index 95937bac..9c75170a 100644 --- a/lib/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart +++ b/lib/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart @@ -1,11 +1,10 @@ import 'dart:developer'; import 'package:flutter/material.dart'; -import 'package:hub/backend/api_requests/api_manager.dart'; import 'package:hub/components/templates_components/provisional_schedule_template/provisional_shcedule_template_widget.dart'; +import 'package:hub/features/backend/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; class ScheduleProvisionalVisitPageModel extends FlutterFlowModel { String cliUUID = ''; @@ -88,8 +87,7 @@ class ScheduleProvisionalVisitPageModel extends FlutterFlowModel init() async { - devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; - ownerName = (await StorageHelper().get(KeychainStorageKey.ownerName.value)) ?? ''; - ownerUUID = (await StorageHelper().get(KeychainStorageKey.ownerUUID.value)) ?? ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + ownerName = (await StorageHelper().get(ProfileStorageKey.ownerName.key)) ?? ''; + ownerUUID = (await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? ''; setState?.call(); } } diff --git a/lib/components/templates_components/provisional_schedule_template/provisional_shcedule_template_widget.dart b/lib/components/templates_components/provisional_schedule_template/provisional_shcedule_template_widget.dart index debd346b..46c14402 100644 --- a/lib/components/templates_components/provisional_schedule_template/provisional_shcedule_template_widget.dart +++ b/lib/components/templates_components/provisional_schedule_template/provisional_shcedule_template_widget.dart @@ -4,11 +4,11 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:hub/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart'; +import 'package:hub/features/backend/index.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; -import '/backend/api_requests/api_calls.dart'; import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; @@ -75,8 +75,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State initializeDatabase() async { - devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; ; } diff --git a/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart b/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart index b1c7d7ad..992e1b10 100644 --- a/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart +++ b/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart @@ -3,13 +3,13 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:hub/components/atomic_components/shared_components_atoms/media_upload_button.dart'; +import 'package:hub/features/backend/index.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/image_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/validator_util.dart'; import 'package:rxdart/rxdart.dart'; -import '/backend/api_requests/api_calls.dart'; import '/flutter_flow/flutter_flow_drop_down.dart'; import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; @@ -103,9 +103,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State { } Future initializeDatabase() async { - devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; ; } diff --git a/lib/components/templates_components/view_visit_detail/view_visit_detail_widget.dart b/lib/components/templates_components/view_visit_detail/view_visit_detail_widget.dart index ead69613..f8149467 100644 --- a/lib/components/templates_components/view_visit_detail/view_visit_detail_widget.dart +++ b/lib/components/templates_components/view_visit_detail/view_visit_detail_widget.dart @@ -1,11 +1,11 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; +import 'package:hub/features/backend/index.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:share_plus/share_plus.dart'; -import '/backend/api_requests/api_calls.dart'; import '/flutter_flow/flutter_flow_icon_button.dart'; import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; @@ -85,8 +85,7 @@ class _ViewVisitDetailWidgetState extends State { // } // }); - _model.textController1 = - TextEditingController(text: widget.visitTempStr == 'null' ? '' : widget.visitTempStr ?? ''); + _model.textController1 = TextEditingController(text: widget.visitTempStr == 'null' ? '' : widget.visitTempStr ?? ''); _model.textFieldFocusNode1 ??= FocusNode(); _model.textController2 ??= TextEditingController(text: widget.visitStartDate); @@ -257,15 +256,13 @@ class _ViewVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), hintStyle: FlutterFlowTheme.of(context).labelMedium.override( fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -299,8 +296,7 @@ class _ViewVisitDetailWidgetState extends State { style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), ), validator: _model.textController1Validator.asValidator(context), ), @@ -332,8 +328,7 @@ class _ViewVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), hintText: FFLocalizations.of(context).getText( 'ub084nhy' /* dd/mm/yyyy */, @@ -342,8 +337,7 @@ class _ViewVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -377,8 +371,7 @@ class _ViewVisitDetailWidgetState extends State { style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), ), textAlign: TextAlign.center, validator: _model.textController2Validator.asValidator(context), @@ -405,8 +398,7 @@ class _ViewVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), hintText: FFLocalizations.of(context).getText( 'ixs67mrz' /* dd/mm/yyyy */, @@ -415,8 +407,7 @@ class _ViewVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -450,8 +441,7 @@ class _ViewVisitDetailWidgetState extends State { style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), ), textAlign: TextAlign.center, validator: _model.textController3Validator.asValidator(context), @@ -487,8 +477,7 @@ class _ViewVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), hintText: FFLocalizations.of(context).getText( 'ypeydbem' /* Motivo */, @@ -497,8 +486,7 @@ class _ViewVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -532,8 +520,7 @@ class _ViewVisitDetailWidgetState extends State { style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), ), textAlign: TextAlign.center, validator: _model.textController4Validator.asValidator(context), @@ -560,8 +547,7 @@ class _ViewVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), hintText: FFLocalizations.of(context).getText( 'rs3d4gb8' /* Nível de Acesso */, @@ -570,8 +556,7 @@ class _ViewVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -605,8 +590,7 @@ class _ViewVisitDetailWidgetState extends State { style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), ), textAlign: TextAlign.center, validator: _model.textController5Validator.asValidator(context), @@ -637,15 +621,13 @@ class _ViewVisitDetailWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), hintStyle: FlutterFlowTheme.of(context).labelMedium.override( fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -679,8 +661,7 @@ class _ViewVisitDetailWidgetState extends State { style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), ), validator: _model.textController6Validator.asValidator(context), ), @@ -754,10 +735,7 @@ class _ViewVisitDetailWidgetState extends State { ), ], ); - } else if ((widget.visitStatusStr == 'C') || - (widget.visitStatusStr == 'F') || - (widget.visitStatusStr == 'B') || - (widget.visitStatusStr == 'I')) { + } else if ((widget.visitStatusStr == 'C') || (widget.visitStatusStr == 'F') || (widget.visitStatusStr == 'B') || (widget.visitStatusStr == 'I')) { return InkWell( splashColor: Colors.transparent, focusColor: Colors.transparent, diff --git a/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart b/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart index e71a2c86..b6301fee 100644 --- a/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart +++ b/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart @@ -1,9 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hub/backend/api_requests/api_manager.dart'; import 'package:hub/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart'; +import 'package:hub/features/backend/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_model.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; class VisitorSearchModalTemplateComponentModel extends FlutterFlowModel { late final String devUUID; @@ -35,9 +34,9 @@ class VisitorSearchModalTemplateComponentModel extends FlutterFlowModel initDatabase() async { - devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; ; } diff --git a/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart b/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart index 6c3ea0f2..6ceaf2c1 100644 --- a/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart +++ b/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart @@ -1,14 +1,12 @@ -import 'dart:developer'; - import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; import 'package:hub/components/atomic_components/shared_components_atoms/toast.dart'; import 'package:hub/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart'; import 'package:hub/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart'; +import 'package:hub/features/backend/index.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; @@ -30,8 +28,7 @@ class VisitorSearchModalTemplateComponentWidget extends StatefulWidget { State createState() => _VisitorSearchModalTemplateComponentWidgetState(); } -class _VisitorSearchModalTemplateComponentWidgetState extends State - with TickerProviderStateMixin { +class _VisitorSearchModalTemplateComponentWidgetState extends State with TickerProviderStateMixin { late VisitorSearchModalTemplateComponentModel _model; safeSetState(VoidCallback callback) { @@ -106,34 +103,22 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State login(BuildContext context) async { @@ -74,7 +67,7 @@ class AuthenticationService { if ((email != '') && (passwd != '')) { await StorageHelper().set(SecureStorageKey.email.value, email); await StorageHelper().set(SecureStorageKey.password.value, passwd); - await StorageHelper().set(KeychainStorageKey.devUUID.value, devUUID!); + await StorageHelper().set(ProfileStorageKey.devUUID.key, devUUID!); response = await callback.call(); if (response.jsonBody['error'] == false) { @@ -83,10 +76,10 @@ class AuthenticationService { userDevUUID = response.jsonBody['user']['dev_id']; userName = response.jsonBody['user']['name']; - await StorageHelper().set(KeychainStorageKey.userUUID.value, userUUID); - await StorageHelper().set(KeychainStorageKey.userDevUUID.value, userDevUUID); - await StorageHelper().set(KeychainStorageKey.status.value, status); - await StorageHelper().set(KeychainStorageKey.userName.value, userName); + await StorageHelper().set(ProfileStorageKey.userUUID.key, userUUID); + await StorageHelper().set(ProfileStorageKey.userDevUUID.key, userDevUUID); + await StorageHelper().set(ProfileStorageKey.status.key, status); + await StorageHelper().set(ProfileStorageKey.userName.key, userName); await login(context); } else { @@ -113,9 +106,7 @@ class AuthenticationService { }) async { try { ApiCallResponse? response; - if ((email != null && email != '') && - (passwd != null && passwd != '' && passwd.length > 7) && - (name != null && name != '')) { + if ((email != null && email != '') && (passwd != null && passwd != '' && passwd.length > 7) && (name != null && name != '')) { response = await PhpGroup.registerCall.call( name: name, password: passwd, @@ -153,7 +144,7 @@ class AuthenticationService { await StorageHelper().clean(Storage.databaseStorage); await StorageHelper().clean(Storage.secureStorage); await LicenseRepositoryImpl().cleanLicense(); - DatabaseStorage.isInitialized = false; + DatabaseService.isInitialized = false; await StorageHelper().init(); context.go('/welcomePage', extra: extra); @@ -163,8 +154,7 @@ class AuthenticationService { try { final ApiCallResponse? response; final ForgotPasswordCall callback = PhpGroup.forgotPasswordCall; - final String message = FFLocalizations.of(context) - .getVariableText(enText: "Send E-mail Successful!", ptText: "E-mail Enviado com Sucesso!"); + final String message = FFLocalizations.of(context).getVariableText(enText: "Send E-mail Successful!", ptText: "E-mail Enviado com Sucesso!"); response = await callback.call(email: email); @@ -184,8 +174,7 @@ class AuthenticationService { static Future changePassword(BuildContext context, String email, String password, String token) async { try { - final ApiCallResponse response = - await PhpGroup.changePasswordCall.call(email: email, psswd: password, token: token); + final ApiCallResponse response = await PhpGroup.changePasswordCall.call(email: email, psswd: password, token: token); if (response.jsonBody['error'] == false) { final String message = FFLocalizations.of(context).getVariableText( @@ -216,7 +205,6 @@ class AuthenticationService { ptText: 'Conta deletada com sucesso', ); return await signOut(context); - } }).catchError((err) { context.pop(); @@ -224,8 +212,8 @@ class AuthenticationService { enText: 'Error deleting account', ptText: 'Erro ao deletar conta', ); - SnackBarUtil.showSnackBar(context, content); - return; + SnackBarUtil.showSnackBar(context, content); + return; }); } catch (err) { context.pop(); diff --git a/lib/features/authentication/index.dart b/lib/features/authentication/index.dart new file mode 100644 index 00000000..c2aa7540 --- /dev/null +++ b/lib/features/authentication/index.dart @@ -0,0 +1 @@ +export 'authentication_service.dart'; diff --git a/lib/backend/api_requests/api_calls.dart b/lib/features/backend/api_requests/api_calls.dart similarity index 86% rename from lib/backend/api_requests/api_calls.dart rename to lib/features/backend/api_requests/api_calls.dart index 06f7bf5b..70f1aee6 100644 --- a/lib/backend/api_requests/api_calls.dart +++ b/lib/features/backend/api_requests/api_calls.dart @@ -3,9 +3,9 @@ import 'dart:convert'; import 'dart:developer'; import 'package:flutter/foundation.dart'; -import 'package:hub/backend/notifications/firebase_messaging_service.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; +import 'package:hub/features/notifications/index.dart'; +import 'package:hub/features/storage/index.dart'; + import 'package:hub/shared/utils/log_util.dart'; import 'package:hub/shared/utils/validator_util.dart'; @@ -65,9 +65,9 @@ class PhpGroup { class GetProvSchedules { Future call(final String page, final String status) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getAgendamentoProv'; const String pageSize = '10'; final bool isFiltered = status != '' && status != '.*'; @@ -100,9 +100,9 @@ class GetProvSchedules { class GetOpenedVisits { Future call(final String page) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getOpenedVisits'; const String pageSize = '10'; return await ApiManager.instance.makeApiCall( @@ -132,9 +132,9 @@ class GetOpenedVisits { class GetResidentsByProperty { Future call(final String page) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = await StorageHelper().get(KeychainStorageKey.devUUID.value) ?? ''; - final String userUUID = await StorageHelper().get(KeychainStorageKey.userUUID.value) ?? ''; - final String cliID = await StorageHelper().get(KeychainStorageKey.clientUUID.value) ?? ''; + final String devUUID = await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? ''; + final String userUUID = await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? ''; + final String cliID = await StorageHelper().get(ProfileStorageKey.clientUUID.key) ?? ''; const String atividade = 'getResidentsByProperty'; const String pageSize = '10'; return await ApiManager.instance.makeApiCall( @@ -163,9 +163,9 @@ class GetResidentsByProperty { class GetVehiclesByProperty { Future call(final String page) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getVehiclesByProperty'; const String pageSize = '10'; return await ApiManager.instance.makeApiCall( @@ -196,9 +196,9 @@ class GetVehiclesByProperty { class GetLicense { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; return await ApiManager.instance.makeApiCall( callName: 'getLicense', @@ -227,8 +227,8 @@ class GetLicense { class UnregisterDevice { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; return await ApiManager.instance.makeApiCall( callName: 'unregisterDevice', @@ -255,9 +255,9 @@ class UnregisterDevice { class DeletePet { Future call({final int? petID = 0}) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'excluirPet'; return await ApiManager.instance.makeApiCall( @@ -300,9 +300,9 @@ class UpdatePet { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'atualizarPet'; return await ApiManager.instance.makeApiCall( @@ -346,9 +346,9 @@ class GetPets { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'consultaPets'; return await ApiManager.instance.makeApiCall( @@ -380,9 +380,9 @@ class GetPetPhoto { Future call({final int? petId}) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'consultaFotoPet'; return await ApiManager.instance.makeApiCall( @@ -423,9 +423,9 @@ class RegisterPet { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'cadastrarPet'; return await ApiManager.instance.makeApiCall( @@ -468,9 +468,9 @@ class BuscaEnconcomendas { final String? adresseeType, final String? status, }) async { - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getEncomendas'; final String baseUrl = PhpGroup.getBaseUrl(); @@ -512,9 +512,9 @@ class CancelaVisita { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'cancelaVisita'; return await ApiManager.instance.makeApiCall( @@ -546,8 +546,8 @@ class CancelaVisita { class DeleteAccount { Future call() async { - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String baseUrl = PhpGroup.getBaseUrl(); return await ApiManager.instance.makeApiCall( @@ -578,9 +578,9 @@ class ChangePanic { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'updVisitado'; return await ApiManager.instance.makeApiCall( @@ -614,9 +614,9 @@ class ChangePass { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'updVisitado'; return await ApiManager.instance.makeApiCall( @@ -650,9 +650,9 @@ class RespondeVinculo { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; return await ApiManager.instance.makeApiCall( callName: 'respondeVinculo', @@ -684,9 +684,9 @@ class ChangeNotifica { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'updVisitado'; return await ApiManager.instance.makeApiCall( @@ -718,10 +718,10 @@ class UpdateIDE { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; - final String newIde = (await StorageHelper().get(KeychainStorageKey.userDevUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String newIde = (await StorageHelper().get(ProfileStorageKey.userDevUUID.key)) ?? ''; const String atividade = 'updVisitado'; return await ApiManager.instance.makeApiCall( @@ -753,8 +753,8 @@ class UpdToken { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String token = (await StorageHelper().get(SecureStorageKey.token.value)) ?? ''; return await ApiManager.instance.makeApiCall( @@ -782,7 +782,7 @@ class UpdToken { class LoginCall { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String email = (await StorageHelper().get(SecureStorageKey.email.value)) ?? ''; final String password = (await StorageHelper().get(SecureStorageKey.password.value)) ?? ''; final String type = (await StorageHelper().get(SecureStorageKey.deviceType.value)) ?? ''; @@ -869,9 +869,9 @@ class ChangePasswordCall { required final String psswd, }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; return await ApiManager.instance.makeApiCall( callName: 'changePassword', @@ -930,8 +930,8 @@ class GetLocalsCall { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = await StorageHelper().get(KeychainStorageKey.devUUID.value) ?? ''; - final String userUUID = await StorageHelper().get(KeychainStorageKey.userUUID.value) ?? ''; + final String devUUID = await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? ''; + final String userUUID = await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? ''; return await ApiManager.instance .makeApiCall( @@ -972,9 +972,9 @@ class PostScheduleVisitorCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'putVisitante'; return await ApiManager.instance.makeApiCall( @@ -1027,9 +1027,9 @@ class PostScheduleVisitCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'putVisita'; return await ApiManager.instance.makeApiCall( @@ -1081,9 +1081,9 @@ class GetScheduleVisitCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getVisitas'; return await ApiManager.instance.makeApiCall( @@ -1355,32 +1355,34 @@ class GetDadosCall { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getDados'; - return await ApiManager.instance.makeApiCall( - callName: 'getDados', - apiUrl: '$baseUrl/processRequest.php', - callType: ApiCallType.POST, - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - }, - params: { - 'devUUID': devUUID, - 'userUUID': userUUID, - 'cliID': cliUUID, - 'atividade': atividade, - }, - bodyType: BodyType.X_WWW_FORM_URL_ENCODED, - returnBody: true, - encodeBodyUtf8: false, - decodeUtf8: false, - cache: false, - isStreamingApi: false, - alwaysAllowBody: false, - ).timeout(const Duration(seconds: 30)); + return await ApiManager.instance + .makeApiCall( + callName: 'getDados', + apiUrl: '$baseUrl/processRequest.php', + callType: ApiCallType.POST, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + params: { + 'devUUID': devUUID, + 'userUUID': userUUID, + 'cliID': cliUUID, + 'atividade': atividade, + }, + bodyType: BodyType.X_WWW_FORM_URL_ENCODED, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + isStreamingApi: false, + alwaysAllowBody: false, + ) + .timeout(const Duration(seconds: 30)); } bool? errorBolean(dynamic response) => castToType(getJsonField( @@ -1588,9 +1590,9 @@ class GetVisitorByDocCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getVisitante'; return await ApiManager.instance.makeApiCall( @@ -1642,9 +1644,9 @@ class GetFotoVisitanteCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getFotoVisitante'; return await ApiManager.instance.makeApiCall( @@ -1681,9 +1683,9 @@ class PostProvVisitSchedulingCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'putAgendamentoProv'; return await ApiManager.instance.makeApiCall( @@ -1730,9 +1732,9 @@ class GetVisitsCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getVisitas'; return await ApiManager.instance.makeApiCall( @@ -1993,9 +1995,9 @@ class DeleteVisitCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'cancelaVisita'; return await ApiManager.instance.makeApiCall( @@ -2036,10 +2038,10 @@ class GetPessoasLocalCall { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String ownerUUID = (await StorageHelper().get(KeychainStorageKey.ownerUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String ownerUUID = (await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; return await ApiManager.instance.makeApiCall( callName: 'getPessoasLocal', @@ -2102,9 +2104,9 @@ class RespondeSolicitacaoCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'respondeSolicitacao'; return await ApiManager.instance.makeApiCall( @@ -2152,9 +2154,9 @@ class GetAccessCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getAcessos'; return await ApiManager.instance.makeApiCall( @@ -2401,9 +2403,9 @@ class GetLiberationsCall { final StreamController controller = StreamController(); Future.microtask(() async { - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getSolicitacoes'; try { @@ -2593,9 +2595,9 @@ class GetMessagesCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final String userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final String cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getMensagens'; return await ApiManager.instance.makeApiCall( diff --git a/lib/backend/api_requests/api_manager.dart b/lib/features/backend/api_requests/api_manager.dart similarity index 100% rename from lib/backend/api_requests/api_manager.dart rename to lib/features/backend/api_requests/api_manager.dart diff --git a/lib/backend/api_requests/get_streamed_response.dart b/lib/features/backend/api_requests/get_streamed_response.dart similarity index 100% rename from lib/backend/api_requests/get_streamed_response.dart rename to lib/features/backend/api_requests/get_streamed_response.dart diff --git a/lib/features/backend/api_requests/index.dart b/lib/features/backend/api_requests/index.dart new file mode 100644 index 00000000..880f01b3 --- /dev/null +++ b/lib/features/backend/api_requests/index.dart @@ -0,0 +1,3 @@ +export 'api_calls.dart'; +export 'api_manager.dart'; +export 'get_streamed_response.dart'; diff --git a/lib/features/backend/index.dart b/lib/features/backend/index.dart new file mode 100644 index 00000000..1301ec34 --- /dev/null +++ b/lib/features/backend/index.dart @@ -0,0 +1,2 @@ +export 'api_requests/index.dart'; +export 'schema/index.dart'; diff --git a/lib/backend/schema/enums/enums.dart b/lib/features/backend/schema/enums/enums.dart similarity index 100% rename from lib/backend/schema/enums/enums.dart rename to lib/features/backend/schema/enums/enums.dart diff --git a/lib/features/backend/schema/enums/index.dart b/lib/features/backend/schema/enums/index.dart new file mode 100644 index 00000000..815115d9 --- /dev/null +++ b/lib/features/backend/schema/enums/index.dart @@ -0,0 +1 @@ +export 'enums.dart'; diff --git a/lib/features/backend/schema/index.dart b/lib/features/backend/schema/index.dart new file mode 100644 index 00000000..5b15343c --- /dev/null +++ b/lib/features/backend/schema/index.dart @@ -0,0 +1,3 @@ +export 'enums/index.dart'; +export 'structs/index.dart'; +export 'util/index.dart'; diff --git a/lib/backend/schema/structs/device_struct.dart b/lib/features/backend/schema/structs/device_struct.dart similarity index 89% rename from lib/backend/schema/structs/device_struct.dart rename to lib/features/backend/schema/structs/device_struct.dart index 620863c4..102703cb 100644 --- a/lib/backend/schema/structs/device_struct.dart +++ b/lib/features/backend/schema/structs/device_struct.dart @@ -1,5 +1,6 @@ // ignore_for_file: unnecessary_getters_setters +import 'package:hub/features/backend/index.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; import 'index.dart'; @@ -40,8 +41,7 @@ class DeviceStruct extends BaseStruct { description: data['description'] as String?, ); - static DeviceStruct? maybeFromMap(dynamic data) => - data is Map ? DeviceStruct.fromMap(data.cast()) : null; + static DeviceStruct? maybeFromMap(dynamic data) => data is Map ? DeviceStruct.fromMap(data.cast()) : null; Map toMap() => { 'devUUID': _devUUID, @@ -88,10 +88,7 @@ class DeviceStruct extends BaseStruct { @override bool operator ==(Object other) { - return other is DeviceStruct && - devUUID == other.devUUID && - version == other.version && - description == other.description; + return other is DeviceStruct && devUUID == other.devUUID && version == other.version && description == other.description; } @override diff --git a/lib/features/backend/schema/structs/index.dart b/lib/features/backend/schema/structs/index.dart new file mode 100644 index 00000000..5bd18316 --- /dev/null +++ b/lib/features/backend/schema/structs/index.dart @@ -0,0 +1 @@ +export 'device_struct.dart'; diff --git a/lib/features/backend/schema/util/index.dart b/lib/features/backend/schema/util/index.dart new file mode 100644 index 00000000..ff023bbe --- /dev/null +++ b/lib/features/backend/schema/util/index.dart @@ -0,0 +1 @@ +export 'schema_util.dart'; diff --git a/lib/backend/schema/util/schema_util.dart b/lib/features/backend/schema/util/schema_util.dart similarity index 86% rename from lib/backend/schema/util/schema_util.dart rename to lib/features/backend/schema/util/schema_util.dart index d6c251d9..e969983e 100644 --- a/lib/backend/schema/util/schema_util.dart +++ b/lib/features/backend/schema/util/schema_util.dart @@ -1,8 +1,6 @@ import 'dart:convert'; -import 'package:flutter/material.dart'; -import 'package:from_css_color/from_css_color.dart'; -import 'package:hub/backend/schema/enums/enums.dart'; +import 'package:hub/features/backend/index.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/nav/serialization_util.dart'; @@ -35,9 +33,7 @@ dynamic deserializeStructParam( if (paramValues is! Iterable) { return null; } - return paramValues - .map((e) => deserializeStructParam(e, paramType, false, structBuilder: structBuilder)) - .toList(); + return paramValues.map((e) => deserializeStructParam(e, paramType, false, structBuilder: structBuilder)).toList(); } else if (param is Map) { return structBuilder(param); } else { diff --git a/lib/features/history/presentation/blocs/access_history_bloc.dart b/lib/features/history/presentation/blocs/access_history_bloc.dart index dd513e6b..61c1b9c4 100644 --- a/lib/features/history/presentation/blocs/access_history_bloc.dart +++ b/lib/features/history/presentation/blocs/access_history_bloc.dart @@ -1,10 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hub/backend/api_requests/api_manager.dart'; +import 'package:hub/features/backend/index.dart'; import 'package:hub/features/history/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_model.dart'; import 'package:hub/flutter_flow/request_manager.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; class AcessHistoryPageModel extends FlutterFlowModel { late final String devUUID; @@ -32,9 +31,9 @@ class AcessHistoryPageModel extends FlutterFlowModel { } Future initDatabase() async { - devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } @override diff --git a/lib/features/history/presentation/blocs/provisional_history_bloc.dart b/lib/features/history/presentation/blocs/provisional_history_bloc.dart index 2601bb51..8dfd7315 100644 --- a/lib/features/history/presentation/blocs/provisional_history_bloc.dart +++ b/lib/features/history/presentation/blocs/provisional_history_bloc.dart @@ -1,6 +1,5 @@ import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; +import 'package:hub/features/storage/index.dart'; class ProvisionalHistoryEvent {} @@ -44,9 +43,9 @@ class ProvisionalHistoryBloc extends Bloc emit, ) async { emit(state.copyWith(isLoading: true)); - final devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; emit(state.copyWith(devUUID: devUUID, userUUID: userUUID, cliUUID: cliUUID, isLoading: false)); } } diff --git a/lib/features/history/presentation/pages/acess_history_page_widget.dart b/lib/features/history/presentation/pages/acess_history_page_widget.dart index 81501e99..4c11f7f7 100644 --- a/lib/features/history/presentation/pages/acess_history_page_widget.dart +++ b/lib/features/history/presentation/pages/acess_history_page_widget.dart @@ -3,8 +3,8 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart'; +import 'package:hub/features/backend/index.dart'; import 'package:hub/features/history/index.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; diff --git a/lib/features/history/presentation/pages/provisional_history_page.dart b/lib/features/history/presentation/pages/provisional_history_page.dart index bca19aec..02aca8be 100644 --- a/lib/features/history/presentation/pages/provisional_history_page.dart +++ b/lib/features/history/presentation/pages/provisional_history_page.dart @@ -4,8 +4,8 @@ import 'dart:developer'; import 'package:flutter/material.dart'; import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart'; +import 'package:hub/features/backend/index.dart'; import 'package:hub/features/history/index.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; diff --git a/lib/features/home/presentation/blocs/home_bloc.dart b/lib/features/home/presentation/blocs/home_bloc.dart index 5829df5f..3eb2219b 100644 --- a/lib/features/home/presentation/blocs/home_bloc.dart +++ b/lib/features/home/presentation/blocs/home_bloc.dart @@ -1,28 +1,26 @@ - import 'dart:async'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; +import 'package:hub/features/locals/index.dart'; +import 'package:hub/features/storage/index.dart'; -import '../../../../shared/components/molecules/locals/index.dart'; import 'index.dart'; class HomeBloc extends Bloc { late StreamSubscription _completer; - + HomeBloc() : super(HomeState()) { on(_onHomeEvent); _completer = LocalsRepositoryImpl.license.stream.listen((v) { add(HomeEvent()); }); - } + } - Future _onHomeEvent(HomeEvent event, Emitter emit) async { - final devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; - final userName = (await StorageHelper().get(KeychainStorageKey.userName.value)) ?? ''; + Future _onHomeEvent(HomeEvent event, Emitter emit) async { + final devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final userName = (await StorageHelper().get(ProfileStorageKey.userName.key)) ?? ''; final userEmail = (await StorageHelper().get(SecureStorageKey.email.value)) ?? ''; emit(state.copyWith( @@ -34,5 +32,3 @@ class HomeBloc extends Bloc { )); } } - - diff --git a/lib/features/home/presentation/pages/home_page.dart b/lib/features/home/presentation/pages/home_page.dart index 64442d3d..a4e20486 100644 --- a/lib/features/home/presentation/pages/home_page.dart +++ b/lib/features/home/presentation/pages/home_page.dart @@ -2,12 +2,12 @@ import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:hub/features/home/presentation/widgets/drawer_widget.dart'; +import 'package:hub/features/menu/index.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; -import 'package:hub/shared/components/molecules/locals/index.dart'; -import 'package:hub/shared/components/molecules/menu/index.dart'; +import 'package:hub/features/locals/index.dart'; class HomePageWidget extends StatefulWidget { const HomePageWidget(this.update, {super.key}); diff --git a/lib/features/home/presentation/widgets/drawer_widget.dart b/lib/features/home/presentation/widgets/drawer_widget.dart index f221d183..1a0ac823 100644 --- a/lib/features/home/presentation/widgets/drawer_widget.dart +++ b/lib/features/home/presentation/widgets/drawer_widget.dart @@ -2,12 +2,12 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:hub/features/home/index.dart'; +import 'package:hub/features/menu/index.dart'; +import 'package:hub/features/modules/data/index.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; -import 'package:hub/shared/components/molecules/locals/index.dart'; -import 'package:hub/shared/components/molecules/menu/index.dart'; -import 'package:hub/shared/components/molecules/modules/index.dart'; +import 'package:hub/features/locals/index.dart'; class DrawerWidget extends StatelessWidget { const DrawerWidget({super.key}); diff --git a/lib/shared/components/molecules/locals/data/data_sources/index.dart b/lib/features/locals/data/data_sources/index.dart similarity index 100% rename from lib/shared/components/molecules/locals/data/data_sources/index.dart rename to lib/features/locals/data/data_sources/index.dart diff --git a/lib/features/locals/data/data_sources/locals_local_data_source.dart b/lib/features/locals/data/data_sources/locals_local_data_source.dart new file mode 100644 index 00000000..32445b40 --- /dev/null +++ b/lib/features/locals/data/data_sources/locals_local_data_source.dart @@ -0,0 +1,13 @@ +import 'package:hub/features/storage/index.dart'; + +abstract class LocalsLocalDataSource { + Future unlinkLocal(); +} + +class LocalsLocalDataSourceImpl { + Future unlinkLocal() async { + await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); + await StorageHelper().set(ProfileStorageKey.clientName.key, ''); + await StorageHelper().set(ProfileStorageKey.ownerName.key, ''); + } +} diff --git a/lib/shared/components/molecules/locals/data/data_sources/locals_remote_data_source.dart b/lib/features/locals/data/data_sources/locals_remote_data_source.dart similarity index 89% rename from lib/shared/components/molecules/locals/data/data_sources/locals_remote_data_source.dart rename to lib/features/locals/data/data_sources/locals_remote_data_source.dart index 2520b990..7ccea96d 100644 --- a/lib/shared/components/molecules/locals/data/data_sources/locals_remote_data_source.dart +++ b/lib/features/locals/data/data_sources/locals_remote_data_source.dart @@ -3,26 +3,23 @@ import 'dart:developer'; import 'package:flutter/material.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; import 'package:hub/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart'; +import 'package:hub/features/authentication/index.dart'; +import 'package:hub/features/backend/index.dart'; +import 'package:hub/features/modules/data/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/internationalization.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/shared/components/molecules/locals/index.dart'; -import 'package:hub/shared/components/molecules/modules/index.dart'; - -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; -import 'package:hub/shared/services/authentication/authentication_service.dart'; -import 'package:hub/shared/utils/dialog_util.dart'; +import 'package:hub/features/locals/index.dart'; import 'package:hub/shared/utils/snackbar_util.dart'; abstract class LocalsRemoteDataSource { Future linkLocal(BuildContext context); Future checkLocals(BuildContext context); - Future processLocals(BuildContext context) ; + Future processLocals(BuildContext context); Future processData(BuildContext context); - Future selectLocal(BuildContext context, ApiCallResponse? response) ; + Future selectLocal(BuildContext context, ApiCallResponse? response); Future detachLocal(BuildContext context); } @@ -60,8 +57,8 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { await StorageHelper().set(SecureStorageKey.haveLocal.value, true); await StorageHelper().set(SecureStorageKey.isLogged.value, true); await WidgetsBinding.instance.endOfFrame; - await StorageHelper().set(KeychainStorageKey.clientUUID.value, ''); - await StorageHelper().set(KeychainStorageKey.ownerUUID.value, ''); + await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); + await StorageHelper().set(ProfileStorageKey.ownerUUID.key, ''); StorageHelper().context?.go('/homePage'); } } catch (e, s) { @@ -71,7 +68,7 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { @override Future processLocals(BuildContext context) async { - log('() => processLocals'); + log('() => processLocals'); try { final GetLocalsCall callback = PhpGroup.getLocalsCall; final ApiCallResponse response = await callback.call(); @@ -145,8 +142,8 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { @override Future checkLocals(BuildContext context) async { - String cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; - String cliName = (await StorageHelper().get(KeychainStorageKey.clientName.value)) ?? ''; + String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + String cliName = (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; return cliUUID.isEmpty && cliName.isEmpty; } @@ -219,9 +216,9 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { await PhpGroup.resopndeVinculo.call(tarefa: 'I').then((value) async { if (value.jsonBody['error'] == false) { - await StorageHelper().set(KeychainStorageKey.clientName.value, ''); - await StorageHelper().set(KeychainStorageKey.ownerName.value, ''); - await StorageHelper().set(KeychainStorageKey.clientUUID.value, ''); + await StorageHelper().set(ProfileStorageKey.clientName.key, ''); + await StorageHelper().set(ProfileStorageKey.ownerName.key, ''); + await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); context.pop(); context.go('/homePage', extra: {'update': LocalsRepositoryImpl().update}); SnackBarUtil.showSnackBar(context, content); @@ -244,6 +241,4 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { SnackBarUtil.showSnackBar(context, content, isError: true); } } - - } diff --git a/lib/shared/components/molecules/locals/data/index.dart b/lib/features/locals/data/index.dart similarity index 100% rename from lib/shared/components/molecules/locals/data/index.dart rename to lib/features/locals/data/index.dart diff --git a/lib/features/locals/data/models/index.dart b/lib/features/locals/data/models/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/shared/components/molecules/locals/data/repositories/index.dart b/lib/features/locals/data/repositories/index.dart similarity index 100% rename from lib/shared/components/molecules/locals/data/repositories/index.dart rename to lib/features/locals/data/repositories/index.dart diff --git a/lib/shared/components/molecules/locals/data/repositories/locals_repository_impl.dart b/lib/features/locals/data/repositories/locals_repository_impl.dart similarity index 73% rename from lib/shared/components/molecules/locals/data/repositories/locals_repository_impl.dart rename to lib/features/locals/data/repositories/locals_repository_impl.dart index 51c48596..74d8fb55 100644 --- a/lib/shared/components/molecules/locals/data/repositories/locals_repository_impl.dart +++ b/lib/features/locals/data/repositories/locals_repository_impl.dart @@ -2,12 +2,12 @@ import 'dart:developer'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:hub/backend/notifications/firebase_messaging_service.dart'; -import 'package:hub/shared/components/molecules/locals/index.dart'; -import 'package:hub/shared/components/molecules/menu/presentation/blocs/menu_bloc.dart'; -import 'package:hub/shared/components/molecules/modules/index.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; +import 'package:hub/features/locals/index.dart'; +import 'package:hub/features/menu/index.dart'; +import 'package:hub/features/modules/data/index.dart'; +import 'package:hub/features/notifications/index.dart'; +import 'package:hub/features/storage/index.dart'; + import 'package:hub/shared/utils/dialog_util.dart'; import 'package:rxdart/rxdart.dart'; @@ -32,21 +32,21 @@ class LocalsRepositoryImpl implements LocalsRepository { } Future select(BuildContext context) async { - await localDataSource.unlinkLocal(); - await update(context); + await localDataSource.unlinkLocal(); + await update(context); } Future check(BuildContext context) async { - final String? cliUUID = await StorageHelper().get(KeychainStorageKey.clientUUID.value); - final String? ownerUUID = await StorageHelper().get(KeychainStorageKey.ownerUUID.value); + final String? cliUUID = await StorageHelper().get(ProfileStorageKey.clientUUID.key); + final String? ownerUUID = await StorageHelper().get(ProfileStorageKey.ownerUUID.key); final bool haveCli = cliUUID != null && cliUUID.isNotEmpty; final bool haveOwner = ownerUUID != null && ownerUUID.isNotEmpty; if (!haveCli && !haveOwner) { - await update(context); - await FirebaseMessagingService().updateDeviceToken(); + await update(context); + await FirebaseMessagingService().updateDeviceToken(); } } - + Future _handleReponse(BuildContext context) async { bool response = false; final bool isUnselected = await remoteDataSource.checkLocals(context); @@ -69,16 +69,14 @@ class LocalsRepositoryImpl implements LocalsRepository { } Future _handleUpdateError(BuildContext context) async { - await StorageHelper().set(KeychainStorageKey.clientUUID.value, ''); + await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); const String errorMsg = 'Erro ao atualizar locais'; await DialogUtil.error(context, errorMsg); } Future _notifyBlocs(BuildContext context) async { - context.read().add(LocalProfileEvent()); context.read().add(MenuEvent()); - } @override diff --git a/lib/features/locals/domain/entities/index.dart b/lib/features/locals/domain/entities/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/shared/components/molecules/locals/domain/index.dart b/lib/features/locals/domain/index.dart similarity index 100% rename from lib/shared/components/molecules/locals/domain/index.dart rename to lib/features/locals/domain/index.dart diff --git a/lib/shared/components/molecules/locals/domain/respositories/index.dart b/lib/features/locals/domain/respositories/index.dart similarity index 100% rename from lib/shared/components/molecules/locals/domain/respositories/index.dart rename to lib/features/locals/domain/respositories/index.dart diff --git a/lib/shared/components/molecules/locals/domain/respositories/locals_repository.dart b/lib/features/locals/domain/respositories/locals_repository.dart similarity index 100% rename from lib/shared/components/molecules/locals/domain/respositories/locals_repository.dart rename to lib/features/locals/domain/respositories/locals_repository.dart diff --git a/lib/features/locals/domain/usecases/index.dart b/lib/features/locals/domain/usecases/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/shared/components/molecules/locals/index.dart b/lib/features/locals/index.dart similarity index 100% rename from lib/shared/components/molecules/locals/index.dart rename to lib/features/locals/index.dart diff --git a/lib/shared/components/molecules/locals/presentation/blocs/index.dart b/lib/features/locals/presentation/blocs/index.dart similarity index 100% rename from lib/shared/components/molecules/locals/presentation/blocs/index.dart rename to lib/features/locals/presentation/blocs/index.dart diff --git a/lib/shared/components/molecules/locals/presentation/blocs/local_profile_bloc.dart b/lib/features/locals/presentation/blocs/local_profile_bloc.dart similarity index 68% rename from lib/shared/components/molecules/locals/presentation/blocs/local_profile_bloc.dart rename to lib/features/locals/presentation/blocs/local_profile_bloc.dart index d19459a1..69201d30 100644 --- a/lib/shared/components/molecules/locals/presentation/blocs/local_profile_bloc.dart +++ b/lib/features/locals/presentation/blocs/local_profile_bloc.dart @@ -3,16 +3,12 @@ import 'dart:developer'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter/material.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_model.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/shared/components/molecules/locals/index.dart'; -import 'package:hub/shared/components/molecules/menu/index.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; +import 'package:hub/features/locals/index.dart'; -class LocalProfileEvent { - -} +class LocalProfileEvent {} class LocalProfileState { final String cliName; @@ -22,7 +18,6 @@ class LocalProfileState { LocalProfileState({this.cliName = '', this.cliUUID = '', this.ownerName = ''}); LocalProfileState copyWith({String? cliName, String? ownerName, String? cliUUID}) { - return LocalProfileState( cliName: cliName ?? this.cliName, ownerName: ownerName ?? this.ownerName, @@ -42,9 +37,9 @@ class LocalProfileBloc extends Bloc { } Future _onLocalProfileEvent(LocalProfileEvent event, Emitter emit) async { - final cliName = (await StorageHelper().get(KeychainStorageKey.clientName.value)) ?? ''; - final ownerName = (await StorageHelper().get(KeychainStorageKey.ownerName.value)) ?? ''; - final cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final cliName = (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + final ownerName = (await StorageHelper().get(ProfileStorageKey.ownerName.key)) ?? ''; + final cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; emit(state.copyWith(cliName: cliName, cliUUID: cliUUID, ownerName: ownerName)); } @@ -68,9 +63,9 @@ class LocalProfileComponentModel extends FlutterFlowModel getData() async { - cliName = (await StorageHelper().get(KeychainStorageKey.clientName.value)) ?? ''; - ownerName = (await StorageHelper().get(KeychainStorageKey.ownerName.value)) ?? ''; - cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + cliName = (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + ownerName = (await StorageHelper().get(ProfileStorageKey.ownerName.key)) ?? ''; + cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; setStateCallback?.call(); } diff --git a/lib/shared/components/molecules/locals/presentation/index.dart b/lib/features/locals/presentation/index.dart similarity index 100% rename from lib/shared/components/molecules/locals/presentation/index.dart rename to lib/features/locals/presentation/index.dart diff --git a/lib/shared/components/molecules/locals/presentation/widgets/index.dart b/lib/features/locals/presentation/widgets/index.dart similarity index 100% rename from lib/shared/components/molecules/locals/presentation/widgets/index.dart rename to lib/features/locals/presentation/widgets/index.dart diff --git a/lib/shared/components/molecules/locals/presentation/widgets/local_profile/index.dart b/lib/features/locals/presentation/widgets/local_profile/index.dart similarity index 100% rename from lib/shared/components/molecules/locals/presentation/widgets/local_profile/index.dart rename to lib/features/locals/presentation/widgets/local_profile/index.dart diff --git a/lib/features/locals/presentation/widgets/local_profile/local_profile_widget.dart b/lib/features/locals/presentation/widgets/local_profile/local_profile_widget.dart new file mode 100644 index 00000000..cf343964 --- /dev/null +++ b/lib/features/locals/presentation/widgets/local_profile/local_profile_widget.dart @@ -0,0 +1,258 @@ +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:hub/features/modules/index.dart'; +import 'package:hub/flutter_flow/custom_functions.dart'; +import 'package:hub/flutter_flow/flutter_flow_theme.dart'; +import 'package:hub/flutter_flow/flutter_flow_util.dart'; +import 'package:hub/features/locals/index.dart'; + +class LocalProfileComponentWidget extends StatefulWidget { + const LocalProfileComponentWidget({super.key}); + + @override + State createState() => _LocalProfileComponentWidgetState(); +} + +class _LocalProfileComponentWidgetState extends State { + bool _isLoading = false; + + Future retrieveProfileInfo() async { + setState(() { + _isLoading = true; + }); + await LocalsRepositoryImpl().select(context); + setState(() { + _isLoading = false; + }); + } + + @override + Widget build(BuildContext context) { + return StreamBuilder( + stream: LocalsRepositoryImpl.stream, + builder: (context, snapshot) { + final textScaler = MediaQuery.textScalerOf(context); + final double baseFontSize = 14.0; + final double scaledFontSize = baseFontSize * textScaler.scale(1); + final double limitedFontSize = scaledFontSize > 20 ? 12 : scaledFontSize; + if (snapshot.connectionState == ConnectionState.waiting) { + return const Center(child: CircularProgressIndicator()); + } else if (snapshot.hasError) { + return Center(child: Text('Error: ${snapshot.error}')); + } else if (!snapshot.hasData || snapshot.data! == false) { + return BlocBuilder( + builder: (context, state) { + return _buildDefaultLocalProfile(context, limitedFontSize); + }, + ); + } + + return BlocBuilder( + builder: (context, state) { + return _buildAsyncLocalProfile(context, state, limitedFontSize); + }, + ); + }, + ); + } + + Container _buildDefaultLocalProfile(BuildContext context, double limitedFontSize) { + return Container( + decoration: const BoxDecoration(), + child: Align( + alignment: const AlignmentDirectional(0.0, -1.0), + child: Material( + color: Colors.transparent, + elevation: 0.0, + child: Container( + width: double.infinity, + height: 119.0, + decoration: BoxDecoration( + color: FlutterFlowTheme.of(context).primary, + border: Border.all( + color: FlutterFlowTheme.of(context).primary, + ), + ), + child: Row( + mainAxisSize: MainAxisSize.max, + children: [ + Align( + alignment: const AlignmentDirectional(-1.0, 0.0), + child: Padding( + padding: const EdgeInsets.all(2.0), + child: InkWell( + splashColor: Colors.transparent, + focusColor: Colors.transparent, + hoverColor: Colors.transparent, + highlightColor: Colors.transparent, + onTap: _isLoading ? null : retrieveProfileInfo, + child: ClipRRect( + borderRadius: BorderRadius.circular(200.0), + child: CachedNetworkImage( + imageBuilder: (context, imageProvider) => Container( + decoration: BoxDecoration( + image: DecorationImage( + image: imageProvider, + fit: BoxFit.cover, + ), + ), + ), + imageUrl: 'assets/images/home.png', + width: 80.0, + height: 80.0, + fit: BoxFit.cover, + alignment: const Alignment(0.0, 0.0), + placeholder: (context, url) => Image.asset('assets/images/home.png'), + errorListener: (_) => Image.asset('assets/images/home.png'), + errorWidget: (_, __, ___) => Image.asset('assets/images/home.png'), + ), + )), + ), + ), + Expanded( + child: Tooltip( + message: FFLocalizations.of(context).getVariableText( + ptText: 'SEM LOCAL VINCULADO', + enText: 'NO LINKED LOCAL', + ), + child: Text( + FFLocalizations.of(context).getVariableText( + ptText: 'SEM LOCAL VINCULADO', + enText: 'NO LINKED LOCAL', + ), + overflow: TextOverflow.ellipsis, + maxLines: 1, + style: FlutterFlowTheme.of(context).labelMedium.override( + fontFamily: 'Nunito', + color: FlutterFlowTheme.of(context).info, + fontSize: limitedFontSize, + letterSpacing: 0.0, + fontWeight: FontWeight.w500, + useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), + ), + ), + ), + ), + ].divide(const SizedBox(width: 20.0)).addToStart(const SizedBox(width: 20.0)).addToEnd(const SizedBox(width: 20.0)), + ), + ), + ), + ), + ); + } + + Container _buildAsyncLocalProfile(BuildContext context, LocalProfileState state, double limitedFontSize) { + return Container( + decoration: const BoxDecoration(), + child: Align( + alignment: const AlignmentDirectional(0.0, -1.0), + child: Material( + color: Colors.transparent, + elevation: 0.0, + child: Container( + width: double.infinity, + height: 119.0, + decoration: BoxDecoration( + color: FlutterFlowTheme.of(context).primary, + border: Border.all( + color: FlutterFlowTheme.of(context).primary, + ), + ), + child: Row( + mainAxisSize: MainAxisSize.max, + children: [ + Align( + alignment: const AlignmentDirectional(-1.0, 0.0), + child: Padding( + padding: const EdgeInsets.all(2.0), + child: InkWell( + splashColor: Colors.transparent, + focusColor: Colors.transparent, + hoverColor: Colors.transparent, + highlightColor: Colors.transparent, + onTap: _isLoading ? null : retrieveProfileInfo, + child: ClipRRect( + borderRadius: BorderRadius.circular(200.0), + child: CachedNetworkImage( + imageBuilder: (context, imageProvider) => Container( + decoration: BoxDecoration( + image: DecorationImage( + image: imageProvider, + fit: BoxFit.cover, + ), + ), + ), + imageUrl: valueOrDefault('https://freaccess.com.br/freaccess/Images/Clients/${state.cliUUID}.png', 'assets/images/home.png'), + width: 80.0, + height: 80.0, + fit: BoxFit.cover, + alignment: const Alignment(0.0, 0.0), + placeholder: (context, url) => Image.asset('assets/images/home.png'), + errorListener: (_) => Image.asset('assets/images/home.png'), + errorWidget: (_, __, ___) => Image.asset('assets/images/home.png'), + ), + )), + ), + ), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Tooltip( + message: valueOrDefault( + convertToUppercase(state.cliName), + FFLocalizations.of(context).getVariableText( + ptText: 'SEM LOCAL VINCULADO', + enText: 'NO LINKED LOCAL', + ), + ), + child: Text( + valueOrDefault( + convertToUppercase(state.cliName), + FFLocalizations.of(context).getVariableText( + ptText: 'SEM LOCAL VINCULADO', + enText: 'NO LINKED LOCAL', + ), + ), + overflow: TextOverflow.ellipsis, + maxLines: 1, + style: FlutterFlowTheme.of(context).labelMedium.override( + fontFamily: 'Nunito', + color: FlutterFlowTheme.of(context).info, + fontSize: limitedFontSize, + letterSpacing: 0.0, + fontWeight: FontWeight.w500, + useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), + ), + ), + ), + Tooltip( + message: valueOrDefault(' ' + state.ownerName, ''), + child: Text( + valueOrDefault(state.ownerName.length > 30 ? '${state.ownerName.substring(0, 20)}...' : state.ownerName, ''), + overflow: TextOverflow.ellipsis, + maxLines: 1, + style: FlutterFlowTheme.of(context).labelMedium.override( + fontFamily: 'Nunito', + color: FlutterFlowTheme.of(context).info, + fontSize: limitedFontSize, + letterSpacing: 0.0, + fontWeight: FontWeight.w500, + useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), + ), + ), + ), + ], + ), + ), + ].divide(const SizedBox(width: 20.0)).addToStart(const SizedBox(width: 20.0)).addToEnd(const SizedBox(width: 20.0)), + ), + ), + ), + ), + ); + } +} diff --git a/lib/shared/components/molecules/locals/utils/index.dart b/lib/features/locals/utils/index.dart similarity index 100% rename from lib/shared/components/molecules/locals/utils/index.dart rename to lib/features/locals/utils/index.dart diff --git a/lib/shared/components/molecules/locals/utils/local_util.dart b/lib/features/locals/utils/local_util.dart similarity index 52% rename from lib/shared/components/molecules/locals/utils/local_util.dart rename to lib/features/locals/utils/local_util.dart index 9aaa7772..45438432 100644 --- a/lib/shared/components/molecules/locals/utils/local_util.dart +++ b/lib/features/locals/utils/local_util.dart @@ -1,21 +1,18 @@ - - import 'dart:developer'; import 'package:flutter/material.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; +import 'package:hub/features/backend/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/internationalization.dart'; -import 'package:hub/shared/components/molecules/locals/index.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; +import 'package:hub/features/locals/index.dart'; + import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/log_util.dart'; class LocalUtil { - static void handleError(BuildContext context, String errorMsg) async { - final String devUUID = await StorageHelper().get(KeychainStorageKey.devUUID.value) ?? ''; - final String userUUID = await StorageHelper().get(KeychainStorageKey.userUUID.value) ?? ''; + final String devUUID = await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? ''; + final String userUUID = await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? ''; final bool isAuthenticated = userUUID.isNotEmpty && devUUID.isNotEmpty; final bool isDevLinked = !errorMsg.contains('Esse dispositivo nao pertence a esse usuario'); log('() => isLinked: $errorMsg'); @@ -42,17 +39,17 @@ class LocalUtil { static Future handleUnavailable(BuildContext context, List locals) async { log('() => isUnavailable'); try { - await StorageHelper().set(KeychainStorageKey.clientUUID.value, locals[0]['CLI_ID']); - await StorageHelper().set(KeychainStorageKey.ownerUUID.value, locals[0]['CLU_OWNER_ID']); - await StorageHelper().set(KeychainStorageKey.clientName.value, locals[0]['CLI_NOME']); - await StorageHelper().set(KeychainStorageKey.ownerName.value, locals[0]['CLU_OWNER_DSC']); + await StorageHelper().set(ProfileStorageKey.clientUUID.key, locals[0]['CLI_ID']); + await StorageHelper().set(ProfileStorageKey.ownerUUID.key, locals[0]['CLU_OWNER_ID']); + await StorageHelper().set(ProfileStorageKey.clientName.key, locals[0]['CLI_NOME']); + await StorageHelper().set(ProfileStorageKey.ownerName.key, locals[0]['CLU_OWNER_DSC']); var response = await PhpGroup.resopndeVinculo.call(tarefa: 'A'); if (response.jsonBody['error'] == true) { - await StorageHelper().set(KeychainStorageKey.clientUUID.value, ''); - await StorageHelper().set(KeychainStorageKey.ownerUUID.value, ''); - await StorageHelper().set(KeychainStorageKey.clientName.value, ''); - await StorageHelper().set(KeychainStorageKey.ownerName.value, ''); + await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); + await StorageHelper().set(ProfileStorageKey.ownerUUID.key, ''); + await StorageHelper().set(ProfileStorageKey.clientName.key, ''); + await StorageHelper().set(ProfileStorageKey.ownerName.key, ''); return false; } @@ -67,11 +64,11 @@ class LocalUtil { static Future handleEnabled(BuildContext context, dynamic local) async { log('() => isEnabled'); - await StorageHelper().set(KeychainStorageKey.clientUUID.value, local['CLI_ID']); - await StorageHelper().set(KeychainStorageKey.ownerUUID.value, local['CLU_OWNER_ID']); - await StorageHelper().set(KeychainStorageKey.clientName.value, local['CLI_NOME']); - await StorageHelper().set(KeychainStorageKey.ownerName.value, local['CLU_OWNER_DSC']); - await StorageHelper().set(KeychainStorageKey.userName.value, local['USU_NOME']); + await StorageHelper().set(ProfileStorageKey.clientUUID.key, local['CLI_ID']); + await StorageHelper().set(ProfileStorageKey.ownerUUID.key, local['CLU_OWNER_ID']); + await StorageHelper().set(ProfileStorageKey.clientName.key, local['CLI_NOME']); + await StorageHelper().set(ProfileStorageKey.ownerName.key, local['CLU_OWNER_DSC']); + await StorageHelper().set(ProfileStorageKey.userName.key, local['USU_NOME']); return await LocalsRemoteDataSourceImpl().processData(context); } @@ -84,16 +81,15 @@ class LocalUtil { static Future updateStorageUtil(Map jsonBody) async { try { - await StorageHelper().set(KeychainStorageKey.whatsapp.value, jsonBody['whatsapp'] ?? false); - await StorageHelper().set(KeychainStorageKey.provisional.value, jsonBody['provisional'] ?? false); - await StorageHelper().set(KeychainStorageKey.pets.value, jsonBody['pet'] ?? false); - await StorageHelper().set(KeychainStorageKey.petAmount.value, - jsonBody['petAmountRegister']?.toString().isEmpty ?? true ? '0' : jsonBody['petAmountRegister'].toString()); - await StorageHelper().set(KeychainStorageKey.userName.value, jsonBody['visitado']['VDO_NOME'] ?? ''); - await StorageHelper().set(KeychainStorageKey.userEmail.value, jsonBody['visitado']['VDO_EMAIL'] ?? ''); + await StorageHelper().set(LocalsStorageKey.whatsapp.key, jsonBody['whatsapp'] ?? false); + await StorageHelper().set(LocalsStorageKey.provisional.key, jsonBody['provisional'] ?? false); + await StorageHelper().set(LocalsStorageKey.pets.key, jsonBody['pet'] ?? false); + await StorageHelper().set(LocalsStorageKey.petAmount.key, jsonBody['petAmountRegister']?.toString().isEmpty ?? true ? '0' : jsonBody['petAmountRegister'].toString()); + await StorageHelper().set(ProfileStorageKey.userName.key, jsonBody['visitado']['VDO_NOME'] ?? ''); + await StorageHelper().set(ProfileStorageKey.userEmail.key, jsonBody['visitado']['VDO_EMAIL'] ?? ''); final bool isNewVersion = jsonBody['newVersion'] ?? false; - await StorageHelper().set(KeychainStorageKey.isNewVersion.value, isNewVersion); + await StorageHelper().set(LocalsStorageKey.isNewVersion.key, isNewVersion); return isNewVersion; } catch (e, s) { log('Error in _updateStorageUtil: $e', stackTrace: s); @@ -106,7 +102,7 @@ class LocalUtil { } static Future isInactived(List locals) async { - String cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; return locals.where((local) => local['CLI_ID'] != cliUUID && local['CLU_STATUS'] == 'A').isNotEmpty; } @@ -115,22 +111,21 @@ class LocalUtil { } static Future isUnselected() async { - String cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; - String cliName = (await StorageHelper().get(KeychainStorageKey.clientName.value)) ?? ''; - String ownerUUID = (await StorageHelper().get(KeychainStorageKey.ownerUUID.value)) ?? ''; + String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + String cliName = (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + String ownerUUID = (await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? ''; return cliUUID.isEmpty && cliName.isEmpty && ownerUUID.isEmpty; } static Future isSelected(bool isInactived) async { - String cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; - String cliName = (await StorageHelper().get(KeychainStorageKey.clientName.value)) ?? ''; + String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + String cliName = (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; return cliUUID.isNotEmpty && cliName.isNotEmpty && isInactived; } static Future isAvailable() async { - String cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; - String cliName = (await StorageHelper().get(KeychainStorageKey.clientName.value)) ?? ''; + String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + String cliName = (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; return cliUUID.isNotEmpty && cliName.isNotEmpty; } - -} \ No newline at end of file +} diff --git a/lib/shared/components/molecules/menu/data/data_sources/index.dart b/lib/features/menu/data/data_sources/index.dart similarity index 100% rename from lib/shared/components/molecules/menu/data/data_sources/index.dart rename to lib/features/menu/data/data_sources/index.dart diff --git a/lib/shared/components/molecules/menu/data/data_sources/menu_local_data_source.dart b/lib/features/menu/data/data_sources/menu_local_data_source.dart similarity index 89% rename from lib/shared/components/molecules/menu/data/data_sources/menu_local_data_source.dart rename to lib/features/menu/data/data_sources/menu_local_data_source.dart index 113df0e4..ed9b3e2f 100644 --- a/lib/shared/components/molecules/menu/data/data_sources/menu_local_data_source.dart +++ b/lib/features/menu/data/data_sources/menu_local_data_source.dart @@ -1,18 +1,16 @@ - - import 'dart:developer'; import 'package:flutter/material.dart'; +import 'package:hub/features/authentication/index.dart'; +import 'package:hub/features/menu/index.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/shared/components/molecules/menu/index.dart'; import 'package:hub/shared/extensions/dialog_extensions.dart'; -import 'package:hub/shared/services/authentication/authentication_service.dart'; import 'package:hub/shared/utils/path_util.dart'; import '../../../modules/domain/entities/index.dart'; abstract class MenuLocalDataSource { - Future addMenuEntry(EnumMenuItem item, List entries, IconData icon, String text, Function() action); + Future addMenuEntry(EnumMenuItem item, List entries, IconData icon, String text, Function() action); Future processDisplayDefault(EnumMenuItem item, MenuEntry opt, List entries); Future handleMenu(EnumMenuItem item, EnumDisplay display, MenuEntry opt, List entries); Future processStartDate(String startDate, MenuEntry entry); @@ -36,7 +34,7 @@ class MenuLocalDataSourceImpl implements MenuLocalDataSource { } return null; } - + @override Future processDisplayDefault(EnumMenuItem item, MenuEntry opt, List entries) async { if (opt.key == 'FRE-HUB-LOGOUT') { @@ -44,9 +42,8 @@ class MenuLocalDataSourceImpl implements MenuLocalDataSource { await AuthenticationService.signOut(navigatorKey.currentContext!); }); return true; - - } - else return false; + } else + return false; } @override @@ -75,14 +72,14 @@ class MenuLocalDataSourceImpl implements MenuLocalDataSource { Future processStartDate(String startDate, MenuEntry opt) async { try { if (startDate.isEmpty) return true; - final start = DateTime.tryParse(startDate); + final start = DateTime.tryParse(startDate); if (start == null) return false; return DateTime.now().isAfter(start); } catch (e) { log('Error processing start date for module ${opt.key}: $e'); } return false; - } + } @override Future processExpirationDate(String expirationDate, MenuEntry opt) async { @@ -95,7 +92,4 @@ class MenuLocalDataSourceImpl implements MenuLocalDataSource { } return false; } - - - -} \ No newline at end of file +} diff --git a/lib/shared/components/molecules/menu/data/index.dart b/lib/features/menu/data/index.dart similarity index 100% rename from lib/shared/components/molecules/menu/data/index.dart rename to lib/features/menu/data/index.dart diff --git a/lib/features/menu/data/models/index.dart b/lib/features/menu/data/models/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/shared/components/molecules/menu/data/repositories/index.dart b/lib/features/menu/data/repositories/index.dart similarity index 100% rename from lib/shared/components/molecules/menu/data/repositories/index.dart rename to lib/features/menu/data/repositories/index.dart diff --git a/lib/shared/components/molecules/menu/data/repositories/menu_repository_impl.dart b/lib/features/menu/data/repositories/menu_repository_impl.dart similarity index 77% rename from lib/shared/components/molecules/menu/data/repositories/menu_repository_impl.dart rename to lib/features/menu/data/repositories/menu_repository_impl.dart index 2a05bb85..37c9217e 100644 --- a/lib/shared/components/molecules/menu/data/repositories/menu_repository_impl.dart +++ b/lib/features/menu/data/repositories/menu_repository_impl.dart @@ -1,23 +1,12 @@ - - -import 'dart:convert'; import 'dart:developer'; +import 'package:hub/features/menu/index.dart'; +import 'package:hub/features/modules/index.dart'; import 'package:hub/flutter_flow/custom_functions.dart'; -import 'package:hub/main.dart'; -import 'package:hub/shared/components/molecules/menu/data/data_sources/menu_local_data_source.dart'; -import 'package:hub/shared/components/molecules/menu/domain/respositories/menu_repository.dart'; -import 'package:hub/shared/components/molecules/menu/index.dart'; -import 'package:hub/shared/components/molecules/modules/index.dart'; -import 'package:hub/shared/extensions/string_extensions.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; - class MenuRepositoryImpl implements MenuRepository { final MenuLocalDataSource menuDataSource = MenuLocalDataSourceImpl(); - @override Future> generateMenuEntries(List menuEntries, EnumMenuItem item) async { List entries = []; @@ -55,8 +44,6 @@ class MenuRepositoryImpl implements MenuRepository { } Future processDisplay(Map module, bool isNewVersion) async { - - if (await _shouldUpdateDisplay(module, isNewVersion)) { final displayValue = module['display'] == EnumDisplay.active ? 'VISIVEL' : 'INVISIVEL'; await LicenseLocalDataSourceImpl().setDisplayByKey(['FRE-HUB-ABOUT-PROPERTY'], displayValue); @@ -67,13 +54,7 @@ class MenuRepositoryImpl implements MenuRepository { } Future _shouldUpdateDisplay(Map module, bool isNewVersion) async { - const keysToCheck = [ - LicenseKeys.residents, - LicenseKeys.vehicles, - LicenseKeys.openedVisits - ]; + const keysToCheck = [LicenseKeys.residents, LicenseKeys.vehicles, LicenseKeys.openedVisits]; return isNewVersion && keysToCheck.any((key) => module['key'] == key.value); } - - -} \ No newline at end of file +} diff --git a/lib/shared/components/molecules/menu/domain/entities/index.dart b/lib/features/menu/domain/entities/index.dart similarity index 100% rename from lib/shared/components/molecules/menu/domain/entities/index.dart rename to lib/features/menu/domain/entities/index.dart diff --git a/lib/shared/components/molecules/menu/domain/entities/menu_item.dart b/lib/features/menu/domain/entities/menu_item.dart similarity index 93% rename from lib/shared/components/molecules/menu/domain/entities/menu_item.dart rename to lib/features/menu/domain/entities/menu_item.dart index 31b36da6..842eab13 100644 --- a/lib/shared/components/molecules/menu/domain/entities/menu_item.dart +++ b/lib/features/menu/domain/entities/menu_item.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hub/shared/components/molecules/menu/index.dart'; +import 'package:hub/features/menu/index.dart'; enum EnumMenuItem { button, @@ -29,7 +29,6 @@ abstract class MenuItem extends StatefulWidget { final Function() action; final String title; final IconData icon; - factory MenuItem.create( EnumMenuItem type, { diff --git a/lib/shared/components/molecules/menu/domain/index.dart b/lib/features/menu/domain/index.dart similarity index 100% rename from lib/shared/components/molecules/menu/domain/index.dart rename to lib/features/menu/domain/index.dart diff --git a/lib/features/menu/domain/respositories/index.dart b/lib/features/menu/domain/respositories/index.dart new file mode 100644 index 00000000..28b980f4 --- /dev/null +++ b/lib/features/menu/domain/respositories/index.dart @@ -0,0 +1 @@ +export 'menu_repository.dart'; diff --git a/lib/features/menu/domain/respositories/menu_repository.dart b/lib/features/menu/domain/respositories/menu_repository.dart new file mode 100644 index 00000000..bccd444a --- /dev/null +++ b/lib/features/menu/domain/respositories/menu_repository.dart @@ -0,0 +1,5 @@ +import 'package:hub/features/menu/index.dart'; + +abstract class MenuRepository { + Future> generateMenuEntries(List menuEntries, EnumMenuItem item); +} diff --git a/lib/features/menu/domain/usecases/index.dart b/lib/features/menu/domain/usecases/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/shared/components/molecules/menu/index.dart b/lib/features/menu/index.dart similarity index 100% rename from lib/shared/components/molecules/menu/index.dart rename to lib/features/menu/index.dart diff --git a/lib/shared/components/molecules/menu/presentation/blocs/index.dart b/lib/features/menu/presentation/blocs/index.dart similarity index 100% rename from lib/shared/components/molecules/menu/presentation/blocs/index.dart rename to lib/features/menu/presentation/blocs/index.dart diff --git a/lib/shared/components/molecules/menu/presentation/blocs/menu_bloc.dart b/lib/features/menu/presentation/blocs/menu_bloc.dart similarity index 74% rename from lib/shared/components/molecules/menu/presentation/blocs/menu_bloc.dart rename to lib/features/menu/presentation/blocs/menu_bloc.dart index ed513784..9b701787 100644 --- a/lib/shared/components/molecules/menu/presentation/blocs/menu_bloc.dart +++ b/lib/features/menu/presentation/blocs/menu_bloc.dart @@ -1,17 +1,9 @@ - import 'dart:async'; -import 'dart:developer'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/shared/components/molecules/locals/index.dart'; - -import 'package:hub/shared/components/molecules/menu/data/repositories/menu_repository_impl.dart'; -import 'package:hub/shared/components/molecules/menu/index.dart'; -import 'package:hub/shared/components/molecules/modules/index.dart'; - -import 'package:flutter_bloc/flutter_bloc.dart'; - +import 'package:hub/features/menu/index.dart'; +import 'package:hub/features/modules/index.dart'; +import 'package:hub/features/locals/index.dart'; class MenuEvent {} @@ -44,7 +36,7 @@ class MenuBloc extends Bloc { Future _onMenuEvent(MenuEvent event, Emitter emit) async { await LicenseRemoteDataSourceImpl().waitForSaveCompletion(); - + final List newEntries = await MenuRepositoryImpl().generateMenuEntries(entries, item); emit(state.copyWith(menuEntries: newEntries)); } @@ -54,6 +46,4 @@ class MenuBloc extends Bloc { _completer.cancel(); return super.close(); } - - } diff --git a/lib/shared/components/molecules/menu/presentation/blocs/menu_item_bloc.dart b/lib/features/menu/presentation/blocs/menu_item_bloc.dart similarity index 100% rename from lib/shared/components/molecules/menu/presentation/blocs/menu_item_bloc.dart rename to lib/features/menu/presentation/blocs/menu_item_bloc.dart diff --git a/lib/shared/components/molecules/menu/presentation/blocs/menu_view_bloc.dart b/lib/features/menu/presentation/blocs/menu_view_bloc.dart similarity index 100% rename from lib/shared/components/molecules/menu/presentation/blocs/menu_view_bloc.dart rename to lib/features/menu/presentation/blocs/menu_view_bloc.dart diff --git a/lib/shared/components/molecules/menu/presentation/index.dart b/lib/features/menu/presentation/index.dart similarity index 100% rename from lib/shared/components/molecules/menu/presentation/index.dart rename to lib/features/menu/presentation/index.dart diff --git a/lib/shared/components/molecules/menu/presentation/mappers/index.dart b/lib/features/menu/presentation/mappers/index.dart similarity index 100% rename from lib/shared/components/molecules/menu/presentation/mappers/index.dart rename to lib/features/menu/presentation/mappers/index.dart diff --git a/lib/shared/components/molecules/menu/presentation/mappers/menu_entry.dart b/lib/features/menu/presentation/mappers/menu_entry.dart similarity index 98% rename from lib/shared/components/molecules/menu/presentation/mappers/menu_entry.dart rename to lib/features/menu/presentation/mappers/menu_entry.dart index 6d7ac800..0b443f7a 100644 --- a/lib/shared/components/molecules/menu/presentation/mappers/menu_entry.dart +++ b/lib/features/menu/presentation/mappers/menu_entry.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; +import 'package:hub/features/modules/index.dart'; import 'package:hub/flutter_flow/internationalization.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/shared/components/molecules/modules/domain/entities/base_module.dart'; enum MenuEntryType { Home, Drawer, Property } diff --git a/lib/shared/components/molecules/menu/presentation/widgets/index.dart b/lib/features/menu/presentation/widgets/index.dart similarity index 100% rename from lib/shared/components/molecules/menu/presentation/widgets/index.dart rename to lib/features/menu/presentation/widgets/index.dart diff --git a/lib/shared/components/molecules/menu/presentation/widgets/menu_factory.dart b/lib/features/menu/presentation/widgets/menu_factory.dart similarity index 85% rename from lib/shared/components/molecules/menu/presentation/widgets/menu_factory.dart rename to lib/features/menu/presentation/widgets/menu_factory.dart index 79bf3454..3092a115 100644 --- a/lib/shared/components/molecules/menu/presentation/widgets/menu_factory.dart +++ b/lib/features/menu/presentation/widgets/menu_factory.dart @@ -1,11 +1,9 @@ -import 'package:hub/flutter_flow/nav/nav.dart'; +import 'package:hub/features/locals/index.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:hub/features/menu/index.dart'; +import 'package:hub/features/modules/index.dart'; -import 'package:hub/flutter_flow/flutter_flow_theme.dart'; -import 'package:hub/shared/components/molecules/locals/index.dart'; -import 'package:hub/shared/components/molecules/modules/index.dart'; -import 'package:hub/shared/components/molecules/menu/index.dart'; import 'package:hub/shared/utils/loading_util.dart'; class Menufactory extends StatelessWidget { @@ -41,8 +39,6 @@ class Menufactory extends StatelessWidget { return _buildMenuBloc(context); } - - Widget _buildMenuBloc(BuildContext context) { return BlocProvider( create: (context) => MenuBloc( diff --git a/lib/shared/components/molecules/menu/presentation/widgets/menu_item/index.dart b/lib/features/menu/presentation/widgets/menu_item/index.dart similarity index 100% rename from lib/shared/components/molecules/menu/presentation/widgets/menu_item/index.dart rename to lib/features/menu/presentation/widgets/menu_item/index.dart diff --git a/lib/shared/components/molecules/menu/presentation/widgets/menu_item/menu_item_button.dart b/lib/features/menu/presentation/widgets/menu_item/menu_item_button.dart similarity index 98% rename from lib/shared/components/molecules/menu/presentation/widgets/menu_item/menu_item_button.dart rename to lib/features/menu/presentation/widgets/menu_item/menu_item_button.dart index 7e861894..2b0d5576 100644 --- a/lib/shared/components/molecules/menu/presentation/widgets/menu_item/menu_item_button.dart +++ b/lib/features/menu/presentation/widgets/menu_item/menu_item_button.dart @@ -1,8 +1,7 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; +import 'package:hub/features/menu/index.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; -import 'package:hub/shared/components/molecules/menu/index.dart'; - class ButtonMenuItem extends MenuItem { const ButtonMenuItem({ diff --git a/lib/shared/components/molecules/menu/presentation/widgets/menu_item/menu_item_card.dart b/lib/features/menu/presentation/widgets/menu_item/menu_item_card.dart similarity index 97% rename from lib/shared/components/molecules/menu/presentation/widgets/menu_item/menu_item_card.dart rename to lib/features/menu/presentation/widgets/menu_item/menu_item_card.dart index b120a09d..6ea197ce 100644 --- a/lib/shared/components/molecules/menu/presentation/widgets/menu_item/menu_item_card.dart +++ b/lib/features/menu/presentation/widgets/menu_item/menu_item_card.dart @@ -1,8 +1,7 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; +import 'package:hub/features/menu/index.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; -import 'package:hub/shared/components/molecules/menu/index.dart'; - class CardMenuItem extends MenuItem { const CardMenuItem({ diff --git a/lib/shared/components/molecules/menu/presentation/widgets/menu_view/index.dart b/lib/features/menu/presentation/widgets/menu_view/index.dart similarity index 100% rename from lib/shared/components/molecules/menu/presentation/widgets/menu_view/index.dart rename to lib/features/menu/presentation/widgets/menu_view/index.dart diff --git a/lib/shared/components/molecules/menu/presentation/widgets/menu_view/menu_list_view.dart b/lib/features/menu/presentation/widgets/menu_view/menu_list_view.dart similarity index 98% rename from lib/shared/components/molecules/menu/presentation/widgets/menu_view/menu_list_view.dart rename to lib/features/menu/presentation/widgets/menu_view/menu_list_view.dart index 277fd2c3..cd301a64 100644 --- a/lib/shared/components/molecules/menu/presentation/widgets/menu_view/menu_list_view.dart +++ b/lib/features/menu/presentation/widgets/menu_view/menu_list_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hub/shared/components/molecules/menu/index.dart'; +import 'package:hub/features/menu/domain/index.dart'; import '/flutter_flow/flutter_flow_icon_button.dart'; import '/flutter_flow/flutter_flow_theme.dart'; diff --git a/lib/shared/components/molecules/menu/presentation/widgets/menu_view/menu_staggered_view.dart b/lib/features/menu/presentation/widgets/menu_view/menu_staggered_view.dart similarity index 98% rename from lib/shared/components/molecules/menu/presentation/widgets/menu_view/menu_staggered_view.dart rename to lib/features/menu/presentation/widgets/menu_view/menu_staggered_view.dart index fbaf5056..4a81ac5b 100644 --- a/lib/shared/components/molecules/menu/presentation/widgets/menu_view/menu_staggered_view.dart +++ b/lib/features/menu/presentation/widgets/menu_view/menu_staggered_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hub/shared/components/molecules/menu/index.dart'; +import 'package:hub/features/menu/index.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; diff --git a/lib/shared/components/molecules/modules/constants/index.dart b/lib/features/modules/constants/index.dart similarity index 100% rename from lib/shared/components/molecules/modules/constants/index.dart rename to lib/features/modules/constants/index.dart diff --git a/lib/shared/components/molecules/modules/constants/license_constants.dart b/lib/features/modules/constants/license_constants.dart similarity index 100% rename from lib/shared/components/molecules/modules/constants/license_constants.dart rename to lib/features/modules/constants/license_constants.dart diff --git a/lib/shared/components/molecules/modules/data/data_sources/index.dart b/lib/features/modules/data/data_sources/index.dart similarity index 100% rename from lib/shared/components/molecules/modules/data/data_sources/index.dart rename to lib/features/modules/data/data_sources/index.dart diff --git a/lib/shared/components/molecules/modules/data/data_sources/license_local_data_source.dart b/lib/features/modules/data/data_sources/license_local_data_source.dart similarity index 72% rename from lib/shared/components/molecules/modules/data/data_sources/license_local_data_source.dart rename to lib/features/modules/data/data_sources/license_local_data_source.dart index ff502e5f..ff2390c4 100644 --- a/lib/shared/components/molecules/modules/data/data_sources/license_local_data_source.dart +++ b/lib/features/modules/data/data_sources/license_local_data_source.dart @@ -1,12 +1,6 @@ - -import 'dart:developer'; - -import 'package:hub/shared/components/molecules/modules/index.dart'; -import 'package:hub/shared/helpers/database/database_helper.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; +import 'package:hub/features/modules/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/shared/extensions/string_extensions.dart'; -import 'package:sqflite/sqflite.dart'; abstract class LicenseLocalDataSource { Future init(); @@ -23,10 +17,9 @@ class LicenseLocalDataSourceImpl implements LicenseLocalDataSource { factory LicenseLocalDataSourceImpl() => _instance; LicenseLocalDataSourceImpl._internal(); - @override Future init() async { - await DatabaseStorage.instance.init(); + await DatabaseService.instance.init(); } @override @@ -45,19 +38,18 @@ class LicenseLocalDataSourceImpl implements LicenseLocalDataSource { @override Future isNewVersion() async { - final String? reponse = await StorageHelper().get(KeychainStorageKey.isNewVersion.value); + final String? reponse = await StorageHelper().get(LocalsStorageKey.isNewVersion.key); final bool isNewVersion = reponse.toBoolean(); return isNewVersion; } @override Future get(String key) async { - var response = await DatabaseStorage.database.query(tableLicense, where: 'key = ?', whereArgs: [key]); + var response = await DatabaseService.database.query(tableLicense, where: 'key = ?', whereArgs: [key]); if (response.isEmpty) { return null; } - - + return response.toString(); } @@ -66,8 +58,8 @@ class LicenseLocalDataSourceImpl implements LicenseLocalDataSource { value as Map; if (value.isEmpty) return; if (key == 'null') return; - - await DatabaseStorage.database.rawInsert( + + await DatabaseService.database.rawInsert( 'INSERT OR REPLACE INTO $tableLicense (key, display, expirationDate, startDate, quantity) VALUES (?, ?, ?, ?, ?)', [key, value['display'], value['expirationDate'], value['startDate'], value['quantity']], ); @@ -76,12 +68,11 @@ class LicenseLocalDataSourceImpl implements LicenseLocalDataSource { @override Future del(String key) async { - await DatabaseStorage.database.delete(tableLicense, where: 'key = ?', whereArgs: [key]); + await DatabaseService.database.delete(tableLicense, where: 'key = ?', whereArgs: [key]); } @override Future clear() async { - await DatabaseStorage.database.delete(tableLicense); - + await DatabaseService.database.delete(tableLicense); } } diff --git a/lib/shared/components/molecules/modules/data/data_sources/license_remote_data_source.dart b/lib/features/modules/data/data_sources/license_remote_data_source.dart similarity index 65% rename from lib/shared/components/molecules/modules/data/data_sources/license_remote_data_source.dart rename to lib/features/modules/data/data_sources/license_remote_data_source.dart index 9927d370..9bee2849 100644 --- a/lib/shared/components/molecules/modules/data/data_sources/license_remote_data_source.dart +++ b/lib/features/modules/data/data_sources/license_remote_data_source.dart @@ -3,10 +3,9 @@ import 'dart:async'; import 'dart:developer'; -import 'package:hub/backend/api_requests/api_calls.dart'; -import 'package:hub/shared/components/molecules/locals/index.dart'; -import 'package:hub/shared/components/molecules/modules/index.dart'; -import 'package:hub/shared/helpers/database/database_helper.dart'; +import 'package:hub/features/backend/index.dart'; +import 'package:hub/features/locals/data/repositories/locals_repository_impl.dart'; +import 'package:hub/features/modules/index.dart'; import 'package:sqflite/sqflite.dart'; @@ -22,47 +21,31 @@ class LicenseRemoteDataSourceImpl implements LicenseRemoteDataSource { factory LicenseRemoteDataSourceImpl() => _instance; LicenseRemoteDataSourceImpl._internal(); - - - - @override Future processLicense() async {} @override Future cleanLicense() async { LocalsRepositoryImpl.license.add(false); - } - @override + @override Future setupLicense(Database database, bool isNewVersion) async { log('Setting up license...'); try { - final License license = await License.getLicense(isNewVersion); + final License license = await License.getLicense(isNewVersion); - final List inactiveModuleKey = license.modules - .where((module) => module.display == ModuleStatus.inactive.key) - .map((module) => module.key) - .toList(); + final List inactiveModuleKey = license.modules.where((module) => module.display == ModuleStatus.inactive.key).map((module) => module.key).toList(); - final List activeModuleKey = license.modules - .where((module) => module.display == ModuleStatus.active.key) - .map((module) => module.key) - .toList(); + final List activeModuleKey = license.modules.where((module) => module.display == ModuleStatus.active.key).map((module) => module.key).toList(); - final List disabledModuleKey = license.modules - .where((module) => module.display == ModuleStatus.disabled.key) - .map((module) => module.key) - .toList(); + final List disabledModuleKey = license.modules.where((module) => module.display == ModuleStatus.disabled.key).map((module) => module.key).toList(); - await LicenseLocalDataSourceImpl().setDisplayByKey(inactiveModuleKey, 'INVISIVEL'); - await LicenseLocalDataSourceImpl().setDisplayByKey(activeModuleKey, 'VISIVEL'); - await LicenseLocalDataSourceImpl().setDisplayByKey(disabledModuleKey, 'DESABILITADO'); - - - - return true; + await LicenseLocalDataSourceImpl().setDisplayByKey(inactiveModuleKey, 'INVISIVEL'); + await LicenseLocalDataSourceImpl().setDisplayByKey(activeModuleKey, 'VISIVEL'); + await LicenseLocalDataSourceImpl().setDisplayByKey(disabledModuleKey, 'DESABILITADO'); + + return true; } catch (e, s) { log('Erro ao configurar licenças: $e', stackTrace: s); return false; @@ -76,11 +59,9 @@ class LicenseRemoteDataSourceImpl implements LicenseRemoteDataSource { final response = await PhpGroup.getLicense(); final dynamic responseBody = response.jsonBody; - if (responseBody == []) { return true; - } - else if (response.jsonBody is! List) { + } else if (response.jsonBody is! List) { late final String error; if (response.jsonBody is Map) error = response.jsonBody['error_msg']; @@ -90,8 +71,6 @@ class LicenseRemoteDataSourceImpl implements LicenseRemoteDataSource { throw Exception('Erro ao consultar licenças: $error'); } - - List> saveOperations = []; for (var element in responseBody) { if (licenseContainsKey(element['key'])) { @@ -112,7 +91,6 @@ class LicenseRemoteDataSourceImpl implements LicenseRemoteDataSource { } static bool licenseContainsKey(final String key) { - return LicenseKeys.values.map((e) => e.value).toList().contains(key); } diff --git a/lib/shared/components/molecules/modules/data/index.dart b/lib/features/modules/data/index.dart similarity index 100% rename from lib/shared/components/molecules/modules/data/index.dart rename to lib/features/modules/data/index.dart diff --git a/lib/shared/components/molecules/modules/data/models/index.dart b/lib/features/modules/data/models/index.dart similarity index 100% rename from lib/shared/components/molecules/modules/data/models/index.dart rename to lib/features/modules/data/models/index.dart diff --git a/lib/shared/components/molecules/modules/data/models/license_model.dart b/lib/features/modules/data/models/license_model.dart similarity index 100% rename from lib/shared/components/molecules/modules/data/models/license_model.dart rename to lib/features/modules/data/models/license_model.dart diff --git a/lib/shared/components/molecules/modules/data/models/license_model.freezed.dart b/lib/features/modules/data/models/license_model.freezed.dart similarity index 100% rename from lib/shared/components/molecules/modules/data/models/license_model.freezed.dart rename to lib/features/modules/data/models/license_model.freezed.dart diff --git a/lib/shared/components/molecules/modules/data/models/license_model.g.dart b/lib/features/modules/data/models/license_model.g.dart similarity index 100% rename from lib/shared/components/molecules/modules/data/models/license_model.g.dart rename to lib/features/modules/data/models/license_model.g.dart diff --git a/lib/shared/components/molecules/modules/data/models/module_model.dart b/lib/features/modules/data/models/module_model.dart similarity index 100% rename from lib/shared/components/molecules/modules/data/models/module_model.dart rename to lib/features/modules/data/models/module_model.dart diff --git a/lib/shared/components/molecules/modules/data/models/module_model.freezed.dart b/lib/features/modules/data/models/module_model.freezed.dart similarity index 100% rename from lib/shared/components/molecules/modules/data/models/module_model.freezed.dart rename to lib/features/modules/data/models/module_model.freezed.dart diff --git a/lib/shared/components/molecules/modules/data/models/module_model.g.dart b/lib/features/modules/data/models/module_model.g.dart similarity index 100% rename from lib/shared/components/molecules/modules/data/models/module_model.g.dart rename to lib/features/modules/data/models/module_model.g.dart diff --git a/lib/shared/components/molecules/modules/data/repositories/index.dart b/lib/features/modules/data/repositories/index.dart similarity index 100% rename from lib/shared/components/molecules/modules/data/repositories/index.dart rename to lib/features/modules/data/repositories/index.dart diff --git a/lib/shared/components/molecules/modules/data/repositories/license_repository_impl.dart b/lib/features/modules/data/repositories/license_repository_impl.dart similarity index 63% rename from lib/shared/components/molecules/modules/data/repositories/license_repository_impl.dart rename to lib/features/modules/data/repositories/license_repository_impl.dart index 1ef3589a..bc33f656 100644 --- a/lib/shared/components/molecules/modules/data/repositories/license_repository_impl.dart +++ b/lib/features/modules/data/repositories/license_repository_impl.dart @@ -1,9 +1,8 @@ import 'dart:developer'; -import 'package:hub/shared/components/molecules/modules/data/data_sources/license_local_data_source.dart'; -import 'package:hub/shared/components/molecules/modules/data/data_sources/license_remote_data_source.dart'; -import 'package:hub/shared/components/molecules/modules/domain/respositories/license_repository.dart'; -import 'package:hub/shared/helpers/database/database_helper.dart'; +import 'package:hub/features/modules/data/data_sources/index.dart'; +import 'package:hub/features/modules/domain/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:sqflite/sqflite.dart'; typedef LicenseStatus = bool; @@ -11,25 +10,21 @@ typedef LicenseStatus = bool; class LicenseRepositoryImpl implements LicenseRepository { final LicenseLocalDataSource localDataSource = LicenseLocalDataSourceImpl(); final LicenseRemoteDataSource remoteDataSource = LicenseRemoteDataSourceImpl(); - final Database database = DatabaseStorage.database; + final Database database = DatabaseService.database; LicenseRepositoryImpl(); - - @override Future updateLicense() async { log('updateLicense'); bool result = false; final bool isNewVersion = await localDataSource.isNewVersion(); result = await remoteDataSource.setupLicense(database, isNewVersion); - if (isNewVersion) { - result = await remoteDataSource.fetchLicenses(isNewVersion); - } + if (isNewVersion) { + result = await remoteDataSource.fetchLicenses(isNewVersion); + } - return result; - } @override diff --git a/lib/shared/components/molecules/modules/domain/entities/base_module.dart b/lib/features/modules/domain/entities/base_module.dart similarity index 100% rename from lib/shared/components/molecules/modules/domain/entities/base_module.dart rename to lib/features/modules/domain/entities/base_module.dart diff --git a/lib/shared/components/molecules/modules/domain/entities/index.dart b/lib/features/modules/domain/entities/index.dart similarity index 100% rename from lib/shared/components/molecules/modules/domain/entities/index.dart rename to lib/features/modules/domain/entities/index.dart diff --git a/lib/shared/components/molecules/modules/domain/entities/license.dart b/lib/features/modules/domain/entities/license.dart similarity index 93% rename from lib/shared/components/molecules/modules/domain/entities/license.dart rename to lib/features/modules/domain/entities/license.dart index 045e5559..d7e4524f 100644 --- a/lib/shared/components/molecules/modules/domain/entities/license.dart +++ b/lib/features/modules/domain/entities/license.dart @@ -1,6 +1,5 @@ +import 'package:hub/features/storage/index.dart'; import 'package:hub/shared/extensions/string_extensions.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; import 'module.dart'; @@ -61,7 +60,7 @@ class License { } static Future _precessWpp() async { - final bool whatsapp = await StorageHelper().get(KeychainStorageKey.whatsapp.value).then((v) => v.toBoolean()); + final bool whatsapp = await StorageHelper().get(LocalsStorageKey.whatsapp.key).then((v) => v.toBoolean()); if (whatsapp) return ModuleStatus.active.key; else @@ -69,7 +68,7 @@ class License { } static Future _processProvisional() async { - final bool provisional = await StorageHelper().get(KeychainStorageKey.provisional.value).then((v) => v.toBoolean()); + final bool provisional = await StorageHelper().get(LocalsStorageKey.provisional.key).then((v) => v.toBoolean()); if (provisional) return ModuleStatus.active.key; else @@ -77,7 +76,7 @@ class License { } static Future _processPets() async { - final bool pets = await StorageHelper().get(KeychainStorageKey.pets.value).then((v) => v.toBoolean()); + final bool pets = await StorageHelper().get(LocalsStorageKey.pets.key).then((v) => v.toBoolean()); if (pets) return ModuleStatus.active.key; else diff --git a/lib/shared/components/molecules/modules/domain/entities/module.dart b/lib/features/modules/domain/entities/module.dart similarity index 94% rename from lib/shared/components/molecules/modules/domain/entities/module.dart rename to lib/features/modules/domain/entities/module.dart index 7dc2e8c2..43cff382 100644 --- a/lib/shared/components/molecules/modules/domain/entities/module.dart +++ b/lib/features/modules/domain/entities/module.dart @@ -1,5 +1,4 @@ -import 'package:hub/shared/components/molecules/modules/data/models/module_model.dart'; - +import 'package:hub/features/modules/index.dart'; enum ModuleStatus { active, inactive, disabled } @@ -26,7 +25,6 @@ enum EnumDisplay { } } - extension ModuleStatusExtension on ModuleStatus { String get key { switch (this) { @@ -40,7 +38,6 @@ extension ModuleStatusExtension on ModuleStatus { } } - class Module { final String key; final String display; @@ -48,14 +45,12 @@ class Module { final String startDate; final int quantity; - Module({ required this.key, required this.display, required this.expirationDate, required this.startDate, required this.quantity, - }); factory Module.fromModel(ModuleModel model) { @@ -77,6 +72,4 @@ class Module { quantity: quantity, ); } - - } diff --git a/lib/shared/components/molecules/modules/domain/index.dart b/lib/features/modules/domain/index.dart similarity index 100% rename from lib/shared/components/molecules/modules/domain/index.dart rename to lib/features/modules/domain/index.dart diff --git a/lib/shared/components/molecules/modules/domain/respositories/index.dart b/lib/features/modules/domain/respositories/index.dart similarity index 100% rename from lib/shared/components/molecules/modules/domain/respositories/index.dart rename to lib/features/modules/domain/respositories/index.dart diff --git a/lib/shared/components/molecules/modules/domain/respositories/license_repository.dart b/lib/features/modules/domain/respositories/license_repository.dart similarity index 100% rename from lib/shared/components/molecules/modules/domain/respositories/license_repository.dart rename to lib/features/modules/domain/respositories/license_repository.dart diff --git a/lib/features/modules/domain/usecases/index.dart b/lib/features/modules/domain/usecases/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/shared/components/molecules/modules/index.dart b/lib/features/modules/index.dart similarity index 100% rename from lib/shared/components/molecules/modules/index.dart rename to lib/features/modules/index.dart diff --git a/lib/features/modules/presentation/blocs/index.dart b/lib/features/modules/presentation/blocs/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/shared/components/molecules/modules/presentation/index.dart b/lib/features/modules/presentation/index.dart similarity index 100% rename from lib/shared/components/molecules/modules/presentation/index.dart rename to lib/features/modules/presentation/index.dart diff --git a/lib/features/modules/presentation/widgets/index.dart b/lib/features/modules/presentation/widgets/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/shared/services/deeplink/deep_link_service.dart b/lib/features/notifications/deep_link_service.dart similarity index 97% rename from lib/shared/services/deeplink/deep_link_service.dart rename to lib/features/notifications/deep_link_service.dart index 5df6ff67..5712a7ae 100644 --- a/lib/shared/services/deeplink/deep_link_service.dart +++ b/lib/features/notifications/deep_link_service.dart @@ -2,10 +2,10 @@ import 'dart:async'; import 'dart:developer'; import 'package:app_links/app_links.dart'; import 'package:flutter/material.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/pages/forgot_password_page/forgot_password_screen.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; class DeepLinkService { static final DeepLinkService _instance = DeepLinkService._internal(); diff --git a/lib/backend/notifications/firebase_messaging_service.dart b/lib/features/notifications/firebase_messaging_service.dart similarity index 82% rename from lib/backend/notifications/firebase_messaging_service.dart rename to lib/features/notifications/firebase_messaging_service.dart index 3b768ad2..07fe7df5 100644 --- a/lib/backend/notifications/firebase_messaging_service.dart +++ b/lib/features/notifications/firebase_messaging_service.dart @@ -1,18 +1,15 @@ import 'dart:developer'; import 'package:firebase_messaging/firebase_messaging.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; +import 'package:hub/features/backend/index.dart'; +import 'package:hub/features/storage/data/index.dart'; + import 'package:hub/shared/utils/log_util.dart'; import 'notification_service.dart'; Future handleMessage(RemoteMessage message) async { - NotificationService.show( - title: message.notification!.title!, - body: message.notification!.body!, - payload: Map.from(message.data)); + NotificationService.show(title: message.notification!.title!, body: message.notification!.body!, payload: Map.from(message.data)); } class FirebaseMessagingService { diff --git a/lib/features/notifications/index.dart b/lib/features/notifications/index.dart new file mode 100644 index 00000000..0fa0fda8 --- /dev/null +++ b/lib/features/notifications/index.dart @@ -0,0 +1,3 @@ +export 'deep_link_service.dart'; +export 'firebase_messaging_service.dart'; +export 'notification_service.dart'; diff --git a/lib/backend/notifications/notification_service.dart b/lib/features/notifications/notification_service.dart similarity index 91% rename from lib/backend/notifications/notification_service.dart rename to lib/features/notifications/notification_service.dart index c771a378..06f77ff9 100644 --- a/lib/backend/notifications/notification_service.dart +++ b/lib/features/notifications/notification_service.dart @@ -1,28 +1,22 @@ import 'package:awesome_notifications/awesome_notifications.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; import 'package:hub/components/templates_components/details_component/details_component_widget.dart'; import 'package:hub/components/templates_components/message_notificaion_modal_template_component/message_notification_widget.dart'; +import 'package:hub/features/backend/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; import 'package:hub/shared/utils/dialog_util.dart'; Future onMessageReceived(Map payload, String? extra, String? handleClick) async { final localId = jsonDecode(payload['local']!)['CLI_ID']; - final cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; - answersRequest( - {required BuildContext context, - required String? ref, - required String? task, - required String? response, - required String? id}) async { + answersRequest({required BuildContext context, required String? ref, required String? task, required String? response, required String? id}) async { final ApiCallResponse? respondeSolicitacaoCall; final RespondeSolicitacaoCall callback = PhpGroup.respondeSolicitacaoCall; @@ -144,8 +138,7 @@ Future onMessageReceived(Map payload, String? extra, Stri ptText: 'Mensagem', ): payload['mensagem'], }), - imagePath: - 'https://freaccess.com.br/freaccess/getImage.php?cliID=$cliUUID&atividade=getFoto&Documento=${payload['documento'] ?? ''}&tipo=E', + imagePath: 'https://freaccess.com.br/freaccess/getImage.php?cliID=$cliUUID&atividade=getFoto&Documento=${payload['documento'] ?? ''}&tipo=E', statusHashMap: [ { FFLocalizations.of(context).getVariableText( @@ -177,8 +170,7 @@ Future onMessageReceived(Map payload, String? extra, Stri return Dialog( backgroundColor: Colors.transparent, child: DetailsComponentWidget( - imagePath: - 'https://freaccess.com.br/freaccess/getImage.php?cliID=$cliUUID&atividade=getFoto&Documento=$id&tipo=$type', + imagePath: 'https://freaccess.com.br/freaccess/getImage.php?cliID=$cliUUID&atividade=getFoto&Documento=$id&tipo=$type', labelsHashMap: Map.from({ FFLocalizations.of(context).getVariableText( enText: 'Name', @@ -270,12 +262,11 @@ class NotificationService { debug: kDebugMode); await AwesomeNotifications().isNotificationAllowed().then((isAllowed) async { - final bool requestOSnotification = - (await StorageHelper().get(KeychainStorageKey.requestOSNotification.value)) == 'true'; + final bool requestOSnotification = (await StorageHelper().get(LocalsStorageKey.requestOSNotification.key)) == 'true'; if (requestOSnotification == false) { if (isAllowed == false) { - await StorageHelper().set(KeychainStorageKey.requestOSNotification.value, true); + await StorageHelper().set(LocalsStorageKey.requestOSNotification.key, true); await AwesomeNotifications().requestPermissionToSendNotifications(); } } @@ -332,10 +323,7 @@ class NotificationService { ), actionButtons: actionButtons, schedule: scheduled - ? NotificationInterval( - interval: Duration(seconds: interval!), - timeZone: await AwesomeNotifications().getLocalTimeZoneIdentifier(), - preciseAlarm: true) + ? NotificationInterval(interval: Duration(seconds: interval!), timeZone: await AwesomeNotifications().getLocalTimeZoneIdentifier(), preciseAlarm: true) : null); } } diff --git a/lib/features/profile/data/data_sources/index.dart b/lib/features/profile/data/data_sources/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/shared/helpers/storage/keychain_storage.dart b/lib/features/profile/data/data_sources/profile_local_data_source.dart similarity index 60% rename from lib/shared/helpers/storage/keychain_storage.dart rename to lib/features/profile/data/data_sources/profile_local_data_source.dart index b86cb7f9..99393e17 100644 --- a/lib/shared/helpers/storage/keychain_storage.dart +++ b/lib/features/profile/data/data_sources/profile_local_data_source.dart @@ -1,30 +1,37 @@ import 'dart:developer'; import 'package:hub/shared/constants/index.dart'; -import 'package:hub/shared/helpers/database/database_helper.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; + import 'package:sqflite/sqflite.dart'; -class KeychainHelper implements BaseStorage { - KeychainHelper._(); +import '../../../storage/application/service/database_service.dart'; +import '../../../storage/domain/entities/base_storage.dart'; - static final KeychainHelper instance = KeychainHelper._(); +abstract class ProfileLocalDataSource { + Future init(); + Future get(String key); + Future set(String key, T value); + Future delete(String key); + Future clearAll(); +} + +class ProfileLocalDataSourceImpl implements BaseStorage { + ProfileLocalDataSourceImpl._(); + + static final ProfileLocalDataSourceImpl instance = ProfileLocalDataSourceImpl._(); bool _isInitialized = false; - - @override Future init() async { if (_isInitialized) return; - await DatabaseStorage.instance.init(); + await DatabaseService.instance.init(); _isInitialized = true; } @override Future get(String key) async { - - var response = await DatabaseStorage.database.query(tableKeychain, where: 'key = ?', whereArgs: [key]); + var response = await DatabaseService.database.query(tableKeychain, where: 'key = ?', whereArgs: [key]); if (response.isEmpty) { return null; } @@ -34,9 +41,8 @@ class KeychainHelper implements BaseStorage { @override Future set(String key, T value) async { - var date = DateTime.now().toIso8601String(); - await DatabaseStorage.database.insert( + await DatabaseService.database.insert( tableKeychain, { 'key': key, @@ -52,19 +58,15 @@ class KeychainHelper implements BaseStorage { @override Future delete(String key) async { - await DatabaseStorage.database.delete(tableKeychain, where: 'key = ?', whereArgs: [key]); + await DatabaseService.database.delete(tableKeychain, where: 'key = ?', whereArgs: [key]); } @override Future clearAll() async { try { - await DatabaseStorage.database.delete(tableKeychain); - - + await DatabaseService.database.delete(tableKeychain); } catch (e, s) { log('() => clearAll keychain: $e', stackTrace: s); } } - - } diff --git a/lib/features/profile/data/index.dart b/lib/features/profile/data/index.dart new file mode 100644 index 00000000..186dfac9 --- /dev/null +++ b/lib/features/profile/data/index.dart @@ -0,0 +1,3 @@ +export 'data_sources/index.dart'; +export 'repositories/index.dart'; +export 'models/index.dart'; diff --git a/lib/features/profile/data/models/index.dart b/lib/features/profile/data/models/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/features/profile/data/repositories/index.dart b/lib/features/profile/data/repositories/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/features/profile/domain/entities/index.dart b/lib/features/profile/domain/entities/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/features/profile/domain/index.dart b/lib/features/profile/domain/index.dart new file mode 100644 index 00000000..00b76d59 --- /dev/null +++ b/lib/features/profile/domain/index.dart @@ -0,0 +1,3 @@ +export 'entities/index.dart'; +export 'respositories/index.dart'; +export 'usecases/index.dart'; diff --git a/lib/features/profile/domain/respositories/index.dart b/lib/features/profile/domain/respositories/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/features/profile/domain/usecases/index.dart b/lib/features/profile/domain/usecases/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/features/profile/index.dart b/lib/features/profile/index.dart new file mode 100644 index 00000000..aa560630 --- /dev/null +++ b/lib/features/profile/index.dart @@ -0,0 +1,3 @@ +export 'data/index.dart'; +export 'domain/index.dart'; +export 'presentation/index.dart'; diff --git a/lib/features/profile/presentation/blocs/index.dart b/lib/features/profile/presentation/blocs/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/features/profile/presentation/index.dart b/lib/features/profile/presentation/index.dart new file mode 100644 index 00000000..48b6447a --- /dev/null +++ b/lib/features/profile/presentation/index.dart @@ -0,0 +1,3 @@ +export 'blocs/index.dart'; +export 'pages/index.dart'; +export 'widgets/index.dart'; diff --git a/lib/features/profile/presentation/pages/index.dart b/lib/features/profile/presentation/pages/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/features/profile/presentation/widgets/index.dart b/lib/features/profile/presentation/widgets/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/features/property/presentation/pages/about_property_screen.dart b/lib/features/property/presentation/pages/about_property_screen.dart index 7560cc25..a4180b6a 100644 --- a/lib/features/property/presentation/pages/about_property_screen.dart +++ b/lib/features/property/presentation/pages/about_property_screen.dart @@ -1,13 +1,11 @@ // ignore: must_be_immutable import 'package:flutter/material.dart'; -import 'package:hub/backend/schema/enums/enums.dart'; import 'package:hub/components/atomic_components/shared_components_atoms/appbar.dart'; +import 'package:hub/features/menu/index.dart'; import 'package:hub/flutter_flow/flutter_flow_model.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/shared/components/molecules/menu/index.dart'; -import 'package:hub/shared/components/molecules/modules/index.dart'; class AboutPropertyModel extends FlutterFlowModel { dynamic item; diff --git a/lib/features/storage/application/index.dart b/lib/features/storage/application/index.dart new file mode 100644 index 00000000..adb07df6 --- /dev/null +++ b/lib/features/storage/application/index.dart @@ -0,0 +1 @@ +export 'service/index.dart'; diff --git a/lib/shared/helpers/database/database_helper.dart b/lib/features/storage/application/service/database_service.dart similarity index 86% rename from lib/shared/helpers/database/database_helper.dart rename to lib/features/storage/application/service/database_service.dart index 1fe11f02..25124bbc 100644 --- a/lib/shared/helpers/database/database_helper.dart +++ b/lib/features/storage/application/service/database_service.dart @@ -1,17 +1,15 @@ -import 'package:hub/shared/components/molecules/modules/index.dart'; +import 'package:hub/features/modules/index.dart'; import 'package:hub/shared/constants/index.dart'; -import 'package:hub/shared/helpers/storage/keychain_storage.dart'; import 'package:sqflite/sqflite.dart'; import 'package:path/path.dart'; -import 'dart:developer'; -class DatabaseStorage { +class DatabaseService { static const String _dbName = 'database.db'; static const int _dbVersion = 2; - static final DatabaseStorage instance = DatabaseStorage._internal(); - factory DatabaseStorage() => instance; - DatabaseStorage._internal(); + static final DatabaseService instance = DatabaseService._internal(); + factory DatabaseService() => instance; + DatabaseService._internal(); static Database? _database; static Database get database { @@ -33,7 +31,7 @@ class DatabaseStorage { onUpgrade: _onUpgrade, onDowngrade: _onDowngrade, onOpen: _onOpen, - onConfigure: _onConfigure, + onConfigure: _onConfigure, ); await LicenseRepositoryImpl().updateLicense(); isInitialized = true; @@ -61,7 +59,7 @@ class DatabaseStorage { } Future _onDowngrade(Database database, int oldVersion, int newVersion) async { - print('Downgrading database from version $oldVersion to $newVersion...'); + print('Downgrading database from version $oldVersion to $newVersion...'); if (oldVersion >= 2 && newVersion < 2) { await _dropTables(database); } diff --git a/lib/features/storage/application/service/index.dart b/lib/features/storage/application/service/index.dart new file mode 100644 index 00000000..43178711 --- /dev/null +++ b/lib/features/storage/application/service/index.dart @@ -0,0 +1 @@ +export 'database_service.dart'; diff --git a/lib/features/storage/data/data_sources/database_storage_helper.dart b/lib/features/storage/data/data_sources/database_storage_helper.dart new file mode 100644 index 00000000..653506b9 --- /dev/null +++ b/lib/features/storage/data/data_sources/database_storage_helper.dart @@ -0,0 +1,33 @@ +import 'package:hub/features/storage/index.dart'; + +class DatabaseStorage implements BaseStorage { + @override + Future clearAll() { + // TODO: implement clearAll + throw UnimplementedError(); + } + + @override + Future delete(String key) { + // TODO: implement delete + throw UnimplementedError(); + } + + @override + Future get(String key) { + // TODO: implement get + throw UnimplementedError(); + } + + @override + Future init() { + // TODO: implement init + throw UnimplementedError(); + } + + @override + Future set(String key, T value) { + // TODO: implement set + throw UnimplementedError(); + } +} diff --git a/lib/features/storage/data/data_sources/index.dart b/lib/features/storage/data/data_sources/index.dart new file mode 100644 index 00000000..39123043 --- /dev/null +++ b/lib/features/storage/data/data_sources/index.dart @@ -0,0 +1,3 @@ +export 'database_storage_helper.dart'; +export 'secure_storage_helper.dart'; +export 'shared_storage_helper.dart'; diff --git a/lib/shared/helpers/storage/secure_storage.dart b/lib/features/storage/data/data_sources/secure_storage_helper.dart similarity index 85% rename from lib/shared/helpers/storage/secure_storage.dart rename to lib/features/storage/data/data_sources/secure_storage_helper.dart index e1138229..b3732665 100644 --- a/lib/shared/helpers/storage/secure_storage.dart +++ b/lib/features/storage/data/data_sources/secure_storage_helper.dart @@ -1,7 +1,7 @@ import 'dart:developer'; import 'package:flutter_secure_storage/flutter_secure_storage.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; +import 'package:hub/features/storage/index.dart'; class SecureStorage implements BaseStorage { SecureStorage._(); @@ -41,14 +41,13 @@ class SecureStorage implements BaseStorage { @override Future clearAll() async { log('Clearing SecureStorage'); - try{ - await _secureStorage.deleteAll( - aOptions: AndroidOptions(), - iOptions: IOSOptions(), - ); + try { + await _secureStorage.deleteAll( + aOptions: AndroidOptions(), + iOptions: IOSOptions(), + ); } catch (e, s) { log('Error clearing all: $e', stackTrace: s); } - } } diff --git a/lib/shared/helpers/storage/shared_preferences_storage.dart b/lib/features/storage/data/data_sources/shared_storage_helper.dart similarity index 93% rename from lib/shared/helpers/storage/shared_preferences_storage.dart rename to lib/features/storage/data/data_sources/shared_storage_helper.dart index a2561e2a..293205d2 100644 --- a/lib/shared/helpers/storage/shared_preferences_storage.dart +++ b/lib/features/storage/data/data_sources/shared_storage_helper.dart @@ -1,4 +1,4 @@ -import 'package:hub/shared/helpers/storage/base_storage.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:shared_preferences/shared_preferences.dart'; class SharedPreferencesStorage implements BaseStorage { diff --git a/lib/features/storage/data/index.dart b/lib/features/storage/data/index.dart new file mode 100644 index 00000000..186dfac9 --- /dev/null +++ b/lib/features/storage/data/index.dart @@ -0,0 +1,3 @@ +export 'data_sources/index.dart'; +export 'repositories/index.dart'; +export 'models/index.dart'; diff --git a/lib/features/storage/data/models/database_storage.dart b/lib/features/storage/data/models/database_storage.dart new file mode 100644 index 00000000..8c2ff39e --- /dev/null +++ b/lib/features/storage/data/models/database_storage.dart @@ -0,0 +1,125 @@ +import 'package:hub/features/storage/index.dart'; + +abstract class DatabaseStorageKey implements IDatabaseStorage { + final String key; + const DatabaseStorageKey(this.key); +} + +class ProfileStorageKey extends DatabaseStorageKey { + const ProfileStorageKey._(String key) : super(key); + + static const ProfileStorageKey userEmail = ProfileStorageKey._('fre_userEmail'); + static const ProfileStorageKey devUUID = ProfileStorageKey._('fre_devUUID'); + static const ProfileStorageKey userUUID = ProfileStorageKey._('fre_userUUID'); + static const ProfileStorageKey userDevUUID = ProfileStorageKey._('fre_userDevUUID'); + static const ProfileStorageKey status = ProfileStorageKey._('fre_status'); + static const ProfileStorageKey userName = ProfileStorageKey._('fre_userName'); + static const ProfileStorageKey clientUUID = ProfileStorageKey._('fre_cliUUID'); + static const ProfileStorageKey ownerUUID = ProfileStorageKey._('fre_ownerUUID'); + static const ProfileStorageKey clientName = ProfileStorageKey._('fre_cliName'); + static const ProfileStorageKey ownerName = ProfileStorageKey._('fre_ownerName'); +} + +class LocalsStorageKey extends DatabaseStorageKey { + const LocalsStorageKey._(String key) : super(key); + + static const LocalsStorageKey petAmount = LocalsStorageKey._('fre_petAmountRegister'); + static const LocalsStorageKey whatsapp = LocalsStorageKey._('fre_whatsapp'); + static const LocalsStorageKey provisional = LocalsStorageKey._('fre_provisional'); + static const LocalsStorageKey pets = LocalsStorageKey._('fre_pets'); + static const LocalsStorageKey local = LocalsStorageKey._('fre_local'); + static const LocalsStorageKey notify = LocalsStorageKey._('fre_notify'); + static const LocalsStorageKey fingerprint = LocalsStorageKey._('fre_fingerprint'); + static const LocalsStorageKey access = LocalsStorageKey._('fre_access'); + static const LocalsStorageKey panic = LocalsStorageKey._('fre_panic'); + static const LocalsStorageKey person = LocalsStorageKey._('fre_person'); + static const LocalsStorageKey requestOSNotification = LocalsStorageKey._('fre_requestOSnotification'); + static const LocalsStorageKey isNewVersion = LocalsStorageKey._('fre_isNewVersion'); +} + +// enum DatabaseStorageKey implements IDatabaseStorage { +// devUUID, +// userUUID, +// userDevUUID, +// status, +// userName, +// userEmail, +// clientUUID, +// ownerName, +// ownerUUID, +// clientName, +// petAmount, +// whatsapp, +// provisional, +// pets, +// local, +// notify, +// fingerprint, +// access, +// panic, +// person, +// requestOSNotification, +// isNewVersion, +// } + +// extension ProfileStorageKeyExtension on DatabaseStorageKey { +// String get profile { +// switch (this) { +// case DatabaseStorageKey.userEmail: +// return 'fre_userEmail'; +// case DatabaseStorageKey.devUUID: +// return 'fre_devUUID'; +// case DatabaseStorageKey.userUUID: +// return 'fre_userUUID'; +// case DatabaseStorageKey.userDevUUID: +// return 'fre_userDevUUID'; +// case DatabaseStorageKey.status: +// return 'fre_status'; +// case DatabaseStorageKey.userName: +// return 'fre_userName'; +// case DatabaseStorageKey.clientUUID: +// return 'fre_cliUUID'; +// case DatabaseStorageKey.ownerUUID: +// return 'fre_ownerUUID'; +// case DatabaseStorageKey.clientName: +// return 'fre_cliName'; +// case DatabaseStorageKey.ownerName: +// return 'fre_ownerName'; +// default: +// return ''; +// } +// } +// } + +// extension LocalsStorageKeyExtension on DatabaseStorageKey { +// String get locals { +// switch (this) { +// case DatabaseStorageKey.petAmount: +// return 'fre_petAmountRegister'; +// case DatabaseStorageKey.whatsapp: +// return 'fre_whatsapp'; +// case DatabaseStorageKey.provisional: +// return 'fre_provisional'; +// case DatabaseStorageKey.pets: +// return 'fre_pets'; +// case DatabaseStorageKey.local: +// return 'fre_local'; +// case DatabaseStorageKey.notify: +// return 'fre_notify'; +// case DatabaseStorageKey.fingerprint: +// return 'fre_fingerprint'; +// case DatabaseStorageKey.access: +// return 'fre_access'; +// case DatabaseStorageKey.panic: +// return 'fre_panic'; +// case DatabaseStorageKey.person: +// return 'fre_person'; +// case DatabaseStorageKey.requestOSNotification: +// return 'fre_requestOSnotification'; +// case DatabaseStorageKey.isNewVersion: +// return 'fre_isNewVersion'; +// default: +// return ''; +// } +// } +// } diff --git a/lib/features/storage/data/models/index.dart b/lib/features/storage/data/models/index.dart new file mode 100644 index 00000000..c840252e --- /dev/null +++ b/lib/features/storage/data/models/index.dart @@ -0,0 +1,4 @@ +export 'database_storage.dart'; +export 'secure_storage.dart'; +export 'shared_storage.dart'; +export 'storage.dart'; diff --git a/lib/features/storage/data/models/secure_storage.dart b/lib/features/storage/data/models/secure_storage.dart new file mode 100644 index 00000000..bd6d6dde --- /dev/null +++ b/lib/features/storage/data/models/secure_storage.dart @@ -0,0 +1,43 @@ +import 'package:hub/features/storage/index.dart'; + +enum SecureStorageKey implements ISecureStorageKey { + isLogged, + email, + password, + deviceType, + token, + accessPass, + panicPass, + fingerprintPass, + haveLocal, + deviceDescription, +} + +extension SecureStorageKeyExtension on SecureStorageKey { + String get value { + switch (this) { + case SecureStorageKey.isLogged: + return 'fre_isLogged'; + case SecureStorageKey.email: + return 'fre_email'; + case SecureStorageKey.password: + return 'fre_passwd'; + case SecureStorageKey.deviceType: + return 'fre_deviceType'; + case SecureStorageKey.token: + return 'fre_token'; + case SecureStorageKey.accessPass: + return 'fre_accessPass'; + case SecureStorageKey.panicPass: + return 'fre_panicPass'; + case SecureStorageKey.fingerprintPass: + return 'fre_fingerprintPass'; + case SecureStorageKey.haveLocal: + return 'fre_have_local'; + case SecureStorageKey.deviceDescription: + return 'fre_deviceDescription'; + default: + return ''; + } + } +} diff --git a/lib/features/storage/data/models/shared_storage.dart b/lib/features/storage/data/models/shared_storage.dart new file mode 100644 index 00000000..7cd1dc3e --- /dev/null +++ b/lib/features/storage/data/models/shared_storage.dart @@ -0,0 +1,16 @@ +import 'package:hub/features/storage/index.dart'; + +enum SharedPreferencesKey implements ISharedPreferencesKey { + isFirstRun, +} + +extension SharedPreferencesKeyExtension on SharedPreferencesKey { + String get value { + switch (this) { + case SharedPreferencesKey.isFirstRun: + return 'fre_isFirstRun'; + default: + return ''; + } + } +} diff --git a/lib/features/storage/data/models/storage.dart b/lib/features/storage/data/models/storage.dart new file mode 100644 index 00000000..b881cf3f --- /dev/null +++ b/lib/features/storage/data/models/storage.dart @@ -0,0 +1,7 @@ +import 'package:hub/features/storage/index.dart'; + +enum Storage implements IStorage { + secureStorage, + sharedPreferences, + databaseStorage, +} diff --git a/lib/features/storage/data/repositories/index.dart b/lib/features/storage/data/repositories/index.dart new file mode 100644 index 00000000..1a23c63f --- /dev/null +++ b/lib/features/storage/data/repositories/index.dart @@ -0,0 +1 @@ +export 'storage_repository.dart'; diff --git a/lib/shared/helpers/storage/storage_helper.dart b/lib/features/storage/data/repositories/storage_repository.dart similarity index 80% rename from lib/shared/helpers/storage/storage_helper.dart rename to lib/features/storage/data/repositories/storage_repository.dart index c157698f..af5953af 100644 --- a/lib/shared/helpers/storage/storage_helper.dart +++ b/lib/features/storage/data/repositories/storage_repository.dart @@ -1,10 +1,8 @@ import 'dart:developer'; import 'package:flutter/cupertino.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/keychain_storage.dart'; -import 'package:hub/shared/helpers/storage/secure_storage.dart'; -import 'package:hub/shared/helpers/storage/shared_preferences_storage.dart'; +import 'package:hub/features/profile/data/data_sources/profile_local_data_source.dart'; +import 'package:hub/features/storage/index.dart'; class StorageHelper { static final StorageHelper _instance = StorageHelper._internal(); @@ -22,14 +20,14 @@ class StorageHelper { Future init() async { await SecureStorage.instance.init(); await SharedPreferencesStorage.instance.init(); - await KeychainHelper.instance.init(); + await ProfileLocalDataSourceImpl.instance.init(); String? isFirstRun = await SharedPreferencesStorage.instance.get(SharedPreferencesKey.isFirstRun.value); if (isFirstRun != 'false') { log('First run'); await SharedPreferencesStorage.instance.set(SharedPreferencesKey.isFirstRun.value, false); - await SecureStorage.instance.set(SecureStorageKey.isLogged.value, false); + await SecureStorage.instance.set(SecureStorageKey.isLogged.value, false); } } @@ -40,7 +38,7 @@ class StorageHelper { case Storage.sharedPreferences: return SharedPreferencesStorage.instance; default: - return KeychainHelper.instance; + return ProfileLocalDataSourceImpl.instance; } } @@ -50,7 +48,7 @@ class StorageHelper { } else if (SharedPreferencesKey.values.map((e) => e.value).toList().contains(key)) { return SharedPreferencesStorage.instance; } else { - return KeychainHelper.instance; + return ProfileLocalDataSourceImpl.instance; } } diff --git a/lib/features/storage/domain/entities/base_storage.dart b/lib/features/storage/domain/entities/base_storage.dart new file mode 100644 index 00000000..c1cb6f45 --- /dev/null +++ b/lib/features/storage/domain/entities/base_storage.dart @@ -0,0 +1,11 @@ +abstract class BaseStorage { + Future init(); + + Future set(String key, T value); + + Future get(String key); + + Future delete(String key); + + Future clearAll(); +} diff --git a/lib/features/storage/domain/entities/database_storage.dart b/lib/features/storage/domain/entities/database_storage.dart new file mode 100644 index 00000000..36dafd89 --- /dev/null +++ b/lib/features/storage/domain/entities/database_storage.dart @@ -0,0 +1,3 @@ +import 'package:hub/features/storage/index.dart'; + +abstract class IDatabaseStorage implements IStorage {} diff --git a/lib/features/storage/domain/entities/index.dart b/lib/features/storage/domain/entities/index.dart new file mode 100644 index 00000000..582e38ee --- /dev/null +++ b/lib/features/storage/domain/entities/index.dart @@ -0,0 +1,5 @@ +export 'base_storage.dart'; +export 'database_storage.dart'; +export 'secure_storage.dart'; +export 'shared_storage.dart'; +export 'storage.dart'; diff --git a/lib/features/storage/domain/entities/secure_storage.dart b/lib/features/storage/domain/entities/secure_storage.dart new file mode 100644 index 00000000..a78a931d --- /dev/null +++ b/lib/features/storage/domain/entities/secure_storage.dart @@ -0,0 +1,3 @@ +import 'package:hub/features/storage/index.dart'; + +abstract class ISecureStorageKey implements IStorage {} diff --git a/lib/features/storage/domain/entities/shared_storage.dart b/lib/features/storage/domain/entities/shared_storage.dart new file mode 100644 index 00000000..f1e9fb35 --- /dev/null +++ b/lib/features/storage/domain/entities/shared_storage.dart @@ -0,0 +1,3 @@ +import 'package:hub/features/storage/index.dart'; + +abstract class ISharedPreferencesKey implements IStorage {} diff --git a/lib/features/storage/domain/entities/storage.dart b/lib/features/storage/domain/entities/storage.dart new file mode 100644 index 00000000..d1902c81 --- /dev/null +++ b/lib/features/storage/domain/entities/storage.dart @@ -0,0 +1 @@ +abstract class IStorage {} diff --git a/lib/features/storage/domain/index.dart b/lib/features/storage/domain/index.dart new file mode 100644 index 00000000..00b76d59 --- /dev/null +++ b/lib/features/storage/domain/index.dart @@ -0,0 +1,3 @@ +export 'entities/index.dart'; +export 'respositories/index.dart'; +export 'usecases/index.dart'; diff --git a/lib/features/storage/domain/respositories/index.dart b/lib/features/storage/domain/respositories/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/features/storage/domain/usecases/index.dart b/lib/features/storage/domain/usecases/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/features/storage/index.dart b/lib/features/storage/index.dart new file mode 100644 index 00000000..65f22682 --- /dev/null +++ b/lib/features/storage/index.dart @@ -0,0 +1,3 @@ +export 'data/index.dart'; +export 'domain/index.dart'; +export 'application/index.dart'; diff --git a/lib/flutter_flow/flutter_flow_button_tabbar.dart b/lib/flutter_flow/flutter_flow_button_tabbar.dart index 45bee44f..d8860120 100644 --- a/lib/flutter_flow/flutter_flow_button_tabbar.dart +++ b/lib/flutter_flow/flutter_flow_button_tabbar.dart @@ -586,7 +586,7 @@ class _FlutterFlowButtonTabBarState extends State with } Widget _buildStyledTab(Widget child, int index) { - final TabBarTheme tabBarTheme = TabBarTheme.of(context); + final TabBarTheme tabBarTheme = TabBarTheme.of(context) as TabBarTheme; final double animationValue; if (index == _currentIndex) { diff --git a/lib/flutter_flow/index.dart b/lib/flutter_flow/index.dart new file mode 100644 index 00000000..d27a3f04 --- /dev/null +++ b/lib/flutter_flow/index.dart @@ -0,0 +1,23 @@ +export 'custom_functions.dart'; +export 'custom_icons.dart'; +export 'flutter_flow_animations.dart'; +export 'flutter_flow_button_tabbar.dart'; +export 'flutter_flow_checkbox_group.dart'; +export 'flutter_flow_drop_down.dart'; +export 'flutter_flow_icon_button.dart'; +export 'flutter_flow_model.dart'; +export 'flutter_flow_theme.dart'; +export 'flutter_flow_util.dart'; +export 'flutter_flow_widgets.dart'; +export 'form_field_controller.dart'; +export 'internationalization.dart'; +export 'keep_alive_wrapper.dart'; +export 'lat_lng.dart'; +export 'permissions_util.dart'; +export 'place.dart'; +export 'random_data_util.dart'; +export 'request_manager.dart'; +export 'uploaded_file.dart'; +export 'upload_data.dart'; + +export 'nav/index.dart'; diff --git a/lib/flutter_flow/nav/index.dart b/lib/flutter_flow/nav/index.dart new file mode 100644 index 00000000..e1ef24f5 --- /dev/null +++ b/lib/flutter_flow/nav/index.dart @@ -0,0 +1,2 @@ +export 'nav.dart'; +export 'serialization_util.dart'; diff --git a/lib/flutter_flow/nav/nav.dart b/lib/flutter_flow/nav/nav.dart index ae2e56c4..8af1b46b 100644 --- a/lib/flutter_flow/nav/nav.dart +++ b/lib/flutter_flow/nav/nav.dart @@ -1,13 +1,15 @@ import 'dart:async'; -import 'dart:developer'; import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:hub/backend/schema/util/schema_util.dart'; +import 'package:hub/features/backend/index.dart'; import 'package:hub/features/history/index.dart'; import 'package:hub/features/home/index.dart'; +import 'package:hub/features/locals/index.dart'; +import 'package:hub/features/menu/index.dart'; import 'package:hub/features/property/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/pages/delivery_schedule_page/delivery_schedule_widget.dart'; @@ -32,14 +34,6 @@ import 'package:hub/pages/sign_up_page/sign_up_page_widget.dart'; import 'package:hub/pages/vehicles_on_the_property/vehicles_on_the_property.dart'; import 'package:hub/pages/visits_on_the_property/visits_on_the_property_screen.dart'; import 'package:hub/pages/welcome_page/welcome_page_widget.dart'; -import 'package:hub/shared/components/molecules/locals/data/repositories/locals_repository_impl.dart'; -import 'package:hub/shared/components/molecules/locals/presentation/blocs/local_profile_bloc.dart'; -import 'package:hub/shared/components/molecules/menu/domain/entities/menu_item.dart'; -import 'package:hub/shared/components/molecules/menu/presentation/blocs/menu_bloc.dart'; -import 'package:hub/shared/components/molecules/menu/presentation/mappers/menu_entry.dart'; -import 'package:hub/shared/components/molecules/menu/presentation/widgets/menu_view/menu_list_view.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:provider/provider.dart'; export 'package:go_router/go_router.dart'; @@ -94,8 +88,8 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { future: () async { final bool isLogged = await StorageHelper().get(SecureStorageKey.isLogged.value) == 'true'; final bool haveLocal = await StorageHelper().get(SecureStorageKey.haveLocal.value) == 'true'; - final bool haveUserUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value))?.isNotEmpty ?? false; - final bool haveDevUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value))?.isNotEmpty ?? false; + final bool haveUserUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key))?.isNotEmpty ?? false; + final bool haveDevUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key))?.isNotEmpty ?? false; if (isLogged && haveDevUUID && haveUserUUID) { return haveLocal diff --git a/lib/flutter_flow/nav/serialization_util.dart b/lib/flutter_flow/nav/serialization_util.dart index 18018306..97a91ecf 100644 --- a/lib/flutter_flow/nav/serialization_util.dart +++ b/lib/flutter_flow/nav/serialization_util.dart @@ -1,9 +1,7 @@ import 'dart:convert'; import 'package:flutter/material.dart'; - -import '/backend/schema/structs/index.dart'; -import '/backend/schema/enums/enums.dart'; +import 'package:hub/features/backend/index.dart'; import '../../flutter_flow/lat_lng.dart'; import '../../flutter_flow/place.dart'; @@ -39,11 +37,7 @@ String? serializeParam( return null; } if (isList) { - final serializedValues = (param as Iterable) - .map((p) => serializeParam(p, paramType, isList: false)) - .where((p) => p != null) - .map((p) => p!) - .toList(); + final serializedValues = (param as Iterable).map((p) => serializeParam(p, paramType, isList: false)).where((p) => p != null).map((p) => p!).toList(); return json.encode(serializedValues); } String? data; @@ -115,9 +109,7 @@ LatLng? latLngFromString(String? latLngStr) { FFPlace placeFromString(String placeStr) { final serializedData = jsonDecode(placeStr) as Map; final data = { - 'latLng': serializedData.containsKey('latLng') - ? latLngFromString(serializedData['latLng'] as String) - : const LatLng(0.0, 0.0), + 'latLng': serializedData.containsKey('latLng') ? latLngFromString(serializedData['latLng'] as String) : const LatLng(0.0, 0.0), 'name': serializedData['name'] ?? '', 'address': serializedData['address'] ?? '', 'city': serializedData['city'] ?? '', diff --git a/lib/initialization.dart b/lib/initialization.dart index 564b073f..cdc93bc0 100644 --- a/lib/initialization.dart +++ b/lib/initialization.dart @@ -7,11 +7,12 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_web_plugins/url_strategy.dart'; -import 'package:hub/backend/notifications/notification_service.dart'; +import 'package:hub/features/notifications/index.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; + +import 'features/storage/index.dart'; Future initializeApp() async { WidgetsFlutterBinding.ensureInitialized(); diff --git a/lib/main.dart b/lib/main.dart index 00c6e724..23e155e3 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -6,16 +6,15 @@ import 'package:firebase_crashlytics/firebase_crashlytics.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:hub/backend/notifications/notification_service.dart'; +import 'package:hub/features/notifications/index.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/internationalization.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; -import 'package:hub/shared/services/deeplink/deep_link_service.dart'; + import 'package:responsive_framework/responsive_framework.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'features/storage/index.dart'; import 'initialization.dart'; final GlobalKey navigatorKey = GlobalKey(); diff --git a/lib/pages/fast_pass_page/fast_pass_page_widget.dart b/lib/pages/fast_pass_page/fast_pass_page_widget.dart index 31bb70eb..5c88e7a7 100644 --- a/lib/pages/fast_pass_page/fast_pass_page_widget.dart +++ b/lib/pages/fast_pass_page/fast_pass_page_widget.dart @@ -5,10 +5,9 @@ import 'dart:io' show Platform; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; import 'package:hub/shared/utils/webview_util.dart'; import 'package:url_launcher/url_launcher_string.dart'; import 'package:webview_flutter/webview_flutter.dart'; @@ -26,10 +25,10 @@ class _FastPassPageWidgetState extends State { Future> initVariables() async { final email = (await StorageHelper().get(SecureStorageKey.email.value)) ?? ''; - final name = (await StorageHelper().get(KeychainStorageKey.userName.value)) ?? ''; - final devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final name = (await StorageHelper().get(ProfileStorageKey.userName.key)) ?? ''; + final devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const createdAt = '0000-00-00 00:00:00'; final url = 'https://hub.freaccess.com.br/hub/fast-pass/$cliUUID'; final freUserData = @@ -56,17 +55,13 @@ class _FastPassPageWidgetState extends State { if (snapshot.connectionState == ConnectionState.waiting) { return const Center(child: CircularProgressIndicator()); } else if (snapshot.hasError || !snapshot.hasData || snapshot.data!.isEmpty) { - return Center( - child: Text(FFLocalizations.of(context) - .getVariableText(enText: 'Unexpected error', ptText: 'Erro inesperado'))); + return Center(child: Text(FFLocalizations.of(context).getVariableText(enText: 'Unexpected error', ptText: 'Erro inesperado'))); } else { final data = snapshot.data!; final url = data['url']!; final userUUID = data['userUUID']!; final freUserData = data['freUserData']!; - return Platform.isIOS - ? _buildIOSWebView(url, userUUID, freUserData) - : _buildAndroidWebView(url, userUUID, freUserData); + return Platform.isIOS ? _buildIOSWebView(url, userUUID, freUserData) : _buildAndroidWebView(url, userUUID, freUserData); } }, ), @@ -120,9 +115,7 @@ class _FastPassPageWidgetState extends State { } }, onNavigationRequest: (NavigationRequest request) { - if (request.url.startsWith('http') || - request.url.startsWith('https://api.whatsapp.com/send') || - request.url.startsWith('https://wa.me')) { + if (request.url.startsWith('http') || request.url.startsWith('https://api.whatsapp.com/send') || request.url.startsWith('https://wa.me')) { launchUrlString(request.url); return NavigationDecision.prevent; } diff --git a/lib/pages/forgot_password_page/forgot_password_screen.dart b/lib/pages/forgot_password_page/forgot_password_screen.dart index d63d2017..e5742371 100644 --- a/lib/pages/forgot_password_page/forgot_password_screen.dart +++ b/lib/pages/forgot_password_page/forgot_password_screen.dart @@ -2,8 +2,9 @@ import 'package:easy_debounce/easy_debounce.dart'; import 'package:flutter/material.dart'; import 'package:flutter_animate/flutter_animate.dart'; import 'package:google_fonts/google_fonts.dart'; +import 'package:hub/features/authentication/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; import '../../flutter_flow/flutter_flow_animations.dart'; import '../../flutter_flow/flutter_flow_icon_button.dart'; @@ -11,7 +12,6 @@ import '../../flutter_flow/flutter_flow_model.dart'; import '../../flutter_flow/flutter_flow_theme.dart'; import '../../flutter_flow/flutter_flow_widgets.dart'; import '../../flutter_flow/internationalization.dart'; -import '../../shared/services/authentication/authentication_service.dart'; import 'forgot_password_model.dart'; class ForgotPasswordScreen extends StatefulWidget { @@ -183,8 +183,7 @@ class _ForgotPasswordScreenState extends State with Ticker style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, fontWeight: FontWeight.bold, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), ), ), ), @@ -200,12 +199,9 @@ class _ForgotPasswordScreenState extends State with Ticker controller: _model.passwordRegisterFormTextController, focusNode: _model.passwordRegisterFormFocusNode, visibility: _model.passwordRegisterFormVisibility, - onVisibilityToggle: () => setState( - () => _model.passwordRegisterFormVisibility = !_model.passwordRegisterFormVisibility), - label: - FFLocalizations.of(context).getVariableText(ptText: 'Nova Senha', enText: 'New Password'), - hint: FFLocalizations.of(context) - .getVariableText(ptText: 'Insira sua senha', enText: 'Enter your password'), + onVisibilityToggle: () => setState(() => _model.passwordRegisterFormVisibility = !_model.passwordRegisterFormVisibility), + label: FFLocalizations.of(context).getVariableText(ptText: 'Nova Senha', enText: 'New Password'), + hint: FFLocalizations.of(context).getVariableText(ptText: 'Insira sua senha', enText: 'Enter your password'), asValidator: _model.passwordRegisterFormTextControllerValidator.asValidator(context), ), _buildPasswordField( @@ -213,12 +209,9 @@ class _ForgotPasswordScreenState extends State with Ticker controller: _model.passwordConfirmFormTextController, focusNode: _model.passwordConfirmFormFocusNode, visibility: _model.passwordConfirmFormVisibility, - onVisibilityToggle: () => setState( - () => _model.passwordConfirmFormVisibility = !_model.passwordConfirmFormVisibility), - label: FFLocalizations.of(context) - .getVariableText(ptText: 'Confirme a Senha', enText: 'Confirm Password'), - hint: FFLocalizations.of(context) - .getVariableText(ptText: 'Confirme sua senha', enText: 'Confirm your password'), + onVisibilityToggle: () => setState(() => _model.passwordConfirmFormVisibility = !_model.passwordConfirmFormVisibility), + label: FFLocalizations.of(context).getVariableText(ptText: 'Confirme a Senha', enText: 'Confirm Password'), + hint: FFLocalizations.of(context).getVariableText(ptText: 'Confirme sua senha', enText: 'Confirm your password'), asValidator: _model.passwordConfirmFormTextControllerValidator.asValidator(context), ), ], diff --git a/lib/pages/liberation_history/liberation_history_model.dart b/lib/pages/liberation_history/liberation_history_model.dart index 8c016069..f51d5d65 100644 --- a/lib/pages/liberation_history/liberation_history_model.dart +++ b/lib/pages/liberation_history/liberation_history_model.dart @@ -1,10 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; +import 'package:hub/features/backend/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_model.dart'; import 'package:hub/flutter_flow/request_manager.dart'; import 'package:hub/pages/liberation_history/liberation_history_widget.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; class LiberationHistoryModel extends FlutterFlowModel { late final String devUUID; @@ -36,17 +35,12 @@ class LiberationHistoryModel extends FlutterFlowModel { } Future init() async { - devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } - Future answersRequest( - {required BuildContext context, - required String? ref, - required String? task, - required String? response, - required String? id}) async { + Future answersRequest({required BuildContext context, required String? ref, required String? task, required String? response, required String? id}) async { final ApiCallResponse? respondeSolicitacaoCall; final RespondeSolicitacaoCall callback = PhpGroup.respondeSolicitacaoCall; diff --git a/lib/pages/liberation_history/liberation_history_widget.dart b/lib/pages/liberation_history/liberation_history_widget.dart index 4eba3c0a..50f060d4 100644 --- a/lib/pages/liberation_history/liberation_history_widget.dart +++ b/lib/pages/liberation_history/liberation_history_widget.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart'; import 'package:hub/components/templates_components/details_component/details_component_widget.dart'; +import 'package:hub/features/backend/index.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; @@ -56,27 +56,20 @@ class _LiberationHistoryWidgetState extends State { return Map.from({ '${FFLocalizations.of(context).getVariableText(ptText: 'Nome', enText: 'Name')}:': request['VTE_NOME'], '${FFLocalizations.of(context).getVariableText(ptText: 'Dt. Envio', enText: 'Date Send')}:': - request['NOT_DTENVIO'] != null - ? ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', request['NOT_DTENVIO']) - : '', + request['NOT_DTENVIO'] != null ? ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', request['NOT_DTENVIO']) : '', '${FFLocalizations.of(context).getVariableText(ptText: 'Motivo', enText: 'Reason')}:': request['NOT_MOTIVO'], - if (details == true) - '${FFLocalizations.of(context).getVariableText(ptText: 'Mensagem', enText: 'Message')}:': - request['NOT_MSGENVIO'], + if (details == true) '${FFLocalizations.of(context).getVariableText(ptText: 'Mensagem', enText: 'Message')}:': request['NOT_MSGENVIO'], }); } Map _statusHashMap(dynamic request) { return Map.from({ if (request['NOT_STATUS'] == 'L') - FFLocalizations.of(context).getVariableText(ptText: 'Finalizado', enText: 'Finished'): - FlutterFlowTheme.of(context).success + FFLocalizations.of(context).getVariableText(ptText: 'Finalizado', enText: 'Finished'): FlutterFlowTheme.of(context).success else if (request['NOT_STATUS'] == 'B') - FFLocalizations.of(context).getVariableText(ptText: 'Bloqueado', enText: 'Blocked'): - FlutterFlowTheme.of(context).error + FFLocalizations.of(context).getVariableText(ptText: 'Bloqueado', enText: 'Blocked'): FlutterFlowTheme.of(context).error else - FFLocalizations.of(context).getVariableText(ptText: 'Ativo', enText: 'Active'): - FlutterFlowTheme.of(context).warning + FFLocalizations.of(context).getVariableText(ptText: 'Ativo', enText: 'Active'): FlutterFlowTheme.of(context).warning }); } @@ -142,8 +135,7 @@ class _LiberationHistoryWidgetState extends State { mainAxisSize: MainAxisSize.max, children: [ Center( - child: Text(FFLocalizations.of(context) - .getVariableText(ptText: "Nenhuma solicitação encontrada!", enText: "No requests found")), + child: Text(FFLocalizations.of(context).getVariableText(ptText: "Nenhuma solicitação encontrada!", enText: "No requests found")), ) ], ), diff --git a/lib/pages/message_history_page/message_history_page_model.dart b/lib/pages/message_history_page/message_history_page_model.dart index 1a2cd70d..81ec3075 100644 --- a/lib/pages/message_history_page/message_history_page_model.dart +++ b/lib/pages/message_history_page/message_history_page_model.dart @@ -1,10 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hub/backend/api_requests/api_manager.dart'; +import 'package:hub/features/backend/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_model.dart'; import 'package:hub/flutter_flow/request_manager.dart'; import 'package:hub/pages/message_history_page/message_history_page_widget.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; class MessageHistoryPageModel extends FlutterFlowModel { late final String devUUID; @@ -39,9 +38,9 @@ class MessageHistoryPageModel extends FlutterFlowModel } Future init() async { - devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } @override diff --git a/lib/pages/message_history_page/message_history_page_widget.dart b/lib/pages/message_history_page/message_history_page_widget.dart index 84624c22..74682ac9 100644 --- a/lib/pages/message_history_page/message_history_page_widget.dart +++ b/lib/pages/message_history_page/message_history_page_widget.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; +import 'package:hub/features/backend/index.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; @@ -226,9 +226,7 @@ class _MessageHistoryPageWidgetState extends State wit mainAxisSize: MainAxisSize.max, children: [ Center( - child: Text( - FFLocalizations.of(context) - .getVariableText(ptText: "Nenhuma mensagem encontrada!", enText: "No message found"), + child: Text(FFLocalizations.of(context).getVariableText(ptText: "Nenhuma mensagem encontrada!", enText: "No message found"), style: TextStyle( color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedSubHeaderFontSize, diff --git a/lib/pages/package_order_page/package_order_page.dart b/lib/pages/package_order_page/package_order_page.dart index 980c5c0b..0ac4b95d 100644 --- a/lib/pages/package_order_page/package_order_page.dart +++ b/lib/pages/package_order_page/package_order_page.dart @@ -2,15 +2,15 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; import 'package:hub/components/molecular_components/order_filter_modal/order_filter_modal_widget.dart'; import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart'; import 'package:hub/components/templates_components/details_component/details_component_widget.dart'; +import 'package:hub/features/backend/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; + import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; @@ -64,7 +64,7 @@ class _PackageOrderPage extends State { } Future initDatabase() async { - cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value) ?? ''); + cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key) ?? ''); } @override @@ -96,10 +96,7 @@ class _PackageOrderPage extends State { setState(() => _loading = true); var response = await PhpGroup.buscaEnconcomendas.call( - pageSize: _pageSize.toString(), - page: _pageNumber.toString(), - adresseeType: _adresseeType == '.*' ? 'TOD' : _adresseeType, - status: _status == '.*' ? 'all' : _status); + pageSize: _pageSize.toString(), page: _pageNumber.toString(), adresseeType: _adresseeType == '.*' ? 'TOD' : _adresseeType, status: _status == '.*' ? 'all' : _status); final List orders = response.jsonBody['value']['list'] ?? []; @@ -255,8 +252,7 @@ class _PackageOrderPage extends State { children: [ Center( child: Text( - FFLocalizations.of(context) - .getVariableText(ptText: "Nenhuma encomenda encontrada!", enText: "No orders found!"), + FFLocalizations.of(context).getVariableText(ptText: "Nenhuma encomenda encontrada!", enText: "No orders found!"), style: TextStyle( color: FlutterFlowTheme.of(context).primaryText, fontSize: LimitedFontSizeUtil.getHeaderFontSize(context), @@ -306,42 +302,26 @@ class _PackageOrderPage extends State { Map _labelsHashMap(dynamic order) { return Map.from({ - if (order['isPending'] == true) - '${FFLocalizations.of(context).getVariableText(ptText: 'Cód. Retirada', enText: 'Pickup Code')}:': - order['id'].toString(), - '${FFLocalizations.of(context).getVariableText(ptText: 'Categoria', enText: 'Category')}:': - order['customCategory'], - '${FFLocalizations.of(context).getVariableText(ptText: 'Recebido em', enText: 'Received on')}:': - ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', order['dtReceive']), + if (order['isPending'] == true) '${FFLocalizations.of(context).getVariableText(ptText: 'Cód. Retirada', enText: 'Pickup Code')}:': order['id'].toString(), + '${FFLocalizations.of(context).getVariableText(ptText: 'Categoria', enText: 'Category')}:': order['customCategory'], + '${FFLocalizations.of(context).getVariableText(ptText: 'Recebido em', enText: 'Received on')}:': ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', order['dtReceive']), if (order['isPending'] == false) - '${FFLocalizations.of(context).getVariableText(ptText: 'Retirado em', enText: 'Picked up on')}:': - ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', order['dtPickUp']), + '${FFLocalizations.of(context).getVariableText(ptText: 'Retirado em', enText: 'Picked up on')}:': ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', order['dtPickUp']), }); } Map _labelsHashMapDialog(dynamic order) { return Map.from({ - if (order['isPending'] == true) - '${FFLocalizations.of(context).getVariableText(ptText: 'Cód. Retirada', enText: 'Pickup Code')}:': - order['id'].toString(), - '${FFLocalizations.of(context).getVariableText(ptText: 'Categoria', enText: 'Category')}:': - order['customCategory'], - if (order['code'] != null) - '${FFLocalizations.of(context).getVariableText(ptText: 'Cód. Objeto', enText: 'Object Code')}:': order['code'], - '${FFLocalizations.of(context).getVariableText(ptText: 'Entregue por', enText: 'Delivered by')}:': - order['sendedBy'], - '${FFLocalizations.of(context).getVariableText(ptText: 'Recebido por', enText: 'Received by')}:': - order['receivedBy'], - '${FFLocalizations.of(context).getVariableText(ptText: 'Recebido em', enText: 'Received on')}:': - ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', order['dtReceive']), + if (order['isPending'] == true) '${FFLocalizations.of(context).getVariableText(ptText: 'Cód. Retirada', enText: 'Pickup Code')}:': order['id'].toString(), + '${FFLocalizations.of(context).getVariableText(ptText: 'Categoria', enText: 'Category')}:': order['customCategory'], + if (order['code'] != null) '${FFLocalizations.of(context).getVariableText(ptText: 'Cód. Objeto', enText: 'Object Code')}:': order['code'], + '${FFLocalizations.of(context).getVariableText(ptText: 'Entregue por', enText: 'Delivered by')}:': order['sendedBy'], + '${FFLocalizations.of(context).getVariableText(ptText: 'Recebido por', enText: 'Received by')}:': order['receivedBy'], + '${FFLocalizations.of(context).getVariableText(ptText: 'Recebido em', enText: 'Received on')}:': ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', order['dtReceive']), + if (order['isPending'] == false) '${FFLocalizations.of(context).getVariableText(ptText: 'Retirado por', enText: 'Picked up by')}:': order['pickedUpBy'], if (order['isPending'] == false) - '${FFLocalizations.of(context).getVariableText(ptText: 'Retirado por', enText: 'Picked up by')}:': - order['pickedUpBy'], - if (order['isPending'] == false) - '${FFLocalizations.of(context).getVariableText(ptText: 'Retirado em', enText: 'Picked up on')}:': - ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', order['dtPickUp']), - if (order['message'] != null) - '${FFLocalizations.of(context).getVariableText(ptText: 'Mensagem', enText: 'Message')}:': order['message'] + '${FFLocalizations.of(context).getVariableText(ptText: 'Retirado em', enText: 'Picked up on')}:': ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', order['dtPickUp']), + if (order['message'] != null) '${FFLocalizations.of(context).getVariableText(ptText: 'Mensagem', enText: 'Message')}:': order['message'] }); } @@ -349,13 +329,11 @@ class _PackageOrderPage extends State { return [ if (order['isPending'] == true) Map.from({ - FFLocalizations.of(context).getVariableText(ptText: 'Aguardando Retirada', enText: 'Waiting Pick up'): - FlutterFlowTheme.of(context).warning, + FFLocalizations.of(context).getVariableText(ptText: 'Aguardando Retirada', enText: 'Waiting Pick up'): FlutterFlowTheme.of(context).warning, }) else Map.from({ - FFLocalizations.of(context).getVariableText(ptText: 'Retirado', enText: 'Picked up'): - FlutterFlowTheme.of(context).primary, + FFLocalizations.of(context).getVariableText(ptText: 'Retirado', enText: 'Picked up'): FlutterFlowTheme.of(context).primary, }), if (order['adresseeType'] == 'PRO') Map.from({ @@ -391,14 +369,11 @@ class _PackageOrderPage extends State { statusHashMap: [ if (order['isPending'] == true) Map.from({ - FFLocalizations.of(context).getVariableText( - ptText: 'Aguardando Retirada', - enText: 'Waiting Pick up'): FlutterFlowTheme.of(context).warning, + FFLocalizations.of(context).getVariableText(ptText: 'Aguardando Retirada', enText: 'Waiting Pick up'): FlutterFlowTheme.of(context).warning, }) else Map.from({ - FFLocalizations.of(context).getVariableText(ptText: 'Retirado', enText: 'Picked up'): - FlutterFlowTheme.of(context).primary, + FFLocalizations.of(context).getVariableText(ptText: 'Retirado', enText: 'Picked up'): FlutterFlowTheme.of(context).primary, }), ], buttons: const [], @@ -417,4 +392,4 @@ class _PackageOrderPage extends State { body: _appBody(context), ); } -} \ No newline at end of file +} diff --git a/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart b/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart index a1146aeb..1c4b13ec 100644 --- a/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart +++ b/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart @@ -2,7 +2,7 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; +import 'package:hub/features/backend/index.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; diff --git a/lib/pages/pets_on_the_property_page/pets_history_screen.dart b/lib/pages/pets_on_the_property_page/pets_history_screen.dart index b32ba509..d66ff2b8 100644 --- a/lib/pages/pets_on_the_property_page/pets_history_screen.dart +++ b/lib/pages/pets_on_the_property_page/pets_history_screen.dart @@ -1,15 +1,15 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; -import 'package:hub/backend/api_requests/api_manager.dart'; + import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart'; +import 'package:hub/features/backend/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/pages/pets_page/pets_page_model.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; + import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; @@ -58,10 +58,11 @@ class _PetsHistoryScreenState extends State with TickerProvid return AppBar( backgroundColor: FlutterFlowTheme.of(context).primaryBackground, automaticallyImplyLeading: false, - title: Text(FFLocalizations.of(context).getVariableText( - ptText: 'Pets', - enText: 'Pets', - ), + title: Text( + FFLocalizations.of(context).getVariableText( + ptText: 'Pets', + enText: 'Pets', + ), style: FlutterFlowTheme.of(context).headlineMedium.override( fontFamily: 'Nunito', color: FlutterFlowTheme.of(context).primaryText, @@ -176,9 +177,7 @@ class _PetsHistoryScreenState extends State with TickerProvid mainAxisSize: MainAxisSize.max, children: [ Center( - child: Text( - FFLocalizations.of(context) - .getVariableText(ptText: "Nenhum Pet encontrado!", enText: "No pets found"), + child: Text(FFLocalizations.of(context).getVariableText(ptText: "Nenhum Pet encontrado!", enText: "No pets found"), style: TextStyle( fontFamily: 'Nunito', fontSize: limitedHeaderTextSize, @@ -294,10 +293,10 @@ class _PetsHistoryScreenState extends State with TickerProvid } ], onTapCardItemAction: () async { - final devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; - final cliName = (await StorageHelper().get(KeychainStorageKey.clientName.value)) ?? ''; + final devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final cliName = (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; await showDialog( useSafeArea: true, context: context, diff --git a/lib/pages/pets_page/pets_page_model.dart b/lib/pages/pets_page/pets_page_model.dart index aeb213a9..0b1f93b0 100644 --- a/lib/pages/pets_page/pets_page_model.dart +++ b/lib/pages/pets_page/pets_page_model.dart @@ -4,16 +4,16 @@ import 'dart:developer'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; import 'package:hub/components/templates_components/details_component/details_component_widget.dart'; +import 'package:hub/features/backend/index.dart'; +import 'package:hub/features/storage/data/index.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/flutter_flow_widgets.dart'; import 'package:hub/flutter_flow/form_field_controller.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/pages/pets_page/pets_page_widget.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; + import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/image_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; @@ -147,21 +147,20 @@ class PetsPageModel extends FlutterFlowModel { textControllerObservation = TextEditingController(); WidgetsBinding.instance.addPostFrameCallback((_) async { - devUUID = await StorageHelper().get(KeychainStorageKey.devUUID.value) ?? ''; - userUUID = await StorageHelper().get(KeychainStorageKey.userUUID.value) ?? ''; - cliUUID = await StorageHelper().get(KeychainStorageKey.clientUUID.value) ?? ''; - petAmountRegister = await StorageHelper().get(KeychainStorageKey.petAmount.value) ?? ''; + devUUID = await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? ''; + userUUID = await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? ''; + cliUUID = await StorageHelper().get(ProfileStorageKey.clientUUID.key) ?? ''; + petAmountRegister = await StorageHelper().get(LocalsStorageKey.petAmount.key) ?? ''; }); } void setEditForm() { - if (item != null) petId = item['id']; // updateImage!(); (() async { - Response response = await get(Uri.parse( - 'https://freaccess.com.br/freaccess/getImage.php?devUUID=$devUUID&userUUID=$userUUID&cliID=$cliUUID&atividade=consultaFotoPet&petId=$petId')); + Response response = + await get(Uri.parse('https://freaccess.com.br/freaccess/getImage.php?devUUID=$devUUID&userUUID=$userUUID&cliID=$cliUUID&atividade=consultaFotoPet&petId=$petId')); String base64 = base64Encode(response.bodyBytes); uploadedTempFile = await ImageUtils.convertToUploadFile(base64); updateImage?.call(); @@ -238,14 +237,10 @@ class PetsPageModel extends FlutterFlowModel { return false; } - if (dropDownValueController1!.value == defaultDropDownText || - dropDownValueController1!.value == '' || - dropDownValueController1!.value == null) { + if (dropDownValueController1!.value == defaultDropDownText || dropDownValueController1!.value == '' || dropDownValueController1!.value == null) { return false; } - if (dropDownValueController2!.value == defaultDropDownText || - dropDownValueController2!.value == '' || - dropDownValueController2!.value == null) { + if (dropDownValueController2!.value == defaultDropDownText || dropDownValueController2!.value == '' || dropDownValueController2!.value == null) { return false; } @@ -263,8 +258,7 @@ class PetsPageModel extends FlutterFlowModel { Future updatePet() async { var img = await ImageUtils.convertImageFileToBase64(uploadedLocalFile!); img = "base64;jpeg,$img"; - final url = - 'https://freaccess.com.br/freaccess/getImage.php?devUUID=$devUUID&userUUID=$userUUID&cliID=$cliUUID&atividade=consultaFotoPet&petId=$petId'; + final url = 'https://freaccess.com.br/freaccess/getImage.php?devUUID=$devUUID&userUUID=$userUUID&cliID=$cliUUID&atividade=consultaFotoPet&petId=$petId'; final response = await PhpGroup.updatePet.call( petID: petId, image: img, @@ -507,17 +501,12 @@ class PetsPageModel extends FlutterFlowModel { : [], labelsHashMap: Map.from({ if (item['species'] != null && item['species'] != '') - '${FFLocalizations.of(context).getVariableText(ptText: "Espécie", enText: "Species")}:': - item['species'].toString().toUpperCase(), + '${FFLocalizations.of(context).getVariableText(ptText: "Espécie", enText: "Species")}:': item['species'].toString().toUpperCase(), if (item['breed'] != null && item['breed'] != '') - '${FFLocalizations.of(context).getVariableText(ptText: "Raça", enText: "Breed")}:': - item['breed'].toString().toUpperCase(), - if (item['color'] != null && item['color'] != '') - '${FFLocalizations.of(context).getVariableText(ptText: "Cor", enText: "Color")}:': - item['color'].toString().toUpperCase(), + '${FFLocalizations.of(context).getVariableText(ptText: "Raça", enText: "Breed")}:': item['breed'].toString().toUpperCase(), + if (item['color'] != null && item['color'] != '') '${FFLocalizations.of(context).getVariableText(ptText: "Cor", enText: "Color")}:': item['color'].toString().toUpperCase(), if (item['birthdayDate'] != null && item['birthdayDate'] != '') - '${FFLocalizations.of(context).getVariableText(ptText: "Data de Nascimento", enText: "Date of Birth")}:': - ValidatorUtil.formatDateTimePicker(item['birthdayDate']), + '${FFLocalizations.of(context).getVariableText(ptText: "Data de Nascimento", enText: "Date of Birth")}:': ValidatorUtil.formatDateTimePicker(item['birthdayDate']), if (item['gender'] != null && item['gender'] != '') '${FFLocalizations.of(context).getVariableText(ptText: "Gênero", enText: "Gender")}:': item['gender'] == 'MAC' ? FFLocalizations.of(context).getVariableText(ptText: 'MACHO', enText: 'MALE') @@ -534,11 +523,9 @@ class PetsPageModel extends FlutterFlowModel { : item['size'] == 'GIG' ? FFLocalizations.of(context).getVariableText(ptText: 'GIGANTE', enText: 'GIANT') : '', - if (item['notes'] != null && item['notes'] != '') - '${FFLocalizations.of(context).getVariableText(ptText: "Observação", enText: "Notes")}:': item['notes'] ?? '', + if (item['notes'] != null && item['notes'] != '') '${FFLocalizations.of(context).getVariableText(ptText: "Observação", enText: "Notes")}:': item['notes'] ?? '', }), - imagePath: - 'https://freaccess.com.br/freaccess/getImage.php?devUUID=$devUUID&userUUID=$userUUID&cliID=$cliUUID&atividade=consultaFotoPet&petId=${item['id'] ?? ''}', + imagePath: 'https://freaccess.com.br/freaccess/getImage.php?devUUID=$devUUID&userUUID=$userUUID&cliID=$cliUUID&atividade=consultaFotoPet&petId=${item['id'] ?? ''}', statusHashMap: [ if (item['gender'] == "MAC") Map.from({ diff --git a/lib/pages/preferences_settings_page/preferences_settings_model.dart b/lib/pages/preferences_settings_page/preferences_settings_model.dart index 6f52a602..dec63120 100644 --- a/lib/pages/preferences_settings_page/preferences_settings_model.dart +++ b/lib/pages/preferences_settings_page/preferences_settings_model.dart @@ -1,14 +1,14 @@ import 'dart:developer'; import 'package:flutter/material.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; import 'package:hub/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart'; +import 'package:hub/features/authentication/index.dart'; +import 'package:hub/features/backend/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/shared/components/molecules/locals/index.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; -import 'package:hub/shared/services/authentication/authentication_service.dart'; +import 'package:hub/features/locals/index.dart'; + import 'package:hub/shared/utils/path_util.dart'; import 'package:share_plus/share_plus.dart'; @@ -24,11 +24,11 @@ class PreferencesPageModel with ChangeNotifier { late bool isPanic = false; Future _initialize() async { - isFingerprint = await StorageHelper().get(KeychainStorageKey.fingerprint.value) == 'true'; - isPerson = await StorageHelper().get(KeychainStorageKey.person.value) == 'true'; - isNotify = await StorageHelper().get(KeychainStorageKey.notify.value) == 'true'; - isAccess = await StorageHelper().get(KeychainStorageKey.access.value) == 'true'; - isPanic = await StorageHelper().get(KeychainStorageKey.panic.value) == 'true'; + isFingerprint = await StorageHelper().get(LocalsStorageKey.fingerprint.key) == 'true'; + isPerson = await StorageHelper().get(LocalsStorageKey.person.key) == 'true'; + isNotify = await StorageHelper().get(LocalsStorageKey.notify.key) == 'true'; + isAccess = await StorageHelper().get(LocalsStorageKey.access.key) == 'true'; + isPanic = await StorageHelper().get(LocalsStorageKey.panic.key) == 'true'; notifyListeners(); } @@ -37,7 +37,7 @@ class PreferencesPageModel with ChangeNotifier { } Future enablePerson(BuildContext context) async { - final String userDevUUID = (await StorageHelper().get(KeychainStorageKey.userDevUUID.value)) ?? ''; + final String userDevUUID = (await StorageHelper().get(ProfileStorageKey.userDevUUID.key)) ?? ''; notifyListeners(); Share.share( FFLocalizations.of(context).getVariableText( @@ -64,7 +64,7 @@ class PreferencesPageModel with ChangeNotifier { .call(notifica: value) .then((value) async { if (value.jsonBody['error'] == false) { - await StorageHelper().set(KeychainStorageKey.notify.value, isNotify ? 'false' : 'true'); + await StorageHelper().set(LocalsStorageKey.notify.key, isNotify ? 'false' : 'true'); content = FFLocalizations.of(context).getVariableText( enText: 'Notification changed successfully', ptText: 'Notificação alterada com sucesso', @@ -86,7 +86,7 @@ class PreferencesPageModel with ChangeNotifier { ); SnackBarUtil.showSnackBar(context, content, isError: true); }) - .then((_) async => isNotify = await StorageHelper().get(KeychainStorageKey.notify.value) == 'true') + .then((_) async => isNotify = await StorageHelper().get(LocalsStorageKey.notify.key) == 'true') .whenComplete(() => notifyListeners()); context.pop(); } @@ -99,6 +99,7 @@ class PreferencesPageModel with ChangeNotifier { ptText: 'Atualizar Identificador de Acesso', enText: 'Update Access Identifier', ); + final String content = FFLocalizations.of(context).getVariableText( ptText: 'Tem certeza que deseja habilitar seu dispositivo para acesso?', enText: 'Are you sure you want to enable your device for access?', @@ -141,7 +142,7 @@ class PreferencesPageModel with ChangeNotifier { .then((value) async { final String content; if (jsonDecode(value.jsonBody['error'].toString()) == false) { - await StorageHelper().set(KeychainStorageKey.access.value, isAccess ? 'false' : 'true'); + await StorageHelper().set(LocalsStorageKey.access.key, isAccess ? 'false' : 'true'); notifyListeners(); content = FFLocalizations.of(context).getVariableText( enText: 'Access pass changed successfully', @@ -163,7 +164,7 @@ class PreferencesPageModel with ChangeNotifier { ); SnackBarUtil.showSnackBar(context, content, isError: true); }) - .then((_) async => isAccess = await StorageHelper().get(KeychainStorageKey.access.value) == 'true') + .then((_) async => isAccess = await StorageHelper().get(LocalsStorageKey.access.key) == 'true') .whenComplete(() => notifyListeners()); } @@ -178,7 +179,7 @@ class PreferencesPageModel with ChangeNotifier { .then((value) async { final String content; if (jsonDecode(value.jsonBody['error'].toString()) == false) { - await StorageHelper().set(KeychainStorageKey.panic.value, isPanic ? 'false' : 'true'); + await StorageHelper().set(LocalsStorageKey.panic.key, isPanic ? 'false' : 'true'); notifyListeners(); content = FFLocalizations.of(context).getVariableText( enText: 'Panic password changed successfully', @@ -200,7 +201,7 @@ class PreferencesPageModel with ChangeNotifier { ); SnackBarUtil.showSnackBar(context, content, isError: true); }) - .then((_) async => isPanic = await StorageHelper().get(KeychainStorageKey.panic.value) == 'true') + .then((_) async => isPanic = await StorageHelper().get(LocalsStorageKey.panic.key) == 'true') .whenComplete(() => notifyListeners()); } @@ -216,10 +217,10 @@ class PreferencesPageModel with ChangeNotifier { onChange(String? key) async { isFingerprint = !isFingerprint; await StorageHelper().set(SecureStorageKey.fingerprintPass.value, key ?? ''); - await StorageHelper().set(KeychainStorageKey.fingerprint.value, isFingerprint ? 'true' : 'false'); + await StorageHelper().set(LocalsStorageKey.fingerprint.key, isFingerprint ? 'true' : 'false'); notifyListeners(); SnackBarUtil.showSnackBar(context, content); - isFingerprint = await StorageHelper().get(KeychainStorageKey.fingerprint.value) == 'true'; + isFingerprint = await StorageHelper().get(LocalsStorageKey.fingerprint.key) == 'true'; } isFingerprint ? onChange(null) : _showPassKey(context, onChange); diff --git a/lib/pages/qr_code_page/qr_code_page_model.dart b/lib/pages/qr_code_page/qr_code_page_model.dart index 41df6e77..857728c9 100644 --- a/lib/pages/qr_code_page/qr_code_page_model.dart +++ b/lib/pages/qr_code_page/qr_code_page_model.dart @@ -2,10 +2,10 @@ import 'dart:async'; import 'dart:typed_data'; import 'package:flutter/material.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_model.dart'; import 'package:hub/pages/qr_code_page/qr_code_page_widget.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; + import 'package:qr_flutter/qr_flutter.dart'; class QrCodePageModel extends FlutterFlowModel { @@ -29,8 +29,8 @@ class QrCodePageModel extends FlutterFlowModel { } Future initVariable() async { - isFingerprint = await StorageHelper().get(KeychainStorageKey.fingerprint.value) == 'true'; - userDevUUID = await StorageHelper().get(KeychainStorageKey.userDevUUID.value) ?? ''; + isFingerprint = await StorageHelper().get(LocalsStorageKey.fingerprint.key) == 'true'; + userDevUUID = await StorageHelper().get(ProfileStorageKey.userDevUUID.key) ?? ''; safeSetState?.call(); } @@ -101,18 +101,12 @@ class QrCodePageModel extends FlutterFlowModel { return String.fromCharCodes(bytes); } - Widget buildQrCode( - {required int errorCorrectLevel, - required double dimension, - required String identifier, - required String pass, - required int direction}) { + Widget buildQrCode({required int errorCorrectLevel, required double dimension, required String identifier, required String pass, required int direction}) { try { const Color backgroundColor = Colors.white; const Color foregroundColor = Colors.black; return QrImageView.withQr( - qr: QrCode.fromUint8List( - data: assembleQRPacket(direction, identifier, pass), errorCorrectLevel: errorCorrectLevel), + qr: QrCode.fromUint8List(data: assembleQRPacket(direction, identifier, pass), errorCorrectLevel: errorCorrectLevel), size: dimension, padding: const EdgeInsets.all(10), backgroundColor: backgroundColor, diff --git a/lib/pages/qr_code_page/qr_code_page_widget.dart b/lib/pages/qr_code_page/qr_code_page_widget.dart index 6aad1599..f71f9b5c 100644 --- a/lib/pages/qr_code_page/qr_code_page_widget.dart +++ b/lib/pages/qr_code_page/qr_code_page_widget.dart @@ -9,6 +9,7 @@ import 'package:flutter/scheduler.dart'; import 'package:flutter_animate/flutter_animate.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:hub/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_widget.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/custom_functions.dart'; import 'package:hub/flutter_flow/flutter_flow_animations.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; @@ -17,8 +18,6 @@ import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/flutter_flow_widgets.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/pages/qr_code_page/qr_code_page_model.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; import 'package:hub/shared/utils/biometric_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; @@ -125,8 +124,7 @@ class _QrCodePageWidgetState extends State with TickerProvider fontSize: limitedHeaderTextSize, letterSpacing: 0.0, fontWeight: FontWeight.bold, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), ), ), ), @@ -141,9 +139,7 @@ class _QrCodePageWidgetState extends State with TickerProvider _resetAnimationAndToggleAccess(); }); - _model.isFingerprint - ? await _showBiometricsAuth(context) - : await _showQrCodeBottomSheet(context); + _model.isFingerprint ? await _showBiometricsAuth(context) : await _showQrCodeBottomSheet(context); }, child: _model.buildQrCode( dimension: dimension, @@ -196,9 +192,7 @@ class _QrCodePageWidgetState extends State with TickerProvider alignment: const AlignmentDirectional(0.0, 0.0), child: FFButtonWidget( onPressed: () async { - _model.isFingerprint - ? await _showBiometricsAuth(context) - : await _showQrCodeBottomSheet(context); + _model.isFingerprint ? await _showBiometricsAuth(context) : await _showQrCodeBottomSheet(context); }, text: FFLocalizations.of(context).getVariableText( ptText: 'Gerar QR Code', @@ -213,8 +207,7 @@ class _QrCodePageWidgetState extends State with TickerProvider fontFamily: FlutterFlowTheme.of(context).titleSmallFamily, color: Colors.white, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).titleSmallFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily), fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 12, 12, 10), ), elevation: 3.0, @@ -249,8 +242,7 @@ class _QrCodePageWidgetState extends State with TickerProvider style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), fontSize: limitedBodyFontSize, ), ), @@ -286,8 +278,7 @@ class _QrCodePageWidgetState extends State with TickerProvider fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, fontWeight: FontWeight.w600, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14), ), ), @@ -327,8 +318,7 @@ class _QrCodePageWidgetState extends State with TickerProvider fontFamily: FlutterFlowTheme.of(context).headlineSmallFamily, fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14), letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).headlineSmallFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineSmallFamily), ), ), startAngle: 20.0, @@ -378,9 +368,7 @@ class _QrCodePageWidgetState extends State with TickerProvider context: context, builder: (context) { return GestureDetector( - onTap: () => _model.unfocusNode.canRequestFocus - ? FocusScope.of(context).requestFocus(_model.unfocusNode) - : FocusScope.of(context).unfocus(), + onTap: () => _model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(_model.unfocusNode) : FocusScope.of(context).unfocus(), child: Padding( padding: MediaQuery.viewInsetsOf(context), child: QrCodePassKeyTemplateComponentWidget( diff --git a/lib/pages/reception_page/reception_page_model.dart b/lib/pages/reception_page/reception_page_model.dart index 239f675a..c4834564 100644 --- a/lib/pages/reception_page/reception_page_model.dart +++ b/lib/pages/reception_page/reception_page_model.dart @@ -1,12 +1,11 @@ import 'package:flutter/material.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/internationalization.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; import 'package:share_plus/share_plus.dart'; class ReceptionPageModel with ChangeNotifier { Future getIdenfifier(BuildContext context) async { - final String userDevUUID = (await StorageHelper().get(KeychainStorageKey.userDevUUID.value)) ?? ''; + final String userDevUUID = (await StorageHelper().get(ProfileStorageKey.userDevUUID.key)) ?? ''; notifyListeners(); Share.share( diff --git a/lib/pages/reception_page/reception_page_widget.dart b/lib/pages/reception_page/reception_page_widget.dart index a29e194b..d48c10cf 100644 --- a/lib/pages/reception_page/reception_page_widget.dart +++ b/lib/pages/reception_page/reception_page_widget.dart @@ -3,16 +3,18 @@ import 'dart:developer'; import 'package:awesome_notifications/awesome_notifications.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; -import 'package:hub/backend/notifications/firebase_messaging_service.dart'; + import 'package:hub/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart'; +import 'package:hub/features/authentication/index.dart'; +import 'package:hub/features/backend/index.dart'; +import 'package:hub/features/notifications/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/flutter_flow_widgets.dart'; import 'package:hub/pages/reception_page/reception_page_model.dart'; -import 'package:hub/shared/components/molecules/locals/index.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; -import 'package:hub/shared/services/authentication/authentication_service.dart'; +import 'package:hub/features/locals/index.dart'; + import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:provider/provider.dart'; diff --git a/lib/pages/reservation_page/reservation_page_widget.dart b/lib/pages/reservation_page/reservation_page_widget.dart index 4d9091ac..0a388062 100644 --- a/lib/pages/reservation_page/reservation_page_widget.dart +++ b/lib/pages/reservation_page/reservation_page_widget.dart @@ -3,10 +3,10 @@ import 'dart:io' show Platform; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/internationalization.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; + import 'package:hub/shared/utils/webview_util.dart'; import 'package:url_launcher/url_launcher_string.dart'; import 'package:webview_flutter/webview_flutter.dart'; @@ -23,10 +23,10 @@ class _ReservationPageWidgetState extends State { Future> initVariables() async { final email = (await StorageHelper().get(SecureStorageKey.email.value)) ?? ''; - final name = (await StorageHelper().get(KeychainStorageKey.userName.value)) ?? ''; - final devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final clientId = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + final name = (await StorageHelper().get(ProfileStorageKey.userName.key)) ?? ''; + final devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final clientId = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const createdAt = '0000-00-00 00:00:00'; final url = 'https://hub.freaccess.com.br/hub/reservation/$clientId'; final freUserData = @@ -53,17 +53,13 @@ class _ReservationPageWidgetState extends State { if (snapshot.connectionState == ConnectionState.waiting) { return const Center(child: CircularProgressIndicator()); } else if (snapshot.hasError || !snapshot.hasData || snapshot.data!.isEmpty) { - return Center( - child: Text(FFLocalizations.of(context) - .getVariableText(enText: 'Unexpected error', ptText: 'Erro inesperado'))); + return Center(child: Text(FFLocalizations.of(context).getVariableText(enText: 'Unexpected error', ptText: 'Erro inesperado'))); } else { final data = snapshot.data!; final url = data['url']!; final userUUID = data['userUUID']!; final freUserData = data['freUserData']!; - return Platform.isIOS - ? _buildIOSWebView(url, userUUID, freUserData) - : _buildAndroidWebView(url, userUUID, freUserData); + return Platform.isIOS ? _buildIOSWebView(url, userUUID, freUserData) : _buildAndroidWebView(url, userUUID, freUserData); } }, ), @@ -116,9 +112,7 @@ class _ReservationPageWidgetState extends State { } }, onNavigationRequest: (NavigationRequest request) { - if (request.url.startsWith('http') || - request.url.startsWith('https://api.whatsapp.com/send') || - request.url.startsWith('https://wa.me')) { + if (request.url.startsWith('http') || request.url.startsWith('https://api.whatsapp.com/send') || request.url.startsWith('https://wa.me')) { launchUrlString(request.url); return NavigationDecision.prevent; } diff --git a/lib/pages/residents_on_the_property/residents_on_the_property_model.dart b/lib/pages/residents_on_the_property/residents_on_the_property_model.dart index 4883ceb3..cf0e1966 100644 --- a/lib/pages/residents_on_the_property/residents_on_the_property_model.dart +++ b/lib/pages/residents_on_the_property/residents_on_the_property_model.dart @@ -1,8 +1,7 @@ import 'package:flutter/material.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_model.dart'; import 'package:hub/pages/residents_on_the_property/residents_on_the_property_screen.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; class ResidentsOnThePropertyModel extends FlutterFlowModel { ResidentsOnThePropertyModel({this.onRefresh}); @@ -18,8 +17,8 @@ class ResidentsOnThePropertyModel extends FlutterFlowModel void removeFromVisitorJsonList(dynamic item) => visitorJsonList.remove(item); void removeAtIndexFromVisitorJsonList(int index) => visitorJsonList.removeAt(index); void insertAtIndexInVisitorJsonList(int index, dynamic item) => visitorJsonList.insert(index, item); - void updateVisitorJsonListAtIndex(int index, Function(dynamic) updateFn) => - visitorJsonList[index] = updateFn(visitorJsonList[index]); + void updateVisitorJsonListAtIndex(int index, Function(dynamic) updateFn) => visitorJsonList[index] = updateFn(visitorJsonList[index]); bool isValid() { - if (textController1!.text.isEmpty || - textController2!.text.isEmpty || - dropDownValue1 == null || - dropDownValue1!.isEmpty || - dropDownValue2 == null || - dropDownValue2!.isEmpty) { + if (textController1!.text.isEmpty || textController2!.text.isEmpty || dropDownValue1 == null || dropDownValue1!.isEmpty || dropDownValue2 == null || dropDownValue2!.isEmpty) { return false; } @@ -152,9 +145,7 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel ); } } catch (e) { - return FFLocalizations.of(context).getVariableText( - ptText: 'Preencha corretamente o campo de término da visita!', - enText: 'Fill in the end of visit field correctly!'); + return FFLocalizations.of(context).getVariableText(ptText: 'Preencha corretamente o campo de término da visita!', enText: 'Fill in the end of visit field correctly!'); } } return null; @@ -195,9 +186,7 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel ); } } catch (e) { - return FFLocalizations.of(context).getVariableText( - ptText: 'Preencha corretamente o campo de início da visita!', - enText: 'Fill in the visit start field correctly!'); + return FFLocalizations.of(context).getVariableText(ptText: 'Preencha corretamente o campo de início da visita!', enText: 'Fill in the visit start field correctly!'); } } return null; @@ -218,9 +207,9 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel } Future _initVariables() async { - devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } @override @@ -333,8 +322,7 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel } } - Future visitCancelAction(BuildContext context, - {required int? idDestino, required int? idVisita, required String? accessKey, required String? email}) async { + Future visitCancelAction(BuildContext context, {required int? idDestino, required int? idVisita, required String? accessKey, required String? email}) async { final ApiCallResponse? response; final CancelaVisita callback = PhpGroup.cancelaVisita; @@ -567,16 +555,11 @@ URL do Convite: https://visita.freaccess.com.br/${item['VAW_ID']}/$cliUUID/${ite labelsHashMap: Map.from({ '${FFLocalizations.of(context).getVariableText(ptText: "Nome", enText: "Name")}:': item['VTE_NOME'] ?? '', '${FFLocalizations.of(context).getVariableText(ptText: "Inicio", enText: "Start")}:': - item['VAW_DTINICIO'] != '' && item['VAW_DTINICIO'] != null - ? ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', item['VAW_DTINICIO']) - : '', + item['VAW_DTINICIO'] != '' && item['VAW_DTINICIO'] != null ? ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', item['VAW_DTINICIO']) : '', '${FFLocalizations.of(context).getVariableText(ptText: "Fim", enText: "End")}:': - item['VAW_DTFIM'] != '' && item['VAW_DTFIM'] != null - ? ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', item['VAW_DTFIM']) - : '', + item['VAW_DTFIM'] != '' && item['VAW_DTFIM'] != null ? ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', item['VAW_DTFIM']) : '', }), - imagePath: - 'https://freaccess.com.br/freaccess/getImage.php?cliID=$cliUUID&atividade=getFoto&Documento=${item['VTE_DOCUMENTO'] ?? ''}&tipo=E', + imagePath: 'https://freaccess.com.br/freaccess/getImage.php?cliID=$cliUUID&atividade=getFoto&Documento=${item['VTE_DOCUMENTO'] ?? ''}&tipo=E', statusHashMap: [ if (Status.getStatus(item['VAW_STATUS']) == StatusEnum.active) Map.from({ diff --git a/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart b/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart index 2cf0c1cb..71050c2d 100644 --- a/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart +++ b/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart @@ -3,10 +3,10 @@ import 'package:flutter/material.dart'; import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; import 'package:hub/components/atomic_components/shared_components_atoms/toast.dart'; import 'package:hub/components/templates_components/details_component/details_component_widget.dart'; import 'package:hub/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart'; +import 'package:hub/features/backend/index.dart'; import 'package:hub/flutter_flow/custom_functions.dart'; import 'package:hub/flutter_flow/flutter_flow_drop_down.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; @@ -35,8 +35,7 @@ class ScheduleCompleteVisitPageWidget extends ScheduleComplete { State createState() => _ScheduleCompleteVisitPageWidgetState(); } -class _ScheduleCompleteVisitPageWidgetState extends State - with TickerProviderStateMixin { +class _ScheduleCompleteVisitPageWidgetState extends State with TickerProviderStateMixin { bool _isLoading = false; late ScheduleCompleteVisitPageModel _model; int _visitHistoryLoadingIdx = 0; @@ -100,9 +99,7 @@ class _ScheduleCompleteVisitPageWidgetState extends State _model.unfocusNode.canRequestFocus - ? FocusScope.of(context).requestFocus(_model.unfocusNode) - : FocusScope.of(context).unfocus(), + onTap: () => _model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(_model.unfocusNode) : FocusScope.of(context).unfocus(), child: Scaffold( key: scaffoldKey, backgroundColor: FlutterFlowTheme.of(context).primaryBackground, @@ -240,8 +237,7 @@ class _ScheduleCompleteVisitPageWidgetState extends State model.unfocusNode.canRequestFocus - ? FocusScope.of(context).requestFocus(model.unfocusNode) - : FocusScope.of(context).unfocus(), + onTap: () => model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(model.unfocusNode) : FocusScope.of(context).unfocus(), child: SizedBox( height: MediaQuery.of(context).size.height * 0.8, width: MediaQuery.of(context).size.width, @@ -812,8 +792,7 @@ class _ScheduleCompleteVisitPageWidgetState extends State( @@ -991,8 +961,7 @@ class _ScheduleCompleteVisitPageWidgetState extends State model.unfocusNode.canRequestFocus - ? FocusScope.of(context).requestFocus(model.unfocusNode) - : FocusScope.of(context).unfocus(), + onTap: () => model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(model.unfocusNode) : FocusScope.of(context).unfocus(), child: Dialog( alignment: Alignment.topCenter, child: SizedBox( @@ -1356,19 +1314,10 @@ class _ScheduleCompleteVisitPageWidgetState extends State.from({ diff --git a/lib/pages/schedule_complete_visit_page/visit_history_page_widget.dart b/lib/pages/schedule_complete_visit_page/visit_history_page_widget.dart index e706f92f..b75dd4b3 100644 --- a/lib/pages/schedule_complete_visit_page/visit_history_page_widget.dart +++ b/lib/pages/schedule_complete_visit_page/visit_history_page_widget.dart @@ -1,12 +1,12 @@ import 'package:flutter/material.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart'; +import 'package:hub/features/backend/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart'; import 'package:hub/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; + import 'package:hub/shared/mixins/status_mixin.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; @@ -35,9 +35,9 @@ class _VisitHistoryWidgetState extends State with TickerProv List _visitWrap = []; Future _initVariables() async { - devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } @override @@ -142,13 +142,8 @@ class _VisitHistoryWidgetState extends State with TickerProv mainAxisSize: MainAxisSize.max, children: [ Center( - child: Text( - FFLocalizations.of(context) - .getVariableText(ptText: "Nenhuma visita encontrada!", enText: "No visit found"), - style: TextStyle( - color: FlutterFlowTheme.of(context).primaryText, - fontSize: limitedHeaderFontSize, - fontWeight: FontWeight.bold)), + child: Text(FFLocalizations.of(context).getVariableText(ptText: "Nenhuma visita encontrada!", enText: "No visit found"), + style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedHeaderFontSize, fontWeight: FontWeight.bold)), ) ], ), @@ -189,16 +184,12 @@ class _VisitHistoryWidgetState extends State with TickerProv imagePath: 'https://freaccess.com.br/freaccess/getImage.php?devUUID=$devUUID&userUUID=$userUUID&cliID=$cliUUID&atividade=getFoto&Documento=${visitaWrapItem['VTE_DOCUMENTO'] ?? ''}&tipo=E', labelsHashMap: { - '${FFLocalizations.of(context).getVariableText(ptText: "Nome", enText: "Name")}:': - visitaWrapItem['VTE_NOME'] ?? '', - '${FFLocalizations.of(context).getVariableText(ptText: "Inicio", enText: "Start")}:': - visitaWrapItem['VAW_DTINICIO'] != '' && visitaWrapItem['VAW_DTINICIO'] != null - ? ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', visitaWrapItem['VAW_DTINICIO']) - : '', + '${FFLocalizations.of(context).getVariableText(ptText: "Nome", enText: "Name")}:': visitaWrapItem['VTE_NOME'] ?? '', + '${FFLocalizations.of(context).getVariableText(ptText: "Inicio", enText: "Start")}:': visitaWrapItem['VAW_DTINICIO'] != '' && visitaWrapItem['VAW_DTINICIO'] != null + ? ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', visitaWrapItem['VAW_DTINICIO']) + : '', '${FFLocalizations.of(context).getVariableText(ptText: "Fim", enText: "End")}:': - visitaWrapItem['VAW_DTFIM'] != '' && visitaWrapItem['VAW_DTFIM'] != null - ? ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', visitaWrapItem['VAW_DTFIM']) - : '', + visitaWrapItem['VAW_DTFIM'] != '' && visitaWrapItem['VAW_DTFIM'] != null ? ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', visitaWrapItem['VAW_DTFIM']) : '', }, statusHashMap: [ if (Status.getStatus(visitaWrapItem['VAW_STATUS']) == StatusEnum.active) @@ -245,10 +236,10 @@ class _VisitHistoryWidgetState extends State with TickerProv }, ], onTapCardItemAction: () async { - final devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - final userUUID = (await StorageHelper().get(KeychainStorageKey.userUUID.value)) ?? ''; - final cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; - final cliName = (await StorageHelper().get(KeychainStorageKey.clientName.value)) ?? ''; + final devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final cliName = (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; await showDialog( useSafeArea: true, diff --git a/lib/pages/sign_in_page/sign_in_page_widget.dart b/lib/pages/sign_in_page/sign_in_page_widget.dart index 4ae72793..7e0dd2da 100644 --- a/lib/pages/sign_in_page/sign_in_page_widget.dart +++ b/lib/pages/sign_in_page/sign_in_page_widget.dart @@ -1,7 +1,5 @@ -import 'package:hub/shared/helpers/storage/storage_helper.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/shared/mixins/switcher_mixin.dart'; -import 'package:hub/shared/services/deeplink/deep_link_service.dart'; - import '/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart'; import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; @@ -37,9 +35,7 @@ class _SignInPageWidgetState extends State { Widget build(BuildContext context) { StorageHelper().context = context; return GestureDetector( - onTap: () => _model.unfocusNode.canRequestFocus - ? FocusScope.of(context).requestFocus(_model.unfocusNode) - : FocusScope.of(context).unfocus(), + onTap: () => _model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(_model.unfocusNode) : FocusScope.of(context).unfocus(), child: Scaffold( key: scaffoldKey, backgroundColor: FlutterFlowTheme.of(context).primaryBackground, diff --git a/lib/pages/sign_up_page/sign_up_page_widget.dart b/lib/pages/sign_up_page/sign_up_page_widget.dart index 2eaed633..b1811ffe 100644 --- a/lib/pages/sign_up_page/sign_up_page_widget.dart +++ b/lib/pages/sign_up_page/sign_up_page_widget.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/shared/mixins/switcher_mixin.dart'; -import 'package:hub/shared/services/deeplink/deep_link_service.dart'; import '/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart'; import '/flutter_flow/flutter_flow_theme.dart'; @@ -39,9 +38,7 @@ class _SignUpPageWidgetState extends State { Widget build(BuildContext context) { StorageHelper().context = context; return GestureDetector( - onTap: () => _model.unfocusNode.canRequestFocus - ? FocusScope.of(context).requestFocus(_model.unfocusNode) - : FocusScope.of(context).unfocus(), + onTap: () => _model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(_model.unfocusNode) : FocusScope.of(context).unfocus(), child: Scaffold( key: scaffoldKey, backgroundColor: FlutterFlowTheme.of(context).primaryBackground, diff --git a/lib/pages/vehicles_on_the_property/vehicles_on_the_property.dart b/lib/pages/vehicles_on_the_property/vehicles_on_the_property.dart index 263eb263..b1ee15d5 100644 --- a/lib/pages/vehicles_on_the_property/vehicles_on_the_property.dart +++ b/lib/pages/vehicles_on_the_property/vehicles_on_the_property.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart'; +import 'package:hub/features/backend/index.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; @@ -227,8 +227,7 @@ class _VehicleOnThePropertyState extends State with Ticker return CardItemTemplateComponentWidget( imagePath: null, labelsHashMap: { - '${FFLocalizations.of(context).getVariableText(ptText: "Placa", enText: "License Plate")}:': - uItem['licensePlate'] ?? '', + '${FFLocalizations.of(context).getVariableText(ptText: "Placa", enText: "License Plate")}:': uItem['licensePlate'] ?? '', '${FFLocalizations.of(context).getVariableText(ptText: "Modelo", enText: "Model")}:': uItem['model'] ?? '', '${FFLocalizations.of(context).getVariableText(ptText: "Tag", enText: "Tag")}:': uItem['tag'] ?? '', }, diff --git a/lib/pages/visits_on_the_property/model.dart b/lib/pages/visits_on_the_property/model.dart index 357ab6dd..4c0e3770 100644 --- a/lib/pages/visits_on_the_property/model.dart +++ b/lib/pages/visits_on_the_property/model.dart @@ -1,11 +1,10 @@ import 'package:flutter/material.dart'; import 'package:hub/components/templates_components/details_component/details_component_widget.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_model.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/internationalization.dart'; import 'package:hub/pages/vehicles_on_the_property/vehicles_on_the_property.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; class VisitsModel extends FlutterFlowModel { static VisitsModel? _instance; @@ -30,8 +29,8 @@ class VisitsModel extends FlutterFlowModel { void dispose() {} Future initAsync() async { - devUUID = (await StorageHelper().get(KeychainStorageKey.devUUID.value)) ?? ''; - cliUUID = (await StorageHelper().get(KeychainStorageKey.clientUUID.value)) ?? ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; onRefresh?.call(); } @@ -41,55 +40,52 @@ class VisitsModel extends FlutterFlowModel { required VisitsModel model, }) { return DetailsComponentWidget( - buttons: [], - labelsHashMap: Map.from({ - if (item['VTA_NOME'] != null && item['VTA_NOME'] != '') - '${FFLocalizations.of(context).getVariableText( - ptText: "Nome", - enText: "Name", - )}:': item['VTA_NOME'].toString().toUpperCase(), - if (item['MOT_DESCRICAO'] != null && item['MOT_DESCRICAO'] != '') - '${FFLocalizations.of(context).getVariableText( - ptText: "Motivo", - enText: "Reason", - )}:': item['MOT_DESCRICAO'].toString().toUpperCase(), - if (item['VTA_DTINICIO'] != null && item['VTA_DTINICIO'] != '') - '${FFLocalizations.of(context).getVariableText( - ptText: "Data de Início", - enText: "Start Date", - )}:': item['VTA_DTINICIO'].toString().toUpperCase(), - if (item['VTA_VALIDADE'] != null && item['VTA_VALIDADE'] != '') - '${FFLocalizations.of(context).getVariableText( - ptText: "Validade", - enText: "Validity", - )}:': item['VTA_VALIDADE'].toString().toUpperCase(), - if (item['VTA_FIXA'] != null && item['VTA_FIXA'] != '') - '${FFLocalizations.of(context).getVariableText( - ptText: "Entrada Única", - enText: "Single Entry", - )}:': item['VTA_FIXA'] == true - ? FFLocalizations.of(context).getVariableText( - ptText: "Sim", - enText: "Yes", - ) - : FFLocalizations.of(context).getVariableText( - ptText: "Não", - enText: "No", - ), - }), - imagePath: - 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${devUUID}&cliID=${cliUUID}&atividade=getFoto&Documento=${item['VDO_DOCUMENTO']}&tipo=E', - statusHashMap: [ - Map.from({ - if (item['VTA_FIXA'] != null) - FFLocalizations.of(context).getVariableText( - ptText: item['VTA_FIXA'] ? "Entrada Única" : "Entrada Recorrente", - enText: item['VTA_FIXA'] ? "Single Entry" : "Recurrent Entry", - ): item['VTA_FIXA'] == true - ? FlutterFlowTheme.of(context).success - : FlutterFlowTheme.of(context).warning, - }) - ], - ); + buttons: [], + labelsHashMap: Map.from({ + if (item['VTA_NOME'] != null && item['VTA_NOME'] != '') + '${FFLocalizations.of(context).getVariableText( + ptText: "Nome", + enText: "Name", + )}:': item['VTA_NOME'].toString().toUpperCase(), + if (item['MOT_DESCRICAO'] != null && item['MOT_DESCRICAO'] != '') + '${FFLocalizations.of(context).getVariableText( + ptText: "Motivo", + enText: "Reason", + )}:': item['MOT_DESCRICAO'].toString().toUpperCase(), + if (item['VTA_DTINICIO'] != null && item['VTA_DTINICIO'] != '') + '${FFLocalizations.of(context).getVariableText( + ptText: "Data de Início", + enText: "Start Date", + )}:': item['VTA_DTINICIO'].toString().toUpperCase(), + if (item['VTA_VALIDADE'] != null && item['VTA_VALIDADE'] != '') + '${FFLocalizations.of(context).getVariableText( + ptText: "Validade", + enText: "Validity", + )}:': item['VTA_VALIDADE'].toString().toUpperCase(), + if (item['VTA_FIXA'] != null && item['VTA_FIXA'] != '') + '${FFLocalizations.of(context).getVariableText( + ptText: "Entrada Única", + enText: "Single Entry", + )}:': item['VTA_FIXA'] == true + ? FFLocalizations.of(context).getVariableText( + ptText: "Sim", + enText: "Yes", + ) + : FFLocalizations.of(context).getVariableText( + ptText: "Não", + enText: "No", + ), + }), + imagePath: 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${devUUID}&cliID=${cliUUID}&atividade=getFoto&Documento=${item['VDO_DOCUMENTO']}&tipo=E', + statusHashMap: [ + Map.from({ + if (item['VTA_FIXA'] != null) + FFLocalizations.of(context).getVariableText( + ptText: item['VTA_FIXA'] ? "Entrada Única" : "Entrada Recorrente", + enText: item['VTA_FIXA'] ? "Single Entry" : "Recurrent Entry", + ): item['VTA_FIXA'] == true ? FlutterFlowTheme.of(context).success : FlutterFlowTheme.of(context).warning, + }) + ], + ); } } diff --git a/lib/pages/visits_on_the_property/visits_on_the_property_screen.dart b/lib/pages/visits_on_the_property/visits_on_the_property_screen.dart index ddc81d31..95a154a0 100644 --- a/lib/pages/visits_on_the_property/visits_on_the_property_screen.dart +++ b/lib/pages/visits_on_the_property/visits_on_the_property_screen.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart'; +import 'package:hub/features/backend/index.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; @@ -69,8 +69,7 @@ class _VisitsOnThePropertyState extends State with TickerPr children: [ Center( child: Text( - FFLocalizations.of(context).getVariableText( - ptText: "Nenhuma visita em aberto encontrada!", enText: "No opened visits found"), + FFLocalizations.of(context).getVariableText(ptText: "Nenhuma visita em aberto encontrada!", enText: "No opened visits found"), style: TextStyle( fontFamily: 'Nunito', fontSize: limitedHeaderTextSize, @@ -222,12 +221,10 @@ class _VisitsOnThePropertyState extends State with TickerPr Widget _item(BuildContext context, dynamic uItem) { return CardItemTemplateComponentWidget( - imagePath: - 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${model.devUUID}&cliID=${model.cliUUID}&atividade=getFoto&Documento=${uItem['VDO_DOCUMENTO']}&tipo=E', + imagePath: 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${model.devUUID}&cliID=${model.cliUUID}&atividade=getFoto&Documento=${uItem['VDO_DOCUMENTO']}&tipo=E', labelsHashMap: { '${FFLocalizations.of(context).getVariableText(ptText: "Nome", enText: "Name")}:': uItem['VTA_NOME'] ?? '', - '${FFLocalizations.of(context).getVariableText(ptText: "Validade", enText: "Valids")}:': - uItem['VTA_VALIDADE'] ?? '', + '${FFLocalizations.of(context).getVariableText(ptText: "Validade", enText: "Valids")}:': uItem['VTA_VALIDADE'] ?? '', '${FFLocalizations.of(context).getVariableText(ptText: "Motivo", enText: "Reason")}:': uItem['MOT_DESCRICAO'][0].toUpperCase() + uItem['MOT_DESCRICAO'].substring(1).toLowerCase(), }, diff --git a/lib/pages/welcome_page/welcome_page_widget.dart b/lib/pages/welcome_page/welcome_page_widget.dart index 53ac8018..b665ebe8 100644 --- a/lib/pages/welcome_page/welcome_page_widget.dart +++ b/lib/pages/welcome_page/welcome_page_widget.dart @@ -1,9 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; +import 'package:hub/features/storage/index.dart'; + import 'package:hub/shared/mixins/switcher_mixin.dart'; -import 'package:hub/shared/services/deeplink/deep_link_service.dart'; import '/components/templates_components/welcome_template_component/welcome_template_component_widget.dart'; import '/flutter_flow/flutter_flow_theme.dart'; @@ -54,9 +53,7 @@ class _WelcomePageWidgetState extends State { Widget build(BuildContext context) { StorageHelper().context = context; return GestureDetector( - onTap: () => _model.unfocusNode.canRequestFocus - ? FocusScope.of(context).requestFocus(_model.unfocusNode) - : FocusScope.of(context).unfocus(), + onTap: () => _model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(_model.unfocusNode) : FocusScope.of(context).unfocus(), child: Scaffold( key: scaffoldKey, backgroundColor: FlutterFlowTheme.of(context).primaryBackground, diff --git a/lib/shared/components/molecules/locals/data/data_sources/locals_local_data_source.dart b/lib/shared/components/molecules/locals/data/data_sources/locals_local_data_source.dart deleted file mode 100644 index 64d78e27..00000000 --- a/lib/shared/components/molecules/locals/data/data_sources/locals_local_data_source.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; - -abstract class LocalsLocalDataSource { - Future unlinkLocal(); -} - -class LocalsLocalDataSourceImpl { - - Future unlinkLocal() async { - await StorageHelper().set(KeychainStorageKey.clientUUID.value, ''); - await StorageHelper().set(KeychainStorageKey.clientName.value, ''); - await StorageHelper().set(KeychainStorageKey.ownerName.value, ''); - } - -} diff --git a/lib/shared/components/molecules/locals/presentation/widgets/local_profile/local_profile_widget.dart b/lib/shared/components/molecules/locals/presentation/widgets/local_profile/local_profile_widget.dart deleted file mode 100644 index 77994112..00000000 --- a/lib/shared/components/molecules/locals/presentation/widgets/local_profile/local_profile_widget.dart +++ /dev/null @@ -1,273 +0,0 @@ -import 'dart:developer'; - -import 'package:cached_network_image/cached_network_image.dart'; -import 'package:flutter/material.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:hub/flutter_flow/custom_functions.dart'; -import 'package:hub/flutter_flow/flutter_flow_theme.dart'; -import 'package:hub/flutter_flow/flutter_flow_util.dart'; -import 'package:hub/shared/components/molecules/locals/index.dart'; -import 'package:hub/shared/components/molecules/modules/data/index.dart'; -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; -import 'package:provider/provider.dart'; - -class LocalProfileComponentWidget extends StatefulWidget { - const LocalProfileComponentWidget({super.key}); - - @override - State createState() => _LocalProfileComponentWidgetState(); -} - -class _LocalProfileComponentWidgetState extends State { - bool _isLoading = false; - - Future retrieveProfileInfo() async { - - setState(() {_isLoading = true;}); - await LocalsRepositoryImpl().select(context); - setState(() {_isLoading = false;}); - } - - @override - Widget build(BuildContext context) { - - - return StreamBuilder( - stream: LocalsRepositoryImpl.stream, - builder: (context, snapshot) { - final textScaler = MediaQuery.textScalerOf(context); - final double baseFontSize = 14.0; - final double scaledFontSize = baseFontSize * textScaler.scale(1); - final double limitedFontSize = scaledFontSize > 20 ? 12 : scaledFontSize; - if (snapshot.connectionState == ConnectionState.waiting) { - return const Center(child: CircularProgressIndicator()); - } else if (snapshot.hasError) { - return Center(child: Text('Error: ${snapshot.error}')); - } else if (!snapshot.hasData || snapshot.data! == false) { - - return BlocBuilder( - builder: (context, state) { - return _buildDefaultLocalProfile(context, limitedFontSize); - }, - ); - } - - return BlocBuilder( - builder: (context, state) { - return _buildAsyncLocalProfile(context, state, limitedFontSize); - }, - ); - - }, - ); - - } - - Container _buildDefaultLocalProfile(BuildContext context, double limitedFontSize) { - return Container( - decoration: const BoxDecoration(), - child: Align( - alignment: const AlignmentDirectional(0.0, -1.0), - child: Material( - color: Colors.transparent, - elevation: 0.0, - child: Container( - width: double.infinity, - height: 119.0, - decoration: BoxDecoration( - color: FlutterFlowTheme.of(context).primary, - border: Border.all( - color: FlutterFlowTheme.of(context).primary, - ), - ), - child: Row( - mainAxisSize: MainAxisSize.max, - children: [ - Align( - alignment: const AlignmentDirectional(-1.0, 0.0), - child: Padding( - padding: const EdgeInsets.all(2.0), - child: InkWell( - splashColor: Colors.transparent, - focusColor: Colors.transparent, - hoverColor: Colors.transparent, - highlightColor: Colors.transparent, - onTap: _isLoading ? null : retrieveProfileInfo, - child: ClipRRect( - borderRadius: BorderRadius.circular(200.0), - child: CachedNetworkImage( - imageBuilder: (context, imageProvider) => Container( - decoration: BoxDecoration( - image: DecorationImage( - image: imageProvider, - fit: BoxFit.cover, - ), - ), - ), - imageUrl: 'assets/images/home.png', - width: 80.0, - height: 80.0, - fit: BoxFit.cover, - alignment: const Alignment(0.0, 0.0), - placeholder: (context, url) => Image.asset('assets/images/home.png'), - errorListener: (_) => Image.asset('assets/images/home.png'), - errorWidget: (_, __, ___) => Image.asset('assets/images/home.png'), - ), - )), - ), - ), - Expanded( - child: Tooltip( - message: FFLocalizations.of(context).getVariableText( - ptText: 'SEM LOCAL VINCULADO', - enText: 'NO LINKED LOCAL', - ), - child: Text( - FFLocalizations.of(context).getVariableText( - ptText: 'SEM LOCAL VINCULADO', - enText: 'NO LINKED LOCAL', - ), - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).info, - fontSize: limitedFontSize, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ), - ), - ), - ), - ].divide(const SizedBox(width: 20.0)).addToStart(const SizedBox(width: 20.0)).addToEnd(const SizedBox(width: 20.0)), - ), - ), - ), - ), - ); - } - - Container _buildAsyncLocalProfile(BuildContext context, LocalProfileState state, double limitedFontSize) { - return Container( - decoration: const BoxDecoration(), - child: Align( - alignment: const AlignmentDirectional(0.0, -1.0), - child: Material( - color: Colors.transparent, - elevation: 0.0, - child: Container( - width: double.infinity, - height: 119.0, - decoration: BoxDecoration( - color: FlutterFlowTheme.of(context).primary, - border: Border.all( - color: FlutterFlowTheme.of(context).primary, - ), - ), - child: Row( - mainAxisSize: MainAxisSize.max, - children: [ - Align( - alignment: const AlignmentDirectional(-1.0, 0.0), - child: Padding( - padding: const EdgeInsets.all(2.0), - child: InkWell( - splashColor: Colors.transparent, - focusColor: Colors.transparent, - hoverColor: Colors.transparent, - highlightColor: Colors.transparent, - onTap: _isLoading ? null : retrieveProfileInfo, - child: ClipRRect( - borderRadius: BorderRadius.circular(200.0), - child: CachedNetworkImage( - imageBuilder: (context, imageProvider) => Container( - decoration: BoxDecoration( - image: DecorationImage( - image: imageProvider, - fit: BoxFit.cover, - ), - ), - ), - imageUrl: valueOrDefault('https://freaccess.com.br/freaccess/Images/Clients/${state.cliUUID}.png', 'assets/images/home.png'), - width: 80.0, - height: 80.0, - fit: BoxFit.cover, - alignment: const Alignment(0.0, 0.0), - placeholder: (context, url) => Image.asset('assets/images/home.png'), - errorListener: (_) => Image.asset('assets/images/home.png'), - errorWidget: (_, __, ___) => Image.asset('assets/images/home.png'), - ), - )), - ), - ), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Tooltip( - message: valueOrDefault( - convertToUppercase(state.cliName), - FFLocalizations.of(context).getVariableText( - ptText: 'SEM LOCAL VINCULADO', - enText: 'NO LINKED LOCAL', - ), - ), - child: Text( - valueOrDefault( - convertToUppercase(state.cliName), - FFLocalizations.of(context).getVariableText( - ptText: 'SEM LOCAL VINCULADO', - enText: 'NO LINKED LOCAL', - ), - ), - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).info, - fontSize: limitedFontSize, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ), - ), - ), - Tooltip( - message: valueOrDefault( - ' '+state.ownerName, - '' - ), - child: Text( - valueOrDefault( - state.ownerName.length > 30 ? '${state.ownerName.substring(0, 20)}...' : state.ownerName, - '' - ), - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).info, - fontSize: limitedFontSize, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ), - ), - ), - ], - ), - ), - ].divide(const SizedBox(width: 20.0)).addToStart(const SizedBox(width: 20.0)).addToEnd(const SizedBox(width: 20.0)), - ), - ), - ), - ), - ); - - - } -} diff --git a/lib/shared/components/molecules/menu/domain/respositories/menu_repository.dart b/lib/shared/components/molecules/menu/domain/respositories/menu_repository.dart deleted file mode 100644 index 495dc332..00000000 --- a/lib/shared/components/molecules/menu/domain/respositories/menu_repository.dart +++ /dev/null @@ -1,6 +0,0 @@ -import 'package:hub/shared/components/molecules/menu/domain/entities/menu_item.dart'; -import 'package:hub/shared/components/molecules/menu/index.dart'; - -abstract class MenuRepository { - Future> generateMenuEntries(List menuEntries, EnumMenuItem item); -} \ No newline at end of file diff --git a/lib/shared/enums/index.dart b/lib/shared/enums/index.dart new file mode 100644 index 00000000..585bd715 --- /dev/null +++ b/lib/shared/enums/index.dart @@ -0,0 +1 @@ +export 'enum_throw_exception.dart'; diff --git a/lib/shared/extensions/index.dart b/lib/shared/extensions/index.dart new file mode 100644 index 00000000..0f71878e --- /dev/null +++ b/lib/shared/extensions/index.dart @@ -0,0 +1,3 @@ +export 'dialog_extensions.dart'; +export 'flutter_secure_storage_extensions.dart'; +export 'string_extensions.dart'; diff --git a/lib/shared/helpers/index.dart b/lib/shared/helpers/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/shared/helpers/storage/base_storage.dart b/lib/shared/helpers/storage/base_storage.dart deleted file mode 100644 index 27892246..00000000 --- a/lib/shared/helpers/storage/base_storage.dart +++ /dev/null @@ -1,152 +0,0 @@ -abstract class BaseStorage { - Future init(); - - Future set(String key, T value); - - Future get(String key); - - Future delete(String key); - - Future clearAll(); -} - -enum Storage { - secureStorage, - sharedPreferences, - databaseStorage, -} - -enum SharedPreferencesKey { - isFirstRun, -} - -extension SharedPreferencesKeyExtension on SharedPreferencesKey { - String get value { - switch (this) { - case SharedPreferencesKey.isFirstRun: - return 'fre_isFirstRun'; - default: - return ''; - } - } -} - -enum SecureStorageKey { - isLogged, - email, - password, - deviceType, - token, - accessPass, - panicPass, - fingerprintPass, - haveLocal, - deviceDescription, -} - -extension SecureStorageKeyExtension on SecureStorageKey { - String get value { - switch (this) { - case SecureStorageKey.isLogged: - return 'fre_isLogged'; - case SecureStorageKey.email: - return 'fre_email'; - case SecureStorageKey.password: - return 'fre_passwd'; - case SecureStorageKey.deviceType: - return 'fre_deviceType'; - case SecureStorageKey.token: - return 'fre_token'; - case SecureStorageKey.accessPass: - return 'fre_accessPass'; - case SecureStorageKey.panicPass: - return 'fre_panicPass'; - case SecureStorageKey.fingerprintPass: - return 'fre_fingerprintPass'; - case SecureStorageKey.haveLocal: - return 'fre_have_local'; - case SecureStorageKey.deviceDescription: - return 'fre_deviceDescription'; - default: - return ''; - } - } -} - -enum KeychainStorageKey { - devUUID, - userUUID, - userDevUUID, - status, - userName, - userEmail, - clientUUID, - ownerName, - ownerUUID, - clientName, - petAmount, - whatsapp, - provisional, - pets, - local, - notify, - fingerprint, - access, - panic, - person, - requestOSNotification, - isNewVersion, -} - -extension KeychainStorageKeyExtension on KeychainStorageKey { - String get value { - switch (this) { - case KeychainStorageKey.userEmail: - return 'fre_userEmail'; - case KeychainStorageKey.devUUID: - return 'fre_devUUID'; - case KeychainStorageKey.userUUID: - return 'fre_userUUID'; - case KeychainStorageKey.userDevUUID: - return 'fre_userDevUUID'; - case KeychainStorageKey.status: - return 'fre_status'; - case KeychainStorageKey.userName: - return 'fre_userName'; - case KeychainStorageKey.clientUUID: - return 'fre_cliUUID'; - case KeychainStorageKey.ownerUUID: - return 'fre_ownerUUID'; - case KeychainStorageKey.clientName: - return 'fre_cliName'; - case KeychainStorageKey.ownerName: - return 'fre_ownerName'; - case KeychainStorageKey.petAmount: - return 'fre_petAmountRegister'; - case KeychainStorageKey.whatsapp: - return 'fre_whatsapp'; - case KeychainStorageKey.provisional: - return 'fre_provisional'; - case KeychainStorageKey.pets: - return 'fre_pets'; - case KeychainStorageKey.local: - return 'fre_local'; - case KeychainStorageKey.notify: - return 'fre_notify'; - case KeychainStorageKey.fingerprint: - return 'fre_fingerprint'; - case KeychainStorageKey.access: - return 'fre_access'; - case KeychainStorageKey.panic: - return 'fre_panic'; - case KeychainStorageKey.person: - return 'fre_person'; - case KeychainStorageKey.requestOSNotification: - return 'fre_requestOSnotification'; - case KeychainStorageKey.isNewVersion: - return 'fre_isNewVersion'; - default: - return ''; - } - } -} diff --git a/lib/shared/mixins/index.dart b/lib/shared/mixins/index.dart new file mode 100644 index 00000000..f41f8c59 --- /dev/null +++ b/lib/shared/mixins/index.dart @@ -0,0 +1,2 @@ +export 'status_mixin.dart'; +export 'switcher_mixin.dart'; diff --git a/lib/shared/services/index.dart b/lib/shared/services/index.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/shared/utils/index.dart b/lib/shared/utils/index.dart new file mode 100644 index 00000000..3bbabf2a --- /dev/null +++ b/lib/shared/utils/index.dart @@ -0,0 +1,13 @@ +export 'biometric_util.dart'; +export 'device_util.dart'; +export 'dialog_util.dart'; +export 'image_util.dart'; +export 'limited_text_size.dart'; +export 'loading_util.dart'; +export 'log_util.dart'; +export 'path_util.dart'; +export 'share_util.dart'; +export 'snackbar_util.dart'; +export 'text_util.dart'; +export 'validator_util.dart'; +export 'webview_util.dart'; diff --git a/lib/shared/utils/log_util.dart b/lib/shared/utils/log_util.dart index 99dfab8e..24a5561d 100644 --- a/lib/shared/utils/log_util.dart +++ b/lib/shared/utils/log_util.dart @@ -1,7 +1,7 @@ import 'dart:developer'; import 'package:firebase_crashlytics/firebase_crashlytics.dart'; -import 'package:hub/backend/api_requests/api_calls.dart'; +import 'package:hub/features/backend/index.dart'; class LogUtil { static void requestAPIFailed(String url, String body, String reason, dynamic error, StackTrace stack) async { diff --git a/lib/shared/utils/share_util.dart b/lib/shared/utils/share_util.dart index e04e11bf..a9c410f7 100644 --- a/lib/shared/utils/share_util.dart +++ b/lib/shared/utils/share_util.dart @@ -1,11 +1,10 @@ -import 'package:hub/shared/helpers/storage/base_storage.dart'; -import 'package:hub/shared/helpers/storage/storage_helper.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:share_plus/share_plus.dart'; class ShareUtil { static Future showShare(payload) async { - final cliName = await StorageHelper().get(KeychainStorageKey.clientName.value); - final cliUUID = await StorageHelper().get(KeychainStorageKey.clientUUID.value); + final cliName = await StorageHelper().get(ProfileStorageKey.clientName.key); + final cliUUID = await StorageHelper().get(ProfileStorageKey.clientUUID.key); for (var i = 0; i < payload['convites'].length; i++) { await Share.share(''' diff --git a/test/widget_test.dart b/test/widget_test.dart deleted file mode 100644 index 76de18a9..00000000 --- a/test/widget_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// // This is a basic Flutter widget test. -// // -// // To perform an interaction with a widget in your test, use the WidgetTester -// // utility that Flutter provides. For example, you can send tap and scroll -// // gestures. You can also use WidgetTester to find child widgets in the widget -// // tree, read text, and verify that the values of widget properties are correct. - -// import 'package:flutter_test/flutter_test.dart'; - -// import 'package:f_r_e_hub/main.dart'; - -// void main() { -// testWidgets('Counter increments smoke test', (WidgetTester tester) async { -// // Build our app and trigger a frame. -// await tester.pumpWidget(MyApp()); -// }); -// } From 06bf6caadd9762b9f3d7d62e8572671ac4e0a864 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Tue, 17 Dec 2024 13:34:29 -0300 Subject: [PATCH 02/25] WIP --- .../profile_local_data_source.dart | 4 +-- lib/features/storage/application/index.dart | 2 +- .../database_service.dart | 0 .../{service => services}/index.dart | 0 ..._helper.dart => database_data_source.dart} | 17 ++++++++++ .../storage/data/data_sources/index.dart | 6 ++-- ...ge_helper.dart => secure_data_source.dart} | 0 ...ge_helper.dart => shared_data_source.dart} | 0 .../storage/data/models/database_storage.dart | 31 +++++++++++++++++++ .../data/repositories/storage_repository.dart | 2 +- .../respositories/storage_repository.dart | 1 + 11 files changed, 55 insertions(+), 8 deletions(-) rename lib/features/storage/application/{service => services}/database_service.dart (100%) rename lib/features/storage/application/{service => services}/index.dart (100%) rename lib/features/storage/data/data_sources/{database_storage_helper.dart => database_data_source.dart} (56%) rename lib/features/storage/data/data_sources/{secure_storage_helper.dart => secure_data_source.dart} (100%) rename lib/features/storage/data/data_sources/{shared_storage_helper.dart => shared_data_source.dart} (100%) create mode 100644 lib/features/storage/domain/respositories/storage_repository.dart diff --git a/lib/features/profile/data/data_sources/profile_local_data_source.dart b/lib/features/profile/data/data_sources/profile_local_data_source.dart index 99393e17..71788f92 100644 --- a/lib/features/profile/data/data_sources/profile_local_data_source.dart +++ b/lib/features/profile/data/data_sources/profile_local_data_source.dart @@ -1,12 +1,10 @@ import 'dart:developer'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/shared/constants/index.dart'; import 'package:sqflite/sqflite.dart'; -import '../../../storage/application/service/database_service.dart'; -import '../../../storage/domain/entities/base_storage.dart'; - abstract class ProfileLocalDataSource { Future init(); Future get(String key); diff --git a/lib/features/storage/application/index.dart b/lib/features/storage/application/index.dart index adb07df6..810de75e 100644 --- a/lib/features/storage/application/index.dart +++ b/lib/features/storage/application/index.dart @@ -1 +1 @@ -export 'service/index.dart'; +export 'services/index.dart'; diff --git a/lib/features/storage/application/service/database_service.dart b/lib/features/storage/application/services/database_service.dart similarity index 100% rename from lib/features/storage/application/service/database_service.dart rename to lib/features/storage/application/services/database_service.dart diff --git a/lib/features/storage/application/service/index.dart b/lib/features/storage/application/services/index.dart similarity index 100% rename from lib/features/storage/application/service/index.dart rename to lib/features/storage/application/services/index.dart diff --git a/lib/features/storage/data/data_sources/database_storage_helper.dart b/lib/features/storage/data/data_sources/database_data_source.dart similarity index 56% rename from lib/features/storage/data/data_sources/database_storage_helper.dart rename to lib/features/storage/data/data_sources/database_data_source.dart index 653506b9..43d7894a 100644 --- a/lib/features/storage/data/data_sources/database_storage_helper.dart +++ b/lib/features/storage/data/data_sources/database_data_source.dart @@ -1,6 +1,23 @@ import 'package:hub/features/storage/index.dart'; +import 'package:sqflite/sqflite.dart'; class DatabaseStorage implements BaseStorage { + DatabaseStorage._(); + + static final DatabaseStorage instance = DatabaseStorage._(); + + late final Database _database; + bool _isInitialized = false; + + + static DatabaseStorageKey getInstanceByKey(String key) { + if (ProfileStorageKey.values.map((e) => e.value).toList().contains(key)) { + return ProfileStorageKey.instance; + } else (SharedPreferencesKey.values.map((e) => e.value).toList().contains(key)) { + return LocalsStorageKey.instance; + + } + @override Future clearAll() { // TODO: implement clearAll diff --git a/lib/features/storage/data/data_sources/index.dart b/lib/features/storage/data/data_sources/index.dart index 39123043..b66c53d7 100644 --- a/lib/features/storage/data/data_sources/index.dart +++ b/lib/features/storage/data/data_sources/index.dart @@ -1,3 +1,3 @@ -export 'database_storage_helper.dart'; -export 'secure_storage_helper.dart'; -export 'shared_storage_helper.dart'; +export 'database_data_source.dart'; +export 'secure_data_source.dart'; +export 'shared_data_source.dart'; diff --git a/lib/features/storage/data/data_sources/secure_storage_helper.dart b/lib/features/storage/data/data_sources/secure_data_source.dart similarity index 100% rename from lib/features/storage/data/data_sources/secure_storage_helper.dart rename to lib/features/storage/data/data_sources/secure_data_source.dart diff --git a/lib/features/storage/data/data_sources/shared_storage_helper.dart b/lib/features/storage/data/data_sources/shared_data_source.dart similarity index 100% rename from lib/features/storage/data/data_sources/shared_storage_helper.dart rename to lib/features/storage/data/data_sources/shared_data_source.dart diff --git a/lib/features/storage/data/models/database_storage.dart b/lib/features/storage/data/models/database_storage.dart index 8c2ff39e..48167dff 100644 --- a/lib/features/storage/data/models/database_storage.dart +++ b/lib/features/storage/data/models/database_storage.dart @@ -3,6 +3,7 @@ import 'package:hub/features/storage/index.dart'; abstract class DatabaseStorageKey implements IDatabaseStorage { final String key; const DatabaseStorageKey(this.key); + List get values => []; } class ProfileStorageKey extends DatabaseStorageKey { @@ -18,6 +19,20 @@ class ProfileStorageKey extends DatabaseStorageKey { static const ProfileStorageKey ownerUUID = ProfileStorageKey._('fre_ownerUUID'); static const ProfileStorageKey clientName = ProfileStorageKey._('fre_cliName'); static const ProfileStorageKey ownerName = ProfileStorageKey._('fre_ownerName'); + + @override + List get values => [ + userEmail.key, + devUUID.key, + userUUID.key, + userDevUUID.key, + status.key, + userName.key, + clientUUID.key, + ownerUUID.key, + clientName.key, + ownerName.key, + ]; } class LocalsStorageKey extends DatabaseStorageKey { @@ -35,6 +50,22 @@ class LocalsStorageKey extends DatabaseStorageKey { static const LocalsStorageKey person = LocalsStorageKey._('fre_person'); static const LocalsStorageKey requestOSNotification = LocalsStorageKey._('fre_requestOSnotification'); static const LocalsStorageKey isNewVersion = LocalsStorageKey._('fre_isNewVersion'); + + @override + List get values => [ + petAmount.key, + whatsapp.key, + provisional.key, + pets.key, + local.key, + notify.key, + fingerprint.key, + access.key, + panic.key, + person.key, + requestOSNotification.key, + isNewVersion.key, + ]; } // enum DatabaseStorageKey implements IDatabaseStorage { diff --git a/lib/features/storage/data/repositories/storage_repository.dart b/lib/features/storage/data/repositories/storage_repository.dart index af5953af..d71ee26c 100644 --- a/lib/features/storage/data/repositories/storage_repository.dart +++ b/lib/features/storage/data/repositories/storage_repository.dart @@ -38,7 +38,7 @@ class StorageHelper { case Storage.sharedPreferences: return SharedPreferencesStorage.instance; default: - return ProfileLocalDataSourceImpl.instance; + return DatabaseStorage.instance; } } diff --git a/lib/features/storage/domain/respositories/storage_repository.dart b/lib/features/storage/domain/respositories/storage_repository.dart new file mode 100644 index 00000000..1e4eb962 --- /dev/null +++ b/lib/features/storage/domain/respositories/storage_repository.dart @@ -0,0 +1 @@ +abstract class StorageRepository {} From c90b8e20dc1e08b1872f5e23e3ee367b52c2c6ea Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Wed, 18 Dec 2024 08:15:29 -0300 Subject: [PATCH 03/25] WIP --- .../data_sources/database_data_source.dart | 35 ++++++------------- .../storage/data/models/database_storage.dart | 4 +++ .../storage/data/models/secure_storage.dart | 2 -- 3 files changed, 14 insertions(+), 27 deletions(-) diff --git a/lib/features/storage/data/data_sources/database_data_source.dart b/lib/features/storage/data/data_sources/database_data_source.dart index 43d7894a..83a0de90 100644 --- a/lib/features/storage/data/data_sources/database_data_source.dart +++ b/lib/features/storage/data/data_sources/database_data_source.dart @@ -18,33 +18,18 @@ class DatabaseStorage implements BaseStorage { } - @override - Future clearAll() { - // TODO: implement clearAll - throw UnimplementedError(); - } + - @override - Future delete(String key) { - // TODO: implement delete - throw UnimplementedError(); } - + @override - Future get(String key) { - // TODO: implement get - throw UnimplementedError(); - } - + Future clearAll() => throw UnimplementedError(); @override - Future init() { - // TODO: implement init - throw UnimplementedError(); - } - + Future delete(String key) => throw UnimplementedError(); @override - Future set(String key, T value) { - // TODO: implement set - throw UnimplementedError(); - } -} + Future get(String key) => throw UnimplementedError(); + @override + Future init() => throw UnimplementedError(); + @override + Future set(String key, T value) => throw UnimplementedError(); +} \ No newline at end of file diff --git a/lib/features/storage/data/models/database_storage.dart b/lib/features/storage/data/models/database_storage.dart index 48167dff..5926cbf9 100644 --- a/lib/features/storage/data/models/database_storage.dart +++ b/lib/features/storage/data/models/database_storage.dart @@ -9,6 +9,8 @@ abstract class DatabaseStorageKey implements IDatabaseStorage { class ProfileStorageKey extends DatabaseStorageKey { const ProfileStorageKey._(String key) : super(key); + static const String table = 'profileTable'; + static const ProfileStorageKey userEmail = ProfileStorageKey._('fre_userEmail'); static const ProfileStorageKey devUUID = ProfileStorageKey._('fre_devUUID'); static const ProfileStorageKey userUUID = ProfileStorageKey._('fre_userUUID'); @@ -38,6 +40,8 @@ class ProfileStorageKey extends DatabaseStorageKey { class LocalsStorageKey extends DatabaseStorageKey { const LocalsStorageKey._(String key) : super(key); + static const table = 'localTable'; + static const LocalsStorageKey petAmount = LocalsStorageKey._('fre_petAmountRegister'); static const LocalsStorageKey whatsapp = LocalsStorageKey._('fre_whatsapp'); static const LocalsStorageKey provisional = LocalsStorageKey._('fre_provisional'); diff --git a/lib/features/storage/data/models/secure_storage.dart b/lib/features/storage/data/models/secure_storage.dart index bd6d6dde..85472419 100644 --- a/lib/features/storage/data/models/secure_storage.dart +++ b/lib/features/storage/data/models/secure_storage.dart @@ -36,8 +36,6 @@ extension SecureStorageKeyExtension on SecureStorageKey { return 'fre_have_local'; case SecureStorageKey.deviceDescription: return 'fre_deviceDescription'; - default: - return ''; } } } From 3c106d6957f9eeda22f29da4788b57f38f068d02 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Wed, 18 Dec 2024 10:27:59 -0300 Subject: [PATCH 04/25] WIP --- .../profile/data/data_sources/index.dart | 1 + .../profile_local_data_source.dart | 17 +- lib/features/storage/application/index.dart | 1 - .../storage/application/services/index.dart | 1 - .../storage/data/data_sources/index.dart | 3 - lib/features/storage/data/index.dart | 3 - .../storage/data/models/database_storage.dart | 160 ------------------ .../storage/data/repositories/index.dart | 1 - lib/features/storage/domain/index.dart | 3 - .../storage/enums/database_storage.dart | 47 +++++ .../storage/{data/models => enums}/index.dart | 0 .../models => enums}/secure_storage.dart | 0 .../models => enums}/shared_storage.dart | 0 .../{data/models => enums}/storage.dart | 0 .../dabase_storage_helper.dart} | 27 ++- lib/features/storage/helpers/index.dart | 3 + .../secure_storage_helper.dart} | 0 .../shared_storage_helper.dart} | 0 lib/features/storage/index.dart | 8 +- .../entities => interfaces}/base_storage.dart | 0 .../database_storage.dart | 0 .../entities => interfaces}/index.dart | 0 .../secure_storage.dart | 0 .../shared_storage.dart | 0 .../entities => interfaces}/storage.dart | 0 lib/features/storage/repositories/index.dart | 2 + .../storage_repository.dart | 0 .../storage_repository_impl.dart} | 15 +- .../database_storage_service.dart} | 0 lib/features/storage/services/index.dart | 4 + .../secure_storage_service.dart} | 0 .../shared_storage_service.dart} | 0 .../storage/services/storage_service.dart | 0 33 files changed, 90 insertions(+), 206 deletions(-) delete mode 100644 lib/features/storage/application/index.dart delete mode 100644 lib/features/storage/application/services/index.dart delete mode 100644 lib/features/storage/data/data_sources/index.dart delete mode 100644 lib/features/storage/data/index.dart delete mode 100644 lib/features/storage/data/models/database_storage.dart delete mode 100644 lib/features/storage/data/repositories/index.dart delete mode 100644 lib/features/storage/domain/index.dart create mode 100644 lib/features/storage/enums/database_storage.dart rename lib/features/storage/{data/models => enums}/index.dart (100%) rename lib/features/storage/{data/models => enums}/secure_storage.dart (100%) rename lib/features/storage/{data/models => enums}/shared_storage.dart (100%) rename lib/features/storage/{data/models => enums}/storage.dart (100%) rename lib/features/storage/{data/data_sources/database_data_source.dart => helpers/dabase_storage_helper.dart} (50%) create mode 100644 lib/features/storage/helpers/index.dart rename lib/features/storage/{data/data_sources/secure_data_source.dart => helpers/secure_storage_helper.dart} (100%) rename lib/features/storage/{data/data_sources/shared_data_source.dart => helpers/shared_storage_helper.dart} (100%) rename lib/features/storage/{domain/entities => interfaces}/base_storage.dart (100%) rename lib/features/storage/{domain/entities => interfaces}/database_storage.dart (100%) rename lib/features/storage/{domain/entities => interfaces}/index.dart (100%) rename lib/features/storage/{domain/entities => interfaces}/secure_storage.dart (100%) rename lib/features/storage/{domain/entities => interfaces}/shared_storage.dart (100%) rename lib/features/storage/{domain/entities => interfaces}/storage.dart (100%) create mode 100644 lib/features/storage/repositories/index.dart rename lib/features/storage/{domain/respositories => repositories}/storage_repository.dart (100%) rename lib/features/storage/{data/repositories/storage_repository.dart => repositories/storage_repository_impl.dart} (84%) rename lib/features/storage/{application/services/database_service.dart => services/database_storage_service.dart} (100%) create mode 100644 lib/features/storage/services/index.dart rename lib/features/storage/{domain/respositories/index.dart => services/secure_storage_service.dart} (100%) rename lib/features/storage/{domain/usecases/index.dart => services/shared_storage_service.dart} (100%) create mode 100644 lib/features/storage/services/storage_service.dart diff --git a/lib/features/profile/data/data_sources/index.dart b/lib/features/profile/data/data_sources/index.dart index e69de29b..df355299 100644 --- a/lib/features/profile/data/data_sources/index.dart +++ b/lib/features/profile/data/data_sources/index.dart @@ -0,0 +1 @@ +export 'profile_local_data_source.dart'; diff --git a/lib/features/profile/data/data_sources/profile_local_data_source.dart b/lib/features/profile/data/data_sources/profile_local_data_source.dart index 71788f92..481f5b67 100644 --- a/lib/features/profile/data/data_sources/profile_local_data_source.dart +++ b/lib/features/profile/data/data_sources/profile_local_data_source.dart @@ -5,18 +5,13 @@ import 'package:hub/shared/constants/index.dart'; import 'package:sqflite/sqflite.dart'; -abstract class ProfileLocalDataSource { - Future init(); - Future get(String key); - Future set(String key, T value); - Future delete(String key); - Future clearAll(); -} +abstract class ProfileLocalDataSource implements DatabaseStorage {} class ProfileLocalDataSourceImpl implements BaseStorage { ProfileLocalDataSourceImpl._(); - static final ProfileLocalDataSourceImpl instance = ProfileLocalDataSourceImpl._(); + static final ProfileLocalDataSourceImpl instance = + ProfileLocalDataSourceImpl._(); bool _isInitialized = false; @@ -29,7 +24,8 @@ class ProfileLocalDataSourceImpl implements BaseStorage { @override Future get(String key) async { - var response = await DatabaseService.database.query(tableKeychain, where: 'key = ?', whereArgs: [key]); + var response = await DatabaseService.database + .query(tableKeychain, where: 'key = ?', whereArgs: [key]); if (response.isEmpty) { return null; } @@ -56,7 +52,8 @@ class ProfileLocalDataSourceImpl implements BaseStorage { @override Future delete(String key) async { - await DatabaseService.database.delete(tableKeychain, where: 'key = ?', whereArgs: [key]); + await DatabaseService.database + .delete(tableKeychain, where: 'key = ?', whereArgs: [key]); } @override diff --git a/lib/features/storage/application/index.dart b/lib/features/storage/application/index.dart deleted file mode 100644 index 810de75e..00000000 --- a/lib/features/storage/application/index.dart +++ /dev/null @@ -1 +0,0 @@ -export 'services/index.dart'; diff --git a/lib/features/storage/application/services/index.dart b/lib/features/storage/application/services/index.dart deleted file mode 100644 index 43178711..00000000 --- a/lib/features/storage/application/services/index.dart +++ /dev/null @@ -1 +0,0 @@ -export 'database_service.dart'; diff --git a/lib/features/storage/data/data_sources/index.dart b/lib/features/storage/data/data_sources/index.dart deleted file mode 100644 index b66c53d7..00000000 --- a/lib/features/storage/data/data_sources/index.dart +++ /dev/null @@ -1,3 +0,0 @@ -export 'database_data_source.dart'; -export 'secure_data_source.dart'; -export 'shared_data_source.dart'; diff --git a/lib/features/storage/data/index.dart b/lib/features/storage/data/index.dart deleted file mode 100644 index 186dfac9..00000000 --- a/lib/features/storage/data/index.dart +++ /dev/null @@ -1,3 +0,0 @@ -export 'data_sources/index.dart'; -export 'repositories/index.dart'; -export 'models/index.dart'; diff --git a/lib/features/storage/data/models/database_storage.dart b/lib/features/storage/data/models/database_storage.dart deleted file mode 100644 index 5926cbf9..00000000 --- a/lib/features/storage/data/models/database_storage.dart +++ /dev/null @@ -1,160 +0,0 @@ -import 'package:hub/features/storage/index.dart'; - -abstract class DatabaseStorageKey implements IDatabaseStorage { - final String key; - const DatabaseStorageKey(this.key); - List get values => []; -} - -class ProfileStorageKey extends DatabaseStorageKey { - const ProfileStorageKey._(String key) : super(key); - - static const String table = 'profileTable'; - - static const ProfileStorageKey userEmail = ProfileStorageKey._('fre_userEmail'); - static const ProfileStorageKey devUUID = ProfileStorageKey._('fre_devUUID'); - static const ProfileStorageKey userUUID = ProfileStorageKey._('fre_userUUID'); - static const ProfileStorageKey userDevUUID = ProfileStorageKey._('fre_userDevUUID'); - static const ProfileStorageKey status = ProfileStorageKey._('fre_status'); - static const ProfileStorageKey userName = ProfileStorageKey._('fre_userName'); - static const ProfileStorageKey clientUUID = ProfileStorageKey._('fre_cliUUID'); - static const ProfileStorageKey ownerUUID = ProfileStorageKey._('fre_ownerUUID'); - static const ProfileStorageKey clientName = ProfileStorageKey._('fre_cliName'); - static const ProfileStorageKey ownerName = ProfileStorageKey._('fre_ownerName'); - - @override - List get values => [ - userEmail.key, - devUUID.key, - userUUID.key, - userDevUUID.key, - status.key, - userName.key, - clientUUID.key, - ownerUUID.key, - clientName.key, - ownerName.key, - ]; -} - -class LocalsStorageKey extends DatabaseStorageKey { - const LocalsStorageKey._(String key) : super(key); - - static const table = 'localTable'; - - static const LocalsStorageKey petAmount = LocalsStorageKey._('fre_petAmountRegister'); - static const LocalsStorageKey whatsapp = LocalsStorageKey._('fre_whatsapp'); - static const LocalsStorageKey provisional = LocalsStorageKey._('fre_provisional'); - static const LocalsStorageKey pets = LocalsStorageKey._('fre_pets'); - static const LocalsStorageKey local = LocalsStorageKey._('fre_local'); - static const LocalsStorageKey notify = LocalsStorageKey._('fre_notify'); - static const LocalsStorageKey fingerprint = LocalsStorageKey._('fre_fingerprint'); - static const LocalsStorageKey access = LocalsStorageKey._('fre_access'); - static const LocalsStorageKey panic = LocalsStorageKey._('fre_panic'); - static const LocalsStorageKey person = LocalsStorageKey._('fre_person'); - static const LocalsStorageKey requestOSNotification = LocalsStorageKey._('fre_requestOSnotification'); - static const LocalsStorageKey isNewVersion = LocalsStorageKey._('fre_isNewVersion'); - - @override - List get values => [ - petAmount.key, - whatsapp.key, - provisional.key, - pets.key, - local.key, - notify.key, - fingerprint.key, - access.key, - panic.key, - person.key, - requestOSNotification.key, - isNewVersion.key, - ]; -} - -// enum DatabaseStorageKey implements IDatabaseStorage { -// devUUID, -// userUUID, -// userDevUUID, -// status, -// userName, -// userEmail, -// clientUUID, -// ownerName, -// ownerUUID, -// clientName, -// petAmount, -// whatsapp, -// provisional, -// pets, -// local, -// notify, -// fingerprint, -// access, -// panic, -// person, -// requestOSNotification, -// isNewVersion, -// } - -// extension ProfileStorageKeyExtension on DatabaseStorageKey { -// String get profile { -// switch (this) { -// case DatabaseStorageKey.userEmail: -// return 'fre_userEmail'; -// case DatabaseStorageKey.devUUID: -// return 'fre_devUUID'; -// case DatabaseStorageKey.userUUID: -// return 'fre_userUUID'; -// case DatabaseStorageKey.userDevUUID: -// return 'fre_userDevUUID'; -// case DatabaseStorageKey.status: -// return 'fre_status'; -// case DatabaseStorageKey.userName: -// return 'fre_userName'; -// case DatabaseStorageKey.clientUUID: -// return 'fre_cliUUID'; -// case DatabaseStorageKey.ownerUUID: -// return 'fre_ownerUUID'; -// case DatabaseStorageKey.clientName: -// return 'fre_cliName'; -// case DatabaseStorageKey.ownerName: -// return 'fre_ownerName'; -// default: -// return ''; -// } -// } -// } - -// extension LocalsStorageKeyExtension on DatabaseStorageKey { -// String get locals { -// switch (this) { -// case DatabaseStorageKey.petAmount: -// return 'fre_petAmountRegister'; -// case DatabaseStorageKey.whatsapp: -// return 'fre_whatsapp'; -// case DatabaseStorageKey.provisional: -// return 'fre_provisional'; -// case DatabaseStorageKey.pets: -// return 'fre_pets'; -// case DatabaseStorageKey.local: -// return 'fre_local'; -// case DatabaseStorageKey.notify: -// return 'fre_notify'; -// case DatabaseStorageKey.fingerprint: -// return 'fre_fingerprint'; -// case DatabaseStorageKey.access: -// return 'fre_access'; -// case DatabaseStorageKey.panic: -// return 'fre_panic'; -// case DatabaseStorageKey.person: -// return 'fre_person'; -// case DatabaseStorageKey.requestOSNotification: -// return 'fre_requestOSnotification'; -// case DatabaseStorageKey.isNewVersion: -// return 'fre_isNewVersion'; -// default: -// return ''; -// } -// } -// } diff --git a/lib/features/storage/data/repositories/index.dart b/lib/features/storage/data/repositories/index.dart deleted file mode 100644 index 1a23c63f..00000000 --- a/lib/features/storage/data/repositories/index.dart +++ /dev/null @@ -1 +0,0 @@ -export 'storage_repository.dart'; diff --git a/lib/features/storage/domain/index.dart b/lib/features/storage/domain/index.dart deleted file mode 100644 index 00b76d59..00000000 --- a/lib/features/storage/domain/index.dart +++ /dev/null @@ -1,3 +0,0 @@ -export 'entities/index.dart'; -export 'respositories/index.dart'; -export 'usecases/index.dart'; diff --git a/lib/features/storage/enums/database_storage.dart b/lib/features/storage/enums/database_storage.dart new file mode 100644 index 00000000..9fab3420 --- /dev/null +++ b/lib/features/storage/enums/database_storage.dart @@ -0,0 +1,47 @@ +abstract class DatabaseStorageKey {} + +enum ProfileStorageKey implements DatabaseStorageKey { + userEmail('fre_userEmail'), + devUUID('fre_devUUID'), + userUUID('fre_userUUID'), + userDevUUID('fre_userDevUUID'), + status('fre_status'), + userName('fre_userName'), + clientUUID('fre_cliUUID'), + ownerUUID('fre_ownerUUID'), + clientName('fre_cliName'), + ownerName('fre_ownerName'); + + final String key; + + const ProfileStorageKey(this.key); + + static const String table = 'profileTable'; + + static List get values => + ProfileStorageKey.values.map((e) => e.key).toList(); +} + +enum LocalsStorageKey implements DatabaseStorageKey { + petAmount('fre_petAmountRegister'), + whatsapp('fre_whatsapp'), + provisional('fre_provisional'), + pets('fre_pets'), + local('fre_local'), + notify('fre_notify'), + fingerprint('fre_fingerprint'), + access('fre_access'), + panic('fre_panic'), + person('fre_person'), + requestOSNotification('fre_requestOSnotification'), + isNewVersion('fre_isNewVersion'); + + final String key; + + const LocalsStorageKey(this.key); + + static const String table = 'LocalsStorageKey'; + + static List get values => + LocalsStorageKey.values.map((e) => e.key).toList(); +} diff --git a/lib/features/storage/data/models/index.dart b/lib/features/storage/enums/index.dart similarity index 100% rename from lib/features/storage/data/models/index.dart rename to lib/features/storage/enums/index.dart diff --git a/lib/features/storage/data/models/secure_storage.dart b/lib/features/storage/enums/secure_storage.dart similarity index 100% rename from lib/features/storage/data/models/secure_storage.dart rename to lib/features/storage/enums/secure_storage.dart diff --git a/lib/features/storage/data/models/shared_storage.dart b/lib/features/storage/enums/shared_storage.dart similarity index 100% rename from lib/features/storage/data/models/shared_storage.dart rename to lib/features/storage/enums/shared_storage.dart diff --git a/lib/features/storage/data/models/storage.dart b/lib/features/storage/enums/storage.dart similarity index 100% rename from lib/features/storage/data/models/storage.dart rename to lib/features/storage/enums/storage.dart diff --git a/lib/features/storage/data/data_sources/database_data_source.dart b/lib/features/storage/helpers/dabase_storage_helper.dart similarity index 50% rename from lib/features/storage/data/data_sources/database_data_source.dart rename to lib/features/storage/helpers/dabase_storage_helper.dart index 83a0de90..aa04e1d7 100644 --- a/lib/features/storage/data/data_sources/database_data_source.dart +++ b/lib/features/storage/helpers/dabase_storage_helper.dart @@ -1,29 +1,24 @@ +import 'package:hub/features/profile/index.dart'; import 'package:hub/features/storage/index.dart'; -import 'package:sqflite/sqflite.dart'; class DatabaseStorage implements BaseStorage { DatabaseStorage._(); - static final DatabaseStorage instance = DatabaseStorage._(); - late final Database _database; - bool _isInitialized = false; + // static final DatabaseStorage instance = DatabaseStorage._(); + // late final Database _database; + // bool _isInitialized = false; - static DatabaseStorageKey getInstanceByKey(String key) { - if (ProfileStorageKey.values.map((e) => e.value).toList().contains(key)) { - return ProfileStorageKey.instance; - } else (SharedPreferencesKey.values.map((e) => e.value).toList().contains(key)) { - return LocalsStorageKey.instance; - + static BaseStorage getInstanceByKey(String key) { + if (ProfileStorageKey.values.contains(key)) + return ProfileLocalDataSourceImpl.instance(key); + else //if (LocalsStorageKey.values.contains(key)); + return LocalsStorageKey.instance(key); } - - - } - @override - Future clearAll() => throw UnimplementedError(); + Future clearAll() => throw UnimplementedError(); @override Future delete(String key) => throw UnimplementedError(); @override @@ -32,4 +27,4 @@ class DatabaseStorage implements BaseStorage { Future init() => throw UnimplementedError(); @override Future set(String key, T value) => throw UnimplementedError(); -} \ No newline at end of file +} diff --git a/lib/features/storage/helpers/index.dart b/lib/features/storage/helpers/index.dart new file mode 100644 index 00000000..56c9c91c --- /dev/null +++ b/lib/features/storage/helpers/index.dart @@ -0,0 +1,3 @@ +export 'dabase_storage_helper.dart'; +export 'secure_storage_helper.dart'; +export 'shared_storage_helper.dart'; diff --git a/lib/features/storage/data/data_sources/secure_data_source.dart b/lib/features/storage/helpers/secure_storage_helper.dart similarity index 100% rename from lib/features/storage/data/data_sources/secure_data_source.dart rename to lib/features/storage/helpers/secure_storage_helper.dart diff --git a/lib/features/storage/data/data_sources/shared_data_source.dart b/lib/features/storage/helpers/shared_storage_helper.dart similarity index 100% rename from lib/features/storage/data/data_sources/shared_data_source.dart rename to lib/features/storage/helpers/shared_storage_helper.dart diff --git a/lib/features/storage/index.dart b/lib/features/storage/index.dart index 65f22682..8ce9944e 100644 --- a/lib/features/storage/index.dart +++ b/lib/features/storage/index.dart @@ -1,3 +1,5 @@ -export 'data/index.dart'; -export 'domain/index.dart'; -export 'application/index.dart'; +export 'interfaces/index.dart'; +export 'enums/index.dart'; +export 'helpers/index.dart'; +export 'repositories/index.dart'; +export 'services/index.dart'; diff --git a/lib/features/storage/domain/entities/base_storage.dart b/lib/features/storage/interfaces/base_storage.dart similarity index 100% rename from lib/features/storage/domain/entities/base_storage.dart rename to lib/features/storage/interfaces/base_storage.dart diff --git a/lib/features/storage/domain/entities/database_storage.dart b/lib/features/storage/interfaces/database_storage.dart similarity index 100% rename from lib/features/storage/domain/entities/database_storage.dart rename to lib/features/storage/interfaces/database_storage.dart diff --git a/lib/features/storage/domain/entities/index.dart b/lib/features/storage/interfaces/index.dart similarity index 100% rename from lib/features/storage/domain/entities/index.dart rename to lib/features/storage/interfaces/index.dart diff --git a/lib/features/storage/domain/entities/secure_storage.dart b/lib/features/storage/interfaces/secure_storage.dart similarity index 100% rename from lib/features/storage/domain/entities/secure_storage.dart rename to lib/features/storage/interfaces/secure_storage.dart diff --git a/lib/features/storage/domain/entities/shared_storage.dart b/lib/features/storage/interfaces/shared_storage.dart similarity index 100% rename from lib/features/storage/domain/entities/shared_storage.dart rename to lib/features/storage/interfaces/shared_storage.dart diff --git a/lib/features/storage/domain/entities/storage.dart b/lib/features/storage/interfaces/storage.dart similarity index 100% rename from lib/features/storage/domain/entities/storage.dart rename to lib/features/storage/interfaces/storage.dart diff --git a/lib/features/storage/repositories/index.dart b/lib/features/storage/repositories/index.dart new file mode 100644 index 00000000..030753fc --- /dev/null +++ b/lib/features/storage/repositories/index.dart @@ -0,0 +1,2 @@ +export 'storage_repository.dart'; +export 'storage_repository_impl.dart'; diff --git a/lib/features/storage/domain/respositories/storage_repository.dart b/lib/features/storage/repositories/storage_repository.dart similarity index 100% rename from lib/features/storage/domain/respositories/storage_repository.dart rename to lib/features/storage/repositories/storage_repository.dart diff --git a/lib/features/storage/data/repositories/storage_repository.dart b/lib/features/storage/repositories/storage_repository_impl.dart similarity index 84% rename from lib/features/storage/data/repositories/storage_repository.dart rename to lib/features/storage/repositories/storage_repository_impl.dart index d71ee26c..56dc470c 100644 --- a/lib/features/storage/data/repositories/storage_repository.dart +++ b/lib/features/storage/repositories/storage_repository_impl.dart @@ -4,7 +4,7 @@ import 'package:flutter/cupertino.dart'; import 'package:hub/features/profile/data/data_sources/profile_local_data_source.dart'; import 'package:hub/features/storage/index.dart'; -class StorageHelper { +class StorageHelper implements StorageRepository { static final StorageHelper _instance = StorageHelper._internal(); factory StorageHelper() => _instance; StorageHelper._internal(); @@ -22,11 +22,13 @@ class StorageHelper { await SharedPreferencesStorage.instance.init(); await ProfileLocalDataSourceImpl.instance.init(); - String? isFirstRun = await SharedPreferencesStorage.instance.get(SharedPreferencesKey.isFirstRun.value); + String? isFirstRun = await SharedPreferencesStorage.instance + .get(SharedPreferencesKey.isFirstRun.value); if (isFirstRun != 'false') { log('First run'); - await SharedPreferencesStorage.instance.set(SharedPreferencesKey.isFirstRun.value, false); + await SharedPreferencesStorage.instance + .set(SharedPreferencesKey.isFirstRun.value, false); await SecureStorage.instance.set(SecureStorageKey.isLogged.value, false); } } @@ -45,10 +47,13 @@ class StorageHelper { static BaseStorage getInstanceByKey(String key) { if (SecureStorageKey.values.map((e) => e.value).toList().contains(key)) { return SecureStorage.instance; - } else if (SharedPreferencesKey.values.map((e) => e.value).toList().contains(key)) { + } else if (SharedPreferencesKey.values + .map((e) => e.value) + .toList() + .contains(key)) { return SharedPreferencesStorage.instance; } else { - return ProfileLocalDataSourceImpl.instance; + return DatabaseStorage.instance; } } diff --git a/lib/features/storage/application/services/database_service.dart b/lib/features/storage/services/database_storage_service.dart similarity index 100% rename from lib/features/storage/application/services/database_service.dart rename to lib/features/storage/services/database_storage_service.dart diff --git a/lib/features/storage/services/index.dart b/lib/features/storage/services/index.dart new file mode 100644 index 00000000..d92898f1 --- /dev/null +++ b/lib/features/storage/services/index.dart @@ -0,0 +1,4 @@ +export 'database_storage_service.dart'; +export 'secure_storage_service.dart'; +export 'shared_storage_service.dart'; +export 'storage_service.dart'; diff --git a/lib/features/storage/domain/respositories/index.dart b/lib/features/storage/services/secure_storage_service.dart similarity index 100% rename from lib/features/storage/domain/respositories/index.dart rename to lib/features/storage/services/secure_storage_service.dart diff --git a/lib/features/storage/domain/usecases/index.dart b/lib/features/storage/services/shared_storage_service.dart similarity index 100% rename from lib/features/storage/domain/usecases/index.dart rename to lib/features/storage/services/shared_storage_service.dart diff --git a/lib/features/storage/services/storage_service.dart b/lib/features/storage/services/storage_service.dart new file mode 100644 index 00000000..e69de29b From b1d6cf795700069f402821c2e4ad77e2b6607668 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Wed, 18 Dec 2024 11:00:54 -0300 Subject: [PATCH 05/25] dart format --- lib/components/_template_/bloc/bloc.dart | 1 + lib/components/_template_/bloc/event.dart | 1 + lib/components/_template_/bloc/index.dart | 1 + lib/components/_template_/bloc/state.dart | 1 + lib/components/_template_/index.dart | 1 + .../_template_/view_model/index.dart | 1 + .../_template_/view_model/view_model.dart | 1 + lib/components/_template_/widgets/index.dart | 1 + lib/components/_template_/widgets/screen.dart | 1 + lib/components/_template_/widgets/widget.dart | 1 + .../atom_image_svg_theme.dart | 6 +- .../custom_datepicker.dart | 69 +- .../custom_select.dart | 42 +- .../media_upload_button.dart | 41 +- .../submit_button.dart | 3 +- .../shared_components_atoms/tabview.dart | 3 +- .../term_of_use/atom_terms_of_use.dart | 3 +- .../text_field_component_model.dart | 3 +- .../text_field_component_widget.dart | 15 +- .../option_selection_modal_model.dart | 3 +- .../option_selection_modal_widget.dart | 49 +- .../order_filter_modal_model.dart | 5 +- .../order_filter_modal_widget.dart | 68 +- .../throw_exception_widget.dart | 38 +- .../visitor_not_found_component_model.dart | 3 +- .../visitor_not_found_component_widget.dart | 37 +- ...m_arrow_linked_locals_component_model.dart | 3 +- ..._arrow_linked_locals_component_widget.dart | 95 +- .../schedule_visit_detail_model.dart | 12 +- .../schedule_visit_detail_widget.dart | 402 +++-- ...p_arrow_linked_locals_component_model.dart | 12 +- ..._arrow_linked_locals_component_widget.dart | 66 +- ...cation_modal_template_component_model.dart | 12 +- ...ation_modal_template_component_widget.dart | 163 +- .../card_item_template_component_model.dart | 6 +- .../card_item_template_component_widget.dart | 25 +- .../change_pass_model.dart | 6 +- .../change_pass_widget.dart | 110 +- .../details_component_widget.dart | 71 +- ...got_password_template_component_model.dart | 9 +- ...ot_password_template_component_widget.dart | 117 +- ...item_details_template_component_model.dart | 10 +- ...tem_details_template_component_widget.dart | 154 +- .../message_notification_widget.dart | 78 +- .../provisional_schedule_template_model.dart | 46 +- .../provisional_shcedule_template_widget.dart | 830 ++++++--- ...ode_pass_key_template_component_model.dart | 9 +- ...de_pass_key_template_component_widget.dart | 114 +- ...siter_vistor_template_component_model.dart | 22 +- ...iter_vistor_template_component_widget.dart | 352 ++-- .../sign_in_template_component_model.dart | 9 +- .../sign_in_template_component_widget.dart | 829 ++++++--- .../sign_up_template_component_model.dart | 33 +- .../sign_up_template_component_widget.dart | 688 ++++++-- .../view_visit_detail_model.dart | 6 +- .../view_visit_detail_widget.dart | 306 +++- ...etails_modal_template_component_model.dart | 6 +- ...tails_modal_template_component_widget.dart | 9 +- ...etails_modal_template_component_model.dart | 6 +- ...tails_modal_template_component_widget.dart | 85 +- ...search_modal_template_component_model.dart | 18 +- ...earch_modal_template_component_widget.dart | 215 ++- .../welcome_template_component_model.dart | 6 +- .../welcome_template_component_widget.dart | 199 ++- lib/core/index.dart | 1 + .../application/services/index.dart | 1 + .../_template_/data/data_sources/index.dart | 1 + .../_template_/data/models/index.dart | 1 + .../_template_/data/repositories/index.dart | 1 + .../_template_/domain/entities/index.dart | 1 + .../domain/respositories/index.dart | 1 + .../_template_/domain/usecases/index.dart | 1 + .../_template_/presentation/blocs/index.dart | 1 + .../_template_/presentation/pages/index.dart | 1 + .../presentation/widgets/index.dart | 1 + .../authentication_service.dart | 38 +- .../backend/api_requests/api_calls.dart | 390 +++-- .../backend/api_requests/api_manager.dart | 77 +- .../api_requests/get_streamed_response.dart | 3 +- lib/features/backend/schema/enums/enums.dart | 3 +- .../backend/schema/structs/device_struct.dart | 14 +- .../backend/schema/util/schema_util.dart | 22 +- .../access_history_local_data_source.dart | 1 + ...provisional_history_local_data_source.dart | 1 + .../access_history_remote_data_source.dart | 1 + ...rovisional_history_remote_data_source.dart | 1 + lib/features/history/data/models/index.dart | 1 + .../access_history_repository_impl.dart | 1 + .../provisional_history_repository_impl.dart | 1 + .../history/domain/entities/index.dart | 1 + .../respositories/history_repository.dart | 1 + .../history/domain/usecases/index.dart | 1 + .../blocs/access_history_bloc.dart | 9 +- .../blocs/provisional_history_bloc.dart | 22 +- .../pages/acess_history_page_widget.dart | 90 +- .../pages/provisional_history_page.dart | 138 +- .../widgets/access_filter_modal.dart | 59 +- .../widgets/provisional_filter_modal.dart | 49 +- .../home/data/data_sources/index.dart | 1 + lib/features/home/data/models/index.dart | 1 + .../home/data/repositories/index.dart | 1 + lib/features/home/domain/entities/index.dart | 1 + .../home/domain/respositories/index.dart | 1 + lib/features/home/domain/usecases/index.dart | 1 + .../home/presentation/blocs/home_bloc.dart | 15 +- .../home/presentation/pages/about_system.dart | 9 +- .../home/presentation/pages/home_page.dart | 6 +- .../presentation/widgets/drawer_widget.dart | 12 +- .../home/presentation/widgets/index.dart | 1 + .../locals_remote_data_source.dart | 24 +- lib/features/locals/data/models/index.dart | 1 + .../repositories/locals_repository_impl.dart | 6 +- .../locals/domain/entities/index.dart | 1 + .../locals/domain/usecases/index.dart | 1 + lib/features/locals/index.dart | 2 +- .../blocs/local_profile_bloc.dart | 33 +- .../locals/presentation/widgets/index.dart | 2 +- .../local_profile/local_profile_widget.dart | 73 +- lib/features/locals/utils/local_util.dart | 105 +- .../data_sources/menu_local_data_source.dart | 27 +- lib/features/menu/data/models/index.dart | 1 + .../repositories/menu_repository_impl.dart | 39 +- .../menu/domain/entities/menu_item.dart | 3 +- .../domain/respositories/menu_repository.dart | 3 +- lib/features/menu/domain/usecases/index.dart | 1 + .../menu/presentation/blocs/menu_bloc.dart | 6 +- .../presentation/blocs/menu_view_bloc.dart | 2 - lib/features/menu/presentation/index.dart | 2 +- .../menu/presentation/mappers/menu_entry.dart | 3 +- .../menu/presentation/widgets/index.dart | 2 +- .../widgets/menu_item/menu_item_button.dart | 3 +- .../widgets/menu_item/menu_item_card.dart | 3 +- .../widgets/menu_view/menu_list_view.dart | 6 +- .../menu_view/menu_staggered_view.dart | 11 +- lib/features/modules/constants/index.dart | 2 +- .../modules/constants/license_constants.dart | 31 +- .../license_local_data_source.dart | 23 +- .../license_remote_data_source.dart | 27 +- .../modules/data/models/license_model.dart | 3 +- .../modules/data/models/module_model.dart | 3 +- .../repositories/license_repository_impl.dart | 3 +- .../modules/domain/entities/base_module.dart | 2 - .../modules/domain/entities/license.dart | 32 +- .../modules/domain/usecases/index.dart | 1 + lib/features/modules/index.dart | 2 +- .../modules/presentation/blocs/index.dart | 1 + .../modules/presentation/widgets/index.dart | 1 + .../notifications/deep_link_service.dart | 3 +- .../firebase_messaging_service.dart | 11 +- .../notifications/notification_service.dart | 81 +- lib/features/profile/data/models/index.dart | 1 + .../profile/data/repositories/index.dart | 1 + .../profile/domain/entities/index.dart | 1 + .../profile/domain/respositories/index.dart | 1 + .../profile/domain/usecases/index.dart | 1 + .../profile/presentation/blocs/index.dart | 1 + .../profile/presentation/pages/index.dart | 1 + .../profile/presentation/widgets/index.dart | 1 + .../property/data/data_sources/index.dart | 1 + lib/features/property/data/models/index.dart | 1 + .../property/data/repositories/index.dart | 1 + .../property/domain/entities/index.dart | 1 + .../property/domain/respositories/index.dart | 1 + .../property/domain/usecases/index.dart | 1 + .../property/presentation/blocs/index.dart | 1 + .../pages/about_property_screen.dart | 11 +- .../property/presentation/widgets/index.dart | 1 + .../services/database_storage_service.dart | 6 +- .../services/secure_storage_service.dart | 1 + .../services/shared_storage_service.dart | 1 + .../storage/services/storage_service.dart | 1 + lib/firebase_options.dart | 9 +- lib/flutter_flow/custom_functions.dart | 5 +- lib/flutter_flow/custom_icons.dart | 3 +- lib/flutter_flow/flutter_flow_animations.dart | 14 +- .../flutter_flow_button_tabbar.dart | 121 +- .../flutter_flow_checkbox_group.dart | 16 +- lib/flutter_flow/flutter_flow_drop_down.dart | 69 +- .../flutter_flow_icon_button.dart | 12 +- lib/flutter_flow/flutter_flow_model.dart | 6 +- lib/flutter_flow/flutter_flow_theme.dart | 12 +- lib/flutter_flow/flutter_flow_util.dart | 111 +- lib/flutter_flow/flutter_flow_widgets.dart | 60 +- lib/flutter_flow/form_field_controller.dart | 3 +- lib/flutter_flow/internationalization.dart | 39 +- lib/flutter_flow/keep_alive_wrapper.dart | 3 +- lib/flutter_flow/lat_lng.dart | 5 +- lib/flutter_flow/nav/nav.dart | 214 ++- lib/flutter_flow/nav/serialization_util.dart | 20 +- lib/flutter_flow/permissions_util.dart | 3 +- lib/flutter_flow/random_data_util.dart | 9 +- lib/flutter_flow/request_manager.dart | 11 +- lib/flutter_flow/upload_data.dart | 98 +- lib/main.dart | 14 +- .../delivery_schedule_widget.dart | 6 +- .../fast_pass_page/fast_pass_page_widget.dart | 55 +- .../forgot_password_model.dart | 18 +- .../forgot_password_screen.dart | 104 +- .../liberation_history_model.dart | 16 +- .../liberation_history_widget.dart | 50 +- .../message_history_page_model.dart | 15 +- .../message_history_page_widget.dart | 68 +- .../package_order_page.dart | 128 +- .../people_on_the_property_page_model.dart | 3 +- .../people_on_the_property_page_widget.dart | 24 +- .../pets_history_screen.dart | 59 +- lib/pages/pets_page/pets_page_model.dart | 126 +- lib/pages/pets_page/pets_page_widget.dart | 1484 ++++++++++------- .../preferences_settings_model.dart | 39 +- .../preferences_settings_widget.dart | 15 +- .../provisional_schedule_widget.dart | 3 +- .../qr_code_page/qr_code_page_model.dart | 33 +- .../qr_code_page/qr_code_page_widget.dart | 153 +- .../reception_page/reception_page_model.dart | 3 +- .../reception_page/reception_page_widget.dart | 97 +- .../register_visitor_page_model.dart | 6 +- .../register_visitor_page_widget.dart | 6 +- .../reservation_page_widget.dart | 55 +- .../residents_on_the_property_model.dart | 6 +- .../residents_on_the_property_screen.dart | 49 +- .../schedule_complete_visit_page_model.dart | 117 +- .../schedule_complete_visit_page_widget.dart | 823 ++++++--- .../visit_history_page_widget.dart | 84 +- .../sign_in_page/sign_in_page_model.dart | 3 +- .../sign_in_page/sign_in_page_widget.dart | 4 +- .../sign_up_page/sign_up_page_model.dart | 3 +- .../sign_up_page/sign_up_page_widget.dart | 4 +- .../vehicles_on_the_property.dart | 34 +- lib/pages/visits_on_the_property/model.dart | 13 +- .../visits_on_the_property_screen.dart | 50 +- .../welcome_page/welcome_page_model.dart | 3 +- .../welcome_page/welcome_page_widget.dart | 4 +- lib/shared/constants/keychain_constants.dart | 6 +- lib/shared/extensions/dialog_extensions.dart | 3 +- .../flutter_secure_storage_extensions.dart | 33 +- lib/shared/helpers/index.dart | 1 + lib/shared/index.dart | 1 + lib/shared/services/index.dart | 1 + lib/shared/utils/device_util.dart | 6 +- lib/shared/utils/dialog_util.dart | 9 +- lib/shared/utils/image_util.dart | 3 +- lib/shared/utils/limited_text_size.dart | 8 +- lib/shared/utils/loading_util.dart | 7 +- lib/shared/utils/log_util.dart | 6 +- lib/shared/utils/path_util.dart | 4 +- lib/shared/utils/snackbar_util.dart | 14 +- lib/shared/utils/text_util.dart | 5 +- 247 files changed, 8157 insertions(+), 3713 deletions(-) diff --git a/lib/components/_template_/bloc/bloc.dart b/lib/components/_template_/bloc/bloc.dart index e69de29b..8b137891 100644 --- a/lib/components/_template_/bloc/bloc.dart +++ b/lib/components/_template_/bloc/bloc.dart @@ -0,0 +1 @@ + diff --git a/lib/components/_template_/bloc/event.dart b/lib/components/_template_/bloc/event.dart index e69de29b..8b137891 100644 --- a/lib/components/_template_/bloc/event.dart +++ b/lib/components/_template_/bloc/event.dart @@ -0,0 +1 @@ + diff --git a/lib/components/_template_/bloc/index.dart b/lib/components/_template_/bloc/index.dart index e69de29b..8b137891 100644 --- a/lib/components/_template_/bloc/index.dart +++ b/lib/components/_template_/bloc/index.dart @@ -0,0 +1 @@ + diff --git a/lib/components/_template_/bloc/state.dart b/lib/components/_template_/bloc/state.dart index e69de29b..8b137891 100644 --- a/lib/components/_template_/bloc/state.dart +++ b/lib/components/_template_/bloc/state.dart @@ -0,0 +1 @@ + diff --git a/lib/components/_template_/index.dart b/lib/components/_template_/index.dart index e69de29b..8b137891 100644 --- a/lib/components/_template_/index.dart +++ b/lib/components/_template_/index.dart @@ -0,0 +1 @@ + diff --git a/lib/components/_template_/view_model/index.dart b/lib/components/_template_/view_model/index.dart index e69de29b..8b137891 100644 --- a/lib/components/_template_/view_model/index.dart +++ b/lib/components/_template_/view_model/index.dart @@ -0,0 +1 @@ + diff --git a/lib/components/_template_/view_model/view_model.dart b/lib/components/_template_/view_model/view_model.dart index e69de29b..8b137891 100644 --- a/lib/components/_template_/view_model/view_model.dart +++ b/lib/components/_template_/view_model/view_model.dart @@ -0,0 +1 @@ + diff --git a/lib/components/_template_/widgets/index.dart b/lib/components/_template_/widgets/index.dart index e69de29b..8b137891 100644 --- a/lib/components/_template_/widgets/index.dart +++ b/lib/components/_template_/widgets/index.dart @@ -0,0 +1 @@ + diff --git a/lib/components/_template_/widgets/screen.dart b/lib/components/_template_/widgets/screen.dart index e69de29b..8b137891 100644 --- a/lib/components/_template_/widgets/screen.dart +++ b/lib/components/_template_/widgets/screen.dart @@ -0,0 +1 @@ + diff --git a/lib/components/_template_/widgets/widget.dart b/lib/components/_template_/widgets/widget.dart index e69de29b..8b137891 100644 --- a/lib/components/_template_/widgets/widget.dart +++ b/lib/components/_template_/widgets/widget.dart @@ -0,0 +1 @@ + diff --git a/lib/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart b/lib/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart index 7f19801a..a07154e5 100644 --- a/lib/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart +++ b/lib/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart @@ -6,7 +6,11 @@ class AtomImageSvgTheme extends StatelessWidget { final double width; final double height; - const AtomImageSvgTheme({super.key, required this.filename, required this.width, required this.height}); + const AtomImageSvgTheme( + {super.key, + required this.filename, + required this.width, + required this.height}); @override Widget build(BuildContext context) { diff --git a/lib/components/atomic_components/shared_components_atoms/custom_datepicker.dart b/lib/components/atomic_components/shared_components_atoms/custom_datepicker.dart index b615051b..2c420571 100644 --- a/lib/components/atomic_components/shared_components_atoms/custom_datepicker.dart +++ b/lib/components/atomic_components/shared_components_atoms/custom_datepicker.dart @@ -65,7 +65,8 @@ class _CustomDatePickerState extends State { fontSize: 32.0, letterSpacing: 0.0, fontWeight: FontWeight.w600, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineLargeFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).headlineLargeFamily), ), pickerBackgroundColor: FlutterFlowTheme.of(context).primaryBackground, pickerForegroundColor: FlutterFlowTheme.of(context).primaryText, @@ -88,19 +89,27 @@ class _CustomDatePickerState extends State { child!, headerBackgroundColor: FlutterFlowTheme.of(context).primary, headerForegroundColor: FlutterFlowTheme.of(context).info, - headerTextStyle: FlutterFlowTheme.of(context).headlineLarge.override( - fontFamily: FlutterFlowTheme.of(context).headlineLargeFamily, - fontSize: 32.0, - letterSpacing: 0.0, - fontWeight: FontWeight.w600, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineLargeFamily), - ), - pickerBackgroundColor: FlutterFlowTheme.of(context).primaryBackground, + headerTextStyle: + FlutterFlowTheme.of(context).headlineLarge.override( + fontFamily: + FlutterFlowTheme.of(context).headlineLargeFamily, + fontSize: 32.0, + letterSpacing: 0.0, + fontWeight: FontWeight.w600, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).headlineLargeFamily), + ), + pickerBackgroundColor: + FlutterFlowTheme.of(context).primaryBackground, pickerForegroundColor: FlutterFlowTheme.of(context).info, - selectedDateTimeBackgroundColor: FlutterFlowTheme.of(context).primary, - selectedDateTimeForegroundColor: FlutterFlowTheme.of(context).info, - pickerDialForegroundColor: FlutterFlowTheme.of(context).primaryText, - actionButtonForegroundColor: FlutterFlowTheme.of(context).primaryText, + selectedDateTimeBackgroundColor: + FlutterFlowTheme.of(context).primary, + selectedDateTimeForegroundColor: + FlutterFlowTheme.of(context).info, + pickerDialForegroundColor: + FlutterFlowTheme.of(context).primaryText, + actionButtonForegroundColor: + FlutterFlowTheme.of(context).primaryText, iconSize: 24.0, ); }, @@ -157,7 +166,8 @@ class _CustomDatePickerState extends State { child: Stack( children: [ Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), + padding: + const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), child: TextFormField( controller: widget.controller, focusNode: widget.focusNode, @@ -167,20 +177,26 @@ class _CustomDatePickerState extends State { obscureText: false, decoration: InputDecoration( isDense: true, - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), ), hintText: widget.hintText, - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), lineHeight: 1.0, ), enabledBorder: OutlineInputBorder( @@ -217,9 +233,11 @@ class _CustomDatePickerState extends State { ), ), style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), lineHeight: 1.8, ), textAlign: TextAlign.start, @@ -227,7 +245,8 @@ class _CustomDatePickerState extends State { ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), + padding: + const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), child: InkWell( splashColor: Colors.transparent, focusColor: Colors.transparent, diff --git a/lib/components/atomic_components/shared_components_atoms/custom_select.dart b/lib/components/atomic_components/shared_components_atoms/custom_select.dart index 8898a47b..7a2b791a 100644 --- a/lib/components/atomic_components/shared_components_atoms/custom_select.dart +++ b/lib/components/atomic_components/shared_components_atoms/custom_select.dart @@ -52,7 +52,8 @@ class _CustomSelectState extends State { children: [ Expanded( child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0.0, 24.0, 0.0), child: Container( width: 100.0, height: 48.0, @@ -66,11 +67,14 @@ class _CustomSelectState extends State { isMultiSelect: false, width: double.infinity, height: double.infinity, - textStyle: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + textStyle: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), fontSize: limitedInputFontSize, ), hintText: widget.hintText, @@ -83,7 +87,8 @@ class _CustomSelectState extends State { borderColor: FlutterFlowTheme.of(context).customColor6, borderWidth: 0.5, borderRadius: 10.0, - margin: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 16.0, 0.0), + margin: const EdgeInsetsDirectional.fromSTEB( + 12.0, 0.0, 16.0, 0.0), hidesUnderline: true, isOverButton: true, isSearchable: false, @@ -96,25 +101,32 @@ class _CustomSelectState extends State { if (widget.isRequired) if (widget.dropDownValue == null || widget.dropDownValue == '') Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), + padding: + const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), child: Row( mainAxisAlignment: MainAxisAlignment.start, mainAxisSize: MainAxisSize.max, children: [ Padding( - padding: const EdgeInsetsDirectional.only(top: 5, start: 15), + padding: + const EdgeInsetsDirectional.only(top: 5, start: 15), child: Text( FFLocalizations.of(context).getVariableText( enText: 'This field is required', ptText: 'Este campo é obrigatório', ), - style: FlutterFlowTheme.of(context).bodySmall.override( - fontFamily: FlutterFlowTheme.of(context).bodySmallFamily, - color: FlutterFlowTheme.of(context).customColor6, - letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodySmallFamily), - fontSize: limitedInputFontSize)), + style: FlutterFlowTheme.of(context) + .bodySmall + .override( + fontFamily: FlutterFlowTheme.of(context) + .bodySmallFamily, + color: + FlutterFlowTheme.of(context).customColor6, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap() + .containsKey(FlutterFlowTheme.of(context) + .bodySmallFamily), + fontSize: limitedInputFontSize)), ), ], ), diff --git a/lib/components/atomic_components/shared_components_atoms/media_upload_button.dart b/lib/components/atomic_components/shared_components_atoms/media_upload_button.dart index 2977f7cb..ec1c5af3 100644 --- a/lib/components/atomic_components/shared_components_atoms/media_upload_button.dart +++ b/lib/components/atomic_components/shared_components_atoms/media_upload_button.dart @@ -37,7 +37,8 @@ class _MediaUploadButtonUtilState extends State { return Builder( builder: (context) { - if (widget.uploadedFiles != null && widget.uploadedFiles!.bytes!.isNotEmpty) { + if (widget.uploadedFiles != null && + widget.uploadedFiles!.bytes!.isNotEmpty) { { return InkWell( splashColor: Colors.transparent, @@ -47,7 +48,8 @@ class _MediaUploadButtonUtilState extends State { onTap: () async { setState(() { widget.isUploading = false; - widget.uploadedFiles = FFUploadedFile(bytes: Uint8List.fromList([])); + widget.uploadedFiles = + FFUploadedFile(bytes: Uint8List.fromList([])); widget.onUploadComplete(widget.uploadedFiles!); }); }, @@ -72,7 +74,8 @@ class _MediaUploadButtonUtilState extends State { setState(() { _isLoading = true; }); - final selectedMedia = await selectMediaWithSourceBottomSheet( + final selectedMedia = + await selectMediaWithSourceBottomSheet( context: context, imageQuality: 100, allowPhoto: true, @@ -84,7 +87,9 @@ class _MediaUploadButtonUtilState extends State { try { final message = FFLocalizations.of(context) - .getVariableText(enText: 'Uploading file...', ptText: 'Enviando arquivo...'); + .getVariableText( + enText: 'Uploading file...', + ptText: 'Enviando arquivo...'); showUploadMessage( context, message, @@ -103,20 +108,24 @@ class _MediaUploadButtonUtilState extends State { ScaffoldMessenger.of(context).hideCurrentSnackBar(); widget.isUploading = false; } - if (selectedUploadedFiles.length == selectedMedia.length) { + if (selectedUploadedFiles.length == + selectedMedia.length) { setState(() { widget.uploadedFiles = selectedUploadedFiles.first; }); widget.onUploadComplete(widget.uploadedFiles!); - final message = - FFLocalizations.of(context).getVariableText(enText: 'Success!', ptText: 'Sucesso!'); + final message = FFLocalizations.of(context) + .getVariableText( + enText: 'Success!', ptText: 'Sucesso!'); showUploadMessage(context, message); } else { setState(() { _isLoading = false; }); final message = FFLocalizations.of(context) - .getVariableText(enText: 'Failed to upload data', ptText: 'Falha ao enviar dados'); + .getVariableText( + enText: 'Failed to upload data', + ptText: 'Falha ao enviar dados'); showUploadMessage(context, message); return; } @@ -163,13 +172,19 @@ class _MediaUploadButtonUtilState extends State { 'p4ftwxcy', ), textAlign: TextAlign.center, - style: FlutterFlowTheme.of(context).titleSmall.override( - fontFamily: FlutterFlowTheme.of(context).titleSmallFamily, - color: FlutterFlowTheme.of(context).primaryText, + style: FlutterFlowTheme.of(context) + .titleSmall + .override( + fontFamily: FlutterFlowTheme.of(context) + .titleSmallFamily, + color: FlutterFlowTheme.of(context) + .primaryText, fontSize: limitedInputTextSize, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .titleSmallFamily), ), ), ) diff --git a/lib/components/atomic_components/shared_components_atoms/submit_button.dart b/lib/components/atomic_components/shared_components_atoms/submit_button.dart index 1a4cdd39..bffdee8e 100644 --- a/lib/components/atomic_components/shared_components_atoms/submit_button.dart +++ b/lib/components/atomic_components/shared_components_atoms/submit_button.dart @@ -30,7 +30,8 @@ class SubmitButtonUtil extends StatelessWidget { fontFamily: FlutterFlowTheme.of(context).titleSmallFamily, color: FlutterFlowTheme.of(context).info, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey(FlutterFlowTheme.of(context).titleSmallFamily), ), borderSide: const BorderSide( color: Colors.transparent, diff --git a/lib/components/atomic_components/shared_components_atoms/tabview.dart b/lib/components/atomic_components/shared_components_atoms/tabview.dart index 3ae0d4dd..8a62cbf3 100644 --- a/lib/components/atomic_components/shared_components_atoms/tabview.dart +++ b/lib/components/atomic_components/shared_components_atoms/tabview.dart @@ -41,7 +41,8 @@ class TabViewUtil extends StatelessWidget { fontFamily: FlutterFlowTheme.of(context).titleMediumFamily, fontSize: LimitedFontSizeUtil.getBodyFontSize(context), letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).titleMediumFamily), ), unselectedLabelStyle: const TextStyle(), indicatorColor: FlutterFlowTheme.of(context).primary, diff --git a/lib/components/atomic_components/term_of_use/atom_terms_of_use.dart b/lib/components/atomic_components/term_of_use/atom_terms_of_use.dart index 470d61f8..01a47e5d 100644 --- a/lib/components/atomic_components/term_of_use/atom_terms_of_use.dart +++ b/lib/components/atomic_components/term_of_use/atom_terms_of_use.dart @@ -19,7 +19,8 @@ class AtomTermsOfUse extends StatelessWidget { color: FlutterFlowTheme.of(context).primaryText, fontSize: LimitedFontSizeUtil.getInputFontSize(context), letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), ), ), onTap: () => launchURL('https://freaccess.com.br/pp'), diff --git a/lib/components/atomic_components/text_field_component/text_field_component_model.dart b/lib/components/atomic_components/text_field_component/text_field_component_model.dart index ff40e7d4..30f54431 100644 --- a/lib/components/atomic_components/text_field_component/text_field_component_model.dart +++ b/lib/components/atomic_components/text_field_component/text_field_component_model.dart @@ -2,7 +2,8 @@ import '/flutter_flow/flutter_flow_util.dart'; import 'text_field_component_widget.dart' show TextFieldComponentWidget; import 'package:flutter/material.dart'; -class TextFieldComponentModel extends FlutterFlowModel { +class TextFieldComponentModel + extends FlutterFlowModel { /// State fields for stateful widgets in this component. // State field(s) for TextField widget. diff --git a/lib/components/atomic_components/text_field_component/text_field_component_widget.dart b/lib/components/atomic_components/text_field_component/text_field_component_widget.dart index 2e98b097..7c99bad0 100644 --- a/lib/components/atomic_components/text_field_component/text_field_component_widget.dart +++ b/lib/components/atomic_components/text_field_component/text_field_component_widget.dart @@ -20,7 +20,8 @@ class TextFieldComponentWidget extends StatefulWidget { final String? hintTextStrParam; @override - State createState() => _TextFieldComponentWidgetState(); + State createState() => + _TextFieldComponentWidgetState(); } class _TextFieldComponentWidgetState extends State { @@ -37,7 +38,8 @@ class _TextFieldComponentWidgetState extends State { super.initState(); _model = createModel(context, () => TextFieldComponentModel()); - _model.textController ??= TextEditingController(text: widget.initialValueStrParam); + _model.textController ??= + TextEditingController(text: widget.initialValueStrParam); _model.textFieldFocusNode ??= FocusNode(); } @@ -63,14 +65,16 @@ class _TextFieldComponentWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), ), hintText: widget.hintTextStrParam, hintStyle: FlutterFlowTheme.of(context).labelMedium.override( fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -105,7 +109,8 @@ class _TextFieldComponentWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, color: FlutterFlowTheme.of(context).secondaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), ), validator: _model.textControllerValidator.asValidator(context), ), diff --git a/lib/components/molecular_components/option_selection_modal/option_selection_modal_model.dart b/lib/components/molecular_components/option_selection_modal/option_selection_modal_model.dart index e2e83af6..214c6fb4 100644 --- a/lib/components/molecular_components/option_selection_modal/option_selection_modal_model.dart +++ b/lib/components/molecular_components/option_selection_modal/option_selection_modal_model.dart @@ -3,7 +3,8 @@ import 'package:hub/flutter_flow/flutter_flow_model.dart'; import 'package:flutter/material.dart'; -class OptionSelectionModalModel extends FlutterFlowModel { +class OptionSelectionModalModel + extends FlutterFlowModel { @override void initState(BuildContext context) {} diff --git a/lib/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart b/lib/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart index ed4433d8..a445cc81 100644 --- a/lib/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart +++ b/lib/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart @@ -21,10 +21,12 @@ class OptionSelectionModalWidget extends StatefulWidget { final List? nameListStr; @override - State createState() => _OptionSelectionModalWidgetState(); + State createState() => + _OptionSelectionModalWidgetState(); } -class _OptionSelectionModalWidgetState extends State with TickerProviderStateMixin { +class _OptionSelectionModalWidgetState extends State + with TickerProviderStateMixin { late OptionSelectionModalModel _model; final animationsMap = {}; @@ -90,14 +92,17 @@ class _OptionSelectionModalWidgetState extends State return GestureDetector( onTap: () async { context.pop(); - if (widget.routesListStr![optionsListIndex] == 'scheduleCompleteVisitPage') { + if (widget.routesListStr![optionsListIndex] == + 'scheduleCompleteVisitPage') { // Navegação para a página ScheduleCompleteVisitPage com queryParameters context.go( '/scheduleCompleteVisitPage', extra: { - 'visitStartDateStr': DateFormat('yyyy-MM-dd HH:mm:ss').format(DateTime.now()), - 'visitEndDateStr': - DateFormat('yyyy-MM-dd HH:mm:ss').format(DateTime.now().add(const Duration(days: 1))), + 'visitStartDateStr': DateFormat('yyyy-MM-dd HH:mm:ss') + .format(DateTime.now()), + 'visitEndDateStr': DateFormat('yyyy-MM-dd HH:mm:ss') + .format( + DateTime.now().add(const Duration(days: 1))), }, ); } else { @@ -144,20 +149,27 @@ class _OptionSelectionModalWidgetState extends State children: [ Expanded( child: Align( - alignment: const AlignmentDirectional(-1.0, 0.0), + alignment: + const AlignmentDirectional(-1.0, 0.0), child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 0.0, 0.0), + padding: + const EdgeInsetsDirectional.fromSTEB( + 8.0, 0.0, 0.0, 0.0), child: Container( width: 30.0, height: 30.0, decoration: BoxDecoration( - color: FlutterFlowTheme.of(context).primaryBackground, + color: FlutterFlowTheme.of(context) + .primaryBackground, shape: BoxShape.circle, ), - alignment: const AlignmentDirectional(0.0, 0.0), + alignment: const AlignmentDirectional( + 0.0, 0.0), child: Icon( - widget.iconsListIcon![optionsListIndex]!, - color: FlutterFlowTheme.of(context).accent1, + widget.iconsListIcon![ + optionsListIndex]!, + color: FlutterFlowTheme.of(context) + .accent1, size: 34.0, ), ), @@ -174,16 +186,21 @@ class _OptionSelectionModalWidgetState extends State mainAxisAlignment: MainAxisAlignment.center, children: [ Align( - alignment: const AlignmentDirectional(0.0, 0.0), + alignment: + const AlignmentDirectional(0.0, 0.0), child: Text( widget.nameListStr![optionsListIndex], - style: FlutterFlowTheme.of(context).titleLarge.override( + style: FlutterFlowTheme.of(context) + .titleLarge + .override( fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, + color: FlutterFlowTheme.of(context) + .primaryText, fontSize: 14.0, letterSpacing: 0.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), + useGoogleFonts: GoogleFonts.asMap() + .containsKey('Nunito'), ), ), ), diff --git a/lib/components/molecular_components/order_filter_modal/order_filter_modal_model.dart b/lib/components/molecular_components/order_filter_modal/order_filter_modal_model.dart index ec888c47..79362029 100644 --- a/lib/components/molecular_components/order_filter_modal/order_filter_modal_model.dart +++ b/lib/components/molecular_components/order_filter_modal/order_filter_modal_model.dart @@ -15,7 +15,8 @@ class OrderFilterModalModel extends FlutterFlowModel { // State field(s) for CheckboxGroup widget. FormFieldController>? checkboxGroupValueController; List? get checkboxGroupValues => checkboxGroupValueController?.value; - set checkboxGroupValues(List? v) => checkboxGroupValueController?.value = v; + set checkboxGroupValues(List? v) => + checkboxGroupValueController?.value = v; @override void initState(BuildContext context) {} @@ -25,4 +26,4 @@ class OrderFilterModalModel extends FlutterFlowModel { textFieldFocusNode?.dispose(); textController?.dispose(); } -} \ No newline at end of file +} diff --git a/lib/components/molecular_components/order_filter_modal/order_filter_modal_widget.dart b/lib/components/molecular_components/order_filter_modal/order_filter_modal_widget.dart index 1835eb3c..70882191 100644 --- a/lib/components/molecular_components/order_filter_modal/order_filter_modal_widget.dart +++ b/lib/components/molecular_components/order_filter_modal/order_filter_modal_widget.dart @@ -28,22 +28,25 @@ class _OrderFilterModalWidgetState extends State { late Map selected; final List> adresseeTypeOptions = [ { - 'title': FFLocalizations.of(navigatorKey.currentContext!).getVariableText(enText: 'Resident', ptText: 'Morador'), + 'title': FFLocalizations.of(navigatorKey.currentContext!) + .getVariableText(enText: 'Resident', ptText: 'Morador'), 'value': 'MOR' }, { - 'title': FFLocalizations.of(navigatorKey.currentContext!).getVariableText(enText: 'Property', ptText: 'Propriedade'), + 'title': FFLocalizations.of(navigatorKey.currentContext!) + .getVariableText(enText: 'Property', ptText: 'Propriedade'), 'value': 'PRO' }, ]; final List> statusOptions = [ { - 'title': FFLocalizations.of(navigatorKey.currentContext!) - .getVariableText(ptText: 'Aguardando Retirada', enText: 'Waiting for Pickup'), + 'title': FFLocalizations.of(navigatorKey.currentContext!).getVariableText( + ptText: 'Aguardando Retirada', enText: 'Waiting for Pickup'), 'value': 'notPickedUp' }, { - 'title': FFLocalizations.of(navigatorKey.currentContext!).getVariableText(ptText: 'Retirado', enText: 'Picked Up'), + 'title': FFLocalizations.of(navigatorKey.currentContext!) + .getVariableText(ptText: 'Retirado', enText: 'Picked Up'), 'value': 'pickedUp' }, ]; @@ -61,8 +64,12 @@ class _OrderFilterModalWidgetState extends State { _model = createModel(context, () => OrderFilterModalModel()); selected = { - 'adresseeType': widget.defaultAdresseeType == '.*' ? ['MOR', 'PRO'] : [widget.defaultAdresseeType], - 'status': widget.defaultStatus == '.*' ? ['notPickedUp', 'pickedUp'] : [widget.defaultStatus], + 'adresseeType': widget.defaultAdresseeType == '.*' + ? ['MOR', 'PRO'] + : [widget.defaultAdresseeType], + 'status': widget.defaultStatus == '.*' + ? ['notPickedUp', 'pickedUp'] + : [widget.defaultStatus], }; } @@ -92,7 +99,8 @@ class _OrderFilterModalWidgetState extends State { context.pop(filterResult); } - Widget _buildCheckboxListTile(String key, List> options, double fontsize) { + Widget _buildCheckboxListTile( + String key, List> options, double fontsize) { return Column( children: [ Row( @@ -108,7 +116,8 @@ class _OrderFilterModalWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, fontSize: fontsize, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), color: FlutterFlowTheme.of(context).primaryText, ), ), @@ -128,7 +137,8 @@ class _OrderFilterModalWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, fontSize: fontsize, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), color: FlutterFlowTheme.of(context).primaryText, ), ), @@ -156,7 +166,8 @@ class _OrderFilterModalWidgetState extends State { width: 5, color: FlutterFlowTheme.of(context).secondaryText, ), - controlAffinity: ListTileControlAffinity.leading, // Adiciona esta linha + controlAffinity: + ListTileControlAffinity.leading, // Adiciona esta linha ); }, ), @@ -186,18 +197,23 @@ class _OrderFilterModalWidgetState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ Padding( - padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 10.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 10.0, 10.0, 0.0, 10.0), child: Text( - FFLocalizations.of(context).getText('yfj9pd6k'), // Filtros - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 18.0, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineMediumFamily), - ), + FFLocalizations.of(context) + .getText('yfj9pd6k'), // Filtros + style: + FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: FlutterFlowTheme.of(context) + .headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 18.0, + letterSpacing: 0.0, + fontWeight: FontWeight.bold, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .headlineMediumFamily), + ), ), ), ], @@ -209,8 +225,10 @@ class _OrderFilterModalWidgetState extends State { child: Column( mainAxisSize: MainAxisSize.min, children: [ - _buildCheckboxListTile('adresseeType', adresseeTypeOptions, limitedBodyFontSize), - _buildCheckboxListTile('status', statusOptions, limitedBodyFontSize), + _buildCheckboxListTile('adresseeType', + adresseeTypeOptions, limitedBodyFontSize), + _buildCheckboxListTile( + 'status', statusOptions, limitedBodyFontSize), ], ), ), @@ -231,4 +249,4 @@ class _OrderFilterModalWidgetState extends State { ), ); } -} \ No newline at end of file +} diff --git a/lib/components/molecular_components/throw_exception/throw_exception_widget.dart b/lib/components/molecular_components/throw_exception/throw_exception_widget.dart index 981f1db5..20246e26 100644 --- a/lib/components/molecular_components/throw_exception/throw_exception_widget.dart +++ b/lib/components/molecular_components/throw_exception/throw_exception_widget.dart @@ -14,7 +14,8 @@ export 'throw_exception_model.dart'; // ignore: must_be_immutable class ThrowExceptionWidget extends StatefulWidget { - ThrowExceptionWidget({super.key, required this.msg, this.type = EnumThrowException.error}); + ThrowExceptionWidget( + {super.key, required this.msg, this.type = EnumThrowException.error}); final String? msg; EnumThrowException type; @@ -23,7 +24,8 @@ class ThrowExceptionWidget extends StatefulWidget { State createState() => _ThrowExceptionWidgetState(); } -class _ThrowExceptionWidgetState extends State with TickerProviderStateMixin { +class _ThrowExceptionWidgetState extends State + with TickerProviderStateMixin { late ThrowExceptionModel _model; final animationsMap = {}; @@ -52,11 +54,14 @@ class _ThrowExceptionWidgetState extends State with Ticker String _getTitleByType(BuildContext context) { switch (widget.type) { case EnumThrowException.error: - return FFLocalizations.of(context).getVariableText(ptText: "Falha :(", enText: "Fail :("); + return FFLocalizations.of(context) + .getVariableText(ptText: "Falha :(", enText: "Fail :("); case EnumThrowException.warning: - return FFLocalizations.of(context).getVariableText(ptText: "Aviso :O", enText: "Warning :O"); + return FFLocalizations.of(context) + .getVariableText(ptText: "Aviso :O", enText: "Warning :O"); case EnumThrowException.success: - return FFLocalizations.of(context).getVariableText(ptText: "Sucesso ;)", enText: "Success ;)"); + return FFLocalizations.of(context) + .getVariableText(ptText: "Sucesso ;)", enText: "Success ;)"); } } @@ -96,7 +101,8 @@ class _ThrowExceptionWidgetState extends State with Ticker @override Widget build(BuildContext context) { double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context); - double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context); + double limitedHeaderFontSize = + LimitedFontSizeUtil.getHeaderFontSize(context); return InkWell( key: const ValueKey('ThrowExceptionWidget'), splashColor: Colors.transparent, @@ -109,7 +115,8 @@ class _ThrowExceptionWidgetState extends State with Ticker child: DecoratedBox( decoration: BoxDecoration( color: FlutterFlowTheme.of(context).primaryBackground, - borderRadius: BorderRadius.circular(20.0), // Ajuste o valor conforme necessário + borderRadius: + BorderRadius.circular(20.0), // Ajuste o valor conforme necessário ), child: SingleChildScrollView( child: Column( @@ -137,25 +144,28 @@ class _ThrowExceptionWidgetState extends State with Ticker Text( _getTitleByType(context), style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, fontSize: limitedHeaderFontSize, letterSpacing: 0.0, fontWeight: FontWeight.bold, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(15.0, 10.0, 15.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 15.0, 10.0, 15.0, 0.0), child: Text( valueOrDefault(widget.msg, 'Message Not Found'), overflow: TextOverflow.clip, textAlign: TextAlign.center, style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), fontSize: limitedBodyFontSize, ), ), diff --git a/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_model.dart b/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_model.dart index 98bb8579..abdac046 100644 --- a/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_model.dart +++ b/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_model.dart @@ -3,7 +3,8 @@ import 'package:hub/flutter_flow/flutter_flow_model.dart'; import 'package:flutter/material.dart'; -class VisitorNotFoundComponentModel extends FlutterFlowModel { +class VisitorNotFoundComponentModel + extends FlutterFlowModel { @override void initState(BuildContext context) {} diff --git a/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart b/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart index 7fdc75c7..00261f19 100644 --- a/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart +++ b/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart @@ -13,10 +13,12 @@ class VisitorNotFoundComponentWidget extends StatefulWidget { final String? doc; @override - State createState() => _VisitorNotFoundComponentWidgetState(); + State createState() => + _VisitorNotFoundComponentWidgetState(); } -class _VisitorNotFoundComponentWidgetState extends State { +class _VisitorNotFoundComponentWidgetState + extends State { late VisitorNotFoundComponentModel _model; @override @@ -59,7 +61,8 @@ class _VisitorNotFoundComponentWidgetState extends State context.pop(value)); // Navigator.pop(context, value) }, - text: FFLocalizations.of(context).getVariableText(enText: 'Add', ptText: 'Adicionar'), + text: FFLocalizations.of(context) + .getVariableText(enText: 'Add', ptText: 'Adicionar'), options: FFButtonOptions( height: 30.0, - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), - iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0.0, 24.0, 0.0), + iconPadding: const EdgeInsetsDirectional.fromSTEB( + 0.0, 0.0, 0.0, 0.0), color: FlutterFlowTheme.of(context).primary, textStyle: FlutterFlowTheme.of(context).labelSmall.override( - fontFamily: FlutterFlowTheme.of(context).labelSmallFamily, + fontFamily: + FlutterFlowTheme.of(context).labelSmallFamily, color: Colors.white, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelSmallFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelSmallFamily), ), elevation: 3.0, borderSide: const BorderSide( diff --git a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_model.dart b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_model.dart index 11d6aab5..1563d5d5 100644 --- a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_model.dart +++ b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_model.dart @@ -3,7 +3,8 @@ import 'package:hub/flutter_flow/flutter_flow_model.dart'; import 'package:flutter/material.dart'; -class BottomArrowLinkedLocalsComponentModel extends FlutterFlowModel { +class BottomArrowLinkedLocalsComponentModel + extends FlutterFlowModel { @override void initState(BuildContext context) {} diff --git a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart index 69222d34..6dc7b85b 100644 --- a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart +++ b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart @@ -17,10 +17,12 @@ class BottomArrowLinkedLocalsComponentWidget extends StatefulWidget { ApiCallResponse? response; @override - State createState() => _BottomArrowLinkedLocalsComponentWidgetState(); + State createState() => + _BottomArrowLinkedLocalsComponentWidgetState(); } -class _BottomArrowLinkedLocalsComponentWidgetState extends State { +class _BottomArrowLinkedLocalsComponentWidgetState + extends State { late BottomArrowLinkedLocalsComponentModel _model; bool _loading = false; @@ -38,7 +40,8 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State BottomArrowLinkedLocalsComponentModel()); + _model = + createModel(context, () => BottomArrowLinkedLocalsComponentModel()); _localsFuture = _fetchLocals(); } @@ -104,10 +107,14 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State _handleError(BuildContext context, String errorMsg) async { + static Future _handleError( + BuildContext context, String errorMsg) async { await DialogUtil.error(context, errorMsg); } @@ -141,18 +149,25 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State _labelsHashMap(dynamic local) { - return Map.from( - {'${local['CLI_PREFIXO']}:': local['CLI_NOME'], '${FFLocalizations.of(context).getVariableText(ptText: 'Propriedade', enText: 'Property')}:': local['CLU_OWNER_DSC']}); + return Map.from({ + '${local['CLI_PREFIXO']}:': local['CLI_NOME'], + '${FFLocalizations.of(context).getVariableText(ptText: 'Propriedade', enText: 'Property')}:': + local['CLU_OWNER_DSC'] + }); } Map _statusHashMap(dynamic local) { return Map.from({ if (local['CLU_STATUS'] == 'A') - FFLocalizations.of(context).getVariableText(ptText: 'Ativo', enText: 'Active'): FlutterFlowTheme.of(context).success + FFLocalizations.of(context).getVariableText( + ptText: 'Ativo', + enText: 'Active'): FlutterFlowTheme.of(context).success else if (local['CLU_STATUS'] == 'B') - FFLocalizations.of(context).getVariableText(ptText: 'Bloqueado', enText: 'Blocked'): FlutterFlowTheme.of(context).error + FFLocalizations.of(context).getVariableText( + ptText: 'Bloqueado', + enText: 'Blocked'): FlutterFlowTheme.of(context).error else - FFLocalizations.of(context).getVariableText(ptText: 'Pendente', enText: 'Pending'): FlutterFlowTheme.of(context).warning + FFLocalizations.of(context).getVariableText( + ptText: 'Pendente', + enText: 'Pending'): FlutterFlowTheme.of(context).warning }); } @@ -184,16 +208,21 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State { +class ScheduleVisitDetailModel + extends FlutterFlowModel { late final String devUUID; late final String userUUID; late final String cliUUID; @@ -37,7 +38,8 @@ class ScheduleVisitDetailModel extends FlutterFlowModel initDB() async { devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } @override diff --git a/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart b/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart index 508e10d6..0baeea54 100644 --- a/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart +++ b/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart @@ -35,7 +35,8 @@ class ScheduleVisitDetailWidget extends StatefulWidget { final String? visitObsStr; @override - State createState() => _ScheduleVisitDetailWidgetState(); + State createState() => + _ScheduleVisitDetailWidgetState(); } class _ScheduleVisitDetailWidgetState extends State { @@ -57,16 +58,19 @@ class _ScheduleVisitDetailWidgetState extends State { _model.textController1 ??= TextEditingController(text: widget.visitTempStr); _model.textFieldFocusNode1 ??= FocusNode(); - _model.textController2 ??= TextEditingController(text: widget.visitStartDate); + _model.textController2 ??= + TextEditingController(text: widget.visitStartDate); _model.textFieldFocusNode2 ??= FocusNode(); _model.textController3 ??= TextEditingController(text: widget.visitEndDate); _model.textFieldFocusNode3 ??= FocusNode(); - _model.textController4 ??= TextEditingController(text: extractDescToStr(widget.visitResonStr!)); + _model.textController4 ??= + TextEditingController(text: extractDescToStr(widget.visitResonStr!)); _model.textFieldFocusNode4 ??= FocusNode(); - _model.textController5 ??= TextEditingController(text: extractDescToStr(widget.visitLevelStr!)); + _model.textController5 ??= + TextEditingController(text: extractDescToStr(widget.visitLevelStr!)); _model.textFieldFocusNode5 ??= FocusNode(); _model.textController6 ??= TextEditingController(text: widget.visitObsStr); @@ -128,11 +132,13 @@ class _ScheduleVisitDetailWidgetState extends State { ), ), child: Visibility( - visible: widget.visitorStrList != null && widget.visitorStrList != '', + visible: widget.visitorStrList != null && + widget.visitorStrList != '', child: Align( alignment: const AlignmentDirectional(-1.0, 0.0), child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(15.0, 0.0, 0.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 15.0, 0.0, 0.0, 0.0), child: FlutterFlowIconButton( borderRadius: 20.0, borderWidth: 1.0, @@ -155,7 +161,8 @@ class _ScheduleVisitDetailWidgetState extends State { mainAxisAlignment: MainAxisAlignment.end, children: [ Padding( - padding: const EdgeInsetsDirectional.fromSTEB(5.0, 0.0, 5.0, 20.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 5.0, 0.0, 5.0, 20.0), child: SizedBox( width: 100.0, child: ClipRRect( @@ -183,7 +190,8 @@ class _ScheduleVisitDetailWidgetState extends State { Container( decoration: const BoxDecoration(), child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 10.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 8.0, 0.0, 8.0, 10.0), child: TextFormField( controller: _model.textController1, focusNode: _model.textFieldFocusNode1, @@ -195,17 +203,31 @@ class _ScheduleVisitDetailWidgetState extends State { labelText: FFLocalizations.of(context).getText( '7w4fohoa' /* Encerramento da Visita */, ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -236,24 +258,32 @@ class _ScheduleVisitDetailWidgetState extends State { borderRadius: BorderRadius.circular(8.0), ), ), - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey(FlutterFlowTheme.of(context) + .bodyMediumFamily), ), - validator: _model.textController1Validator.asValidator(context), + validator: _model.textController1Validator + .asValidator(context), ), ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 10.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 0.0, 0.0, 0.0, 10.0), child: Row( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, children: [ Expanded( child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 8.0, 0.0, 8.0, 0.0), child: TextFormField( controller: _model.textController2, focusNode: _model.textFieldFocusNode2, @@ -262,68 +292,98 @@ class _ScheduleVisitDetailWidgetState extends State { readOnly: true, decoration: InputDecoration( isDense: true, - labelText: FFLocalizations.of(context).getVariableText( + labelText: FFLocalizations.of(context) + .getVariableText( enText: 'Start', ptText: 'Início', ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), - hintText: FFLocalizations.of(context).getText( + hintText: + FFLocalizations.of(context).getText( '0cp1e31d' /* dd/mm/yyyy */, ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).accent1, + color: FlutterFlowTheme.of(context) + .accent1, width: 0.5, ), borderRadius: BorderRadius.circular(8.0), ), focusedBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).primary, + color: FlutterFlowTheme.of(context) + .primary, width: 0.5, ), borderRadius: BorderRadius.circular(8.0), ), errorBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, + color: + FlutterFlowTheme.of(context).error, width: 0.5, ), borderRadius: BorderRadius.circular(8.0), ), focusedErrorBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, + color: + FlutterFlowTheme.of(context).error, width: 0.5, ), borderRadius: BorderRadius.circular(8.0), ), ), - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .bodyMediumFamily, letterSpacing: 0.0, fontSize: 12, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), ), textAlign: TextAlign.center, - validator: _model.textController2Validator.asValidator(context), + validator: _model.textController2Validator + .asValidator(context), ), ), ), Expanded( child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 8.0, 0.0, 8.0, 0.0), child: TextFormField( controller: _model.textController3, focusNode: _model.textFieldFocusNode3, @@ -332,61 +392,90 @@ class _ScheduleVisitDetailWidgetState extends State { readOnly: true, decoration: InputDecoration( isDense: true, - labelText: FFLocalizations.of(context).getText( + labelText: + FFLocalizations.of(context).getText( 'abppdgz3' /* Término */, ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), - hintText: FFLocalizations.of(context).getText( + hintText: + FFLocalizations.of(context).getText( 'kqralft4' /* dd/mm/yyyy */, ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).accent1, + color: FlutterFlowTheme.of(context) + .accent1, width: 0.5, ), borderRadius: BorderRadius.circular(8.0), ), focusedBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).primary, + color: FlutterFlowTheme.of(context) + .primary, width: 0.5, ), borderRadius: BorderRadius.circular(8.0), ), errorBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, + color: + FlutterFlowTheme.of(context).error, width: 0.5, ), borderRadius: BorderRadius.circular(8.0), ), focusedErrorBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, + color: + FlutterFlowTheme.of(context).error, width: 0.5, ), borderRadius: BorderRadius.circular(8.0), ), ), - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .bodyMediumFamily, letterSpacing: 0.0, fontSize: 12, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), ), textAlign: TextAlign.center, - validator: _model.textController3Validator.asValidator(context), + validator: _model.textController3Validator + .asValidator(context), ), ), ), @@ -394,14 +483,16 @@ class _ScheduleVisitDetailWidgetState extends State { ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 10.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 0.0, 0.0, 0.0, 10.0), child: Row( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, children: [ Expanded( child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 8.0, 0.0, 8.0, 0.0), child: TextFormField( controller: _model.textController4, focusNode: _model.textFieldFocusNode4, @@ -410,66 +501,96 @@ class _ScheduleVisitDetailWidgetState extends State { readOnly: true, decoration: InputDecoration( isDense: true, - labelText: FFLocalizations.of(context).getText( + labelText: + FFLocalizations.of(context).getText( 'xjxhzqqm' /* Motivo da Visita */, ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), - hintText: FFLocalizations.of(context).getText( + hintText: + FFLocalizations.of(context).getText( '47oezdm6' /* Motivo */, ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).accent1, + color: FlutterFlowTheme.of(context) + .accent1, width: 0.5, ), borderRadius: BorderRadius.circular(8.0), ), focusedBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).primary, + color: FlutterFlowTheme.of(context) + .primary, width: 0.5, ), borderRadius: BorderRadius.circular(8.0), ), errorBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, + color: + FlutterFlowTheme.of(context).error, width: 0.5, ), borderRadius: BorderRadius.circular(8.0), ), focusedErrorBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, + color: + FlutterFlowTheme.of(context).error, width: 0.5, ), borderRadius: BorderRadius.circular(8.0), ), ), - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), ), textAlign: TextAlign.center, - validator: _model.textController4Validator.asValidator(context), + validator: _model.textController4Validator + .asValidator(context), ), ), ), Expanded( child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 8.0, 0.0, 8.0, 0.0), child: TextFormField( controller: _model.textController5, focusNode: _model.textFieldFocusNode5, @@ -478,60 +599,89 @@ class _ScheduleVisitDetailWidgetState extends State { readOnly: true, decoration: InputDecoration( isDense: true, - labelText: FFLocalizations.of(context).getText( + labelText: + FFLocalizations.of(context).getText( '2ujg7u18' /* Nível de Acesso */, ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), - hintText: FFLocalizations.of(context).getText( + hintText: + FFLocalizations.of(context).getText( '3emmbbfv' /* Nível de Acesso */, ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).accent1, + color: FlutterFlowTheme.of(context) + .accent1, width: 0.5, ), borderRadius: BorderRadius.circular(8.0), ), focusedBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).primary, + color: FlutterFlowTheme.of(context) + .primary, width: 0.5, ), borderRadius: BorderRadius.circular(8.0), ), errorBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, + color: + FlutterFlowTheme.of(context).error, width: 0.5, ), borderRadius: BorderRadius.circular(8.0), ), focusedErrorBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, + color: + FlutterFlowTheme.of(context).error, width: 0.5, ), borderRadius: BorderRadius.circular(8.0), ), ), - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), ), textAlign: TextAlign.center, - validator: _model.textController5Validator.asValidator(context), + validator: _model.textController5Validator + .asValidator(context), ), ), ), @@ -541,7 +691,8 @@ class _ScheduleVisitDetailWidgetState extends State { Container( decoration: const BoxDecoration(), child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 8.0, 0.0, 8.0, 0.0), child: TextFormField( controller: _model.textController6, focusNode: _model.textFieldFocusNode6, @@ -553,17 +704,31 @@ class _ScheduleVisitDetailWidgetState extends State { labelText: FFLocalizations.of(context).getText( 'ritce5uw' /* Observações da Visita */, ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -594,12 +759,18 @@ class _ScheduleVisitDetailWidgetState extends State { borderRadius: BorderRadius.circular(8.0), ), ), - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey(FlutterFlowTheme.of(context) + .bodyMediumFamily), ), - validator: _model.textController6Validator.asValidator(context), + validator: _model.textController6Validator + .asValidator(context), ), ), ), @@ -609,10 +780,12 @@ class _ScheduleVisitDetailWidgetState extends State { ), IconButton( onPressed: () async { - _model.postScheduleVisit = await PhpGroup.postScheduleVisitCall.call( + _model.postScheduleVisit = + await PhpGroup.postScheduleVisitCall.call( devDesc: widget.visitObsStr, idVisitante: widget.visitorStrList, - dtInicio: _model.convertDateFormat(widget.visitStartDate ?? ''), + dtInicio: + _model.convertDateFormat(widget.visitStartDate ?? ''), dtFim: _model.convertDateFormat(widget.visitEndDate ?? ''), unica: widget.visitTempStr, idMotivo: extractIdToStr(widget.visitResonStr!), @@ -629,7 +802,8 @@ class _ScheduleVisitDetailWidgetState extends State { final String? msg = PhpGroup.postScheduleVisitCall.errorMsg( (_model.postScheduleVisit?.jsonBody ?? ''), ); - await DialogUtil.error(context, msg!).then((value) => safeSetState(() {})); + await DialogUtil.error(context, msg!) + .then((value) => safeSetState(() {})); } setState(() {}); diff --git a/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart index b07f502c..be8b36d1 100644 --- a/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart +++ b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart @@ -3,7 +3,8 @@ import 'package:hub/components/organism_components/up_arrow_linked_locals_compon import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_model.dart'; -class UpArrowLinkedLocalsComponentModel extends FlutterFlowModel { +class UpArrowLinkedLocalsComponentModel + extends FlutterFlowModel { late final String devUUID; late final String userUUID; late final String cliUUID; @@ -16,9 +17,12 @@ class UpArrowLinkedLocalsComponentModel extends FlutterFlowModel initDB() async { devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; - cliName = (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + cliName = + (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; } @override diff --git a/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart index 2cadee92..d1ad656e 100644 --- a/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart +++ b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart @@ -12,10 +12,12 @@ class UpArrowLinkedLocalsComponentWidget extends StatefulWidget { const UpArrowLinkedLocalsComponentWidget({super.key}); @override - State createState() => _UpArrowLinkedLocalsComponentWidgetState(); + State createState() => + _UpArrowLinkedLocalsComponentWidgetState(); } -class _UpArrowLinkedLocalsComponentWidgetState extends State { +class _UpArrowLinkedLocalsComponentWidgetState + extends State { late UpArrowLinkedLocalsComponentModel _model; @override @@ -105,7 +107,8 @@ class _UpArrowLinkedLocalsComponentWidgetState extends State { +class AccessNotificationModalTemplateComponentModel + extends FlutterFlowModel { late final String devUUID; late final String userUUID; late final String cliUUID; @@ -31,8 +33,10 @@ class AccessNotificationModalTemplateComponentModel extends FlutterFlowModel initDB() async { devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } @override diff --git a/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart index edb51dba..652bdfe6 100644 --- a/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart +++ b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart @@ -41,7 +41,8 @@ class _AccessNotificationModalTemplateComponentWidgetState void initState() { super.initState(); - _model = createModel(context, () => AccessNotificationModalTemplateComponentModel()); + _model = createModel( + context, () => AccessNotificationModalTemplateComponentModel()); _model.textController1 ??= TextEditingController(text: widget.name); _model.textFieldFocusNode1 ??= FocusNode(); @@ -65,9 +66,11 @@ class _AccessNotificationModalTemplateComponentWidgetState @override Widget build(BuildContext context) { - String labelTypeResident = FFLocalizations.of(context).getVariableText(enText: 'Resident', ptText: 'Morador'); + String labelTypeResident = FFLocalizations.of(context) + .getVariableText(enText: 'Resident', ptText: 'Morador'); - String labelTypeVisitor = FFLocalizations.of(context).getVariableText(enText: 'Visitor', ptText: 'Visitante'); + String labelTypeVisitor = FFLocalizations.of(context) + .getVariableText(enText: 'Visitor', ptText: 'Visitante'); return Align( alignment: const AlignmentDirectional(0.0, 0.0), @@ -110,10 +113,13 @@ class _AccessNotificationModalTemplateComponentWidgetState fit: BoxFit.cover, ), ), - ].addToStart(const SizedBox(width: 10.0)).addToEnd(const SizedBox(width: 10.0)), + ] + .addToStart(const SizedBox(width: 10.0)) + .addToEnd(const SizedBox(width: 10.0)), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0.0, 24.0, 0.0), child: TextFormField( controller: _model.textController1, focusNode: _model.textFieldFocusNode1, @@ -126,19 +132,25 @@ class _AccessNotificationModalTemplateComponentWidgetState labelText: FFLocalizations.of(context).getText( 'dvag09pq' /* Nome */, ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), ), enabledBorder: InputBorder.none, focusedBorder: InputBorder.none, @@ -150,16 +162,18 @@ class _AccessNotificationModalTemplateComponentWidgetState ), ), style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), ), textAlign: TextAlign.start, maxLines: null, keyboardType: TextInputType.name, - validator: _model.textController1Validator.asValidator(context), + validator: + _model.textController1Validator.asValidator(context), ), ), Row( @@ -167,8 +181,10 @@ class _AccessNotificationModalTemplateComponentWidgetState children: [ Expanded( child: TextFormField( - controller: - TextEditingController(text: widget.type == 'O' ? labelTypeResident : labelTypeVisitor), + controller: TextEditingController( + text: widget.type == 'O' + ? labelTypeResident + : labelTypeVisitor), focusNode: _model.textFieldFocusNode2, autofocus: false, textInputAction: TextInputAction.next, @@ -179,19 +195,27 @@ class _AccessNotificationModalTemplateComponentWidgetState labelText: FFLocalizations.of(context).getText( 'h3s0r1he' /* Tipo */, ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), enabledBorder: InputBorder.none, focusedBorder: InputBorder.none, @@ -203,22 +227,28 @@ class _AccessNotificationModalTemplateComponentWidgetState ), ), style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), ), textAlign: TextAlign.start, maxLines: null, keyboardType: TextInputType.name, - validator: _model.textController2Validator.asValidator(context), + validator: _model.textController2Validator + .asValidator(context), ), ), - ].addToStart(const SizedBox(width: 24.0)).addToEnd(const SizedBox(width: 24.0)), + ] + .addToStart(const SizedBox(width: 24.0)) + .addToEnd(const SizedBox(width: 24.0)), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0.0, 24.0, 0.0), child: TextFormField( controller: _model.textController3, focusNode: _model.textFieldFocusNode3, @@ -231,19 +261,25 @@ class _AccessNotificationModalTemplateComponentWidgetState labelText: FFLocalizations.of(context).getText( 'jveeqpdz' /* Acesso */, ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), ), enabledBorder: InputBorder.none, focusedBorder: InputBorder.none, @@ -255,20 +291,23 @@ class _AccessNotificationModalTemplateComponentWidgetState ), ), style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), ), textAlign: TextAlign.start, maxLines: null, keyboardType: TextInputType.name, - validator: _model.textController3Validator.asValidator(context), + validator: + _model.textController3Validator.asValidator(context), ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0.0, 24.0, 0.0), child: TextFormField( controller: _model.textController4, focusNode: _model.textFieldFocusNode4, @@ -283,18 +322,24 @@ class _AccessNotificationModalTemplateComponentWidgetState enText: 'Access Sector', ptText: 'Setor de Acesso', ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), ), enabledBorder: InputBorder.none, focusedBorder: InputBorder.none, @@ -306,14 +351,16 @@ class _AccessNotificationModalTemplateComponentWidgetState ), ), style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), ), textAlign: TextAlign.start, - validator: _model.textController4Validator.asValidator(context), + validator: + _model.textController4Validator.asValidator(context), ), ), ] diff --git a/lib/components/templates_components/card_item_template_component/card_item_template_component_model.dart b/lib/components/templates_components/card_item_template_component/card_item_template_component_model.dart index aed57244..3f35acf9 100644 --- a/lib/components/templates_components/card_item_template_component/card_item_template_component_model.dart +++ b/lib/components/templates_components/card_item_template_component/card_item_template_component_model.dart @@ -1,8 +1,10 @@ import '/flutter_flow/flutter_flow_util.dart'; -import 'card_item_template_component_widget.dart' show CardItemTemplateComponentWidget; +import 'card_item_template_component_widget.dart' + show CardItemTemplateComponentWidget; import 'package:flutter/material.dart'; -class CardItemTemplateComponentModel extends FlutterFlowModel { +class CardItemTemplateComponentModel + extends FlutterFlowModel { @override void initState(BuildContext context) {} diff --git a/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart b/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart index 9cba811c..129cf635 100644 --- a/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart +++ b/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart @@ -27,10 +27,12 @@ class CardItemTemplateComponentWidget extends StatefulWidget { final Future Function()? onTapCardItemAction; @override - State createState() => _CardItemTemplateComponentWidgetState(); + State createState() => + _CardItemTemplateComponentWidgetState(); } -class _CardItemTemplateComponentWidgetState extends State { +class _CardItemTemplateComponentWidgetState + extends State { late CardItemTemplateComponentModel _model; late LinkedHashMap labelsLinkedHashMap; late List> statusLinkedHashMap; @@ -40,7 +42,9 @@ class _CardItemTemplateComponentWidgetState extends State CardItemTemplateComponentModel()); labelsLinkedHashMap = LinkedHashMap.from(widget.labelsHashMap ?? {}); - statusLinkedHashMap = widget.statusHashMap.map((map) => LinkedHashMap.from(map ?? {})).toList(); + statusLinkedHashMap = widget.statusHashMap + .map((map) => LinkedHashMap.from(map ?? {})) + .toList(); } @override @@ -70,7 +74,8 @@ class _CardItemTemplateComponentWidgetState extends State { +class PassKeyTemplateComponentModel + extends FlutterFlowModel { /// State fields for stateful widgets in this component. final formKey = GlobalKey(); @@ -15,7 +16,8 @@ class PassKeyTemplateComponentModel extends FlutterFlowModel { } Future _initialize() async { - _accessPass = await StorageHelper().get(SecureStorageKey.accessPass.value) ?? ''; + _accessPass = + await StorageHelper().get(SecureStorageKey.accessPass.value) ?? ''; } @override @@ -89,7 +90,8 @@ class _PassKeyTemplateWidgetState extends State { tablet: false, )) Padding( - padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0), + padding: + const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0), child: InkWell( splashColor: Colors.transparent, focusColor: Colors.transparent, @@ -102,7 +104,8 @@ class _PassKeyTemplateWidgetState extends State { mainAxisSize: MainAxisSize.max, children: [ const Padding( - padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0), + padding: EdgeInsetsDirectional.fromSTEB( + 0.0, 12.0, 0.0, 12.0), child: Icon( Icons.arrow_back_rounded, color: Color(0xFF15161E), @@ -110,17 +113,20 @@ class _PassKeyTemplateWidgetState extends State { ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 12.0, 0.0, 0.0, 0.0), child: Text( '', - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: 'Plus Jakarta Sans', - color: const Color(0xFF15161E), - fontSize: 14.0, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), - ), + style: + FlutterFlowTheme.of(context).bodyMedium.override( + fontFamily: 'Plus Jakarta Sans', + color: const Color(0xFF15161E), + fontSize: 14.0, + letterSpacing: 0.0, + fontWeight: FontWeight.w500, + useGoogleFonts: GoogleFonts.asMap() + .containsKey('Plus Jakarta Sans'), + ), ), ), ], @@ -128,11 +134,13 @@ class _PassKeyTemplateWidgetState extends State { ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0), + padding: + const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0), child: Text( FFLocalizations.of(context).getVariableText( enText: 'INSERT PASSWORD', - ptText: _accessPass != '' ? 'ALTERAR SENHA' : 'ADICIONAR SENHA', + ptText: + _accessPass != '' ? 'ALTERAR SENHA' : 'ADICIONAR SENHA', ), style: FlutterFlowTheme.of(context).headlineMedium.override( fontFamily: 'Outfit', @@ -145,16 +153,20 @@ class _PassKeyTemplateWidgetState extends State { ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0), + padding: + const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0), child: Text( - FFLocalizations.of(context).getVariableText(enText: 'Enter your password to continue', ptText: 'Digite sua senha para continuar'), + FFLocalizations.of(context).getVariableText( + enText: 'Enter your password to continue', + ptText: 'Digite sua senha para continuar'), style: FlutterFlowTheme.of(context).labelMedium.override( fontFamily: 'Plus Jakarta Sans', color: FlutterFlowTheme.of(context).primaryText, fontSize: 14.0, letterSpacing: 0.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + useGoogleFonts: + GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), ), ), ), @@ -164,7 +176,8 @@ class _PassKeyTemplateWidgetState extends State { child: Column( children: [ Padding( - padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 16.0, 12.0, 16.0, 0.0), child: SizedBox( width: double.infinity, child: TextFormField( @@ -183,29 +196,36 @@ class _PassKeyTemplateWidgetState extends State { obscureText: !_model.keyTextFieldVisibility1, decoration: InputDecoration( isDense: true, - labelText: FFLocalizations.of(context).getVariableText( + labelText: + FFLocalizations.of(context).getVariableText( ptText: 'Senha', enText: 'Password', ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( fontFamily: 'Plus Jakarta Sans', color: FlutterFlowTheme.of(context).primaryText, fontSize: 14.0, letterSpacing: 0.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + useGoogleFonts: GoogleFonts.asMap() + .containsKey('Plus Jakarta Sans'), ), hintText: FFLocalizations.of(context).getVariableText( ptText: 'Digite a sua senha.....', enText: 'Enter your password.....', ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( fontFamily: 'Plus Jakarta Sans', color: FlutterFlowTheme.of(context).primaryText, fontSize: 14.0, letterSpacing: 0.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + useGoogleFonts: GoogleFonts.asMap() + .containsKey('Plus Jakarta Sans'), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -236,15 +256,20 @@ class _PassKeyTemplateWidgetState extends State { borderRadius: BorderRadius.circular(12.0), ), filled: true, - fillColor: FlutterFlowTheme.of(context).primaryBackground, - contentPadding: const EdgeInsetsDirectional.fromSTEB(24.0, 24.0, 20.0, 24.0), + fillColor: + FlutterFlowTheme.of(context).primaryBackground, + contentPadding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 24.0, 20.0, 24.0), suffixIcon: InkWell( onTap: () => setState( - () => _model.keyTextFieldVisibility1 = !_model.keyTextFieldVisibility1, + () => _model.keyTextFieldVisibility1 = + !_model.keyTextFieldVisibility1, ), focusNode: FocusNode(skipTraversal: true), child: Icon( - _model.keyTextFieldVisibility1 ? Icons.visibility_outlined : Icons.visibility_off_outlined, + _model.keyTextFieldVisibility1 + ? Icons.visibility_outlined + : Icons.visibility_off_outlined, color: FlutterFlowTheme.of(context).accent1, size: 22.0, ), @@ -256,14 +281,20 @@ class _PassKeyTemplateWidgetState extends State { fontSize: 14.0, letterSpacing: 0.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + useGoogleFonts: GoogleFonts.asMap() + .containsKey('Plus Jakarta Sans'), ), maxLength: 4, maxLengthEnforcement: MaxLengthEnforcement.enforced, - buildCounter: (context, {required currentLength, required isFocused, maxLength}) => null, + buildCounter: (context, + {required currentLength, + required isFocused, + maxLength}) => + null, keyboardType: TextInputType.number, cursorColor: FlutterFlowTheme.of(context).primary, - validator: _model.keyTextFieldTextControllerValidator1.asValidator(context), + validator: _model.keyTextFieldTextControllerValidator1 + .asValidator(context), inputFormatters: [ FilteringTextInputFormatter.allow(RegExp('[0-9]')), LengthLimitingTextInputFormatter(4), @@ -277,14 +308,18 @@ class _PassKeyTemplateWidgetState extends State { Align( alignment: const AlignmentDirectional(0.0, 0.0), child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0), + padding: + const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0), child: FFButtonWidget( onPressed: () async { - if (_model.formKey.currentState == null || !_model.formKey.currentState!.validate()) { + if (_model.formKey.currentState == null || + !_model.formKey.currentState!.validate()) { return; } await widget.toggleActionStatus?.call( - _model.keyTextFieldTextController1.text.isEmpty ? _model.keyTextFieldTextController2.text : _model.keyTextFieldTextController1.text, + _model.keyTextFieldTextController1.text.isEmpty + ? _model.keyTextFieldTextController2.text + : _model.keyTextFieldTextController1.text, ); // Navigator.pop(context, true); context.pop(true); @@ -296,8 +331,10 @@ class _PassKeyTemplateWidgetState extends State { options: FFButtonOptions( width: 270.0, height: 50.0, - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 0.0, 0.0, 0.0, 0.0), + iconPadding: const EdgeInsetsDirectional.fromSTEB( + 0.0, 0.0, 0.0, 0.0), color: const Color(0xFF1AAB5F), textStyle: FlutterFlowTheme.of(context).titleSmall.override( fontFamily: 'Plus Jakarta Sans', @@ -305,7 +342,8 @@ class _PassKeyTemplateWidgetState extends State { fontSize: 16.0, letterSpacing: 0.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + useGoogleFonts: GoogleFonts.asMap() + .containsKey('Plus Jakarta Sans'), ), elevation: 3.0, borderSide: const BorderSide( diff --git a/lib/components/templates_components/details_component/details_component_widget.dart b/lib/components/templates_components/details_component/details_component_widget.dart index 1c77edec..6a4f5cec 100644 --- a/lib/components/templates_components/details_component/details_component_widget.dart +++ b/lib/components/templates_components/details_component/details_component_widget.dart @@ -31,10 +31,13 @@ class DetailsComponentWidget extends StatefulWidget { class _DetailsComponentWidgetState extends State { late DetailsComponentModel _model; - LinkedHashMap get labelsLinkedHashMap => LinkedHashMap.from(widget.labelsHashMap); + LinkedHashMap get labelsLinkedHashMap => + LinkedHashMap.from(widget.labelsHashMap); List> get statusLinkedHashMap => - widget.statusHashMap.map((map) => LinkedHashMap.from(map ?? {})).toList(); + widget.statusHashMap + .map((map) => LinkedHashMap.from(map ?? {})) + .toList(); @override void setState(VoidCallback callback) { @@ -59,7 +62,8 @@ class _DetailsComponentWidgetState extends State { @override Widget build(BuildContext context) { // CachedNetworkImage.evictFromCache(widget.imagePath ?? ''); - final double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context); + final double limitedBodyFontSize = + LimitedFontSizeUtil.getBodyFontSize(context); return Container( constraints: BoxConstraints( maxWidth: MediaQuery.of(context).size.width, @@ -94,7 +98,8 @@ class _DetailsComponentWidgetState extends State { SizedBox(height: MediaQuery.of(context).size.height * 0.03), Row( children: statusLinkedHashMap.expand((linkedHashMap) { - return linkedHashMap.entries.map((MapEntry item) { + return linkedHashMap.entries + .map((MapEntry item) { return Expanded( child: Padding( padding: EdgeInsets.symmetric( @@ -116,22 +121,30 @@ class _DetailsComponentWidgetState extends State { filled: true, fillColor: item.value, labelText: item.key, - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, fontWeight: FontWeight.bold, color: FlutterFlowTheme.of(context).info, letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey( - FlutterFlowTheme.of(context).labelMediumFamily, + FlutterFlowTheme.of(context) + .labelMediumFamily, ), fontSize: limitedBodyFontSize, ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, color: FlutterFlowTheme.of(context).info, letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey( - FlutterFlowTheme.of(context).labelMediumFamily, + FlutterFlowTheme.of(context) + .labelMediumFamily, ), fontSize: limitedBodyFontSize, ), @@ -144,7 +157,8 @@ class _DetailsComponentWidgetState extends State { ), ), style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, color: FlutterFlowTheme.of(context).info, letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey( @@ -155,7 +169,8 @@ class _DetailsComponentWidgetState extends State { textAlign: TextAlign.center, maxLines: null, keyboardType: TextInputType.name, - validator: _model.textController1Validator.asValidator(context), + validator: _model.textController1Validator + .asValidator(context), ), ), ); @@ -175,7 +190,8 @@ class _DetailsComponentWidgetState extends State { readOnly: true, initialValue: '$value', style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey( @@ -190,19 +206,26 @@ class _DetailsComponentWidgetState extends State { border: OutlineInputBorder( borderRadius: BorderRadius.circular(10.0), borderSide: BorderSide( - color: FlutterFlowTheme.of(context).primaryBackground, // Change border color here + color: FlutterFlowTheme.of(context) + .primaryBackground, // Change border color here ), ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey( FlutterFlowTheme.of(context).labelMediumFamily, ), ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey( @@ -212,25 +235,29 @@ class _DetailsComponentWidgetState extends State { enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(10.0), borderSide: BorderSide( - color: FlutterFlowTheme.of(context).primaryBackground, // Change border color here + color: FlutterFlowTheme.of(context) + .primaryBackground, // Change border color here ), ), focusedBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(10.0), borderSide: BorderSide( - color: FlutterFlowTheme.of(context).primaryBackground, // Change border color here + color: FlutterFlowTheme.of(context) + .primaryBackground, // Change border color here ), ), errorBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(10.0), borderSide: BorderSide( - color: FlutterFlowTheme.of(context).primaryBackground, // Change border color here + color: FlutterFlowTheme.of(context) + .primaryBackground, // Change border color here ), ), focusedErrorBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(10.0), borderSide: BorderSide( - color: FlutterFlowTheme.of(context).primaryBackground, // Change border color here + color: FlutterFlowTheme.of(context) + .primaryBackground, // Change border color here ), ), ), diff --git a/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_model.dart b/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_model.dart index 17bb87d4..f045131b 100644 --- a/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_model.dart +++ b/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_model.dart @@ -2,10 +2,12 @@ import 'package:hub/features/backend/index.dart'; import 'package:hub/shared/utils/validator_util.dart'; import '/flutter_flow/flutter_flow_util.dart'; -import 'forgot_password_template_component_widget.dart' show ForgotPasswordTemplateComponentWidget; +import 'forgot_password_template_component_widget.dart' + show ForgotPasswordTemplateComponentWidget; import 'package:flutter/material.dart'; -class ForgotPasswordTemplateComponentModel extends FlutterFlowModel { +class ForgotPasswordTemplateComponentModel + extends FlutterFlowModel { /// State fields for stateful widgets in this component. final formKey = GlobalKey(); @@ -13,7 +15,8 @@ class ForgotPasswordTemplateComponentModel extends FlutterFlowModel createState() => _ForgotPasswordTemplateComponentWidgetState(); + State createState() => + _ForgotPasswordTemplateComponentWidgetState(); } -class _ForgotPasswordTemplateComponentWidgetState extends State { +class _ForgotPasswordTemplateComponentWidgetState + extends State { late ForgotPasswordTemplateComponentModel _model; @override @@ -49,9 +51,11 @@ class _ForgotPasswordTemplateComponentWidgetState extends State('BackButton'), splashColor: Colors.transparent, @@ -97,7 +102,8 @@ class _ForgotPasswordTemplateComponentWidgetState extends State('SendButtonWidget'), - onPressed: (_model.emailAddressTextController.text == '' || !ValidatorUtil.isValidEmail(_model.emailAddressTextController.text)) + onPressed: (_model.emailAddressTextController.text == + '' || + !ValidatorUtil.isValidEmail( + _model.emailAddressTextController.text)) ? null - : () async => await AuthenticationService.forgotPassword( + : () async => + await AuthenticationService.forgotPassword( context, _model.emailAddressTextController.text, ).then((v) => v == true ? context.pop() : null), @@ -249,23 +277,28 @@ class _ForgotPasswordTemplateComponentWidgetState extends State { +class LiberationHistoryItemDetailsTemplateComponentModel + extends FlutterFlowModel< + LiberationHistoryItemDetailsTemplateComponentWidget> { late final String devUUID; late final String userUUID; late final String cliUUID; @@ -26,8 +28,10 @@ class LiberationHistoryItemDetailsTemplateComponentModel extends FlutterFlowMode Future initDatabase() async { devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; ; } diff --git a/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_widget.dart b/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_widget.dart index 5ed0fd82..539f36eb 100644 --- a/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_widget.dart +++ b/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_widget.dart @@ -5,7 +5,8 @@ import 'package:hub/components/templates_components/liberation_history_item_deta import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; -class LiberationHistoryItemDetailsTemplateComponentWidget extends StatefulWidget { +class LiberationHistoryItemDetailsTemplateComponentWidget + extends StatefulWidget { const LiberationHistoryItemDetailsTemplateComponentWidget({ super.key, required this.name, @@ -39,7 +40,8 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState @override void initState() { super.initState(); - _model = createModel(context, () => LiberationHistoryItemDetailsTemplateComponentModel()); + _model = createModel( + context, () => LiberationHistoryItemDetailsTemplateComponentModel()); _model.textController1 ??= TextEditingController(text: widget.name); _model.textFieldFocusNode1 ??= FocusNode(); @@ -104,10 +106,13 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState fit: BoxFit.cover, ), ), - ].addToStart(const SizedBox(width: 10.0)).addToEnd(const SizedBox(width: 10.0)), + ] + .addToStart(const SizedBox(width: 10.0)) + .addToEnd(const SizedBox(width: 10.0)), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0.0, 24.0, 0.0), child: TextFormField( controller: _model.textController1, focusNode: _model.textFieldFocusNode1, @@ -120,19 +125,25 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState labelText: FFLocalizations.of(context).getText( 'dmazrriq' /* Nome */, ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), ), enabledBorder: InputBorder.none, focusedBorder: InputBorder.none, @@ -144,16 +155,18 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState ), ), style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), ), textAlign: TextAlign.start, maxLines: null, keyboardType: TextInputType.name, - validator: _model.textController1Validator.asValidator(context), + validator: + _model.textController1Validator.asValidator(context), ), ), Row( @@ -172,19 +185,27 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState labelText: FFLocalizations.of(context).getText( 'xx3ivbr4' /* Tipo */, ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), enabledBorder: InputBorder.none, focusedBorder: InputBorder.none, @@ -196,22 +217,28 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState ), ), style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), ), textAlign: TextAlign.start, maxLines: null, keyboardType: TextInputType.name, - validator: _model.textController2Validator.asValidator(context), + validator: _model.textController2Validator + .asValidator(context), ), ), - ].addToStart(const SizedBox(width: 24.0)).addToEnd(const SizedBox(width: 24.0)), + ] + .addToStart(const SizedBox(width: 24.0)) + .addToEnd(const SizedBox(width: 24.0)), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0.0, 24.0, 0.0), child: TextFormField( controller: _model.textController3, focusNode: _model.textFieldFocusNode3, @@ -224,19 +251,25 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState labelText: FFLocalizations.of(context).getText( 'rhheok7k' /* Acesso */, ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), ), enabledBorder: InputBorder.none, focusedBorder: InputBorder.none, @@ -248,20 +281,23 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState ), ), style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), ), textAlign: TextAlign.start, maxLines: null, keyboardType: TextInputType.name, - validator: _model.textController3Validator.asValidator(context), + validator: + _model.textController3Validator.asValidator(context), ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0.0, 24.0, 0.0), child: TextFormField( controller: _model.textController4, focusNode: _model.textFieldFocusNode4, @@ -275,18 +311,24 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState labelText: FFLocalizations.of(context).getText( 'w3tciqlv' /* Acionamento */, ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), ), enabledBorder: InputBorder.none, focusedBorder: InputBorder.none, @@ -298,14 +340,16 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState ), ), style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), ), textAlign: TextAlign.start, - validator: _model.textController4Validator.asValidator(context), + validator: + _model.textController4Validator.asValidator(context), ), ), ] diff --git a/lib/components/templates_components/message_notificaion_modal_template_component/message_notification_widget.dart b/lib/components/templates_components/message_notificaion_modal_template_component/message_notification_widget.dart index 2262612b..1039a738 100644 --- a/lib/components/templates_components/message_notificaion_modal_template_component/message_notification_widget.dart +++ b/lib/components/templates_components/message_notificaion_modal_template_component/message_notification_widget.dart @@ -37,7 +37,8 @@ class _MessageNotificationModalTemplateComponentWidgetState @override void initState() { super.initState(); - _model = createModel(context, () => MessageNotificationModalTemplateComponentModel()); + _model = createModel( + context, () => MessageNotificationModalTemplateComponentModel()); _model.textController1 ??= TextEditingController(text: widget.message); _model.textFieldFocusNode1 ??= FocusNode(); @@ -59,7 +60,8 @@ class _MessageNotificationModalTemplateComponentWidgetState @override Widget build(BuildContext context) { double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context); - double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context); + double limitedSubHeaderFontSize = + LimitedFontSizeUtil.getSubHeaderFontSize(context); return Container( width: MediaQuery.sizeOf(context).width, @@ -79,7 +81,8 @@ class _MessageNotificationModalTemplateComponentWidgetState mainAxisAlignment: MainAxisAlignment.start, children: [ Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), + padding: + const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), child: TextFormField( controller: _model.textController1, focusNode: _model.textFieldFocusNode1, @@ -94,17 +97,21 @@ class _MessageNotificationModalTemplateComponentWidgetState enText: 'Message', ), labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), fontSize: limitedBodyFontSize, ), hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), fontSize: limitedBodyFontSize, ), enabledBorder: InputBorder.none, @@ -120,7 +127,8 @@ class _MessageNotificationModalTemplateComponentWidgetState fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), fontSize: limitedBodyFontSize, ), textAlign: TextAlign.start, @@ -146,20 +154,26 @@ class _MessageNotificationModalTemplateComponentWidgetState ptText: 'De', enText: 'From', ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), fontSize: limitedBodyFontSize, ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), fontSize: limitedBodyFontSize, ), enabledBorder: InputBorder.none, @@ -172,22 +186,27 @@ class _MessageNotificationModalTemplateComponentWidgetState ), ), style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), ), textAlign: TextAlign.start, maxLines: null, keyboardType: TextInputType.name, - validator: _model.textController2Validator.asValidator(context), + validator: + _model.textController2Validator.asValidator(context), ), ), - ].addToStart(const SizedBox(width: 24.0)).addToEnd(const SizedBox(width: 24.0)), + ] + .addToStart(const SizedBox(width: 24.0)) + .addToEnd(const SizedBox(width: 24.0)), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), + padding: + const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), child: TextFormField( controller: _model.textController3, focusNode: _model.textFieldFocusNode3, @@ -202,17 +221,21 @@ class _MessageNotificationModalTemplateComponentWidgetState enText: 'To', ), labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), fontSize: limitedBodyFontSize, ), hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).labelMediumFamily), fontSize: limitedBodyFontSize, ), enabledBorder: InputBorder.none, @@ -228,7 +251,8 @@ class _MessageNotificationModalTemplateComponentWidgetState fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), fontSize: limitedBodyFontSize, ), textAlign: TextAlign.start, diff --git a/lib/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart b/lib/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart index 9c75170a..c1e82767 100644 --- a/lib/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart +++ b/lib/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart @@ -6,7 +6,8 @@ import 'package:hub/features/backend/index.dart'; import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; -class ScheduleProvisionalVisitPageModel extends FlutterFlowModel { +class ScheduleProvisionalVisitPageModel + extends FlutterFlowModel { String cliUUID = ''; String devUUID = ''; String userUUID = ''; @@ -20,21 +21,25 @@ class ScheduleProvisionalVisitPageModel extends FlutterFlowModel visitors.add(item); void removeFromVisitors(dynamic item) => visitors.remove(item); void removeAtIndexFromVisitors(int index) => visitors.removeAt(index); - void insertAtIndexInVisitors(int index, dynamic item) => visitors.insert(index, item); - void updateVisitorsAtIndex(int index, Function(dynamic) updateFn) => visitors[index] = updateFn(visitors[index]); + void insertAtIndexInVisitors(int index, dynamic item) => + visitors.insert(index, item); + void updateVisitorsAtIndex(int index, Function(dynamic) updateFn) => + visitors[index] = updateFn(visitors[index]); List docs = []; void addToDocs(String item) => docs.add(item); void removeFromDocs(String item) => docs.remove(item); void removeAtIndexFromDocs(int index) => docs.removeAt(index); void insertAtIndexInDocs(int index, String item) => docs.insert(index, item); - void updateDocsAtIndex(int index, Function(String) updateFn) => docs[index] = updateFn(docs[index]); + void updateDocsAtIndex(int index, Function(String) updateFn) => + docs[index] = updateFn(docs[index]); final formKey = GlobalKey(); FocusNode? personNameFocusNode; TextEditingController? personNameTextController; String? Function(BuildContext, String?)? personNameTextControllerValidator; - String? _personNameTextControllerValidator(BuildContext context, String? val) { + String? _personNameTextControllerValidator( + BuildContext context, String? val) { if (val == null || val.isEmpty) { return FFLocalizations.of(context).getText('3hqg8buh'); } @@ -55,9 +60,11 @@ class ScheduleProvisionalVisitPageModel extends FlutterFlowModel 80) { + if (personNameTextController.text == '' || + personNameTextController.text.length > 80) { return false; } @@ -119,10 +129,12 @@ class ScheduleProvisionalVisitPageModel extends FlutterFlowModel init() async { devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; - ownerName = (await StorageHelper().get(ProfileStorageKey.ownerName.key)) ?? ''; - ownerUUID = (await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? ''; + userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + ownerName = + (await StorageHelper().get(ProfileStorageKey.ownerName.key)) ?? ''; + ownerUUID = + (await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? ''; setState?.call(); } } diff --git a/lib/components/templates_components/provisional_schedule_template/provisional_shcedule_template_widget.dart b/lib/components/templates_components/provisional_schedule_template/provisional_shcedule_template_widget.dart index 46c14402..54e96540 100644 --- a/lib/components/templates_components/provisional_schedule_template/provisional_shcedule_template_widget.dart +++ b/lib/components/templates_components/provisional_schedule_template/provisional_shcedule_template_widget.dart @@ -17,10 +17,12 @@ class ScheduleProvisionalVisitPageWidget extends StatefulWidget { const ScheduleProvisionalVisitPageWidget({super.key}); @override - State createState() => _ScheduleProvisionalVisitPageWidgetState(); + State createState() => + _ScheduleProvisionalVisitPageWidgetState(); } -class _ScheduleProvisionalVisitPageWidgetState extends State { +class _ScheduleProvisionalVisitPageWidgetState + extends State { late ScheduleProvisionalVisitPageModel model; @override @@ -41,8 +43,10 @@ class _ScheduleProvisionalVisitPageWidgetState extends State FocusScope.of(context).unfocus(), @@ -65,17 +69,24 @@ class _ScheduleProvisionalVisitPageWidgetState extends State EasyDebounce.debounce( + controller: + model.personNameTextController, + focusNode: + model.personNameFocusNode, + cursorColor: + FlutterFlowTheme.of(context) + .primary, + onChanged: (_) => + EasyDebounce.debounce( 'model.personNameTextController', const Duration(milliseconds: 500), () => setState(() {}), ), autofocus: false, - textInputAction: TextInputAction.next, + textInputAction: + TextInputAction.next, obscureText: false, decoration: InputDecoration( isDense: true, - labelText: FFLocalizations.of(context).getText( + labelText: + FFLocalizations.of(context) + .getText( 'wehvxbz4' /* Nome / Apelido do Visitante */, ), - labelStyle: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), - fontSize: limitedInputFontSize, - ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), - fontSize: limitedInputFontSize, - ), + labelStyle: + FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: + FlutterFlowTheme.of( + context) + .bodyMediumFamily, + color: + FlutterFlowTheme.of( + context) + .primaryText, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of( + context) + .bodyMediumFamily), + fontSize: + limitedInputFontSize, + ), + hintStyle: + FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of( + context) + .labelMediumFamily, + color: + FlutterFlowTheme.of( + context) + .primaryText, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of( + context) + .labelMediumFamily), + fontSize: + limitedInputFontSize, + ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).customColor5, + color: FlutterFlowTheme.of( + context) + .customColor5, width: 0.5, ), - borderRadius: BorderRadius.circular(10.0), + borderRadius: + BorderRadius.circular(10.0), ), focusedBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).primary, + color: FlutterFlowTheme.of( + context) + .primary, width: 0.5, ), - borderRadius: BorderRadius.circular(10.0), + borderRadius: + BorderRadius.circular(10.0), ), errorBorder: OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, + color: FlutterFlowTheme.of( + context) + .error, width: 0.5, ), - borderRadius: BorderRadius.circular(10.0), + borderRadius: + BorderRadius.circular(10.0), ), - focusedErrorBorder: OutlineInputBorder( + focusedErrorBorder: + OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, + color: FlutterFlowTheme.of( + context) + .error, width: 0.5, ), - borderRadius: BorderRadius.circular(10.0), + borderRadius: + BorderRadius.circular(10.0), ), suffixIcon: Icon( Icons.person, - color: FlutterFlowTheme.of(context).accent1, + color: + FlutterFlowTheme.of(context) + .accent1, ), ), - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: + FlutterFlowTheme.of( + context) + .bodyMediumFamily, + color: FlutterFlowTheme.of( + context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), - fontSize: limitedInputFontSize, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of( + context) + .bodyMediumFamily), + fontSize: + limitedInputFontSize, ), textAlign: TextAlign.start, maxLines: null, - validator: model.personNameTextControllerValidator.asValidator(context), + validator: model + .personNameTextControllerValidator + .asValidator(context), ), ), ), @@ -292,17 +412,25 @@ class _ScheduleProvisionalVisitPageWidgetState extends State EasyDebounce.debounce( + controller: + model.dateTimeTextController, + focusNode: + model.dateTimeFocusNode, + cursorColor: + FlutterFlowTheme.of(context) + .primary, + onChanged: (_) => + EasyDebounce.debounce( 'model.dateTimeTextController', - const Duration(milliseconds: 500), + const Duration( + milliseconds: 500), () => setState(() {}), ), readOnly: true, @@ -310,90 +438,179 @@ class _ScheduleProvisionalVisitPageWidgetState extends State { +class QrCodePassKeyTemplateComponentModel + extends FlutterFlowModel { /// State fields for stateful widgets in this component. final formKey = GlobalKey(); @@ -11,7 +13,8 @@ class QrCodePassKeyTemplateComponentModel extends FlutterFlowModel createState() => _QrCodePassKeyTemplateComponentWidgetState(); + State createState() => + _QrCodePassKeyTemplateComponentWidgetState(); } -class _QrCodePassKeyTemplateComponentWidgetState extends State { +class _QrCodePassKeyTemplateComponentWidgetState + extends State { late QrCodePassKeyTemplateComponentModel _model; @override @@ -83,7 +85,8 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State safeSetState( - () => _model.keyTextFieldVisibility = !_model.keyTextFieldVisibility, + () => _model.keyTextFieldVisibility = + !_model.keyTextFieldVisibility, ), focusNode: FocusNode(skipTraversal: true), child: Icon( - _model.keyTextFieldVisibility ? Icons.visibility_outlined : Icons.visibility_off_outlined, + _model.keyTextFieldVisibility + ? Icons.visibility_outlined + : Icons.visibility_off_outlined, color: FlutterFlowTheme.of(context).accent1, size: 22.0, ), @@ -241,16 +270,23 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State null, + buildCounter: (context, + {required currentLength, + required isFocused, + maxLength}) => + null, keyboardType: TextInputType.number, - validator: _model.keyTextFieldTextControllerValidator.asValidator(context), + validator: _model.keyTextFieldTextControllerValidator + .asValidator(context), inputFormatters: [ FilteringTextInputFormatter.allow(RegExp('[0-9]')), LengthLimitingTextInputFormatter(4), @@ -261,10 +297,12 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State { +class RegisiterVistorTemplateComponentModel + extends FlutterFlowModel { Timer? _debounceTimer; late final String devUUID; late final String userUUID; @@ -18,7 +19,8 @@ class RegisiterVistorTemplateComponentModel extends FlutterFlowModel getVisitanteByDocument(String document, BuildContext context) async { + Future getVisitanteByDocument( + String document, BuildContext context) async { final response = await PhpGroup.getVisitorByDocCall.call( documento: document, ); - if (response.jsonBody['visitante']['VTE_ID'] != '0' && response.jsonBody['error'] != 'false') { + if (response.jsonBody['visitante']['VTE_ID'] != '0' && + response.jsonBody['error'] != 'false') { return true; } return false; @@ -90,7 +94,9 @@ class RegisiterVistorTemplateComponentModel extends FlutterFlowModel initializeDatabase() async { devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; ; } diff --git a/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart b/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart index 992e1b10..4a9c5ebe 100644 --- a/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart +++ b/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart @@ -24,13 +24,16 @@ class RegisiterVistorTemplateComponentWidget extends StatefulWidget { final String source; final String? doc; - const RegisiterVistorTemplateComponentWidget({super.key, required this.source, this.doc}); + const RegisiterVistorTemplateComponentWidget( + {super.key, required this.source, this.doc}); @override - State createState() => _RegisiterVistorTemplateComponentWidgetState(); + State createState() => + _RegisiterVistorTemplateComponentWidgetState(); } -class _RegisiterVistorTemplateComponentWidgetState extends State { +class _RegisiterVistorTemplateComponentWidgetState + extends State { late RegisiterVistorTemplateComponentModel _model; bool _isLoading = false; final scaffoldKey = GlobalKey(); @@ -50,7 +53,8 @@ class _RegisiterVistorTemplateComponentWidgetState extends State.seeded(false); - _model = createModel(context, () => RegisiterVistorTemplateComponentModel()); + _model = + createModel(context, () => RegisiterVistorTemplateComponentModel()); _model.textController1 ??= TextEditingController(); _model.textFieldFocusNode1 ??= FocusNode(); @@ -87,15 +91,19 @@ class _RegisiterVistorTemplateComponentWidgetState extends State( - controller: _model.dropDownValueController ??= FormFieldController(null), + controller: _model.dropDownValueController ??= + FormFieldController(null), options: [ FFLocalizations.of(context).getText( 'n8vddmcq' /* Visitante */, @@ -372,14 +430,20 @@ class _RegisiterVistorTemplateComponentWidgetState extends State setState(() => _model.dropDownValue = val), + onChanged: (val) => + setState(() => _model.dropDownValue = val), width: MediaQuery.sizeOf(context).width * 0.9, // height: 44.0, - textStyle: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + textStyle: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), fontSize: limitedInputFontSize, ), hintText: FFLocalizations.of(context).getVariableText( @@ -395,29 +459,39 @@ class _RegisiterVistorTemplateComponentWidgetState extends State { +class SignInTemplateComponentModel + extends FlutterFlowModel { final formKey = GlobalKey(); final unfocusNode = FocusNode(); FocusNode? emailAddressFocusNode; TextEditingController? emailAddressTextController; String? Function(BuildContext, String?)? emailAddressTextControllerValidator; SignInTemplateComponentModel(); - String? _emailAddressTextControllerValidator(BuildContext context, String? val) { + String? _emailAddressTextControllerValidator( + BuildContext context, String? val) { if (val == null || val.isEmpty) { return FFLocalizations.of(context).getText( 'xhnawzcb' /* Campo é necessário */, diff --git a/lib/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart b/lib/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart index 0e786f6c..84cdf9ba 100644 --- a/lib/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart +++ b/lib/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart @@ -28,10 +28,12 @@ class SignInTemplateComponentWidget extends StatefulWidget { final Future Function()? toggleSignUpPage; @override - State createState() => _SignInTemplateComponentWidgetState(); + State createState() => + _SignInTemplateComponentWidgetState(); } -class _SignInTemplateComponentWidgetState extends State with TickerProviderStateMixin { +class _SignInTemplateComponentWidgetState + extends State with TickerProviderStateMixin { late SignInTemplateComponentModel _model; final animationsMap = {}; @@ -99,14 +101,17 @@ class _SignInTemplateComponentWidgetState extends State('emailTextFormField'), - controller: _model.emailAddressTextController, - focusNode: _model.emailAddressFocusNode, - cursorColor: FlutterFlowTheme.of(context).primary, - onChanged: (_) => EasyDebounce.debounce( + key: const ValueKey( + 'emailTextFormField'), + controller: _model + .emailAddressTextController, + focusNode: _model + .emailAddressFocusNode, + cursorColor: + FlutterFlowTheme.of(context) + .primary, + onChanged: (_) => + EasyDebounce.debounce( '_model.emailAddressTextController', - const Duration(milliseconds: 500), + const Duration( + milliseconds: 500), () => setState(() {}), ), autofocus: true, - autofillHints: const [AutofillHints.email], - textCapitalization: TextCapitalization.none, - textInputAction: TextInputAction.next, + autofillHints: const [ + AutofillHints.email + ], + textCapitalization: + TextCapitalization.none, + textInputAction: + TextInputAction.next, obscureText: false, decoration: InputDecoration( isDense: true, - labelText: FFLocalizations.of(context).getText( + labelText: FFLocalizations.of( + context) + .getText( '1ltg0ylb' /* Email */, ), - labelStyle: FlutterFlowTheme.of(context).labelLarge.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: limitedInputFontSize, + labelStyle: FlutterFlowTheme + .of(context) + .labelLarge + .override( + fontFamily: + 'Plus Jakarta Sans', + color: + FlutterFlowTheme.of( + context) + .primaryText, + fontSize: + limitedInputFontSize, letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + fontWeight: + FontWeight.w500, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), ), - enabledBorder: OutlineInputBorder( + enabledBorder: + OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).customColor1, + color: + FlutterFlowTheme.of( + context) + .customColor1, width: 0.25, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular( + 12.0), ), - focusedBorder: OutlineInputBorder( + focusedBorder: + OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).success, + color: + FlutterFlowTheme.of( + context) + .success, width: 0.25, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular( + 12.0), ), - errorBorder: OutlineInputBorder( + errorBorder: + OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, + color: + FlutterFlowTheme.of( + context) + .error, width: 0.25, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular( + 12.0), ), errorStyle: TextStyle( - color: FlutterFlowTheme.of(context).error, - fontSize: limitedInputFontSize, + color: FlutterFlowTheme.of( + context) + .error, + fontSize: + limitedInputFontSize, fontWeight: FontWeight.w500, ), - focusedErrorBorder: OutlineInputBorder( + focusedErrorBorder: + OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, + color: + FlutterFlowTheme.of( + context) + .error, width: 0.25, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular( + 12.0), ), suffixIcon: Icon( Icons.email, - color: FlutterFlowTheme.of(context).accent1, + color: FlutterFlowTheme.of( + context) + .accent1, size: 22.0, ), ), - style: FlutterFlowTheme.of(context).bodyLarge.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: limitedInputFontSize, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), - ), - keyboardType: TextInputType.emailAddress, - validator: _model.emailAddressTextControllerValidator.asValidator(context), + style: + FlutterFlowTheme.of(context) + .bodyLarge + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme + .of(context) + .primaryText, + fontSize: + limitedInputFontSize, + letterSpacing: 0.0, + fontWeight: + FontWeight.w500, + useGoogleFonts: + GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), + ), + keyboardType: + TextInputType.emailAddress, + validator: _model + .emailAddressTextControllerValidator + .asValidator(context), ), ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0), + padding: const EdgeInsetsDirectional + .fromSTEB(0.0, 0.0, 0.0, 16.0), child: SizedBox( width: double.infinity, child: TextFormField( - key: const ValueKey('passwordTextFormField'), - controller: _model.passwordTextController, - cursorColor: FlutterFlowTheme.of(context).primary, - focusNode: _model.passwordFocusNode, - onChanged: (_) => EasyDebounce.debounce('_model.passwordTextController', const Duration(milliseconds: 500), () => setState(() {})), + key: const ValueKey( + 'passwordTextFormField'), + controller: _model + .passwordTextController, + cursorColor: + FlutterFlowTheme.of(context) + .primary, + focusNode: + _model.passwordFocusNode, + onChanged: (_) => + EasyDebounce.debounce( + '_model.passwordTextController', + const Duration( + milliseconds: 500), + () => setState(() {})), autofocus: true, - autofillHints: const [AutofillHints.password], - textInputAction: TextInputAction.send, - obscureText: !_model.passwordVisibility, + autofillHints: const [ + AutofillHints.password + ], + textInputAction: + TextInputAction.send, + obscureText: + !_model.passwordVisibility, decoration: InputDecoration( isDense: true, - labelText: FFLocalizations.of(context).getText('2x19ce8k' /* Senha */), - labelStyle: FlutterFlowTheme.of(context).labelLarge.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: limitedInputFontSize, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans')), - enabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: FlutterFlowTheme.of(context).customColor1, width: 0.25), - borderRadius: BorderRadius.circular(12.0), + labelText: FFLocalizations.of( + context) + .getText( + '2x19ce8k' /* Senha */), + labelStyle: FlutterFlowTheme + .of(context) + .labelLarge + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme + .of(context) + .primaryText, + fontSize: + limitedInputFontSize, + letterSpacing: 0.0, + fontWeight: + FontWeight.w500, + useGoogleFonts: + GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans')), + enabledBorder: + OutlineInputBorder( + borderSide: BorderSide( + color: + FlutterFlowTheme.of( + context) + .customColor1, + width: 0.25), + borderRadius: + BorderRadius.circular( + 12.0), ), errorStyle: TextStyle( - color: FlutterFlowTheme.of(context).error, - fontSize: limitedInputFontSize, + color: FlutterFlowTheme.of( + context) + .error, + fontSize: + limitedInputFontSize, fontWeight: FontWeight.w500, ), focusedBorder: OutlineInputBorder( - borderSide: const BorderSide(color: Color(0xFF1AAB5F), width: 0.25), borderRadius: BorderRadius.circular(12.0)), - errorBorder: OutlineInputBorder( - borderSide: const BorderSide(color: Color(0xFFFF5963), width: 0.25), - borderRadius: BorderRadius.circular(12.0), + borderSide: + const BorderSide( + color: Color( + 0xFF1AAB5F), + width: 0.25), + borderRadius: + BorderRadius.circular( + 12.0)), + errorBorder: + OutlineInputBorder( + borderSide: + const BorderSide( + color: Color( + 0xFFFF5963), + width: 0.25), + borderRadius: + BorderRadius.circular( + 12.0), ), - focusedErrorBorder: OutlineInputBorder( - borderSide: const BorderSide(color: Color(0xFFFF5963), width: 0.25), - borderRadius: BorderRadius.circular(12.0), + focusedErrorBorder: + OutlineInputBorder( + borderSide: + const BorderSide( + color: Color( + 0xFFFF5963), + width: 0.25), + borderRadius: + BorderRadius.circular( + 12.0), ), filled: true, - fillColor: FlutterFlowTheme.of(context).primaryBackground, + fillColor: + FlutterFlowTheme.of( + context) + .primaryBackground, suffixIcon: InkWell( - onTap: () => setState(() => _model.passwordVisibility = !_model.passwordVisibility), - focusNode: FocusNode(skipTraversal: true), - child: Icon(_model.passwordVisibility ? Icons.visibility_outlined : Icons.visibility_off_outlined, - color: FlutterFlowTheme.of(context).accent1, size: 24.0), + onTap: () => setState(() => + _model.passwordVisibility = + !_model + .passwordVisibility), + focusNode: FocusNode( + skipTraversal: true), + child: Icon( + _model.passwordVisibility + ? Icons + .visibility_outlined + : Icons + .visibility_off_outlined, + color: + FlutterFlowTheme.of( + context) + .accent1, + size: 24.0), ), ), - style: FlutterFlowTheme.of(context).bodyLarge.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: limitedInputFontSize, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), - ), - validator: _model.passwordTextControllerValidator.asValidator(context), + style: + FlutterFlowTheme.of(context) + .bodyLarge + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme + .of(context) + .primaryText, + fontSize: + limitedInputFontSize, + letterSpacing: 0.0, + fontWeight: + FontWeight.w500, + useGoogleFonts: + GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), + ), + validator: _model + .passwordTextControllerValidator + .asValidator(context), ), ), ), @@ -338,73 +512,153 @@ class _SignInTemplateComponentWidgetState extends State('SubmitButtonWidget'), + key: const ValueKey( + 'SubmitButtonWidget'), onPressed: _isFormInvalid() ? null : () async { - await AuthenticationService.signIn( + await AuthenticationService + .signIn( context, _model, - emailAdress: _model.emailAddressTextController.text, - password: _model.passwordTextController.text, + emailAdress: _model + .emailAddressTextController + .text, + password: _model + .passwordTextController + .text, ); setState(() {}); }, - text: FFLocalizations.of(context).getText('k44tm7wo' /* Entrar */), + text: FFLocalizations.of( + context) + .getText( + 'k44tm7wo' /* Entrar */), options: FFButtonOptions( width: double.infinity, height: 44.0, - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - color: FlutterFlowTheme.of(context).primary, - textStyle: FlutterFlowTheme.of(context).titleSmall.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).info, - fontSize: limitedInputFontSize, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans')), + padding: + const EdgeInsetsDirectional + .fromSTEB( + 0.0, 0.0, 0.0, 0.0), + iconPadding: + const EdgeInsetsDirectional + .fromSTEB( + 0.0, 0.0, 0.0, 0.0), + color: FlutterFlowTheme.of( + context) + .primary, + textStyle: FlutterFlowTheme + .of(context) + .titleSmall + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme + .of(context) + .info, + fontSize: + limitedInputFontSize, + letterSpacing: 0.0, + fontWeight: + FontWeight.w500, + useGoogleFonts: + GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans')), elevation: 3.0, - borderSide: const BorderSide(color: Colors.transparent, width: 1.0), - borderRadius: BorderRadius.circular(12.0), - disabledColor: FlutterFlowTheme.of(context).customColor5, - disabledTextColor: Colors.white, + borderSide: + const BorderSide( + color: Colors + .transparent, + width: 1.0), + borderRadius: + BorderRadius.circular( + 12.0), + disabledColor: + FlutterFlowTheme.of( + context) + .customColor5, + disabledTextColor: + Colors.white, ), showLoadingIndicator: false, ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0), + padding: + const EdgeInsetsDirectional + .fromSTEB( + 0.0, 0.0, 0.0, 16.0), child: FFButtonWidget( - key: const ValueKey('toggleSignUpPage'), - onPressed: () async => await widget.toggleSignUpPage?.call(), - text: FFLocalizations.of(context).getText( + key: const ValueKey( + 'toggleSignUpPage'), + onPressed: () async => + await widget + .toggleSignUpPage + ?.call(), + text: FFLocalizations.of( + context) + .getText( '14u7ipws' /* Cadastrar */, ), options: FFButtonOptions( width: double.infinity, height: 44.0, - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - color: FlutterFlowTheme.of(context).customColor1, - textStyle: FlutterFlowTheme.of(context).titleSmall.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).secondaryText, - fontSize: limitedInputFontSize, + padding: + const EdgeInsetsDirectional + .fromSTEB( + 0.0, 0.0, 0.0, 0.0), + iconPadding: + const EdgeInsetsDirectional + .fromSTEB( + 0.0, 0.0, 0.0, 0.0), + color: FlutterFlowTheme.of( + context) + .customColor1, + textStyle: FlutterFlowTheme + .of(context) + .titleSmall + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme + .of(context) + .secondaryText, + fontSize: + limitedInputFontSize, letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + fontWeight: + FontWeight.w500, + useGoogleFonts: + GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), ), elevation: 3.0, - borderSide: const BorderSide(color: Colors.transparent, width: 1.0), - borderRadius: BorderRadius.circular(12.0), + borderSide: + const BorderSide( + color: Colors + .transparent, + width: 1.0), + borderRadius: + BorderRadius.circular( + 12.0), ), showLoadingIndicator: false, ), @@ -414,143 +668,279 @@ class _SignInTemplateComponentWidgetState extends State('SubmitButtonWidget'), - onPressed: _isFormInvalid() - ? null - : () async { - try { - await AuthenticationService.signIn( - context, - _model, - emailAdress: _model.emailAddressTextController.text, - password: _model.passwordTextController.text, - ); - setState(() {}); - } catch (e, s) { - await DialogUtil.errorDefault(context); - LogUtil.requestAPIFailed('login.php', _model.emailAddressTextController.text, "Login", e, s); - } - }, - text: FFLocalizations.of(context).getText('1x926nsn'), + key: const ValueKey< + String>( + 'SubmitButtonWidget'), + onPressed: + _isFormInvalid() + ? null + : () async { + try { + await AuthenticationService + .signIn( + context, + _model, + emailAdress: _model + .emailAddressTextController + .text, + password: _model + .passwordTextController + .text, + ); + setState( + () {}); + } catch (e, s) { + await DialogUtil + .errorDefault( + context); + LogUtil.requestAPIFailed( + 'login.php', + _model + .emailAddressTextController + .text, + "Login", + e, + s); + } + }, + text: FFLocalizations.of( + context) + .getText('1x926nsn'), options: FFButtonOptions( width: double.infinity, height: 44.0, - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - color: FlutterFlowTheme.of(context).accent1, - textStyle: FlutterFlowTheme.of(context).titleSmall.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).info, - fontSize: limitedInputFontSize, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), - ), + padding: + const EdgeInsetsDirectional + .fromSTEB(0.0, + 0.0, 0.0, 0.0), + iconPadding: + const EdgeInsetsDirectional + .fromSTEB(0.0, + 0.0, 0.0, 0.0), + color: + FlutterFlowTheme.of( + context) + .accent1, + textStyle: + FlutterFlowTheme.of( + context) + .titleSmall + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme.of( + context) + .info, + fontSize: + limitedInputFontSize, + letterSpacing: + 0.0, + fontWeight: + FontWeight + .w500, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), + ), elevation: 3.0, - borderSide: const BorderSide( - color: Colors.transparent, + borderSide: + const BorderSide( + color: Colors + .transparent, width: 1.0, ), - borderRadius: BorderRadius.circular(12.0), - disabledColor: const Color(0xE81AAB5F), + borderRadius: + BorderRadius + .circular(12.0), + disabledColor: + const Color( + 0xE81AAB5F), ), - showLoadingIndicator: true, + showLoadingIndicator: + true, ), ), ), Expanded( child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0), + padding: + const EdgeInsetsDirectional + .fromSTEB(0.0, 0.0, + 0.0, 16.0), child: FFButtonWidget( - key: const ValueKey('toggleSignUpPage'), - onPressed: () async => await widget.toggleSignUpPage?.call(), - text: FFLocalizations.of(context).getText('jwvd4ai1' /* Cadastrar */), + key: const ValueKey< + String>( + 'toggleSignUpPage'), + onPressed: () async => + await widget + .toggleSignUpPage + ?.call(), + text: FFLocalizations.of( + context) + .getText( + 'jwvd4ai1' /* Cadastrar */), options: FFButtonOptions( width: double.infinity, height: 44.0, - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - color: FlutterFlowTheme.of(context).customColor1, - textStyle: FlutterFlowTheme.of(context).titleSmall.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).secondaryText, - fontSize: 16.0, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), - ), + padding: + const EdgeInsetsDirectional + .fromSTEB(0.0, + 0.0, 0.0, 0.0), + iconPadding: + const EdgeInsetsDirectional + .fromSTEB(0.0, + 0.0, 0.0, 0.0), + color: + FlutterFlowTheme.of( + context) + .customColor1, + textStyle: + FlutterFlowTheme.of( + context) + .titleSmall + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme.of( + context) + .secondaryText, + fontSize: + 16.0, + letterSpacing: + 0.0, + fontWeight: + FontWeight + .w500, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), + ), elevation: 3.0, - borderSide: const BorderSide( - color: Colors.transparent, + borderSide: + const BorderSide( + color: Colors + .transparent, width: 1.0, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius + .circular(12.0), ), - showLoadingIndicator: false, + showLoadingIndicator: + false, ), ), ), - ].divide(const SizedBox(width: 7.0))); + ].divide( + const SizedBox(width: 7.0))); } }, ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0), + padding: + const EdgeInsetsDirectional.fromSTEB( + 0.0, 12.0, 0.0, 12.0), child: InkWell( - key: const ValueKey('ForgotPassword'), + key: const ValueKey( + 'ForgotPassword'), splashColor: Colors.transparent, focusColor: Colors.transparent, hoverColor: Colors.transparent, highlightColor: Colors.transparent, onTap: () async { await showModalBottomSheet( - isScrollControlled: true, - backgroundColor: Colors.transparent, - context: context, - builder: (context) { - return Padding( - padding: MediaQuery.viewInsetsOf(context), - child: const ForgotPasswordTemplateComponentWidget(), - ); - }).then((value) => safeSetState(() {})); + isScrollControlled: true, + backgroundColor: + Colors.transparent, + context: context, + builder: (context) { + return Padding( + padding: MediaQuery + .viewInsetsOf( + context), + child: + const ForgotPasswordTemplateComponentWidget(), + ); + }) + .then((value) => + safeSetState(() {})); }, child: RichText( - textScaler: MediaQuery.of(context).textScaler, + textScaler: + MediaQuery.of(context).textScaler, text: TextSpan( children: [ TextSpan( - text: FFLocalizations.of(context).getText( + text: + FFLocalizations.of(context) + .getText( '05dx91ku' /* Você esqueceu a sua senha? */, ), style: TextStyle( - color: FlutterFlowTheme.of(context).primaryText, - fontSize: limitedInputFontSize, + color: FlutterFlowTheme.of( + context) + .primaryText, + fontSize: + limitedInputFontSize, ), ), TextSpan( - text: FFLocalizations.of(context).getText('p5c6d54y' /* Recupere aqui */), - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).primary, - fontSize: limitedInputFontSize, - letterSpacing: 0.0, - fontWeight: FontWeight.normal, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), - ), - mouseCursor: SystemMouseCursors.click, + text: FFLocalizations.of( + context) + .getText( + 'p5c6d54y' /* Recupere aqui */), + style: + FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme + .of(context) + .primary, + fontSize: + limitedInputFontSize, + letterSpacing: 0.0, + fontWeight: + FontWeight.normal, + useGoogleFonts: + GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), + ), + mouseCursor: + SystemMouseCursors.click, ) ], - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), - fontSize: limitedInputFontSize), + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: + FlutterFlowTheme.of( + context) + .bodyMediumFamily, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of( + context) + .bodyMediumFamily), + fontSize: + limitedInputFontSize), ), ), ), @@ -560,7 +950,8 @@ class _SignInTemplateComponentWidgetState extends State { +class SignUpTemplateComponentModel + extends FlutterFlowModel { final formKey = GlobalKey(); FocusNode? nameRegisterFormFocusNode; TextEditingController? nameRegisterFormTextController; - String? Function(BuildContext, String?)? nameRegisterFormTextControllerValidator; - String? _nameRegisterFormTextControllerValidator(BuildContext context, String? val) { + String? Function(BuildContext, String?)? + nameRegisterFormTextControllerValidator; + String? _nameRegisterFormTextControllerValidator( + BuildContext context, String? val) { if (val == null || val.isEmpty) { return FFLocalizations.of(context).getText( '3bs10dfq' /* Campo é necessário */, @@ -20,8 +24,10 @@ class SignUpTemplateComponentModel extends FlutterFlowModel createState() => _SignUpTemplateComponentWidgetState(); + State createState() => + _SignUpTemplateComponentWidgetState(); } -class _SignUpTemplateComponentWidgetState extends State with TickerProviderStateMixin { +class _SignUpTemplateComponentWidgetState + extends State with TickerProviderStateMixin { late SignUpTemplateComponentModel _model; final animationsMap = {}; late String _deviceType; @@ -91,7 +94,8 @@ class _SignUpTemplateComponentWidgetState extends State _initialize() async { - _deviceType = (await StorageHelper().get(SecureStorageKey.deviceType.value)) ?? ''; + _deviceType = + (await StorageHelper().get(SecureStorageKey.deviceType.value)) ?? ''; } @override @@ -107,19 +111,24 @@ class _SignUpTemplateComponentWidgetState extends State('nameTextFormField'), - controller: _model.nameRegisterFormTextController, - focusNode: _model.nameRegisterFormFocusNode, - onChanged: (_) => EasyDebounce.debounce( + key: const ValueKey( + 'nameTextFormField'), + controller: _model + .nameRegisterFormTextController, + focusNode: _model + .nameRegisterFormFocusNode, + onChanged: (_) => + EasyDebounce.debounce( '_model.nameRegisterFormTextController', - const Duration(milliseconds: 500), + const Duration( + milliseconds: 500), () => setState(() {}), ), autofocus: false, - autofillHints: const [AutofillHints.name], + autofillHints: const [ + AutofillHints.name + ], obscureText: false, decoration: InputDecoration( isDense: true, - labelText: FFLocalizations.of(context).getText( + labelText: + FFLocalizations.of( + context) + .getText( '3corpwhd' /* Nome */, ), - labelStyle: FlutterFlowTheme.of(context).labelLarge.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: limitedInputFontSize, + labelStyle: FlutterFlowTheme + .of(context) + .labelLarge + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme + .of(context) + .primaryText, + fontSize: + limitedInputFontSize, letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + fontWeight: + FontWeight.w500, + useGoogleFonts: + GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), ), - enabledBorder: OutlineInputBorder( + enabledBorder: + OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).customColor1, + color: + FlutterFlowTheme.of( + context) + .customColor1, width: 0.25, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular( + 12.0), ), - focusedBorder: OutlineInputBorder( + focusedBorder: + OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).success, + color: + FlutterFlowTheme.of( + context) + .success, width: 0.25, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular( + 12.0), ), - errorBorder: OutlineInputBorder( + errorBorder: + OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, + color: + FlutterFlowTheme.of( + context) + .error, width: 0.25, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular( + 12.0), ), errorStyle: TextStyle( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).error, - fontSize: limitedInputFontSize, - fontWeight: FontWeight.w400, - fontStyle: FontStyle.normal, + fontFamily: + 'Plus Jakarta Sans', + color: + FlutterFlowTheme.of( + context) + .error, + fontSize: + limitedInputFontSize, + fontWeight: + FontWeight.w400, + fontStyle: + FontStyle.normal, ), - focusedErrorBorder: OutlineInputBorder( + focusedErrorBorder: + OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, + color: + FlutterFlowTheme.of( + context) + .error, width: 0.25, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular( + 12.0), ), filled: true, - fillColor: FlutterFlowTheme.of(context).primaryBackground, + fillColor: + FlutterFlowTheme.of( + context) + .primaryBackground, suffixIcon: Icon( Icons.person, - color: FlutterFlowTheme.of(context).accent1, + color: + FlutterFlowTheme.of( + context) + .accent1, size: 22.0, ), ), - style: FlutterFlowTheme.of(context).bodyLarge.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: limitedInputFontSize, + style: FlutterFlowTheme.of( + context) + .bodyLarge + .override( + fontFamily: + 'Plus Jakarta Sans', + color: + FlutterFlowTheme.of( + context) + .primaryText, + fontSize: + limitedInputFontSize, letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + fontWeight: + FontWeight.w500, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), ), - validator: _model.nameRegisterFormTextControllerValidator.asValidator(context), + validator: _model + .nameRegisterFormTextControllerValidator + .asValidator(context), ), ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0), + padding: + const EdgeInsetsDirectional + .fromSTEB( + 0.0, 0.0, 0.0, 16.0), child: SizedBox( width: double.infinity, child: TextFormField( - key: const ValueKey('emailTextFormField'), - controller: _model.emailRegisterFormTextController, - focusNode: _model.emailRegisterFormFocusNode, - onChanged: (_) => EasyDebounce.debounce( + key: const ValueKey( + 'emailTextFormField'), + controller: _model + .emailRegisterFormTextController, + focusNode: _model + .emailRegisterFormFocusNode, + onChanged: (_) => + EasyDebounce.debounce( '_model.emailRegisterFormTextController', - const Duration(milliseconds: 500), + const Duration( + milliseconds: 500), () => setState(() {}), ), autofocus: false, - autofillHints: const [AutofillHints.email], + autofillHints: const [ + AutofillHints.email + ], obscureText: false, decoration: InputDecoration( isDense: true, - labelText: FFLocalizations.of(context).getText( + labelText: + FFLocalizations.of( + context) + .getText( '80wonb69' /* Email */, ), - labelStyle: FlutterFlowTheme.of(context).labelLarge.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: limitedInputFontSize, + labelStyle: FlutterFlowTheme + .of(context) + .labelLarge + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme + .of(context) + .primaryText, + fontSize: + limitedInputFontSize, letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + fontWeight: + FontWeight.w500, + useGoogleFonts: + GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), ), - enabledBorder: OutlineInputBorder( + enabledBorder: + OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).primaryText, + color: + FlutterFlowTheme.of( + context) + .primaryText, width: 0.25, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular( + 12.0), ), - focusedBorder: OutlineInputBorder( + focusedBorder: + OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).success, + color: + FlutterFlowTheme.of( + context) + .success, width: 0.25, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular( + 12.0), ), - errorBorder: OutlineInputBorder( + errorBorder: + OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, + color: + FlutterFlowTheme.of( + context) + .error, width: 0.25, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular( + 12.0), ), errorStyle: TextStyle( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).error, - fontSize: limitedInputFontSize, - fontWeight: FontWeight.w400, - fontStyle: FontStyle.normal, + fontFamily: + 'Plus Jakarta Sans', + color: + FlutterFlowTheme.of( + context) + .error, + fontSize: + limitedInputFontSize, + fontWeight: + FontWeight.w400, + fontStyle: + FontStyle.normal, ), - focusedErrorBorder: OutlineInputBorder( + focusedErrorBorder: + OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, + color: + FlutterFlowTheme.of( + context) + .error, width: 0.25, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular( + 12.0), ), filled: true, - fillColor: FlutterFlowTheme.of(context).primaryBackground, + fillColor: + FlutterFlowTheme.of( + context) + .primaryBackground, suffixIcon: Icon( Icons.email, - color: FlutterFlowTheme.of(context).accent1, + color: + FlutterFlowTheme.of( + context) + .accent1, size: 22.0, ), ), - style: FlutterFlowTheme.of(context).bodyLarge.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).customColor1, - fontSize: limitedInputFontSize, + style: FlutterFlowTheme.of( + context) + .bodyLarge + .override( + fontFamily: + 'Plus Jakarta Sans', + color: + FlutterFlowTheme.of( + context) + .customColor1, + fontSize: + limitedInputFontSize, letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + fontWeight: + FontWeight.w500, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), ), - keyboardType: TextInputType.emailAddress, - validator: _model.emailRegisterFormTextControllerValidator.asValidator(context), + keyboardType: TextInputType + .emailAddress, + validator: _model + .emailRegisterFormTextControllerValidator + .asValidator(context), ), ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0), + padding: + const EdgeInsetsDirectional + .fromSTEB( + 0.0, 0.0, 0.0, 16.0), child: SizedBox( width: double.infinity, child: TextFormField( - key: const ValueKey('passwordTextFormField'), - controller: _model.passwordRegisterFormTextController, - focusNode: _model.passwordRegisterFormFocusNode, - onChanged: (_) => EasyDebounce.debounce( + key: const ValueKey( + 'passwordTextFormField'), + controller: _model + .passwordRegisterFormTextController, + focusNode: _model + .passwordRegisterFormFocusNode, + onChanged: (_) => + EasyDebounce.debounce( '_model.passwordRegisterFormTextController', - const Duration(milliseconds: 500), + const Duration( + milliseconds: 500), () => setState(() {}), ), autofocus: false, - autofillHints: const [AutofillHints.password], - obscureText: !_model.passwordRegisterFormVisibility, + autofillHints: const [ + AutofillHints.password + ], + obscureText: !_model + .passwordRegisterFormVisibility, decoration: InputDecoration( isDense: true, - labelText: FFLocalizations.of(context).getText( + labelText: + FFLocalizations.of( + context) + .getText( '0firji8l' /* Senha */, ), - labelStyle: FlutterFlowTheme.of(context).labelLarge.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: limitedInputFontSize, + labelStyle: FlutterFlowTheme + .of(context) + .labelLarge + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme + .of(context) + .primaryText, + fontSize: + limitedInputFontSize, letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + fontWeight: + FontWeight.w500, + useGoogleFonts: + GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), ), - enabledBorder: OutlineInputBorder( + enabledBorder: + OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).customColor1, + color: + FlutterFlowTheme.of( + context) + .customColor1, width: 0.25, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular( + 12.0), ), - focusedBorder: OutlineInputBorder( - borderSide: const BorderSide( - color: Color(0xFF1AAB5F), + focusedBorder: + OutlineInputBorder( + borderSide: + const BorderSide( + color: + Color(0xFF1AAB5F), width: 0.25, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular( + 12.0), ), - errorBorder: OutlineInputBorder( - borderSide: const BorderSide( - color: Color(0xFFFF5963), + errorBorder: + OutlineInputBorder( + borderSide: + const BorderSide( + color: + Color(0xFFFF5963), width: 0.25, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular( + 12.0), ), errorStyle: TextStyle( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).error, - fontSize: limitedInputFontSize, - fontWeight: FontWeight.w400, - fontStyle: FontStyle.normal, + fontFamily: + 'Plus Jakarta Sans', + color: + FlutterFlowTheme.of( + context) + .error, + fontSize: + limitedInputFontSize, + fontWeight: + FontWeight.w400, + fontStyle: + FontStyle.normal, ), - focusedErrorBorder: OutlineInputBorder( - borderSide: const BorderSide( - color: Color(0xFFFF5963), + focusedErrorBorder: + OutlineInputBorder( + borderSide: + const BorderSide( + color: + Color(0xFFFF5963), width: 0.25, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular( + 12.0), ), filled: true, - fillColor: FlutterFlowTheme.of(context).primaryBackground, + fillColor: + FlutterFlowTheme.of( + context) + .primaryBackground, suffixIcon: InkWell( - key: const ValueKey('passwordVisibilitySuffixIcon'), + key: const ValueKey< + String>( + 'passwordVisibilitySuffixIcon'), onTap: () => setState( - () => _model.passwordRegisterFormVisibility = !_model.passwordRegisterFormVisibility, + () => _model + .passwordRegisterFormVisibility = + !_model + .passwordRegisterFormVisibility, ), - focusNode: FocusNode(skipTraversal: true), + focusNode: FocusNode( + skipTraversal: true), child: Icon( - _model.passwordRegisterFormVisibility ? Icons.visibility_outlined : Icons.visibility_off_outlined, - color: FlutterFlowTheme.of(context).accent1, + _model.passwordRegisterFormVisibility + ? Icons + .visibility_outlined + : Icons + .visibility_off_outlined, + color: + FlutterFlowTheme.of( + context) + .accent1, size: 24.0, ), ), ), - style: FlutterFlowTheme.of(context).bodyLarge.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: limitedInputFontSize, + style: FlutterFlowTheme.of( + context) + .bodyLarge + .override( + fontFamily: + 'Plus Jakarta Sans', + color: + FlutterFlowTheme.of( + context) + .primaryText, + fontSize: + limitedInputFontSize, letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + fontWeight: + FontWeight.w500, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), ), - validator: _model.passwordRegisterFormTextControllerValidator.asValidator(context), + validator: _model + .passwordRegisterFormTextControllerValidator + .asValidator(context), ), ), ), @@ -475,53 +728,86 @@ class _SignUpTemplateComponentWidgetState extends State('SubmitButtonWidget'), + key: const ValueKey( + 'SubmitButtonWidget'), onPressed: isFormInvalid() ? null : () async { var shouldSetState = false; - _model.register = await AuthenticationService.signUp( + _model.register = + await AuthenticationService + .signUp( context, - email: _model.emailRegisterFormTextController.text, - name: _model.nameRegisterFormTextController.text, - passwd: _model.passwordRegisterFormTextController.text, + email: _model + .emailRegisterFormTextController + .text, + name: _model + .nameRegisterFormTextController + .text, + passwd: _model + .passwordRegisterFormTextController + .text, device: _deviceType, ); shouldSetState = true; if (_model.register == true) - await widget.toggleSignInPage?.call(); + await widget + .toggleSignInPage + ?.call(); else { - if (shouldSetState) setState(() {}); + if (shouldSetState) + setState(() {}); return; } - if (shouldSetState) setState(() {}); + if (shouldSetState) + setState(() {}); }, - text: FFLocalizations.of(context).getText( + text: FFLocalizations.of(context) + .getText( 'rnvdwzei' /* Cadastrar-se */, ), options: FFButtonOptions( width: double.infinity, height: 44.0, - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - color: FlutterFlowTheme.of(context).accent1, - textStyle: FlutterFlowTheme.of(context).titleSmall.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).secondaryText, - fontSize: limitedInputFontSize, + padding: const EdgeInsetsDirectional + .fromSTEB(0.0, 0.0, 0.0, 0.0), + iconPadding: + const EdgeInsetsDirectional + .fromSTEB( + 0.0, 0.0, 0.0, 0.0), + color: FlutterFlowTheme.of(context) + .accent1, + textStyle: FlutterFlowTheme.of( + context) + .titleSmall + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme.of( + context) + .secondaryText, + fontSize: + limitedInputFontSize, letterSpacing: 0.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), ), elevation: 3.0, borderSide: const BorderSide( color: Colors.transparent, width: 1.0, ), - borderRadius: BorderRadius.circular(12.0), - disabledColor: FlutterFlowTheme.of(context).customColor5, + borderRadius: + BorderRadius.circular(12.0), + disabledColor: + FlutterFlowTheme.of(context) + .customColor5, disabledTextColor: Colors.white, ), showLoadingIndicator: true, @@ -530,46 +816,81 @@ class _SignUpTemplateComponentWidgetState extends State('toggleSignInPage'), + key: const ValueKey( + 'toggleSignInPage'), splashColor: Colors.transparent, focusColor: Colors.transparent, hoverColor: Colors.transparent, highlightColor: Colors.transparent, - onTap: () async => await widget.toggleSignInPage?.call(), + onTap: () async => await widget + .toggleSignInPage + ?.call(), child: RichText( - textScaler: MediaQuery.of(context).textScaler, + textScaler: MediaQuery.of(context) + .textScaler, text: TextSpan( children: [ TextSpan( - text: FFLocalizations.of(context).getText( + text: FFLocalizations.of( + context) + .getText( 'a9smhn5b' /* Você já tem uma conta? */, ), style: TextStyle( - color: FlutterFlowTheme.of(context).primaryText, - fontSize: limitedInputFontSize, + color: FlutterFlowTheme.of( + context) + .primaryText, + fontSize: + limitedInputFontSize, ), ), TextSpan( - text: FFLocalizations.of(context).getText( + text: FFLocalizations.of( + context) + .getText( '09xv5ctc' /* Clique aqui */, ), - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).primary, - fontSize: limitedInputFontSize, + style: FlutterFlowTheme.of( + context) + .bodyMedium + .override( + fontFamily: + 'Plus Jakarta Sans', + color: + FlutterFlowTheme.of( + context) + .primary, + fontSize: + limitedInputFontSize, letterSpacing: 0.0, - fontWeight: FontWeight.w600, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + fontWeight: + FontWeight.w600, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), ), ) ], - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), - ), + style: + FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: + FlutterFlowTheme.of( + context) + .bodyMediumFamily, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of( + context) + .bodyMediumFamily), + ), ), ), ), @@ -579,7 +900,8 @@ class _SignUpTemplateComponentWidgetState extends State { Future initializeDatabase() async { devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; ; } diff --git a/lib/components/templates_components/view_visit_detail/view_visit_detail_widget.dart b/lib/components/templates_components/view_visit_detail/view_visit_detail_widget.dart index f8149467..41f38054 100644 --- a/lib/components/templates_components/view_visit_detail/view_visit_detail_widget.dart +++ b/lib/components/templates_components/view_visit_detail/view_visit_detail_widget.dart @@ -85,19 +85,23 @@ class _ViewVisitDetailWidgetState extends State { // } // }); - _model.textController1 = TextEditingController(text: widget.visitTempStr == 'null' ? '' : widget.visitTempStr ?? ''); + _model.textController1 = TextEditingController( + text: widget.visitTempStr == 'null' ? '' : widget.visitTempStr ?? ''); _model.textFieldFocusNode1 ??= FocusNode(); - _model.textController2 ??= TextEditingController(text: widget.visitStartDate); + _model.textController2 ??= + TextEditingController(text: widget.visitStartDate); _model.textFieldFocusNode2 ??= FocusNode(); _model.textController3 ??= TextEditingController(text: widget.visitEndDate); _model.textFieldFocusNode3 ??= FocusNode(); - _model.textController4 ??= TextEditingController(text: widget.visitReasonStr); + _model.textController4 ??= + TextEditingController(text: widget.visitReasonStr); _model.textFieldFocusNode4 ??= FocusNode(); - _model.textController5 ??= TextEditingController(text: widget.visitLevelStr); + _model.textController5 ??= + TextEditingController(text: widget.visitLevelStr); _model.textFieldFocusNode5 ??= FocusNode(); _model.textController6 ??= TextEditingController(text: widget.visitObsStr); @@ -113,7 +117,8 @@ class _ViewVisitDetailWidgetState extends State { @override Widget build(BuildContext context) { - var filteredVisitorJsonList = findVisitorById(widget.visitorJsonList, widget.visitIdStr) ?? 'null'; + var filteredVisitorJsonList = + findVisitorById(widget.visitorJsonList, widget.visitIdStr) ?? 'null'; return Padding( padding: const EdgeInsetsDirectional.fromSTEB(0.0, 200.0, 0.0, 0.0), @@ -149,7 +154,8 @@ class _ViewVisitDetailWidgetState extends State { child: Align( alignment: const AlignmentDirectional(1.0, 0.0), child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(15.0, 0.0, 15.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 15.0, 0.0, 15.0, 0.0), child: FlutterFlowIconButton( borderRadius: 20.0, borderWidth: 1.0, @@ -178,7 +184,8 @@ class _ViewVisitDetailWidgetState extends State { Align( alignment: const AlignmentDirectional(1.0, -1.0), child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 20.0, 20.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 0.0, 0.0, 20.0, 20.0), child: Container( width: 100.0, decoration: const BoxDecoration(), @@ -218,8 +225,10 @@ class _ViewVisitDetailWidgetState extends State { child: ClipRRect( borderRadius: BorderRadius.circular(100.0), child: CachedNetworkImage( - fadeInDuration: const Duration(milliseconds: 500), - fadeOutDuration: const Duration(milliseconds: 500), + fadeInDuration: + const Duration(milliseconds: 500), + fadeOutDuration: + const Duration(milliseconds: 500), imageUrl: valueOrDefault( widget.visitorImgPath, 'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg', @@ -238,7 +247,8 @@ class _ViewVisitDetailWidgetState extends State { Container( decoration: const BoxDecoration(), child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 10.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 8.0, 0.0, 8.0, 10.0), child: TextFormField( controller: _model.textController1, focusNode: _model.textFieldFocusNode1, @@ -252,17 +262,27 @@ class _ViewVisitDetailWidgetState extends State { labelText: FFLocalizations.of(context).getText( '9yu35pzg' /* Encerramento da Visita */, ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -294,23 +314,29 @@ class _ViewVisitDetailWidgetState extends State { ), ), style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), ), - validator: _model.textController1Validator.asValidator(context), + validator: _model.textController1Validator + .asValidator(context), ), ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 10.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 0.0, 0.0, 0.0, 10.0), child: Row( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, children: [ Expanded( child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 8.0, 0.0, 8.0, 0.0), child: TextFormField( controller: _model.textController2, focusNode: _model.textFieldFocusNode2, @@ -324,20 +350,34 @@ class _ViewVisitDetailWidgetState extends State { labelText: FFLocalizations.of(context).getText( 'aj6scczp' /* Início */, ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), hintText: FFLocalizations.of(context).getText( 'ub084nhy' /* dd/mm/yyyy */, ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -368,19 +408,27 @@ class _ViewVisitDetailWidgetState extends State { borderRadius: BorderRadius.circular(8.0), ), ), - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), ), textAlign: TextAlign.center, - validator: _model.textController2Validator.asValidator(context), + validator: _model.textController2Validator + .asValidator(context), ), ), ), Expanded( child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 8.0, 0.0, 8.0, 0.0), child: TextFormField( controller: _model.textController3, focusNode: _model.textFieldFocusNode3, @@ -394,20 +442,34 @@ class _ViewVisitDetailWidgetState extends State { labelText: FFLocalizations.of(context).getText( 'rvi5z7wg' /* Término */, ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), hintText: FFLocalizations.of(context).getText( 'ixs67mrz' /* dd/mm/yyyy */, ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -438,13 +500,20 @@ class _ViewVisitDetailWidgetState extends State { borderRadius: BorderRadius.circular(8.0), ), ), - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), ), textAlign: TextAlign.center, - validator: _model.textController3Validator.asValidator(context), + validator: _model.textController3Validator + .asValidator(context), ), ), ), @@ -452,14 +521,16 @@ class _ViewVisitDetailWidgetState extends State { ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 10.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 0.0, 0.0, 0.0, 10.0), child: Row( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, children: [ Expanded( child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 8.0, 0.0, 8.0, 0.0), child: TextFormField( controller: _model.textController4, focusNode: _model.textFieldFocusNode4, @@ -473,20 +544,34 @@ class _ViewVisitDetailWidgetState extends State { labelText: FFLocalizations.of(context).getText( 'yxilg7ek' /* Motivo da Visita */, ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), hintText: FFLocalizations.of(context).getText( 'ypeydbem' /* Motivo */, ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -517,19 +602,27 @@ class _ViewVisitDetailWidgetState extends State { borderRadius: BorderRadius.circular(8.0), ), ), - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), ), textAlign: TextAlign.center, - validator: _model.textController4Validator.asValidator(context), + validator: _model.textController4Validator + .asValidator(context), ), ), ), Expanded( child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 8.0, 0.0, 8.0, 0.0), child: TextFormField( controller: _model.textController5, focusNode: _model.textFieldFocusNode5, @@ -543,20 +636,34 @@ class _ViewVisitDetailWidgetState extends State { labelText: FFLocalizations.of(context).getText( 'dgr3pk3a' /* Nível de Acesso */, ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), hintText: FFLocalizations.of(context).getText( 'rs3d4gb8' /* Nível de Acesso */, ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -587,13 +694,20 @@ class _ViewVisitDetailWidgetState extends State { borderRadius: BorderRadius.circular(8.0), ), ), - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), ), textAlign: TextAlign.center, - validator: _model.textController5Validator.asValidator(context), + validator: _model.textController5Validator + .asValidator(context), ), ), ), @@ -603,7 +717,8 @@ class _ViewVisitDetailWidgetState extends State { Container( decoration: const BoxDecoration(), child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 8.0, 0.0, 8.0, 0.0), child: TextFormField( controller: _model.textController6, focusNode: _model.textFieldFocusNode6, @@ -617,17 +732,27 @@ class _ViewVisitDetailWidgetState extends State { labelText: FFLocalizations.of(context).getText( 'lppn9rxa' /* Observações da Visita */, ), - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -659,11 +784,15 @@ class _ViewVisitDetailWidgetState extends State { ), ), style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), ), - validator: _model.textController6Validator.asValidator(context), + validator: _model.textController6Validator + .asValidator(context), ), ), ), @@ -688,7 +817,8 @@ class _ViewVisitDetailWidgetState extends State { size: 24.0, ), onPressed: () async { - _model.deleteVisit = await PhpGroup.deleteVisitCall.call( + _model.deleteVisit = + await PhpGroup.deleteVisitCall.call( idVisita: widget.visitIdStr, ); @@ -698,7 +828,8 @@ class _ViewVisitDetailWidgetState extends State { false) { context.pop(); } else { - final error = await DialogUtil.errorDefault(context); + final error = + await DialogUtil.errorDefault(context); await showModalBottomSheet( isScrollControlled: true, backgroundColor: Colors.transparent, @@ -735,7 +866,10 @@ class _ViewVisitDetailWidgetState extends State { ), ], ); - } else if ((widget.visitStatusStr == 'C') || (widget.visitStatusStr == 'F') || (widget.visitStatusStr == 'B') || (widget.visitStatusStr == 'I')) { + } else if ((widget.visitStatusStr == 'C') || + (widget.visitStatusStr == 'F') || + (widget.visitStatusStr == 'B') || + (widget.visitStatusStr == 'I')) { return InkWell( splashColor: Colors.transparent, focusColor: Colors.transparent, diff --git a/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_model.dart b/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_model.dart index c7143f06..7cd079db 100644 --- a/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_model.dart +++ b/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_model.dart @@ -5,7 +5,8 @@ import 'package:hub/flutter_flow/flutter_flow_model.dart'; import 'package:flutter/material.dart'; -class VisitDetailsModalTemplateComponentModel extends FlutterFlowModel { +class VisitDetailsModalTemplateComponentModel + extends FlutterFlowModel { /// Local state fields for this component. Color statusColor = const Color(0xff000000); @@ -20,7 +21,8 @@ class VisitDetailsModalTemplateComponentModel extends FlutterFlowModel ViewVisitDetailModel()); - scheduleVisitDetailModel = createModel(context, () => ScheduleVisitDetailModel()); + scheduleVisitDetailModel = + createModel(context, () => ScheduleVisitDetailModel()); } @override diff --git a/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart b/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart index b6e63072..a5e922e8 100644 --- a/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart +++ b/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart @@ -41,10 +41,12 @@ class VisitDetailsModalTemplateComponentWidget extends StatefulWidget { final Color? visitStatusColor; @override - State createState() => _VisitDetailsModalTemplateComponentWidgetState(); + State createState() => + _VisitDetailsModalTemplateComponentWidgetState(); } -class _VisitDetailsModalTemplateComponentWidgetState extends State { +class _VisitDetailsModalTemplateComponentWidgetState + extends State { late VisitDetailsModalTemplateComponentModel _model; @override @@ -56,7 +58,8 @@ class _VisitDetailsModalTemplateComponentWidgetState extends State VisitDetailsModalTemplateComponentModel()); + _model = + createModel(context, () => VisitDetailsModalTemplateComponentModel()); } @override diff --git a/lib/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_model.dart b/lib/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_model.dart index ee7ec7cf..d0f79706 100644 --- a/lib/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_model.dart +++ b/lib/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_model.dart @@ -1,8 +1,10 @@ import '/flutter_flow/flutter_flow_util.dart'; -import 'visitor_details_modal_template_component_widget.dart' show VisitorDetailsModalTemplateComponentWidget; +import 'visitor_details_modal_template_component_widget.dart' + show VisitorDetailsModalTemplateComponentWidget; import 'package:flutter/material.dart'; -class VisitorDetailsModalTemplateComponentModel extends FlutterFlowModel { +class VisitorDetailsModalTemplateComponentModel + extends FlutterFlowModel { @override void initState(BuildContext context) {} diff --git a/lib/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart b/lib/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart index fcd55d7b..98309e51 100644 --- a/lib/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart +++ b/lib/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart @@ -25,10 +25,12 @@ class VisitorDetailsModalTemplateComponentWidget extends StatefulWidget { final String? visitorEmail; @override - State createState() => _VisitorDetailsModalTemplateComponentWidgetState(); + State createState() => + _VisitorDetailsModalTemplateComponentWidgetState(); } -class _VisitorDetailsModalTemplateComponentWidgetState extends State { +class _VisitorDetailsModalTemplateComponentWidgetState + extends State { late VisitorDetailsModalTemplateComponentModel _model; @override @@ -40,7 +42,8 @@ class _VisitorDetailsModalTemplateComponentWidgetState extends State VisitorDetailsModalTemplateComponentModel()); + _model = + createModel(context, () => VisitorDetailsModalTemplateComponentModel()); } @override @@ -82,7 +85,8 @@ class _VisitorDetailsModalTemplateComponentWidgetState extends State { +class VisitorSearchModalTemplateComponentModel + extends FlutterFlowModel { late final String devUUID; late final String userUUID; late final String cliUUID; @@ -13,15 +14,18 @@ class VisitorSearchModalTemplateComponentModel extends FlutterFlowModel visitors.add(item); void removeFromVisitors(dynamic item) => visitors.remove(item); void removeAtIndexFromVisitors(int index) => visitors.removeAt(index); - void insertAtIndexInVisitors(int index, dynamic item) => visitors.insert(index, item); - void updateVisitorsAtIndex(int index, Function(dynamic) updateFn) => visitors[index] = updateFn(visitors[index]); + void insertAtIndexInVisitors(int index, dynamic item) => + visitors.insert(index, item); + void updateVisitorsAtIndex(int index, Function(dynamic) updateFn) => + visitors[index] = updateFn(visitors[index]); List docs = []; void addToDocs(String item) => docs.add(item); void removeFromDocs(String item) => docs.remove(item); void removeAtIndexFromDocs(int index) => docs.removeAt(index); void insertAtIndexInDocs(int index, String item) => docs.insert(index, item); - void updateDocsAtIndex(int index, Function(String) updateFn) => docs[index] = updateFn(docs[index]); + void updateDocsAtIndex(int index, Function(String) updateFn) => + docs[index] = updateFn(docs[index]); FocusNode? textFieldFocusNode; TextEditingController? textController; @@ -35,8 +39,10 @@ class VisitorSearchModalTemplateComponentModel extends FlutterFlowModel initDatabase() async { devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; ; } diff --git a/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart b/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart index 6ceaf2c1..41fe84e8 100644 --- a/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart +++ b/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart @@ -25,10 +25,13 @@ class VisitorSearchModalTemplateComponentWidget extends StatefulWidget { final Future Function(List? docsParam)? getDocs; @override - State createState() => _VisitorSearchModalTemplateComponentWidgetState(); + State createState() => + _VisitorSearchModalTemplateComponentWidgetState(); } -class _VisitorSearchModalTemplateComponentWidgetState extends State with TickerProviderStateMixin { +class _VisitorSearchModalTemplateComponentWidgetState + extends State + with TickerProviderStateMixin { late VisitorSearchModalTemplateComponentModel _model; safeSetState(VoidCallback callback) { @@ -39,7 +42,8 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State VisitorSearchModalTemplateComponentModel()); + _model = + createModel(context, () => VisitorSearchModalTemplateComponentModel()); _model.textController ??= TextEditingController(); _model.textFieldFocusNode ??= FocusNode(); @@ -54,9 +58,12 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State e).toList(); @@ -185,7 +222,8 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State( - getJsonField(visitorItem, r'''$.VTE_NOME''')?.toString(), + getJsonField(visitorItem, + r'''$.VTE_NOME''') + ?.toString(), 'NOT FOUND', ), - style: FlutterFlowTheme.of(context).bodyLarge.override( - fontFamily: FlutterFlowTheme.of(context).bodyLargeFamily, + style: FlutterFlowTheme.of( + context) + .bodyLarge + .override( + fontFamily: + FlutterFlowTheme.of( + context) + .bodyLargeFamily, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyLargeFamily), - fontSize: limitedBodyFontSize, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of( + context) + .bodyLargeFamily), + fontSize: + limitedBodyFontSize, ), ), ), @@ -245,9 +307,14 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State 0 - ? () async => await addVisitor(context).whenComplete(safeSetState(() {})) + ? () async => await addVisitor(context) + .whenComplete(safeSetState(() {})) : () async => await sendVisitors(context), text: MediaQuery.of(context).viewInsets.bottom > 0 ? FFLocalizations.of(context).getVariableText( @@ -293,20 +362,28 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State addVisitor(BuildContext context) async { safeSetState(() { _model.textController?.text = _model.textController.text; - _model.textController?.selection = TextSelection.collapsed(offset: _model.textController!.text.length); + _model.textController?.selection = + TextSelection.collapsed(offset: _model.textController!.text.length); }); - _model.getVisitorByDoc = await PhpGroup.getVisitorByDocCall.call(documento: _model.textController.text.replaceFirst(RegExp(r'^0+'), '')); + _model.getVisitorByDoc = await PhpGroup.getVisitorByDocCall.call( + documento: _model.textController.text.replaceFirst(RegExp(r'^0+'), '')); - if (PhpGroup.getVisitorByDocCall.vistanteId((_model.getVisitorByDoc?.jsonBody ?? '')) != '0' && - PhpGroup.getVisitorByDocCall.error((_model.getVisitorByDoc?.jsonBody ?? '')) == false && - PhpGroup.getVisitorByDocCall.vistanteId((_model.getVisitorByDoc?.jsonBody ?? '')) != null) { - String newDoc = _model.textController.text.replaceFirst(RegExp(r'^0+'), ''); + if (PhpGroup.getVisitorByDocCall + .vistanteId((_model.getVisitorByDoc?.jsonBody ?? '')) != + '0' && + PhpGroup.getVisitorByDocCall + .error((_model.getVisitorByDoc?.jsonBody ?? '')) == + false && + PhpGroup.getVisitorByDocCall + .vistanteId((_model.getVisitorByDoc?.jsonBody ?? '')) != + null) { + String newDoc = + _model.textController.text.replaceFirst(RegExp(r'^0+'), ''); bool existDoc = _model.docs.contains(newDoc); if (existDoc == false) { - _model.addToVisitors(PhpGroup.getVisitorByDocCall.visitante((_model.getVisitorByDoc?.jsonBody ?? ''))); + _model.addToVisitors(PhpGroup.getVisitorByDocCall + .visitante((_model.getVisitorByDoc?.jsonBody ?? ''))); safeSetState(() {}); - _model.addToDocs(_model.textController.text.replaceFirst(RegExp(r'^0+'), '')); + _model.addToDocs( + _model.textController.text.replaceFirst(RegExp(r'^0+'), '')); safeSetState(() {}); } else if (existDoc == true) { ToastUtil.showToast( - message: FFLocalizations.of(context).getVariableText(ptText: 'Visitante já adicionado!', enText: 'Visitor already added!'), + message: FFLocalizations.of(context).getVariableText( + ptText: 'Visitante já adicionado!', + enText: 'Visitor already added!'), gravity: ToastGravity.TOP, backgroundColor: Colors.red, fontSize: LimitedFontSizeUtil.getBodyFontSize(context)); @@ -353,7 +443,8 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State safeSetState(() { diff --git a/lib/components/templates_components/welcome_template_component/welcome_template_component_model.dart b/lib/components/templates_components/welcome_template_component/welcome_template_component_model.dart index 8a23ea35..17ea3047 100644 --- a/lib/components/templates_components/welcome_template_component/welcome_template_component_model.dart +++ b/lib/components/templates_components/welcome_template_component/welcome_template_component_model.dart @@ -1,8 +1,10 @@ import '/flutter_flow/flutter_flow_util.dart'; -import 'welcome_template_component_widget.dart' show WelcomeTemplateComponentWidget; +import 'welcome_template_component_widget.dart' + show WelcomeTemplateComponentWidget; import 'package:flutter/material.dart'; -class WelcomeTemplateComponentModel extends FlutterFlowModel { +class WelcomeTemplateComponentModel + extends FlutterFlowModel { @override void initState(BuildContext context) {} diff --git a/lib/components/templates_components/welcome_template_component/welcome_template_component_widget.dart b/lib/components/templates_components/welcome_template_component/welcome_template_component_widget.dart index b46eb07d..ee0d982d 100644 --- a/lib/components/templates_components/welcome_template_component/welcome_template_component_widget.dart +++ b/lib/components/templates_components/welcome_template_component/welcome_template_component_widget.dart @@ -23,10 +23,13 @@ class WelcomeTemplateComponentWidget extends StatefulWidget { final Future Function()? toggleSignInPage; @override - State createState() => _WelcomeTemplateComponentWidgetState(); + State createState() => + _WelcomeTemplateComponentWidgetState(); } -class _WelcomeTemplateComponentWidgetState extends State with TickerProviderStateMixin { +class _WelcomeTemplateComponentWidgetState + extends State + with TickerProviderStateMixin { late WelcomeTemplateComponentModel _model; final animationsMap = {}; @@ -87,8 +90,10 @@ class _WelcomeTemplateComponentWidgetState extends State('toggleSignInPage'), + key: const ValueKey( + 'toggleSignInPage'), onPressed: () async { await widget.toggleSignInPage?.call(); }, - text: FFLocalizations.of(context).getText('dynet730' /* Entrar */), + text: FFLocalizations.of(context) + .getText('dynet730' /* Entrar */), options: FFButtonOptions( width: double.infinity, height: 44.0, - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - color: FlutterFlowTheme.of(context).primary, - textStyle: FlutterFlowTheme.of(context).titleSmall.override( + padding: const EdgeInsetsDirectional + .fromSTEB(0.0, 0.0, 0.0, 0.0), + iconPadding: + const EdgeInsetsDirectional + .fromSTEB(0.0, 0.0, 0.0, 0.0), + color: FlutterFlowTheme.of(context) + .primary, + textStyle: FlutterFlowTheme.of( + context) + .titleSmall + .override( fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).info, + color: + FlutterFlowTheme.of(context) + .info, fontSize: limitedInputFontSize, letterSpacing: 0.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), ), elevation: 3.0, borderSide: const BorderSide( color: Colors.transparent, width: 1.0, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular(12.0), ), showLoadingIndicator: false, ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0), + padding: + const EdgeInsetsDirectional.fromSTEB( + 0.0, 0.0, 0.0, 16.0), child: FFButtonWidget( - key: const ValueKey('toggleSignUpPage'), + key: const ValueKey( + 'toggleSignUpPage'), onPressed: () async { await widget.toggleSignUpPage?.call(); }, - text: FFLocalizations.of(context).getText( + text: + FFLocalizations.of(context).getText( 'hha60cg7' /* Cadastrar */, ), options: FFButtonOptions( width: double.infinity, height: 44.0, - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - color: FlutterFlowTheme.of(context).customColor1, - textStyle: FlutterFlowTheme.of(context).titleSmall.override( + padding: const EdgeInsetsDirectional + .fromSTEB(0.0, 0.0, 0.0, 0.0), + iconPadding: + const EdgeInsetsDirectional + .fromSTEB(0.0, 0.0, 0.0, 0.0), + color: FlutterFlowTheme.of(context) + .customColor1, + textStyle: FlutterFlowTheme.of( + context) + .titleSmall + .override( fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).primaryBackground, + color: + FlutterFlowTheme.of(context) + .primaryBackground, fontSize: limitedInputFontSize, letterSpacing: 0.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), ), elevation: 3.0, borderSide: const BorderSide( color: Colors.transparent, width: 1.0, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular(12.0), ), showLoadingIndicator: false, ), @@ -250,39 +297,59 @@ class _WelcomeTemplateComponentWidgetState extends State('toggleSignInPage'), + key: const ValueKey( + 'toggleSignInPage'), onPressed: () async { - await widget.toggleSignInPage?.call(); + await widget.toggleSignInPage + ?.call(); }, - text: FFLocalizations.of(context).getText( + text: FFLocalizations.of(context) + .getText( 'zvtay8ee' /* Entrar */, ), options: FFButtonOptions( width: double.infinity, height: 44.0, - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - color: FlutterFlowTheme.of(context).primary, - textStyle: FlutterFlowTheme.of(context).titleSmall.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).info, + padding: const EdgeInsetsDirectional + .fromSTEB(0.0, 0.0, 0.0, 0.0), + iconPadding: + const EdgeInsetsDirectional + .fromSTEB( + 0.0, 0.0, 0.0, 0.0), + color: FlutterFlowTheme.of(context) + .primary, + textStyle: FlutterFlowTheme.of( + context) + .titleSmall + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme.of( + context) + .info, fontSize: 16.0, letterSpacing: 0.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), ), elevation: 3.0, borderSide: const BorderSide( color: Colors.transparent, width: 1.0, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular(12.0), ), showLoadingIndicator: false, ), @@ -290,35 +357,54 @@ class _WelcomeTemplateComponentWidgetState extends State('toggleSignUpPage'), + key: const ValueKey( + 'toggleSignUpPage'), onPressed: () async { - await widget.toggleSignUpPage?.call(); + await widget.toggleSignUpPage + ?.call(); }, - text: FFLocalizations.of(context).getText( + text: FFLocalizations.of(context) + .getText( 'o6zob50a' /* Cadastrar */, ), options: FFButtonOptions( width: double.infinity, height: 44.0, - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - color: FlutterFlowTheme.of(context).primary, - textStyle: FlutterFlowTheme.of(context).titleSmall.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).info, + padding: const EdgeInsetsDirectional + .fromSTEB(0.0, 0.0, 0.0, 0.0), + iconPadding: + const EdgeInsetsDirectional + .fromSTEB( + 0.0, 0.0, 0.0, 0.0), + color: FlutterFlowTheme.of(context) + .primary, + textStyle: FlutterFlowTheme.of( + context) + .titleSmall + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme.of( + context) + .info, fontSize: 16.0, letterSpacing: 0.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), ), elevation: 3.0, borderSide: const BorderSide( color: Colors.transparent, width: 1.0, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular(12.0), ), showLoadingIndicator: false, ), @@ -333,7 +419,8 @@ class _WelcomeTemplateComponentWidgetState extends State 7) && (name != null && name != '')) { + if ((email != null && email != '') && + (passwd != null && passwd != '' && passwd.length > 7) && + (name != null && name != '')) { response = await PhpGroup.registerCall.call( name: name, password: passwd, @@ -126,7 +133,8 @@ class AuthenticationService { } } catch (e, s) { await DialogUtil.errorDefault(context); - LogUtil.requestAPIFailed('registro.php', email.toString(), "Register", e, s); + LogUtil.requestAPIFailed( + 'registro.php', email.toString(), "Register", e, s); return false; } } @@ -154,7 +162,9 @@ class AuthenticationService { try { final ApiCallResponse? response; final ForgotPasswordCall callback = PhpGroup.forgotPasswordCall; - final String message = FFLocalizations.of(context).getVariableText(enText: "Send E-mail Successful!", ptText: "E-mail Enviado com Sucesso!"); + final String message = FFLocalizations.of(context).getVariableText( + enText: "Send E-mail Successful!", + ptText: "E-mail Enviado com Sucesso!"); response = await callback.call(email: email); @@ -167,14 +177,17 @@ class AuthenticationService { } } catch (e, s) { await DialogUtil.errorDefault(context); - LogUtil.requestAPIFailed('forgotPassword.php', email, "Forgot Password", e, s); + LogUtil.requestAPIFailed( + 'forgotPassword.php', email, "Forgot Password", e, s); return false; } } - static Future changePassword(BuildContext context, String email, String password, String token) async { + static Future changePassword( + BuildContext context, String email, String password, String token) async { try { - final ApiCallResponse response = await PhpGroup.changePasswordCall.call(email: email, psswd: password, token: token); + final ApiCallResponse response = await PhpGroup.changePasswordCall + .call(email: email, psswd: password, token: token); if (response.jsonBody['error'] == false) { final String message = FFLocalizations.of(context).getVariableText( @@ -190,7 +203,8 @@ class AuthenticationService { } } catch (e, s) { await DialogUtil.errorDefault(context); - LogUtil.requestAPIFailed('changePassword.php', email, "Change Password", e, s); + LogUtil.requestAPIFailed( + 'changePassword.php', email, "Change Password", e, s); return false; } } diff --git a/lib/features/backend/api_requests/api_calls.dart b/lib/features/backend/api_requests/api_calls.dart index 70f1aee6..e7ab6772 100644 --- a/lib/features/backend/api_requests/api_calls.dart +++ b/lib/features/backend/api_requests/api_calls.dart @@ -27,17 +27,20 @@ class PhpGroup { static ForgotPasswordCall forgotPasswordCall = ForgotPasswordCall(); static ChangePasswordCall changePasswordCall = ChangePasswordCall(); static GetLocalsCall getLocalsCall = GetLocalsCall(); - static PostScheduleVisitorCall postScheduleVisitorCall = PostScheduleVisitorCall(); + static PostScheduleVisitorCall postScheduleVisitorCall = + PostScheduleVisitorCall(); static PostScheduleVisitCall postScheduleVisitCall = PostScheduleVisitCall(); static GetScheduleVisitCall getScheduleVisitCall = GetScheduleVisitCall(); static GetDadosCall getDadosCall = GetDadosCall(); static GetVisitorByDocCall getVisitorByDocCall = GetVisitorByDocCall(); static GetFotoVisitanteCall getFotoVisitanteCall = GetFotoVisitanteCall(); - static PostProvVisitSchedulingCall postProvVisitSchedulingCall = PostProvVisitSchedulingCall(); + static PostProvVisitSchedulingCall postProvVisitSchedulingCall = + PostProvVisitSchedulingCall(); static GetVisitsCall getVisitsCall = GetVisitsCall(); static DeleteVisitCall deleteVisitCall = DeleteVisitCall(); static GetPessoasLocalCall getPessoasLocalCall = GetPessoasLocalCall(); - static RespondeSolicitacaoCall respondeSolicitacaoCall = RespondeSolicitacaoCall(); + static RespondeSolicitacaoCall respondeSolicitacaoCall = + RespondeSolicitacaoCall(); static GetAccessCall getAccessCall = GetAccessCall(); static GetLiberationsCall getLiberationsCall = GetLiberationsCall(); static GetMessagesCall getMessagesCall = GetMessagesCall(); @@ -56,7 +59,8 @@ class PhpGroup { static GetPetPhoto getPetPhoto = GetPetPhoto(); static UnregisterDevice unregisterDevice = UnregisterDevice(); static GetVehiclesByProperty getVehiclesByProperty = GetVehiclesByProperty(); - static GetResidentsByProperty getResidentsByProperty = GetResidentsByProperty(); + static GetResidentsByProperty getResidentsByProperty = + GetResidentsByProperty(); static GetOpenedVisits getOpenedVisits = GetOpenedVisits(); static GetLicense getLicense = GetLicense(); static GetProvSchedules getProvSchedules = GetProvSchedules(); @@ -65,9 +69,12 @@ class PhpGroup { class GetProvSchedules { Future call(final String page, final String status) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getAgendamentoProv'; const String pageSize = '10'; final bool isFiltered = status != '' && status != '.*'; @@ -100,9 +107,12 @@ class GetProvSchedules { class GetOpenedVisits { Future call(final String page) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getOpenedVisits'; const String pageSize = '10'; return await ApiManager.instance.makeApiCall( @@ -132,9 +142,12 @@ class GetOpenedVisits { class GetResidentsByProperty { Future call(final String page) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? ''; - final String userUUID = await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? ''; - final String cliID = await StorageHelper().get(ProfileStorageKey.clientUUID.key) ?? ''; + final String devUUID = + await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? ''; + final String userUUID = + await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? ''; + final String cliID = + await StorageHelper().get(ProfileStorageKey.clientUUID.key) ?? ''; const String atividade = 'getResidentsByProperty'; const String pageSize = '10'; return await ApiManager.instance.makeApiCall( @@ -163,9 +176,12 @@ class GetResidentsByProperty { class GetVehiclesByProperty { Future call(final String page) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getVehiclesByProperty'; const String pageSize = '10'; return await ApiManager.instance.makeApiCall( @@ -196,9 +212,12 @@ class GetVehiclesByProperty { class GetLicense { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; return await ApiManager.instance.makeApiCall( callName: 'getLicense', @@ -227,8 +246,10 @@ class GetLicense { class UnregisterDevice { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; return await ApiManager.instance.makeApiCall( callName: 'unregisterDevice', @@ -255,9 +276,12 @@ class UnregisterDevice { class DeletePet { Future call({final int? petID = 0}) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'excluirPet'; return await ApiManager.instance.makeApiCall( @@ -300,9 +324,12 @@ class UpdatePet { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'atualizarPet'; return await ApiManager.instance.makeApiCall( @@ -323,7 +350,9 @@ class UpdatePet { 'species': species, 'breed': breed, if (color != '') 'color': color, - if (birthdayDate != '') 'birthdayDate': ValidatorUtil.toISO8601USA('dd/MM/yyyy', birthdayDate!), + if (birthdayDate != '') + 'birthdayDate': + ValidatorUtil.toISO8601USA('dd/MM/yyyy', birthdayDate!), 'gender': gender, 'size': size, if (notes != '') 'notes': notes, @@ -346,9 +375,12 @@ class GetPets { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'consultaPets'; return await ApiManager.instance.makeApiCall( @@ -380,9 +412,12 @@ class GetPetPhoto { Future call({final int? petId}) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'consultaFotoPet'; return await ApiManager.instance.makeApiCall( @@ -423,9 +458,12 @@ class RegisterPet { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'cadastrarPet'; return await ApiManager.instance.makeApiCall( @@ -445,7 +483,9 @@ class RegisterPet { 'species': species, 'breed': breed, if (color != '') 'color': color, - if (birthdayDate != '') 'birthdayDate': ValidatorUtil.toISO8601USA('dd/MM/yyyy', birthdayDate!), + if (birthdayDate != '') + 'birthdayDate': + ValidatorUtil.toISO8601USA('dd/MM/yyyy', birthdayDate!), 'gender': gender, 'size': size, if (notes != '') 'notes': notes, @@ -468,9 +508,12 @@ class BuscaEnconcomendas { final String? adresseeType, final String? status, }) async { - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getEncomendas'; final String baseUrl = PhpGroup.getBaseUrl(); @@ -512,9 +555,12 @@ class CancelaVisita { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'cancelaVisita'; return await ApiManager.instance.makeApiCall( @@ -546,8 +592,10 @@ class CancelaVisita { class DeleteAccount { Future call() async { - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String baseUrl = PhpGroup.getBaseUrl(); return await ApiManager.instance.makeApiCall( @@ -578,9 +626,12 @@ class ChangePanic { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'updVisitado'; return await ApiManager.instance.makeApiCall( @@ -614,9 +665,12 @@ class ChangePass { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'updVisitado'; return await ApiManager.instance.makeApiCall( @@ -650,9 +704,12 @@ class RespondeVinculo { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; return await ApiManager.instance.makeApiCall( callName: 'respondeVinculo', @@ -684,9 +741,12 @@ class ChangeNotifica { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'updVisitado'; return await ApiManager.instance.makeApiCall( @@ -718,10 +778,14 @@ class UpdateIDE { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; - final String newIde = (await StorageHelper().get(ProfileStorageKey.userDevUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String newIde = + (await StorageHelper().get(ProfileStorageKey.userDevUUID.key)) ?? ''; const String atividade = 'updVisitado'; return await ApiManager.instance.makeApiCall( @@ -753,9 +817,12 @@ class UpdToken { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String token = (await StorageHelper().get(SecureStorageKey.token.value)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String token = + (await StorageHelper().get(SecureStorageKey.token.value)) ?? ''; return await ApiManager.instance.makeApiCall( callName: 'updToken', @@ -782,11 +849,17 @@ class UpdToken { class LoginCall { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String email = (await StorageHelper().get(SecureStorageKey.email.value)) ?? ''; - final String password = (await StorageHelper().get(SecureStorageKey.password.value)) ?? ''; - final String type = (await StorageHelper().get(SecureStorageKey.deviceType.value)) ?? ''; - final String description = (await StorageHelper().get(SecureStorageKey.deviceDescription.value)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String email = + (await StorageHelper().get(SecureStorageKey.email.value)) ?? ''; + final String password = + (await StorageHelper().get(SecureStorageKey.password.value)) ?? ''; + final String type = + (await StorageHelper().get(SecureStorageKey.deviceType.value)) ?? ''; + final String description = + (await StorageHelper().get(SecureStorageKey.deviceDescription.value)) ?? + ''; late final String token; try { token = await FirebaseMessagingService.getToken(); @@ -869,9 +942,12 @@ class ChangePasswordCall { required final String psswd, }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; return await ApiManager.instance.makeApiCall( callName: 'changePassword', @@ -930,8 +1006,10 @@ class GetLocalsCall { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? ''; - final String userUUID = await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? ''; + final String devUUID = + await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? ''; + final String userUUID = + await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? ''; return await ApiManager.instance .makeApiCall( @@ -972,9 +1050,12 @@ class PostScheduleVisitorCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'putVisitante'; return await ApiManager.instance.makeApiCall( @@ -1027,9 +1108,12 @@ class PostScheduleVisitCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'putVisita'; return await ApiManager.instance.makeApiCall( @@ -1081,9 +1165,12 @@ class GetScheduleVisitCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getVisitas'; return await ApiManager.instance.makeApiCall( @@ -1355,9 +1442,12 @@ class GetDadosCall { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getDados'; return await ApiManager.instance @@ -1393,7 +1483,8 @@ class GetDadosCall { response, r'''$.error_msg''', )); - String? visitedDesNomeStr(dynamic response) => castToType(getJsonField( + String? visitedDesNomeStr(dynamic response) => + castToType(getJsonField( response, r'''$.visitado.DES_NOME''', )); @@ -1401,27 +1492,33 @@ class GetDadosCall { response, r'''$.visitado.VDO_ID''', )); - String? visitedVDOTNomeStr(dynamic response) => castToType(getJsonField( + String? visitedVDOTNomeStr(dynamic response) => + castToType(getJsonField( response, r'''$.visitado.VDO_NOME''', )); - String? visitedVDOTipoStr(dynamic response) => castToType(getJsonField( + String? visitedVDOTipoStr(dynamic response) => + castToType(getJsonField( response, r'''$.visitado.VDO_TIPO''', )); - String? visitedVDOImeiStr(dynamic response) => castToType(getJsonField( + String? visitedVDOImeiStr(dynamic response) => + castToType(getJsonField( response, r'''$.visitado.VDO_IMEI''', )); - String? visitedVDODocumentoStr(dynamic response) => castToType(getJsonField( + String? visitedVDODocumentoStr(dynamic response) => + castToType(getJsonField( response, r'''$.visitado.VDO_DOCUMENTO''', )); - String? visitedVDOEmailStr(dynamic response) => castToType(getJsonField( + String? visitedVDOEmailStr(dynamic response) => + castToType(getJsonField( response, r'''$.visitado.VDO_EMAIL''', )); - String? visitedVDOStatusWebStr(dynamic response) => castToType(getJsonField( + String? visitedVDOStatusWebStr(dynamic response) => + castToType(getJsonField( response, r'''$.visitado.VDO_STATUSWEB''', )); @@ -1469,7 +1566,8 @@ class GetDadosCall { response, r'''$.visitado.DES_ID''', )); - String? visitedVDoNotTerceirosStr(dynamic response) => castToType(getJsonField( + String? visitedVDoNotTerceirosStr(dynamic response) => + castToType(getJsonField( response, r'''$.visitado.VDO_NOTTERCEIROS''', )); @@ -1538,7 +1636,8 @@ class GetDadosCall { .map((x) => castToType(x)) .withoutNulls .toList(); - List? levelNACIndPermiteReentradaStrList(dynamic response) => (getJsonField( + List? levelNACIndPermiteReentradaStrList(dynamic response) => + (getJsonField( response, r'''$.niveis[:].NAC_INDPERMITEREENTRADA''', true, @@ -1556,7 +1655,8 @@ class GetDadosCall { .map((x) => castToType(x)) .withoutNulls .toList(); - List? levelNACTempoAntiCaronaStrList(dynamic response) => (getJsonField( + List? levelNACTempoAntiCaronaStrList(dynamic response) => + (getJsonField( response, r'''$.niveis[:].NAC_TEMPOANTICARONA''', true, @@ -1590,9 +1690,12 @@ class GetVisitorByDocCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getVisitante'; return await ApiManager.instance.makeApiCall( @@ -1644,9 +1747,12 @@ class GetFotoVisitanteCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getFotoVisitante'; return await ApiManager.instance.makeApiCall( @@ -1683,9 +1789,12 @@ class PostProvVisitSchedulingCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'putAgendamentoProv'; return await ApiManager.instance.makeApiCall( @@ -1732,9 +1841,12 @@ class GetVisitsCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getVisitas'; return await ApiManager.instance.makeApiCall( @@ -1995,9 +2107,12 @@ class DeleteVisitCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'cancelaVisita'; return await ApiManager.instance.makeApiCall( @@ -2038,10 +2153,14 @@ class GetPessoasLocalCall { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String ownerUUID = (await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String ownerUUID = + (await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; return await ApiManager.instance.makeApiCall( callName: 'getPessoasLocal', @@ -2104,9 +2223,12 @@ class RespondeSolicitacaoCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'respondeSolicitacao'; return await ApiManager.instance.makeApiCall( @@ -2154,9 +2276,12 @@ class GetAccessCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getAcessos'; return await ApiManager.instance.makeApiCall( @@ -2403,9 +2528,12 @@ class GetLiberationsCall { final StreamController controller = StreamController(); Future.microtask(() async { - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getSolicitacoes'; try { @@ -2595,9 +2723,12 @@ class GetMessagesCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); - final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getMensagens'; return await ApiManager.instance.makeApiCall( @@ -2641,7 +2772,8 @@ class ApiPagingParams { }); @override - String toString() => 'PagingParams(nextPageNumber: $nextPageNumber, numItems: $numItems, lastResponse: $lastResponse,)'; + String toString() => + 'PagingParams(nextPageNumber: $nextPageNumber, numItems: $numItems, lastResponse: $lastResponse,)'; } String _toEncodable(dynamic item) { diff --git a/lib/features/backend/api_requests/api_manager.dart b/lib/features/backend/api_requests/api_manager.dart index 5e8f68bb..72087153 100644 --- a/lib/features/backend/api_requests/api_manager.dart +++ b/lib/features/backend/api_requests/api_manager.dart @@ -107,7 +107,9 @@ class ApiCallResponse { final Object? exception; bool get succeeded => statusCode >= 200 && statusCode < 300; String getHeader(String headerName) => headers[headerName] ?? ''; - String get bodyText => response?.body ?? (jsonBody is String ? jsonBody as String : jsonEncode(jsonBody)); + String get bodyText => + response?.body ?? + (jsonBody is String ? jsonBody as String : jsonEncode(jsonBody)); String get exceptionMessage => exception.toString(); static ApiCallResponse fromHttpResponse( @@ -121,7 +123,9 @@ class ApiCallResponse { if (bodyType == BodyType.BLOB) { jsonBody = response.bodyBytes; } else { - final responseBody = decodeUtf8 && returnBody ? const Utf8Decoder().convert(response.bodyBytes) : response.body; + final responseBody = decodeUtf8 && returnBody + ? const Utf8Decoder().convert(response.bodyBytes) + : response.body; jsonBody = returnBody ? json.decode(responseBody) : null; } } catch (_) {} @@ -133,7 +137,8 @@ class ApiCallResponse { ); } - static ApiCallResponse fromCloudCallResponse(Map response) => ApiCallResponse( + static ApiCallResponse fromCloudCallResponse(Map response) => + ApiCallResponse( response['body'], ApiManager.toStringMap(response['headers'] ?? {}), response['statusCode'] ?? 400, @@ -150,14 +155,17 @@ class ApiManager { static String? _accessToken; - static void clearCache(String callName) => - _apiCache.keys.toSet().forEach((k) => k.callName == callName ? _apiCache.remove(k) : null); + static void clearCache(String callName) => _apiCache.keys + .toSet() + .forEach((k) => k.callName == callName ? _apiCache.remove(k) : null); static Map toStringMap(Map map) => map.map((key, value) => MapEntry(key.toString(), value.toString())); - static String asQueryParams(Map map) => - map.entries.map((e) => "${Uri.encodeComponent(e.key)}=${Uri.encodeComponent(e.value.toString())}").join('&'); + static String asQueryParams(Map map) => map.entries + .map((e) => + "${Uri.encodeComponent(e.key)}=${Uri.encodeComponent(e.value.toString())}") + .join('&'); static Future urlRequest( ApiCallType callType, @@ -171,13 +179,15 @@ class ApiManager { BodyType? bodyType, }) async { if (params.isNotEmpty) { - final specifier = Uri.parse(apiUrl).queryParameters.isNotEmpty ? '&' : '?'; + final specifier = + Uri.parse(apiUrl).queryParameters.isNotEmpty ? '&' : '?'; apiUrl = '$apiUrl$specifier${asQueryParams(params)}'; } if (isStreamingApi) { client ??= http.Client(); - final request = http.Request(callType.toString().split('.').last, Uri.parse(apiUrl)) - ..headers.addAll(toStringMap(headers)); + final request = + http.Request(callType.toString().split('.').last, Uri.parse(apiUrl)) + ..headers.addAll(toStringMap(headers)); final streamedResponse = await getStreamedResponse(request); return ApiCallResponse( null, @@ -189,8 +199,10 @@ class ApiManager { final makeRequest = callType == ApiCallType.GET ? (client != null ? client.get : http.get) : (client != null ? client.delete : http.delete); - final response = await makeRequest(Uri.parse(apiUrl), headers: toStringMap(headers)); - return ApiCallResponse.fromHttpResponse(response, returnBody, decodeUtf8, bodyType); + final response = + await makeRequest(Uri.parse(apiUrl), headers: toStringMap(headers)); + return ApiCallResponse.fromHttpResponse( + response, returnBody, decodeUtf8, bodyType); } static Future requestWithBody( @@ -212,11 +224,13 @@ class ApiManager { (alwaysAllowBody && type == ApiCallType.DELETE), 'Invalid ApiCallType $type for request with body', ); - final postBody = createBody(headers, params, body, bodyType, encodeBodyUtf8); + final postBody = + createBody(headers, params, body, bodyType, encodeBodyUtf8); if (isStreamingApi) { client ??= http.Client(); - final request = http.Request(type.toString().split('.').last, Uri.parse(apiUrl)) - ..headers.addAll(toStringMap(headers)); + final request = + http.Request(type.toString().split('.').last, Uri.parse(apiUrl)) + ..headers.addAll(toStringMap(headers)); request.body = postBody; final streamedResponse = await getStreamedResponse(request); return ApiCallResponse( @@ -228,7 +242,8 @@ class ApiManager { } if (bodyType == BodyType.MULTIPART) { - return multipartRequest(type, apiUrl, headers, params, returnBody, decodeUtf8, alwaysAllowBody, bodyType); + return multipartRequest(type, apiUrl, headers, params, returnBody, + decodeUtf8, alwaysAllowBody, bodyType); } final requestFn = { @@ -237,8 +252,10 @@ class ApiManager { ApiCallType.PATCH: client != null ? client.patch : http.patch, ApiCallType.DELETE: client != null ? client.delete : http.delete, }[type]!; - final response = await requestFn(Uri.parse(apiUrl), headers: toStringMap(headers), body: postBody); - return ApiCallResponse.fromHttpResponse(response, returnBody, decodeUtf8, bodyType); + final response = await requestFn(Uri.parse(apiUrl), + headers: toStringMap(headers), body: postBody); + return ApiCallResponse.fromHttpResponse( + response, returnBody, decodeUtf8, bodyType); } static Future multipartRequest( @@ -258,14 +275,19 @@ class ApiManager { ); bool isFile(dynamic e) => - e is FFUploadedFile || e is List || (e is List && e.firstOrNull is FFUploadedFile); + e is FFUploadedFile || + e is List || + (e is List && e.firstOrNull is FFUploadedFile); - final nonFileParams = toStringMap(Map.fromEntries(params.entries.where((e) => !isFile(e.value)))); + final nonFileParams = toStringMap( + Map.fromEntries(params.entries.where((e) => !isFile(e.value)))); List files = []; params.entries.where((e) => isFile(e.value)).forEach((e) { final param = e.value; - final uploadedFiles = param is List ? param as List : [param as FFUploadedFile]; + final uploadedFiles = param is List + ? param as List + : [param as FFUploadedFile]; for (var uploadedFile in uploadedFiles) { files.add( http.MultipartFile.fromBytes( @@ -278,13 +300,15 @@ class ApiManager { } }); - final request = http.MultipartRequest(type.toString().split('.').last, Uri.parse(apiUrl)) + final request = http.MultipartRequest( + type.toString().split('.').last, Uri.parse(apiUrl)) ..headers.addAll(toStringMap(headers)) ..files.addAll(files); nonFileParams.forEach((key, value) => request.fields[key] = value); final response = await http.Response.fromStream(await request.send()); - return ApiCallResponse.fromHttpResponse(response, returnBody, decodeUtf8, bodyType); + return ApiCallResponse.fromHttpResponse( + response, returnBody, decodeUtf8, bodyType); } static MediaType? _getMediaType(String? filename) { @@ -333,10 +357,13 @@ class ApiManager { case null: break; } - if (contentType != null && !headers.keys.any((h) => h.toLowerCase() == 'content-type')) { + if (contentType != null && + !headers.keys.any((h) => h.toLowerCase() == 'content-type')) { headers['Content-Type'] = contentType; } - return encodeBodyUtf8 && postBody is String ? utf8.encode(postBody) : postBody; + return encodeBodyUtf8 && postBody is String + ? utf8.encode(postBody) + : postBody; } Future call(ApiCallOptions options) => makeApiCall( diff --git a/lib/features/backend/api_requests/get_streamed_response.dart b/lib/features/backend/api_requests/get_streamed_response.dart index 73280a05..1a53aab0 100644 --- a/lib/features/backend/api_requests/get_streamed_response.dart +++ b/lib/features/backend/api_requests/get_streamed_response.dart @@ -1,3 +1,4 @@ import 'package:http/http.dart'; -Future getStreamedResponse(Request request) => Client().send(request); +Future getStreamedResponse(Request request) => + Client().send(request); diff --git a/lib/features/backend/schema/enums/enums.dart b/lib/features/backend/schema/enums/enums.dart index 8f7ed174..cfef83fe 100644 --- a/lib/features/backend/schema/enums/enums.dart +++ b/lib/features/backend/schema/enums/enums.dart @@ -10,7 +10,8 @@ extension FFEnumExtensions on T { } extension FFEnumListExtensions on Iterable { - T? deserialize(String? value) => firstWhereOrNull((e) => e.serialize() == value); + T? deserialize(String? value) => + firstWhereOrNull((e) => e.serialize() == value); } T? deserializeEnum(String? value) { diff --git a/lib/features/backend/schema/structs/device_struct.dart b/lib/features/backend/schema/structs/device_struct.dart index 102703cb..db8a8896 100644 --- a/lib/features/backend/schema/structs/device_struct.dart +++ b/lib/features/backend/schema/structs/device_struct.dart @@ -41,7 +41,8 @@ class DeviceStruct extends BaseStruct { description: data['description'] as String?, ); - static DeviceStruct? maybeFromMap(dynamic data) => data is Map ? DeviceStruct.fromMap(data.cast()) : null; + static DeviceStruct? maybeFromMap(dynamic data) => + data is Map ? DeviceStruct.fromMap(data.cast()) : null; Map toMap() => { 'devUUID': _devUUID, @@ -65,7 +66,8 @@ class DeviceStruct extends BaseStruct { ), }.withoutNulls; - static DeviceStruct fromSerializableMap(Map data) => DeviceStruct( + static DeviceStruct fromSerializableMap(Map data) => + DeviceStruct( devUUID: deserializeParam( data['devUUID'], ParamType.String, @@ -88,11 +90,15 @@ class DeviceStruct extends BaseStruct { @override bool operator ==(Object other) { - return other is DeviceStruct && devUUID == other.devUUID && version == other.version && description == other.description; + return other is DeviceStruct && + devUUID == other.devUUID && + version == other.version && + description == other.description; } @override - int get hashCode => const ListEquality().hash([devUUID, version, description]); + int get hashCode => + const ListEquality().hash([devUUID, version, description]); } DeviceStruct createDeviceStruct({ diff --git a/lib/features/backend/schema/util/schema_util.dart b/lib/features/backend/schema/util/schema_util.dart index e969983e..18cc5548 100644 --- a/lib/features/backend/schema/util/schema_util.dart +++ b/lib/features/backend/schema/util/schema_util.dart @@ -33,7 +33,10 @@ dynamic deserializeStructParam( if (paramValues is! Iterable) { return null; } - return paramValues.map((e) => deserializeStructParam(e, paramType, false, structBuilder: structBuilder)).toList(); + return paramValues + .map((e) => deserializeStructParam(e, paramType, false, + structBuilder: structBuilder)) + .toList(); } else if (param is Map) { return structBuilder(param); } else { @@ -50,9 +53,16 @@ List? getStructList( dynamic value, StructBuilder structBuilder, ) => - value is! List ? null : value.whereType>().map((e) => structBuilder(e)).toList(); + value is! List + ? null + : value + .whereType>() + .map((e) => structBuilder(e)) + .toList(); -List? getEnumList(dynamic value) => value is! List ? null : value.map((e) => deserializeEnum(e)).withoutNulls; +List? getEnumList(dynamic value) => value is! List + ? null + : value.map((e) => deserializeEnum(e)).withoutNulls; Color? getSchemaColor(dynamic value) => value is String ? fromCssColor(value) @@ -60,6 +70,8 @@ Color? getSchemaColor(dynamic value) => value is String ? value : null; -List? getColorsList(dynamic value) => value is! List ? null : value.map(getSchemaColor).withoutNulls; +List? getColorsList(dynamic value) => + value is! List ? null : value.map(getSchemaColor).withoutNulls; -List? getDataList(dynamic value) => value is! List ? null : value.map((e) => castToType(e)!).toList(); +List? getDataList(dynamic value) => + value is! List ? null : value.map((e) => castToType(e)!).toList(); diff --git a/lib/features/history/data/data_sources/local_data_sources/access_history_local_data_source.dart b/lib/features/history/data/data_sources/local_data_sources/access_history_local_data_source.dart index e69de29b..8b137891 100644 --- a/lib/features/history/data/data_sources/local_data_sources/access_history_local_data_source.dart +++ b/lib/features/history/data/data_sources/local_data_sources/access_history_local_data_source.dart @@ -0,0 +1 @@ + diff --git a/lib/features/history/data/data_sources/local_data_sources/provisional_history_local_data_source.dart b/lib/features/history/data/data_sources/local_data_sources/provisional_history_local_data_source.dart index e69de29b..8b137891 100644 --- a/lib/features/history/data/data_sources/local_data_sources/provisional_history_local_data_source.dart +++ b/lib/features/history/data/data_sources/local_data_sources/provisional_history_local_data_source.dart @@ -0,0 +1 @@ + diff --git a/lib/features/history/data/data_sources/remote_data_sources/access_history_remote_data_source.dart b/lib/features/history/data/data_sources/remote_data_sources/access_history_remote_data_source.dart index e69de29b..8b137891 100644 --- a/lib/features/history/data/data_sources/remote_data_sources/access_history_remote_data_source.dart +++ b/lib/features/history/data/data_sources/remote_data_sources/access_history_remote_data_source.dart @@ -0,0 +1 @@ + diff --git a/lib/features/history/data/data_sources/remote_data_sources/provisional_history_remote_data_source.dart b/lib/features/history/data/data_sources/remote_data_sources/provisional_history_remote_data_source.dart index e69de29b..8b137891 100644 --- a/lib/features/history/data/data_sources/remote_data_sources/provisional_history_remote_data_source.dart +++ b/lib/features/history/data/data_sources/remote_data_sources/provisional_history_remote_data_source.dart @@ -0,0 +1 @@ + diff --git a/lib/features/history/data/models/index.dart b/lib/features/history/data/models/index.dart index e69de29b..8b137891 100644 --- a/lib/features/history/data/models/index.dart +++ b/lib/features/history/data/models/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/history/data/repositories/access_history_repository_impl.dart b/lib/features/history/data/repositories/access_history_repository_impl.dart index e69de29b..8b137891 100644 --- a/lib/features/history/data/repositories/access_history_repository_impl.dart +++ b/lib/features/history/data/repositories/access_history_repository_impl.dart @@ -0,0 +1 @@ + diff --git a/lib/features/history/data/repositories/provisional_history_repository_impl.dart b/lib/features/history/data/repositories/provisional_history_repository_impl.dart index e69de29b..8b137891 100644 --- a/lib/features/history/data/repositories/provisional_history_repository_impl.dart +++ b/lib/features/history/data/repositories/provisional_history_repository_impl.dart @@ -0,0 +1 @@ + diff --git a/lib/features/history/domain/entities/index.dart b/lib/features/history/domain/entities/index.dart index e69de29b..8b137891 100644 --- a/lib/features/history/domain/entities/index.dart +++ b/lib/features/history/domain/entities/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/history/domain/respositories/history_repository.dart b/lib/features/history/domain/respositories/history_repository.dart index e69de29b..8b137891 100644 --- a/lib/features/history/domain/respositories/history_repository.dart +++ b/lib/features/history/domain/respositories/history_repository.dart @@ -0,0 +1 @@ + diff --git a/lib/features/history/domain/usecases/index.dart b/lib/features/history/domain/usecases/index.dart index e69de29b..8b137891 100644 --- a/lib/features/history/domain/usecases/index.dart +++ b/lib/features/history/domain/usecases/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/history/presentation/blocs/access_history_bloc.dart b/lib/features/history/presentation/blocs/access_history_bloc.dart index 61c1b9c4..9e5bd113 100644 --- a/lib/features/history/presentation/blocs/access_history_bloc.dart +++ b/lib/features/history/presentation/blocs/access_history_bloc.dart @@ -23,7 +23,8 @@ class AcessHistoryPageModel extends FlutterFlowModel { requestFn: requestFn, ); void clearAccessHistoryCache() => _accessHistoryManager.clear(); - void clearAccessHistoryCacheKey(String? uniqueKey) => _accessHistoryManager.clearRequest(uniqueKey); + void clearAccessHistoryCacheKey(String? uniqueKey) => + _accessHistoryManager.clearRequest(uniqueKey); @override void initState(BuildContext context) { @@ -32,8 +33,10 @@ class AcessHistoryPageModel extends FlutterFlowModel { Future initDatabase() async { devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } @override diff --git a/lib/features/history/presentation/blocs/provisional_history_bloc.dart b/lib/features/history/presentation/blocs/provisional_history_bloc.dart index 8dfd7315..3c6b0d9e 100644 --- a/lib/features/history/presentation/blocs/provisional_history_bloc.dart +++ b/lib/features/history/presentation/blocs/provisional_history_bloc.dart @@ -33,8 +33,11 @@ class ProvisionalHistoryStateBloc { } } -class ProvisionalHistoryBloc extends Bloc { - ProvisionalHistoryBloc() : super(ProvisionalHistoryStateBloc(devUUID: '', userUUID: '', cliUUID: '')) { +class ProvisionalHistoryBloc + extends Bloc { + ProvisionalHistoryBloc() + : super(ProvisionalHistoryStateBloc( + devUUID: '', userUUID: '', cliUUID: '')) { on(_onLoadProvisionalHistory); } @@ -43,9 +46,16 @@ class ProvisionalHistoryBloc extends Bloc emit, ) async { emit(state.copyWith(isLoading: true)); - final devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; - emit(state.copyWith(devUUID: devUUID, userUUID: userUUID, cliUUID: cliUUID, isLoading: false)); + final devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + emit(state.copyWith( + devUUID: devUUID, + userUUID: userUUID, + cliUUID: cliUUID, + isLoading: false)); } } diff --git a/lib/features/history/presentation/pages/acess_history_page_widget.dart b/lib/features/history/presentation/pages/acess_history_page_widget.dart index 4c11f7f7..b97d5450 100644 --- a/lib/features/history/presentation/pages/acess_history_page_widget.dart +++ b/lib/features/history/presentation/pages/acess_history_page_widget.dart @@ -41,7 +41,8 @@ class _AccessHistoryState extends State { late Future _accessFuture; List _accessWrap = []; - _AccessHistoryState(Map opt) : selectedTypeSubject = BehaviorSubject.seeded(opt) { + _AccessHistoryState(Map opt) + : selectedTypeSubject = BehaviorSubject.seeded(opt) { selectedTypeSubject.listen((value) {}); } @@ -53,7 +54,8 @@ class _AccessHistoryState extends State { _scrollController = ScrollController() ..addListener(() { - if (_scrollController.position.atEdge && _scrollController.position.pixels != 0) { + if (_scrollController.position.atEdge && + _scrollController.position.pixels != 0) { _loadMoreAccess(); } }); @@ -113,7 +115,8 @@ class _AccessHistoryState extends State { color: theme.primaryText, fontSize: 16.0, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(theme.headlineMediumFamily), + useGoogleFonts: + GoogleFonts.asMap().containsKey(theme.headlineMediumFamily), ), ); } @@ -127,37 +130,40 @@ class _AccessHistoryState extends State { child: IconButton( icon: const Icon(Icons.filter_list), onPressed: () async { - final Map? selectedFilter = await showModalBottomSheet>( - isScrollControlled: true, - backgroundColor: Colors.transparent, - context: context, - builder: (context) { - return GestureDetector( - onTap: () => Navigator.of(context).pop(), - child: Container( - color: Colors.transparent, - child: GestureDetector( - onTap: () {}, - child: FilterWidget( - defaultSelections: selectedTypeSubject.value, - filterOptions: { - 'personType': [ - { - 'title': FFLocalizations.of(context).getText('zok7lu4w'), - 'value': 'E', + final Map? selectedFilter = + await showModalBottomSheet>( + isScrollControlled: true, + backgroundColor: Colors.transparent, + context: context, + builder: (context) { + return GestureDetector( + onTap: () => Navigator.of(context).pop(), + child: Container( + color: Colors.transparent, + child: GestureDetector( + onTap: () {}, + child: FilterWidget( + defaultSelections: selectedTypeSubject.value, + filterOptions: { + 'personType': [ + { + 'title': FFLocalizations.of(context) + .getText('zok7lu4w'), + 'value': 'E', + }, + { + 'title': FFLocalizations.of(context) + .getText('oonqk812'), + 'value': 'O', + }, + ], }, - { - 'title': FFLocalizations.of(context).getText('oonqk812'), - 'value': 'O', - }, - ], - }, - filterTitles: {'personType': ''}, + filterTitles: {'personType': ''}, + ), + ), ), - ), - ), - ); - }); + ); + }); if (selectedFilter != null) { _updateAccessHistoryAction(selectedFilter); @@ -200,7 +206,8 @@ class _AccessHistoryState extends State { final List accessHistory = response.jsonBody['acessos'] ?? []; List filteredAccess = accessHistory.where((item) { - final personTypeMatches = _personType == '.*' || item["PES_TIPO"].toString() == _personType; + final personTypeMatches = + _personType == '.*' || item["PES_TIPO"].toString() == _personType; return personTypeMatches; }).toList(); @@ -233,7 +240,8 @@ class _AccessHistoryState extends State { ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text( - FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."), + FFLocalizations.of(context).getVariableText( + ptText: "Não há mais dados.", enText: "No more data."), style: TextStyle( color: Colors.white, fontSize: LimitedFontSizeUtil.getBodyFontSize(context), @@ -257,7 +265,9 @@ class _AccessHistoryState extends State { children: [ Center( child: Text( - FFLocalizations.of(context).getVariableText(ptText: "Nenhum histórico encontrado!", enText: "No history found!"), + FFLocalizations.of(context).getVariableText( + ptText: "Nenhum histórico encontrado!", + enText: "No history found!"), )), ], ), @@ -297,7 +307,8 @@ class _AccessHistoryState extends State { return FutureBuilder( future: _accessFuture, builder: (context, snapshot) { - if (snapshot.connectionState == ConnectionState.waiting && _accessWrap.isEmpty) { + if (snapshot.connectionState == ConnectionState.waiting && + _accessWrap.isEmpty) { return Center( child: SizedBox( width: 50.0, @@ -310,7 +321,9 @@ class _AccessHistoryState extends State { ); } else if (snapshot.hasError) { return Center( - child: Text(FFLocalizations.of(context).getVariableText(ptText: "Falha ao efetuar operação!", enText: "Failed to perform operation!")), + child: Text(FFLocalizations.of(context).getVariableText( + ptText: "Falha ao efetuar operação!", + enText: "Failed to perform operation!")), ); } @@ -328,7 +341,8 @@ class _AccessHistoryState extends State { ); } - Widget _accessHistoryCardMoleculeWidget(BuildContext context, dynamic accessHistoryItem) { + Widget _accessHistoryCardMoleculeWidget( + BuildContext context, dynamic accessHistoryItem) { return CardItemTemplateComponentWidget( imagePath: 'https://freaccess.com.br/freaccess/getImage.php?cliID=${_model.cliUUID}&atividade=getFoto&Documento=${accessHistoryItem['PES_ID'] ?? ''}&tipo=${accessHistoryItem['PES_TIPO'] ?? ''}', diff --git a/lib/features/history/presentation/pages/provisional_history_page.dart b/lib/features/history/presentation/pages/provisional_history_page.dart index 02aca8be..b32b2798 100644 --- a/lib/features/history/presentation/pages/provisional_history_page.dart +++ b/lib/features/history/presentation/pages/provisional_history_page.dart @@ -20,7 +20,8 @@ import 'package:rxdart/rxdart.dart'; // ignore: must_be_immutable class ProvisionalHistoryPage extends StatefulWidget { Map opt; - ProvisionalHistoryPage({super.key, Map? opt}) : opt = opt ?? const {'AGP_STATUS': '.*'}; + ProvisionalHistoryPage({super.key, Map? opt}) + : opt = opt ?? const {'AGP_STATUS': '.*'}; @override State createState() => ProvisionalHistoryState(opt); } @@ -40,7 +41,8 @@ class ProvisionalHistoryState extends State { late Future future; List wrap = []; - ProvisionalHistoryState(Map opt) : selectedTypeSubject = BehaviorSubject.seeded(opt) { + ProvisionalHistoryState(Map opt) + : selectedTypeSubject = BehaviorSubject.seeded(opt) { selectedTypeSubject.listen((value) {}); } @@ -50,7 +52,8 @@ class ProvisionalHistoryState extends State { future = fetchHistoryService(); _scrollController = ScrollController() ..addListener(() { - if (_scrollController.position.atEdge && _scrollController.position.pixels != 0) { + if (_scrollController.position.atEdge && + _scrollController.position.pixels != 0) { _loadMore(); } }); @@ -112,7 +115,8 @@ class ProvisionalHistoryState extends State { color: theme.primaryText, fontSize: 16.0, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(theme.headlineMediumFamily), + useGoogleFonts: + GoogleFonts.asMap().containsKey(theme.headlineMediumFamily), ), ); } @@ -126,57 +130,62 @@ class ProvisionalHistoryState extends State { child: IconButton( icon: const Icon(Icons.filter_list), onPressed: () async { - final Map? selectedFilter = await showModalBottomSheet>( - isScrollControlled: true, - backgroundColor: Colors.transparent, - context: context, - builder: (context) { - return GestureDetector( - onTap: () => Navigator.of(context).pop(), - child: Container( - color: Colors.transparent, - child: GestureDetector( - onTap: () {}, - child: FilterWidget( - defaultSelections: selectedTypeSubject.value, - filterOptions: { - 'AGP_STATUS': [ - { - 'title': FFLocalizations.of(context).getVariableText( - ptText: 'Ativo', - enText: 'Active', - ), - 'value': 'AT', + final Map? selectedFilter = + await showModalBottomSheet>( + isScrollControlled: true, + backgroundColor: Colors.transparent, + context: context, + builder: (context) { + return GestureDetector( + onTap: () => Navigator.of(context).pop(), + child: Container( + color: Colors.transparent, + child: GestureDetector( + onTap: () {}, + child: FilterWidget( + defaultSelections: selectedTypeSubject.value, + filterOptions: { + 'AGP_STATUS': [ + { + 'title': FFLocalizations.of(context) + .getVariableText( + ptText: 'Ativo', + enText: 'Active', + ), + 'value': 'AT', + }, + { + 'title': FFLocalizations.of(context) + .getVariableText( + ptText: 'Convidado', + enText: 'Guest', + ), + 'value': 'CO', + }, + { + 'title': FFLocalizations.of(context) + .getVariableText( + ptText: 'Inativo', + enText: 'Inactive', + ), + 'value': 'IN', + }, + { + 'title': FFLocalizations.of(context) + .getVariableText( + ptText: 'Aguardando Aprovação', + enText: 'Awaiting Approval', + ), + 'value': 'AA', + }, + ], }, - { - 'title': FFLocalizations.of(context).getVariableText( - ptText: 'Convidado', - enText: 'Guest', - ), - 'value': 'CO', - }, - { - 'title': FFLocalizations.of(context).getVariableText( - ptText: 'Inativo', - enText: 'Inactive', - ), - 'value': 'IN', - }, - { - 'title': FFLocalizations.of(context).getVariableText( - ptText: 'Aguardando Aprovação', - enText: 'Awaiting Approval', - ), - 'value': 'AA', - }, - ], - }, - filterTitles: {'AGP_STATUS': ''}, + filterTitles: {'AGP_STATUS': ''}, + ), + ), ), - ), - ), - ); - }); + ); + }); if (selectedFilter != null) { _updateHistoryAction(selectedFilter); @@ -210,9 +219,11 @@ class ProvisionalHistoryState extends State { Future fetchHistoryService() async { try { setState(() => _loading = true); - var response = await PhpGroup.getProvSchedules(_pageNumber.toString(), status); + var response = + await PhpGroup.getProvSchedules(_pageNumber.toString(), status); - final List history = response.jsonBody['agendamento']['value'] ?? []; + final List history = + response.jsonBody['agendamento']['value'] ?? []; if (history.isNotEmpty) { setState(() { @@ -251,7 +262,9 @@ class ProvisionalHistoryState extends State { children: [ Center( child: Text( - FFLocalizations.of(context).getVariableText(ptText: "Nenhum histórico encontrado!", enText: "No history found!"), + FFLocalizations.of(context).getVariableText( + ptText: "Nenhum histórico encontrado!", + enText: "No history found!"), )), ], ), @@ -291,7 +304,8 @@ class ProvisionalHistoryState extends State { return FutureBuilder( future: future, builder: (context, snapshot) { - if (snapshot.connectionState == ConnectionState.waiting && wrap.isEmpty) { + if (snapshot.connectionState == ConnectionState.waiting && + wrap.isEmpty) { return Center( child: SizedBox( width: 50.0, @@ -304,7 +318,9 @@ class ProvisionalHistoryState extends State { ); } else if (snapshot.hasError) { return Center( - child: Text(FFLocalizations.of(context).getVariableText(ptText: "Falha ao efetuar operação!", enText: "Failed to perform operation!")), + child: Text(FFLocalizations.of(context).getVariableText( + ptText: "Falha ao efetuar operação!", + enText: "Failed to perform operation!")), ); } @@ -338,7 +354,8 @@ class ProvisionalHistoryState extends State { ); } - Map _buildLabelsHashMap(BuildContext context, dynamic historyItem) { + Map _buildLabelsHashMap( + BuildContext context, dynamic historyItem) { return { FFLocalizations.of(context).getVariableText( ptText: 'Nome:', @@ -370,7 +387,8 @@ class ProvisionalHistoryState extends State { return "${dateTime.day.toString().padLeft(2, '0')}/${dateTime.month.toString().padLeft(2, '0')}/${dateTime.year} ${dateTime.hour.toString().padLeft(2, '0')}:${dateTime.minute.toString().padLeft(2, '0')}"; } - List> _buildStatusHashMap(BuildContext context, dynamic historyItem) { + List> _buildStatusHashMap( + BuildContext context, dynamic historyItem) { return [ { FFLocalizations.of(context).getVariableText( diff --git a/lib/features/history/presentation/widgets/access_filter_modal.dart b/lib/features/history/presentation/widgets/access_filter_modal.dart index 85a5ecbb..1346fe8b 100644 --- a/lib/features/history/presentation/widgets/access_filter_modal.dart +++ b/lib/features/history/presentation/widgets/access_filter_modal.dart @@ -20,7 +20,8 @@ class AccessFilterModel extends FlutterFlowModel { // State field(s) for CheckboxGroup widget. FormFieldController>? checkboxGroupValueController; List? get checkboxGroupValues => checkboxGroupValueController?.value; - set checkboxGroupValues(List? v) => checkboxGroupValueController?.value = v; + set checkboxGroupValues(List? v) => + checkboxGroupValueController?.value = v; @override void initState(BuildContext context) {} @@ -71,8 +72,12 @@ class _AccessFilterState extends State { _model.textFieldFocusNode ??= FocusNode(); selected = { - 'personType': widget.defaultPersonType == '.*' ? ['E', 'O'] : [widget.defaultPersonType], - 'accessType': widget.defaultAccessType == '.*' ? ['0', '1'] : [widget.defaultAccessType], + 'personType': widget.defaultPersonType == '.*' + ? ['E', 'O'] + : [widget.defaultPersonType], + 'accessType': widget.defaultAccessType == '.*' + ? ['0', '1'] + : [widget.defaultAccessType], 'search': '.*', }; } @@ -81,7 +86,9 @@ class _AccessFilterState extends State { Map filterResult = { 'personType': '', 'accessType': '', - 'search': _model.textController?.text == '' ? '.*' : _model.textController!.text.toLowerCase(), + 'search': _model.textController?.text == '' + ? '.*' + : _model.textController!.text.toLowerCase(), }; if (selected['personType']!.isEmpty) { @@ -104,7 +111,8 @@ class _AccessFilterState extends State { context.pop(filterResult); } - Widget _buildCheckboxListTile(String key, List> options, double fontsize) { + Widget _buildCheckboxListTile( + String key, List> options, double fontsize) { double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context); return Column( children: [ @@ -121,7 +129,8 @@ class _AccessFilterState extends State { fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, fontSize: limitedInputFontSize, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), color: FlutterFlowTheme.of(context).primaryText, ), ), @@ -141,7 +150,8 @@ class _AccessFilterState extends State { fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, fontSize: limitedInputFontSize, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), color: FlutterFlowTheme.of(context).primaryText, ), ), @@ -168,7 +178,8 @@ class _AccessFilterState extends State { width: 5, color: FlutterFlowTheme.of(context).secondaryText, ), - controlAffinity: ListTileControlAffinity.leading, // Adiciona esta linha + controlAffinity: + ListTileControlAffinity.leading, // Adiciona esta linha ); }, ), @@ -211,16 +222,24 @@ class _AccessFilterState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ Padding( - padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 10.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 10.0, 10.0, 0.0, 10.0), child: Text( - FFLocalizations.of(context).getText('yfj9pd6k'), // Filtros - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, + FFLocalizations.of(context) + .getText('yfj9pd6k'), // Filtros + style: FlutterFlowTheme.of(context) + .headlineMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .headlineMediumFamily, color: FlutterFlowTheme.of(context).primaryText, - fontSize: LimitedFontSizeUtil.getHeaderFontSize(context), + fontSize: + LimitedFontSizeUtil.getHeaderFontSize(context), letterSpacing: 0.0, fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .headlineMediumFamily), ), ), ), @@ -233,7 +252,8 @@ class _AccessFilterState extends State { child: Column( mainAxisSize: MainAxisSize.min, children: [ - _buildCheckboxListTile('personType', personTypeOptions, 14), + _buildCheckboxListTile( + 'personType', personTypeOptions, 14), ], ), ), @@ -247,12 +267,15 @@ class _AccessFilterState extends State { ), child: Text(FFLocalizations.of(context).getText('88kshkph'), style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, color: FlutterFlowTheme.of(context).info, - fontSize: LimitedFontSizeUtil.getInputFontSize(context), + fontSize: + LimitedFontSizeUtil.getInputFontSize(context), letterSpacing: 0.0, fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), )), ), ], diff --git a/lib/features/history/presentation/widgets/provisional_filter_modal.dart b/lib/features/history/presentation/widgets/provisional_filter_modal.dart index c06612ab..44d0f538 100644 --- a/lib/features/history/presentation/widgets/provisional_filter_modal.dart +++ b/lib/features/history/presentation/widgets/provisional_filter_modal.dart @@ -17,7 +17,8 @@ class FilterModel extends FlutterFlowModel { bool? checkboxValue2; FormFieldController>? checkboxGroupValueController; List? get checkboxGroupValues => checkboxGroupValueController?.value; - set checkboxGroupValues(List? v) => checkboxGroupValueController?.value = v; + set checkboxGroupValues(List? v) => + checkboxGroupValueController?.value = v; @override void initState(BuildContext context) {} @@ -69,11 +70,15 @@ class _FilterWidgetState extends State { void _applyFilter() { Map filterResult = { - 'search': _model.textController?.text == '' ? '.*' : _model.textController!.text.toLowerCase(), + 'search': _model.textController?.text == '' + ? '.*' + : _model.textController!.text.toLowerCase(), }; widget.filterOptions.forEach((key, options) { - filterResult[key] = selected[key]!.isEmpty || selected[key]!.length < 1 ? '.*' : selected[key]!; + filterResult[key] = selected[key]!.isEmpty || selected[key]!.length < 1 + ? '.*' + : selected[key]!; }); setState(() { // Update the state with the new filter result @@ -82,7 +87,8 @@ class _FilterWidgetState extends State { context.pop(filterResult); } - Widget _buildCheckboxListTile(String key, List> options, double fontsize) { + Widget _buildCheckboxListTile( + String key, List> options, double fontsize) { double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context); return Column( children: [ @@ -99,7 +105,8 @@ class _FilterWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, fontSize: limitedInputFontSize, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), color: FlutterFlowTheme.of(context).primaryText, ), ), @@ -119,7 +126,8 @@ class _FilterWidgetState extends State { fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, fontSize: limitedInputFontSize, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), color: FlutterFlowTheme.of(context).primaryText, ), ), @@ -175,19 +183,26 @@ class _FilterWidgetState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ Padding( - padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 10.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 10.0, 10.0, 0.0, 10.0), child: Text( FFLocalizations.of(context).getVariableText( ptText: 'Filtros', enText: 'Filters', ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, + style: FlutterFlowTheme.of(context) + .headlineMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .headlineMediumFamily, color: FlutterFlowTheme.of(context).primaryText, - fontSize: LimitedFontSizeUtil.getHeaderFontSize(context), + fontSize: + LimitedFontSizeUtil.getHeaderFontSize(context), letterSpacing: 0.0, fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .headlineMediumFamily), ), ), ), @@ -200,7 +215,8 @@ class _FilterWidgetState extends State { child: Column( mainAxisSize: MainAxisSize.min, children: widget.filterOptions.keys.map((key) { - return _buildCheckboxListTile(key, widget.filterOptions[key]!, 14); + return _buildCheckboxListTile( + key, widget.filterOptions[key]!, 14); }).toList(), ), ), @@ -218,12 +234,15 @@ class _FilterWidgetState extends State { enText: 'Apply', ), style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, color: FlutterFlowTheme.of(context).info, - fontSize: LimitedFontSizeUtil.getInputFontSize(context), + fontSize: + LimitedFontSizeUtil.getInputFontSize(context), letterSpacing: 0.0, fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), )), ), ], diff --git a/lib/features/home/data/data_sources/index.dart b/lib/features/home/data/data_sources/index.dart index e69de29b..8b137891 100644 --- a/lib/features/home/data/data_sources/index.dart +++ b/lib/features/home/data/data_sources/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/home/data/models/index.dart b/lib/features/home/data/models/index.dart index e69de29b..8b137891 100644 --- a/lib/features/home/data/models/index.dart +++ b/lib/features/home/data/models/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/home/data/repositories/index.dart b/lib/features/home/data/repositories/index.dart index e69de29b..8b137891 100644 --- a/lib/features/home/data/repositories/index.dart +++ b/lib/features/home/data/repositories/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/home/domain/entities/index.dart b/lib/features/home/domain/entities/index.dart index e69de29b..8b137891 100644 --- a/lib/features/home/domain/entities/index.dart +++ b/lib/features/home/domain/entities/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/home/domain/respositories/index.dart b/lib/features/home/domain/respositories/index.dart index e69de29b..8b137891 100644 --- a/lib/features/home/domain/respositories/index.dart +++ b/lib/features/home/domain/respositories/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/home/domain/usecases/index.dart b/lib/features/home/domain/usecases/index.dart index e69de29b..8b137891 100644 --- a/lib/features/home/domain/usecases/index.dart +++ b/lib/features/home/domain/usecases/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/home/presentation/blocs/home_bloc.dart b/lib/features/home/presentation/blocs/home_bloc.dart index 3eb2219b..32efb9ab 100644 --- a/lib/features/home/presentation/blocs/home_bloc.dart +++ b/lib/features/home/presentation/blocs/home_bloc.dart @@ -17,11 +17,16 @@ class HomeBloc extends Bloc { } Future _onHomeEvent(HomeEvent event, Emitter emit) async { - final devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; - final userName = (await StorageHelper().get(ProfileStorageKey.userName.key)) ?? ''; - final userEmail = (await StorageHelper().get(SecureStorageKey.email.value)) ?? ''; + final devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final userName = + (await StorageHelper().get(ProfileStorageKey.userName.key)) ?? ''; + final userEmail = + (await StorageHelper().get(SecureStorageKey.email.value)) ?? ''; emit(state.copyWith( devUUID: devUUID, diff --git a/lib/features/home/presentation/pages/about_system.dart b/lib/features/home/presentation/pages/about_system.dart index a9d0ddb6..26fb1b72 100644 --- a/lib/features/home/presentation/pages/about_system.dart +++ b/lib/features/home/presentation/pages/about_system.dart @@ -54,7 +54,8 @@ class _AboutSystemPageState extends State { ); } - PreferredSizeWidget _buildAppBar(BuildContext context, FlutterFlowTheme theme) { + PreferredSizeWidget _buildAppBar( + BuildContext context, FlutterFlowTheme theme) { return AppBar( backgroundColor: theme.primaryBackground, automaticallyImplyLeading: false, @@ -91,7 +92,8 @@ class _AboutSystemPageState extends State { color: theme.primaryText, fontSize: 16.0, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(theme.headlineMediumFamily), + useGoogleFonts: + GoogleFonts.asMap().containsKey(theme.headlineMediumFamily), ), ); } @@ -148,7 +150,8 @@ class _AboutSystemPageState extends State { color: theme.primaryText, fontSize: 16.0, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(theme.headlineMediumFamily), + useGoogleFonts: + GoogleFonts.asMap().containsKey(theme.headlineMediumFamily), ), ); } diff --git a/lib/features/home/presentation/pages/home_page.dart b/lib/features/home/presentation/pages/home_page.dart index a4e20486..b11c8bdd 100644 --- a/lib/features/home/presentation/pages/home_page.dart +++ b/lib/features/home/presentation/pages/home_page.dart @@ -17,7 +17,8 @@ class HomePageWidget extends StatefulWidget { State createState() => _HomePageWidgetState(); } -class _HomePageWidgetState extends State with WidgetsBindingObserver { +class _HomePageWidgetState extends State + with WidgetsBindingObserver { final scaffoldKey = GlobalKey(); @override @@ -97,7 +98,8 @@ class _HomePageWidgetState extends State with WidgetsBindingObse fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, color: FlutterFlowTheme.of(context).info, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), ), ), ].divide(const SizedBox(width: 8.0)), diff --git a/lib/features/home/presentation/widgets/drawer_widget.dart b/lib/features/home/presentation/widgets/drawer_widget.dart index 1a0ac823..9e681c10 100644 --- a/lib/features/home/presentation/widgets/drawer_widget.dart +++ b/lib/features/home/presentation/widgets/drawer_widget.dart @@ -28,7 +28,8 @@ class DrawerWidget extends StatelessWidget { } else if (!snapshot.hasData || snapshot.data! == false) { return Center( child: Padding( - padding: EdgeInsets.only(top: MediaQuery.of(context).size.height / 10), + padding: + EdgeInsets.only(top: MediaQuery.of(context).size.height / 10), child: CircularProgressIndicator( backgroundColor: FlutterFlowTheme.of(context).primaryBackground, color: FlutterFlowTheme.of(context).primary, @@ -93,9 +94,11 @@ class DrawerWidget extends StatelessWidget { height: 80.0, fit: BoxFit.cover, alignment: Alignment.center, - placeholder: (context, url) => Image.asset('assets/images/person.jpg'), + placeholder: (context, url) => + Image.asset('assets/images/person.jpg'), errorListener: (_) => Image.asset('assets/images/person.jpg'), - errorWidget: (_, __, ___) => Image.asset('assets/images/person.jpg'), + errorWidget: (_, __, ___) => + Image.asset('assets/images/person.jpg'), ), ), ), @@ -142,7 +145,8 @@ class DrawerWidget extends StatelessWidget { return Padding( padding: const EdgeInsets.symmetric(vertical: 10.0), child: TextFormField( - controller: TextEditingController(), // Replace with appropriate controller + controller: + TextEditingController(), // Replace with appropriate controller focusNode: FocusNode(), // Replace with appropriate focus node autofocus: false, obscureText: false, diff --git a/lib/features/home/presentation/widgets/index.dart b/lib/features/home/presentation/widgets/index.dart index e69de29b..8b137891 100644 --- a/lib/features/home/presentation/widgets/index.dart +++ b/lib/features/home/presentation/widgets/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/locals/data/data_sources/locals_remote_data_source.dart b/lib/features/locals/data/data_sources/locals_remote_data_source.dart index 7ccea96d..3b656e62 100644 --- a/lib/features/locals/data/data_sources/locals_remote_data_source.dart +++ b/lib/features/locals/data/data_sources/locals_remote_data_source.dart @@ -24,7 +24,8 @@ abstract class LocalsRemoteDataSource { } class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { - static final LocalsRemoteDataSourceImpl _instance = LocalsRemoteDataSourceImpl._internal(); + static final LocalsRemoteDataSourceImpl _instance = + LocalsRemoteDataSourceImpl._internal(); factory LocalsRemoteDataSourceImpl() => _instance; LocalsRemoteDataSourceImpl._internal(); @@ -50,7 +51,8 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { final List locals = response.jsonBody['locais'] ?? []; final bool isEmpty = locals.isEmpty; - final bool isActive = locals.where((local) => local['CLU_STATUS'] != 'B').isNotEmpty; + final bool isActive = + locals.where((local) => local['CLU_STATUS'] != 'B').isNotEmpty; final bool isEnable = !isEmpty && isActive; if (isEnable) { @@ -95,7 +97,8 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { final bool isInactived = await LocalUtil.isInactived(locals); final bool isPending = LocalUtil.isPending(locals); final bool isUnique = locals.length == 1; - final bool isBlocked = locals.where((local) => local['CLU_STATUS'] == 'B').isNotEmpty; + final bool isBlocked = + locals.where((local) => local['CLU_STATUS'] == 'B').isNotEmpty; final bool isEnabled = isUnique && isActive; final bool isDisabled = isUnique && isBlocked; final bool isUnselected = await LocalUtil.isUnselected(); @@ -142,8 +145,10 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { @override Future checkLocals(BuildContext context) async { - String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; - String cliName = (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + String cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + String cliName = + (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; return cliUUID.isEmpty && cliName.isEmpty; } @@ -167,7 +172,8 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { if (isError == true) { final GetLocalsCall callback = PhpGroup.getLocalsCall; response = await callback.call(); - final String errorMsg = response.jsonBody['error_msg'] ?? 'Local indisponível'; + final String errorMsg = + response.jsonBody['error_msg'] ?? 'Local indisponível'; // await DialogUtil.error(context, errorMsg).whenComplete(() async => await selectLocal(context, response)); return false; } else { @@ -186,7 +192,8 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { } @override - Future selectLocal(BuildContext context, ApiCallResponse? response) async { + Future selectLocal( + BuildContext context, ApiCallResponse? response) async { return await showModalBottomSheet( isScrollControlled: true, backgroundColor: Colors.transparent, @@ -220,7 +227,8 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { await StorageHelper().set(ProfileStorageKey.ownerName.key, ''); await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); context.pop(); - context.go('/homePage', extra: {'update': LocalsRepositoryImpl().update}); + context.go('/homePage', + extra: {'update': LocalsRepositoryImpl().update}); SnackBarUtil.showSnackBar(context, content); } }).catchError((err, stack) { diff --git a/lib/features/locals/data/models/index.dart b/lib/features/locals/data/models/index.dart index e69de29b..8b137891 100644 --- a/lib/features/locals/data/models/index.dart +++ b/lib/features/locals/data/models/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/locals/data/repositories/locals_repository_impl.dart b/lib/features/locals/data/repositories/locals_repository_impl.dart index 74d8fb55..5957c051 100644 --- a/lib/features/locals/data/repositories/locals_repository_impl.dart +++ b/lib/features/locals/data/repositories/locals_repository_impl.dart @@ -37,8 +37,10 @@ class LocalsRepositoryImpl implements LocalsRepository { } Future check(BuildContext context) async { - final String? cliUUID = await StorageHelper().get(ProfileStorageKey.clientUUID.key); - final String? ownerUUID = await StorageHelper().get(ProfileStorageKey.ownerUUID.key); + final String? cliUUID = + await StorageHelper().get(ProfileStorageKey.clientUUID.key); + final String? ownerUUID = + await StorageHelper().get(ProfileStorageKey.ownerUUID.key); final bool haveCli = cliUUID != null && cliUUID.isNotEmpty; final bool haveOwner = ownerUUID != null && ownerUUID.isNotEmpty; if (!haveCli && !haveOwner) { diff --git a/lib/features/locals/domain/entities/index.dart b/lib/features/locals/domain/entities/index.dart index e69de29b..8b137891 100644 --- a/lib/features/locals/domain/entities/index.dart +++ b/lib/features/locals/domain/entities/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/locals/domain/usecases/index.dart b/lib/features/locals/domain/usecases/index.dart index e69de29b..8b137891 100644 --- a/lib/features/locals/domain/usecases/index.dart +++ b/lib/features/locals/domain/usecases/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/locals/index.dart b/lib/features/locals/index.dart index c6e39062..804475c2 100644 --- a/lib/features/locals/index.dart +++ b/lib/features/locals/index.dart @@ -1,4 +1,4 @@ export 'data/index.dart'; export 'domain/index.dart'; export 'presentation/index.dart'; -export 'utils/index.dart'; \ No newline at end of file +export 'utils/index.dart'; diff --git a/lib/features/locals/presentation/blocs/local_profile_bloc.dart b/lib/features/locals/presentation/blocs/local_profile_bloc.dart index 69201d30..60b9b720 100644 --- a/lib/features/locals/presentation/blocs/local_profile_bloc.dart +++ b/lib/features/locals/presentation/blocs/local_profile_bloc.dart @@ -15,9 +15,11 @@ class LocalProfileState { final String cliUUID; final String ownerName; - LocalProfileState({this.cliName = '', this.cliUUID = '', this.ownerName = ''}); + LocalProfileState( + {this.cliName = '', this.cliUUID = '', this.ownerName = ''}); - LocalProfileState copyWith({String? cliName, String? ownerName, String? cliUUID}) { + LocalProfileState copyWith( + {String? cliName, String? ownerName, String? cliUUID}) { return LocalProfileState( cliName: cliName ?? this.cliName, ownerName: ownerName ?? this.ownerName, @@ -36,11 +38,16 @@ class LocalProfileBloc extends Bloc { }); } - Future _onLocalProfileEvent(LocalProfileEvent event, Emitter emit) async { - final cliName = (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; - final ownerName = (await StorageHelper().get(ProfileStorageKey.ownerName.key)) ?? ''; - final cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; - emit(state.copyWith(cliName: cliName, cliUUID: cliUUID, ownerName: ownerName)); + Future _onLocalProfileEvent( + LocalProfileEvent event, Emitter emit) async { + final cliName = + (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + final ownerName = + (await StorageHelper().get(ProfileStorageKey.ownerName.key)) ?? ''; + final cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + emit(state.copyWith( + cliName: cliName, cliUUID: cliUUID, ownerName: ownerName)); } // void updateProfile(BuildContext context) { @@ -51,7 +58,8 @@ class LocalProfileBloc extends Bloc { // } } -class LocalProfileComponentModel extends FlutterFlowModel { +class LocalProfileComponentModel + extends FlutterFlowModel { String cliName = ''; String cliUUID = ''; String ownerName = ''; @@ -63,9 +71,12 @@ class LocalProfileComponentModel extends FlutterFlowModel getData() async { - cliName = (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; - ownerName = (await StorageHelper().get(ProfileStorageKey.ownerName.key)) ?? ''; - cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + cliName = + (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + ownerName = + (await StorageHelper().get(ProfileStorageKey.ownerName.key)) ?? ''; + cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; setStateCallback?.call(); } diff --git a/lib/features/locals/presentation/widgets/index.dart b/lib/features/locals/presentation/widgets/index.dart index e0361f45..2b0fd4c4 100644 --- a/lib/features/locals/presentation/widgets/index.dart +++ b/lib/features/locals/presentation/widgets/index.dart @@ -1 +1 @@ -export 'local_profile/index.dart'; \ No newline at end of file +export 'local_profile/index.dart'; diff --git a/lib/features/locals/presentation/widgets/local_profile/local_profile_widget.dart b/lib/features/locals/presentation/widgets/local_profile/local_profile_widget.dart index cf343964..e3db9435 100644 --- a/lib/features/locals/presentation/widgets/local_profile/local_profile_widget.dart +++ b/lib/features/locals/presentation/widgets/local_profile/local_profile_widget.dart @@ -12,10 +12,12 @@ class LocalProfileComponentWidget extends StatefulWidget { const LocalProfileComponentWidget({super.key}); @override - State createState() => _LocalProfileComponentWidgetState(); + State createState() => + _LocalProfileComponentWidgetState(); } -class _LocalProfileComponentWidgetState extends State { +class _LocalProfileComponentWidgetState + extends State { bool _isLoading = false; Future retrieveProfileInfo() async { @@ -36,7 +38,8 @@ class _LocalProfileComponentWidgetState extends State 20 ? 12 : scaledFontSize; + final double limitedFontSize = + scaledFontSize > 20 ? 12 : scaledFontSize; if (snapshot.connectionState == ConnectionState.waiting) { return const Center(child: CircularProgressIndicator()); } else if (snapshot.hasError) { @@ -58,7 +61,8 @@ class _LocalProfileComponentWidgetState extends State Image.asset('assets/images/home.png'), - errorListener: (_) => Image.asset('assets/images/home.png'), - errorWidget: (_, __, ___) => Image.asset('assets/images/home.png'), + placeholder: (context, url) => + Image.asset('assets/images/home.png'), + errorListener: (_) => + Image.asset('assets/images/home.png'), + errorWidget: (_, __, ___) => + Image.asset('assets/images/home.png'), ), )), ), @@ -130,12 +137,16 @@ class _LocalProfileComponentWidgetState extends State Image.asset('assets/images/home.png'), - errorListener: (_) => Image.asset('assets/images/home.png'), - errorWidget: (_, __, ___) => Image.asset('assets/images/home.png'), + placeholder: (context, url) => + Image.asset('assets/images/home.png'), + errorListener: (_) => + Image.asset('assets/images/home.png'), + errorWidget: (_, __, ___) => + Image.asset('assets/images/home.png'), ), )), ), @@ -219,36 +236,50 @@ class _LocalProfileComponentWidgetState extends State(' ' + state.ownerName, ''), + message: + valueOrDefault(' ' + state.ownerName, ''), child: Text( - valueOrDefault(state.ownerName.length > 30 ? '${state.ownerName.substring(0, 20)}...' : state.ownerName, ''), + valueOrDefault( + state.ownerName.length > 30 + ? '${state.ownerName.substring(0, 20)}...' + : state.ownerName, + ''), overflow: TextOverflow.ellipsis, maxLines: 1, - style: FlutterFlowTheme.of(context).labelMedium.override( + style: FlutterFlowTheme.of(context) + .labelMedium + .override( fontFamily: 'Nunito', color: FlutterFlowTheme.of(context).info, fontSize: limitedFontSize, letterSpacing: 0.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), + useGoogleFonts: + GoogleFonts.asMap().containsKey('Nunito'), ), ), ), ], ), ), - ].divide(const SizedBox(width: 20.0)).addToStart(const SizedBox(width: 20.0)).addToEnd(const SizedBox(width: 20.0)), + ] + .divide(const SizedBox(width: 20.0)) + .addToStart(const SizedBox(width: 20.0)) + .addToEnd(const SizedBox(width: 20.0)), ), ), ), diff --git a/lib/features/locals/utils/local_util.dart b/lib/features/locals/utils/local_util.dart index 45438432..0aa0cb85 100644 --- a/lib/features/locals/utils/local_util.dart +++ b/lib/features/locals/utils/local_util.dart @@ -11,10 +11,13 @@ import 'package:hub/shared/utils/log_util.dart'; class LocalUtil { static void handleError(BuildContext context, String errorMsg) async { - final String devUUID = await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? ''; - final String userUUID = await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? ''; + final String devUUID = + await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? ''; + final String userUUID = + await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? ''; final bool isAuthenticated = userUUID.isNotEmpty && devUUID.isNotEmpty; - final bool isDevLinked = !errorMsg.contains('Esse dispositivo nao pertence a esse usuario'); + final bool isDevLinked = + !errorMsg.contains('Esse dispositivo nao pertence a esse usuario'); log('() => isLinked: $errorMsg'); if (!isAuthenticated) { errorMsg = FFLocalizations.of(context).getVariableText( @@ -36,13 +39,18 @@ class LocalUtil { // await DialogUtil.error(context, errorMsg).whenComplete(() async => await LocalsRemoteDataSourceImpl().selectLocal(context, null)); } - static Future handleUnavailable(BuildContext context, List locals) async { + static Future handleUnavailable( + BuildContext context, List locals) async { log('() => isUnavailable'); try { - await StorageHelper().set(ProfileStorageKey.clientUUID.key, locals[0]['CLI_ID']); - await StorageHelper().set(ProfileStorageKey.ownerUUID.key, locals[0]['CLU_OWNER_ID']); - await StorageHelper().set(ProfileStorageKey.clientName.key, locals[0]['CLI_NOME']); - await StorageHelper().set(ProfileStorageKey.ownerName.key, locals[0]['CLU_OWNER_DSC']); + await StorageHelper() + .set(ProfileStorageKey.clientUUID.key, locals[0]['CLI_ID']); + await StorageHelper() + .set(ProfileStorageKey.ownerUUID.key, locals[0]['CLU_OWNER_ID']); + await StorageHelper() + .set(ProfileStorageKey.clientName.key, locals[0]['CLI_NOME']); + await StorageHelper() + .set(ProfileStorageKey.ownerName.key, locals[0]['CLU_OWNER_DSC']); var response = await PhpGroup.resopndeVinculo.call(tarefa: 'A'); if (response.jsonBody['error'] == true) { @@ -53,10 +61,14 @@ class LocalUtil { return false; } - if (response.jsonBody['error'] == false) return await LocalsRemoteDataSourceImpl().processData(context).then((value) => value); + if (response.jsonBody['error'] == false) + return await LocalsRemoteDataSourceImpl() + .processData(context) + .then((value) => value); } catch (e, s) { await DialogUtil.errorDefault(context); - LogUtil.requestAPIFailed('responderVinculo.php', '', 'Responder Vínculo', e, s); + LogUtil.requestAPIFailed( + 'responderVinculo.php', '', 'Responder Vínculo', e, s); return false; } return false; @@ -64,11 +76,16 @@ class LocalUtil { static Future handleEnabled(BuildContext context, dynamic local) async { log('() => isEnabled'); - await StorageHelper().set(ProfileStorageKey.clientUUID.key, local['CLI_ID']); - await StorageHelper().set(ProfileStorageKey.ownerUUID.key, local['CLU_OWNER_ID']); - await StorageHelper().set(ProfileStorageKey.clientName.key, local['CLI_NOME']); - await StorageHelper().set(ProfileStorageKey.ownerName.key, local['CLU_OWNER_DSC']); - await StorageHelper().set(ProfileStorageKey.userName.key, local['USU_NOME']); + await StorageHelper() + .set(ProfileStorageKey.clientUUID.key, local['CLI_ID']); + await StorageHelper() + .set(ProfileStorageKey.ownerUUID.key, local['CLU_OWNER_ID']); + await StorageHelper() + .set(ProfileStorageKey.clientName.key, local['CLI_NOME']); + await StorageHelper() + .set(ProfileStorageKey.ownerName.key, local['CLU_OWNER_DSC']); + await StorageHelper() + .set(ProfileStorageKey.userName.key, local['USU_NOME']); return await LocalsRemoteDataSourceImpl().processData(context); } @@ -81,15 +98,25 @@ class LocalUtil { static Future updateStorageUtil(Map jsonBody) async { try { - await StorageHelper().set(LocalsStorageKey.whatsapp.key, jsonBody['whatsapp'] ?? false); - await StorageHelper().set(LocalsStorageKey.provisional.key, jsonBody['provisional'] ?? false); - await StorageHelper().set(LocalsStorageKey.pets.key, jsonBody['pet'] ?? false); - await StorageHelper().set(LocalsStorageKey.petAmount.key, jsonBody['petAmountRegister']?.toString().isEmpty ?? true ? '0' : jsonBody['petAmountRegister'].toString()); - await StorageHelper().set(ProfileStorageKey.userName.key, jsonBody['visitado']['VDO_NOME'] ?? ''); - await StorageHelper().set(ProfileStorageKey.userEmail.key, jsonBody['visitado']['VDO_EMAIL'] ?? ''); + await StorageHelper() + .set(LocalsStorageKey.whatsapp.key, jsonBody['whatsapp'] ?? false); + await StorageHelper().set( + LocalsStorageKey.provisional.key, jsonBody['provisional'] ?? false); + await StorageHelper() + .set(LocalsStorageKey.pets.key, jsonBody['pet'] ?? false); + await StorageHelper().set( + LocalsStorageKey.petAmount.key, + jsonBody['petAmountRegister']?.toString().isEmpty ?? true + ? '0' + : jsonBody['petAmountRegister'].toString()); + await StorageHelper().set(ProfileStorageKey.userName.key, + jsonBody['visitado']['VDO_NOME'] ?? ''); + await StorageHelper().set(ProfileStorageKey.userEmail.key, + jsonBody['visitado']['VDO_EMAIL'] ?? ''); final bool isNewVersion = jsonBody['newVersion'] ?? false; - await StorageHelper().set(LocalsStorageKey.isNewVersion.key, isNewVersion); + await StorageHelper() + .set(LocalsStorageKey.isNewVersion.key, isNewVersion); return isNewVersion; } catch (e, s) { log('Error in _updateStorageUtil: $e', stackTrace: s); @@ -102,30 +129,44 @@ class LocalUtil { } static Future isInactived(List locals) async { - String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; - return locals.where((local) => local['CLI_ID'] != cliUUID && local['CLU_STATUS'] == 'A').isNotEmpty; + String cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + return locals + .where( + (local) => local['CLI_ID'] != cliUUID && local['CLU_STATUS'] == 'A') + .isNotEmpty; } static bool isPending(List locals) { - return locals.where((local) => local['CLU_STATUS'] != 'B' && local['CLU_STATUS'] != 'A').isNotEmpty; + return locals + .where( + (local) => local['CLU_STATUS'] != 'B' && local['CLU_STATUS'] != 'A') + .isNotEmpty; } static Future isUnselected() async { - String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; - String cliName = (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; - String ownerUUID = (await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? ''; + String cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + String cliName = + (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + String ownerUUID = + (await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? ''; return cliUUID.isEmpty && cliName.isEmpty && ownerUUID.isEmpty; } static Future isSelected(bool isInactived) async { - String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; - String cliName = (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + String cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + String cliName = + (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; return cliUUID.isNotEmpty && cliName.isNotEmpty && isInactived; } static Future isAvailable() async { - String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; - String cliName = (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + String cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + String cliName = + (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; return cliUUID.isNotEmpty && cliName.isNotEmpty; } } diff --git a/lib/features/menu/data/data_sources/menu_local_data_source.dart b/lib/features/menu/data/data_sources/menu_local_data_source.dart index ed9b3e2f..d12ecc93 100644 --- a/lib/features/menu/data/data_sources/menu_local_data_source.dart +++ b/lib/features/menu/data/data_sources/menu_local_data_source.dart @@ -10,20 +10,25 @@ import 'package:hub/shared/utils/path_util.dart'; import '../../../modules/domain/entities/index.dart'; abstract class MenuLocalDataSource { - Future addMenuEntry(EnumMenuItem item, List entries, IconData icon, String text, Function() action); - Future processDisplayDefault(EnumMenuItem item, MenuEntry opt, List entries); - Future handleMenu(EnumMenuItem item, EnumDisplay display, MenuEntry opt, List entries); + Future addMenuEntry(EnumMenuItem item, List entries, + IconData icon, String text, Function() action); + Future processDisplayDefault( + EnumMenuItem item, MenuEntry opt, List entries); + Future handleMenu(EnumMenuItem item, EnumDisplay display, MenuEntry opt, + List entries); Future processStartDate(String startDate, MenuEntry entry); Future processExpirationDate(String expirationDate, MenuEntry entry); } class MenuLocalDataSourceImpl implements MenuLocalDataSource { - static final MenuLocalDataSourceImpl _instance = MenuLocalDataSourceImpl._internal(); + static final MenuLocalDataSourceImpl _instance = + MenuLocalDataSourceImpl._internal(); factory MenuLocalDataSourceImpl() => _instance; MenuLocalDataSourceImpl._internal(); @override - Future addMenuEntry(EnumMenuItem item, List entries, IconData icon, String text, Function() action) async { + Future addMenuEntry(EnumMenuItem item, List entries, + IconData icon, String text, Function() action) async { final menuItem = item == EnumMenuItem.button ? ButtonMenuItem(icon: icon, action: action, title: text) : item == EnumMenuItem.card || item == EnumMenuItem.tile @@ -36,7 +41,8 @@ class MenuLocalDataSourceImpl implements MenuLocalDataSource { } @override - Future processDisplayDefault(EnumMenuItem item, MenuEntry opt, List entries) async { + Future processDisplayDefault( + EnumMenuItem item, MenuEntry opt, List entries) async { if (opt.key == 'FRE-HUB-LOGOUT') { await addMenuEntry(item, entries, opt.icon, opt.name, () async { await AuthenticationService.signOut(navigatorKey.currentContext!); @@ -47,7 +53,8 @@ class MenuLocalDataSourceImpl implements MenuLocalDataSource { } @override - Future handleMenu(EnumMenuItem item, EnumDisplay display, MenuEntry opt, List entries) async { + Future handleMenu(EnumMenuItem item, EnumDisplay display, MenuEntry opt, + List entries) async { try { switch (display.value) { case 'VISIVEL': @@ -57,7 +64,8 @@ class MenuLocalDataSourceImpl implements MenuLocalDataSource { break; case 'DESABILITADO': await addMenuEntry(item, entries, opt.icon, opt.name, () async { - await DialogUnavailable.unavailableFeature(navigatorKey.currentContext!); + await DialogUnavailable.unavailableFeature( + navigatorKey.currentContext!); }); break; case 'INVISIVEL': @@ -82,7 +90,8 @@ class MenuLocalDataSourceImpl implements MenuLocalDataSource { } @override - Future processExpirationDate(String expirationDate, MenuEntry opt) async { + Future processExpirationDate( + String expirationDate, MenuEntry opt) async { try { if (expirationDate.isEmpty) return false; final expiration = DateTime.tryParse(expirationDate); diff --git a/lib/features/menu/data/models/index.dart b/lib/features/menu/data/models/index.dart index e69de29b..8b137891 100644 --- a/lib/features/menu/data/models/index.dart +++ b/lib/features/menu/data/models/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/menu/data/repositories/menu_repository_impl.dart b/lib/features/menu/data/repositories/menu_repository_impl.dart index 37c9217e..4f6d7f5d 100644 --- a/lib/features/menu/data/repositories/menu_repository_impl.dart +++ b/lib/features/menu/data/repositories/menu_repository_impl.dart @@ -8,32 +8,39 @@ class MenuRepositoryImpl implements MenuRepository { final MenuLocalDataSource menuDataSource = MenuLocalDataSourceImpl(); @override - Future> generateMenuEntries(List menuEntries, EnumMenuItem item) async { + Future> generateMenuEntries( + List menuEntries, EnumMenuItem item) async { List entries = []; // final bool isNewVersion = await StorageHelper().get(KeychainStorageKey.isNewVersion.value).then((v) => v.toBoolean()); try { for (var entry in menuEntries) { - final bool isDefault = await menuDataSource.processDisplayDefault(item, entry, entries); + final bool isDefault = + await menuDataSource.processDisplayDefault(item, entry, entries); if (isDefault) continue; - final licenseValue = await LicenseRepositoryImpl().getLicense(entry.key); + final licenseValue = + await LicenseRepositoryImpl().getLicense(entry.key); if (licenseValue != null) { final licenseMap = await stringToMap(licenseValue); final display = EnumDisplay.fromString(licenseMap['display']); final startDate = licenseMap['startDate'] ?? ''; final expirationDate = licenseMap['expirationDate'] ?? ''; - final isStarted = await menuDataSource.processStartDate(startDate, entry); - final isExpired = await menuDataSource.processExpirationDate(expirationDate, entry); + final isStarted = + await menuDataSource.processStartDate(startDate, entry); + final isExpired = + await menuDataSource.processExpirationDate(expirationDate, entry); if (isStarted && !isExpired) { await menuDataSource.handleMenu(item, display, entry, entries); } if (isExpired) { log('Entry ${entry.key} is expired'); - await menuDataSource.handleMenu(item, EnumDisplay.inactive, entry, entries); + await menuDataSource.handleMenu( + item, EnumDisplay.inactive, entry, entries); } if (!isStarted) { log('Entry ${entry.key} is not started'); - await menuDataSource.handleMenu(item, EnumDisplay.inactive, entry, entries); + await menuDataSource.handleMenu( + item, EnumDisplay.inactive, entry, entries); } } } @@ -43,18 +50,26 @@ class MenuRepositoryImpl implements MenuRepository { return entries; } - Future processDisplay(Map module, bool isNewVersion) async { + Future processDisplay( + Map module, bool isNewVersion) async { if (await _shouldUpdateDisplay(module, isNewVersion)) { - final displayValue = module['display'] == EnumDisplay.active ? 'VISIVEL' : 'INVISIVEL'; - await LicenseLocalDataSourceImpl().setDisplayByKey(['FRE-HUB-ABOUT-PROPERTY'], displayValue); + final displayValue = + module['display'] == EnumDisplay.active ? 'VISIVEL' : 'INVISIVEL'; + await LicenseLocalDataSourceImpl() + .setDisplayByKey(['FRE-HUB-ABOUT-PROPERTY'], displayValue); return EnumDisplay.fromString(displayValue); } return EnumDisplay.fromString(module['display']); } - Future _shouldUpdateDisplay(Map module, bool isNewVersion) async { - const keysToCheck = [LicenseKeys.residents, LicenseKeys.vehicles, LicenseKeys.openedVisits]; + Future _shouldUpdateDisplay( + Map module, bool isNewVersion) async { + const keysToCheck = [ + LicenseKeys.residents, + LicenseKeys.vehicles, + LicenseKeys.openedVisits + ]; return isNewVersion && keysToCheck.any((key) => module['key'] == key.value); } } diff --git a/lib/features/menu/domain/entities/menu_item.dart b/lib/features/menu/domain/entities/menu_item.dart index 842eab13..ec62f641 100644 --- a/lib/features/menu/domain/entities/menu_item.dart +++ b/lib/features/menu/domain/entities/menu_item.dart @@ -6,7 +6,8 @@ enum EnumMenuItem { card, tile; - MenuItem getInstance(final Function() action, final String title, final IconData icon) { + MenuItem getInstance( + final Function() action, final String title, final IconData icon) { switch (this) { case EnumMenuItem.button: return ButtonMenuItem(action: action, title: title, icon: icon); diff --git a/lib/features/menu/domain/respositories/menu_repository.dart b/lib/features/menu/domain/respositories/menu_repository.dart index bccd444a..fdccddd8 100644 --- a/lib/features/menu/domain/respositories/menu_repository.dart +++ b/lib/features/menu/domain/respositories/menu_repository.dart @@ -1,5 +1,6 @@ import 'package:hub/features/menu/index.dart'; abstract class MenuRepository { - Future> generateMenuEntries(List menuEntries, EnumMenuItem item); + Future> generateMenuEntries( + List menuEntries, EnumMenuItem item); } diff --git a/lib/features/menu/domain/usecases/index.dart b/lib/features/menu/domain/usecases/index.dart index e69de29b..8b137891 100644 --- a/lib/features/menu/domain/usecases/index.dart +++ b/lib/features/menu/domain/usecases/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/menu/presentation/blocs/menu_bloc.dart b/lib/features/menu/presentation/blocs/menu_bloc.dart index 9b701787..c1b7e205 100644 --- a/lib/features/menu/presentation/blocs/menu_bloc.dart +++ b/lib/features/menu/presentation/blocs/menu_bloc.dart @@ -27,7 +27,8 @@ class MenuBloc extends Bloc { final List entries; late StreamSubscription _completer; - MenuBloc({required this.style, required this.item, required this.entries}) : super(MenuState()) { + MenuBloc({required this.style, required this.item, required this.entries}) + : super(MenuState()) { on(_onMenuEvent); _completer = LocalsRepositoryImpl.license.stream.listen((v) { add(MenuEvent()); @@ -37,7 +38,8 @@ class MenuBloc extends Bloc { Future _onMenuEvent(MenuEvent event, Emitter emit) async { await LicenseRemoteDataSourceImpl().waitForSaveCompletion(); - final List newEntries = await MenuRepositoryImpl().generateMenuEntries(entries, item); + final List newEntries = + await MenuRepositoryImpl().generateMenuEntries(entries, item); emit(state.copyWith(menuEntries: newEntries)); } diff --git a/lib/features/menu/presentation/blocs/menu_view_bloc.dart b/lib/features/menu/presentation/blocs/menu_view_bloc.dart index bd77e2de..722ffc6d 100644 --- a/lib/features/menu/presentation/blocs/menu_view_bloc.dart +++ b/lib/features/menu/presentation/blocs/menu_view_bloc.dart @@ -1,5 +1,3 @@ - - import 'package:flutter_bloc/flutter_bloc.dart'; class MenuViewEvent {} diff --git a/lib/features/menu/presentation/index.dart b/lib/features/menu/presentation/index.dart index 2bb09756..8351c972 100644 --- a/lib/features/menu/presentation/index.dart +++ b/lib/features/menu/presentation/index.dart @@ -1,3 +1,3 @@ export 'blocs/index.dart'; export 'widgets/index.dart'; -export 'mappers/index.dart'; \ No newline at end of file +export 'mappers/index.dart'; diff --git a/lib/features/menu/presentation/mappers/menu_entry.dart b/lib/features/menu/presentation/mappers/menu_entry.dart index 0b443f7a..c9796188 100644 --- a/lib/features/menu/presentation/mappers/menu_entry.dart +++ b/lib/features/menu/presentation/mappers/menu_entry.dart @@ -154,7 +154,8 @@ class MenuEntry implements BaseModule { MenuEntry( key: 'FRE-HUB-PETS', icon: Icons.pets, - name: FFLocalizations.of(navigatorKey.currentContext!).getVariableText(ptText: 'Cadastrar Pets', enText: 'Pets Register'), + name: FFLocalizations.of(navigatorKey.currentContext!) + .getVariableText(ptText: 'Cadastrar Pets', enText: 'Pets Register'), route: '/petsPage', types: [MenuEntryType.Home, MenuEntryType.Drawer], ), diff --git a/lib/features/menu/presentation/widgets/index.dart b/lib/features/menu/presentation/widgets/index.dart index 800e0aa8..b3915d35 100644 --- a/lib/features/menu/presentation/widgets/index.dart +++ b/lib/features/menu/presentation/widgets/index.dart @@ -1,4 +1,4 @@ export 'menu_item/index.dart'; export 'menu_view/index.dart'; -export 'menu_factory.dart'; \ No newline at end of file +export 'menu_factory.dart'; diff --git a/lib/features/menu/presentation/widgets/menu_item/menu_item_button.dart b/lib/features/menu/presentation/widgets/menu_item/menu_item_button.dart index 2b0d5576..c8f81e31 100644 --- a/lib/features/menu/presentation/widgets/menu_item/menu_item_button.dart +++ b/lib/features/menu/presentation/widgets/menu_item/menu_item_button.dart @@ -99,7 +99,8 @@ class _MenuButtonWidgetState extends State { color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedFontSize, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), + useGoogleFonts: + GoogleFonts.asMap().containsKey('Nunito'), ), ), ), diff --git a/lib/features/menu/presentation/widgets/menu_item/menu_item_card.dart b/lib/features/menu/presentation/widgets/menu_item/menu_item_card.dart index 6ea197ce..19843d1c 100644 --- a/lib/features/menu/presentation/widgets/menu_item/menu_item_card.dart +++ b/lib/features/menu/presentation/widgets/menu_item/menu_item_card.dart @@ -53,7 +53,8 @@ class _MenuCardItemState extends State { Align( alignment: const AlignmentDirectional(-1.0, 0.0), child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 10.0, 0.0), + padding: + const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 10.0, 0.0), child: Container( width: 30.0, height: 30.0, diff --git a/lib/features/menu/presentation/widgets/menu_view/menu_list_view.dart b/lib/features/menu/presentation/widgets/menu_view/menu_list_view.dart index cd301a64..5146a97a 100644 --- a/lib/features/menu/presentation/widgets/menu_view/menu_list_view.dart +++ b/lib/features/menu/presentation/widgets/menu_view/menu_list_view.dart @@ -83,7 +83,8 @@ class _MenuListViewState extends State { itemBuilder: (context, index) { return Padding( padding: const EdgeInsets.all(8.0), - child: SizedBox(height: 115, width: 115, child: widget.options[index]), + child: + SizedBox(height: 115, width: 115, child: widget.options[index]), ); }, ), @@ -104,7 +105,8 @@ class _MenuListViewState extends State { itemBuilder: (context, index) { return Padding( padding: const EdgeInsets.all(8.0), - child: SizedBox(height: 115, width: 115, child: widget.options[index]), + child: + SizedBox(height: 115, width: 115, child: widget.options[index]), ); }, ), diff --git a/lib/features/menu/presentation/widgets/menu_view/menu_staggered_view.dart b/lib/features/menu/presentation/widgets/menu_view/menu_staggered_view.dart index 4a81ac5b..371fac5a 100644 --- a/lib/features/menu/presentation/widgets/menu_view/menu_staggered_view.dart +++ b/lib/features/menu/presentation/widgets/menu_view/menu_staggered_view.dart @@ -13,7 +13,12 @@ class MenuStaggeredViewModel extends FlutterFlowModel { } class MenuStaggeredView extends StatefulWidget { - const MenuStaggeredView({super.key, required this.changeMenuStyle, required this.item, required this.options, required this.isGrid}); + const MenuStaggeredView( + {super.key, + required this.changeMenuStyle, + required this.item, + required this.options, + required this.isGrid}); final EnumMenuItem item; final bool isGrid; @@ -55,7 +60,9 @@ class _MenuStaggeredViewState extends State { return Column( children: [ _buildGridView(crossAxisCount), - ].addToStart(const SizedBox(height: 30)).addToEnd(const SizedBox(height: 30)), + ] + .addToStart(const SizedBox(height: 30)) + .addToEnd(const SizedBox(height: 30)), ); } diff --git a/lib/features/modules/constants/index.dart b/lib/features/modules/constants/index.dart index 20bc3626..799c6845 100644 --- a/lib/features/modules/constants/index.dart +++ b/lib/features/modules/constants/index.dart @@ -1 +1 @@ -export 'license_constants.dart'; \ No newline at end of file +export 'license_constants.dart'; diff --git a/lib/features/modules/constants/license_constants.dart b/lib/features/modules/constants/license_constants.dart index 6a4a2fcc..ea2bf899 100644 --- a/lib/features/modules/constants/license_constants.dart +++ b/lib/features/modules/constants/license_constants.dart @@ -1,8 +1,7 @@ +const String tableLicense = 'license'; - const String tableLicense = 'license'; - - class LicenseConstants { - static String get createLicenseTable => ''' +class LicenseConstants { + static String get createLicenseTable => ''' CREATE TABLE IF NOT EXISTS $tableLicense ( key TEXT UNIQUE, display TEXT, @@ -12,9 +11,9 @@ ); '''; - static String get deleteLicenseTable => 'DROP TABLE IF EXISTS $tableLicense;'; + static String get deleteLicenseTable => 'DROP TABLE IF EXISTS $tableLicense;'; - static String get updatePetsHistoryTrigger => ''' + static String get updatePetsHistoryTrigger => ''' CREATE TRIGGER update_fre_hub_pets_history AFTER INSERT ON $tableLicense WHEN NEW.key = 'FRE-HUB-PETS' @@ -24,9 +23,10 @@ END; '''; - static String get dropPetsHistoryTrigger => 'DROP TRIGGER IF EXISTS update_fre_hub_pets_history;'; + static String get dropPetsHistoryTrigger => + 'DROP TRIGGER IF EXISTS update_fre_hub_pets_history;'; - static String get updateDisplayTrigger => ''' + static String get updateDisplayTrigger => ''' CREATE TRIGGER update_display_trigger AFTER UPDATE ON $tableLicense WHEN NEW.key IN ('FRE-HUB-OPENED-VISITS', 'FRE-HUB-VEHICLES', 'FRE-HUB-RESIDENTS') @@ -44,9 +44,10 @@ END; '''; - static String get dropUpdateDisplayTrigger => 'DROP TRIGGER IF EXISTS update_display_trigger;'; + static String get dropUpdateDisplayTrigger => + 'DROP TRIGGER IF EXISTS update_display_trigger;'; - static String get insertDisplayTrigger => ''' + static String get insertDisplayTrigger => ''' CREATE TRIGGER insert_display_trigger AFTER INSERT ON $tableLicense WHEN NEW.key IN ('FRE-HUB-OPENED-VISITS', 'FRE-HUB-VEHICLES', 'FRE-HUB-RESIDENTS') @@ -62,9 +63,10 @@ END; '''; - static String get dropInsertDisplayTrigger => 'DROP TRIGGER IF EXISTS insert_display_trigger;'; + static String get dropInsertDisplayTrigger => + 'DROP TRIGGER IF EXISTS insert_display_trigger;'; - static String get updatePeopleDisplayTrigger => ''' + static String get updatePeopleDisplayTrigger => ''' CREATE TRIGGER update_people_display_trigger AFTER UPDATE ON $tableLicense WHEN NEW.key IN ('FRE-HUB-OPENED-VISITS', 'FRE-HUB-VEHICLES', 'FRE-HUB-RESIDENTS') @@ -80,5 +82,6 @@ END; '''; - static String get dropPeopleDisplayTrigger => 'DROP TRIGGER IF EXISTS update_people_display_trigger;'; - } \ No newline at end of file + static String get dropPeopleDisplayTrigger => + 'DROP TRIGGER IF EXISTS update_people_display_trigger;'; +} diff --git a/lib/features/modules/data/data_sources/license_local_data_source.dart b/lib/features/modules/data/data_sources/license_local_data_source.dart index ff2390c4..e2ef21aa 100644 --- a/lib/features/modules/data/data_sources/license_local_data_source.dart +++ b/lib/features/modules/data/data_sources/license_local_data_source.dart @@ -13,7 +13,8 @@ abstract class LicenseLocalDataSource { } class LicenseLocalDataSourceImpl implements LicenseLocalDataSource { - static final LicenseLocalDataSourceImpl _instance = LicenseLocalDataSourceImpl._internal(); + static final LicenseLocalDataSourceImpl _instance = + LicenseLocalDataSourceImpl._internal(); factory LicenseLocalDataSourceImpl() => _instance; LicenseLocalDataSourceImpl._internal(); @@ -23,7 +24,8 @@ class LicenseLocalDataSourceImpl implements LicenseLocalDataSource { } @override - Future setDisplayByKey(final List keys, final String display) async { + Future setDisplayByKey( + final List keys, final String display) async { if (keys.isEmpty) return; final validKeys = keys.where((key) => key.isNotEmpty).toList(); for (var key in validKeys) { @@ -38,14 +40,16 @@ class LicenseLocalDataSourceImpl implements LicenseLocalDataSource { @override Future isNewVersion() async { - final String? reponse = await StorageHelper().get(LocalsStorageKey.isNewVersion.key); + final String? reponse = + await StorageHelper().get(LocalsStorageKey.isNewVersion.key); final bool isNewVersion = reponse.toBoolean(); return isNewVersion; } @override Future get(String key) async { - var response = await DatabaseService.database.query(tableLicense, where: 'key = ?', whereArgs: [key]); + var response = await DatabaseService.database + .query(tableLicense, where: 'key = ?', whereArgs: [key]); if (response.isEmpty) { return null; } @@ -61,14 +65,21 @@ class LicenseLocalDataSourceImpl implements LicenseLocalDataSource { await DatabaseService.database.rawInsert( 'INSERT OR REPLACE INTO $tableLicense (key, display, expirationDate, startDate, quantity) VALUES (?, ?, ?, ?, ?)', - [key, value['display'], value['expirationDate'], value['startDate'], value['quantity']], + [ + key, + value['display'], + value['expirationDate'], + value['startDate'], + value['quantity'] + ], ); return; } @override Future del(String key) async { - await DatabaseService.database.delete(tableLicense, where: 'key = ?', whereArgs: [key]); + await DatabaseService.database + .delete(tableLicense, where: 'key = ?', whereArgs: [key]); } @override diff --git a/lib/features/modules/data/data_sources/license_remote_data_source.dart b/lib/features/modules/data/data_sources/license_remote_data_source.dart index 9bee2849..5a80c9c7 100644 --- a/lib/features/modules/data/data_sources/license_remote_data_source.dart +++ b/lib/features/modules/data/data_sources/license_remote_data_source.dart @@ -17,7 +17,8 @@ abstract class LicenseRemoteDataSource { } class LicenseRemoteDataSourceImpl implements LicenseRemoteDataSource { - static final LicenseRemoteDataSourceImpl _instance = LicenseRemoteDataSourceImpl._internal(); + static final LicenseRemoteDataSourceImpl _instance = + LicenseRemoteDataSourceImpl._internal(); factory LicenseRemoteDataSourceImpl() => _instance; LicenseRemoteDataSourceImpl._internal(); @@ -35,15 +36,27 @@ class LicenseRemoteDataSourceImpl implements LicenseRemoteDataSource { try { final License license = await License.getLicense(isNewVersion); - final List inactiveModuleKey = license.modules.where((module) => module.display == ModuleStatus.inactive.key).map((module) => module.key).toList(); + final List inactiveModuleKey = license.modules + .where((module) => module.display == ModuleStatus.inactive.key) + .map((module) => module.key) + .toList(); - final List activeModuleKey = license.modules.where((module) => module.display == ModuleStatus.active.key).map((module) => module.key).toList(); + final List activeModuleKey = license.modules + .where((module) => module.display == ModuleStatus.active.key) + .map((module) => module.key) + .toList(); - final List disabledModuleKey = license.modules.where((module) => module.display == ModuleStatus.disabled.key).map((module) => module.key).toList(); + final List disabledModuleKey = license.modules + .where((module) => module.display == ModuleStatus.disabled.key) + .map((module) => module.key) + .toList(); - await LicenseLocalDataSourceImpl().setDisplayByKey(inactiveModuleKey, 'INVISIVEL'); - await LicenseLocalDataSourceImpl().setDisplayByKey(activeModuleKey, 'VISIVEL'); - await LicenseLocalDataSourceImpl().setDisplayByKey(disabledModuleKey, 'DESABILITADO'); + await LicenseLocalDataSourceImpl() + .setDisplayByKey(inactiveModuleKey, 'INVISIVEL'); + await LicenseLocalDataSourceImpl() + .setDisplayByKey(activeModuleKey, 'VISIVEL'); + await LicenseLocalDataSourceImpl() + .setDisplayByKey(disabledModuleKey, 'DESABILITADO'); return true; } catch (e, s) { diff --git a/lib/features/modules/data/models/license_model.dart b/lib/features/modules/data/models/license_model.dart index 1bbf5d3f..48e215cc 100644 --- a/lib/features/modules/data/models/license_model.dart +++ b/lib/features/modules/data/models/license_model.dart @@ -11,5 +11,6 @@ class LicenseModel with _$LicenseModel { required List modules, }) = _LicenseModel; - factory LicenseModel.fromJson(Map json) => _$LicenseModelFromJson(json); + factory LicenseModel.fromJson(Map json) => + _$LicenseModelFromJson(json); } diff --git a/lib/features/modules/data/models/module_model.dart b/lib/features/modules/data/models/module_model.dart index c45efffe..e373edc3 100644 --- a/lib/features/modules/data/models/module_model.dart +++ b/lib/features/modules/data/models/module_model.dart @@ -14,5 +14,6 @@ class ModuleModel with _$ModuleModel { required int quantity, }) = _ModuleModel; - factory ModuleModel.fromJson(Map json) => _$ModuleModelFromJson(json); + factory ModuleModel.fromJson(Map json) => + _$ModuleModelFromJson(json); } diff --git a/lib/features/modules/data/repositories/license_repository_impl.dart b/lib/features/modules/data/repositories/license_repository_impl.dart index bc33f656..0a5a5b48 100644 --- a/lib/features/modules/data/repositories/license_repository_impl.dart +++ b/lib/features/modules/data/repositories/license_repository_impl.dart @@ -9,7 +9,8 @@ typedef LicenseStatus = bool; class LicenseRepositoryImpl implements LicenseRepository { final LicenseLocalDataSource localDataSource = LicenseLocalDataSourceImpl(); - final LicenseRemoteDataSource remoteDataSource = LicenseRemoteDataSourceImpl(); + final LicenseRemoteDataSource remoteDataSource = + LicenseRemoteDataSourceImpl(); final Database database = DatabaseService.database; LicenseRepositoryImpl(); diff --git a/lib/features/modules/domain/entities/base_module.dart b/lib/features/modules/domain/entities/base_module.dart index ef2c82a8..1cfbeef0 100644 --- a/lib/features/modules/domain/entities/base_module.dart +++ b/lib/features/modules/domain/entities/base_module.dart @@ -2,8 +2,6 @@ import 'package:flutter/material.dart'; import 'package:hub/flutter_flow/internationalization.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; - - abstract class BaseModule { String get key; String get name; diff --git a/lib/features/modules/domain/entities/license.dart b/lib/features/modules/domain/entities/license.dart index d7e4524f..17a70650 100644 --- a/lib/features/modules/domain/entities/license.dart +++ b/lib/features/modules/domain/entities/license.dart @@ -60,7 +60,9 @@ class License { } static Future _precessWpp() async { - final bool whatsapp = await StorageHelper().get(LocalsStorageKey.whatsapp.key).then((v) => v.toBoolean()); + final bool whatsapp = await StorageHelper() + .get(LocalsStorageKey.whatsapp.key) + .then((v) => v.toBoolean()); if (whatsapp) return ModuleStatus.active.key; else @@ -68,7 +70,9 @@ class License { } static Future _processProvisional() async { - final bool provisional = await StorageHelper().get(LocalsStorageKey.provisional.key).then((v) => v.toBoolean()); + final bool provisional = await StorageHelper() + .get(LocalsStorageKey.provisional.key) + .then((v) => v.toBoolean()); if (provisional) return ModuleStatus.active.key; else @@ -76,7 +80,9 @@ class License { } static Future _processPets() async { - final bool pets = await StorageHelper().get(LocalsStorageKey.pets.key).then((v) => v.toBoolean()); + final bool pets = await StorageHelper() + .get(LocalsStorageKey.pets.key) + .then((v) => v.toBoolean()); if (pets) return ModuleStatus.active.key; else @@ -133,21 +139,27 @@ class License { ), Module( key: LicenseKeys.openedVisits.value, - display: isNewVersionWithModule ? ModuleStatus.active.key : ModuleStatus.inactive.key, + display: isNewVersionWithModule + ? ModuleStatus.active.key + : ModuleStatus.inactive.key, expirationDate: '', startDate: '', quantity: 0, ), Module( key: LicenseKeys.vehicles.value, - display: isNewVersionWithModule ? ModuleStatus.active.key : ModuleStatus.inactive.key, + display: isNewVersionWithModule + ? ModuleStatus.active.key + : ModuleStatus.inactive.key, expirationDate: '', startDate: '', quantity: 0, ), Module( key: LicenseKeys.residents.value, - display: isNewVersionWithModule ? ModuleStatus.active.key : ModuleStatus.inactive.key, + display: isNewVersionWithModule + ? ModuleStatus.active.key + : ModuleStatus.inactive.key, expirationDate: '', startDate: '', quantity: 0, @@ -210,14 +222,18 @@ class License { ), Module( key: LicenseKeys.property.value, - display: isNewVersionWithModule ? ModuleStatus.active.key : ModuleStatus.inactive.key, + display: isNewVersionWithModule + ? ModuleStatus.active.key + : ModuleStatus.inactive.key, expirationDate: '', startDate: '', quantity: 0, ), Module( key: LicenseKeys.people.value, - display: isNewVersionWithModule ? ModuleStatus.inactive.key : ModuleStatus.active.key, + display: isNewVersionWithModule + ? ModuleStatus.inactive.key + : ModuleStatus.active.key, expirationDate: '', startDate: '', quantity: 0, diff --git a/lib/features/modules/domain/usecases/index.dart b/lib/features/modules/domain/usecases/index.dart index e69de29b..8b137891 100644 --- a/lib/features/modules/domain/usecases/index.dart +++ b/lib/features/modules/domain/usecases/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/modules/index.dart b/lib/features/modules/index.dart index 385ad97a..9e2e57a1 100644 --- a/lib/features/modules/index.dart +++ b/lib/features/modules/index.dart @@ -1,4 +1,4 @@ export 'data/index.dart'; export 'domain/index.dart'; export 'presentation/index.dart'; -export 'constants/index.dart'; \ No newline at end of file +export 'constants/index.dart'; diff --git a/lib/features/modules/presentation/blocs/index.dart b/lib/features/modules/presentation/blocs/index.dart index e69de29b..8b137891 100644 --- a/lib/features/modules/presentation/blocs/index.dart +++ b/lib/features/modules/presentation/blocs/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/modules/presentation/widgets/index.dart b/lib/features/modules/presentation/widgets/index.dart index e69de29b..8b137891 100644 --- a/lib/features/modules/presentation/widgets/index.dart +++ b/lib/features/modules/presentation/widgets/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/notifications/deep_link_service.dart b/lib/features/notifications/deep_link_service.dart index 5712a7ae..f7aa1ac0 100644 --- a/lib/features/notifications/deep_link_service.dart +++ b/lib/features/notifications/deep_link_service.dart @@ -62,7 +62,8 @@ class DeepLinkService { child: ForgotPasswordScreen(email: email, token: token), ), isScrollControlled: true, - backgroundColor: FlutterFlowTheme.of(navigatorKey.currentContext!).primaryBackground, + backgroundColor: FlutterFlowTheme.of(navigatorKey.currentContext!) + .primaryBackground, showDragHandle: true, useSafeArea: true, enableDrag: true, diff --git a/lib/features/notifications/firebase_messaging_service.dart b/lib/features/notifications/firebase_messaging_service.dart index 07fe7df5..3d4a77f7 100644 --- a/lib/features/notifications/firebase_messaging_service.dart +++ b/lib/features/notifications/firebase_messaging_service.dart @@ -9,12 +9,16 @@ import 'package:hub/shared/utils/log_util.dart'; import 'notification_service.dart'; Future handleMessage(RemoteMessage message) async { - NotificationService.show(title: message.notification!.title!, body: message.notification!.body!, payload: Map.from(message.data)); + NotificationService.show( + title: message.notification!.title!, + body: message.notification!.body!, + payload: Map.from(message.data)); } class FirebaseMessagingService { // Singleton instance - static final FirebaseMessagingService _instance = FirebaseMessagingService._internal(); + static final FirebaseMessagingService _instance = + FirebaseMessagingService._internal(); // Factory constructor factory FirebaseMessagingService() => _instance; @@ -33,7 +37,8 @@ class FirebaseMessagingService { _firebaseMessaging.pluginConstants; } - static Future getToken() async => await FirebaseMessaging.instance.getToken() ?? ''; + static Future getToken() async => + await FirebaseMessaging.instance.getToken() ?? ''; Future updateDeviceToken() async { try { diff --git a/lib/features/notifications/notification_service.dart b/lib/features/notifications/notification_service.dart index 06f77ff9..9b1dcabb 100644 --- a/lib/features/notifications/notification_service.dart +++ b/lib/features/notifications/notification_service.dart @@ -11,12 +11,19 @@ import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/shared/utils/dialog_util.dart'; -Future onMessageReceived(Map payload, String? extra, String? handleClick) async { +Future onMessageReceived( + Map payload, String? extra, String? handleClick) async { final localId = jsonDecode(payload['local']!)['CLI_ID']; - final cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; - answersRequest({required BuildContext context, required String? ref, required String? task, required String? response, required String? id}) async { + answersRequest( + {required BuildContext context, + required String? ref, + required String? task, + required String? response, + required String? id}) async { final ApiCallResponse? respondeSolicitacaoCall; final RespondeSolicitacaoCall callback = PhpGroup.respondeSolicitacaoCall; @@ -57,8 +64,10 @@ Future onMessageReceived(Map payload, String? extra, Stri enText: 'Approve Visit', ), FFLocalizations.of(context).getVariableText( - ptText: 'Você tem certeza que deseja aprovar essa visita?', - enText: 'Are you sure you want to approve this visit?', + ptText: + 'Você tem certeza que deseja aprovar essa visita?', + enText: + 'Are you sure you want to approve this visit?', ), () async { await answersRequest( @@ -95,8 +104,10 @@ Future onMessageReceived(Map payload, String? extra, Stri enText: 'Block Visit', ), FFLocalizations.of(context).getVariableText( - ptText: 'Você tem certeza que deseja bloquear essa visita?', - enText: 'Are you sure you want to block this visit?', + ptText: + 'Você tem certeza que deseja bloquear essa visita?', + enText: + 'Are you sure you want to block this visit?', ), () async { await answersRequest .call( @@ -138,7 +149,8 @@ Future onMessageReceived(Map payload, String? extra, Stri ptText: 'Mensagem', ): payload['mensagem'], }), - imagePath: 'https://freaccess.com.br/freaccess/getImage.php?cliID=$cliUUID&atividade=getFoto&Documento=${payload['documento'] ?? ''}&tipo=E', + imagePath: + 'https://freaccess.com.br/freaccess/getImage.php?cliID=$cliUUID&atividade=getFoto&Documento=${payload['documento'] ?? ''}&tipo=E', statusHashMap: [ { FFLocalizations.of(context).getVariableText( @@ -170,16 +182,21 @@ Future onMessageReceived(Map payload, String? extra, Stri return Dialog( backgroundColor: Colors.transparent, child: DetailsComponentWidget( - imagePath: 'https://freaccess.com.br/freaccess/getImage.php?cliID=$cliUUID&atividade=getFoto&Documento=$id&tipo=$type', + imagePath: + 'https://freaccess.com.br/freaccess/getImage.php?cliID=$cliUUID&atividade=getFoto&Documento=$id&tipo=$type', labelsHashMap: Map.from({ FFLocalizations.of(context).getVariableText( enText: 'Name', ptText: 'Nome', - ): payload['PES_NOME'] != null ? payload['PES_NOME'].toString() : payload['USR_NOME'].toString(), + ): payload['PES_NOME'] != null + ? payload['PES_NOME'].toString() + : payload['USR_NOME'].toString(), FFLocalizations.of(context).getVariableText( enText: 'Type', ptText: 'Tipo', - ): payload['USR_TIPO'].toString() == 'O' ? 'Morador' : 'Visitante', + ): payload['USR_TIPO'].toString() == 'O' + ? 'Morador' + : 'Visitante', FFLocalizations.of(context).getVariableText( enText: 'Access Date', ptText: 'Data de Acesso', @@ -222,8 +239,11 @@ Future onMessageReceived(Map payload, String? extra, Stri child: MessageNotificationModalTemplateComponentWidget( id: localId, from: payload['remetente'].toString(), - to: payload['destinatario'].toString() == 'O' ? 'Morador' : 'Visitante', - message: extra.toString().isEmpty ? 'Unknown' : extra.toString(), + to: payload['destinatario'].toString() == 'O' + ? 'Morador' + : 'Visitante', + message: + extra.toString().isEmpty ? 'Unknown' : extra.toString(), ), ), ); @@ -258,15 +278,24 @@ class NotificationService { ledColor: Colors.white, ) ], - channelGroups: [NotificationChannelGroup(channelGroupKey: 'basic_channel_group', channelGroupName: 'group_1')], + channelGroups: [ + NotificationChannelGroup( + channelGroupKey: 'basic_channel_group', + channelGroupName: 'group_1') + ], debug: kDebugMode); - await AwesomeNotifications().isNotificationAllowed().then((isAllowed) async { - final bool requestOSnotification = (await StorageHelper().get(LocalsStorageKey.requestOSNotification.key)) == 'true'; + await AwesomeNotifications() + .isNotificationAllowed() + .then((isAllowed) async { + final bool requestOSnotification = (await StorageHelper() + .get(LocalsStorageKey.requestOSNotification.key)) == + 'true'; if (requestOSnotification == false) { if (isAllowed == false) { - await StorageHelper().set(LocalsStorageKey.requestOSNotification.key, true); + await StorageHelper() + .set(LocalsStorageKey.requestOSNotification.key, true); await AwesomeNotifications().requestPermissionToSendNotifications(); } } @@ -280,18 +309,22 @@ class NotificationService { onDismissActionReceivedMethod: onDismissActionReceivedMethod); } - static Future onActionReceivedMethod(ReceivedAction receivedAction) async { + static Future onActionReceivedMethod( + ReceivedAction receivedAction) async { final payload = receivedAction.payload ?? {}; final extra = receivedAction.body; final handleClick = payload['click_action']; onMessageReceived(payload, extra, handleClick); } - static Future onNotificationCreatedMethod(ReceivedNotification receivedNotification) async {} + static Future onNotificationCreatedMethod( + ReceivedNotification receivedNotification) async {} - static Future onNotificationDisplayedMethod(ReceivedNotification receivedNotification) async {} + static Future onNotificationDisplayedMethod( + ReceivedNotification receivedNotification) async {} - static Future onDismissActionReceivedMethod(ReceivedAction receivedAction) async {} + static Future onDismissActionReceivedMethod( + ReceivedAction receivedAction) async {} static Future show({ required final String title, @@ -323,7 +356,11 @@ class NotificationService { ), actionButtons: actionButtons, schedule: scheduled - ? NotificationInterval(interval: Duration(seconds: interval!), timeZone: await AwesomeNotifications().getLocalTimeZoneIdentifier(), preciseAlarm: true) + ? NotificationInterval( + interval: Duration(seconds: interval!), + timeZone: + await AwesomeNotifications().getLocalTimeZoneIdentifier(), + preciseAlarm: true) : null); } } diff --git a/lib/features/profile/data/models/index.dart b/lib/features/profile/data/models/index.dart index e69de29b..8b137891 100644 --- a/lib/features/profile/data/models/index.dart +++ b/lib/features/profile/data/models/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/profile/data/repositories/index.dart b/lib/features/profile/data/repositories/index.dart index e69de29b..8b137891 100644 --- a/lib/features/profile/data/repositories/index.dart +++ b/lib/features/profile/data/repositories/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/profile/domain/entities/index.dart b/lib/features/profile/domain/entities/index.dart index e69de29b..8b137891 100644 --- a/lib/features/profile/domain/entities/index.dart +++ b/lib/features/profile/domain/entities/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/profile/domain/respositories/index.dart b/lib/features/profile/domain/respositories/index.dart index e69de29b..8b137891 100644 --- a/lib/features/profile/domain/respositories/index.dart +++ b/lib/features/profile/domain/respositories/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/profile/domain/usecases/index.dart b/lib/features/profile/domain/usecases/index.dart index e69de29b..8b137891 100644 --- a/lib/features/profile/domain/usecases/index.dart +++ b/lib/features/profile/domain/usecases/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/profile/presentation/blocs/index.dart b/lib/features/profile/presentation/blocs/index.dart index e69de29b..8b137891 100644 --- a/lib/features/profile/presentation/blocs/index.dart +++ b/lib/features/profile/presentation/blocs/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/profile/presentation/pages/index.dart b/lib/features/profile/presentation/pages/index.dart index e69de29b..8b137891 100644 --- a/lib/features/profile/presentation/pages/index.dart +++ b/lib/features/profile/presentation/pages/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/profile/presentation/widgets/index.dart b/lib/features/profile/presentation/widgets/index.dart index e69de29b..8b137891 100644 --- a/lib/features/profile/presentation/widgets/index.dart +++ b/lib/features/profile/presentation/widgets/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/property/data/data_sources/index.dart b/lib/features/property/data/data_sources/index.dart index e69de29b..8b137891 100644 --- a/lib/features/property/data/data_sources/index.dart +++ b/lib/features/property/data/data_sources/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/property/data/models/index.dart b/lib/features/property/data/models/index.dart index e69de29b..8b137891 100644 --- a/lib/features/property/data/models/index.dart +++ b/lib/features/property/data/models/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/property/data/repositories/index.dart b/lib/features/property/data/repositories/index.dart index e69de29b..8b137891 100644 --- a/lib/features/property/data/repositories/index.dart +++ b/lib/features/property/data/repositories/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/property/domain/entities/index.dart b/lib/features/property/domain/entities/index.dart index e69de29b..8b137891 100644 --- a/lib/features/property/domain/entities/index.dart +++ b/lib/features/property/domain/entities/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/property/domain/respositories/index.dart b/lib/features/property/domain/respositories/index.dart index e69de29b..8b137891 100644 --- a/lib/features/property/domain/respositories/index.dart +++ b/lib/features/property/domain/respositories/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/property/domain/usecases/index.dart b/lib/features/property/domain/usecases/index.dart index e69de29b..8b137891 100644 --- a/lib/features/property/domain/usecases/index.dart +++ b/lib/features/property/domain/usecases/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/property/presentation/blocs/index.dart b/lib/features/property/presentation/blocs/index.dart index e69de29b..8b137891 100644 --- a/lib/features/property/presentation/blocs/index.dart +++ b/lib/features/property/presentation/blocs/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/property/presentation/pages/about_property_screen.dart b/lib/features/property/presentation/pages/about_property_screen.dart index a4180b6a..9753b962 100644 --- a/lib/features/property/presentation/pages/about_property_screen.dart +++ b/lib/features/property/presentation/pages/about_property_screen.dart @@ -38,7 +38,8 @@ class AboutPropertyPage extends StatefulWidget { State createState() => _AboutPropertyPageState(); } -class _AboutPropertyPageState extends State with SingleTickerProviderStateMixin { +class _AboutPropertyPageState extends State + with SingleTickerProviderStateMixin { late AboutPropertyModel _model; @override @@ -60,11 +61,15 @@ class _AboutPropertyPageState extends State with SingleTicker @override Widget build(BuildContext context) { - return Scaffold(appBar: _buildAppBar(context), backgroundColor: FlutterFlowTheme.of(context).primaryBackground, body: _buildBody(context)); + return Scaffold( + appBar: _buildAppBar(context), + backgroundColor: FlutterFlowTheme.of(context).primaryBackground, + body: _buildBody(context)); } PreferredSizeWidget _buildAppBar(BuildContext context) { - final String title = FFLocalizations.of(context).getVariableText(ptText: "Sobre a Propriedade", enText: "About the Property"); + final String title = FFLocalizations.of(context).getVariableText( + ptText: "Sobre a Propriedade", enText: "About the Property"); return AppBarUtil( title: title, onBackButtonPressed: () => context.pop(), diff --git a/lib/features/property/presentation/widgets/index.dart b/lib/features/property/presentation/widgets/index.dart index e69de29b..8b137891 100644 --- a/lib/features/property/presentation/widgets/index.dart +++ b/lib/features/property/presentation/widgets/index.dart @@ -0,0 +1 @@ + diff --git a/lib/features/storage/services/database_storage_service.dart b/lib/features/storage/services/database_storage_service.dart index 25124bbc..832d2be4 100644 --- a/lib/features/storage/services/database_storage_service.dart +++ b/lib/features/storage/services/database_storage_service.dart @@ -51,14 +51,16 @@ class DatabaseService { await _createTables(database, version); } - Future _onUpgrade(Database database, int oldVersion, int newVersion) async { + Future _onUpgrade( + Database database, int oldVersion, int newVersion) async { print('Upgrading database from version $oldVersion to $newVersion...'); if (oldVersion < 2 && newVersion >= 2) { await _createTables(database, newVersion); } } - Future _onDowngrade(Database database, int oldVersion, int newVersion) async { + Future _onDowngrade( + Database database, int oldVersion, int newVersion) async { print('Downgrading database from version $oldVersion to $newVersion...'); if (oldVersion >= 2 && newVersion < 2) { await _dropTables(database); diff --git a/lib/features/storage/services/secure_storage_service.dart b/lib/features/storage/services/secure_storage_service.dart index e69de29b..8b137891 100644 --- a/lib/features/storage/services/secure_storage_service.dart +++ b/lib/features/storage/services/secure_storage_service.dart @@ -0,0 +1 @@ + diff --git a/lib/features/storage/services/shared_storage_service.dart b/lib/features/storage/services/shared_storage_service.dart index e69de29b..8b137891 100644 --- a/lib/features/storage/services/shared_storage_service.dart +++ b/lib/features/storage/services/shared_storage_service.dart @@ -0,0 +1 @@ + diff --git a/lib/features/storage/services/storage_service.dart b/lib/features/storage/services/storage_service.dart index e69de29b..8b137891 100644 --- a/lib/features/storage/services/storage_service.dart +++ b/lib/features/storage/services/storage_service.dart @@ -0,0 +1 @@ + diff --git a/lib/firebase_options.dart b/lib/firebase_options.dart index df4c0669..ac64bcb6 100644 --- a/lib/firebase_options.dart +++ b/lib/firebase_options.dart @@ -1,7 +1,8 @@ // File generated by FlutterFire CLI. // ignore_for_file: type=lint import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; -import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb, TargetPlatform; +import 'package:flutter/foundation.dart' + show defaultTargetPlatform, kIsWeb, TargetPlatform; /// Default [FirebaseOptions] for use with your Firebase apps. /// @@ -72,8 +73,10 @@ class DefaultFirebaseOptions { projectId: 'accessmoblie-da839', databaseURL: 'https://accessmoblie-da839.firebaseio.com', storageBucket: 'accessmoblie-da839.appspot.com', - androidClientId: '187064172787-7et0qu5p2qtmisvqgndn3kfi1b7u9ifl.apps.googleusercontent.com', - iosClientId: '187064172787-c5gs7fvp78om9r7dofkjn2qmpumkuvig.apps.googleusercontent.com', + androidClientId: + '187064172787-7et0qu5p2qtmisvqgndn3kfi1b7u9ifl.apps.googleusercontent.com', + iosClientId: + '187064172787-c5gs7fvp78om9r7dofkjn2qmpumkuvig.apps.googleusercontent.com', iosBundleId: 'br.com.freaccess.hub', ); } diff --git a/lib/flutter_flow/custom_functions.dart b/lib/flutter_flow/custom_functions.dart index 155966e4..231eef12 100644 --- a/lib/flutter_flow/custom_functions.dart +++ b/lib/flutter_flow/custom_functions.dart @@ -42,7 +42,10 @@ Future> stringToMap(String v) async { throw FormatException('Invalid key-value pair: $part of $v'); } final key = keyValue[0].trim(); - final value = keyValue.sublist(1).join(':').trim(); // Join the remaining parts to handle DateTime correctly + final value = keyValue + .sublist(1) + .join(':') + .trim(); // Join the remaining parts to handle DateTime correctly return MapEntry(key, value); }), )); diff --git a/lib/flutter_flow/custom_icons.dart b/lib/flutter_flow/custom_icons.dart index 92ede9d6..52991086 100644 --- a/lib/flutter_flow/custom_icons.dart +++ b/lib/flutter_flow/custom_icons.dart @@ -14,7 +14,8 @@ class FFIcons { static const IconData kvector1 = IconData(0xe902, fontFamily: _iconsFamily); // menu - static const IconData kiconFastPass = IconData(0xe900, fontFamily: _menuFamily); + static const IconData kiconFastPass = + IconData(0xe900, fontFamily: _menuFamily); static const IconData kvector2 = IconData(0xe905, fontFamily: _menuFamily); static const IconData kvector3 = IconData(0xe906, fontFamily: _menuFamily); } diff --git a/lib/flutter_flow/flutter_flow_animations.dart b/lib/flutter_flow/flutter_flow_animations.dart index 6f897e25..486179ca 100644 --- a/lib/flutter_flow/flutter_flow_animations.dart +++ b/lib/flutter_flow/flutter_flow_animations.dart @@ -51,8 +51,12 @@ extension AnimatedWidgetExtension on Widget { return Animate( effects: animationInfo.effects, child: this, - onPlay: (controller) => animationInfo.loop ? controller.repeat(reverse: animationInfo.reverse) : null, - onComplete: (controller) => !animationInfo.loop && animationInfo.reverse ? controller.reverse() : null, + onPlay: (controller) => animationInfo.loop + ? controller.repeat(reverse: animationInfo.reverse) + : null, + onComplete: (controller) => !animationInfo.loop && animationInfo.reverse + ? controller.reverse() + : null, ); } @@ -63,7 +67,11 @@ extension AnimatedWidgetExtension on Widget { }) { animationInfo.maybeUpdateEffects(effects); return hasBeenTriggered || animationInfo.applyInitialState - ? Animate(controller: animationInfo.controller, autoPlay: false, effects: animationInfo.effects, child: this) + ? Animate( + controller: animationInfo.controller, + autoPlay: false, + effects: animationInfo.effects, + child: this) : this; } } diff --git a/lib/flutter_flow/flutter_flow_button_tabbar.dart b/lib/flutter_flow/flutter_flow_button_tabbar.dart index d8860120..e4cd78cc 100644 --- a/lib/flutter_flow/flutter_flow_button_tabbar.dart +++ b/lib/flutter_flow/flutter_flow_button_tabbar.dart @@ -8,7 +8,8 @@ import 'package:flutter/rendering.dart'; const double _kTabHeight = 46.0; -typedef _LayoutCallback = void Function(List xOffsets, TextDirection textDirection, double width); +typedef _LayoutCallback = void Function( + List xOffsets, TextDirection textDirection, double width); class _TabLabelBarRenderer extends RenderFlex { _TabLabelBarRenderer({ @@ -33,7 +34,8 @@ class _TabLabelBarRenderer extends RenderFlex { RenderBox? child = firstChild; final List xOffsets = []; while (child != null) { - final FlexParentData childParentData = child.parentData! as FlexParentData; + final FlexParentData childParentData = + child.parentData! as FlexParentData; xOffsets.add(childParentData.offset.dx); assert(child.parentData == childParentData); child = childParentData.nextSibling; @@ -82,7 +84,8 @@ class _TabLabelBar extends Flex { } @override - void updateRenderObject(BuildContext context, _TabLabelBarRenderer renderObject) { + void updateRenderObject( + BuildContext context, _TabLabelBarRenderer renderObject) { super.updateRenderObject(context, renderObject); renderObject.onPerformLayout = onPerformLayout; } @@ -133,7 +136,8 @@ class _IndicatorPainter extends CustomPainter { assert(_currentTabOffsets!.isNotEmpty); assert(tabIndex >= 0); assert(tabIndex <= maxTabIndex); - return (_currentTabOffsets![tabIndex] + _currentTabOffsets![tabIndex + 1]) / 2.0; + return (_currentTabOffsets![tabIndex] + _currentTabOffsets![tabIndex + 1]) / + 2.0; } @override @@ -188,10 +192,12 @@ class _TabBarScrollPosition extends ScrollPositionWithSingleContext { // ballistic scroll activity. if (!_viewportDimensionWasNonZero || _needsPixelsCorrection) { _needsPixelsCorrection = false; - correctPixels(tabBar._initialScrollOffset(viewportDimension, minScrollExtent, maxScrollExtent)); + correctPixels(tabBar._initialScrollOffset( + viewportDimension, minScrollExtent, maxScrollExtent)); result = false; } - return super.applyContentDimensions(minScrollExtent, maxScrollExtent) && result; + return super.applyContentDimensions(minScrollExtent, maxScrollExtent) && + result; } void markNeedsPixelsCorrection() { @@ -207,7 +213,8 @@ class _TabBarScrollController extends ScrollController { final _FlutterFlowButtonTabBarState tabBar; @override - ScrollPosition createScrollPosition(ScrollPhysics physics, ScrollContext context, ScrollPosition? oldPosition) { + ScrollPosition createScrollPosition(ScrollPhysics physics, + ScrollContext context, ScrollPosition? oldPosition) { return _TabBarScrollPosition( physics: physics, context: context, @@ -218,7 +225,8 @@ class _TabBarScrollController extends ScrollController { } /// A Flutterflow Design widget that displays a horizontal row of tabs. -class FlutterFlowButtonTabBar extends StatefulWidget implements PreferredSizeWidget { +class FlutterFlowButtonTabBar extends StatefulWidget + implements PreferredSizeWidget { /// The [tabs] argument must not be null and its length must match the [controller]'s /// [TabController.length]. /// @@ -352,14 +360,17 @@ class FlutterFlowButtonTabBar extends StatefulWidget implements PreferredSizeWid maxHeight = math.max(itemHeight, maxHeight); } } - return Size.fromHeight(maxHeight + labelPadding.vertical + buttonMargin.vertical); + return Size.fromHeight( + maxHeight + labelPadding.vertical + buttonMargin.vertical); } @override - State createState() => _FlutterFlowButtonTabBarState(); + State createState() => + _FlutterFlowButtonTabBarState(); } -class _FlutterFlowButtonTabBarState extends State with TickerProviderStateMixin { +class _FlutterFlowButtonTabBarState extends State + with TickerProviderStateMixin { ScrollController? _scrollController; TabController? _controller; _IndicatorPainter? _indicatorPainter; @@ -383,7 +394,8 @@ class _FlutterFlowButtonTabBarState extends State with /// The animation duration is 2/3 of the tab scroll animation duration in /// Material design (kTabScrollDuration). - _animationController = AnimationController(vsync: this, duration: const Duration(milliseconds: 200)); + _animationController = AnimationController( + vsync: this, duration: const Duration(milliseconds: 200)); // so the buttons start in their "final" state (color) _animationController @@ -401,7 +413,8 @@ class _FlutterFlowButtonTabBarState extends State with bool get _controllerIsValid => _controller?.animation != null; void _updateTabController() { - final TabController? newController = widget.controller ?? DefaultTabController.maybeOf(context); + final TabController? newController = + widget.controller ?? DefaultTabController.maybeOf(context); assert(() { if (newController == null) { throw FlutterError( @@ -486,7 +499,8 @@ class _FlutterFlowButtonTabBarState extends State with int get maxTabIndex => _indicatorPainter!.maxTabIndex; - double _tabScrollOffset(int index, double viewportWidth, double minExtent, double maxExtent) { + double _tabScrollOffset( + int index, double viewportWidth, double minExtent, double maxExtent) { if (!widget.isScrollable) { return 0.0; } @@ -502,27 +516,34 @@ class _FlutterFlowButtonTabBarState extends State with break; } - return clampDouble(tabCenter + paddingStart - viewportWidth / 2.0, minExtent, maxExtent); + return clampDouble( + tabCenter + paddingStart - viewportWidth / 2.0, minExtent, maxExtent); } double _tabCenteredScrollOffset(int index) { final ScrollPosition position = _scrollController!.position; - return _tabScrollOffset(index, position.viewportDimension, position.minScrollExtent, position.maxScrollExtent); + return _tabScrollOffset(index, position.viewportDimension, + position.minScrollExtent, position.maxScrollExtent); } - double _initialScrollOffset(double viewportWidth, double minExtent, double maxExtent) { + double _initialScrollOffset( + double viewportWidth, double minExtent, double maxExtent) { return _tabScrollOffset(_currentIndex, viewportWidth, minExtent, maxExtent); } void _scrollToCurrentIndex() { final double offset = _tabCenteredScrollOffset(_currentIndex); - _scrollController!.animateTo(offset, duration: kTabScrollDuration, curve: Curves.ease); + _scrollController! + .animateTo(offset, duration: kTabScrollDuration, curve: Curves.ease); } void _scrollToControllerValue() { - final double? leadingPosition = _currentIndex > 0 ? _tabCenteredScrollOffset(_currentIndex - 1) : null; + final double? leadingPosition = + _currentIndex > 0 ? _tabCenteredScrollOffset(_currentIndex - 1) : null; final double middlePosition = _tabCenteredScrollOffset(_currentIndex); - final double? trailingPosition = _currentIndex < maxTabIndex ? _tabCenteredScrollOffset(_currentIndex + 1) : null; + final double? trailingPosition = _currentIndex < maxTabIndex + ? _tabCenteredScrollOffset(_currentIndex + 1) + : null; final double index = _controller!.index.toDouble(); final double value = _controller!.animation!.value; @@ -534,9 +555,13 @@ class _FlutterFlowButtonTabBarState extends State with } else if (value == index) { offset = middlePosition; } else if (value < index) { - offset = leadingPosition == null ? middlePosition : lerpDouble(middlePosition, leadingPosition, index - value)!; + offset = leadingPosition == null + ? middlePosition + : lerpDouble(middlePosition, leadingPosition, index - value)!; } else { - offset = trailingPosition == null ? middlePosition : lerpDouble(middlePosition, trailingPosition, value - index)!; + offset = trailingPosition == null + ? middlePosition + : lerpDouble(middlePosition, trailingPosition, value - index)!; } _scrollController!.jumpTo(offset); @@ -574,7 +599,8 @@ class _FlutterFlowButtonTabBarState extends State with } // Called each time layout completes. - void _saveTabOffsets(List tabOffsets, TextDirection textDirection, double width) { + void _saveTabOffsets( + List tabOffsets, TextDirection textDirection, double width) { _tabStripWidth = width; _indicatorPainter?.saveTabOffsets(tabOffsets, textDirection); } @@ -598,34 +624,52 @@ class _FlutterFlowButtonTabBarState extends State with } final TextStyle? textStyle = TextStyle.lerp( - (widget.unselectedLabelStyle ?? tabBarTheme.labelStyle ?? DefaultTextStyle.of(context).style).copyWith( + (widget.unselectedLabelStyle ?? + tabBarTheme.labelStyle ?? + DefaultTextStyle.of(context).style) + .copyWith( color: widget.unselectedLabelColor, ), - (widget.labelStyle ?? tabBarTheme.labelStyle ?? DefaultTextStyle.of(context).style).copyWith( + (widget.labelStyle ?? + tabBarTheme.labelStyle ?? + DefaultTextStyle.of(context).style) + .copyWith( color: widget.labelColor, ), animationValue); - final Color? textColor = Color.lerp(widget.unselectedLabelColor, widget.labelColor, animationValue); + final Color? textColor = Color.lerp( + widget.unselectedLabelColor, widget.labelColor, animationValue); - final Color? borderColor = Color.lerp(widget.unselectedBorderColor, widget.borderColor, animationValue); + final Color? borderColor = Color.lerp( + widget.unselectedBorderColor, widget.borderColor, animationValue); BoxDecoration? boxDecoration = BoxDecoration.lerp( BoxDecoration( - color: widget.unselectedDecoration?.color ?? widget.unselectedBackgroundColor ?? Colors.transparent, + color: widget.unselectedDecoration?.color ?? + widget.unselectedBackgroundColor ?? + Colors.transparent, boxShadow: widget.unselectedDecoration?.boxShadow, gradient: widget.unselectedDecoration?.gradient, - borderRadius: widget.useToggleButtonStyle ? null : BorderRadius.circular(widget.borderRadius), + borderRadius: widget.useToggleButtonStyle + ? null + : BorderRadius.circular(widget.borderRadius), ), BoxDecoration( - color: widget.decoration?.color ?? widget.backgroundColor ?? Colors.transparent, + color: widget.decoration?.color ?? + widget.backgroundColor ?? + Colors.transparent, boxShadow: widget.decoration?.boxShadow, gradient: widget.decoration?.gradient, - borderRadius: widget.useToggleButtonStyle ? null : BorderRadius.circular(widget.borderRadius), + borderRadius: widget.useToggleButtonStyle + ? null + : BorderRadius.circular(widget.borderRadius), ), animationValue); - if (widget.useToggleButtonStyle && widget.borderWidth > 0 && boxDecoration != null) { + if (widget.useToggleButtonStyle && + widget.borderWidth > 0 && + boxDecoration != null) { if (index == 0) { boxDecoration = boxDecoration.copyWith( border: Border( @@ -659,11 +703,13 @@ class _FlutterFlowButtonTabBarState extends State with return Padding( key: _tabKeys[index], // padding for the buttons - padding: widget.useToggleButtonStyle ? EdgeInsets.zero : widget.buttonMargin, + padding: + widget.useToggleButtonStyle ? EdgeInsets.zero : widget.buttonMargin, child: TextButton( onPressed: () => _handleTap(index), style: ButtonStyle( - elevation: WidgetStateProperty.all(widget.useToggleButtonStyle ? 0 : widget.elevation), + elevation: WidgetStateProperty.all( + widget.useToggleButtonStyle ? 0 : widget.elevation), /// give a pretty small minimum size minimumSize: WidgetStateProperty.all(const Size(10, 10)), @@ -729,11 +775,14 @@ class _FlutterFlowButtonTabBarState extends State with if (_controller!.length == 0) { return Container( - height: _kTabHeight + widget.labelPadding.vertical + widget.buttonMargin.vertical, + height: _kTabHeight + + widget.labelPadding.vertical + + widget.buttonMargin.vertical, ); } - final List wrappedTabs = List.generate(widget.tabs.length, (int index) { + final List wrappedTabs = + List.generate(widget.tabs.length, (int index) { return _buildStyledTab(widget.tabs[index], index); }); diff --git a/lib/flutter_flow/flutter_flow_checkbox_group.dart b/lib/flutter_flow/flutter_flow_checkbox_group.dart index 8f367952..c8714df5 100644 --- a/lib/flutter_flow/flutter_flow_checkbox_group.dart +++ b/lib/flutter_flow/flutter_flow_checkbox_group.dart @@ -37,7 +37,8 @@ class FlutterFlowCheckboxGroup extends StatefulWidget { final TextStyle? unselectedTextStyle; @override - State createState() => _FlutterFlowCheckboxGroupState(); + State createState() => + _FlutterFlowCheckboxGroupState(); } class _FlutterFlowCheckboxGroupState extends State { @@ -85,7 +86,8 @@ class _FlutterFlowCheckboxGroupState extends State { itemBuilder: (context, index) { final option = widget.options[index]; final selected = selectedValues.contains(option); - final unselectedTextStyle = widget.unselectedTextStyle ?? widget.textStyle; + final unselectedTextStyle = + widget.unselectedTextStyle ?? widget.textStyle; return Theme( data: ThemeData(unselectedWidgetColor: widget.checkboxBorderColor), child: Padding( @@ -99,7 +101,9 @@ class _FlutterFlowCheckboxGroupState extends State { if (isSelected == null) { return; } - isSelected ? checkboxValues.add(option) : checkboxValues.remove(option); + isSelected + ? checkboxValues.add(option) + : checkboxValues.remove(option); widget.controller.value = List.from(checkboxValues); setState(() {}); } @@ -107,7 +111,8 @@ class _FlutterFlowCheckboxGroupState extends State { activeColor: widget.activeColor, checkColor: widget.checkColor, shape: RoundedRectangleBorder( - borderRadius: widget.checkboxBorderRadius ?? BorderRadius.zero, + borderRadius: + widget.checkboxBorderRadius ?? BorderRadius.zero, ), materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, visualDensity: VisualDensity.compact, @@ -117,7 +122,8 @@ class _FlutterFlowCheckboxGroupState extends State { padding: widget.labelPadding ?? EdgeInsets.zero, child: Text( widget.options[index], - style: selected ? widget.textStyle : unselectedTextStyle, + style: + selected ? widget.textStyle : unselectedTextStyle, ), ), ), diff --git a/lib/flutter_flow/flutter_flow_drop_down.dart b/lib/flutter_flow/flutter_flow_drop_down.dart index 3988efa6..c82ebb61 100644 --- a/lib/flutter_flow/flutter_flow_drop_down.dart +++ b/lib/flutter_flow/flutter_flow_drop_down.dart @@ -86,10 +86,13 @@ class FlutterFlowDropDown extends StatefulWidget { class _FlutterFlowDropDownState extends State> { bool get isMultiSelect => widget.isMultiSelect; FormFieldController get controller => widget.controller!; - FormFieldController?> get multiSelectController => widget.multiSelectController!; + FormFieldController?> get multiSelectController => + widget.multiSelectController!; T? get currentValue { - final value = isMultiSelect ? multiSelectController.value?.firstOrNull : controller.value; + final value = isMultiSelect + ? multiSelectController.value?.firstOrNull + : controller.value; return widget.options.contains(value) ? value : null; } @@ -97,14 +100,17 @@ class _FlutterFlowDropDownState extends State> { if (!isMultiSelect || multiSelectController.value == null) { return {}; } - return widget.options.toSet().intersection(multiSelectController.value!.toSet()); + return widget.options + .toSet() + .intersection(multiSelectController.value!.toSet()); } Map get optionLabels => Map.fromEntries( widget.options.asMap().entries.map( (option) => MapEntry( option.value, - widget.optionLabels == null || widget.optionLabels!.length < option.key + 1 + widget.optionLabels == null || + widget.optionLabels!.length < option.key + 1 ? option.value.toString() : widget.optionLabels![option.key], ), @@ -123,7 +129,8 @@ class _FlutterFlowDropDownState extends State> { void initState() { super.initState(); if (isMultiSelect) { - _listener = () => widget.onMultiSelectChanged!(multiSelectController.value); + _listener = + () => widget.onMultiSelectChanged!(multiSelectController.value); multiSelectController.addListener(_listener); } else { _listener = () => widget.onChanged!(controller.value); @@ -158,16 +165,22 @@ class _FlutterFlowDropDownState extends State> { ), child: Padding( padding: _useDropdown2() ? EdgeInsets.zero : widget.margin, - child: widget.hidesUnderline ? DropdownButtonHideUnderline(child: dropdownWidget) : dropdownWidget, + child: widget.hidesUnderline + ? DropdownButtonHideUnderline(child: dropdownWidget) + : dropdownWidget, ), ), ); } bool _useDropdown2() => - widget.isMultiSelect || widget.isSearchable || !widget.isOverButton || widget.maxHeight != null; + widget.isMultiSelect || + widget.isSearchable || + !widget.isOverButton || + widget.maxHeight != null; - Widget _buildDropdownWidget() => _useDropdown2() ? _buildDropdown() : _buildLegacyDropdown(); + Widget _buildDropdownWidget() => + _useDropdown2() ? _buildDropdown() : _buildLegacyDropdown(); Widget _buildLegacyDropdown() { return DropdownButtonFormField( @@ -181,14 +194,20 @@ class _FlutterFlowDropDownState extends State> { dropdownColor: widget.fillColor, focusColor: Colors.transparent, decoration: InputDecoration( - labelText: widget.labelText == null || widget.labelText!.isEmpty ? null : widget.labelText, + labelText: widget.labelText == null || widget.labelText!.isEmpty + ? null + : widget.labelText, labelStyle: widget.labelTextStyle, - border: widget.hidesUnderline ? InputBorder.none : const UnderlineInputBorder(), + border: widget.hidesUnderline + ? InputBorder.none + : const UnderlineInputBorder(), ), ); } - Text? _createHintText() => widget.hintText != null ? Text(widget.hintText!, style: widget.textStyle) : null; + Text? _createHintText() => widget.hintText != null + ? Text(widget.hintText!, style: widget.textStyle) + : null; List> _createMenuItems() => widget.options .map( @@ -209,11 +228,14 @@ class _FlutterFlowDropDownState extends State> { enabled: false, child: StatefulBuilder( builder: (context, menuSetState) { - final isSelected = multiSelectController.value?.contains(item) ?? false; + final isSelected = + multiSelectController.value?.contains(item) ?? false; return InkWell( onTap: () { multiSelectController.value ??= []; - isSelected ? multiSelectController.value!.remove(item) : multiSelectController.value!.add(item); + isSelected + ? multiSelectController.value!.remove(item) + : multiSelectController.value!.add(item); multiSelectController.update(); // This rebuilds the StatefulWidget to update the button's text. setState(() {}); @@ -246,9 +268,11 @@ class _FlutterFlowDropDownState extends State> { .toList(); Widget _buildDropdown() { - final overlayColor = WidgetStateProperty.resolveWith( - (states) => states.contains(WidgetState.focused) ? Colors.transparent : null); - final iconStyleData = widget.icon != null ? IconStyleData(icon: widget.icon!) : const IconStyleData(); + final overlayColor = WidgetStateProperty.resolveWith((states) => + states.contains(WidgetState.focused) ? Colors.transparent : null); + final iconStyleData = widget.icon != null + ? IconStyleData(icon: widget.icon!) + : const IconStyleData(); return DropdownButton2( value: currentValue, hint: _createHintText(), @@ -274,14 +298,19 @@ class _FlutterFlowDropDownState extends State> { maxHeight: widget.maxHeight, padding: EdgeInsets.zero, ), - onChanged: widget.disabled ? null : (isMultiSelect ? (_) {} : (val) => widget.controller!.value = val), + onChanged: widget.disabled + ? null + : (isMultiSelect ? (_) {} : (val) => widget.controller!.value = val), isExpanded: true, selectedItemBuilder: (context) => widget.options .map((item) => Align( alignment: AlignmentDirectional.centerStart, child: Text( isMultiSelect - ? currentValues.where((v) => optionLabels.containsKey(v)).map((v) => optionLabels[v]).join(', ') + ? currentValues + .where((v) => optionLabels.containsKey(v)) + .map((v) => optionLabels[v]) + .join(', ') : optionLabels[item]!, style: widget.textStyle, maxLines: 1, @@ -321,7 +350,9 @@ class _FlutterFlowDropDownState extends State> { ), ), searchMatchFn: (item, searchValue) { - return (optionLabels[item.value] ?? '').toLowerCase().contains(searchValue.toLowerCase()); + return (optionLabels[item.value] ?? '') + .toLowerCase() + .contains(searchValue.toLowerCase()); }, ) : null, diff --git a/lib/flutter_flow/flutter_flow_icon_button.dart b/lib/flutter_flow/flutter_flow_icon_button.dart index 69e35057..6e77c8a0 100644 --- a/lib/flutter_flow/flutter_flow_icon_button.dart +++ b/lib/flutter_flow/flutter_flow_icon_button.dart @@ -90,10 +90,12 @@ class _FlutterFlowIconButtonState extends State { ), iconColor: WidgetStateProperty.resolveWith( (states) { - if (states.contains(WidgetState.disabled) && widget.disabledIconColor != null) { + if (states.contains(WidgetState.disabled) && + widget.disabledIconColor != null) { return widget.disabledIconColor; } - if (states.contains(WidgetState.hovered) && widget.hoverIconColor != null) { + if (states.contains(WidgetState.hovered) && + widget.hoverIconColor != null) { return widget.hoverIconColor; } return iconColor; @@ -101,10 +103,12 @@ class _FlutterFlowIconButtonState extends State { ), backgroundColor: WidgetStateProperty.resolveWith( (states) { - if (states.contains(WidgetState.disabled) && widget.disabledColor != null) { + if (states.contains(WidgetState.disabled) && + widget.disabledColor != null) { return widget.disabledColor; } - if (states.contains(WidgetState.hovered) && widget.hoverColor != null) { + if (states.contains(WidgetState.hovered) && + widget.hoverColor != null) { return widget.hoverColor; } diff --git a/lib/flutter_flow/flutter_flow_model.dart b/lib/flutter_flow/flutter_flow_model.dart index f5b7af2e..5a1225da 100644 --- a/lib/flutter_flow/flutter_flow_model.dart +++ b/lib/flutter_flow/flutter_flow_model.dart @@ -111,7 +111,8 @@ class FlutterFlowDynamicModels { } S? getValueAtIndex(int index, S? Function(T) getValue) { - final uniqueKey = _childrenIndexes.entries.firstWhereOrNull((e) => e.value == index)?.key; + final uniqueKey = + _childrenIndexes.entries.firstWhereOrNull((e) => e.value == index)?.key; return getValueForKey(uniqueKey, getValue); } @@ -161,5 +162,6 @@ T? _getDefaultValue() { } extension TextValidationExtensions on String? Function(BuildContext, String?)? { - String? Function(String?)? asValidator(BuildContext context) => this != null ? (val) => this!(context, val) : null; + String? Function(String?)? asValidator(BuildContext context) => + this != null ? (val) => this!(context, val) : null; } diff --git a/lib/flutter_flow/flutter_flow_theme.dart b/lib/flutter_flow/flutter_flow_theme.dart index d6607aea..d178b517 100644 --- a/lib/flutter_flow/flutter_flow_theme.dart +++ b/lib/flutter_flow/flutter_flow_theme.dart @@ -28,7 +28,8 @@ DeviceSize getDeviceSize(BuildContext context) { abstract class FlutterFlowTheme { static DeviceSize deviceSize = DeviceSize.mobile; - static Future initialize() async => _prefs = await SharedPreferences.getInstance(); + static Future initialize() async => + _prefs = await SharedPreferences.getInstance(); static ThemeMode get themeMode { final darkMode = _prefs?.getBool(kThemeModeKey); return darkMode == null @@ -38,11 +39,14 @@ abstract class FlutterFlowTheme { : ThemeMode.light; } - static void saveThemeMode(ThemeMode mode) => - mode == ThemeMode.system ? _prefs?.remove(kThemeModeKey) : _prefs?.setBool(kThemeModeKey, mode == ThemeMode.dark); + static void saveThemeMode(ThemeMode mode) => mode == ThemeMode.system + ? _prefs?.remove(kThemeModeKey) + : _prefs?.setBool(kThemeModeKey, mode == ThemeMode.dark); static FlutterFlowTheme of(BuildContext context) { // deviceSize = getDeviceSize(context); - return Theme.of(context).brightness == Brightness.dark ? DarkModeTheme() : LightModeTheme(); + return Theme.of(context).brightness == Brightness.dark + ? DarkModeTheme() + : LightModeTheme(); } @Deprecated('Use primary instead') diff --git a/lib/flutter_flow/flutter_flow_util.dart b/lib/flutter_flow/flutter_flow_util.dart index 5f27409a..a4773c37 100644 --- a/lib/flutter_flow/flutter_flow_util.dart +++ b/lib/flutter_flow/flutter_flow_util.dart @@ -68,7 +68,8 @@ Theme wrapInMaterialDatePickerTheme( required double iconSize, }) { final baseTheme = Theme.of(context); - final dateTimeMaterialStateForegroundColor = WidgetStateProperty.resolveWith((states) { + final dateTimeMaterialStateForegroundColor = + WidgetStateProperty.resolveWith((states) { if (states.contains(WidgetState.disabled)) { return pickerForegroundColor.withOpacity(0.60); } @@ -81,7 +82,8 @@ Theme wrapInMaterialDatePickerTheme( return null; }); - final dateTimeMaterialStateBackgroundColor = WidgetStateProperty.resolveWith((states) { + final dateTimeMaterialStateBackgroundColor = + WidgetStateProperty.resolveWith((states) { if (states.contains(WidgetState.selected)) { return selectedDateTimeBackgroundColor; } @@ -150,7 +152,8 @@ Theme wrapInMaterialDatePickerTheme( if (states.contains(WidgetState.hovered)) { return actionButtonForegroundColor.withOpacity(0.04); } - if (states.contains(WidgetState.focused) || states.contains(WidgetState.pressed)) { + if (states.contains(WidgetState.focused) || + states.contains(WidgetState.pressed)) { return actionButtonForegroundColor.withOpacity(0.12); } return null; @@ -255,7 +258,8 @@ Theme wrapInMaterialTimePickerTheme( if (states.contains(WidgetState.hovered)) { return actionButtonForegroundColor.withOpacity(0.04); } - if (states.contains(WidgetState.focused) || states.contains(WidgetState.pressed)) { + if (states.contains(WidgetState.focused) || + states.contains(WidgetState.pressed)) { return actionButtonForegroundColor.withOpacity(0.12); } return null; @@ -267,7 +271,9 @@ Theme wrapInMaterialTimePickerTheme( hourMinuteTextColor: pickerForegroundColor, dialHandColor: selectedDateTimeBackgroundColor, dialTextColor: WidgetStateColor.resolveWith((states) => - states.contains(WidgetState.selected) ? selectedDateTimeForegroundColor : pickerDialForegroundColor), + states.contains(WidgetState.selected) + ? selectedDateTimeForegroundColor + : pickerDialForegroundColor), dayPeriodBorderSide: BorderSide( color: pickerForegroundColor, ), @@ -276,9 +282,13 @@ Theme wrapInMaterialTimePickerTheme( fontSize: limitedFontSize, ), dayPeriodTextColor: WidgetStateColor.resolveWith((states) => - states.contains(WidgetState.selected) ? selectedDateTimeForegroundColor : pickerForegroundColor), - dayPeriodColor: WidgetStateColor.resolveWith( - (states) => states.contains(WidgetState.selected) ? selectedDateTimeBackgroundColor : Colors.transparent), + states.contains(WidgetState.selected) + ? selectedDateTimeForegroundColor + : pickerForegroundColor), + dayPeriodColor: WidgetStateColor.resolveWith((states) => + states.contains(WidgetState.selected) + ? selectedDateTimeBackgroundColor + : Colors.transparent), entryModeIconColor: pickerForegroundColor, ), ), @@ -361,7 +371,8 @@ String formatNumber( break; case FormatType.custom: final hasLocale = locale != null && locale.isNotEmpty; - formattedValue = NumberFormat(format, hasLocale ? locale : null).format(value); + formattedValue = + NumberFormat(format, hasLocale ? locale : null).format(value); } if (formattedValue.isEmpty) { @@ -369,7 +380,9 @@ String formatNumber( } if (currency != null) { - final currencySymbol = currency.isNotEmpty ? currency : NumberFormat.simpleCurrency().format(0.0).substring(0, 1); + final currencySymbol = currency.isNotEmpty + ? currency + : NumberFormat.simpleCurrency().format(0.0).substring(0, 1); formattedValue = '$currencySymbol$formattedValue'; } @@ -427,7 +440,9 @@ dynamic getJsonField( } final value = field.first.value; if (isForList) { - return value is! Iterable ? [value] : (value is List ? value : value.toList()); + return value is! Iterable + ? [value] + : (value is List ? value : value.toList()); } return value; } @@ -448,7 +463,8 @@ bool get isWeb => kIsWeb; const kBreakpointSmall = 479.0; const kBreakpointMedium = 767.0; const kBreakpointLarge = 991.0; -bool isMobileWidth(BuildContext context) => MediaQuery.sizeOf(context).width < kBreakpointSmall; +bool isMobileWidth(BuildContext context) => + MediaQuery.sizeOf(context).width < kBreakpointSmall; bool responsiveVisibility({ required BuildContext context, bool phone = true, @@ -481,21 +497,28 @@ extension FFTextEditingControllerExt on TextEditingController? { } extension IterableExt on Iterable { - List sortedList({S Function(T)? keyOf, bool desc = false}) { - final sortedAscending = toList()..sort(keyOf == null ? null : ((a, b) => keyOf(a).compareTo(keyOf(b)))); + List sortedList( + {S Function(T)? keyOf, bool desc = false}) { + final sortedAscending = toList() + ..sort(keyOf == null ? null : ((a, b) => keyOf(a).compareTo(keyOf(b)))); if (desc) { return sortedAscending.reversed.toList(); } return sortedAscending; } - List mapIndexed(S Function(int, T) func) => - toList().asMap().map((index, value) => MapEntry(index, func(index, value))).values.toList(); + List mapIndexed(S Function(int, T) func) => toList() + .asMap() + .map((index, value) => MapEntry(index, func(index, value))) + .values + .toList(); } -void setAppLanguage(BuildContext context, String language) => App.of(context).setLocale(language); +void setAppLanguage(BuildContext context, String language) => + App.of(context).setLocale(language); -void setDarkModeSetting(BuildContext context, ThemeMode themeMode) => App.of(context).setThemeMode(themeMode); +void setDarkModeSetting(BuildContext context, ThemeMode themeMode) => + App.of(context).setThemeMode(themeMode); void showSnackbar( BuildContext context, @@ -530,7 +553,9 @@ void showSnackbar( ], ), duration: Duration(seconds: duration), - backgroundColor: error ? FlutterFlowTheme.of(context).error : FlutterFlowTheme.of(context).success, + backgroundColor: error + ? FlutterFlowTheme.of(context).error + : FlutterFlowTheme.of(context).success, behavior: SnackBarBehavior.floating, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(30), @@ -539,7 +564,8 @@ void showSnackbar( ); } -void showAlertDialog(BuildContext context, String title, String content, Future Function() action) { +void showAlertDialog(BuildContext context, String title, String content, + Future Function() action) { double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context); double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context); double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context); @@ -550,12 +576,16 @@ void showAlertDialog(BuildContext context, String title, String content, Future< return AlertDialog( backgroundColor: FlutterFlowTheme.of(context).primaryBackground, title: Text(title, - style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedHeaderFontSize), + style: TextStyle( + color: FlutterFlowTheme.of(context).primaryText, + fontSize: limitedHeaderFontSize), textAlign: TextAlign.center), content: Padding( padding: const EdgeInsets.all(8.0), child: Text(content, - style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedBodyFontSize)), + style: TextStyle( + color: FlutterFlowTheme.of(context).primaryText, + fontSize: limitedBodyFontSize)), ), actions: [ Row( @@ -568,8 +598,9 @@ void showAlertDialog(BuildContext context, String title, String content, Future< width: MediaQuery.of(context).size.width * 0.3, height: 50, color: FlutterFlowTheme.of(context).primaryBackground, - textStyle: - TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedInputFontSize), + textStyle: TextStyle( + color: FlutterFlowTheme.of(context).primaryText, + fontSize: limitedInputFontSize), borderSide: BorderSide( color: FlutterFlowTheme.of(context).primaryBackground, width: 1, @@ -592,8 +623,9 @@ void showAlertDialog(BuildContext context, String title, String content, Future< height: 50, color: FlutterFlowTheme.of(context).primaryBackground, elevation: 0, - textStyle: - TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedInputFontSize), + textStyle: TextStyle( + color: FlutterFlowTheme.of(context).primaryText, + fontSize: limitedInputFontSize), splashColor: const Color.fromARGB(255, 129, 129, 129), borderSide: BorderSide( color: FlutterFlowTheme.of(context).primaryBackground, @@ -615,7 +647,9 @@ void showAlertDialog(BuildContext context, String title, String content, Future< extension FFStringExt on String { String maybeHandleOverflow({int? maxChars, String replacement = ''}) => - maxChars != null && length > maxChars ? replaceRange(maxChars, null, replacement) : this; + maxChars != null && length > maxChars + ? replaceRange(maxChars, null, replacement) + : this; } extension ListFilterExt on Iterable { @@ -624,13 +658,16 @@ extension ListFilterExt on Iterable { extension MapFilterExtensions on Map { Map get withoutNulls => Map.fromEntries( - entries.where((e) => e.value != null).map((e) => MapEntry(e.key, e.value as T)), + entries + .where((e) => e.value != null) + .map((e) => MapEntry(e.key, e.value as T)), ); } extension MapListContainsExt on List { - bool containsMap(dynamic map) => - map is Map ? any((e) => e is Map && const DeepCollectionEquality().equals(e, map)) : contains(map); + bool containsMap(dynamic map) => map is Map + ? any((e) => e is Map && const DeepCollectionEquality().equals(e, map)) + : contains(map); } extension ListDivideExt on Iterable { @@ -638,17 +675,23 @@ extension ListDivideExt on Iterable { List divide(Widget t, {bool Function(int)? filterFn}) => isEmpty ? [] - : (enumerate.map((e) => [e.value, if (filterFn == null || filterFn(e.key)) t]).expand((i) => i).toList() + : (enumerate + .map((e) => [e.value, if (filterFn == null || filterFn(e.key)) t]) + .expand((i) => i) + .toList() ..removeLast()); List around(Widget t) => addToStart(t).addToEnd(t); - List addToStart(Widget t) => enumerate.map((e) => e.value).toList()..insert(0, t); + List addToStart(Widget t) => + enumerate.map((e) => e.value).toList()..insert(0, t); - List addToEnd(Widget t) => enumerate.map((e) => e.value).toList()..add(t); + List addToEnd(Widget t) => + enumerate.map((e) => e.value).toList()..add(t); List paddingTopEach(double val) => - map((w) => Padding(padding: EdgeInsets.only(top: val), child: w)).toList(); + map((w) => Padding(padding: EdgeInsets.only(top: val), child: w)) + .toList(); } extension StatefulWidgetExtensions on State { diff --git a/lib/flutter_flow/flutter_flow_widgets.dart b/lib/flutter_flow/flutter_flow_widgets.dart index 1071e2af..6845d783 100644 --- a/lib/flutter_flow/flutter_flow_widgets.dart +++ b/lib/flutter_flow/flutter_flow_widgets.dart @@ -74,13 +74,16 @@ class _FFButtonWidgetState extends State { bool loading = false; int get maxLines => widget.options.maxLines ?? 1; - String? get text => widget.options.textStyle?.fontSize == 0 ? null : widget.text; + String? get text => + widget.options.textStyle?.fontSize == 0 ? null : widget.text; @override Widget build(BuildContext context) { Widget textWidget = loading ? SizedBox( - width: widget.options.width == null ? _getTextWidth(text, widget.options.textStyle, maxLines) : null, + width: widget.options.width == null + ? _getTextWidth(text, widget.options.textStyle, maxLines) + : null, child: Center( child: SizedBox( width: 23, @@ -95,7 +98,8 @@ class _FFButtonWidgetState extends State { ) : Text( text ?? '', - style: text == null ? null : widget.options.textStyle?.withoutColor(), + style: + text == null ? null : widget.options.textStyle?.withoutColor(), textAlign: widget.options.textAlign, maxLines: maxLines, overflow: TextOverflow.ellipsis, @@ -122,24 +126,29 @@ class _FFButtonWidgetState extends State { ButtonStyle style = ButtonStyle( shape: WidgetStateProperty.resolveWith( (states) { - if (states.contains(WidgetState.hovered) && widget.options.hoverBorderSide != null) { + if (states.contains(WidgetState.hovered) && + widget.options.hoverBorderSide != null) { return RoundedRectangleBorder( - borderRadius: widget.options.borderRadius ?? BorderRadius.circular(8), + borderRadius: + widget.options.borderRadius ?? BorderRadius.circular(8), side: widget.options.hoverBorderSide!, ); } return RoundedRectangleBorder( - borderRadius: widget.options.borderRadius ?? BorderRadius.circular(8), + borderRadius: + widget.options.borderRadius ?? BorderRadius.circular(8), side: widget.options.borderSide ?? BorderSide.none, ); }, ), foregroundColor: WidgetStateProperty.resolveWith( (states) { - if (states.contains(WidgetState.disabled) && widget.options.disabledTextColor != null) { + if (states.contains(WidgetState.disabled) && + widget.options.disabledTextColor != null) { return widget.options.disabledTextColor; } - if (states.contains(WidgetState.hovered) && widget.options.hoverTextColor != null) { + if (states.contains(WidgetState.hovered) && + widget.options.hoverTextColor != null) { return widget.options.hoverTextColor; } return widget.options.textStyle?.color ?? Colors.white; @@ -147,10 +156,12 @@ class _FFButtonWidgetState extends State { ), backgroundColor: WidgetStateProperty.resolveWith( (states) { - if (states.contains(WidgetState.disabled) && widget.options.disabledColor != null) { + if (states.contains(WidgetState.disabled) && + widget.options.disabledColor != null) { return widget.options.disabledColor; } - if (states.contains(WidgetState.hovered) && widget.options.hoverColor != null) { + if (states.contains(WidgetState.hovered) && + widget.options.hoverColor != null) { return widget.options.hoverColor; } return widget.options.color; @@ -162,11 +173,12 @@ class _FFButtonWidgetState extends State { } return widget.options.hoverColor == null ? null : Colors.transparent; }), - padding: WidgetStateProperty.all( - widget.options.padding ?? const EdgeInsets.symmetric(horizontal: 12.0, vertical: 4.0)), + padding: WidgetStateProperty.all(widget.options.padding ?? + const EdgeInsets.symmetric(horizontal: 12.0, vertical: 4.0)), elevation: WidgetStateProperty.resolveWith( (states) { - if (states.contains(WidgetState.hovered) && widget.options.hoverElevation != null) { + if (states.contains(WidgetState.hovered) && + widget.options.hoverElevation != null) { return widget.options.hoverElevation!; } return widget.options.elevation ?? 2.0; @@ -190,7 +202,8 @@ class _FFButtonWidgetState extends State { border: Border.fromBorderSide( widget.options.borderSide ?? BorderSide.none, ), - borderRadius: widget.options.borderRadius ?? BorderRadius.circular(8), + borderRadius: + widget.options.borderRadius ?? BorderRadius.circular(8), ), child: IconButton( splashRadius: 1.0, @@ -263,12 +276,13 @@ extension _WithoutColorExtension on TextStyle { } // Slightly hacky method of getting the layout width of the provided text. -double? _getTextWidth(String? text, TextStyle? style, int maxLines) => text != null - ? (TextPainter( - text: TextSpan(text: text, style: style), - textDirection: TextDirection.ltr, - maxLines: maxLines, - )..layout()) - .size - .width - : null; +double? _getTextWidth(String? text, TextStyle? style, int maxLines) => + text != null + ? (TextPainter( + text: TextSpan(text: text, style: style), + textDirection: TextDirection.ltr, + maxLines: maxLines, + )..layout()) + .size + .width + : null; diff --git a/lib/flutter_flow/form_field_controller.dart b/lib/flutter_flow/form_field_controller.dart index b8d79ccb..b8020e3b 100644 --- a/lib/flutter_flow/form_field_controller.dart +++ b/lib/flutter_flow/form_field_controller.dart @@ -15,7 +15,8 @@ class FormFieldController extends ValueNotifier { class FormListFieldController extends FormFieldController> { final List? _initialListValue; - FormListFieldController(super.initialValue) : _initialListValue = List.from(initialValue ?? []); + FormListFieldController(super.initialValue) + : _initialListValue = List.from(initialValue ?? []); @override void reset() => value = List.from(_initialListValue ?? []); diff --git a/lib/flutter_flow/internationalization.dart b/lib/flutter_flow/internationalization.dart index a7fd9712..ffb64dcd 100644 --- a/lib/flutter_flow/internationalization.dart +++ b/lib/flutter_flow/internationalization.dart @@ -9,13 +9,16 @@ class FFLocalizations { final Locale locale; - static FFLocalizations of(BuildContext context) => Localizations.of(context, FFLocalizations)!; + static FFLocalizations of(BuildContext context) => + Localizations.of(context, FFLocalizations)!; static List languages() => ['pt', 'en']; static late SharedPreferences _prefs; - static Future initialize() async => _prefs = await SharedPreferences.getInstance(); - static Future storeLocale(String locale) => _prefs.setString(_kLocaleStorageKey, locale); + static Future initialize() async => + _prefs = await SharedPreferences.getInstance(); + static Future storeLocale(String locale) => + _prefs.setString(_kLocaleStorageKey, locale); static Locale? getStoredLocale() { final locale = _prefs.getString(_kLocaleStorageKey); return locale != null && locale.isNotEmpty ? createLocale(locale) : null; @@ -23,10 +26,15 @@ class FFLocalizations { String get languageCode => locale.toString(); String? get languageShortCode => - _languagesWithShortCode.contains(locale.toString()) ? '${locale.toString()}_short' : null; - int get languageIndex => languages().contains(languageCode) ? languages().indexOf(languageCode) : 0; + _languagesWithShortCode.contains(locale.toString()) + ? '${locale.toString()}_short' + : null; + int get languageIndex => languages().contains(languageCode) + ? languages().indexOf(languageCode) + : 0; - String getText(String key) => (kTranslationsMap[key] ?? {})[locale.toString()] ?? ''; + String getText(String key) => + (kTranslationsMap[key] ?? {})[locale.toString()] ?? ''; String getVariableText({ String? ptText = '', @@ -75,12 +83,15 @@ class FFLocalizationsDelegate extends LocalizationsDelegate { bool isSupported(Locale locale) { final language = locale.toString(); return FFLocalizations.languages().contains( - language.endsWith('_') ? language.substring(0, language.length - 1) : language, + language.endsWith('_') + ? language.substring(0, language.length - 1) + : language, ); } @override - Future load(Locale locale) => SynchronousFuture(FFLocalizations(locale)); + Future load(Locale locale) => + SynchronousFuture(FFLocalizations(locale)); @override bool shouldReload(FFLocalizationsDelegate old) => false; @@ -1051,8 +1062,10 @@ final kTranslationsMap = >>[ 'en': 'FORGOT YOUR PASSWORD?', }, 'wu2f7yzo': { - 'pt': 'Não se preucupe nós vamos te ajudar, digite o email cadastrado no aplicativo e clique em enviar.', - 'en': 'Don\'t worry, we will help you, enter the email registered in the application and click send.', + 'pt': + 'Não se preucupe nós vamos te ajudar, digite o email cadastrado no aplicativo e clique em enviar.', + 'en': + 'Don\'t worry, we will help you, enter the email registered in the application and click send.', }, 'mtz8l7ft': { 'pt': 'E-mail', @@ -1167,8 +1180,10 @@ final kTranslationsMap = >>[ 'en': 'ENTER YOUR PASSWORD', }, 'ujodm2ci': { - 'pt': 'Para gerar o QR Code digite a senha cadastrada no aplicativo e clique em enviar.', - 'en': 'To generate the QR Code, enter the password registered in the application and click send.', + 'pt': + 'Para gerar o QR Code digite a senha cadastrada no aplicativo e clique em enviar.', + 'en': + 'To generate the QR Code, enter the password registered in the application and click send.', }, 'rfqrdet7': { 'pt': 'Senha', diff --git a/lib/flutter_flow/keep_alive_wrapper.dart b/lib/flutter_flow/keep_alive_wrapper.dart index 464ba0ca..286bde09 100644 --- a/lib/flutter_flow/keep_alive_wrapper.dart +++ b/lib/flutter_flow/keep_alive_wrapper.dart @@ -12,7 +12,8 @@ class KeepAliveWidgetWrapper extends StatefulWidget { State createState() => _KeepAliveWidgetWrapperState(); } -class _KeepAliveWidgetWrapperState extends State with AutomaticKeepAliveClientMixin { +class _KeepAliveWidgetWrapperState extends State + with AutomaticKeepAliveClientMixin { @override bool get wantKeepAlive => true; diff --git a/lib/flutter_flow/lat_lng.dart b/lib/flutter_flow/lat_lng.dart index 88ef1eae..9e7b8ea8 100644 --- a/lib/flutter_flow/lat_lng.dart +++ b/lib/flutter_flow/lat_lng.dart @@ -12,5 +12,8 @@ class LatLng { int get hashCode => latitude.hashCode + longitude.hashCode; @override - bool operator ==(other) => other is LatLng && latitude == other.latitude && longitude == other.longitude; + bool operator ==(other) => + other is LatLng && + latitude == other.latitude && + longitude == other.longitude; } diff --git a/lib/flutter_flow/nav/nav.dart b/lib/flutter_flow/nav/nav.dart index 8af1b46b..3178c5fd 100644 --- a/lib/flutter_flow/nav/nav.dart +++ b/lib/flutter_flow/nav/nav.dart @@ -86,10 +86,20 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { builder: (context, _) { return FutureBuilder( future: () async { - final bool isLogged = await StorageHelper().get(SecureStorageKey.isLogged.value) == 'true'; - final bool haveLocal = await StorageHelper().get(SecureStorageKey.haveLocal.value) == 'true'; - final bool haveUserUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key))?.isNotEmpty ?? false; - final bool haveDevUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key))?.isNotEmpty ?? false; + final bool isLogged = + await StorageHelper().get(SecureStorageKey.isLogged.value) == + 'true'; + final bool haveLocal = + await StorageHelper().get(SecureStorageKey.haveLocal.value) == + 'true'; + final bool haveUserUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) + ?.isNotEmpty ?? + false; + final bool haveDevUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) + ?.isNotEmpty ?? + false; if (isLogged && haveDevUUID && haveUserUUID) { return haveLocal @@ -99,17 +109,20 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { create: (context) => MenuBloc( style: MenuView.list_grid, item: EnumMenuItem.button, - entries: MenuEntry.getEntriesByType(MenuEntryType.Home), + entries: MenuEntry.getEntriesByType( + MenuEntryType.Home), )..add(MenuEvent()), ), BlocProvider( create: (context) => HomeBloc()..add(HomeEvent()), ), BlocProvider( - create: (context) => LocalProfileBloc()..add(LocalProfileEvent()), + create: (context) => + LocalProfileBloc()..add(LocalProfileEvent()), ), ], - child: HomePageWidget(key: UniqueKey(), LocalsRepositoryImpl().update), + child: HomePageWidget( + key: UniqueKey(), LocalsRepositoryImpl().update), ) : const ReceptionPageWidget(); } else { @@ -133,8 +146,10 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { name: 'forgotPassword', path: '/forgotPassword', builder: (context, params) { - late final String email = params.getParam('email', ParamType.String); - late final String token = params.getParam('token', ParamType.String); + late final String email = + params.getParam('email', ParamType.String); + late final String token = + params.getParam('token', ParamType.String); return ForgotPasswordScreen( key: UniqueKey(), @@ -151,7 +166,8 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { name: 'homePage', path: '/homePage', builder: (context, params) { - final Future Function(BuildContext context)? update = params.getParam('update', ParamType.Function); + final Future Function(BuildContext context)? update = + params.getParam('update', ParamType.Function); return MultiBlocProvider( providers: [ BlocProvider( @@ -165,39 +181,115 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { create: (context) => HomeBloc()..add(HomeEvent()), ), BlocProvider( - create: (context) => LocalProfileBloc()..add(LocalProfileEvent()), + create: (context) => + LocalProfileBloc()..add(LocalProfileEvent()), ), ], child: HomePageWidget(key: UniqueKey(), update), ); }), - FFRoute(name: 'petsOnThePropertyPage', path: '/petsOnThePropertyPage', builder: (context, params) => Scaffold(body: const PetsHistoryScreen(isApp: true))), - FFRoute(name: 'vehiclesOnThePropertyPage', path: '/vehiclesOnThePropertyPage', builder: (context, params) => const VehicleOnTheProperty()), - FFRoute(name: 'receptionPage', path: '/receptionPage', builder: (context, params) => const ReceptionPageWidget()), - FFRoute(name: 'messageHistoryPage', path: '/messageHistoryPage', builder: (context, params) => const MessageHistoryPageWidget()), - FFRoute(name: 'registerVisitorPage', path: '/registerVisitorPage', builder: (context, params) => const RegisterVisitorPageWidget()), - FFRoute(name: 'scheduleCompleteVisitPage', path: '/scheduleCompleteVisitPage', builder: (context, params) => const ScheduleCompleteVisitPageWidget()), - FFRoute(name: 'deliverySchedule', path: '/deliverySchedule', builder: (context, params) => const DeliverySchedule()), - FFRoute(name: 'provisionalSchedule', path: '/provisionalSchedule', builder: (context, params) => const ProvisionalSchedule()), - FFRoute(name: 'fastPassPage', path: '/fastPassPage', builder: (context, params) => FastPassPageWidget()), - FFRoute(name: 'preferencesSettings', path: '/preferencesSettings', builder: (context, params) => PreferencesPageWidget()), - FFRoute(name: 'aboutProperty', path: '/aboutProperty', builder: (context, params) => AboutPropertyPage()), - FFRoute(name: 'residentsOnThePropertyPage', path: '/residentsOnThePropertyPage', builder: (context, params) => ResidentsOnTheProperty()), - FFRoute(name: 'visitsOnThePropertyPage', path: '/visitsOnThePropertyPage', builder: (context, params) => VisitsOnTheProperty()), - FFRoute(name: 'peopleOnThePropertyPage', path: '/peopleOnThePropertyPage', builder: (context, params) => PeopleOnThePropertyPage()), + FFRoute( + name: 'petsOnThePropertyPage', + path: '/petsOnThePropertyPage', + builder: (context, params) => + Scaffold(body: const PetsHistoryScreen(isApp: true))), + FFRoute( + name: 'vehiclesOnThePropertyPage', + path: '/vehiclesOnThePropertyPage', + builder: (context, params) => const VehicleOnTheProperty()), + FFRoute( + name: 'receptionPage', + path: '/receptionPage', + builder: (context, params) => const ReceptionPageWidget()), + FFRoute( + name: 'messageHistoryPage', + path: '/messageHistoryPage', + builder: (context, params) => const MessageHistoryPageWidget()), + FFRoute( + name: 'registerVisitorPage', + path: '/registerVisitorPage', + builder: (context, params) => const RegisterVisitorPageWidget()), + FFRoute( + name: 'scheduleCompleteVisitPage', + path: '/scheduleCompleteVisitPage', + builder: (context, params) => + const ScheduleCompleteVisitPageWidget()), + FFRoute( + name: 'deliverySchedule', + path: '/deliverySchedule', + builder: (context, params) => const DeliverySchedule()), + FFRoute( + name: 'provisionalSchedule', + path: '/provisionalSchedule', + builder: (context, params) => const ProvisionalSchedule()), + FFRoute( + name: 'fastPassPage', + path: '/fastPassPage', + builder: (context, params) => FastPassPageWidget()), + FFRoute( + name: 'preferencesSettings', + path: '/preferencesSettings', + builder: (context, params) => PreferencesPageWidget()), + FFRoute( + name: 'aboutProperty', + path: '/aboutProperty', + builder: (context, params) => AboutPropertyPage()), + FFRoute( + name: 'residentsOnThePropertyPage', + path: '/residentsOnThePropertyPage', + builder: (context, params) => ResidentsOnTheProperty()), + FFRoute( + name: 'visitsOnThePropertyPage', + path: '/visitsOnThePropertyPage', + builder: (context, params) => VisitsOnTheProperty()), + FFRoute( + name: 'peopleOnThePropertyPage', + path: '/peopleOnThePropertyPage', + builder: (context, params) => PeopleOnThePropertyPage()), FFRoute( name: 'acessHistoryPage', path: '/acessHistoryPage', - builder: (context, params) => AccessHistoryScreen(opt: const {'personType': '.*', 'accessType': '.*', 'search': '.*'})), - FFRoute(name: 'provisionalHistoryPage', path: '/provisionalHistoryPage', builder: (context, params) => ProvisionalHistoryPage()), - FFRoute(name: 'liberationHistory', path: '/liberationHistory', builder: (context, params) => const LiberationHistoryWidget()), - FFRoute(name: 'signInPage', path: '/signInPage', builder: (context, params) => const SignInPageWidget()), - FFRoute(name: 'signUpPage', path: '/signUpPage', builder: (context, params) => const SignUpPageWidget()), - FFRoute(name: 'welcomePage', path: '/welcomePage', builder: (context, params) => const WelcomePageWidget()), - FFRoute(name: 'qrCodePage', path: '/qrCodePage', builder: (context, params) => const QrCodePageWidget()), - FFRoute(name: 'preferencesPage', path: '/preferencesPage', builder: (context, params) => PreferencesPageWidget()), - FFRoute(name: 'packageOrder', path: '/packageOrder', builder: (context, params) => const PackageOrderPage()), - FFRoute(name: 'reservation', path: '/reservation', builder: (context, params) => ReservationPageWidget()), + builder: (context, params) => AccessHistoryScreen(opt: const { + 'personType': '.*', + 'accessType': '.*', + 'search': '.*' + })), + FFRoute( + name: 'provisionalHistoryPage', + path: '/provisionalHistoryPage', + builder: (context, params) => ProvisionalHistoryPage()), + FFRoute( + name: 'liberationHistory', + path: '/liberationHistory', + builder: (context, params) => const LiberationHistoryWidget()), + FFRoute( + name: 'signInPage', + path: '/signInPage', + builder: (context, params) => const SignInPageWidget()), + FFRoute( + name: 'signUpPage', + path: '/signUpPage', + builder: (context, params) => const SignUpPageWidget()), + FFRoute( + name: 'welcomePage', + path: '/welcomePage', + builder: (context, params) => const WelcomePageWidget()), + FFRoute( + name: 'qrCodePage', + path: '/qrCodePage', + builder: (context, params) => const QrCodePageWidget()), + FFRoute( + name: 'preferencesPage', + path: '/preferencesPage', + builder: (context, params) => PreferencesPageWidget()), + FFRoute( + name: 'packageOrder', + path: '/packageOrder', + builder: (context, params) => const PackageOrderPage()), + FFRoute( + name: 'reservation', + path: '/reservation', + builder: (context, params) => ReservationPageWidget()), FFRoute( name: 'petsPage', path: '/petsPage', @@ -213,7 +305,9 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { extension NavParamExtensions on Map { Map get withoutNulls => Map.fromEntries( - entries.where((e) => e.value != null).map((e) => MapEntry(e.key, e.value!)), + entries + .where((e) => e.value != null) + .map((e) => MapEntry(e.key, e.value!)), ); } @@ -227,18 +321,23 @@ extension NavigationExtensions on BuildContext { } extension _GoRouterStateExtensions on GoRouterState { - Map get extraMap => extra != null ? extra as Map : {}; + Map get extraMap => + extra != null ? extra as Map : {}; Map get allParams => {} ..addAll(pathParameters) ..addAll(uri.queryParameters) ..addAll(extraMap); - TransitionInfo get transitionInfo => extraMap.containsKey(kTransitionInfoKey) ? extraMap[kTransitionInfoKey] as TransitionInfo : TransitionInfo.appDefault(); + TransitionInfo get transitionInfo => extraMap.containsKey(kTransitionInfoKey) + ? extraMap[kTransitionInfoKey] as TransitionInfo + : TransitionInfo.appDefault(); } extension GoRouterLocationExtension on GoRouter { String getCurrentLocation() { final RouteMatch lastMatch = routerDelegate.currentConfiguration.last; - final RouteMatchList matchList = lastMatch is ImperativeRouteMatch ? lastMatch.matches : routerDelegate.currentConfiguration; + final RouteMatchList matchList = lastMatch is ImperativeRouteMatch + ? lastMatch.matches + : routerDelegate.currentConfiguration; return matchList.uri.toString(); } } @@ -250,13 +349,18 @@ class FFParameters { final Map Function(String)> asyncParams; Map futureParamValues = {}; - bool get isEmpty => state.allParams.isEmpty || (state.allParams.length == 1 && state.extraMap.containsKey(kTransitionInfoKey)); - bool isAsyncParam(MapEntry param) => asyncParams.containsKey(param.key) && param.value is String; + bool get isEmpty => + state.allParams.isEmpty || + (state.allParams.length == 1 && + state.extraMap.containsKey(kTransitionInfoKey)); + bool isAsyncParam(MapEntry param) => + asyncParams.containsKey(param.key) && param.value is String; bool get hasFutures => state.allParams.entries.any(isAsyncParam); Future completeFutures() => Future.wait( state.allParams.entries.where(isAsyncParam).map( (param) async { - final doc = await asyncParams[param.key]!(param.value).onError((_, __) => null); + final doc = await asyncParams[param.key]!(param.value) + .onError((_, __) => null); if (doc != null) { futureParamValues[param.key] = doc; return true; @@ -266,12 +370,15 @@ class FFParameters { ), ).onError((_, __) => [false]).then((v) => v.every((e) => e)); - dynamic getParam(String paramName, ParamType type, {bool isList = false, StructBuilder? structBuilder}) { - if (futureParamValues.containsKey(paramName)) return futureParamValues[paramName]; + dynamic getParam(String paramName, ParamType type, + {bool isList = false, StructBuilder? structBuilder}) { + if (futureParamValues.containsKey(paramName)) + return futureParamValues[paramName]; if (!state.allParams.containsKey(paramName)) return null; final param = state.allParams[paramName]; if (param is! String) return param; - return deserializeParam(param, type, isList, structBuilder: structBuilder); + return deserializeParam(param, type, isList, + structBuilder: structBuilder); } } @@ -311,13 +418,16 @@ class FFRoute { key: state.pageKey, child: child, transitionDuration: transitionInfo.duration, - transitionsBuilder: (context, animation, secondaryAnimation, child) => PageTransition( + transitionsBuilder: + (context, animation, secondaryAnimation, child) => + PageTransition( type: transitionInfo.transitionType, duration: transitionInfo.duration, reverseDuration: transitionInfo.duration, alignment: transitionInfo.alignment, child: child, - ).buildTransitions(context, animation, secondaryAnimation, child), + ).buildTransitions( + context, animation, secondaryAnimation, child), ) : MaterialPage(key: state.pageKey, child: child); }, @@ -338,7 +448,8 @@ class TransitionInfo { final Duration duration; final Alignment? alignment; - static TransitionInfo appDefault() => const TransitionInfo(hasTransition: false); + static TransitionInfo appDefault() => + const TransitionInfo(hasTransition: false); } class RootPageContext { @@ -350,8 +461,11 @@ class RootPageContext { final rootPageContext = context.read(); final isRootPage = rootPageContext?.isRootPage ?? false; final location = GoRouterState.of(context).uri.toString(); - return isRootPage && location != '/' && location != rootPageContext?.errorRoute; + return isRootPage && + location != '/' && + location != rootPageContext?.errorRoute; } - static Widget wrap(Widget child, {String? errorRoute}) => Provider.value(value: RootPageContext(true, errorRoute), child: child); + static Widget wrap(Widget child, {String? errorRoute}) => + Provider.value(value: RootPageContext(true, errorRoute), child: child); } diff --git a/lib/flutter_flow/nav/serialization_util.dart b/lib/flutter_flow/nav/serialization_util.dart index 97a91ecf..a4d36fd0 100644 --- a/lib/flutter_flow/nav/serialization_util.dart +++ b/lib/flutter_flow/nav/serialization_util.dart @@ -25,7 +25,8 @@ String placeToString(FFPlace place) => jsonEncode({ 'zipCode': place.zipCode, }); -String uploadedFileToString(FFUploadedFile uploadedFile) => uploadedFile.serialize(); +String uploadedFileToString(FFUploadedFile uploadedFile) => + uploadedFile.serialize(); String? serializeParam( dynamic param, @@ -37,7 +38,11 @@ String? serializeParam( return null; } if (isList) { - final serializedValues = (param as Iterable).map((p) => serializeParam(p, paramType, isList: false)).where((p) => p != null).map((p) => p!).toList(); + final serializedValues = (param as Iterable) + .map((p) => serializeParam(p, paramType, isList: false)) + .where((p) => p != null) + .map((p) => p!) + .toList(); return json.encode(serializedValues); } String? data; @@ -109,7 +114,9 @@ LatLng? latLngFromString(String? latLngStr) { FFPlace placeFromString(String placeStr) { final serializedData = jsonDecode(placeStr) as Map; final data = { - 'latLng': serializedData.containsKey('latLng') ? latLngFromString(serializedData['latLng'] as String) : const LatLng(0.0, 0.0), + 'latLng': serializedData.containsKey('latLng') + ? latLngFromString(serializedData['latLng'] as String) + : const LatLng(0.0, 0.0), 'name': serializedData['name'] ?? '', 'address': serializedData['address'] ?? '', 'city': serializedData['city'] ?? '', @@ -128,7 +135,8 @@ FFPlace placeFromString(String placeStr) { ); } -FFUploadedFile uploadedFileFromString(String uploadedFileStr) => FFUploadedFile.deserialize(uploadedFileStr); +FFUploadedFile uploadedFileFromString(String uploadedFileStr) => + FFUploadedFile.deserialize(uploadedFileStr); enum ParamType { int, @@ -188,7 +196,9 @@ dynamic deserializeParam( return param == 'true'; case ParamType.DateTime: final milliseconds = int.tryParse(param); - return milliseconds != null ? DateTime.fromMillisecondsSinceEpoch(milliseconds) : null; + return milliseconds != null + ? DateTime.fromMillisecondsSinceEpoch(milliseconds) + : null; case ParamType.DateTimeRange: return dateTimeRangeFromString(param); case ParamType.LatLng: diff --git a/lib/flutter_flow/permissions_util.dart b/lib/flutter_flow/permissions_util.dart index 31c0ad28..08009e6e 100644 --- a/lib/flutter_flow/permissions_util.dart +++ b/lib/flutter_flow/permissions_util.dart @@ -13,4 +13,5 @@ Future getPermissionStatus(Permission setting) async { return kPermissionStateToBool[status]!; } -Future requestPermission(Permission setting) async => await setting.request(); +Future requestPermission(Permission setting) async => + await setting.request(); diff --git a/lib/flutter_flow/random_data_util.dart b/lib/flutter_flow/random_data_util.dart index c3e508f7..6599e5a6 100644 --- a/lib/flutter_flow/random_data_util.dart +++ b/lib/flutter_flow/random_data_util.dart @@ -29,14 +29,16 @@ String randomString( if (digits) { chars += '0123456789'; } - return List.generate(randomInteger(minLength, maxLength), (index) => chars[_random.nextInt(chars.length)]).join(); + return List.generate(randomInteger(minLength, maxLength), + (index) => chars[_random.nextInt(chars.length)]).join(); } // Random date between 1970 and 2025. DateTime randomDate() { // Random max must be in range 0 < max <= 2^32. // So we have to generate the time in seconds and then convert to milliseconds. - return DateTime.fromMillisecondsSinceEpoch(randomInteger(0, 1735689600) * 1000); + return DateTime.fromMillisecondsSinceEpoch( + randomInteger(0, 1735689600) * 1000); } String randomImageUrl(int width, int height) { @@ -44,5 +46,6 @@ String randomImageUrl(int width, int height) { } Color randomColor() { - return Color.fromARGB(255, _random.nextInt(255), _random.nextInt(255), _random.nextInt(255)); + return Color.fromARGB( + 255, _random.nextInt(255), _random.nextInt(255), _random.nextInt(255)); } diff --git a/lib/flutter_flow/request_manager.dart b/lib/flutter_flow/request_manager.dart index d130fb08..f26ed03b 100644 --- a/lib/flutter_flow/request_manager.dart +++ b/lib/flutter_flow/request_manager.dart @@ -24,7 +24,8 @@ class FutureRequestManager { } // Remove the first cached result if we have reached the specified limit, // since we will be adding another. - if (!_requests.containsKey(uniqueQueryKey) && _requests.length >= cacheLimit) { + if (!_requests.containsKey(uniqueQueryKey) && + _requests.length >= cacheLimit) { _requests.remove(_requests.keys.first); } // Return the cached query result or set it to the new value. @@ -68,8 +69,9 @@ class StreamRequestManager { // Create a subscription that stores the latest result in the behavior subject. final streamSubject = BehaviorSubject(); - _requestSubscriptions[uniqueQueryKey] = - requestFn().asBroadcastStream().listen((result) => streamSubject.add(result)); + _requestSubscriptions[uniqueQueryKey] = requestFn() + .asBroadcastStream() + .listen((result) => streamSubject.add(result)); _streamSubjects[uniqueQueryKey] = streamSubject; return streamSubject.stream; @@ -87,4 +89,5 @@ class StreamRequestManager { }.forEach(clearRequest); } -String _requestKey(String? key) => key == null || key.isEmpty ? '__DEFAULT_KEY__' : key; +String _requestKey(String? key) => + key == null || key.isEmpty ? '__DEFAULT_KEY__' : key; diff --git a/lib/flutter_flow/upload_data.dart b/lib/flutter_flow/upload_data.dart index de53d20f..55bccc25 100644 --- a/lib/flutter_flow/upload_data.dart +++ b/lib/flutter_flow/upload_data.dart @@ -66,7 +66,9 @@ Future?> selectMediaWithSourceBottomSheetandFaceDetection({ enableLandmarks: true, ), ); - createUploadMediaListTile(String label, MediaSource mediaSource, IconData icon) => ListTile( + createUploadMediaListTile( + String label, MediaSource mediaSource, IconData icon) => + ListTile( title: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ @@ -109,12 +111,15 @@ Future?> selectMediaWithSourceBottomSheetandFaceDetection({ padding: const EdgeInsets.fromLTRB(0, 8, 0, 0), child: ListTile( title: Text( - FFLocalizations.of(context) - .getVariableText(ptText: "Escolha uma das opções", enText: "Choose one of the options"), + FFLocalizations.of(context).getVariableText( + ptText: "Escolha uma das opções", + enText: "Choose one of the options"), textAlign: TextAlign.center, style: GoogleFonts.getFont( pickerFontFamily, - color: FlutterFlowTheme.of(context).primaryText.withOpacity(0.65), + color: FlutterFlowTheme.of(context) + .primaryText + .withOpacity(0.65), fontWeight: FontWeight.w500, fontSize: 14, ), @@ -130,35 +135,40 @@ Future?> selectMediaWithSourceBottomSheetandFaceDetection({ if (allowPhoto && allowVideo) ...[ Expanded( child: createUploadMediaListTile( - FFLocalizations.of(context) - .getVariableText(ptText: "Galeria (Foto)", enText: "Gallery (Photo)"), + FFLocalizations.of(context).getVariableText( + ptText: "Galeria (Foto)", + enText: "Gallery (Photo)"), MediaSource.photoGallery, Icons.camera), ), Expanded( child: createUploadMediaListTile( - FFLocalizations.of(context) - .getVariableText(ptText: "Galeria (Video)", enText: "Gallery (Video)"), + FFLocalizations.of(context).getVariableText( + ptText: "Galeria (Video)", + enText: "Gallery (Video)"), MediaSource.videoGallery, Icons.videocam), ) ] else if (allowPhoto) Expanded( child: createUploadMediaListTile( - FFLocalizations.of(context).getVariableText(ptText: "Galeria", enText: "Gallery"), + FFLocalizations.of(context).getVariableText( + ptText: "Galeria", enText: "Gallery"), MediaSource.photoGallery, Icons.photo)) else Expanded( child: createUploadMediaListTile( - FFLocalizations.of(context).getVariableText(ptText: "Galeria", enText: "Gallery"), + FFLocalizations.of(context).getVariableText( + ptText: "Galeria", enText: "Gallery"), MediaSource.videoGallery, Icons.videocam), ), if (!kIsWeb) ...[ Expanded( child: createUploadMediaListTile( - FFLocalizations.of(context).getVariableText(ptText: "Camera", enText: "Camera"), + FFLocalizations.of(context).getVariableText( + ptText: "Camera", enText: "Camera"), MediaSource.camera, Icons.camera_alt), ) @@ -177,8 +187,8 @@ Future?> selectMediaWithSourceBottomSheetandFaceDetection({ maxWidth: maxWidth, maxHeight: maxHeight, imageQuality: imageQuality, - isVideo: - mediaSource == MediaSource.videoGallery || (mediaSource == MediaSource.camera && allowVideo && !allowPhoto), + isVideo: mediaSource == MediaSource.videoGallery || + (mediaSource == MediaSource.camera && allowVideo && !allowPhoto), mediaSource: mediaSource, includeDimensions: includeDimensions, includeBlurHash: includeBlurHash, @@ -193,14 +203,16 @@ Future?> selectMediaWithSourceBottomSheetandFaceDetection({ final inputImage = InputImage.fromFilePath(media.filePath!); final faces = await faceDetector.processImage(inputImage); if (faces.isEmpty) { - final String message = FFLocalizations.of(context) - .getVariableText(ptText: "Nenhuma face detectada na imagem", enText: "No face detected in the image"); + final String message = FFLocalizations.of(context).getVariableText( + ptText: "Nenhuma face detectada na imagem", + enText: "No face detected in the image"); await DialogUtil.error(context, message); return null; } if (faces.length > 1) { final String message = FFLocalizations.of(context).getVariableText( - ptText: "Mais de uma face detectada na imagem", enText: "More than one face detected in the image"); + ptText: "Mais de uma face detectada na imagem", + enText: "More than one face detected in the image"); await DialogUtil.error(context, message); return null; } @@ -223,7 +235,9 @@ Future?> selectMediaWithSourceBottomSheet({ bool includeDimensions = false, bool includeBlurHash = false, }) async { - createUploadMediaListTile(String label, MediaSource mediaSource, IconData icon) => ListTile( + createUploadMediaListTile( + String label, MediaSource mediaSource, IconData icon) => + ListTile( title: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ @@ -267,12 +281,15 @@ Future?> selectMediaWithSourceBottomSheet({ padding: const EdgeInsets.fromLTRB(0, 8, 0, 0), child: ListTile( title: Text( - FFLocalizations.of(context) - .getVariableText(ptText: "Escolha uma das opções", enText: "Choose one of the options"), + FFLocalizations.of(context).getVariableText( + ptText: "Escolha uma das opções", + enText: "Choose one of the options"), textAlign: TextAlign.center, style: GoogleFonts.getFont( pickerFontFamily, - color: FlutterFlowTheme.of(context).primaryText.withOpacity(0.65), + color: FlutterFlowTheme.of(context) + .primaryText + .withOpacity(0.65), fontWeight: FontWeight.w500, fontSize: 14, ), @@ -288,35 +305,40 @@ Future?> selectMediaWithSourceBottomSheet({ if (allowPhoto && allowVideo) ...[ Expanded( child: createUploadMediaListTile( - FFLocalizations.of(context) - .getVariableText(ptText: "Galeria (Foto)", enText: "Gallery (Photo)"), + FFLocalizations.of(context).getVariableText( + ptText: "Galeria (Foto)", + enText: "Gallery (Photo)"), MediaSource.photoGallery, Icons.camera), ), Expanded( child: createUploadMediaListTile( - FFLocalizations.of(context) - .getVariableText(ptText: "Galeria (Video)", enText: "Gallery (Video)"), + FFLocalizations.of(context).getVariableText( + ptText: "Galeria (Video)", + enText: "Gallery (Video)"), MediaSource.videoGallery, Icons.videocam), ) ] else if (allowPhoto) Expanded( child: createUploadMediaListTile( - FFLocalizations.of(context).getVariableText(ptText: "Galeria", enText: "Gallery"), + FFLocalizations.of(context).getVariableText( + ptText: "Galeria", enText: "Gallery"), MediaSource.photoGallery, Icons.photo)) else Expanded( child: createUploadMediaListTile( - FFLocalizations.of(context).getVariableText(ptText: "Galeria", enText: "Gallery"), + FFLocalizations.of(context).getVariableText( + ptText: "Galeria", enText: "Gallery"), MediaSource.videoGallery, Icons.videocam), ), if (!kIsWeb) ...[ Expanded( child: createUploadMediaListTile( - FFLocalizations.of(context).getVariableText(ptText: "Camera", enText: "Camera"), + FFLocalizations.of(context).getVariableText( + ptText: "Camera", enText: "Camera"), MediaSource.camera, Icons.camera_alt), ) @@ -335,8 +357,8 @@ Future?> selectMediaWithSourceBottomSheet({ maxWidth: maxWidth, maxHeight: maxHeight, imageQuality: imageQuality, - isVideo: - mediaSource == MediaSource.videoGallery || (mediaSource == MediaSource.camera && allowVideo && !allowPhoto), + isVideo: mediaSource == MediaSource.videoGallery || + (mediaSource == MediaSource.camera && allowVideo && !allowPhoto), mediaSource: mediaSource, includeDimensions: includeDimensions, includeBlurHash: includeBlurHash, @@ -386,7 +408,9 @@ Future?> selectMedia({ })); } - final source = mediaSource == MediaSource.camera ? ImageSource.camera : ImageSource.gallery; + final source = mediaSource == MediaSource.camera + ? ImageSource.camera + : ImageSource.gallery; final pickedMediaFuture = isVideo ? picker.pickVideo(source: source) : picker.pickImage( @@ -457,7 +481,8 @@ Future?> selectFiles({ return Future.wait(pickedFiles.files.asMap().entries.map((e) async { final index = e.key; final file = e.value; - final storagePath = _getStoragePath(storageFolderPath, file.name, false, index); + final storagePath = + _getStoragePath(storageFolderPath, file.name, false, index); return SelectedFile( storagePath: storagePath, filePath: isWeb ? null : file.path, @@ -554,7 +579,8 @@ void showUploadMessage( padding: const EdgeInsetsDirectional.only(end: 10.0), child: CircularProgressIndicator( valueColor: Theme.of(context).brightness == Brightness.dark - ? AlwaysStoppedAnimation(FlutterFlowTheme.of(context).info) + ? AlwaysStoppedAnimation( + FlutterFlowTheme.of(context).info) : null, ), ), @@ -572,10 +598,12 @@ void showUploadMessage( topRight: Radius.circular(15), ), ), - duration: showLoading ? const Duration(days: 1) : const Duration(seconds: 4), + duration: + showLoading ? const Duration(days: 1) : const Duration(seconds: 4), ), ); } -String? _removeTrailingSlash(String? path) => - path != null && path.endsWith('/') ? path.substring(0, path.length - 1) : path; +String? _removeTrailingSlash(String? path) => path != null && path.endsWith('/') + ? path.substring(0, path.length - 1) + : path; diff --git a/lib/main.dart b/lib/main.dart index 23e155e3..f2565331 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -32,7 +32,10 @@ Future _foregroundHandlerMessage(RemoteMessage message) async { } if (!Platform.isIOS) { - NotificationService.show(title: message.notification!.title!, body: message.notification!.body!, payload: Map.from(message.data)); + NotificationService.show( + title: message.notification!.title!, + body: message.notification!.body!, + payload: Map.from(message.data)); } } @@ -49,7 +52,8 @@ class App extends StatefulWidget { @override State createState() => _AppState(); - static _AppState of(BuildContext context) => context.findAncestorStateOfType<_AppState>()!; + static _AppState of(BuildContext context) => + context.findAncestorStateOfType<_AppState>()!; } class _AppState extends State { @@ -91,7 +95,8 @@ class _AppState extends State { }), ), ); - final Iterable>? localizationsDelegates = const [ + final Iterable>? localizationsDelegates = + const [ FFLocalizationsDelegate(), GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate, @@ -133,7 +138,8 @@ class _AppState extends State { await StorageHelper().set(SecureStorageKey.haveLocal.value, true); log('onMessageOpenedApp'); } else { - onMessageReceived(message.data, message.notification!.body, message.data['click_action']); + onMessageReceived(message.data, message.notification!.body, + message.data['click_action']); } }); FirebaseMessaging.instance.getInitialMessage().then((message) async { diff --git a/lib/pages/delivery_schedule_page/delivery_schedule_widget.dart b/lib/pages/delivery_schedule_page/delivery_schedule_widget.dart index 148a4220..43872127 100644 --- a/lib/pages/delivery_schedule_page/delivery_schedule_widget.dart +++ b/lib/pages/delivery_schedule_page/delivery_schedule_widget.dart @@ -50,7 +50,8 @@ class _DeliveryScheduleState extends State { }, ), title: Text( - FFLocalizations.of(context).getVariableText(enText: 'Delivery Schedule', ptText: 'Agendar Entregas'), + FFLocalizations.of(context).getVariableText( + enText: 'Delivery Schedule', ptText: 'Agendar Entregas'), style: FlutterFlowTheme.of(context).headlineMedium.override( fontFamily: 'Nunito', color: FlutterFlowTheme.of(context).primaryText, @@ -64,6 +65,7 @@ class _DeliveryScheduleState extends State { centerTitle: true, elevation: 0.0, ), - body: const SafeArea(top: true, child: ScheduleProvisionalVisitPageWidget())); + body: const SafeArea( + top: true, child: ScheduleProvisionalVisitPageWidget())); } } diff --git a/lib/pages/fast_pass_page/fast_pass_page_widget.dart b/lib/pages/fast_pass_page/fast_pass_page_widget.dart index 5c88e7a7..6cc9a845 100644 --- a/lib/pages/fast_pass_page/fast_pass_page_widget.dart +++ b/lib/pages/fast_pass_page/fast_pass_page_widget.dart @@ -24,11 +24,16 @@ class _FastPassPageWidgetState extends State { late InAppWebViewController _controllerIOS; Future> initVariables() async { - final email = (await StorageHelper().get(SecureStorageKey.email.value)) ?? ''; - final name = (await StorageHelper().get(ProfileStorageKey.userName.key)) ?? ''; - final devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final email = + (await StorageHelper().get(SecureStorageKey.email.value)) ?? ''; + final name = + (await StorageHelper().get(ProfileStorageKey.userName.key)) ?? ''; + final devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const createdAt = '0000-00-00 00:00:00'; final url = 'https://hub.freaccess.com.br/hub/fast-pass/$cliUUID'; final freUserData = @@ -54,14 +59,20 @@ class _FastPassPageWidgetState extends State { builder: (context, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { return const Center(child: CircularProgressIndicator()); - } else if (snapshot.hasError || !snapshot.hasData || snapshot.data!.isEmpty) { - return Center(child: Text(FFLocalizations.of(context).getVariableText(enText: 'Unexpected error', ptText: 'Erro inesperado'))); + } else if (snapshot.hasError || + !snapshot.hasData || + snapshot.data!.isEmpty) { + return Center( + child: Text(FFLocalizations.of(context).getVariableText( + enText: 'Unexpected error', ptText: 'Erro inesperado'))); } else { final data = snapshot.data!; final url = data['url']!; final userUUID = data['userUUID']!; final freUserData = data['freUserData']!; - return Platform.isIOS ? _buildIOSWebView(url, userUUID, freUserData) : _buildAndroidWebView(url, userUUID, freUserData); + return Platform.isIOS + ? _buildIOSWebView(url, userUUID, freUserData) + : _buildAndroidWebView(url, userUUID, freUserData); } }, ), @@ -79,9 +90,14 @@ class _FastPassPageWidgetState extends State { ), onWebViewCreated: (controller) async => _controllerIOS = controller, onLoadStop: (controller, url) async { - await controller.evaluateJavascript(source: "window.localStorage.setItem('fre-token', '\"$userUUID\"')"); - await controller.evaluateJavascript(source: "window.localStorage.setItem('fre-user-data', '$freUserData')"); - await controller.evaluateJavascript(source: "window.localStorage.setItem('enableBackButton', 'true')"); + await controller.evaluateJavascript( + source: + "window.localStorage.setItem('fre-token', '\"$userUUID\"')"); + await controller.evaluateJavascript( + source: + "window.localStorage.setItem('fre-user-data', '$freUserData')"); + await controller.evaluateJavascript( + source: "window.localStorage.setItem('enableBackButton', 'true')"); }, onUpdateVisitedHistory: (controller, uri, isVisited) { if (uri.toString().contains('/hub/home')) context.pop(); @@ -99,23 +115,30 @@ class _FastPassPageWidgetState extends State { ..setNavigationDelegate( NavigationDelegate( onPageStarted: (String url) { - final String token = "localStorage.setItem('fre-token', '\"$userUUID\"');"; - final String data = "localStorage.setItem('fre-user-data', '$freUserData');"; - const String backNavigation = "localStorage.setItem('enableBackButton', 'true');"; + final String token = + "localStorage.setItem('fre-token', '\"$userUUID\"');"; + final String data = + "localStorage.setItem('fre-user-data', '$freUserData');"; + const String backNavigation = + "localStorage.setItem('enableBackButton', 'true');"; _controllerAndroid.runJavaScript(token); _controllerAndroid.runJavaScript(data); _controllerAndroid.runJavaScript(backNavigation); }, onPageFinished: (String url) { - bool isDarkMode = SchedulerBinding.instance.platformDispatcher.platformBrightness == Brightness.dark; + bool isDarkMode = SchedulerBinding + .instance.platformDispatcher.platformBrightness == + Brightness.dark; if (isDarkMode) { _controllerAndroid.runJavaScript(WebviewUtil.jsEnableDarkMode); } }, onNavigationRequest: (NavigationRequest request) { - if (request.url.startsWith('http') || request.url.startsWith('https://api.whatsapp.com/send') || request.url.startsWith('https://wa.me')) { + if (request.url.startsWith('http') || + request.url.startsWith('https://api.whatsapp.com/send') || + request.url.startsWith('https://wa.me')) { launchUrlString(request.url); return NavigationDecision.prevent; } diff --git a/lib/pages/forgot_password_page/forgot_password_model.dart b/lib/pages/forgot_password_page/forgot_password_model.dart index 56580cac..dc6cab21 100644 --- a/lib/pages/forgot_password_page/forgot_password_model.dart +++ b/lib/pages/forgot_password_page/forgot_password_model.dart @@ -10,8 +10,10 @@ class ForgotPasswordScreenModel extends FlutterFlowModel { FocusNode? passwordRegisterFormFocusNode; TextEditingController? passwordRegisterFormTextController; late bool passwordRegisterFormVisibility; - String? Function(BuildContext, String?)? passwordRegisterFormTextControllerValidator; - String? _passwordRegisterFormTextControllerValidator(BuildContext context, String? val) { + String? Function(BuildContext, String?)? + passwordRegisterFormTextControllerValidator; + String? _passwordRegisterFormTextControllerValidator( + BuildContext context, String? val) { if (val == null || val.isEmpty) { return FFLocalizations.of(context).getVariableText( ptText: 'Campo é necessário', @@ -29,8 +31,10 @@ class ForgotPasswordScreenModel extends FlutterFlowModel { FocusNode? passwordConfirmFormFocusNode; TextEditingController? passwordConfirmFormTextController; late bool passwordConfirmFormVisibility; - String? Function(BuildContext, String?)? passwordConfirmFormTextControllerValidator; - String? _passwordConfirmFormTextControllerValidator(BuildContext context, String? val) { + String? Function(BuildContext, String?)? + passwordConfirmFormTextControllerValidator; + String? _passwordConfirmFormTextControllerValidator( + BuildContext context, String? val) { if (val == null || val.isEmpty) { return FFLocalizations.of(context).getVariableText( ptText: 'Campo é necessário', @@ -66,9 +70,11 @@ class ForgotPasswordScreenModel extends FlutterFlowModel { @override void initState(BuildContext context) { passwordRegisterFormVisibility = false; - passwordRegisterFormTextControllerValidator = _passwordRegisterFormTextControllerValidator; + passwordRegisterFormTextControllerValidator = + _passwordRegisterFormTextControllerValidator; passwordConfirmFormVisibility = false; - passwordConfirmFormTextControllerValidator = _passwordConfirmFormTextControllerValidator; + passwordConfirmFormTextControllerValidator = + _passwordConfirmFormTextControllerValidator; } @override diff --git a/lib/pages/forgot_password_page/forgot_password_screen.dart b/lib/pages/forgot_password_page/forgot_password_screen.dart index e5742371..617b46d3 100644 --- a/lib/pages/forgot_password_page/forgot_password_screen.dart +++ b/lib/pages/forgot_password_page/forgot_password_screen.dart @@ -15,7 +15,8 @@ import '../../flutter_flow/internationalization.dart'; import 'forgot_password_model.dart'; class ForgotPasswordScreen extends StatefulWidget { - const ForgotPasswordScreen({super.key, required this.email, required this.token}); + const ForgotPasswordScreen( + {super.key, required this.email, required this.token}); final String email; final String token; @@ -23,7 +24,8 @@ class ForgotPasswordScreen extends StatefulWidget { State createState() => _ForgotPasswordScreenState(); } -class _ForgotPasswordScreenState extends State with TickerProviderStateMixin { +class _ForgotPasswordScreenState extends State + with TickerProviderStateMixin { late ForgotPasswordScreenModel _model; final animationsMap = {}; @@ -147,7 +149,8 @@ class _ForgotPasswordScreenState extends State with Ticker width: MediaQuery.of(context).size.width, child: SingleChildScrollView( child: Padding( - padding: const EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0, bottom: 0.0), + padding: const EdgeInsets.only( + left: 15.0, right: 15.0, top: 10.0, bottom: 0.0), child: Container( width: double.infinity, constraints: const BoxConstraints(maxWidth: 570.0), @@ -156,7 +159,8 @@ class _ForgotPasswordScreenState extends State with Ticker borderRadius: BorderRadius.circular(12.0), ), child: Padding( - padding: const EdgeInsets.only(left: 20.0, right: 20.0, top: 10.0, bottom: 0.0), + padding: const EdgeInsets.only( + left: 20.0, right: 20.0, top: 10.0, bottom: 0.0), child: Column( mainAxisSize: MainAxisSize.max, crossAxisAlignment: CrossAxisAlignment.center, @@ -170,20 +174,25 @@ class _ForgotPasswordScreenState extends State with Ticker fontSize: 24.0, fontWeight: FontWeight.bold, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), + useGoogleFonts: + GoogleFonts.asMap().containsKey('Nunito'), ), )), Align( alignment: const AlignmentDirectional(-1.0, 0.0), child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(20.0, 24.0, 0.0, 30.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 20.0, 24.0, 0.0, 30.0), child: Text( message, textAlign: TextAlign.start, style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), ), ), ), @@ -199,26 +208,42 @@ class _ForgotPasswordScreenState extends State with Ticker controller: _model.passwordRegisterFormTextController, focusNode: _model.passwordRegisterFormFocusNode, visibility: _model.passwordRegisterFormVisibility, - onVisibilityToggle: () => setState(() => _model.passwordRegisterFormVisibility = !_model.passwordRegisterFormVisibility), - label: FFLocalizations.of(context).getVariableText(ptText: 'Nova Senha', enText: 'New Password'), - hint: FFLocalizations.of(context).getVariableText(ptText: 'Insira sua senha', enText: 'Enter your password'), - asValidator: _model.passwordRegisterFormTextControllerValidator.asValidator(context), + onVisibilityToggle: () => setState(() => + _model.passwordRegisterFormVisibility = + !_model.passwordRegisterFormVisibility), + label: FFLocalizations.of(context).getVariableText( + ptText: 'Nova Senha', enText: 'New Password'), + hint: FFLocalizations.of(context).getVariableText( + ptText: 'Insira sua senha', + enText: 'Enter your password'), + asValidator: _model + .passwordRegisterFormTextControllerValidator + .asValidator(context), ), _buildPasswordField( context, controller: _model.passwordConfirmFormTextController, focusNode: _model.passwordConfirmFormFocusNode, visibility: _model.passwordConfirmFormVisibility, - onVisibilityToggle: () => setState(() => _model.passwordConfirmFormVisibility = !_model.passwordConfirmFormVisibility), - label: FFLocalizations.of(context).getVariableText(ptText: 'Confirme a Senha', enText: 'Confirm Password'), - hint: FFLocalizations.of(context).getVariableText(ptText: 'Confirme sua senha', enText: 'Confirm your password'), - asValidator: _model.passwordConfirmFormTextControllerValidator.asValidator(context), + onVisibilityToggle: () => setState(() => + _model.passwordConfirmFormVisibility = + !_model.passwordConfirmFormVisibility), + label: FFLocalizations.of(context).getVariableText( + ptText: 'Confirme a Senha', + enText: 'Confirm Password'), + hint: FFLocalizations.of(context).getVariableText( + ptText: 'Confirme sua senha', + enText: 'Confirm your password'), + asValidator: _model + .passwordConfirmFormTextControllerValidator + .asValidator(context), ), ], ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 0.0, 0.0, 0.0, 16.0), child: FFButtonWidget( key: const ValueKey('SubmitButtonWidget'), onPressed: _model.isFormInvalid() @@ -240,16 +265,22 @@ class _ForgotPasswordScreenState extends State with Ticker width: double.infinity, height: 44.0, color: FlutterFlowTheme.of(context).accent1, - textStyle: FlutterFlowTheme.of(context).titleSmall.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).secondaryText, - fontSize: 16.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans')), + textStyle: FlutterFlowTheme.of(context) + .titleSmall + .override( + fontFamily: 'Plus Jakarta Sans', + color: + FlutterFlowTheme.of(context).secondaryText, + fontSize: 16.0, + fontWeight: FontWeight.w500, + useGoogleFonts: GoogleFonts.asMap() + .containsKey('Plus Jakarta Sans')), elevation: 3.0, - borderSide: const BorderSide(color: Colors.transparent, width: 1.0), + borderSide: const BorderSide( + color: Colors.transparent, width: 1.0), borderRadius: BorderRadius.circular(12.0), - disabledColor: FlutterFlowTheme.of(context).customColor5, + disabledColor: + FlutterFlowTheme.of(context).customColor5, disabledTextColor: Colors.white, ), showLoadingIndicator: true, @@ -297,22 +328,28 @@ class _ForgotPasswordScreenState extends State with Ticker color: FlutterFlowTheme.of(context).primaryText, fontSize: 16.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + useGoogleFonts: + GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), ), enabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: FlutterFlowTheme.of(context).customColor1, width: 0.25), + borderSide: BorderSide( + color: FlutterFlowTheme.of(context).customColor1, + width: 0.25), borderRadius: BorderRadius.circular(12.0), ), focusedBorder: OutlineInputBorder( - borderSide: const BorderSide(color: Color(0xFF1AAB5F), width: 0.25), + borderSide: + const BorderSide(color: Color(0xFF1AAB5F), width: 0.25), borderRadius: BorderRadius.circular(12.0), ), errorBorder: OutlineInputBorder( - borderSide: const BorderSide(color: Color(0xFFFF5963), width: 0.25), + borderSide: + const BorderSide(color: Color(0xFFFF5963), width: 0.25), borderRadius: BorderRadius.circular(12.0), ), focusedErrorBorder: OutlineInputBorder( - borderSide: const BorderSide(color: Color(0xFFFF5963), width: 0.25), + borderSide: + const BorderSide(color: Color(0xFFFF5963), width: 0.25), borderRadius: BorderRadius.circular(12.0), ), filled: true, @@ -322,7 +359,9 @@ class _ForgotPasswordScreenState extends State with Ticker onTap: onVisibilityToggle, focusNode: FocusNode(skipTraversal: true), child: Icon( - visibility ? Icons.visibility_outlined : Icons.visibility_off_outlined, + visibility + ? Icons.visibility_outlined + : Icons.visibility_off_outlined, color: FlutterFlowTheme.of(context).accent1, size: 24.0, ), @@ -333,7 +372,8 @@ class _ForgotPasswordScreenState extends State with Ticker color: FlutterFlowTheme.of(context).primaryText, fontSize: 16.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + useGoogleFonts: + GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), ), validator: asValidator, ), diff --git a/lib/pages/liberation_history/liberation_history_model.dart b/lib/pages/liberation_history/liberation_history_model.dart index f51d5d65..dc93f26b 100644 --- a/lib/pages/liberation_history/liberation_history_model.dart +++ b/lib/pages/liberation_history/liberation_history_model.dart @@ -27,7 +27,8 @@ class LiberationHistoryModel extends FlutterFlowModel { requestFn: requestFn, ); void clearGetLiberationsCache() => _getLiberationsManager.clear(); - void clearGetLiberationsCacheKey(String? uniqueKey) => _getLiberationsManager.clearRequest(uniqueKey); + void clearGetLiberationsCacheKey(String? uniqueKey) => + _getLiberationsManager.clearRequest(uniqueKey); @override void initState(BuildContext context) { @@ -36,11 +37,18 @@ class LiberationHistoryModel extends FlutterFlowModel { Future init() async { devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } - Future answersRequest({required BuildContext context, required String? ref, required String? task, required String? response, required String? id}) async { + Future answersRequest( + {required BuildContext context, + required String? ref, + required String? task, + required String? response, + required String? id}) async { final ApiCallResponse? respondeSolicitacaoCall; final RespondeSolicitacaoCall callback = PhpGroup.respondeSolicitacaoCall; diff --git a/lib/pages/liberation_history/liberation_history_widget.dart b/lib/pages/liberation_history/liberation_history_widget.dart index 50f060d4..53c22e26 100644 --- a/lib/pages/liberation_history/liberation_history_widget.dart +++ b/lib/pages/liberation_history/liberation_history_widget.dart @@ -19,7 +19,8 @@ class LiberationHistoryWidget extends StatefulWidget { const LiberationHistoryWidget({super.key}); @override - State createState() => _LiberationHistoryWidgetState(); + State createState() => + _LiberationHistoryWidgetState(); } class _LiberationHistoryWidgetState extends State { @@ -54,22 +55,35 @@ class _LiberationHistoryWidgetState extends State { Map _labelsHashMap(dynamic request, bool details) { return Map.from({ - '${FFLocalizations.of(context).getVariableText(ptText: 'Nome', enText: 'Name')}:': request['VTE_NOME'], + '${FFLocalizations.of(context).getVariableText(ptText: 'Nome', enText: 'Name')}:': + request['VTE_NOME'], '${FFLocalizations.of(context).getVariableText(ptText: 'Dt. Envio', enText: 'Date Send')}:': - request['NOT_DTENVIO'] != null ? ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', request['NOT_DTENVIO']) : '', - '${FFLocalizations.of(context).getVariableText(ptText: 'Motivo', enText: 'Reason')}:': request['NOT_MOTIVO'], - if (details == true) '${FFLocalizations.of(context).getVariableText(ptText: 'Mensagem', enText: 'Message')}:': request['NOT_MSGENVIO'], + request['NOT_DTENVIO'] != null + ? ValidatorUtil.toLocalDateTime( + 'yyyy-MM-dd HH:mm:ss', request['NOT_DTENVIO']) + : '', + '${FFLocalizations.of(context).getVariableText(ptText: 'Motivo', enText: 'Reason')}:': + request['NOT_MOTIVO'], + if (details == true) + '${FFLocalizations.of(context).getVariableText(ptText: 'Mensagem', enText: 'Message')}:': + request['NOT_MSGENVIO'], }); } Map _statusHashMap(dynamic request) { return Map.from({ if (request['NOT_STATUS'] == 'L') - FFLocalizations.of(context).getVariableText(ptText: 'Finalizado', enText: 'Finished'): FlutterFlowTheme.of(context).success + FFLocalizations.of(context).getVariableText( + ptText: 'Finalizado', + enText: 'Finished'): FlutterFlowTheme.of(context).success else if (request['NOT_STATUS'] == 'B') - FFLocalizations.of(context).getVariableText(ptText: 'Bloqueado', enText: 'Blocked'): FlutterFlowTheme.of(context).error + FFLocalizations.of(context).getVariableText( + ptText: 'Bloqueado', + enText: 'Blocked'): FlutterFlowTheme.of(context).error else - FFLocalizations.of(context).getVariableText(ptText: 'Ativo', enText: 'Active'): FlutterFlowTheme.of(context).warning + FFLocalizations.of(context).getVariableText( + ptText: 'Ativo', + enText: 'Active'): FlutterFlowTheme.of(context).warning }); } @@ -135,12 +149,16 @@ class _LiberationHistoryWidgetState extends State { mainAxisSize: MainAxisSize.max, children: [ Center( - child: Text(FFLocalizations.of(context).getVariableText(ptText: "Nenhuma solicitação encontrada!", enText: "No requests found")), + child: Text(FFLocalizations.of(context).getVariableText( + ptText: "Nenhuma solicitação encontrada!", + enText: "No requests found")), ) ], ), ) - else if (_hasData == true && _loading == false && _requestWrap.isNotEmpty) + else if (_hasData == true && + _loading == false && + _requestWrap.isNotEmpty) Expanded(child: _listItems(context)), if (_loading == true) Container( @@ -197,7 +215,8 @@ class _LiberationHistoryWidgetState extends State { buttons: [ if (liberationHistoryItem['NOT_STATUS'] == 'S') FFButtonWidget( - text: FFLocalizations.of(context).getVariableText(ptText: "Aceitar", enText: "Accept"), + text: FFLocalizations.of(context) + .getVariableText(ptText: "Aceitar", enText: "Accept"), options: FFButtonOptions( width: 130, height: 40, @@ -252,7 +271,8 @@ class _LiberationHistoryWidgetState extends State { ), if (liberationHistoryItem['NOT_STATUS'] == 'S') FFButtonWidget( - text: FFLocalizations.of(context).getVariableText(ptText: "Bloquear", enText: "Block"), + text: FFLocalizations.of(context) + .getVariableText(ptText: "Bloquear", enText: "Block"), options: FFButtonOptions( width: 130, height: 40, @@ -335,7 +355,8 @@ class _LiberationHistoryWidgetState extends State { return null; } catch (e, s) { await DialogUtil.errorDefault(context); - LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Solicitações", e, s); + LogUtil.requestAPIFailed( + "proccessRequest.php", "", "Consulta de Solicitações", e, s); setState(() { _hasData = false; _loading = false; @@ -348,7 +369,8 @@ class _LiberationHistoryWidgetState extends State { ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text( - FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."), + FFLocalizations.of(context).getVariableText( + ptText: "Não há mais dados.", enText: "No more data."), style: TextStyle( color: Colors.white, fontSize: LimitedFontSizeUtil.getBodyFontSize(context), diff --git a/lib/pages/message_history_page/message_history_page_model.dart b/lib/pages/message_history_page/message_history_page_model.dart index 81ec3075..68efb77d 100644 --- a/lib/pages/message_history_page/message_history_page_model.dart +++ b/lib/pages/message_history_page/message_history_page_model.dart @@ -5,7 +5,8 @@ import 'package:hub/flutter_flow/flutter_flow_model.dart'; import 'package:hub/flutter_flow/request_manager.dart'; import 'package:hub/pages/message_history_page/message_history_page_widget.dart'; -class MessageHistoryPageModel extends FlutterFlowModel { +class MessageHistoryPageModel + extends FlutterFlowModel { late final String devUUID; late final String userUUID; late final String cliUUID; @@ -16,7 +17,8 @@ class MessageHistoryPageModel extends FlutterFlowModel String? Function(BuildContext, String?)? textControllerValidator; TabController? tabBarController; - int get tabBarCurrentIndex => tabBarController != null ? tabBarController!.index : 0; + int get tabBarCurrentIndex => + tabBarController != null ? tabBarController!.index : 0; final _getLiberationsManager = StreamRequestManager(); Stream getLiberations({ @@ -30,7 +32,8 @@ class MessageHistoryPageModel extends FlutterFlowModel requestFn: requestFn, ); void clearGetLiberationsCache() => _getLiberationsManager.clear(); - void clearGetLiberationsCacheKey(String? uniqueKey) => _getLiberationsManager.clearRequest(uniqueKey); + void clearGetLiberationsCacheKey(String? uniqueKey) => + _getLiberationsManager.clearRequest(uniqueKey); @override void initState(BuildContext context) { @@ -39,8 +42,10 @@ class MessageHistoryPageModel extends FlutterFlowModel Future init() async { devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } @override diff --git a/lib/pages/message_history_page/message_history_page_widget.dart b/lib/pages/message_history_page/message_history_page_widget.dart index 74682ac9..98f1effd 100644 --- a/lib/pages/message_history_page/message_history_page_widget.dart +++ b/lib/pages/message_history_page/message_history_page_widget.dart @@ -14,10 +14,12 @@ class MessageHistoryPageWidget extends StatefulWidget { const MessageHistoryPageWidget({super.key}); @override - State createState() => _MessageHistoryPageWidgetState(); + State createState() => + _MessageHistoryPageWidgetState(); } -class _MessageHistoryPageWidgetState extends State with TickerProviderStateMixin { +class _MessageHistoryPageWidgetState extends State + with TickerProviderStateMixin { late MessageHistoryPageModel _model; final scaffoldKey = GlobalKey(); @@ -43,25 +45,27 @@ class _MessageHistoryPageWidgetState extends State wit _scrollController = ScrollController() ..addListener(() { - if (_scrollController.position.atEdge && _scrollController.position.pixels != 0) { + if (_scrollController.position.atEdge && + _scrollController.position.pixels != 0) { _loadMore(); } }); - _model.tabBarController = TabController(vsync: this, length: 3, initialIndex: 0) - ..addListener(() { - if (_model.tabBarController?.index == 0) { - _destinyType = "P"; - } else if (_model.tabBarController?.index == 1) { - _destinyType = "A"; - } else { - _destinyType = "T"; - } + _model.tabBarController = + TabController(vsync: this, length: 3, initialIndex: 0) + ..addListener(() { + if (_model.tabBarController?.index == 0) { + _destinyType = "P"; + } else if (_model.tabBarController?.index == 1) { + _destinyType = "A"; + } else { + _destinyType = "T"; + } - _pageNumber = 1; - _messageWrap = []; - _messageFuture = fetchMessage(); - }); + _pageNumber = 1; + _messageWrap = []; + _messageFuture = fetchMessage(); + }); _model.textController ??= TextEditingController(); _model.textFieldFocusNode ??= FocusNode(); @@ -120,7 +124,8 @@ class _MessageHistoryPageWidgetState extends State wit return null; } catch (e, s) { await DialogUtil.errorDefault(context); - LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Mensagems", e, s); + LogUtil.requestAPIFailed( + "proccessRequest.php", "", "Consulta de Mensagems", e, s); setState(() { _hasData = false; _loading = false; @@ -175,7 +180,8 @@ class _MessageHistoryPageWidgetState extends State wit Widget _body(BuildContext context) { double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context); - double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context); + double limitedSubHeaderFontSize = + LimitedFontSizeUtil.getSubHeaderFontSize(context); return SafeArea( top: true, child: Column( @@ -191,7 +197,8 @@ class _MessageHistoryPageWidgetState extends State wit fontFamily: FlutterFlowTheme.of(context).titleMediumFamily, fontSize: limitedBodyFontSize, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).titleMediumFamily), ), unselectedLabelStyle: const TextStyle(), indicatorColor: FlutterFlowTheme.of(context).primary, @@ -226,7 +233,10 @@ class _MessageHistoryPageWidgetState extends State wit mainAxisSize: MainAxisSize.max, children: [ Center( - child: Text(FFLocalizations.of(context).getVariableText(ptText: "Nenhuma mensagem encontrada!", enText: "No message found"), + child: Text( + FFLocalizations.of(context).getVariableText( + ptText: "Nenhuma mensagem encontrada!", + enText: "No message found"), style: TextStyle( color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedSubHeaderFontSize, @@ -272,7 +282,8 @@ class _MessageHistoryPageWidgetState extends State wit ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text( - FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."), + FFLocalizations.of(context).getVariableText( + ptText: "Não há mais dados.", enText: "No more data."), style: TextStyle( color: Colors.white, fontSize: LimitedFontSizeUtil.getBodyFontSize(context), @@ -286,7 +297,8 @@ class _MessageHistoryPageWidgetState extends State wit Widget _item(BuildContext context, dynamic jsonBody) { double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context); - double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context); + double limitedSubHeaderFontSize = + LimitedFontSizeUtil.getSubHeaderFontSize(context); return Padding( padding: const EdgeInsets.symmetric(horizontal: 15), child: Card( @@ -337,7 +349,8 @@ class _MessageHistoryPageWidgetState extends State wit padding: const EdgeInsets.only(left: 5), child: Icon( Icons.history, - color: FlutterFlowTheme.of(context).customColor6, + color: + FlutterFlowTheme.of(context).customColor6, size: 15, ), ), @@ -347,7 +360,8 @@ class _MessageHistoryPageWidgetState extends State wit style: TextStyle( fontWeight: FontWeight.bold, fontSize: limitedBodyFontSize, - color: FlutterFlowTheme.of(context).customColor6, + color: + FlutterFlowTheme.of(context).customColor6, ), overflow: TextOverflow.ellipsis, ), @@ -362,7 +376,8 @@ class _MessageHistoryPageWidgetState extends State wit padding: const EdgeInsets.only(left: 5), child: Icon( Icons.message, - color: FlutterFlowTheme.of(context).customColor6, + color: + FlutterFlowTheme.of(context).customColor6, size: 15, ), ), @@ -371,7 +386,8 @@ class _MessageHistoryPageWidgetState extends State wit jsonBody['MSG_TEXTO'].toString(), style: TextStyle( fontSize: limitedBodyFontSize, - color: FlutterFlowTheme.of(context).customColor6, + color: + FlutterFlowTheme.of(context).customColor6, ), ), ), diff --git a/lib/pages/package_order_page/package_order_page.dart b/lib/pages/package_order_page/package_order_page.dart index 0ac4b95d..8bbbd340 100644 --- a/lib/pages/package_order_page/package_order_page.dart +++ b/lib/pages/package_order_page/package_order_page.dart @@ -56,7 +56,8 @@ class _PackageOrderPage extends State { _scrollController = ScrollController() ..addListener(() { - if (_scrollController.position.atEdge && _scrollController.position.pixels != 0) { + if (_scrollController.position.atEdge && + _scrollController.position.pixels != 0) { _loadMoreOrders(); } }); @@ -64,7 +65,8 @@ class _PackageOrderPage extends State { } Future initDatabase() async { - cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key) ?? ''); + cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key) ?? ''); } @override @@ -79,7 +81,8 @@ class _PackageOrderPage extends State { ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text( - FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."), + FFLocalizations.of(context).getVariableText( + ptText: "Não há mais dados.", enText: "No more data."), style: TextStyle( color: Colors.white, fontSize: LimitedFontSizeUtil.getBodyFontSize(context), @@ -96,7 +99,10 @@ class _PackageOrderPage extends State { setState(() => _loading = true); var response = await PhpGroup.buscaEnconcomendas.call( - pageSize: _pageSize.toString(), page: _pageNumber.toString(), adresseeType: _adresseeType == '.*' ? 'TOD' : _adresseeType, status: _status == '.*' ? 'all' : _status); + pageSize: _pageSize.toString(), + page: _pageNumber.toString(), + adresseeType: _adresseeType == '.*' ? 'TOD' : _adresseeType, + status: _status == '.*' ? 'all' : _status); final List orders = response.jsonBody['value']['list'] ?? []; @@ -160,25 +166,30 @@ class _PackageOrderPage extends State { child: IconButton( icon: const Icon(Icons.filter_list), onPressed: () async { - final Map? selectedFilter = await showModalBottomSheet>( - isScrollControlled: true, - backgroundColor: Colors.transparent, - context: context, - builder: (context) { - return GestureDetector( - onTap: () => Navigator.of(context).pop(), - child: Container( - color: Colors.transparent, - child: GestureDetector( - onTap: () {}, - child: OrderFilterModalWidget( - defaultAdresseeType: _selectedTypeSubject.value['adresseeType'] ?? '.*', - defaultStatus: _selectedTypeSubject.value['status'] ?? '.*', + final Map? selectedFilter = + await showModalBottomSheet>( + isScrollControlled: true, + backgroundColor: Colors.transparent, + context: context, + builder: (context) { + return GestureDetector( + onTap: () => Navigator.of(context).pop(), + child: Container( + color: Colors.transparent, + child: GestureDetector( + onTap: () {}, + child: OrderFilterModalWidget( + defaultAdresseeType: _selectedTypeSubject + .value['adresseeType'] ?? + '.*', + defaultStatus: + _selectedTypeSubject.value['status'] ?? + '.*', + ), + ), ), - ), - ), - ); - }); + ); + }); if (selectedFilter != null) { _updateFilterAction(selectedFilter); @@ -221,7 +232,9 @@ class _PackageOrderPage extends State { return AppBar( backgroundColor: FlutterFlowTheme.of(context).primaryBackground, automaticallyImplyLeading: false, - title: Text(FFLocalizations.of(context).getVariableText(enText: 'Orders', ptText: 'Encomendas'), + title: Text( + FFLocalizations.of(context) + .getVariableText(enText: 'Orders', ptText: 'Encomendas'), style: FlutterFlowTheme.of(context).headlineMedium.override( fontFamily: 'Nunito', color: FlutterFlowTheme.of(context).primaryText, @@ -252,7 +265,9 @@ class _PackageOrderPage extends State { children: [ Center( child: Text( - FFLocalizations.of(context).getVariableText(ptText: "Nenhuma encomenda encontrada!", enText: "No orders found!"), + FFLocalizations.of(context).getVariableText( + ptText: "Nenhuma encomenda encontrada!", + enText: "No orders found!"), style: TextStyle( color: FlutterFlowTheme.of(context).primaryText, fontSize: LimitedFontSizeUtil.getHeaderFontSize(context), @@ -302,26 +317,48 @@ class _PackageOrderPage extends State { Map _labelsHashMap(dynamic order) { return Map.from({ - if (order['isPending'] == true) '${FFLocalizations.of(context).getVariableText(ptText: 'Cód. Retirada', enText: 'Pickup Code')}:': order['id'].toString(), - '${FFLocalizations.of(context).getVariableText(ptText: 'Categoria', enText: 'Category')}:': order['customCategory'], - '${FFLocalizations.of(context).getVariableText(ptText: 'Recebido em', enText: 'Received on')}:': ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', order['dtReceive']), + if (order['isPending'] == true) + '${FFLocalizations.of(context).getVariableText(ptText: 'Cód. Retirada', enText: 'Pickup Code')}:': + order['id'].toString(), + '${FFLocalizations.of(context).getVariableText(ptText: 'Categoria', enText: 'Category')}:': + order['customCategory'], + '${FFLocalizations.of(context).getVariableText(ptText: 'Recebido em', enText: 'Received on')}:': + ValidatorUtil.toLocalDateTime( + 'yyyy-MM-dd HH:mm:ss', order['dtReceive']), if (order['isPending'] == false) - '${FFLocalizations.of(context).getVariableText(ptText: 'Retirado em', enText: 'Picked up on')}:': ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', order['dtPickUp']), + '${FFLocalizations.of(context).getVariableText(ptText: 'Retirado em', enText: 'Picked up on')}:': + ValidatorUtil.toLocalDateTime( + 'yyyy-MM-dd HH:mm:ss', order['dtPickUp']), }); } Map _labelsHashMapDialog(dynamic order) { return Map.from({ - if (order['isPending'] == true) '${FFLocalizations.of(context).getVariableText(ptText: 'Cód. Retirada', enText: 'Pickup Code')}:': order['id'].toString(), - '${FFLocalizations.of(context).getVariableText(ptText: 'Categoria', enText: 'Category')}:': order['customCategory'], - if (order['code'] != null) '${FFLocalizations.of(context).getVariableText(ptText: 'Cód. Objeto', enText: 'Object Code')}:': order['code'], - '${FFLocalizations.of(context).getVariableText(ptText: 'Entregue por', enText: 'Delivered by')}:': order['sendedBy'], - '${FFLocalizations.of(context).getVariableText(ptText: 'Recebido por', enText: 'Received by')}:': order['receivedBy'], - '${FFLocalizations.of(context).getVariableText(ptText: 'Recebido em', enText: 'Received on')}:': ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', order['dtReceive']), - if (order['isPending'] == false) '${FFLocalizations.of(context).getVariableText(ptText: 'Retirado por', enText: 'Picked up by')}:': order['pickedUpBy'], + if (order['isPending'] == true) + '${FFLocalizations.of(context).getVariableText(ptText: 'Cód. Retirada', enText: 'Pickup Code')}:': + order['id'].toString(), + '${FFLocalizations.of(context).getVariableText(ptText: 'Categoria', enText: 'Category')}:': + order['customCategory'], + if (order['code'] != null) + '${FFLocalizations.of(context).getVariableText(ptText: 'Cód. Objeto', enText: 'Object Code')}:': + order['code'], + '${FFLocalizations.of(context).getVariableText(ptText: 'Entregue por', enText: 'Delivered by')}:': + order['sendedBy'], + '${FFLocalizations.of(context).getVariableText(ptText: 'Recebido por', enText: 'Received by')}:': + order['receivedBy'], + '${FFLocalizations.of(context).getVariableText(ptText: 'Recebido em', enText: 'Received on')}:': + ValidatorUtil.toLocalDateTime( + 'yyyy-MM-dd HH:mm:ss', order['dtReceive']), if (order['isPending'] == false) - '${FFLocalizations.of(context).getVariableText(ptText: 'Retirado em', enText: 'Picked up on')}:': ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', order['dtPickUp']), - if (order['message'] != null) '${FFLocalizations.of(context).getVariableText(ptText: 'Mensagem', enText: 'Message')}:': order['message'] + '${FFLocalizations.of(context).getVariableText(ptText: 'Retirado por', enText: 'Picked up by')}:': + order['pickedUpBy'], + if (order['isPending'] == false) + '${FFLocalizations.of(context).getVariableText(ptText: 'Retirado em', enText: 'Picked up on')}:': + ValidatorUtil.toLocalDateTime( + 'yyyy-MM-dd HH:mm:ss', order['dtPickUp']), + if (order['message'] != null) + '${FFLocalizations.of(context).getVariableText(ptText: 'Mensagem', enText: 'Message')}:': + order['message'] }); } @@ -329,11 +366,15 @@ class _PackageOrderPage extends State { return [ if (order['isPending'] == true) Map.from({ - FFLocalizations.of(context).getVariableText(ptText: 'Aguardando Retirada', enText: 'Waiting Pick up'): FlutterFlowTheme.of(context).warning, + FFLocalizations.of(context).getVariableText( + ptText: 'Aguardando Retirada', + enText: 'Waiting Pick up'): FlutterFlowTheme.of(context).warning, }) else Map.from({ - FFLocalizations.of(context).getVariableText(ptText: 'Retirado', enText: 'Picked up'): FlutterFlowTheme.of(context).primary, + FFLocalizations.of(context).getVariableText( + ptText: 'Retirado', + enText: 'Picked up'): FlutterFlowTheme.of(context).primary, }), if (order['adresseeType'] == 'PRO') Map.from({ @@ -369,11 +410,16 @@ class _PackageOrderPage extends State { statusHashMap: [ if (order['isPending'] == true) Map.from({ - FFLocalizations.of(context).getVariableText(ptText: 'Aguardando Retirada', enText: 'Waiting Pick up'): FlutterFlowTheme.of(context).warning, + FFLocalizations.of(context).getVariableText( + ptText: 'Aguardando Retirada', + enText: 'Waiting Pick up'): + FlutterFlowTheme.of(context).warning, }) else Map.from({ - FFLocalizations.of(context).getVariableText(ptText: 'Retirado', enText: 'Picked up'): FlutterFlowTheme.of(context).primary, + FFLocalizations.of(context).getVariableText( + ptText: 'Retirado', enText: 'Picked up'): + FlutterFlowTheme.of(context).primary, }), ], buttons: const [], diff --git a/lib/pages/people_on_the_property_page/people_on_the_property_page_model.dart b/lib/pages/people_on_the_property_page/people_on_the_property_page_model.dart index de07033f..90228bc3 100644 --- a/lib/pages/people_on_the_property_page/people_on_the_property_page_model.dart +++ b/lib/pages/people_on_the_property_page/people_on_the_property_page_model.dart @@ -2,7 +2,8 @@ import 'package:flutter/material.dart'; import 'package:hub/flutter_flow/flutter_flow_model.dart'; import 'package:hub/pages/people_on_the_property_page/people_on_the_property_page_widget.dart'; -class PeopleOnThePropertyPageModel extends FlutterFlowModel { +class PeopleOnThePropertyPageModel + extends FlutterFlowModel { /// State fields for stateful widgets in this page. final unfocusNode = FocusNode(); diff --git a/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart b/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart index 1c4b13ec..09a545b1 100644 --- a/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart +++ b/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart @@ -15,7 +15,8 @@ class PeopleOnThePropertyPage extends StatefulWidget { const PeopleOnThePropertyPage({super.key}); @override - State createState() => _PeopleOnThePropertyPageState(); + State createState() => + _PeopleOnThePropertyPageState(); } class _PeopleOnThePropertyPageState extends State { @@ -97,7 +98,12 @@ class _PeopleOnThePropertyPageState extends State { if (snapshot.hasError || snapshot.data?.exception != null) { if (snapshot.error != null && snapshot.stackTrace != null) { - LogUtil.requestAPIFailed('getPessoasLocal.php', "", 'Busca Pessoas no Local', snapshot.error, snapshot.stackTrace!); + LogUtil.requestAPIFailed( + 'getPessoasLocal.php', + "", + 'Busca Pessoas no Local', + snapshot.error, + snapshot.stackTrace!); } return Center( @@ -105,7 +111,9 @@ class _PeopleOnThePropertyPageState extends State { width: double.infinity, height: 100, child: Text( - FFLocalizations.of(context).getVariableText(ptText: "Pessoas não encontradas", enText: "Persons not found"), + FFLocalizations.of(context).getVariableText( + ptText: "Pessoas não encontradas", + enText: "Persons not found"), textAlign: TextAlign.center, ), ), @@ -154,13 +162,17 @@ class _PeopleOnThePropertyPageState extends State { r'''$.USU_NOME''', ).toString(), style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, fontSize: 14.0, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), ), ), - ].divide(const SizedBox(width: 20.0)).addToStart(const SizedBox(width: 40.0)), + ] + .divide(const SizedBox(width: 20.0)) + .addToStart(const SizedBox(width: 40.0)), ); }, ); diff --git a/lib/pages/pets_on_the_property_page/pets_history_screen.dart b/lib/pages/pets_on_the_property_page/pets_history_screen.dart index d66ff2b8..98ad75cb 100644 --- a/lib/pages/pets_on_the_property_page/pets_history_screen.dart +++ b/lib/pages/pets_on_the_property_page/pets_history_screen.dart @@ -23,7 +23,8 @@ class PetsHistoryScreen extends StatefulWidget { _PetsHistoryScreenState createState() => _PetsHistoryScreenState(); } -class _PetsHistoryScreenState extends State with TickerProviderStateMixin { +class _PetsHistoryScreenState extends State + with TickerProviderStateMixin { late ScrollController _scrollController; int _pageNumber = 1; @@ -38,11 +39,13 @@ class _PetsHistoryScreenState extends State with TickerProvid @override void initState() { super.initState(); - model = widget.model ?? createModel(context, () => PetsPageModel(isInteractive: false)); + model = widget.model ?? + createModel(context, () => PetsPageModel(isInteractive: false)); _petsFuture = _fetch(); _scrollController = ScrollController() ..addListener(() { - if (_scrollController.position.atEdge && _scrollController.position.pixels != 0) { + if (_scrollController.position.atEdge && + _scrollController.position.pixels != 0) { _loadMore(); } }); @@ -125,7 +128,8 @@ class _PetsHistoryScreenState extends State with TickerProvid return null; } catch (e, s) { await DialogUtil.errorDefault(context); - LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Pets", e, s); + LogUtil.requestAPIFailed( + "proccessRequest.php", "", "Consulta de Pets", e, s); setState(() { _hasData = false; _loading = false; @@ -146,7 +150,8 @@ class _PetsHistoryScreenState extends State with TickerProvid ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text( - FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."), + FFLocalizations.of(context).getVariableText( + ptText: "Não há mais dados.", enText: "No more data."), style: TextStyle( color: Colors.white, fontSize: LimitedFontSizeUtil.getBodyFontSize(context), @@ -160,8 +165,10 @@ class _PetsHistoryScreenState extends State with TickerProvid @override Widget build(BuildContext context) { - late final double limitedBodyTextSize = LimitedFontSizeUtil.getBodyFontSize(context); - late final double limitedHeaderTextSize = LimitedFontSizeUtil.getHeaderFontSize(context); + late final double limitedBodyTextSize = + LimitedFontSizeUtil.getBodyFontSize(context); + late final double limitedHeaderTextSize = + LimitedFontSizeUtil.getHeaderFontSize(context); return Scaffold( appBar: widget.isApp ? _appBar(context) : null, @@ -177,7 +184,10 @@ class _PetsHistoryScreenState extends State with TickerProvid mainAxisSize: MainAxisSize.max, children: [ Center( - child: Text(FFLocalizations.of(context).getVariableText(ptText: "Nenhum Pet encontrado!", enText: "No pets found"), + child: Text( + FFLocalizations.of(context).getVariableText( + ptText: "Nenhum Pet encontrado!", + enText: "No pets found"), style: TextStyle( fontFamily: 'Nunito', fontSize: limitedHeaderTextSize, @@ -203,7 +213,8 @@ class _PetsHistoryScreenState extends State with TickerProvid padding: const EdgeInsets.only(right: 30, top: 10), child: Text( model.petAmountRegister == '0' - ? FFLocalizations.of(context).getVariableText(ptText: "Ilimitado", enText: "Unlimited") + ? FFLocalizations.of(context).getVariableText( + ptText: "Ilimitado", enText: "Unlimited") : "${FFLocalizations.of(context).getVariableText(ptText: "Quantidade de Pets: ", enText: "Amount of Pets: ")}$count/${model.petAmountRegister}", textAlign: TextAlign.right, style: TextStyle( @@ -240,9 +251,12 @@ class _PetsHistoryScreenState extends State with TickerProvid imagePath: 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${model.devUUID}&userUUID=${model.userUUID}&cliID=${model.cliUUID}&atividade=consultaFotoPet&petId=${uItem['id'] ?? ''}', labelsHashMap: { - '${FFLocalizations.of(context).getVariableText(ptText: "Nome", enText: "Name")}:': uItem['name'] ?? '', - '${FFLocalizations.of(context).getVariableText(ptText: "Espécie", enText: "Species")}:': uItem['species'] ?? '', - '${FFLocalizations.of(context).getVariableText(ptText: "Raça", enText: "Breed")}:': uItem['breed'] ?? '', + '${FFLocalizations.of(context).getVariableText(ptText: "Nome", enText: "Name")}:': + uItem['name'] ?? '', + '${FFLocalizations.of(context).getVariableText(ptText: "Espécie", enText: "Species")}:': + uItem['species'] ?? '', + '${FFLocalizations.of(context).getVariableText(ptText: "Raça", enText: "Breed")}:': + uItem['breed'] ?? '', }, statusHashMap: [ if (uItem['size'] == "MIN") @@ -282,7 +296,8 @@ class _PetsHistoryScreenState extends State with TickerProvid }, if (uItem['gender'] == "MAC") { - FFLocalizations.of(context).getVariableText(ptText: 'Macho', enText: 'Male'): const Color(0xFF094CB0), + FFLocalizations.of(context).getVariableText( + ptText: 'Macho', enText: 'Male'): const Color(0xFF094CB0), }, if (uItem['gender'] == "FEM") { @@ -293,10 +308,14 @@ class _PetsHistoryScreenState extends State with TickerProvid } ], onTapCardItemAction: () async { - final devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; - final cliName = (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + final devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final cliName = + (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; await showDialog( useSafeArea: true, context: context, @@ -318,11 +337,13 @@ class _PetsHistoryScreenState extends State with TickerProvid safeSetState(() { _pageNumber = 1; _petsWrap = []; - _petsFuture = _fetch().then((value) => value!.jsonBody['pets'] ?? []); + _petsFuture = + _fetch().then((value) => value!.jsonBody['pets'] ?? []); }); }).catchError((e, s) async { await DialogUtil.errorDefault(context); - LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Pets", e, s); + LogUtil.requestAPIFailed( + "proccessRequest.php", "", "Consulta de Pets", e, s); safeSetState(() { _hasData = false; _loading = false; diff --git a/lib/pages/pets_page/pets_page_model.dart b/lib/pages/pets_page/pets_page_model.dart index 0b1f93b0..b59a975a 100644 --- a/lib/pages/pets_page/pets_page_model.dart +++ b/lib/pages/pets_page/pets_page_model.dart @@ -114,8 +114,10 @@ class PetsPageModel extends FlutterFlowModel { enText: 'Select an option', ptText: 'Selecione uma opção', ); - dropDownValueController1 = FormFieldController(dropDownValue1 ??= defaultDropDownText); - dropDownValueController2 = FormFieldController(dropDownValue2 ??= defaultDropDownText); + dropDownValueController1 = + FormFieldController(dropDownValue1 ??= defaultDropDownText); + dropDownValueController2 = + FormFieldController(dropDownValue2 ??= defaultDropDownText); safeSetState?.call(); } @@ -148,9 +150,12 @@ class PetsPageModel extends FlutterFlowModel { WidgetsBinding.instance.addPostFrameCallback((_) async { devUUID = await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? ''; - userUUID = await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? ''; - cliUUID = await StorageHelper().get(ProfileStorageKey.clientUUID.key) ?? ''; - petAmountRegister = await StorageHelper().get(LocalsStorageKey.petAmount.key) ?? ''; + userUUID = + await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? ''; + cliUUID = + await StorageHelper().get(ProfileStorageKey.clientUUID.key) ?? ''; + petAmountRegister = + await StorageHelper().get(LocalsStorageKey.petAmount.key) ?? ''; }); } @@ -159,23 +164,27 @@ class PetsPageModel extends FlutterFlowModel { // updateImage!(); (() async { - Response response = - await get(Uri.parse('https://freaccess.com.br/freaccess/getImage.php?devUUID=$devUUID&userUUID=$userUUID&cliID=$cliUUID&atividade=consultaFotoPet&petId=$petId')); + Response response = await get(Uri.parse( + 'https://freaccess.com.br/freaccess/getImage.php?devUUID=$devUUID&userUUID=$userUUID&cliID=$cliUUID&atividade=consultaFotoPet&petId=$petId')); String base64 = base64Encode(response.bodyBytes); uploadedTempFile = await ImageUtils.convertToUploadFile(base64); updateImage?.call(); })(); - textControllerName = TextEditingController(text: item != null ? item['name'] ?? '' : ''); + textControllerName = + TextEditingController(text: item != null ? item['name'] ?? '' : ''); textFieldFocusName = FocusNode(); - textControllerSpecies = TextEditingController(text: item != null ? item['species'] ?? '' : ''); + textControllerSpecies = + TextEditingController(text: item != null ? item['species'] ?? '' : ''); textFieldFocusSpecies = FocusNode(); - textControllerRace = TextEditingController(text: item != null ? item['breed'] ?? '' : ''); + textControllerRace = + TextEditingController(text: item != null ? item['breed'] ?? '' : ''); textFieldFocusRace = FocusNode(); - textControllerColor = TextEditingController(text: item != null ? item['color'] ?? '' : ''); + textControllerColor = + TextEditingController(text: item != null ? item['color'] ?? '' : ''); textFieldFocusColor = FocusNode(); textControllerData = TextEditingController( @@ -187,7 +196,8 @@ class PetsPageModel extends FlutterFlowModel { textFieldFocusData = FocusNode(); - textControllerObservation = TextEditingController(text: item != null ? item['notes'] ?? '' : ''); + textControllerObservation = + TextEditingController(text: item != null ? item['notes'] ?? '' : ''); textFieldFocusObservation = FocusNode(); item != null ? dropDownValue1 = item['gender'] ?? '' : dropDownValue1 = ''; @@ -227,28 +237,39 @@ class PetsPageModel extends FlutterFlowModel { if (uploadedLocalFile == null || uploadedLocalFile!.bytes!.isEmpty) { return false; } - if (textControllerName.text.isEmpty || textControllerName.text.length > 80 || textControllerName.text == '') { + if (textControllerName.text.isEmpty || + textControllerName.text.length > 80 || + textControllerName.text == '') { return false; } - if (textControllerSpecies.text.isEmpty || textControllerSpecies.text == '') { + if (textControllerSpecies.text.isEmpty || + textControllerSpecies.text == '') { return false; } if (textControllerRace.text.isEmpty || textControllerRace.text == '') { return false; } - if (dropDownValueController1!.value == defaultDropDownText || dropDownValueController1!.value == '' || dropDownValueController1!.value == null) { + if (dropDownValueController1!.value == defaultDropDownText || + dropDownValueController1!.value == '' || + dropDownValueController1!.value == null) { return false; } - if (dropDownValueController2!.value == defaultDropDownText || dropDownValueController2!.value == '' || dropDownValueController2!.value == null) { + if (dropDownValueController2!.value == defaultDropDownText || + dropDownValueController2!.value == '' || + dropDownValueController2!.value == null) { return false; } - if (dropDownValue1 == 'Selecione uma opção' || dropDownValue1 == null || dropDownValue1 == '') { + if (dropDownValue1 == 'Selecione uma opção' || + dropDownValue1 == null || + dropDownValue1 == '') { return false; } - if (dropDownValue2 == 'Selecione uma opção' || dropDownValue2 == null || dropDownValue2 == '') { + if (dropDownValue2 == 'Selecione uma opção' || + dropDownValue2 == null || + dropDownValue2 == '') { return false; } @@ -258,7 +279,8 @@ class PetsPageModel extends FlutterFlowModel { Future updatePet() async { var img = await ImageUtils.convertImageFileToBase64(uploadedLocalFile!); img = "base64;jpeg,$img"; - final url = 'https://freaccess.com.br/freaccess/getImage.php?devUUID=$devUUID&userUUID=$userUUID&cliID=$cliUUID&atividade=consultaFotoPet&petId=$petId'; + final url = + 'https://freaccess.com.br/freaccess/getImage.php?devUUID=$devUUID&userUUID=$userUUID&cliID=$cliUUID&atividade=consultaFotoPet&petId=$petId'; final response = await PhpGroup.updatePet.call( petID: petId, image: img, @@ -287,7 +309,8 @@ class PetsPageModel extends FlutterFlowModel { } else { String errorMessage; try { - errorMessage = jsonDecode(response.jsonBody['error_msg'])[0]['message'].toString(); + errorMessage = + jsonDecode(response.jsonBody['error_msg'])[0]['message'].toString(); } catch (e) { errorMessage = FFLocalizations.of(buildContext!).getVariableText( enText: 'Failed to update pet', @@ -325,10 +348,12 @@ class PetsPageModel extends FlutterFlowModel { } else { String errorMessage; try { - errorMessage = jsonDecode(response.jsonBody['error_msg'])[0]['message'].toString(); + errorMessage = + jsonDecode(response.jsonBody['error_msg'])[0]['message'].toString(); await DialogUtil.error(buildContext!, errorMessage); } catch (e) { - if (response.jsonBody['error_msg'] == "Limite de Cadastro de Pet Atingido.") { + if (response.jsonBody['error_msg'] == + "Limite de Cadastro de Pet Atingido.") { errorMessage = FFLocalizations.of(buildContext!).getVariableText( enText: 'Pet registration limit reached', ptText: 'Limite de cadastro de pets atingido', @@ -501,31 +526,48 @@ class PetsPageModel extends FlutterFlowModel { : [], labelsHashMap: Map.from({ if (item['species'] != null && item['species'] != '') - '${FFLocalizations.of(context).getVariableText(ptText: "Espécie", enText: "Species")}:': item['species'].toString().toUpperCase(), + '${FFLocalizations.of(context).getVariableText(ptText: "Espécie", enText: "Species")}:': + item['species'].toString().toUpperCase(), if (item['breed'] != null && item['breed'] != '') - '${FFLocalizations.of(context).getVariableText(ptText: "Raça", enText: "Breed")}:': item['breed'].toString().toUpperCase(), - if (item['color'] != null && item['color'] != '') '${FFLocalizations.of(context).getVariableText(ptText: "Cor", enText: "Color")}:': item['color'].toString().toUpperCase(), + '${FFLocalizations.of(context).getVariableText(ptText: "Raça", enText: "Breed")}:': + item['breed'].toString().toUpperCase(), + if (item['color'] != null && item['color'] != '') + '${FFLocalizations.of(context).getVariableText(ptText: "Cor", enText: "Color")}:': + item['color'].toString().toUpperCase(), if (item['birthdayDate'] != null && item['birthdayDate'] != '') - '${FFLocalizations.of(context).getVariableText(ptText: "Data de Nascimento", enText: "Date of Birth")}:': ValidatorUtil.formatDateTimePicker(item['birthdayDate']), + '${FFLocalizations.of(context).getVariableText(ptText: "Data de Nascimento", enText: "Date of Birth")}:': + ValidatorUtil.formatDateTimePicker(item['birthdayDate']), if (item['gender'] != null && item['gender'] != '') - '${FFLocalizations.of(context).getVariableText(ptText: "Gênero", enText: "Gender")}:': item['gender'] == 'MAC' - ? FFLocalizations.of(context).getVariableText(ptText: 'MACHO', enText: 'MALE') - : FFLocalizations.of(context).getVariableText(enText: 'FEMALE', ptText: 'FÊMEA'), + '${FFLocalizations.of(context).getVariableText(ptText: "Gênero", enText: "Gender")}:': + item['gender'] == 'MAC' + ? FFLocalizations.of(context) + .getVariableText(ptText: 'MACHO', enText: 'MALE') + : FFLocalizations.of(context) + .getVariableText(enText: 'FEMALE', ptText: 'FÊMEA'), if (item['size'] != null && item['size'] != '') - '${FFLocalizations.of(context).getVariableText(ptText: "Porte", enText: "Size")}:': item['size'] == 'MIN' - ? FFLocalizations.of(context).getVariableText(ptText: 'MINI', enText: 'MINI') - : item['size'] == 'PEQ' - ? FFLocalizations.of(context).getVariableText(ptText: 'PEQUENO', enText: 'SMALL') - : item['size'] == 'MED' - ? FFLocalizations.of(context).getVariableText(ptText: 'MÉDIO', enText: 'MEDIUM') - : item['size'] == 'GRD' - ? FFLocalizations.of(context).getVariableText(ptText: 'GRANDE', enText: 'LARGE') - : item['size'] == 'GIG' - ? FFLocalizations.of(context).getVariableText(ptText: 'GIGANTE', enText: 'GIANT') - : '', - if (item['notes'] != null && item['notes'] != '') '${FFLocalizations.of(context).getVariableText(ptText: "Observação", enText: "Notes")}:': item['notes'] ?? '', + '${FFLocalizations.of(context).getVariableText(ptText: "Porte", enText: "Size")}:': + item['size'] == 'MIN' + ? FFLocalizations.of(context) + .getVariableText(ptText: 'MINI', enText: 'MINI') + : item['size'] == 'PEQ' + ? FFLocalizations.of(context) + .getVariableText(ptText: 'PEQUENO', enText: 'SMALL') + : item['size'] == 'MED' + ? FFLocalizations.of(context).getVariableText( + ptText: 'MÉDIO', enText: 'MEDIUM') + : item['size'] == 'GRD' + ? FFLocalizations.of(context).getVariableText( + ptText: 'GRANDE', enText: 'LARGE') + : item['size'] == 'GIG' + ? FFLocalizations.of(context).getVariableText( + ptText: 'GIGANTE', enText: 'GIANT') + : '', + if (item['notes'] != null && item['notes'] != '') + '${FFLocalizations.of(context).getVariableText(ptText: "Observação", enText: "Notes")}:': + item['notes'] ?? '', }), - imagePath: 'https://freaccess.com.br/freaccess/getImage.php?devUUID=$devUUID&userUUID=$userUUID&cliID=$cliUUID&atividade=consultaFotoPet&petId=${item['id'] ?? ''}', + imagePath: + 'https://freaccess.com.br/freaccess/getImage.php?devUUID=$devUUID&userUUID=$userUUID&cliID=$cliUUID&atividade=consultaFotoPet&petId=${item['id'] ?? ''}', statusHashMap: [ if (item['gender'] == "MAC") Map.from({ diff --git a/lib/pages/pets_page/pets_page_widget.dart b/lib/pages/pets_page/pets_page_widget.dart index a2d7c1f7..b1214838 100644 --- a/lib/pages/pets_page/pets_page_widget.dart +++ b/lib/pages/pets_page/pets_page_widget.dart @@ -28,7 +28,8 @@ class PetsPageWidget extends StatefulWidget { State createState() => _PetsPageWidgetState(); } -class _PetsPageWidgetState extends State with SingleTickerProviderStateMixin { +class _PetsPageWidgetState extends State + with SingleTickerProviderStateMixin { late PetsPageModel _model; @override @@ -78,7 +79,7 @@ class _PetsPageWidgetState extends State with SingleTickerProvid title: FFLocalizations.of(context).getVariableText( ptText: 'Cadastrar Pets', enText: 'Pets Register', - ), + ), onBackButtonPressed: () => context.pop(), ); } @@ -94,11 +95,16 @@ class _PetsPageWidgetState extends State with SingleTickerProvid context: context, model: _model, labelTab1: _model.isEditing - ? FFLocalizations.of(context).getVariableText(ptText: 'Editar', enText: 'Edit') - : FFLocalizations.of(context).getVariableText(ptText: 'Cadastrar', enText: 'Register'), - labelTab2: FFLocalizations.of(context).getVariableText(ptText: 'Consultar', enText: 'History'), + ? FFLocalizations.of(context) + .getVariableText(ptText: 'Editar', enText: 'Edit') + : FFLocalizations.of(context) + .getVariableText(ptText: 'Cadastrar', enText: 'Register'), + labelTab2: FFLocalizations.of(context) + .getVariableText(ptText: 'Consultar', enText: 'History'), controller: _model.tabBarController, - widget1: _model.isEditing ? _buildEditForm(context) : _buildRegisterForm(context), + widget1: _model.isEditing + ? _buildEditForm(context) + : _buildRegisterForm(context), widget2: PetsHistoryScreen(model: _model, isApp: false), onEditingChanged: onEditingChanged, ); @@ -106,8 +112,10 @@ class _PetsPageWidgetState extends State with SingleTickerProvid Widget _buildRegisterForm(BuildContext context) { double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context); - double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context); - double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context); + double limitedHeaderFontSize = + LimitedFontSizeUtil.getHeaderFontSize(context); + double limitedSubHeaderFontSize = + LimitedFontSizeUtil.getSubHeaderFontSize(context); return SingleChildScrollView( child: Column( @@ -126,7 +134,8 @@ class _PetsPageWidgetState extends State with SingleTickerProvid style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), fontSize: limitedHeaderFontSize, ), ), @@ -135,326 +144,437 @@ class _PetsPageWidgetState extends State with SingleTickerProvid Form( key: _model.registerFormKey, autovalidateMode: AutovalidateMode.onUserInteraction, - child: - Column(mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - Padding( - padding: const EdgeInsets.fromLTRB(0, 10, 0, 20), - child: MediaUploadButtonUtil( - onUploadComplete: _model.handleUploadComplete, - isUploading: _model.isDataUploading, - uploadedFiles: _model.uploadedLocalFile, - labelText: FFLocalizations.of(context).getVariableText( - ptText: 'Clique para adicionar a foto de seu Pet', enText: 'Click to add your Pet\'s photo'), - ), - ), - CustomInputUtil( - controller: _model.textControllerName, - validator: _model.textControllerNameValidator.asValidator(context), - focusNode: _model.textFieldFocusName, - labelText: FFLocalizations.of(context).getVariableText(ptText: 'Nome', enText: 'Name'), - hintText: FFLocalizations.of(context).getVariableText(ptText: 'Nome', enText: 'Name'), - suffixIcon: Symbols.format_color_text, - haveMaxLength: true, - onChanged: (value) => setState(() {}), - maxLength: 80, - ), - CustomInputUtil( - controller: _model.textControllerSpecies, - validator: _model.textControllerSpeciesValidator.asValidator(context), - focusNode: _model.textFieldFocusSpecies, - labelText: FFLocalizations.of(context).getVariableText(ptText: 'Espécie', enText: 'Species'), - hintText: FFLocalizations.of(context) - .getVariableText(ptText: 'Ex: Cachorro, Gato, Papagaio', enText: 'e.g. Dog, Cat, Parrot'), - suffixIcon: Symbols.sound_detection_dog_barking, - haveMaxLength: true, - onChanged: (value) => setState(() {}), - maxLength: 80, - ), - CustomInputUtil( - controller: _model.textControllerRace, - validator: _model.textControllerRaceValidator.asValidator(context), - focusNode: _model.textFieldFocusRace, - labelText: FFLocalizations.of(context).getVariableText(ptText: 'Raça', enText: 'Race'), - hintText: FFLocalizations.of(context).getVariableText( - ptText: 'Ex: Labrador, Poodle, Siamês, Persa', enText: 'e.g. Labrador, Poodle, Siamese, Persian'), - suffixIcon: Icons.pets_outlined, - haveMaxLength: true, - onChanged: (value) => setState(() {}), - maxLength: 80, - ), - CustomInputUtil( - controller: _model.textControllerColor, - validator: _model.textControllerColorValidator.asValidator(context), - focusNode: _model.textFieldFocusColor, - labelText: FFLocalizations.of(context).getVariableText(ptText: 'Cor', enText: 'Color'), - hintText: FFLocalizations.of(context) - .getVariableText(ptText: 'Ex: Preto, Amarelo, Branco', enText: 'e.g. Black, Yellow, White'), - suffixIcon: Symbols.palette, - haveMaxLength: true, - onChanged: (value) => setState(() {}), - maxLength: 80, - ), - Padding( - padding: const EdgeInsets.fromLTRB(0, 0, 0, 15), - child: Row( - mainAxisSize: MainAxisSize.max, - children: [ - SizedBox( - width: MediaQuery.of(context).size.width, - height: 60.0, - child: Stack( - children: [ - Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), - child: TextFormField( - controller: _model.textControllerData, - focusNode: _model.textFieldFocusData, - cursorColor: FlutterFlowTheme.of(context).primary, - readOnly: true, - autovalidateMode: AutovalidateMode.onUserInteraction, - autofocus: false, - obscureText: false, - decoration: InputDecoration( - isDense: true, - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).labelMediumFamily), - fontSize: limitedInputFontSize, + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Padding( + padding: const EdgeInsets.fromLTRB(0, 10, 0, 20), + child: MediaUploadButtonUtil( + onUploadComplete: _model.handleUploadComplete, + isUploading: _model.isDataUploading, + uploadedFiles: _model.uploadedLocalFile, + labelText: FFLocalizations.of(context).getVariableText( + ptText: 'Clique para adicionar a foto de seu Pet', + enText: 'Click to add your Pet\'s photo'), + ), + ), + CustomInputUtil( + controller: _model.textControllerName, + validator: _model.textControllerNameValidator + .asValidator(context), + focusNode: _model.textFieldFocusName, + labelText: FFLocalizations.of(context) + .getVariableText(ptText: 'Nome', enText: 'Name'), + hintText: FFLocalizations.of(context) + .getVariableText(ptText: 'Nome', enText: 'Name'), + suffixIcon: Symbols.format_color_text, + haveMaxLength: true, + onChanged: (value) => setState(() {}), + maxLength: 80, + ), + CustomInputUtil( + controller: _model.textControllerSpecies, + validator: _model.textControllerSpeciesValidator + .asValidator(context), + focusNode: _model.textFieldFocusSpecies, + labelText: FFLocalizations.of(context).getVariableText( + ptText: 'Espécie', enText: 'Species'), + hintText: FFLocalizations.of(context).getVariableText( + ptText: 'Ex: Cachorro, Gato, Papagaio', + enText: 'e.g. Dog, Cat, Parrot'), + suffixIcon: Symbols.sound_detection_dog_barking, + haveMaxLength: true, + onChanged: (value) => setState(() {}), + maxLength: 80, + ), + CustomInputUtil( + controller: _model.textControllerRace, + validator: _model.textControllerRaceValidator + .asValidator(context), + focusNode: _model.textFieldFocusRace, + labelText: FFLocalizations.of(context) + .getVariableText(ptText: 'Raça', enText: 'Race'), + hintText: FFLocalizations.of(context).getVariableText( + ptText: 'Ex: Labrador, Poodle, Siamês, Persa', + enText: 'e.g. Labrador, Poodle, Siamese, Persian'), + suffixIcon: Icons.pets_outlined, + haveMaxLength: true, + onChanged: (value) => setState(() {}), + maxLength: 80, + ), + CustomInputUtil( + controller: _model.textControllerColor, + validator: _model.textControllerColorValidator + .asValidator(context), + focusNode: _model.textFieldFocusColor, + labelText: FFLocalizations.of(context) + .getVariableText(ptText: 'Cor', enText: 'Color'), + hintText: FFLocalizations.of(context).getVariableText( + ptText: 'Ex: Preto, Amarelo, Branco', + enText: 'e.g. Black, Yellow, White'), + suffixIcon: Symbols.palette, + haveMaxLength: true, + onChanged: (value) => setState(() {}), + maxLength: 80, + ), + Padding( + padding: const EdgeInsets.fromLTRB(0, 0, 0, 15), + child: Row( + mainAxisSize: MainAxisSize.max, + children: [ + SizedBox( + width: MediaQuery.of(context).size.width, + height: 60.0, + child: Stack( + children: [ + Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0.0, 24.0, 0.0), + child: TextFormField( + controller: _model.textControllerData, + focusNode: _model.textFieldFocusData, + cursorColor: + FlutterFlowTheme.of(context).primary, + readOnly: true, + autovalidateMode: + AutovalidateMode.onUserInteraction, + autofocus: false, + obscureText: false, + decoration: InputDecoration( + isDense: true, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), + fontSize: limitedInputFontSize, + ), + hintText: FFLocalizations.of(context) + .getVariableText( + ptText: 'Data de Nascimento', + enText: 'Date of Birth', ), - hintText: FFLocalizations.of(context).getVariableText( - ptText: 'Data de Nascimento', - enText: 'Date of Birth', - ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).labelMediumFamily), - lineHeight: 1.0, - fontSize: limitedInputFontSize, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), + lineHeight: 1.0, + fontSize: limitedInputFontSize, + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of(context) + .customColor6, + width: 0.5, + ), + borderRadius: + BorderRadius.circular(10.0), + ), + focusedBorder: OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of(context) + .primary, + width: 0.5, + ), + borderRadius: + BorderRadius.circular(10.0), + ), + errorBorder: OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of(context) + .error, + width: 0.5, + ), + borderRadius: + BorderRadius.circular(10.0), + ), + focusedErrorBorder: OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of(context) + .error, + width: 0.5, + ), + borderRadius: + BorderRadius.circular(10.0), + ), + suffixIcon: Icon( + Icons.date_range, + color: FlutterFlowTheme.of(context) + .accent1, ), - enabledBorder: OutlineInputBorder( - borderSide: BorderSide( - color: FlutterFlowTheme.of(context).customColor6, - width: 0.5, ), - borderRadius: BorderRadius.circular(10.0), - ), - focusedBorder: OutlineInputBorder( - borderSide: BorderSide( - color: FlutterFlowTheme.of(context).primary, - width: 0.5, - ), - borderRadius: BorderRadius.circular(10.0), - ), - errorBorder: OutlineInputBorder( - borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, - width: 0.5, - ), - borderRadius: BorderRadius.circular(10.0), - ), - focusedErrorBorder: OutlineInputBorder( - borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, - width: 0.5, - ), - borderRadius: BorderRadius.circular(10.0), - ), - suffixIcon: Icon( - Icons.date_range, - color: FlutterFlowTheme.of(context).accent1, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: + FlutterFlowTheme.of(context) + .bodyMediumFamily, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), + lineHeight: 1.8, + fontSize: limitedInputFontSize, + ), + textAlign: TextAlign.start, + validator: _model + .textControllerDataValidator + .asValidator(context), ), ), - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), - lineHeight: 1.8, - fontSize: limitedInputFontSize, - ), - textAlign: TextAlign.start, - validator: _model.textControllerDataValidator.asValidator(context), - ), - ), - Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), - child: InkWell( - splashColor: Colors.transparent, - focusColor: Colors.transparent, - hoverColor: Colors.transparent, - highlightColor: Colors.transparent, - onTap: () async { - final pickedDate = await showDatePicker( - context: context, - initialDate: getCurrentTimestamp, - firstDate: DateTime(1990), - lastDate: DateTime.now(), - builder: (context, child) { - return wrapInMaterialDatePickerTheme( - context, - child!, - headerBackgroundColor: FlutterFlowTheme.of(context).primary, - headerForegroundColor: FlutterFlowTheme.of(context).info, - headerTextStyle: FlutterFlowTheme.of(context).headlineLarge.override( - fontFamily: FlutterFlowTheme.of(context).headlineLargeFamily, - fontSize: limitedInputFontSize, - letterSpacing: 0.0, - fontWeight: FontWeight.w600, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).headlineLargeFamily), - ), - pickerBackgroundColor: FlutterFlowTheme.of(context).primaryBackground, - pickerForegroundColor: FlutterFlowTheme.of(context).primaryText, - selectedDateTimeBackgroundColor: FlutterFlowTheme.of(context).primary, - selectedDateTimeForegroundColor: FlutterFlowTheme.of(context).info, - actionButtonForegroundColor: FlutterFlowTheme.of(context).primaryText, - iconSize: 24.0, + Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0.0, 24.0, 0.0), + child: InkWell( + splashColor: Colors.transparent, + focusColor: Colors.transparent, + hoverColor: Colors.transparent, + highlightColor: Colors.transparent, + onTap: () async { + final pickedDate = await showDatePicker( + context: context, + initialDate: getCurrentTimestamp, + firstDate: DateTime(1990), + lastDate: DateTime.now(), + builder: (context, child) { + return wrapInMaterialDatePickerTheme( + context, + child!, + headerBackgroundColor: + FlutterFlowTheme.of(context) + .primary, + headerForegroundColor: + FlutterFlowTheme.of(context) + .info, + headerTextStyle: + FlutterFlowTheme.of(context) + .headlineLarge + .override( + fontFamily: FlutterFlowTheme + .of(context) + .headlineLargeFamily, + fontSize: + limitedInputFontSize, + letterSpacing: 0.0, + fontWeight: + FontWeight.w600, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of( + context) + .headlineLargeFamily), + ), + pickerBackgroundColor: + FlutterFlowTheme.of(context) + .primaryBackground, + pickerForegroundColor: + FlutterFlowTheme.of(context) + .primaryText, + selectedDateTimeBackgroundColor: + FlutterFlowTheme.of(context) + .primary, + selectedDateTimeForegroundColor: + FlutterFlowTheme.of(context) + .info, + actionButtonForegroundColor: + FlutterFlowTheme.of(context) + .primaryText, + iconSize: 24.0, + ); + }, ); + + if (pickedDate != null) { + setState(() { + _model.selectedDate = DateTime( + pickedDate.year, + pickedDate.month, + pickedDate.day, + ); + + _model.textControllerData = + TextEditingController( + text: dateTimeFormat( + 'dd/MM/yyyy', + _model.selectedDate, + locale: FFLocalizations.of(context) + .languageCode, + )); + _model.textControllerData?.selection = + TextSelection.collapsed( + offset: _model.textControllerData! + .text.length, + ); + }); + } }, - ); - - if (pickedDate != null) { - setState(() { - _model.selectedDate = DateTime( - pickedDate.year, - pickedDate.month, - pickedDate.day, - ); - - _model.textControllerData = TextEditingController( - text: dateTimeFormat( - 'dd/MM/yyyy', - _model.selectedDate, - locale: FFLocalizations.of(context).languageCode, - )); - _model.textControllerData?.selection = TextSelection.collapsed( - offset: _model.textControllerData!.text.length, - ); - }); - } - }, - child: Container( - width: double.infinity, - height: 80.0, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10.0), + child: Container( + width: double.infinity, + height: 80.0, + decoration: BoxDecoration( + borderRadius: + BorderRadius.circular(10.0), + ), + ), ), ), - ), + ], ), - ], + ), + ], + ), + ), + Align( + alignment: const AlignmentDirectional(-1.0, 0.0), + child: Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0, 0.0, 15), + child: Text( + FFLocalizations.of(context).getVariableText( + ptText: 'Selecione as opções disponíveis', + enText: 'Select the available options', + ), + textAlign: TextAlign.start, + style: FlutterFlowTheme.of(context) + .bodySmall + .override( + fontFamily: FlutterFlowTheme.of(context) + .bodySmallFamily, + letterSpacing: 0.0, + fontWeight: FontWeight.w600, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), + fontSize: limitedSubHeaderFontSize, + ), ), ), - ], - ), - ), - Align( - alignment: const AlignmentDirectional(-1.0, 0.0), - child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0, 0.0, 15), - child: Text( - FFLocalizations.of(context).getVariableText( - ptText: 'Selecione as opções disponíveis', - enText: 'Select the available options', - ), - textAlign: TextAlign.start, - style: FlutterFlowTheme.of(context).bodySmall.override( - fontFamily: FlutterFlowTheme.of(context).bodySmallFamily, - letterSpacing: 0.0, - fontWeight: FontWeight.w600, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), - fontSize: limitedSubHeaderFontSize, - ), ), - ), - ), - Padding( - padding: const EdgeInsets.fromLTRB(0, 0, 0, 15), - child: CustomSelect( - options: const ['MAC', 'FEM'], - controller: _model.dropDownValueController1 ??= - FormFieldController(_model.dropDownValue1 ??= ''), - isRequired: true, - changed: (val) => safeSetState(() { - _model.dropDownValue1 = val; - }), - dropDownValue: _model.dropDownValue1, - optionsLabel: [ - FFLocalizations.of(context).getVariableText(ptText: 'Macho', enText: 'Male'), - FFLocalizations.of(context).getVariableText(ptText: 'Fêmea', enText: 'Female') - ], - hintText: FFLocalizations.of(context) - .getVariableText(ptText: 'Gênero do Pet', enText: 'Gender of the Pet')), - ), - Padding( - padding: const EdgeInsets.fromLTRB(0, 0, 0, 15), - child: CustomSelect( - options: const ['MIN', 'PEQ', 'MED', 'GRA', 'GIG'], - controller: _model.dropDownValueController2 ??= - FormFieldController(_model.dropDownValue2 ??= ''), - isRequired: true, - changed: (val) => safeSetState(() { - _model.dropDownValue2 = val; - }), - dropDownValue: _model.dropDownValue2, - optionsLabel: [ - FFLocalizations.of(context).getVariableText(ptText: 'Mini', enText: 'Mini'), - FFLocalizations.of(context).getVariableText(ptText: 'Pequeno', enText: 'Small'), - FFLocalizations.of(context).getVariableText(ptText: 'Médio', enText: 'Medium'), - FFLocalizations.of(context).getVariableText(ptText: 'Grande', enText: 'Big'), - FFLocalizations.of(context).getVariableText(ptText: 'Gigante', enText: 'Giant'), - ], - hintText: FFLocalizations.of(context) - .getVariableText(ptText: 'Porte do Pet', enText: 'Size of the Pet')), - ), - Align( - alignment: const AlignmentDirectional(-1.0, 0.0), - child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0, 0.0, 15), - child: Text( - FFLocalizations.of(context).getVariableText( - ptText: 'Você tem alguma observação sobre o seu Pet?', - enText: 'Do you have any observations about your Pet?', - ), - textAlign: TextAlign.start, - style: FlutterFlowTheme.of(context).bodySmall.override( - fontFamily: FlutterFlowTheme.of(context).bodySmallFamily, - letterSpacing: 0.0, - fontWeight: FontWeight.w600, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), - fontSize: limitedInputFontSize, - ), + Padding( + padding: const EdgeInsets.fromLTRB(0, 0, 0, 15), + child: CustomSelect( + options: const ['MAC', 'FEM'], + controller: _model.dropDownValueController1 ??= + FormFieldController( + _model.dropDownValue1 ??= ''), + isRequired: true, + changed: (val) => safeSetState(() { + _model.dropDownValue1 = val; + }), + dropDownValue: _model.dropDownValue1, + optionsLabel: [ + FFLocalizations.of(context).getVariableText( + ptText: 'Macho', enText: 'Male'), + FFLocalizations.of(context).getVariableText( + ptText: 'Fêmea', enText: 'Female') + ], + hintText: FFLocalizations.of(context).getVariableText( + ptText: 'Gênero do Pet', + enText: 'Gender of the Pet')), ), - ), - ), - CustomInputUtil( - controller: _model.textControllerObservation, - validator: _model.textControllerObservationValidator.asValidator(context), - focusNode: _model.textFieldFocusObservation, - labelText: FFLocalizations.of(context).getVariableText( - ptText: 'Escreva as suas observações aqui...', enText: 'Write your observations here...'), - hintText: FFLocalizations.of(context).getVariableText( - ptText: 'Escreva as suas observações aqui...', enText: 'Write your observations here...'), - suffixIcon: Icons.text_fields, - haveMaxLength: true, - onChanged: (value) => setState(() {}), - maxLength: 250, - ), - Padding( - padding: const EdgeInsets.fromLTRB(70, 20, 70, 30), - child: SubmitButtonUtil( - labelText: FFLocalizations.of(context).getVariableText(ptText: 'Cadastrar', enText: 'Register'), - onPressed: _model.isFormValid(context) ? _model.registerPet : null), - ), - ])), + Padding( + padding: const EdgeInsets.fromLTRB(0, 0, 0, 15), + child: CustomSelect( + options: const ['MIN', 'PEQ', 'MED', 'GRA', 'GIG'], + controller: _model.dropDownValueController2 ??= + FormFieldController( + _model.dropDownValue2 ??= ''), + isRequired: true, + changed: (val) => safeSetState(() { + _model.dropDownValue2 = val; + }), + dropDownValue: _model.dropDownValue2, + optionsLabel: [ + FFLocalizations.of(context).getVariableText( + ptText: 'Mini', enText: 'Mini'), + FFLocalizations.of(context).getVariableText( + ptText: 'Pequeno', enText: 'Small'), + FFLocalizations.of(context).getVariableText( + ptText: 'Médio', enText: 'Medium'), + FFLocalizations.of(context).getVariableText( + ptText: 'Grande', enText: 'Big'), + FFLocalizations.of(context).getVariableText( + ptText: 'Gigante', enText: 'Giant'), + ], + hintText: FFLocalizations.of(context).getVariableText( + ptText: 'Porte do Pet', + enText: 'Size of the Pet')), + ), + Align( + alignment: const AlignmentDirectional(-1.0, 0.0), + child: Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0, 0.0, 15), + child: Text( + FFLocalizations.of(context).getVariableText( + ptText: + 'Você tem alguma observação sobre o seu Pet?', + enText: + 'Do you have any observations about your Pet?', + ), + textAlign: TextAlign.start, + style: FlutterFlowTheme.of(context) + .bodySmall + .override( + fontFamily: FlutterFlowTheme.of(context) + .bodySmallFamily, + letterSpacing: 0.0, + fontWeight: FontWeight.w600, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), + fontSize: limitedInputFontSize, + ), + ), + ), + ), + CustomInputUtil( + controller: _model.textControllerObservation, + validator: _model.textControllerObservationValidator + .asValidator(context), + focusNode: _model.textFieldFocusObservation, + labelText: FFLocalizations.of(context).getVariableText( + ptText: 'Escreva as suas observações aqui...', + enText: 'Write your observations here...'), + hintText: FFLocalizations.of(context).getVariableText( + ptText: 'Escreva as suas observações aqui...', + enText: 'Write your observations here...'), + suffixIcon: Icons.text_fields, + haveMaxLength: true, + onChanged: (value) => setState(() {}), + maxLength: 250, + ), + Padding( + padding: const EdgeInsets.fromLTRB(70, 20, 70, 30), + child: SubmitButtonUtil( + labelText: FFLocalizations.of(context) + .getVariableText( + ptText: 'Cadastrar', enText: 'Register'), + onPressed: _model.isFormValid(context) + ? _model.registerPet + : null), + ), + ])), ], ), ); @@ -478,7 +598,8 @@ class _PetsPageWidgetState extends State with SingleTickerProvid style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), ), ), ), @@ -486,331 +607,442 @@ class _PetsPageWidgetState extends State with SingleTickerProvid Form( key: _model.updateFormKey, autovalidateMode: AutovalidateMode.onUserInteraction, - child: - Column(mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - Padding( - padding: const EdgeInsets.fromLTRB(0, 10, 0, 20), - child: MediaUploadButtonUtil( - onUploadComplete: _model.handleUploadComplete, - isUploading: _model.isDataUploading, - uploadedFiles: _model.uploadedLocalFile, - labelText: FFLocalizations.of(context).getVariableText( - ptText: 'Clique para adicionar a foto de seu Pet', enText: 'Click to add your Pet\'s photo'), - ), - ), - CustomInputUtil( - controller: _model.textControllerName, - validator: _model.textControllerNameValidator.asValidator(context), - focusNode: _model.textFieldFocusName, - labelText: FFLocalizations.of(context).getVariableText(ptText: 'Nome', enText: 'Name'), - hintText: FFLocalizations.of(context).getVariableText(ptText: 'Nome', enText: 'Name'), - suffixIcon: Symbols.format_color_text, - haveMaxLength: true, - onChanged: (value) => setState(() {}), - maxLength: 80, - ), - Padding( - padding: const EdgeInsets.fromLTRB(0, 0, 0, 15), - child: CustomInputUtil( - controller: _model.textControllerSpecies, - validator: _model.textControllerSpeciesValidator.asValidator(context), - focusNode: _model.textFieldFocusSpecies, - labelText: FFLocalizations.of(context).getVariableText(ptText: 'Espécie', enText: 'Species'), - hintText: FFLocalizations.of(context) - .getVariableText(ptText: 'Ex: Cachorro, Gato, Papagaio', enText: 'e.g. Dog, Cat, Parrot'), - suffixIcon: Symbols.sound_detection_dog_barking, - haveMaxLength: true, - onChanged: (value) => setState(() {}), - maxLength: 80, - ), - ), - Padding( - padding: const EdgeInsets.fromLTRB(0, 0, 0, 15), - child: CustomInputUtil( - controller: _model.textControllerRace, - validator: _model.textControllerRaceValidator.asValidator(context), - focusNode: _model.textFieldFocusRace, - labelText: FFLocalizations.of(context).getVariableText(ptText: 'Raça', enText: 'Race'), - hintText: FFLocalizations.of(context).getVariableText( - ptText: 'Ex: Labrador, Poodle, Siamês, Persa', - enText: 'e.g. Labrador, Poodle, Siamese, Persian'), - suffixIcon: Icons.pets_outlined, - haveMaxLength: true, - onChanged: (value) => setState(() {}), - maxLength: 80, - ), - ), - Padding( - padding: const EdgeInsets.fromLTRB(0, 0, 0, 15), - child: CustomInputUtil( - controller: _model.textControllerColor, - validator: _model.textControllerColorValidator.asValidator(context), - focusNode: _model.textFieldFocusColor, - labelText: FFLocalizations.of(context).getVariableText(ptText: 'Cor', enText: 'Color'), - hintText: FFLocalizations.of(context) - .getVariableText(ptText: 'Ex: Preto, Amarelo, Branco', enText: 'e.g. Black, Yellow, White'), - suffixIcon: Symbols.palette, - haveMaxLength: true, - onChanged: (value) => setState(() {}), - maxLength: 80, - ), - ), - Padding( - padding: const EdgeInsets.fromLTRB(0, 0, 0, 15), - child: Row( - mainAxisSize: MainAxisSize.max, - children: [ - SizedBox( - width: MediaQuery.of(context).size.width, - height: 60.0, - child: Stack( - children: [ - Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), - child: TextFormField( - controller: _model.textControllerData, - focusNode: _model.textFieldFocusData, - cursorColor: FlutterFlowTheme.of(context).primary, - readOnly: true, - autovalidateMode: AutovalidateMode.onUserInteraction, - autofocus: false, - obscureText: false, - decoration: InputDecoration( - isDense: true, - labelStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Padding( + padding: const EdgeInsets.fromLTRB(0, 10, 0, 20), + child: MediaUploadButtonUtil( + onUploadComplete: _model.handleUploadComplete, + isUploading: _model.isDataUploading, + uploadedFiles: _model.uploadedLocalFile, + labelText: FFLocalizations.of(context).getVariableText( + ptText: 'Clique para adicionar a foto de seu Pet', + enText: 'Click to add your Pet\'s photo'), + ), + ), + CustomInputUtil( + controller: _model.textControllerName, + validator: _model.textControllerNameValidator + .asValidator(context), + focusNode: _model.textFieldFocusName, + labelText: FFLocalizations.of(context) + .getVariableText(ptText: 'Nome', enText: 'Name'), + hintText: FFLocalizations.of(context) + .getVariableText(ptText: 'Nome', enText: 'Name'), + suffixIcon: Symbols.format_color_text, + haveMaxLength: true, + onChanged: (value) => setState(() {}), + maxLength: 80, + ), + Padding( + padding: const EdgeInsets.fromLTRB(0, 0, 0, 15), + child: CustomInputUtil( + controller: _model.textControllerSpecies, + validator: _model.textControllerSpeciesValidator + .asValidator(context), + focusNode: _model.textFieldFocusSpecies, + labelText: FFLocalizations.of(context).getVariableText( + ptText: 'Espécie', enText: 'Species'), + hintText: FFLocalizations.of(context).getVariableText( + ptText: 'Ex: Cachorro, Gato, Papagaio', + enText: 'e.g. Dog, Cat, Parrot'), + suffixIcon: Symbols.sound_detection_dog_barking, + haveMaxLength: true, + onChanged: (value) => setState(() {}), + maxLength: 80, + ), + ), + Padding( + padding: const EdgeInsets.fromLTRB(0, 0, 0, 15), + child: CustomInputUtil( + controller: _model.textControllerRace, + validator: _model.textControllerRaceValidator + .asValidator(context), + focusNode: _model.textFieldFocusRace, + labelText: FFLocalizations.of(context) + .getVariableText(ptText: 'Raça', enText: 'Race'), + hintText: FFLocalizations.of(context).getVariableText( + ptText: 'Ex: Labrador, Poodle, Siamês, Persa', + enText: 'e.g. Labrador, Poodle, Siamese, Persian'), + suffixIcon: Icons.pets_outlined, + haveMaxLength: true, + onChanged: (value) => setState(() {}), + maxLength: 80, + ), + ), + Padding( + padding: const EdgeInsets.fromLTRB(0, 0, 0, 15), + child: CustomInputUtil( + controller: _model.textControllerColor, + validator: _model.textControllerColorValidator + .asValidator(context), + focusNode: _model.textFieldFocusColor, + labelText: FFLocalizations.of(context) + .getVariableText(ptText: 'Cor', enText: 'Color'), + hintText: FFLocalizations.of(context).getVariableText( + ptText: 'Ex: Preto, Amarelo, Branco', + enText: 'e.g. Black, Yellow, White'), + suffixIcon: Symbols.palette, + haveMaxLength: true, + onChanged: (value) => setState(() {}), + maxLength: 80, + ), + ), + Padding( + padding: const EdgeInsets.fromLTRB(0, 0, 0, 15), + child: Row( + mainAxisSize: MainAxisSize.max, + children: [ + SizedBox( + width: MediaQuery.of(context).size.width, + height: 60.0, + child: Stack( + children: [ + Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0.0, 24.0, 0.0), + child: TextFormField( + controller: _model.textControllerData, + focusNode: _model.textFieldFocusData, + cursorColor: + FlutterFlowTheme.of(context).primary, + readOnly: true, + autovalidateMode: + AutovalidateMode.onUserInteraction, + autofocus: false, + obscureText: false, + decoration: InputDecoration( + isDense: true, + labelStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), + ), + hintText: FFLocalizations.of(context) + .getVariableText( + ptText: 'Data de Nascimento', + enText: 'Date of Birth', ), - hintText: FFLocalizations.of(context).getVariableText( - ptText: 'Data de Nascimento', - enText: 'Date of Birth', - ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).labelMediumFamily), - lineHeight: 1.0, + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context) + .labelMediumFamily, + color: FlutterFlowTheme.of(context) + .primaryText, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .labelMediumFamily), + lineHeight: 1.0, + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of(context) + .customColor6, + width: 0.5, + ), + borderRadius: + BorderRadius.circular(10.0), + ), + focusedBorder: OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of(context) + .primary, + width: 0.5, + ), + borderRadius: + BorderRadius.circular(10.0), + ), + errorBorder: OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of(context) + .error, + width: 0.5, + ), + borderRadius: + BorderRadius.circular(10.0), + ), + focusedErrorBorder: OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of(context) + .error, + width: 0.5, + ), + borderRadius: + BorderRadius.circular(10.0), + ), + suffixIcon: Icon( + Icons.date_range, + color: FlutterFlowTheme.of(context) + .accent1, ), - enabledBorder: OutlineInputBorder( - borderSide: BorderSide( - color: FlutterFlowTheme.of(context).customColor6, - width: 0.5, ), - borderRadius: BorderRadius.circular(10.0), - ), - focusedBorder: OutlineInputBorder( - borderSide: BorderSide( - color: FlutterFlowTheme.of(context).primary, - width: 0.5, - ), - borderRadius: BorderRadius.circular(10.0), - ), - errorBorder: OutlineInputBorder( - borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, - width: 0.5, - ), - borderRadius: BorderRadius.circular(10.0), - ), - focusedErrorBorder: OutlineInputBorder( - borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, - width: 0.5, - ), - borderRadius: BorderRadius.circular(10.0), - ), - suffixIcon: Icon( - Icons.date_range, - color: FlutterFlowTheme.of(context).accent1, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: + FlutterFlowTheme.of(context) + .bodyMediumFamily, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), + lineHeight: 1.8, + ), + textAlign: TextAlign.start, + validator: _model + .textControllerDataValidator + .asValidator(context), ), ), - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), - lineHeight: 1.8, - ), - textAlign: TextAlign.start, - validator: _model.textControllerDataValidator.asValidator(context), - ), - ), - Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), - child: InkWell( - splashColor: Colors.transparent, - focusColor: Colors.transparent, - hoverColor: Colors.transparent, - highlightColor: Colors.transparent, - onTap: () async { - final pickedDate = await showDatePicker( - context: context, - initialDate: DateFormat('dd/MM/yyyy').tryParse(_model.textControllerData.text), - firstDate: DateTime(1990), - lastDate: DateTime.now(), - builder: (context, child) { - return wrapInMaterialDatePickerTheme( - context, - child!, - headerBackgroundColor: FlutterFlowTheme.of(context).primary, - headerForegroundColor: FlutterFlowTheme.of(context).info, - headerTextStyle: FlutterFlowTheme.of(context).headlineLarge.override( - fontFamily: FlutterFlowTheme.of(context).headlineLargeFamily, - fontSize: 32.0, - letterSpacing: 0.0, - fontWeight: FontWeight.w600, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).headlineLargeFamily), - ), - pickerBackgroundColor: FlutterFlowTheme.of(context).primaryBackground, - pickerForegroundColor: FlutterFlowTheme.of(context).primaryText, - selectedDateTimeBackgroundColor: FlutterFlowTheme.of(context).primary, - selectedDateTimeForegroundColor: FlutterFlowTheme.of(context).info, - actionButtonForegroundColor: FlutterFlowTheme.of(context).primaryText, - iconSize: 24.0, + Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0.0, 24.0, 0.0), + child: InkWell( + splashColor: Colors.transparent, + focusColor: Colors.transparent, + hoverColor: Colors.transparent, + highlightColor: Colors.transparent, + onTap: () async { + final pickedDate = await showDatePicker( + context: context, + initialDate: DateFormat('dd/MM/yyyy') + .tryParse( + _model.textControllerData.text), + firstDate: DateTime(1990), + lastDate: DateTime.now(), + builder: (context, child) { + return wrapInMaterialDatePickerTheme( + context, + child!, + headerBackgroundColor: + FlutterFlowTheme.of(context) + .primary, + headerForegroundColor: + FlutterFlowTheme.of(context) + .info, + headerTextStyle: + FlutterFlowTheme.of(context) + .headlineLarge + .override( + fontFamily: FlutterFlowTheme + .of(context) + .headlineLargeFamily, + fontSize: 32.0, + letterSpacing: 0.0, + fontWeight: + FontWeight.w600, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of( + context) + .headlineLargeFamily), + ), + pickerBackgroundColor: + FlutterFlowTheme.of(context) + .primaryBackground, + pickerForegroundColor: + FlutterFlowTheme.of(context) + .primaryText, + selectedDateTimeBackgroundColor: + FlutterFlowTheme.of(context) + .primary, + selectedDateTimeForegroundColor: + FlutterFlowTheme.of(context) + .info, + actionButtonForegroundColor: + FlutterFlowTheme.of(context) + .primaryText, + iconSize: 24.0, + ); + }, ); + + if (pickedDate != null) { + setState(() { + _model.selectedDate = DateTime( + pickedDate.year, + pickedDate.month, + pickedDate.day, + ); + + _model.textControllerData = + TextEditingController( + text: dateTimeFormat( + 'dd/MM/yyyy', + _model.selectedDate, + locale: FFLocalizations.of(context) + .languageCode, + )); + _model.textControllerData?.selection = + TextSelection.collapsed( + offset: _model.textControllerData! + .text.length, + ); + }); + } }, - ); - - if (pickedDate != null) { - setState(() { - _model.selectedDate = DateTime( - pickedDate.year, - pickedDate.month, - pickedDate.day, - ); - - _model.textControllerData = TextEditingController( - text: dateTimeFormat( - 'dd/MM/yyyy', - _model.selectedDate, - locale: FFLocalizations.of(context).languageCode, - )); - _model.textControllerData?.selection = TextSelection.collapsed( - offset: _model.textControllerData!.text.length, - ); - }); - } - }, - child: Container( - width: double.infinity, - height: 80.0, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10.0), + child: Container( + width: double.infinity, + height: 80.0, + decoration: BoxDecoration( + borderRadius: + BorderRadius.circular(10.0), + ), + ), ), ), - ), + ], ), - ], + ), + ], + ), + ), + Align( + alignment: const AlignmentDirectional(-1.0, 0.0), + child: Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0, 0.0, 15), + child: Text( + FFLocalizations.of(context).getVariableText( + ptText: 'Selecione as opções disponíveis', + enText: 'Select the available options', + ), + textAlign: TextAlign.start, + style: FlutterFlowTheme.of(context) + .bodySmall + .override( + fontFamily: FlutterFlowTheme.of(context) + .bodySmallFamily, + letterSpacing: 0.0, + fontWeight: FontWeight.w600, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), + ), ), ), - ], - ), - ), - Align( - alignment: const AlignmentDirectional(-1.0, 0.0), - child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0, 0.0, 15), - child: Text( - FFLocalizations.of(context).getVariableText( - ptText: 'Selecione as opções disponíveis', - enText: 'Select the available options', - ), - textAlign: TextAlign.start, - style: FlutterFlowTheme.of(context).bodySmall.override( - fontFamily: FlutterFlowTheme.of(context).bodySmallFamily, - letterSpacing: 0.0, - fontWeight: FontWeight.w600, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), - ), ), - ), - ), - Padding( - padding: const EdgeInsets.fromLTRB(0, 0, 0, 15), - child: CustomSelect( - options: const ['MAC', 'FEM'], - controller: _model.dropDownValueController1 ??= - FormFieldController(_model.dropDownValue1 ??= ''), - isRequired: true, - changed: (val) => safeSetState(() { - _model.dropDownValue1 = val; - }), - dropDownValue: _model.dropDownValue1, - optionsLabel: [ - FFLocalizations.of(context).getVariableText(ptText: 'Macho', enText: 'Male'), - FFLocalizations.of(context).getVariableText(ptText: 'Fêmea', enText: 'Female') - ], + Padding( + padding: const EdgeInsets.fromLTRB(0, 0, 0, 15), + child: CustomSelect( + options: const ['MAC', 'FEM'], + controller: _model.dropDownValueController1 ??= + FormFieldController( + _model.dropDownValue1 ??= ''), + isRequired: true, + changed: (val) => safeSetState(() { + _model.dropDownValue1 = val; + }), + dropDownValue: _model.dropDownValue1, + optionsLabel: [ + FFLocalizations.of(context).getVariableText( + ptText: 'Macho', enText: 'Male'), + FFLocalizations.of(context).getVariableText( + ptText: 'Fêmea', enText: 'Female') + ], + hintText: FFLocalizations.of(context).getVariableText( + ptText: 'Selecione o gênero do Pet', + enText: 'Select the gender of the Pet')), + ), + Padding( + padding: const EdgeInsets.fromLTRB(0, 0, 0, 15), + child: CustomSelect( + options: const ['MIN', 'PEQ', 'MED', 'GRA', 'GIG'], + controller: _model.dropDownValueController2 ??= + FormFieldController( + _model.dropDownValue2 ??= ''), + isRequired: true, + changed: (val) => safeSetState(() { + _model.dropDownValue2 = val; + }), + dropDownValue: _model.dropDownValue1, + optionsLabel: [ + FFLocalizations.of(context).getVariableText( + ptText: 'Mini', enText: 'Mini'), + FFLocalizations.of(context).getVariableText( + ptText: 'Pequeno', enText: 'Small'), + FFLocalizations.of(context).getVariableText( + ptText: 'Médio', enText: 'Medium'), + FFLocalizations.of(context).getVariableText( + ptText: 'Grande', enText: 'Big'), + FFLocalizations.of(context).getVariableText( + ptText: 'Gigante', enText: 'Giant'), + ], + hintText: FFLocalizations.of(context).getVariableText( + ptText: 'Selecione o porte do Pet', + enText: 'Select the size of the Pet')), + ), + Align( + alignment: const AlignmentDirectional(-1.0, 0.0), + child: Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0, 0.0, 15), + child: Text( + FFLocalizations.of(context).getVariableText( + ptText: + 'Você tem alguma observação sobre o seu Pet?', + enText: + 'Do you have any observations about your Pet?', + ), + textAlign: TextAlign.start, + style: FlutterFlowTheme.of(context) + .bodySmall + .override( + fontFamily: FlutterFlowTheme.of(context) + .bodySmallFamily, + letterSpacing: 0.0, + fontWeight: FontWeight.w600, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), + ), + ), + ), + ), + CustomInputUtil( + controller: _model.textControllerObservation, + validator: _model.textControllerObservationValidator + .asValidator(context), + focusNode: _model.textFieldFocusObservation, + labelText: FFLocalizations.of(context).getVariableText( + ptText: 'Escreva as suas observações aqui...', + enText: 'Write your observations here...'), hintText: FFLocalizations.of(context).getVariableText( - ptText: 'Selecione o gênero do Pet', enText: 'Select the gender of the Pet')), - ), - Padding( - padding: const EdgeInsets.fromLTRB(0, 0, 0, 15), - child: CustomSelect( - options: const ['MIN', 'PEQ', 'MED', 'GRA', 'GIG'], - controller: _model.dropDownValueController2 ??= - FormFieldController(_model.dropDownValue2 ??= ''), - isRequired: true, - changed: (val) => safeSetState(() { - _model.dropDownValue2 = val; - }), - dropDownValue: _model.dropDownValue1, - optionsLabel: [ - FFLocalizations.of(context).getVariableText(ptText: 'Mini', enText: 'Mini'), - FFLocalizations.of(context).getVariableText(ptText: 'Pequeno', enText: 'Small'), - FFLocalizations.of(context).getVariableText(ptText: 'Médio', enText: 'Medium'), - FFLocalizations.of(context).getVariableText(ptText: 'Grande', enText: 'Big'), - FFLocalizations.of(context).getVariableText(ptText: 'Gigante', enText: 'Giant'), - ], - hintText: FFLocalizations.of(context) - .getVariableText(ptText: 'Selecione o porte do Pet', enText: 'Select the size of the Pet')), - ), - Align( - alignment: const AlignmentDirectional(-1.0, 0.0), - child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0, 0.0, 15), - child: Text( - FFLocalizations.of(context).getVariableText( - ptText: 'Você tem alguma observação sobre o seu Pet?', - enText: 'Do you have any observations about your Pet?', - ), - textAlign: TextAlign.start, - style: FlutterFlowTheme.of(context).bodySmall.override( - fontFamily: FlutterFlowTheme.of(context).bodySmallFamily, - letterSpacing: 0.0, - fontWeight: FontWeight.w600, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), - ), + ptText: 'Escreva as suas observações aqui...', + enText: 'Write your observations here...'), + suffixIcon: Icons.text_fields, + haveMaxLength: true, + maxLength: 250, + onChanged: (value) => setState(() {}), ), - ), - ), - CustomInputUtil( - controller: _model.textControllerObservation, - validator: _model.textControllerObservationValidator.asValidator(context), - focusNode: _model.textFieldFocusObservation, - labelText: FFLocalizations.of(context).getVariableText( - ptText: 'Escreva as suas observações aqui...', enText: 'Write your observations here...'), - hintText: FFLocalizations.of(context).getVariableText( - ptText: 'Escreva as suas observações aqui...', enText: 'Write your observations here...'), - suffixIcon: Icons.text_fields, - haveMaxLength: true, - maxLength: 250, - onChanged: (value) => setState(() {}), - ), - Padding( - padding: const EdgeInsets.fromLTRB(70, 20, 70, 30), - child: SubmitButtonUtil( - labelText: FFLocalizations.of(context).getVariableText(ptText: 'Salvar', enText: 'Save'), - onPressed: _model.isFormValid(context) ? _model.updatePet : null), - ), - ])), + Padding( + padding: const EdgeInsets.fromLTRB(70, 20, 70, 30), + child: SubmitButtonUtil( + labelText: FFLocalizations.of(context) + .getVariableText( + ptText: 'Salvar', enText: 'Save'), + onPressed: _model.isFormValid(context) + ? _model.updatePet + : null), + ), + ])), ], ), ); diff --git a/lib/pages/preferences_settings_page/preferences_settings_model.dart b/lib/pages/preferences_settings_page/preferences_settings_model.dart index dec63120..c99d439f 100644 --- a/lib/pages/preferences_settings_page/preferences_settings_model.dart +++ b/lib/pages/preferences_settings_page/preferences_settings_model.dart @@ -24,7 +24,8 @@ class PreferencesPageModel with ChangeNotifier { late bool isPanic = false; Future _initialize() async { - isFingerprint = await StorageHelper().get(LocalsStorageKey.fingerprint.key) == 'true'; + isFingerprint = + await StorageHelper().get(LocalsStorageKey.fingerprint.key) == 'true'; isPerson = await StorageHelper().get(LocalsStorageKey.person.key) == 'true'; isNotify = await StorageHelper().get(LocalsStorageKey.notify.key) == 'true'; isAccess = await StorageHelper().get(LocalsStorageKey.access.key) == 'true'; @@ -37,7 +38,8 @@ class PreferencesPageModel with ChangeNotifier { } Future enablePerson(BuildContext context) async { - final String userDevUUID = (await StorageHelper().get(ProfileStorageKey.userDevUUID.key)) ?? ''; + final String userDevUUID = + (await StorageHelper().get(ProfileStorageKey.userDevUUID.key)) ?? ''; notifyListeners(); Share.share( FFLocalizations.of(context).getVariableText( @@ -64,7 +66,8 @@ class PreferencesPageModel with ChangeNotifier { .call(notifica: value) .then((value) async { if (value.jsonBody['error'] == false) { - await StorageHelper().set(LocalsStorageKey.notify.key, isNotify ? 'false' : 'true'); + await StorageHelper().set( + LocalsStorageKey.notify.key, isNotify ? 'false' : 'true'); content = FFLocalizations.of(context).getVariableText( enText: 'Notification changed successfully', ptText: 'Notificação alterada com sucesso', @@ -86,7 +89,8 @@ class PreferencesPageModel with ChangeNotifier { ); SnackBarUtil.showSnackBar(context, content, isError: true); }) - .then((_) async => isNotify = await StorageHelper().get(LocalsStorageKey.notify.key) == 'true') + .then((_) async => isNotify = + await StorageHelper().get(LocalsStorageKey.notify.key) == 'true') .whenComplete(() => notifyListeners()); context.pop(); } @@ -110,7 +114,8 @@ class PreferencesPageModel with ChangeNotifier { if (value.jsonBody['error'] == false) { notifyListeners(); content = FFLocalizations.of(context).getVariableText( - ptText: 'Atualização do identificador de acesso realizada com sucesso', + ptText: + 'Atualização do identificador de acesso realizada com sucesso', enText: 'Access identifier updated successfully', ); SnackBarUtil.showSnackBar(context, content); @@ -142,7 +147,8 @@ class PreferencesPageModel with ChangeNotifier { .then((value) async { final String content; if (jsonDecode(value.jsonBody['error'].toString()) == false) { - await StorageHelper().set(LocalsStorageKey.access.key, isAccess ? 'false' : 'true'); + await StorageHelper().set( + LocalsStorageKey.access.key, isAccess ? 'false' : 'true'); notifyListeners(); content = FFLocalizations.of(context).getVariableText( enText: 'Access pass changed successfully', @@ -164,7 +170,8 @@ class PreferencesPageModel with ChangeNotifier { ); SnackBarUtil.showSnackBar(context, content, isError: true); }) - .then((_) async => isAccess = await StorageHelper().get(LocalsStorageKey.access.key) == 'true') + .then((_) async => isAccess = + await StorageHelper().get(LocalsStorageKey.access.key) == 'true') .whenComplete(() => notifyListeners()); } @@ -179,7 +186,8 @@ class PreferencesPageModel with ChangeNotifier { .then((value) async { final String content; if (jsonDecode(value.jsonBody['error'].toString()) == false) { - await StorageHelper().set(LocalsStorageKey.panic.key, isPanic ? 'false' : 'true'); + await StorageHelper() + .set(LocalsStorageKey.panic.key, isPanic ? 'false' : 'true'); notifyListeners(); content = FFLocalizations.of(context).getVariableText( enText: 'Panic password changed successfully', @@ -201,7 +209,8 @@ class PreferencesPageModel with ChangeNotifier { ); SnackBarUtil.showSnackBar(context, content, isError: true); }) - .then((_) async => isPanic = await StorageHelper().get(LocalsStorageKey.panic.key) == 'true') + .then((_) async => isPanic = + await StorageHelper().get(LocalsStorageKey.panic.key) == 'true') .whenComplete(() => notifyListeners()); } @@ -216,11 +225,14 @@ class PreferencesPageModel with ChangeNotifier { onChange(String? key) async { isFingerprint = !isFingerprint; - await StorageHelper().set(SecureStorageKey.fingerprintPass.value, key ?? ''); - await StorageHelper().set(LocalsStorageKey.fingerprint.key, isFingerprint ? 'true' : 'false'); + await StorageHelper() + .set(SecureStorageKey.fingerprintPass.value, key ?? ''); + await StorageHelper().set( + LocalsStorageKey.fingerprint.key, isFingerprint ? 'true' : 'false'); notifyListeners(); SnackBarUtil.showSnackBar(context, content); - isFingerprint = await StorageHelper().get(LocalsStorageKey.fingerprint.key) == 'true'; + isFingerprint = + await StorageHelper().get(LocalsStorageKey.fingerprint.key) == 'true'; } isFingerprint ? onChange(null) : _showPassKey(context, onChange); @@ -258,7 +270,8 @@ class PreferencesPageModel with ChangeNotifier { showAlertDialog(context, title, content, onConfirm); } - void _showPassKey(BuildContext context, void Function(String) onChange) async { + void _showPassKey( + BuildContext context, void Function(String) onChange) async { await showModalBottomSheet( isScrollControlled: true, backgroundColor: Colors.transparent, diff --git a/lib/pages/preferences_settings_page/preferences_settings_widget.dart b/lib/pages/preferences_settings_page/preferences_settings_widget.dart index 227c953d..7cf47f3b 100644 --- a/lib/pages/preferences_settings_page/preferences_settings_widget.dart +++ b/lib/pages/preferences_settings_page/preferences_settings_widget.dart @@ -29,7 +29,9 @@ class _PreferencesPageWidgetState extends State { create: (_) => PreferencesPageModel(), child: Consumer( builder: (context, model, child) => GestureDetector( - onTap: () => model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(model.unfocusNode) : FocusScope.of(context).unfocus(), + onTap: () => model.unfocusNode.canRequestFocus + ? FocusScope.of(context).requestFocus(model.unfocusNode) + : FocusScope.of(context).unfocus(), child: Scaffold( backgroundColor: FlutterFlowTheme.of(context).primaryBackground, appBar: AppBar( @@ -91,7 +93,8 @@ class _PreferencesPageWidgetState extends State { ); } - Widget _buildIconButton(BuildContext context, int index, PreferencesPageModel model) { + Widget _buildIconButton( + BuildContext context, int index, PreferencesPageModel model) { IconData icon; Function() onPressed = () => {}; bool isEnabled; @@ -203,10 +206,14 @@ class _PreferencesPageWidgetState extends State { child: Row( children: [ CircleAvatar( - backgroundColor: isEnabled ? FlutterFlowTheme.of(context).primary : FlutterFlowTheme.of(context).alternate, + backgroundColor: isEnabled + ? FlutterFlowTheme.of(context).primary + : FlutterFlowTheme.of(context).alternate, child: Icon( icon, - color: isEnabled ? FlutterFlowTheme.of(context).primaryBackground : FlutterFlowTheme.of(context).primary, + color: isEnabled + ? FlutterFlowTheme.of(context).primaryBackground + : FlutterFlowTheme.of(context).primary, ), ), const SizedBox(width: 8.0), diff --git a/lib/pages/provisional_schedule_page/provisional_schedule_widget.dart b/lib/pages/provisional_schedule_page/provisional_schedule_widget.dart index 96d35366..022822ed 100644 --- a/lib/pages/provisional_schedule_page/provisional_schedule_widget.dart +++ b/lib/pages/provisional_schedule_page/provisional_schedule_widget.dart @@ -67,6 +67,7 @@ class _ProvisionalScheduleState extends State { centerTitle: true, elevation: 0.0, ), - body: const SafeArea(top: true, child: ScheduleProvisionalVisitPageWidget())); + body: const SafeArea( + top: true, child: ScheduleProvisionalVisitPageWidget())); } } diff --git a/lib/pages/qr_code_page/qr_code_page_model.dart b/lib/pages/qr_code_page/qr_code_page_model.dart index 857728c9..bec899f0 100644 --- a/lib/pages/qr_code_page/qr_code_page_model.dart +++ b/lib/pages/qr_code_page/qr_code_page_model.dart @@ -29,8 +29,10 @@ class QrCodePageModel extends FlutterFlowModel { } Future initVariable() async { - isFingerprint = await StorageHelper().get(LocalsStorageKey.fingerprint.key) == 'true'; - userDevUUID = await StorageHelper().get(ProfileStorageKey.userDevUUID.key) ?? ''; + isFingerprint = + await StorageHelper().get(LocalsStorageKey.fingerprint.key) == 'true'; + userDevUUID = + await StorageHelper().get(ProfileStorageKey.userDevUUID.key) ?? ''; safeSetState?.call(); } @@ -39,7 +41,8 @@ class QrCodePageModel extends FlutterFlowModel { unfocusNode.dispose(); } - Uint8List assembleQRPacket(int direction, String identifier, String password) { + Uint8List assembleQRPacket( + int direction, String identifier, String password) { List packet = [direction]; String paddedBadge = identifier.padLeft(30, '0'); @@ -57,7 +60,8 @@ class QrCodePageModel extends FlutterFlowModel { int sum = year + month + day + hour + minute; - if (sum == int.parse('0D', radix: 16) || sum == int.parse('0A', radix: 16)) { + if (sum == int.parse('0D', radix: 16) || + sum == int.parse('0A', radix: 16)) { packet.add(int.parse('FF', radix: 16)); } else { packet.add(sum); @@ -75,7 +79,8 @@ class QrCodePageModel extends FlutterFlowModel { check ^= b; } - if (check == int.parse('0D', radix: 16) || check == int.parse('0A', radix: 16)) { + if (check == int.parse('0D', radix: 16) || + check == int.parse('0A', radix: 16)) { packet.add(int.parse('FF', radix: 16)); } else { packet.add(check); @@ -88,25 +93,35 @@ class QrCodePageModel extends FlutterFlowModel { int len = s.length; Uint8List data = Uint8List(len ~/ 2); for (int i = 0; i < len; i += 2) { - data[i ~/ 2] = ((int.parse(s[i], radix: 16) << 4) + int.parse(s[i + 1], radix: 16)); + data[i ~/ 2] = + ((int.parse(s[i], radix: 16) << 4) + int.parse(s[i + 1], radix: 16)); } return data; } String byteToHexa(Uint8List pDados) { - return pDados.map((byte) => byte.toRadixString(16).padLeft(2, '0').toUpperCase()).join(); + return pDados + .map((byte) => byte.toRadixString(16).padLeft(2, '0').toUpperCase()) + .join(); } Future byteToString(Uint8List bytes) async { return String.fromCharCodes(bytes); } - Widget buildQrCode({required int errorCorrectLevel, required double dimension, required String identifier, required String pass, required int direction}) { + Widget buildQrCode( + {required int errorCorrectLevel, + required double dimension, + required String identifier, + required String pass, + required int direction}) { try { const Color backgroundColor = Colors.white; const Color foregroundColor = Colors.black; return QrImageView.withQr( - qr: QrCode.fromUint8List(data: assembleQRPacket(direction, identifier, pass), errorCorrectLevel: errorCorrectLevel), + qr: QrCode.fromUint8List( + data: assembleQRPacket(direction, identifier, pass), + errorCorrectLevel: errorCorrectLevel), size: dimension, padding: const EdgeInsets.all(10), backgroundColor: backgroundColor, diff --git a/lib/pages/qr_code_page/qr_code_page_widget.dart b/lib/pages/qr_code_page/qr_code_page_widget.dart index f71f9b5c..0fa56484 100644 --- a/lib/pages/qr_code_page/qr_code_page_widget.dart +++ b/lib/pages/qr_code_page/qr_code_page_widget.dart @@ -32,7 +32,8 @@ class QrCodePageWidget extends StatefulWidget { State createState() => _QrCodePageWidgetState(); } -class _QrCodePageWidgetState extends State with TickerProviderStateMixin { +class _QrCodePageWidgetState extends State + with TickerProviderStateMixin { late QrCodePageModel _model; final scaffoldKey = GlobalKey(); @@ -68,7 +69,9 @@ class _QrCodePageWidgetState extends State with TickerProvider ), }); setupAnimations( - animationsMap.values.where((anim) => anim.trigger == AnimationTrigger.onActionTrigger || !anim.applyInitialState), + animationsMap.values.where((anim) => + anim.trigger == AnimationTrigger.onActionTrigger || + !anim.applyInitialState), this, ); } @@ -77,7 +80,9 @@ class _QrCodePageWidgetState extends State with TickerProvider void dispose() { // Removendo o ouvinte antes de chamar super.dispose para evitar vazamentos de memória if (animationsMap['barcodeOnActionTriggerAnimation'] != null) { - animationsMap['barcodeOnActionTriggerAnimation']!.controller.removeStatusListener((status) {}); + animationsMap['barcodeOnActionTriggerAnimation']! + .controller + .removeStatusListener((status) {}); } super.dispose(); @@ -96,10 +101,12 @@ class _QrCodePageWidgetState extends State with TickerProvider Widget buildBody(BuildContext context) { double screenWidth = MediaQuery.of(context).size.width; double screenHeight = MediaQuery.of(context).size.height; - double smallerDimension = screenWidth < screenHeight ? screenWidth : screenHeight; + double smallerDimension = + screenWidth < screenHeight ? screenWidth : screenHeight; double dimension = smallerDimension * 0.75; double totalTimeInSeconds = 100.0; - double limitedHeaderTextSize = LimitedFontSizeUtil.getCalculateFontSize(context, 18, 18, 16); + double limitedHeaderTextSize = + LimitedFontSizeUtil.getCalculateFontSize(context, 18, 18, 16); double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context); return SafeArea( @@ -120,11 +127,13 @@ class _QrCodePageWidgetState extends State with TickerProvider ), textAlign: TextAlign.center, style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, fontSize: limitedHeaderTextSize, letterSpacing: 0.0, fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), ), ), ), @@ -139,7 +148,9 @@ class _QrCodePageWidgetState extends State with TickerProvider _resetAnimationAndToggleAccess(); }); - _model.isFingerprint ? await _showBiometricsAuth(context) : await _showQrCodeBottomSheet(context); + _model.isFingerprint + ? await _showBiometricsAuth(context) + : await _showQrCodeBottomSheet(context); }, child: _model.buildQrCode( dimension: dimension, @@ -192,7 +203,9 @@ class _QrCodePageWidgetState extends State with TickerProvider alignment: const AlignmentDirectional(0.0, 0.0), child: FFButtonWidget( onPressed: () async { - _model.isFingerprint ? await _showBiometricsAuth(context) : await _showQrCodeBottomSheet(context); + _model.isFingerprint + ? await _showBiometricsAuth(context) + : await _showQrCodeBottomSheet(context); }, text: FFLocalizations.of(context).getVariableText( ptText: 'Gerar QR Code', @@ -200,15 +213,26 @@ class _QrCodePageWidgetState extends State with TickerProvider ), options: FFButtonOptions( height: 40.0, - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), - iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0.0, 24.0, 0.0), + iconPadding: + const EdgeInsetsDirectional.fromSTEB( + 0.0, 0.0, 0.0, 0.0), color: FlutterFlowTheme.of(context).primary, - textStyle: FlutterFlowTheme.of(context).titleSmall.override( - fontFamily: FlutterFlowTheme.of(context).titleSmallFamily, + textStyle: FlutterFlowTheme.of(context) + .titleSmall + .override( + fontFamily: FlutterFlowTheme.of(context) + .titleSmallFamily, color: Colors.white, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily), - fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 12, 12, 10), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .titleSmallFamily), + fontSize: LimitedFontSizeUtil + .getCalculateFontSize( + context, 12, 12, 10), ), elevation: 3.0, borderSide: const BorderSide( @@ -234,15 +258,20 @@ class _QrCodePageWidgetState extends State with TickerProvider visible: _model.isAccess == true, child: Text( FFLocalizations.of(context).getVariableText( - ptText: 'Certifique-se de que o QRCode está visivel para o leitor', - enText: 'Make sure the QRCode is visible to the reader', + ptText: + 'Certifique-se de que o QRCode está visivel para o leitor', + enText: + 'Make sure the QRCode is visible to the reader', // '6z6kvmhl' /* Certifique-se de que o QRCode ... */, ), textAlign: TextAlign.center, style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), fontSize: limitedBodyFontSize, ), ), @@ -266,7 +295,8 @@ class _QrCodePageWidgetState extends State with TickerProvider children: [ Expanded( child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(10.0, 0.0, 0.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 10.0, 0.0, 0.0, 0.0), child: Text( FFLocalizations.of(context).getVariableText( ptText: 'Expirando QR code em', @@ -274,12 +304,20 @@ class _QrCodePageWidgetState extends State with TickerProvider // 'wkjkxd2e' /* Trocando QR code em */, ), textAlign: TextAlign.center, - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .bodyMediumFamily, letterSpacing: 0.0, fontWeight: FontWeight.w600, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), - fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), + fontSize: + LimitedFontSizeUtil.getNoResizeFont( + context, 14), ), ), ), @@ -287,11 +325,13 @@ class _QrCodePageWidgetState extends State with TickerProvider Align( alignment: const AlignmentDirectional(0.0, 0.0), child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 20.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 0.0, 0.0, 20.0, 0.0), child: StreamBuilder( stream: getProgressValue(), builder: (context, snapshot) { - if (snapshot.connectionState == ConnectionState.waiting) { + if (snapshot.connectionState == + ConnectionState.waiting) { return const CircularProgressIndicator(); } else if (snapshot.hasError) { return Text('Error: ${snapshot.error}'); @@ -310,15 +350,26 @@ class _QrCodePageWidgetState extends State with TickerProvider onAnimationEnd: () { _resetAnimationAndToggleAccess(); }, - progressColor: FlutterFlowTheme.of(context).primary, - backgroundColor: FlutterFlowTheme.of(context).primaryText, + progressColor: + FlutterFlowTheme.of(context).primary, + backgroundColor: + FlutterFlowTheme.of(context) + .primaryText, center: Text( '${(progress * totalTimeInSeconds / 5).toStringAsFixed(1)}s', - style: FlutterFlowTheme.of(context).headlineSmall.override( - fontFamily: FlutterFlowTheme.of(context).headlineSmallFamily, - fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14), + style: FlutterFlowTheme.of(context) + .headlineSmall + .override( + fontFamily: + FlutterFlowTheme.of(context) + .headlineSmallFamily, + fontSize: LimitedFontSizeUtil + .getNoResizeFont(context, 14), letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineSmallFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .headlineSmallFamily), ), ), startAngle: 20.0, @@ -341,14 +392,21 @@ class _QrCodePageWidgetState extends State with TickerProvider Future _showBiometricsAuth(BuildContext context) async { await BiometricHelper.checkBiometrics() - .then((value) async => await BiometricHelper.authenticateBiometric().then((value) async { - if (value == false) throw Exception('Biometric authentication failed'); - final key = await StorageHelper().get(SecureStorageKey.fingerprintPass.value); + .then((value) async => + await BiometricHelper.authenticateBiometric().then((value) async { + if (value == false) + throw Exception('Biometric authentication failed'); + final key = await StorageHelper() + .get(SecureStorageKey.fingerprintPass.value); if (key == null || key.isEmpty) throw Exception('No key found'); safeSetState(() { if (animationsMap['barcodeOnActionTriggerAnimation'] != null) { - animationsMap['barcodeOnActionTriggerAnimation']!.controller.stop(); - animationsMap['barcodeOnActionTriggerAnimation']!.controller.reverse(); + animationsMap['barcodeOnActionTriggerAnimation']! + .controller + .stop(); + animationsMap['barcodeOnActionTriggerAnimation']! + .controller + .reverse(); } _model.isAccess = !_model.isAccess; _model.key = key; @@ -368,15 +426,22 @@ class _QrCodePageWidgetState extends State with TickerProvider context: context, builder: (context) { return GestureDetector( - onTap: () => _model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(_model.unfocusNode) : FocusScope.of(context).unfocus(), + onTap: () => _model.unfocusNode.canRequestFocus + ? FocusScope.of(context).requestFocus(_model.unfocusNode) + : FocusScope.of(context).unfocus(), child: Padding( padding: MediaQuery.viewInsetsOf(context), child: QrCodePassKeyTemplateComponentWidget( toggleActionStatus: (key) async { safeSetState(() { - if (animationsMap['barcodeOnActionTriggerAnimation'] != null) { - animationsMap['barcodeOnActionTriggerAnimation']!.controller.stop(); - animationsMap['barcodeOnActionTriggerAnimation']!.controller.reverse(); + if (animationsMap['barcodeOnActionTriggerAnimation'] != + null) { + animationsMap['barcodeOnActionTriggerAnimation']! + .controller + .stop(); + animationsMap['barcodeOnActionTriggerAnimation']! + .controller + .reverse(); } _model.isAccess = !_model.isAccess; _model.key = key; @@ -386,7 +451,8 @@ class _QrCodePageWidgetState extends State with TickerProvider ), ); }, - ).catchError((error) => safeSetState(() => _resetAnimationAndToggleAccess())); + ).catchError( + (error) => safeSetState(() => _resetAnimationAndToggleAccess())); unawaited( () async { await _model.qrCodeEncoder(context, key: _model.key); @@ -430,7 +496,8 @@ class _QrCodePageWidgetState extends State with TickerProvider fontSize: 15.0, fontWeight: FontWeight.bold, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).headlineMediumFamily), ), ), actions: const [], diff --git a/lib/pages/reception_page/reception_page_model.dart b/lib/pages/reception_page/reception_page_model.dart index c4834564..e72e9b96 100644 --- a/lib/pages/reception_page/reception_page_model.dart +++ b/lib/pages/reception_page/reception_page_model.dart @@ -5,7 +5,8 @@ import 'package:share_plus/share_plus.dart'; class ReceptionPageModel with ChangeNotifier { Future getIdenfifier(BuildContext context) async { - final String userDevUUID = (await StorageHelper().get(ProfileStorageKey.userDevUUID.key)) ?? ''; + final String userDevUUID = + (await StorageHelper().get(ProfileStorageKey.userDevUUID.key)) ?? ''; notifyListeners(); Share.share( diff --git a/lib/pages/reception_page/reception_page_widget.dart b/lib/pages/reception_page/reception_page_widget.dart index d48c10cf..7a6d41d7 100644 --- a/lib/pages/reception_page/reception_page_widget.dart +++ b/lib/pages/reception_page/reception_page_widget.dart @@ -25,7 +25,8 @@ class ReceptionPageWidget extends StatefulWidget { State createState() => _ReceptionPageWidgetState(); } -class _ReceptionPageWidgetState extends State with WidgetsBindingObserver { +class _ReceptionPageWidgetState extends State + with WidgetsBindingObserver { @override void initState() { super.initState(); @@ -55,7 +56,8 @@ class _ReceptionPageWidgetState extends State with WidgetsB @override Widget build(BuildContext context) { - double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context); + double limitedHeaderFontSize = + LimitedFontSizeUtil.getHeaderFontSize(context); double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context); double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context); @@ -75,34 +77,46 @@ class _ReceptionPageWidgetState extends State with WidgetsB Padding( padding: const EdgeInsets.fromLTRB(45, 20, 45, 15.0), child: Text( - FFLocalizations.of(context) - .getVariableText(ptText: 'Falta pouco para você utilizar o FRE Access Hub...', enText: 'You are close to using the FRE Access Hub...'), + FFLocalizations.of(context).getVariableText( + ptText: + 'Falta pouco para você utilizar o FRE Access Hub...', + enText: + 'You are close to using the FRE Access Hub...'), textAlign: TextAlign.center, - style: FlutterFlowTheme.of(context).displayLarge.override( + style: FlutterFlowTheme.of(context) + .displayLarge + .override( fontFamily: 'Plus Jakarta Sans', color: FlutterFlowTheme.of(context).accent1, fontSize: limitedHeaderFontSize, letterSpacing: 0.0, fontWeight: FontWeight.w700, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + useGoogleFonts: GoogleFonts.asMap() + .containsKey('Plus Jakarta Sans'), ), ), ), - const AtomImageSvgTheme(filename: 'reception', width: 180, height: 180), + const AtomImageSvgTheme( + filename: 'reception', width: 180, height: 180), Padding( padding: const EdgeInsets.fromLTRB(70, 30, 70.0, 40), child: Text( FFLocalizations.of(context).getVariableText( - ptText: 'Envie seu identificador para seu condomínio para vincularem sua conta aos nossos sistemas.', - enText: 'Send your identifier to your condominium to link your account to our systems.'), + ptText: + 'Envie seu identificador para seu condomínio para vincularem sua conta aos nossos sistemas.', + enText: + 'Send your identifier to your condominium to link your account to our systems.'), textAlign: TextAlign.center, - style: FlutterFlowTheme.of(context).displaySmall.override( + style: FlutterFlowTheme.of(context) + .displaySmall + .override( fontFamily: 'Nunito Sans', color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedBodyFontSize, letterSpacing: 0.0, fontWeight: FontWeight.w600, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + useGoogleFonts: GoogleFonts.asMap() + .containsKey('Plus Jakarta Sans'), ), ), ), @@ -113,32 +127,48 @@ class _ReceptionPageWidgetState extends State with WidgetsB Padding( padding: const EdgeInsets.fromLTRB(60, 0, 60, 10), child: Tooltip( - message: FFLocalizations.of(context) - .getVariableText(ptText: 'Seu identificador é utilizado para efetuar\no vínculo do seu APP com o condominio.', enText: 'My Identifier'), - textStyle: FlutterFlowTheme.of(context).labelSmall.override( + message: FFLocalizations.of(context).getVariableText( + ptText: + 'Seu identificador é utilizado para efetuar\no vínculo do seu APP com o condominio.', + enText: 'My Identifier'), + textStyle: FlutterFlowTheme.of(context) + .labelSmall + .override( fontFamily: 'Nunito Sans', - color: FlutterFlowTheme.of(context).secondaryText, + color: FlutterFlowTheme.of(context) + .secondaryText, fontSize: limitedInputFontSize, letterSpacing: 0.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + useGoogleFonts: GoogleFonts.asMap() + .containsKey('Plus Jakarta Sans'), ), child: FFButtonWidget( onPressed: () => model.getIdenfifier(context), - text: FFLocalizations.of(context).getVariableText(ptText: 'Meu Identificador', enText: 'My Identifier'), + text: FFLocalizations.of(context) + .getVariableText( + ptText: 'Meu Identificador', + enText: 'My Identifier'), options: FFButtonOptions( width: double.infinity, height: 30, - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 0.0, 0.0, 0.0, 0.0), + iconPadding: + const EdgeInsetsDirectional.fromSTEB( + 0.0, 0.0, 0.0, 0.0), color: FlutterFlowTheme.of(context).primary, - textStyle: FlutterFlowTheme.of(context).titleSmall.override( + textStyle: FlutterFlowTheme.of(context) + .titleSmall + .override( fontFamily: 'Nunito Sans', - color: FlutterFlowTheme.of(context).info, + color: + FlutterFlowTheme.of(context).info, fontSize: limitedInputFontSize, letterSpacing: 0.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + useGoogleFonts: GoogleFonts.asMap() + .containsKey('Plus Jakarta Sans'), ), elevation: 3.0, borderSide: const BorderSide( @@ -159,20 +189,29 @@ class _ReceptionPageWidgetState extends State with WidgetsB AuthenticationService.signOut(context); setState(() {}); }, - text: FFLocalizations.of(context).getVariableText(ptText: 'Sair da Conta', enText: 'Logout'), + text: FFLocalizations.of(context).getVariableText( + ptText: 'Sair da Conta', enText: 'Logout'), options: FFButtonOptions( width: double.infinity, height: 30, - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - color: FlutterFlowTheme.of(context).customColor1, - textStyle: FlutterFlowTheme.of(context).titleSmall.override( + padding: const EdgeInsetsDirectional.fromSTEB( + 0.0, 0.0, 0.0, 0.0), + iconPadding: + const EdgeInsetsDirectional.fromSTEB( + 0.0, 0.0, 0.0, 0.0), + color: + FlutterFlowTheme.of(context).customColor1, + textStyle: FlutterFlowTheme.of(context) + .titleSmall + .override( fontFamily: 'Nunito Sans', - color: FlutterFlowTheme.of(context).primaryBackground, + color: FlutterFlowTheme.of(context) + .primaryBackground, fontSize: limitedInputFontSize, letterSpacing: 0.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + useGoogleFonts: GoogleFonts.asMap() + .containsKey('Plus Jakarta Sans'), ), elevation: 3.0, borderSide: const BorderSide( diff --git a/lib/pages/register_visitor_page/register_visitor_page_model.dart b/lib/pages/register_visitor_page/register_visitor_page_model.dart index e6db1afb..9c813fc5 100644 --- a/lib/pages/register_visitor_page/register_visitor_page_model.dart +++ b/lib/pages/register_visitor_page/register_visitor_page_model.dart @@ -4,10 +4,12 @@ import '/flutter_flow/flutter_flow_util.dart'; import 'register_visitor_page_widget.dart' show RegisterVisitorPageWidget; import 'package:flutter/material.dart'; -class RegisterVisitorPageModel extends FlutterFlowModel { +class RegisterVisitorPageModel + extends FlutterFlowModel { /// State fields for stateful widgets in this page. - late RegisiterVistorTemplateComponentModel regisiterVistorTemplateComponentModel; + late RegisiterVistorTemplateComponentModel + regisiterVistorTemplateComponentModel; @override void initState(BuildContext context) {} diff --git a/lib/pages/register_visitor_page/register_visitor_page_widget.dart b/lib/pages/register_visitor_page/register_visitor_page_widget.dart index 50e11f96..483364bf 100644 --- a/lib/pages/register_visitor_page/register_visitor_page_widget.dart +++ b/lib/pages/register_visitor_page/register_visitor_page_widget.dart @@ -14,7 +14,8 @@ class RegisterVisitorPageWidget extends StatefulWidget { const RegisterVisitorPageWidget({super.key}); @override - State createState() => _RegisterVisitorPageWidgetState(); + State createState() => + _RegisterVisitorPageWidgetState(); } class _RegisterVisitorPageWidgetState extends State { @@ -65,7 +66,8 @@ class _RegisterVisitorPageWidgetState extends State { fontSize: 15.0, fontWeight: FontWeight.bold, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).headlineMediumFamily), ), ), actions: const [], diff --git a/lib/pages/reservation_page/reservation_page_widget.dart b/lib/pages/reservation_page/reservation_page_widget.dart index 0a388062..a75cd567 100644 --- a/lib/pages/reservation_page/reservation_page_widget.dart +++ b/lib/pages/reservation_page/reservation_page_widget.dart @@ -22,11 +22,16 @@ class _ReservationPageWidgetState extends State { late WebViewController _controllerAll; Future> initVariables() async { - final email = (await StorageHelper().get(SecureStorageKey.email.value)) ?? ''; - final name = (await StorageHelper().get(ProfileStorageKey.userName.key)) ?? ''; - final devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final clientId = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final email = + (await StorageHelper().get(SecureStorageKey.email.value)) ?? ''; + final name = + (await StorageHelper().get(ProfileStorageKey.userName.key)) ?? ''; + final devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final clientId = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const createdAt = '0000-00-00 00:00:00'; final url = 'https://hub.freaccess.com.br/hub/reservation/$clientId'; final freUserData = @@ -52,14 +57,20 @@ class _ReservationPageWidgetState extends State { builder: (context, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { return const Center(child: CircularProgressIndicator()); - } else if (snapshot.hasError || !snapshot.hasData || snapshot.data!.isEmpty) { - return Center(child: Text(FFLocalizations.of(context).getVariableText(enText: 'Unexpected error', ptText: 'Erro inesperado'))); + } else if (snapshot.hasError || + !snapshot.hasData || + snapshot.data!.isEmpty) { + return Center( + child: Text(FFLocalizations.of(context).getVariableText( + enText: 'Unexpected error', ptText: 'Erro inesperado'))); } else { final data = snapshot.data!; final url = data['url']!; final userUUID = data['userUUID']!; final freUserData = data['freUserData']!; - return Platform.isIOS ? _buildIOSWebView(url, userUUID, freUserData) : _buildAndroidWebView(url, userUUID, freUserData); + return Platform.isIOS + ? _buildIOSWebView(url, userUUID, freUserData) + : _buildAndroidWebView(url, userUUID, freUserData); } }, ), @@ -76,9 +87,14 @@ class _ReservationPageWidgetState extends State { ), onWebViewCreated: (controller) async {}, onLoadStop: (controller, url) async { - await controller.evaluateJavascript(source: "window.localStorage.setItem('fre-token', '\"$userUUID\"')"); - await controller.evaluateJavascript(source: "window.localStorage.setItem('fre-user-data', '$freUserData')"); - await controller.evaluateJavascript(source: "window.localStorage.setItem('enableBackButton', 'true')"); + await controller.evaluateJavascript( + source: + "window.localStorage.setItem('fre-token', '\"$userUUID\"')"); + await controller.evaluateJavascript( + source: + "window.localStorage.setItem('fre-user-data', '$freUserData')"); + await controller.evaluateJavascript( + source: "window.localStorage.setItem('enableBackButton', 'true')"); }, onUpdateVisitedHistory: (controller, uri, isVisited) { if (uri.toString().contains('/hub/home')) context.pop(); @@ -96,23 +112,30 @@ class _ReservationPageWidgetState extends State { ..setNavigationDelegate( NavigationDelegate( onPageStarted: (String url) { - final String token = "localStorage.setItem('fre-token', '\"$userUUID\"');"; - final String data = "localStorage.setItem('fre-user-data', '$freUserData');"; - const String backNavigation = "localStorage.setItem('enableBackButton', 'true');"; + final String token = + "localStorage.setItem('fre-token', '\"$userUUID\"');"; + final String data = + "localStorage.setItem('fre-user-data', '$freUserData');"; + const String backNavigation = + "localStorage.setItem('enableBackButton', 'true');"; _controllerAll.runJavaScript(token); _controllerAll.runJavaScript(data); _controllerAll.runJavaScript(backNavigation); }, onPageFinished: (String url) { - bool isDarkMode = SchedulerBinding.instance.platformDispatcher.platformBrightness == Brightness.dark; + bool isDarkMode = SchedulerBinding + .instance.platformDispatcher.platformBrightness == + Brightness.dark; if (isDarkMode) { _controllerAll.runJavaScript(WebviewUtil.jsEnableDarkMode); } }, onNavigationRequest: (NavigationRequest request) { - if (request.url.startsWith('http') || request.url.startsWith('https://api.whatsapp.com/send') || request.url.startsWith('https://wa.me')) { + if (request.url.startsWith('http') || + request.url.startsWith('https://api.whatsapp.com/send') || + request.url.startsWith('https://wa.me')) { launchUrlString(request.url); return NavigationDecision.prevent; } diff --git a/lib/pages/residents_on_the_property/residents_on_the_property_model.dart b/lib/pages/residents_on_the_property/residents_on_the_property_model.dart index cf0e1966..02c42ef4 100644 --- a/lib/pages/residents_on_the_property/residents_on_the_property_model.dart +++ b/lib/pages/residents_on_the_property/residents_on_the_property_model.dart @@ -3,7 +3,8 @@ import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_model.dart'; import 'package:hub/pages/residents_on_the_property/residents_on_the_property_screen.dart'; -class ResidentsOnThePropertyModel extends FlutterFlowModel { +class ResidentsOnThePropertyModel + extends FlutterFlowModel { ResidentsOnThePropertyModel({this.onRefresh}); late final VoidCallback? onRefresh; @@ -18,7 +19,8 @@ class ResidentsOnThePropertyModel extends FlutterFlowModel _ResidentsOnThePropertyState(); } -class _ResidentsOnThePropertyState extends State with TickerProviderStateMixin { +class _ResidentsOnThePropertyState extends State + with TickerProviderStateMixin { late ScrollController _scrollController; int _pageNumber = 1; @@ -33,12 +34,16 @@ class _ResidentsOnThePropertyState extends State with Ti @override void initState() { super.initState(); - model = createModel(context, () => ResidentsOnThePropertyModel(onRefresh: () => safeSetState(() {}))); + model = createModel( + context, + () => + ResidentsOnThePropertyModel(onRefresh: () => safeSetState(() {}))); _future = _fetch(); _scrollController = ScrollController() ..addListener(() { - if (_scrollController.position.atEdge && _scrollController.position.pixels != 0) { + if (_scrollController.position.atEdge && + _scrollController.position.pixels != 0) { _loadMore(); } }); @@ -52,7 +57,8 @@ class _ResidentsOnThePropertyState extends State with Ti @override Widget build(BuildContext context) { - late final limitedHeaderTextSize = LimitedFontSizeUtil.getHeaderFontSize(context); + late final limitedHeaderTextSize = + LimitedFontSizeUtil.getHeaderFontSize(context); return Scaffold( appBar: _appBar(context), @@ -129,7 +135,9 @@ class _ResidentsOnThePropertyState extends State with Ti return AppBar( backgroundColor: FlutterFlowTheme.of(context).primaryBackground, automaticallyImplyLeading: false, - title: Text(FFLocalizations.of(context).getVariableText(ptText: 'Moradores', enText: 'Residents'), + title: Text( + FFLocalizations.of(context) + .getVariableText(ptText: 'Moradores', enText: 'Residents'), style: FlutterFlowTheme.of(context).headlineMedium.override( fontFamily: 'Nunito', color: FlutterFlowTheme.of(context).primaryText, @@ -164,7 +172,8 @@ class _ResidentsOnThePropertyState extends State with Ti try { setState(() => _loading = true); - var response = await PhpGroup.getResidentsByProperty.call(_pageNumber.toString()); + var response = + await PhpGroup.getResidentsByProperty.call(_pageNumber.toString()); final List residents = response.jsonBody['residents'] ?? []; safeSetState(() => count = response.jsonBody['total_rows'] ?? 0); @@ -189,7 +198,8 @@ class _ResidentsOnThePropertyState extends State with Ti return null; } catch (e, s) { DialogUtil.errorDefault(context); - LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de moradores", e, s); + LogUtil.requestAPIFailed( + "proccessRequest.php", "", "Consulta de moradores", e, s); setState(() { _hasData = false; _loading = false; @@ -227,19 +237,22 @@ class _ResidentsOnThePropertyState extends State with Ti Widget _item(BuildContext context, dynamic uItem) { return CardItemTemplateComponentWidget( - imagePath: 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${model.devUUID}&cliID=${model.cliUUID}&atividade=getFoto&Documento=${uItem['documento']}&tipo=Z', + imagePath: + 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${model.devUUID}&cliID=${model.cliUUID}&atividade=getFoto&Documento=${uItem['documento']}&tipo=Z', labelsHashMap: { - '${FFLocalizations.of(context).getVariableText(ptText: "Nome", enText: "Name")}:': uItem['nome'] ?? '', + '${FFLocalizations.of(context).getVariableText(ptText: "Nome", enText: "Name")}:': + uItem['nome'] ?? '', //statusweb - '${FFLocalizations.of(context).getVariableText(ptText: "Possui App", enText: "Has App")}:': uItem['statusweb'] == "A" - ? FFLocalizations.of(context).getVariableText( - ptText: 'Sim', - enText: 'Yes', - ) - : FFLocalizations.of(context).getVariableText( - ptText: 'Não', - enText: 'No', - ), + '${FFLocalizations.of(context).getVariableText(ptText: "Possui App", enText: "Has App")}:': + uItem['statusweb'] == "A" + ? FFLocalizations.of(context).getVariableText( + ptText: 'Sim', + enText: 'Yes', + ) + : FFLocalizations.of(context).getVariableText( + ptText: 'Não', + enText: 'No', + ), }, statusHashMap: [], onTapCardItemAction: () async {}, diff --git a/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart b/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart index 18276cc3..f7248d93 100644 --- a/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart +++ b/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart @@ -16,7 +16,8 @@ import 'package:share_plus/share_plus.dart'; import '../../shared/utils/validator_util.dart'; -class ScheduleCompleteVisitPageModel extends FlutterFlowModel { +class ScheduleCompleteVisitPageModel + extends FlutterFlowModel { ScheduleCompleteVisitPageModel({this.safeSetState}); late VoidCallback? safeSetState; @@ -44,14 +45,16 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel requestFn: requestFn, ); void clearVisitHistoryCache() => _visitHistoryManager.clear(); - void clearVisitHistoryCacheKey(String? uniqueKey) => _visitHistoryManager.clearRequest(uniqueKey); + void clearVisitHistoryCacheKey(String? uniqueKey) => + _visitHistoryManager.clearRequest(uniqueKey); String convertDateFormat(String dateStr) { try { DateFormat originalFormat = DateFormat('dd/MM/yyyy HH:mm:ss'); DateFormat newFormat = DateFormat('y-M-d H:mm:ss'); - if (!RegExp(r'^\d{1,2}/\d{1,2}/\d{4} \d{1,2}:\d{2}:\d{2}$').hasMatch(dateStr)) { + if (!RegExp(r'^\d{1,2}/\d{1,2}/\d{4} \d{1,2}:\d{2}:\d{2}$') + .hasMatch(dateStr)) { return 'Invalid date format'; } @@ -66,12 +69,20 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel void addToVisitorJsonList(dynamic item) => visitorJsonList.add(item); void removeFromVisitorJsonList(dynamic item) => visitorJsonList.remove(item); - void removeAtIndexFromVisitorJsonList(int index) => visitorJsonList.removeAt(index); - void insertAtIndexInVisitorJsonList(int index, dynamic item) => visitorJsonList.insert(index, item); - void updateVisitorJsonListAtIndex(int index, Function(dynamic) updateFn) => visitorJsonList[index] = updateFn(visitorJsonList[index]); + void removeAtIndexFromVisitorJsonList(int index) => + visitorJsonList.removeAt(index); + void insertAtIndexInVisitorJsonList(int index, dynamic item) => + visitorJsonList.insert(index, item); + void updateVisitorJsonListAtIndex(int index, Function(dynamic) updateFn) => + visitorJsonList[index] = updateFn(visitorJsonList[index]); bool isValid() { - if (textController1!.text.isEmpty || textController2!.text.isEmpty || dropDownValue1 == null || dropDownValue1!.isEmpty || dropDownValue2 == null || dropDownValue2!.isEmpty) { + if (textController1!.text.isEmpty || + textController2!.text.isEmpty || + dropDownValue1 == null || + dropDownValue1!.isEmpty || + dropDownValue2 == null || + dropDownValue2!.isEmpty) { return false; } @@ -84,11 +95,14 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel DateTime selectedDateTime1; DateTime selectedDateTime2; - DateTime currentDateTime = DateTime.now().subtract(const Duration(minutes: 10)); + DateTime currentDateTime = + DateTime.now().subtract(const Duration(minutes: 10)); try { - selectedDateTime1 = DateFormat('dd/MM/yyyy HH:mm:ss').parse(textController1.text); - selectedDateTime2 = DateFormat('dd/MM/yyyy HH:mm:ss').parse(textController2.text); + selectedDateTime1 = + DateFormat('dd/MM/yyyy HH:mm:ss').parse(textController1.text); + selectedDateTime2 = + DateFormat('dd/MM/yyyy HH:mm:ss').parse(textController2.text); } catch (e) { return false; } @@ -110,7 +124,8 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel final unfocusNode = FocusNode(); TabController? tabBarController; - int get tabBarCurrentIndex => tabBarController != null ? tabBarController!.index : 0; + int get tabBarCurrentIndex => + tabBarController != null ? tabBarController!.index : 0; FocusNode? textFieldFocusNode1; TextEditingController? textController1; @@ -125,14 +140,16 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel if (val != '0') { try { DateTime startDate = DateFormat('dd/MM/yyyy HH:mm:ss').parse(val); - DateTime endDate = DateFormat('dd/MM/yyyy HH:mm:ss').parse(textController2!.text); + DateTime endDate = + DateFormat('dd/MM/yyyy HH:mm:ss').parse(textController2!.text); if (startDate.isAfter(endDate)) { return FFLocalizations.of(context).getVariableText( ptText: 'A data de início deve ser anterior à data de término.', enText: 'Start date must be before end date.', ); } - if (startDate.isBefore(DateTime.now().subtract(const Duration(minutes: 10)))) { + if (startDate + .isBefore(DateTime.now().subtract(const Duration(minutes: 10)))) { return FFLocalizations.of(context).getVariableText( enText: 'Start date must be after current date.', ptText: 'A data de início deve ser posterior à data atual.', @@ -145,7 +162,9 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel ); } } catch (e) { - return FFLocalizations.of(context).getVariableText(ptText: 'Preencha corretamente o campo de término da visita!', enText: 'Fill in the end of visit field correctly!'); + return FFLocalizations.of(context).getVariableText( + ptText: 'Preencha corretamente o campo de término da visita!', + enText: 'Fill in the end of visit field correctly!'); } } return null; @@ -165,7 +184,8 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel if (val != '0') { try { DateTime endDate = DateFormat('dd/MM/yyyy HH:mm:ss').parse(val); - DateTime startDate = DateFormat('dd/MM/yyyy HH:mm:ss').parse(textController1!.text); + DateTime startDate = + DateFormat('dd/MM/yyyy HH:mm:ss').parse(textController1!.text); if (endDate.isBefore(startDate)) { return FFLocalizations.of(context).getVariableText( @@ -173,7 +193,8 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel ptText: 'A data de término deve ser posterior à data de início.', ); } - if (startDate.isBefore(DateTime.now().subtract(const Duration(minutes: 10)))) { + if (startDate + .isBefore(DateTime.now().subtract(const Duration(minutes: 10)))) { return FFLocalizations.of(context).getVariableText( enText: 'End date must be after current date.', ptText: 'A data de término deve ser posterior à data atual.', @@ -186,7 +207,9 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel ); } } catch (e) { - return FFLocalizations.of(context).getVariableText(ptText: 'Preencha corretamente o campo de início da visita!', enText: 'Fill in the visit start field correctly!'); + return FFLocalizations.of(context).getVariableText( + ptText: 'Preencha corretamente o campo de início da visita!', + enText: 'Fill in the visit start field correctly!'); } } return null; @@ -208,8 +231,10 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel Future _initVariables() async { devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } @override @@ -240,8 +265,10 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel textController3 = TextEditingController(); textController3Validator = _textController3Validator; - dropDownValueController1 ??= FormFieldController(dropDownValue1 ??= ''); - dropDownValueController2 ??= FormFieldController(dropDownValue2 ??= ''); + dropDownValueController1 ??= + FormFieldController(dropDownValue1 ??= ''); + dropDownValueController2 ??= + FormFieldController(dropDownValue2 ??= ''); } // Updated variables for dropdowns @@ -257,8 +284,11 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel void processDropDown1(List reasonsJsonList) { if (dropDownValue1 != null && dropDownValue1!.isNotEmpty) { String value = dropDownValue1!; - if (!(value.contains('{') && value.contains('}') && value.contains(':'))) { - var item = reasonsJsonList.where((reason) => reason['MOT_DESCRICAO'].toString().contains(dropDownValue1!)); + if (!(value.contains('{') && + value.contains('}') && + value.contains(':'))) { + var item = reasonsJsonList.where((reason) => + reason['MOT_DESCRICAO'].toString().contains(dropDownValue1!)); dropDownValue1 = item.firstOrNull?.toString() ?? ''; dropDownValueController1?.value = dropDownValue1!; } @@ -270,8 +300,11 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel void processDropDown2(List lavelList) { if (dropDownValue2 != null && dropDownValue2!.isNotEmpty) { String value = dropDownValue2!; - if (!(value.contains('{') && value.contains('}') && value.contains(':'))) { - var item = lavelList.where((level) => level['NAC_DESCRICAO'].toString().contains(dropDownValue2!)); + if (!(value.contains('{') && + value.contains('}') && + value.contains(':'))) { + var item = lavelList.where((level) => + level['NAC_DESCRICAO'].toString().contains(dropDownValue2!)); dropDownValue2 = item.firstOrNull?.toString() ?? ''; dropDownValueController2?.value = dropDownValue2!; } @@ -322,7 +355,11 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel } } - Future visitCancelAction(BuildContext context, {required int? idDestino, required int? idVisita, required String? accessKey, required String? email}) async { + Future visitCancelAction(BuildContext context, + {required int? idDestino, + required int? idVisita, + required String? accessKey, + required String? email}) async { final ApiCallResponse? response; final CancelaVisita callback = PhpGroup.cancelaVisita; @@ -394,7 +431,8 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel Widget buildVisitDetails({ required dynamic item, required BuildContext context, - required Future Function(BuildContext, int, int, String, String) changeStatusAction, + required Future Function(BuildContext, int, int, String, String) + changeStatusAction, required String devUUID, required String userUUID, required String cliUUID, @@ -402,7 +440,8 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel }) { return DetailsComponentWidget( buttons: [ - if (Status.getStatus(item['VAW_STATUS']) == StatusEnum.active) // REJECT ACTION + if (Status.getStatus(item['VAW_STATUS']) == + StatusEnum.active) // REJECT ACTION FFButtonWidget( text: FFLocalizations.of(context).getVariableText( ptText: 'Cancelar', @@ -481,7 +520,8 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel // borderRadius: 12, ), ), - if (Status.getStatus(item['VAW_STATUS']) != StatusEnum.active) // RECALL ACTION + if (Status.getStatus(item['VAW_STATUS']) != + StatusEnum.active) // RECALL ACTION FFButtonWidget( text: FFLocalizations.of(context).getVariableText( ptText: 'Reagendar', @@ -516,7 +556,8 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel // borderRadius: 12, ), ), - if (Status.getStatus(item['VAW_STATUS']) == StatusEnum.active) // SHARE ACTION + if (Status.getStatus(item['VAW_STATUS']) == + StatusEnum.active) // SHARE ACTION FFButtonWidget( text: FFLocalizations.of(context).getVariableText( ptText: 'Compartilhar', @@ -553,13 +594,21 @@ URL do Convite: https://visita.freaccess.com.br/${item['VAW_ID']}/$cliUUID/${ite ), ], labelsHashMap: Map.from({ - '${FFLocalizations.of(context).getVariableText(ptText: "Nome", enText: "Name")}:': item['VTE_NOME'] ?? '', + '${FFLocalizations.of(context).getVariableText(ptText: "Nome", enText: "Name")}:': + item['VTE_NOME'] ?? '', '${FFLocalizations.of(context).getVariableText(ptText: "Inicio", enText: "Start")}:': - item['VAW_DTINICIO'] != '' && item['VAW_DTINICIO'] != null ? ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', item['VAW_DTINICIO']) : '', + item['VAW_DTINICIO'] != '' && item['VAW_DTINICIO'] != null + ? ValidatorUtil.toLocalDateTime( + 'yyyy-MM-dd HH:mm:ss', item['VAW_DTINICIO']) + : '', '${FFLocalizations.of(context).getVariableText(ptText: "Fim", enText: "End")}:': - item['VAW_DTFIM'] != '' && item['VAW_DTFIM'] != null ? ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', item['VAW_DTFIM']) : '', + item['VAW_DTFIM'] != '' && item['VAW_DTFIM'] != null + ? ValidatorUtil.toLocalDateTime( + 'yyyy-MM-dd HH:mm:ss', item['VAW_DTFIM']) + : '', }), - imagePath: 'https://freaccess.com.br/freaccess/getImage.php?cliID=$cliUUID&atividade=getFoto&Documento=${item['VTE_DOCUMENTO'] ?? ''}&tipo=E', + imagePath: + 'https://freaccess.com.br/freaccess/getImage.php?cliID=$cliUUID&atividade=getFoto&Documento=${item['VTE_DOCUMENTO'] ?? ''}&tipo=E', statusHashMap: [ if (Status.getStatus(item['VAW_STATUS']) == StatusEnum.active) Map.from({ diff --git a/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart b/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart index 71050c2d..d5b8aea4 100644 --- a/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart +++ b/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart @@ -32,10 +32,13 @@ class ScheduleCompleteVisitPageWidget extends ScheduleComplete { const ScheduleCompleteVisitPageWidget({super.key}); @override - State createState() => _ScheduleCompleteVisitPageWidgetState(); + State createState() => + _ScheduleCompleteVisitPageWidgetState(); } -class _ScheduleCompleteVisitPageWidgetState extends State with TickerProviderStateMixin { +class _ScheduleCompleteVisitPageWidgetState + extends State + with TickerProviderStateMixin { bool _isLoading = false; late ScheduleCompleteVisitPageModel _model; int _visitHistoryLoadingIdx = 0; @@ -48,7 +51,10 @@ class _ScheduleCompleteVisitPageWidgetState extends State ScheduleCompleteVisitPageModel(safeSetState: () => safeSetState(() {}))); + _model = createModel( + context, + () => ScheduleCompleteVisitPageModel( + safeSetState: () => safeSetState(() {}))); _model.updateState = (Function fn) => safeSetState(fn()); _model.tabBarController = TabController( @@ -74,7 +80,8 @@ class _ScheduleCompleteVisitPageWidgetState extends State newItems = await fetchVisitHistory(start, _visitHistoryLoadingCount); + final List newItems = + await fetchVisitHistory(start, _visitHistoryLoadingCount); if (newItems.isNotEmpty) { _visitHistoryList.addAll(newItems); @@ -84,7 +91,8 @@ class _ScheduleCompleteVisitPageWidgetState extends State _model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(_model.unfocusNode) : FocusScope.of(context).unfocus(), + onTap: () => _model.unfocusNode.canRequestFocus + ? FocusScope.of(context).requestFocus(_model.unfocusNode) + : FocusScope.of(context).unfocus(), child: Scaffold( key: scaffoldKey, backgroundColor: FlutterFlowTheme.of(context).primaryBackground, @@ -147,7 +157,8 @@ class _ScheduleCompleteVisitPageWidgetState extends State 16.0 ? 100 : 80; return SingleChildScrollView( @@ -227,17 +243,21 @@ class _ScheduleCompleteVisitPageWidgetState extends State e).toList(); + final visitorListView = + model.visitorJsonList.map((e) => e).toList(); return ListView.separated( padding: const EdgeInsets.fromLTRB( 0, @@ -647,16 +827,20 @@ class _ScheduleCompleteVisitPageWidgetState extends State const SizedBox(height: 5.0), + separatorBuilder: (_, __) => + const SizedBox(height: 5.0), itemBuilder: (context, visitorListViewIndex) { - final visitorListViewItem = visitorListView[visitorListViewIndex]; + final visitorListViewItem = + visitorListView[visitorListViewIndex]; return Padding( - padding: const EdgeInsets.symmetric(horizontal: 30), + padding: + const EdgeInsets.symmetric(horizontal: 30), child: Container( width: MediaQuery.of(context).size.width, height: 70.0, decoration: BoxDecoration( - color: FlutterFlowTheme.of(context).primaryBackground, + color: FlutterFlowTheme.of(context) + .primaryBackground, ), child: Row( mainAxisSize: MainAxisSize.max, @@ -670,8 +854,10 @@ class _ScheduleCompleteVisitPageWidgetState extends State model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(model.unfocusNode) : FocusScope.of(context).unfocus(), + onTap: () => model.unfocusNode.canRequestFocus + ? FocusScope.of(context) + .requestFocus(model.unfocusNode) + : FocusScope.of(context).unfocus(), child: SizedBox( - height: MediaQuery.of(context).size.height * 0.8, + height: MediaQuery.of(context).size.height * + 0.8, width: MediaQuery.of(context).size.width, child: Padding( padding: MediaQuery.viewInsetsOf(context), - child: VisitorSearchModalTemplateComponentWidget( + child: + VisitorSearchModalTemplateComponentWidget( getVisitors: (visitorsParam) async { - model.visitorJsonList = visitorsParam!.toList().cast(); + model.visitorJsonList = visitorsParam! + .toList() + .cast(); safeSetState(() {}); }, getDocs: (docsParam) async { - model.visitorStrList = strListToStr(docsParam!.toList()); + model.visitorStrList = + strListToStr(docsParam!.toList()); safeSetState(() {}); }, ), @@ -757,7 +966,8 @@ class _ScheduleCompleteVisitPageWidgetState extends State( - FlutterFlowTheme.of(context).primary, + valueColor: + AlwaysStoppedAnimation( + FlutterFlowTheme.of(context) + .primary, ), ), ) : Icon( Icons.add, - color: FlutterFlowTheme.of(context).primary, + color: FlutterFlowTheme.of(context) + .primary, size: 30.0, ), Padding( - padding: const EdgeInsets.fromLTRB(0, 15, 0, 0), + padding: + const EdgeInsets.fromLTRB(0, 15, 0, 0), child: Text( FFLocalizations.of(context).getText( 'r8soavtz', ), textAlign: TextAlign.center, - style: FlutterFlowTheme.of(context).titleSmall.override( - fontFamily: FlutterFlowTheme.of(context).titleSmallFamily, - color: FlutterFlowTheme.of(context).primaryText, + style: FlutterFlowTheme.of(context) + .titleSmall + .override( + fontFamily: + FlutterFlowTheme.of(context) + .titleSmallFamily, + color: FlutterFlowTheme.of(context) + .primaryText, fontSize: limitedInputFontSize, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .titleSmallFamily), ), ), ) @@ -811,17 +1033,23 @@ class _ScheduleCompleteVisitPageWidgetState extends State( @@ -848,43 +1078,69 @@ class _ScheduleCompleteVisitPageWidgetState extends State( - fillColor: FlutterFlowTheme.of(context).primaryBackground, - controller: model.dropDownValueController1, + fillColor: FlutterFlowTheme.of(context) + .primaryBackground, + controller: + model.dropDownValueController1, options: model.reasonsDropDown1, optionLabels: reasonsOptionLabels, - onChanged: (val) => safeSetState(() => model.dropDownValue1 = val), + onChanged: (val) => safeSetState( + () => model.dropDownValue1 = val), width: double.infinity, height: double.infinity, - textStyle: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + textStyle: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: + FlutterFlowTheme.of(context) + .bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of( + context) + .bodyMediumFamily), fontSize: limitedInputFontSize, ), - hintText: FFLocalizations.of(context).getVariableText(enText: 'Reason for Visit', ptText: 'Motivo da Visita'), + hintText: FFLocalizations.of(context) + .getVariableText( + enText: 'Reason for Visit', + ptText: 'Motivo da Visita'), icon: Icon( Icons.keyboard_arrow_down_rounded, - color: FlutterFlowTheme.of(context).accent1, + color: FlutterFlowTheme.of(context) + .accent1, size: 24.0, ), elevation: 2.0, - borderColor: FlutterFlowTheme.of(context).customColor6, + borderColor: + FlutterFlowTheme.of(context) + .customColor6, borderWidth: 0.5, borderRadius: 10.0, - margin: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 0.0), + margin: const EdgeInsetsDirectional + .fromSTEB(16.0, 0.0, 16.0, 0.0), hidesUnderline: true, isOverButton: true, isSearchable: false, @@ -904,15 +1160,20 @@ class _ScheduleCompleteVisitPageWidgetState extends State( - controller: model.dropDownValueController2, + controller: + model.dropDownValueController2, options: model.lavelsDropDown2, optionLabels: lavelsOptionLabels, - onChanged: (val) => safeSetState(() => model.dropDownValue2 = val), + onChanged: (val) => safeSetState( + () => model.dropDownValue2 = val), width: double.infinity, height: double.infinity, - textStyle: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + textStyle: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: + FlutterFlowTheme.of(context) + .bodyMediumFamily, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of( + context) + .bodyMediumFamily), fontSize: limitedInputFontSize, ), - hintText: FFLocalizations.of(context).getVariableText( + hintText: FFLocalizations.of(context) + .getVariableText( enText: 'Level of access', ptText: 'Nível de acesso', ), icon: Icon( Icons.keyboard_arrow_down_rounded, - color: FlutterFlowTheme.of(context).accent1, + color: FlutterFlowTheme.of(context) + .accent1, size: 24.0, ), elevation: 2.0, - borderColor: FlutterFlowTheme.of(context).customColor6, + borderColor: + FlutterFlowTheme.of(context) + .customColor6, borderWidth: 0.5, borderRadius: 10.0, - margin: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 0.0), + margin: const EdgeInsetsDirectional + .fromSTEB(16.0, 0.0, 16.0, 0.0), hidesUnderline: true, - fillColor: FlutterFlowTheme.of(context).primaryBackground, + fillColor: FlutterFlowTheme.of(context) + .primaryBackground, isOverButton: true, isSearchable: false, isMultiSelect: false, @@ -998,15 +1284,20 @@ class _ScheduleCompleteVisitPageWidgetState extends State await DialogUtil.errorDefault(context)) + .catchError((e) async => + await DialogUtil.errorDefault(context)) .then((value) async { if (PhpGroup.postScheduleVisitCall.error( (value.jsonBody ?? ''), @@ -1240,16 +1579,22 @@ class _ScheduleCompleteVisitPageWidgetState extends State(''); - model.dropDownValueController2 = FormFieldController(''); + model.dropDownValueController1 = + FormFieldController(''); + model.dropDownValueController2 = + FormFieldController(''); model.visitorStrList = ''; model.visitorJsonList = []; ToastUtil.showToast( - message: FFLocalizations.of(context).getVariableText(ptText: 'Visitante já adicionado!', enText: 'Visitor already added!'), + message: FFLocalizations.of(context) + .getVariableText( + ptText: 'Visitante já adicionado!', + enText: 'Visitor already added!'), gravity: ToastGravity.TOP, backgroundColor: Colors.green, - fontSize: LimitedFontSizeUtil.getBodyFontSize(context), + fontSize: + LimitedFontSizeUtil.getBodyFontSize(context), ); await ShareUtil.showShare(value.jsonBody); @@ -1268,9 +1613,12 @@ class _ScheduleCompleteVisitPageWidgetState extends State model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(model.unfocusNode) : FocusScope.of(context).unfocus(), + onTap: () => model.unfocusNode.canRequestFocus + ? FocusScope.of(context) + .requestFocus(model.unfocusNode) + : FocusScope.of(context).unfocus(), child: Dialog( alignment: Alignment.topCenter, child: SizedBox( child: DetailsComponentWidget( buttons: [ FFButtonWidget( - text: FFLocalizations.of(context).getVariableText( + text: FFLocalizations.of(context) + .getVariableText( enText: 'Done', ptText: 'Confirmar', ), @@ -1295,14 +1647,19 @@ class _ScheduleCompleteVisitPageWidgetState extends State.from({ - FFLocalizations.of(context).getVariableText( + FFLocalizations.of(context) + .getVariableText( ptText: 'Inativo', enText: 'Inactive', ): FlutterFlowTheme.of(context).success, diff --git a/lib/pages/schedule_complete_visit_page/visit_history_page_widget.dart b/lib/pages/schedule_complete_visit_page/visit_history_page_widget.dart index b75dd4b3..bafb04bb 100644 --- a/lib/pages/schedule_complete_visit_page/visit_history_page_widget.dart +++ b/lib/pages/schedule_complete_visit_page/visit_history_page_widget.dart @@ -20,7 +20,8 @@ class VisitHistoryWidget extends ScheduleComplete { _VisitHistoryWidgetState createState() => _VisitHistoryWidgetState(); } -class _VisitHistoryWidgetState extends State with TickerProviderStateMixin, Status { +class _VisitHistoryWidgetState extends State + with TickerProviderStateMixin, Status { late final String devUUID; late final String userUUID; late final String cliUUID; @@ -36,21 +37,27 @@ class _VisitHistoryWidgetState extends State with TickerProv Future _initVariables() async { devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } @override void initState() { super.initState(); - _model = createModel(context, () => ScheduleCompleteVisitPageModel(safeSetState: () => safeSetState(() {}))); + _model = createModel( + context, + () => ScheduleCompleteVisitPageModel( + safeSetState: () => safeSetState(() {}))); _initVariables(); _visitFuture = _fetchVisits(); _scrollController = ScrollController() ..addListener(() { - if (_scrollController.position.atEdge && _scrollController.position.pixels != 0) { + if (_scrollController.position.atEdge && + _scrollController.position.pixels != 0) { _loadMore(); } }); @@ -95,7 +102,8 @@ class _VisitHistoryWidgetState extends State with TickerProv return null; } catch (e, s) { await DialogUtil.errorDefault(context); - LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Visitas", e, s); + LogUtil.requestAPIFailed( + "proccessRequest.php", "", "Consulta de Visitas", e, s); setState(() { _hasData = false; _loading = false; @@ -115,7 +123,8 @@ class _VisitHistoryWidgetState extends State with TickerProv ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text( - FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."), + FFLocalizations.of(context).getVariableText( + ptText: "Não há mais dados.", enText: "No more data."), style: TextStyle( color: Colors.white, fontSize: LimitedFontSizeUtil.getBodyFontSize(context), @@ -129,7 +138,8 @@ class _VisitHistoryWidgetState extends State with TickerProv @override Widget build(BuildContext context) { - double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context); + double limitedHeaderFontSize = + LimitedFontSizeUtil.getHeaderFontSize(context); return Column( mainAxisSize: MainAxisSize.max, @@ -142,8 +152,14 @@ class _VisitHistoryWidgetState extends State with TickerProv mainAxisSize: MainAxisSize.max, children: [ Center( - child: Text(FFLocalizations.of(context).getVariableText(ptText: "Nenhuma visita encontrada!", enText: "No visit found"), - style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedHeaderFontSize, fontWeight: FontWeight.bold)), + child: Text( + FFLocalizations.of(context).getVariableText( + ptText: "Nenhuma visita encontrada!", + enText: "No visit found"), + style: TextStyle( + color: FlutterFlowTheme.of(context).primaryText, + fontSize: limitedHeaderFontSize, + fontWeight: FontWeight.bold)), ) ], ), @@ -184,12 +200,20 @@ class _VisitHistoryWidgetState extends State with TickerProv imagePath: 'https://freaccess.com.br/freaccess/getImage.php?devUUID=$devUUID&userUUID=$userUUID&cliID=$cliUUID&atividade=getFoto&Documento=${visitaWrapItem['VTE_DOCUMENTO'] ?? ''}&tipo=E', labelsHashMap: { - '${FFLocalizations.of(context).getVariableText(ptText: "Nome", enText: "Name")}:': visitaWrapItem['VTE_NOME'] ?? '', - '${FFLocalizations.of(context).getVariableText(ptText: "Inicio", enText: "Start")}:': visitaWrapItem['VAW_DTINICIO'] != '' && visitaWrapItem['VAW_DTINICIO'] != null - ? ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', visitaWrapItem['VAW_DTINICIO']) - : '', + '${FFLocalizations.of(context).getVariableText(ptText: "Nome", enText: "Name")}:': + visitaWrapItem['VTE_NOME'] ?? '', + '${FFLocalizations.of(context).getVariableText(ptText: "Inicio", enText: "Start")}:': + visitaWrapItem['VAW_DTINICIO'] != '' && + visitaWrapItem['VAW_DTINICIO'] != null + ? ValidatorUtil.toLocalDateTime( + 'yyyy-MM-dd HH:mm:ss', visitaWrapItem['VAW_DTINICIO']) + : '', '${FFLocalizations.of(context).getVariableText(ptText: "Fim", enText: "End")}:': - visitaWrapItem['VAW_DTFIM'] != '' && visitaWrapItem['VAW_DTFIM'] != null ? ValidatorUtil.toLocalDateTime('yyyy-MM-dd HH:mm:ss', visitaWrapItem['VAW_DTFIM']) : '', + visitaWrapItem['VAW_DTFIM'] != '' && + visitaWrapItem['VAW_DTFIM'] != null + ? ValidatorUtil.toLocalDateTime( + 'yyyy-MM-dd HH:mm:ss', visitaWrapItem['VAW_DTFIM']) + : '', }, statusHashMap: [ if (Status.getStatus(visitaWrapItem['VAW_STATUS']) == StatusEnum.active) @@ -199,35 +223,40 @@ class _VisitHistoryWidgetState extends State with TickerProv enText: 'Active', ): FlutterFlowTheme.of(context).warning, }, - if (Status.getStatus(visitaWrapItem['VAW_STATUS']) == StatusEnum.finished) + if (Status.getStatus(visitaWrapItem['VAW_STATUS']) == + StatusEnum.finished) { FFLocalizations.of(context).getVariableText( ptText: 'Finalizado', enText: 'Finished', ): FlutterFlowTheme.of(context).success, }, - if (Status.getStatus(visitaWrapItem['VAW_STATUS']) == StatusEnum.unknown) + if (Status.getStatus(visitaWrapItem['VAW_STATUS']) == + StatusEnum.unknown) { FFLocalizations.of(context).getVariableText( ptText: 'Desconhecido', enText: 'Unknown', ): FlutterFlowTheme.of(context).alternate, }, - if (Status.getStatus(visitaWrapItem['VAW_STATUS']) == StatusEnum.canceled) + if (Status.getStatus(visitaWrapItem['VAW_STATUS']) == + StatusEnum.canceled) { FFLocalizations.of(context).getVariableText( ptText: 'Cancelado', enText: 'Canceled', ): FlutterFlowTheme.of(context).error, }, - if (Status.getStatus(visitaWrapItem['VAW_STATUS']) == StatusEnum.blocked) + if (Status.getStatus(visitaWrapItem['VAW_STATUS']) == + StatusEnum.blocked) { FFLocalizations.of(context).getVariableText( ptText: 'Bloqueado', enText: 'Blocked', ): FlutterFlowTheme.of(context).error, }, - if (Status.getStatus(visitaWrapItem['VAW_STATUS']) == StatusEnum.inactive) + if (Status.getStatus(visitaWrapItem['VAW_STATUS']) == + StatusEnum.inactive) { FFLocalizations.of(context).getVariableText( ptText: 'Inativo', @@ -236,10 +265,14 @@ class _VisitHistoryWidgetState extends State with TickerProv }, ], onTapCardItemAction: () async { - final devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; - final cliName = (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + final devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final cliName = + (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; await showDialog( useSafeArea: true, @@ -266,7 +299,8 @@ class _VisitHistoryWidgetState extends State with TickerProv }); }).catchError((e, s) async { await DialogUtil.errorDefault(context); - LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Visitas", e, s); + LogUtil.requestAPIFailed( + "proccessRequest.php", "", "Consulta de Visitas", e, s); safeSetState(() { _hasData = false; _loading = false; diff --git a/lib/pages/sign_in_page/sign_in_page_model.dart b/lib/pages/sign_in_page/sign_in_page_model.dart index 8642b98d..e8b945bd 100644 --- a/lib/pages/sign_in_page/sign_in_page_model.dart +++ b/lib/pages/sign_in_page/sign_in_page_model.dart @@ -12,7 +12,8 @@ class SignInPageModel extends FlutterFlowModel { @override void initState(BuildContext context) { - signInTemplateComponentModel = createModel(context, () => SignInTemplateComponentModel()); + signInTemplateComponentModel = + createModel(context, () => SignInTemplateComponentModel()); } @override diff --git a/lib/pages/sign_in_page/sign_in_page_widget.dart b/lib/pages/sign_in_page/sign_in_page_widget.dart index 7e0dd2da..e632670a 100644 --- a/lib/pages/sign_in_page/sign_in_page_widget.dart +++ b/lib/pages/sign_in_page/sign_in_page_widget.dart @@ -35,7 +35,9 @@ class _SignInPageWidgetState extends State { Widget build(BuildContext context) { StorageHelper().context = context; return GestureDetector( - onTap: () => _model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(_model.unfocusNode) : FocusScope.of(context).unfocus(), + onTap: () => _model.unfocusNode.canRequestFocus + ? FocusScope.of(context).requestFocus(_model.unfocusNode) + : FocusScope.of(context).unfocus(), child: Scaffold( key: scaffoldKey, backgroundColor: FlutterFlowTheme.of(context).primaryBackground, diff --git a/lib/pages/sign_up_page/sign_up_page_model.dart b/lib/pages/sign_up_page/sign_up_page_model.dart index ff69d9b5..938a3b46 100644 --- a/lib/pages/sign_up_page/sign_up_page_model.dart +++ b/lib/pages/sign_up_page/sign_up_page_model.dart @@ -12,7 +12,8 @@ class SignUpPageModel extends FlutterFlowModel { @override void initState(BuildContext context) { - signUpTemplateComponentModel = createModel(context, () => SignUpTemplateComponentModel()); + signUpTemplateComponentModel = + createModel(context, () => SignUpTemplateComponentModel()); } @override diff --git a/lib/pages/sign_up_page/sign_up_page_widget.dart b/lib/pages/sign_up_page/sign_up_page_widget.dart index b1811ffe..e91ac753 100644 --- a/lib/pages/sign_up_page/sign_up_page_widget.dart +++ b/lib/pages/sign_up_page/sign_up_page_widget.dart @@ -38,7 +38,9 @@ class _SignUpPageWidgetState extends State { Widget build(BuildContext context) { StorageHelper().context = context; return GestureDetector( - onTap: () => _model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(_model.unfocusNode) : FocusScope.of(context).unfocus(), + onTap: () => _model.unfocusNode.canRequestFocus + ? FocusScope.of(context).requestFocus(_model.unfocusNode) + : FocusScope.of(context).unfocus(), child: Scaffold( key: scaffoldKey, backgroundColor: FlutterFlowTheme.of(context).primaryBackground, diff --git a/lib/pages/vehicles_on_the_property/vehicles_on_the_property.dart b/lib/pages/vehicles_on_the_property/vehicles_on_the_property.dart index b1ee15d5..6d3e51e0 100644 --- a/lib/pages/vehicles_on_the_property/vehicles_on_the_property.dart +++ b/lib/pages/vehicles_on_the_property/vehicles_on_the_property.dart @@ -17,7 +17,8 @@ class VehicleOnTheProperty extends StatefulWidget { _VehicleOnThePropertyState createState() => _VehicleOnThePropertyState(); } -class _VehicleOnThePropertyState extends State with TickerProviderStateMixin { +class _VehicleOnThePropertyState extends State + with TickerProviderStateMixin { late ScrollController _scrollController; int _pageNumber = 1; @@ -36,7 +37,8 @@ class _VehicleOnThePropertyState extends State with Ticker _future = _fetchVisits(); _scrollController = ScrollController() ..addListener(() { - if (_scrollController.position.atEdge && _scrollController.position.pixels != 0) { + if (_scrollController.position.atEdge && + _scrollController.position.pixels != 0) { _loadMore(); } }); @@ -50,7 +52,8 @@ class _VehicleOnThePropertyState extends State with Ticker @override Widget build(BuildContext context) { - late final limitedHeaderTextSize = LimitedFontSizeUtil.getHeaderFontSize(context); + late final limitedHeaderTextSize = + LimitedFontSizeUtil.getHeaderFontSize(context); return Scaffold( backgroundColor: FlutterFlowTheme.of(context).primaryBackground, @@ -127,7 +130,9 @@ class _VehicleOnThePropertyState extends State with Ticker return AppBar( backgroundColor: FlutterFlowTheme.of(context).primaryBackground, automaticallyImplyLeading: false, - title: Text(FFLocalizations.of(context).getVariableText(enText: 'Vehicles', ptText: 'Veículos'), + title: Text( + FFLocalizations.of(context) + .getVariableText(enText: 'Vehicles', ptText: 'Veículos'), style: FlutterFlowTheme.of(context).headlineMedium.override( fontFamily: 'Nunito', color: FlutterFlowTheme.of(context).primaryText, @@ -162,7 +167,8 @@ class _VehicleOnThePropertyState extends State with Ticker try { setState(() => _loading = true); - var response = await PhpGroup.getVehiclesByProperty.call(_pageNumber.toString()); + var response = + await PhpGroup.getVehiclesByProperty.call(_pageNumber.toString()); final List vehicles = response.jsonBody['vehicles'] ?? []; safeSetState(() => count = response.jsonBody['total_rows'] ?? 0); @@ -187,7 +193,8 @@ class _VehicleOnThePropertyState extends State with Ticker return null; } catch (e, s) { DialogUtil.errorDefault(context); - LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Veículo", e, s); + LogUtil.requestAPIFailed( + "proccessRequest.php", "", "Consulta de Veículo", e, s); setState(() { _hasData = false; _loading = false; @@ -227,9 +234,12 @@ class _VehicleOnThePropertyState extends State with Ticker return CardItemTemplateComponentWidget( imagePath: null, labelsHashMap: { - '${FFLocalizations.of(context).getVariableText(ptText: "Placa", enText: "License Plate")}:': uItem['licensePlate'] ?? '', - '${FFLocalizations.of(context).getVariableText(ptText: "Modelo", enText: "Model")}:': uItem['model'] ?? '', - '${FFLocalizations.of(context).getVariableText(ptText: "Tag", enText: "Tag")}:': uItem['tag'] ?? '', + '${FFLocalizations.of(context).getVariableText(ptText: "Placa", enText: "License Plate")}:': + uItem['licensePlate'] ?? '', + '${FFLocalizations.of(context).getVariableText(ptText: "Modelo", enText: "Model")}:': + uItem['model'] ?? '', + '${FFLocalizations.of(context).getVariableText(ptText: "Tag", enText: "Tag")}:': + uItem['tag'] ?? '', }, statusHashMap: [], onTapCardItemAction: () async { @@ -250,11 +260,13 @@ class _VehicleOnThePropertyState extends State with Ticker safeSetState(() { _pageNumber = 1; _wrap = []; - _future = _fetchVisits().then((value) => value!.jsonBody['vehicles'] ?? []); + _future = _fetchVisits() + .then((value) => value!.jsonBody['vehicles'] ?? []); }); }).catchError((e, s) { DialogUtil.errorDefault(context); - LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Veículos", e, s); + LogUtil.requestAPIFailed( + "proccessRequest.php", "", "Consulta de Veículos", e, s); safeSetState(() { _hasData = false; _loading = false; diff --git a/lib/pages/visits_on_the_property/model.dart b/lib/pages/visits_on_the_property/model.dart index 4c0e3770..2ddcd047 100644 --- a/lib/pages/visits_on_the_property/model.dart +++ b/lib/pages/visits_on_the_property/model.dart @@ -9,7 +9,8 @@ import 'package:hub/pages/vehicles_on_the_property/vehicles_on_the_property.dart class VisitsModel extends FlutterFlowModel { static VisitsModel? _instance; VisitsModel._internal({this.onRefresh}); - factory VisitsModel({VoidCallback? onRefresh}) => _instance ??= VisitsModel._internal(onRefresh: onRefresh); + factory VisitsModel({VoidCallback? onRefresh}) => + _instance ??= VisitsModel._internal(onRefresh: onRefresh); static void resetInstance() => _instance = null; late final VoidCallback? onRefresh; @@ -30,7 +31,8 @@ class VisitsModel extends FlutterFlowModel { Future initAsync() async { devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; onRefresh?.call(); } @@ -76,14 +78,17 @@ class VisitsModel extends FlutterFlowModel { enText: "No", ), }), - imagePath: 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${devUUID}&cliID=${cliUUID}&atividade=getFoto&Documento=${item['VDO_DOCUMENTO']}&tipo=E', + imagePath: + 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${devUUID}&cliID=${cliUUID}&atividade=getFoto&Documento=${item['VDO_DOCUMENTO']}&tipo=E', statusHashMap: [ Map.from({ if (item['VTA_FIXA'] != null) FFLocalizations.of(context).getVariableText( ptText: item['VTA_FIXA'] ? "Entrada Única" : "Entrada Recorrente", enText: item['VTA_FIXA'] ? "Single Entry" : "Recurrent Entry", - ): item['VTA_FIXA'] == true ? FlutterFlowTheme.of(context).success : FlutterFlowTheme.of(context).warning, + ): item['VTA_FIXA'] == true + ? FlutterFlowTheme.of(context).success + : FlutterFlowTheme.of(context).warning, }) ], ); diff --git a/lib/pages/visits_on_the_property/visits_on_the_property_screen.dart b/lib/pages/visits_on_the_property/visits_on_the_property_screen.dart index 95a154a0..3a2b6950 100644 --- a/lib/pages/visits_on_the_property/visits_on_the_property_screen.dart +++ b/lib/pages/visits_on_the_property/visits_on_the_property_screen.dart @@ -17,7 +17,8 @@ class VisitsOnTheProperty extends StatefulWidget { _VisitsOnThePropertyState createState() => _VisitsOnThePropertyState(); } -class _VisitsOnThePropertyState extends State with TickerProviderStateMixin { +class _VisitsOnThePropertyState extends State + with TickerProviderStateMixin { late ScrollController _scrollController; int _pageNumber = 1; @@ -32,12 +33,14 @@ class _VisitsOnThePropertyState extends State with TickerPr @override void initState() { super.initState(); - model = createModel(context, () => VisitsModel(onRefresh: () => safeSetState(() {}))); + model = createModel( + context, () => VisitsModel(onRefresh: () => safeSetState(() {}))); _future = _fetchVisits(); _scrollController = ScrollController() ..addListener(() { - if (_scrollController.position.atEdge && _scrollController.position.pixels != 0) { + if (_scrollController.position.atEdge && + _scrollController.position.pixels != 0) { _loadMore(); } }); @@ -51,8 +54,10 @@ class _VisitsOnThePropertyState extends State with TickerPr @override Widget build(BuildContext context) { - late final limitedBodyTextSize = LimitedFontSizeUtil.getBodyFontSize(context); - late final limitedHeaderTextSize = LimitedFontSizeUtil.getHeaderFontSize(context); + late final limitedBodyTextSize = + LimitedFontSizeUtil.getBodyFontSize(context); + late final limitedHeaderTextSize = + LimitedFontSizeUtil.getHeaderFontSize(context); return Scaffold( appBar: _appBar(context), @@ -69,7 +74,9 @@ class _VisitsOnThePropertyState extends State with TickerPr children: [ Center( child: Text( - FFLocalizations.of(context).getVariableText(ptText: "Nenhuma visita em aberto encontrada!", enText: "No opened visits found"), + FFLocalizations.of(context).getVariableText( + ptText: "Nenhuma visita em aberto encontrada!", + enText: "No opened visits found"), style: TextStyle( fontFamily: 'Nunito', fontSize: limitedHeaderTextSize, @@ -126,7 +133,9 @@ class _VisitsOnThePropertyState extends State with TickerPr return AppBar( backgroundColor: FlutterFlowTheme.of(context).primaryBackground, automaticallyImplyLeading: false, - title: Text(FFLocalizations.of(context).getVariableText(ptText: 'Visitas em aberto', enText: 'Opened visits'), + title: Text( + FFLocalizations.of(context).getVariableText( + ptText: 'Visitas em aberto', enText: 'Opened visits'), style: FlutterFlowTheme.of(context).headlineMedium.override( fontFamily: 'Nunito', color: FlutterFlowTheme.of(context).primaryText, @@ -161,7 +170,8 @@ class _VisitsOnThePropertyState extends State with TickerPr try { setState(() => _loading = true); - var response = await PhpGroup.getOpenedVisits.call(_pageNumber.toString()); + var response = + await PhpGroup.getOpenedVisits.call(_pageNumber.toString()); final List visits = response.jsonBody['visitas'] ?? []; safeSetState(() => count = response.jsonBody['total_rows'] ?? 0); @@ -186,7 +196,8 @@ class _VisitsOnThePropertyState extends State with TickerPr return null; } catch (e, s) { DialogUtil.errorDefault(context); - LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Visitas", e, s); + LogUtil.requestAPIFailed( + "proccessRequest.php", "", "Consulta de Visitas", e, s); setState(() { _hasData = false; _loading = false; @@ -207,7 +218,8 @@ class _VisitsOnThePropertyState extends State with TickerPr ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text( - FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."), + FFLocalizations.of(context).getVariableText( + ptText: "Não há mais dados.", enText: "No more data."), style: TextStyle( color: Colors.white, fontSize: LimitedFontSizeUtil.getBodyFontSize(context), @@ -221,12 +233,16 @@ class _VisitsOnThePropertyState extends State with TickerPr Widget _item(BuildContext context, dynamic uItem) { return CardItemTemplateComponentWidget( - imagePath: 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${model.devUUID}&cliID=${model.cliUUID}&atividade=getFoto&Documento=${uItem['VDO_DOCUMENTO']}&tipo=E', + imagePath: + 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${model.devUUID}&cliID=${model.cliUUID}&atividade=getFoto&Documento=${uItem['VDO_DOCUMENTO']}&tipo=E', labelsHashMap: { - '${FFLocalizations.of(context).getVariableText(ptText: "Nome", enText: "Name")}:': uItem['VTA_NOME'] ?? '', - '${FFLocalizations.of(context).getVariableText(ptText: "Validade", enText: "Valids")}:': uItem['VTA_VALIDADE'] ?? '', + '${FFLocalizations.of(context).getVariableText(ptText: "Nome", enText: "Name")}:': + uItem['VTA_NOME'] ?? '', + '${FFLocalizations.of(context).getVariableText(ptText: "Validade", enText: "Valids")}:': + uItem['VTA_VALIDADE'] ?? '', '${FFLocalizations.of(context).getVariableText(ptText: "Motivo", enText: "Reason")}:': - uItem['MOT_DESCRICAO'][0].toUpperCase() + uItem['MOT_DESCRICAO'].substring(1).toLowerCase(), + uItem['MOT_DESCRICAO'][0].toUpperCase() + + uItem['MOT_DESCRICAO'].substring(1).toLowerCase(), }, statusHashMap: [ if (uItem['VTA_FIXA'] == false) @@ -262,11 +278,13 @@ class _VisitsOnThePropertyState extends State with TickerPr safeSetState(() { _pageNumber = 1; _list = []; - _future = _fetchVisits().then((value) => value!.jsonBody['visitas'] ?? []); + _future = _fetchVisits() + .then((value) => value!.jsonBody['visitas'] ?? []); }); }).catchError((e, s) { DialogUtil.errorDefault(context); - LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Visitas", e, s); + LogUtil.requestAPIFailed( + "proccessRequest.php", "", "Consulta de Visitas", e, s); safeSetState(() { _hasData = false; _loading = false; diff --git a/lib/pages/welcome_page/welcome_page_model.dart b/lib/pages/welcome_page/welcome_page_model.dart index 7823f2b2..b8a54a7e 100644 --- a/lib/pages/welcome_page/welcome_page_model.dart +++ b/lib/pages/welcome_page/welcome_page_model.dart @@ -16,7 +16,8 @@ class WelcomePageModel extends FlutterFlowModel { @override void initState(BuildContext context) { - welcomeTemplateComponentModel = createModel(context, () => WelcomeTemplateComponentModel()); + welcomeTemplateComponentModel = + createModel(context, () => WelcomeTemplateComponentModel()); } @override diff --git a/lib/pages/welcome_page/welcome_page_widget.dart b/lib/pages/welcome_page/welcome_page_widget.dart index b665ebe8..5b3f46ea 100644 --- a/lib/pages/welcome_page/welcome_page_widget.dart +++ b/lib/pages/welcome_page/welcome_page_widget.dart @@ -53,7 +53,9 @@ class _WelcomePageWidgetState extends State { Widget build(BuildContext context) { StorageHelper().context = context; return GestureDetector( - onTap: () => _model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(_model.unfocusNode) : FocusScope.of(context).unfocus(), + onTap: () => _model.unfocusNode.canRequestFocus + ? FocusScope.of(context).requestFocus(_model.unfocusNode) + : FocusScope.of(context).unfocus(), child: Scaffold( key: scaffoldKey, backgroundColor: FlutterFlowTheme.of(context).primaryBackground, diff --git a/lib/shared/constants/keychain_constants.dart b/lib/shared/constants/keychain_constants.dart index 0aac6594..83019a63 100644 --- a/lib/shared/constants/keychain_constants.dart +++ b/lib/shared/constants/keychain_constants.dart @@ -1,6 +1,6 @@ - const String tableKeychain = 'keychain'; +const String tableKeychain = 'keychain'; - String get createKeychainTable => ''' +String get createKeychainTable => ''' CREATE TABLE IF NOT EXISTS $tableKeychain ( key TEXT UNIQUE, value TEXT, @@ -10,4 +10,4 @@ createdAt TEXT ); '''; - String get deleteKeychainTable => 'DROP TABLE IF EXISTS $tableKeychain;'; \ No newline at end of file +String get deleteKeychainTable => 'DROP TABLE IF EXISTS $tableKeychain;'; diff --git a/lib/shared/extensions/dialog_extensions.dart b/lib/shared/extensions/dialog_extensions.dart index 222154dc..b4c4e86b 100644 --- a/lib/shared/extensions/dialog_extensions.dart +++ b/lib/shared/extensions/dialog_extensions.dart @@ -16,7 +16,8 @@ extension DialogUnavailable on DialogUtil { static Future unavailableCredentials(BuildContext context) { final message = FFLocalizations.of(context).getVariableText( - ptText: "Credenciais inválidas. Selecione um local ou faça o login novamente.", + ptText: + "Credenciais inválidas. Selecione um local ou faça o login novamente.", enText: "Invalid credentials. Select a location or log in again.", ); return DialogUtil.warning(context, message); diff --git a/lib/shared/extensions/flutter_secure_storage_extensions.dart b/lib/shared/extensions/flutter_secure_storage_extensions.dart index e689535d..8bba2507 100644 --- a/lib/shared/extensions/flutter_secure_storage_extensions.dart +++ b/lib/shared/extensions/flutter_secure_storage_extensions.dart @@ -6,23 +6,30 @@ import 'package:synchronized/synchronized.dart'; extension FlutterSecureStorageExtensions on FlutterSecureStorage { static final _lock = Lock(); - Future writeSync({required String key, String? value}) async => await _lock.synchronized(() async { + Future writeSync({required String key, String? value}) async => + await _lock.synchronized(() async { await write(key: key, value: value); }); void remove(String key) => delete(key: key); Future getString(String key) async => await read(key: key); - Future setString(String key, String value) async => await writeSync(key: key, value: value); + Future setString(String key, String value) async => + await writeSync(key: key, value: value); Future getBool(String key) async => (await read(key: key)) == 'true'; - Future setBool(String key, bool? value) async => await writeSync(key: key, value: value.toString()); + Future setBool(String key, bool? value) async => + await writeSync(key: key, value: value.toString()); - Future getInt(String key) async => int.tryParse(await read(key: key) ?? ''); - Future setInt(String key, int value) async => await writeSync(key: key, value: value.toString()); + Future getInt(String key) async => + int.tryParse(await read(key: key) ?? ''); + Future setInt(String key, int value) async => + await writeSync(key: key, value: value.toString()); - Future getDouble(String key) async => double.tryParse(await read(key: key) ?? ''); - Future setDouble(String key, double value) async => await writeSync(key: key, value: value.toString()); + Future getDouble(String key) async => + double.tryParse(await read(key: key) ?? ''); + Future setDouble(String key, double value) async => + await writeSync(key: key, value: value.toString()); Future getObject(String key) async { final value = await read(key: key); @@ -32,12 +39,18 @@ extension FlutterSecureStorageExtensions on FlutterSecureStorage { return value as BuildContext; } - Future?> getStringList(String key) async => await read(key: key).then((result) { + Future?> getStringList(String key) async => + await read(key: key).then((result) { if (result == null || result.isEmpty) { return null; } - return const CsvToListConverter().convert(result).first.map((e) => e.toString()).toList(); + return const CsvToListConverter() + .convert(result) + .first + .map((e) => e.toString()) + .toList(); }); Future setStringList(String key, List value) async => - await writeSync(key: key, value: const ListToCsvConverter().convert([value])); + await writeSync( + key: key, value: const ListToCsvConverter().convert([value])); } diff --git a/lib/shared/helpers/index.dart b/lib/shared/helpers/index.dart index e69de29b..8b137891 100644 --- a/lib/shared/helpers/index.dart +++ b/lib/shared/helpers/index.dart @@ -0,0 +1 @@ + diff --git a/lib/shared/index.dart b/lib/shared/index.dart index e69de29b..8b137891 100644 --- a/lib/shared/index.dart +++ b/lib/shared/index.dart @@ -0,0 +1 @@ + diff --git a/lib/shared/services/index.dart b/lib/shared/services/index.dart index e69de29b..8b137891 100644 --- a/lib/shared/services/index.dart +++ b/lib/shared/services/index.dart @@ -0,0 +1 @@ + diff --git a/lib/shared/utils/device_util.dart b/lib/shared/utils/device_util.dart index da41877e..24e7f265 100644 --- a/lib/shared/utils/device_util.dart +++ b/lib/shared/utils/device_util.dart @@ -6,7 +6,8 @@ import 'package:device_info_plus/device_info_plus.dart'; import 'package:flutter/services.dart'; class DeviceUtil { - static const MethodChannel _channel = MethodChannel("com.freaccess.hub/getAndroidId"); + static const MethodChannel _channel = + MethodChannel("com.freaccess.hub/getAndroidId"); static Future getAndroidId() async { try { @@ -67,7 +68,8 @@ class DeviceUtil { } else if (Platform.isAndroid) { var androidDeviceInfo = await deviceInfo.androidInfo; - return androidDeviceInfo.version.release; // unique ID on Android. e.g . 11 + return androidDeviceInfo + .version.release; // unique ID on Android. e.g . 11 } return null; diff --git a/lib/shared/utils/dialog_util.dart b/lib/shared/utils/dialog_util.dart index d9f1c64d..6804443a 100644 --- a/lib/shared/utils/dialog_util.dart +++ b/lib/shared/utils/dialog_util.dart @@ -32,7 +32,8 @@ class DialogUtil { height: _height, child: Padding( padding: MediaQuery.viewInsetsOf(context), - child: ThrowExceptionWidget(msg: message, type: EnumThrowException.error)))); + child: ThrowExceptionWidget( + msg: message, type: EnumThrowException.error)))); }); } @@ -45,7 +46,8 @@ class DialogUtil { height: _height, child: Padding( padding: MediaQuery.viewInsetsOf(context), - child: ThrowExceptionWidget(msg: message, type: EnumThrowException.warning)))); + child: ThrowExceptionWidget( + msg: message, type: EnumThrowException.warning)))); }); } @@ -58,7 +60,8 @@ class DialogUtil { height: _height, child: Padding( padding: MediaQuery.viewInsetsOf(context), - child: ThrowExceptionWidget(msg: message, type: EnumThrowException.success)))); + child: ThrowExceptionWidget( + msg: message, type: EnumThrowException.success)))); }); } } diff --git a/lib/shared/utils/image_util.dart b/lib/shared/utils/image_util.dart index f180004e..4c55c0dd 100644 --- a/lib/shared/utils/image_util.dart +++ b/lib/shared/utils/image_util.dart @@ -9,7 +9,8 @@ import 'package:path_provider/path_provider.dart'; import '../../flutter_flow/uploaded_file.dart'; class ImageUtils { - static Future convertImageFileToBase64(FFUploadedFile imageFile) async { + static Future convertImageFileToBase64( + FFUploadedFile imageFile) async { List? imageBytes = imageFile.bytes; if (imageBytes != null) { String base64Image = base64Encode(imageBytes); diff --git a/lib/shared/utils/limited_text_size.dart b/lib/shared/utils/limited_text_size.dart index 199dd83b..3356427f 100644 --- a/lib/shared/utils/limited_text_size.dart +++ b/lib/shared/utils/limited_text_size.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; class LimitedFontSizeUtil { - static double getCalculateFontSize( - BuildContext context, double baseFontSize, double maxFontSize, double limitedFontSize) { + static double getCalculateFontSize(BuildContext context, double baseFontSize, + double maxFontSize, double limitedFontSize) { final textScaler = MediaQuery.textScalerOf(context); final double scaledFontSize = baseFontSize * textScaler.scale(1); return scaledFontSize > maxFontSize ? limitedFontSize : scaledFontSize; @@ -14,8 +14,8 @@ class LimitedFontSizeUtil { return noscaledFontSize; } - static double getScaledSizedBoxSize( - BuildContext context, double baseFontSize, double maxFontSize, double sizeIfExceeded, double sizeIfNotExceeded) { + static double getScaledSizedBoxSize(BuildContext context, double baseFontSize, + double maxFontSize, double sizeIfExceeded, double sizeIfNotExceeded) { final textScaler = MediaQuery.textScalerOf(context); final double scaledFontSize = baseFontSize * textScaler.scale(1); return scaledFontSize > maxFontSize ? sizeIfExceeded : sizeIfNotExceeded; diff --git a/lib/shared/utils/loading_util.dart b/lib/shared/utils/loading_util.dart index d30dfec3..f1fa6e75 100644 --- a/lib/shared/utils/loading_util.dart +++ b/lib/shared/utils/loading_util.dart @@ -3,15 +3,16 @@ import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; class LoadingUtil { - static Widget buildLoadingIndicator(BuildContext context) { + static Widget buildLoadingIndicator(BuildContext context) { return Center( child: Padding( padding: EdgeInsets.only(top: MediaQuery.of(context).size.height / 10), child: CircularProgressIndicator( - backgroundColor: FlutterFlowTheme.of(navigatorKey.currentContext!).primaryBackground, + backgroundColor: FlutterFlowTheme.of(navigatorKey.currentContext!) + .primaryBackground, color: FlutterFlowTheme.of(navigatorKey.currentContext!).primary, ), ), ); } -} \ No newline at end of file +} diff --git a/lib/shared/utils/log_util.dart b/lib/shared/utils/log_util.dart index 24a5561d..c9c9526b 100644 --- a/lib/shared/utils/log_util.dart +++ b/lib/shared/utils/log_util.dart @@ -4,7 +4,8 @@ import 'package:firebase_crashlytics/firebase_crashlytics.dart'; import 'package:hub/features/backend/index.dart'; class LogUtil { - static void requestAPIFailed(String url, String body, String reason, dynamic error, StackTrace stack) async { + static void requestAPIFailed(String url, String body, String reason, + dynamic error, StackTrace stack) async { final fullUrl = "${PhpGroup.getBaseUrl()}/$url"; log("URL: $fullUrl"); log("Body: $body"); @@ -15,6 +16,7 @@ class LogUtil { FirebaseCrashlytics.instance.setCustomKey('URL', fullUrl); FirebaseCrashlytics.instance.setCustomKey('Body', body); - await FirebaseCrashlytics.instance.recordError(error, stack, reason: reason); + await FirebaseCrashlytics.instance + .recordError(error, stack, reason: reason); } } diff --git a/lib/shared/utils/path_util.dart b/lib/shared/utils/path_util.dart index 4692235a..8eda1149 100644 --- a/lib/shared/utils/path_util.dart +++ b/lib/shared/utils/path_util.dart @@ -1,10 +1,8 @@ - import 'package:flutter/material.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; class PathUtil { - static Future nav(String link) async { navigatorKey.currentContext!.push(link, extra: { kTransitionInfoKey: const TransitionInfo( @@ -14,4 +12,4 @@ class PathUtil { ), }); } -} \ No newline at end of file +} diff --git a/lib/shared/utils/snackbar_util.dart b/lib/shared/utils/snackbar_util.dart index 1b8ae0d0..7dff08bf 100644 --- a/lib/shared/utils/snackbar_util.dart +++ b/lib/shared/utils/snackbar_util.dart @@ -5,16 +5,21 @@ import 'package:hub/shared/utils/limited_text_size.dart'; import '../../flutter_flow/flutter_flow_theme.dart'; class SnackBarUtil { - static void showSnackBar(BuildContext context, String text, {bool isError = false}) { + static void showSnackBar(BuildContext context, String text, + {bool isError = false}) { double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context); ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text( text, overflow: TextOverflow.clip, - style: TextStyle(color: FlutterFlowTheme.of(context).info, fontSize: limitedBodyFontSize), + style: TextStyle( + color: FlutterFlowTheme.of(context).info, + fontSize: limitedBodyFontSize), ), - backgroundColor: isError ? FlutterFlowTheme.of(context).error : FlutterFlowTheme.of(context).success, + backgroundColor: isError + ? FlutterFlowTheme.of(context).error + : FlutterFlowTheme.of(context).success, duration: const Duration(seconds: 3), behavior: SnackBarBehavior.floating, shape: RoundedRectangleBorder( @@ -28,7 +33,8 @@ class SnackBarUtil { ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text( - FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."), + FFLocalizations.of(context).getVariableText( + ptText: "Não há mais dados.", enText: "No more data."), style: TextStyle( color: Colors.white, fontSize: LimitedFontSizeUtil.getBodyFontSize(context), diff --git a/lib/shared/utils/text_util.dart b/lib/shared/utils/text_util.dart index 344279e9..d2876a0b 100644 --- a/lib/shared/utils/text_util.dart +++ b/lib/shared/utils/text_util.dart @@ -16,8 +16,9 @@ class TextUtil extends StatelessWidget { Widget build(BuildContext context) { var textScale = MediaQuery.textScalerOf(context); var scaledTextSize = textScale.scale(style?.fontSize ?? 14); - double limitedTextSize = - scaledTextSize > (style?.fontSize ?? 14) * 2 ? (style?.fontSize ?? 14) * 2 : scaledTextSize; + double limitedTextSize = scaledTextSize > (style?.fontSize ?? 14) * 2 + ? (style?.fontSize ?? 14) * 2 + : scaledTextSize; return Text( text, From bbce25728339a89f681de89892f912a8f4583597 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Wed, 18 Dec 2024 12:59:10 -0300 Subject: [PATCH 06/25] WIP --- pubspec.lock | 48 ++++++++++++++++++++++++------------------------ pubspec.yaml | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index bf9b6855..4eeb08de 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834 + sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab" url: "https://pub.dev" source: hosted - version: "72.0.0" + version: "76.0.0" _flutterfire_internals: dependency: transitive description: @@ -21,15 +21,15 @@ packages: dependency: transitive description: dart source: sdk - version: "0.3.2" + version: "0.3.3" analyzer: dependency: transitive description: name: analyzer - sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139 + sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e" url: "https://pub.dev" source: hosted - version: "6.7.0" + version: "6.11.0" app_links: dependency: "direct main" description: @@ -274,10 +274,10 @@ packages: dependency: "direct main" description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.0" convert: dependency: transitive description: @@ -1013,18 +1013,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.7" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.8" leak_tracker_testing: dependency: transitive description: @@ -1093,10 +1093,10 @@ packages: dependency: transitive description: name: macros - sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656" url: "https://pub.dev" source: hosted - version: "0.1.2-main.4" + version: "0.1.3-main.0" matcher: dependency: transitive description: @@ -1541,7 +1541,7 @@ packages: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_gen: dependency: transitive description: @@ -1618,10 +1618,10 @@ packages: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.0" state_notifier: dependency: transitive description: @@ -1650,10 +1650,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" sync_http: dependency: transitive description: @@ -1682,10 +1682,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.3" timeago: dependency: "direct main" description: @@ -1818,10 +1818,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.3.0" watcher: dependency: transitive description: @@ -1858,10 +1858,10 @@ packages: dependency: transitive description: name: webdriver - sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" + sha256: "3d773670966f02a646319410766d3b5e1037efb7f07cc68f844d5e06cd4d61c8" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.4" webview_flutter: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 053c49b0..65086bc6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -20,7 +20,7 @@ dependencies: flutter_inappwebview: ^6.0.0 webview_flutter: ^4.8.0 rxdart: ^0.28.0 - collection: 1.18.0 + collection: ^1.19.0 app_links: ^6.3.2 # crop_your_image: 1.1.0 csv: 6.0.0 From 86326566471336168af1003b314fc209e47f45d2 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Wed, 18 Dec 2024 15:40:54 -0300 Subject: [PATCH 07/25] WIP --- ...ot_password_template_component_widget.dart | 2 +- .../sign_in_template_component_widget.dart | 2 +- .../sign_up_template_component_widget.dart | 2 +- .../authentication_service.dart | 6 +- .../{authentication => auth}/index.dart | 0 .../backend/api_requests/api_calls.dart | 2 +- .../home/presentation/blocs/home_bloc.dart | 2 +- .../home/presentation/pages/home_page.dart | 2 +- .../presentation/widgets/drawer_widget.dart | 4 +- .../data/data_sources/index.dart | 0 .../locals_local_data_source.dart | 74 +++++++++++++++++++ .../locals_remote_data_source.dart | 6 +- .../{locals => local}/data/index.dart | 0 .../{locals => local}/data/models/index.dart | 0 .../data/repositories/index.dart | 0 .../repositories/locals_repository_impl.dart | 14 +++- .../domain/entities/index.dart | 0 .../{locals => local}/domain/index.dart | 0 .../domain/respositories/index.dart | 0 .../respositories/locals_repository.dart | 0 .../domain/usecases/index.dart | 0 lib/features/{locals => local}/index.dart | 0 .../presentation/blocs/index.dart | 0 .../blocs/local_profile_bloc.dart | 2 +- .../{locals => local}/presentation/index.dart | 0 .../presentation/widgets/index.dart | 0 .../widgets/local_profile/index.dart | 0 .../local_profile/local_profile_widget.dart | 4 +- .../{locals => local}/utils/index.dart | 0 .../{locals => local}/utils/local_util.dart | 2 +- .../locals_local_data_source.dart | 13 ---- .../data_sources/menu_local_data_source.dart | 5 +- .../repositories/menu_repository_impl.dart | 2 +- .../menu/presentation/blocs/menu_bloc.dart | 4 +- .../menu/presentation/mappers/menu_entry.dart | 2 +- .../presentation/widgets/menu_factory.dart | 4 +- .../{modules => module}/constants/index.dart | 0 .../constants/license_constants.dart | 0 .../data/data_sources/index.dart | 0 .../license_local_data_source.dart | 2 +- .../license_remote_data_source.dart | 4 +- .../{modules => module}/data/index.dart | 0 .../data/models/index.dart | 0 .../data/models/license_model.dart | 0 .../data/models/license_model.freezed.dart | 0 .../data/models/license_model.g.dart | 0 .../data/models/module_model.dart | 0 .../data/models/module_model.freezed.dart | 0 .../data/models/module_model.g.dart | 0 .../data/repositories/index.dart | 0 .../repositories/license_repository_impl.dart | 4 +- .../domain/entities/base_module.dart | 0 .../domain/entities/index.dart | 0 .../domain/entities/license.dart | 0 .../domain/entities/module.dart | 2 +- .../{modules => module}/domain/index.dart | 0 .../domain/respositories/index.dart | 0 .../respositories/license_repository.dart | 0 .../domain/usecases/index.dart | 0 lib/features/{modules => module}/index.dart | 0 .../presentation/blocs/index.dart | 0 .../presentation/index.dart | 0 .../presentation/widgets/index.dart | 0 .../deep_link_service.dart | 0 .../firebase_messaging_service.dart | 2 +- .../index.dart | 0 .../notification_service.dart | 0 .../profile_local_data_source.dart | 11 +-- lib/features/storage/constants/index.dart | 2 + .../storage/constants/locals_constants.dart | 17 +++++ .../storage/constants/profile_constants.dart} | 0 ...storage.dart => database_storage_key.dart} | 4 +- lib/features/storage/enums/index.dart | 6 +- ...e_storage.dart => secure_storage_key.dart} | 0 ...d_storage.dart => shared_storage_key.dart} | 0 .../helpers/dabase_storage_helper.dart | 27 ++++--- lib/features/storage/index.dart | 1 + .../repositories/storage_repository_impl.dart | 7 +- .../services/database_storage_service.dart | 44 +++++------ lib/flutter_flow/nav/nav.dart | 2 +- lib/initialization.dart | 5 +- lib/main.dart | 4 +- .../forgot_password_screen.dart | 2 +- lib/pages/pets_page/pets_page_model.dart | 2 +- .../preferences_settings_model.dart | 4 +- .../reception_page/reception_page_widget.dart | 6 +- lib/shared/constants/index.dart | 1 - 87 files changed, 203 insertions(+), 110 deletions(-) rename lib/features/{authentication => auth}/authentication_service.dart (97%) rename lib/features/{authentication => auth}/index.dart (100%) rename lib/features/{locals => local}/data/data_sources/index.dart (100%) create mode 100644 lib/features/local/data/data_sources/locals_local_data_source.dart rename lib/features/{locals => local}/data/data_sources/locals_remote_data_source.dart (98%) rename lib/features/{locals => local}/data/index.dart (100%) rename lib/features/{locals => local}/data/models/index.dart (100%) rename lib/features/{locals => local}/data/repositories/index.dart (100%) rename lib/features/{locals => local}/data/repositories/locals_repository_impl.dart (86%) rename lib/features/{locals => local}/domain/entities/index.dart (100%) rename lib/features/{locals => local}/domain/index.dart (100%) rename lib/features/{locals => local}/domain/respositories/index.dart (100%) rename lib/features/{locals => local}/domain/respositories/locals_repository.dart (100%) rename lib/features/{locals => local}/domain/usecases/index.dart (100%) rename lib/features/{locals => local}/index.dart (100%) rename lib/features/{locals => local}/presentation/blocs/index.dart (100%) rename lib/features/{locals => local}/presentation/blocs/local_profile_bloc.dart (98%) rename lib/features/{locals => local}/presentation/index.dart (100%) rename lib/features/{locals => local}/presentation/widgets/index.dart (100%) rename lib/features/{locals => local}/presentation/widgets/local_profile/index.dart (100%) rename lib/features/{locals => local}/presentation/widgets/local_profile/local_profile_widget.dart (99%) rename lib/features/{locals => local}/utils/index.dart (100%) rename lib/features/{locals => local}/utils/local_util.dart (99%) delete mode 100644 lib/features/locals/data/data_sources/locals_local_data_source.dart rename lib/features/{modules => module}/constants/index.dart (100%) rename lib/features/{modules => module}/constants/license_constants.dart (100%) rename lib/features/{modules => module}/data/data_sources/index.dart (100%) rename lib/features/{modules => module}/data/data_sources/license_local_data_source.dart (97%) rename lib/features/{modules => module}/data/data_sources/license_remote_data_source.dart (96%) rename lib/features/{modules => module}/data/index.dart (100%) rename lib/features/{modules => module}/data/models/index.dart (100%) rename lib/features/{modules => module}/data/models/license_model.dart (100%) rename lib/features/{modules => module}/data/models/license_model.freezed.dart (100%) rename lib/features/{modules => module}/data/models/license_model.g.dart (100%) rename lib/features/{modules => module}/data/models/module_model.dart (100%) rename lib/features/{modules => module}/data/models/module_model.freezed.dart (100%) rename lib/features/{modules => module}/data/models/module_model.g.dart (100%) rename lib/features/{modules => module}/data/repositories/index.dart (100%) rename lib/features/{modules => module}/data/repositories/license_repository_impl.dart (90%) rename lib/features/{modules => module}/domain/entities/base_module.dart (100%) rename lib/features/{modules => module}/domain/entities/index.dart (100%) rename lib/features/{modules => module}/domain/entities/license.dart (100%) rename lib/features/{modules => module}/domain/entities/module.dart (96%) rename lib/features/{modules => module}/domain/index.dart (100%) rename lib/features/{modules => module}/domain/respositories/index.dart (100%) rename lib/features/{modules => module}/domain/respositories/license_repository.dart (100%) rename lib/features/{modules => module}/domain/usecases/index.dart (100%) rename lib/features/{modules => module}/index.dart (100%) rename lib/features/{modules => module}/presentation/blocs/index.dart (100%) rename lib/features/{modules => module}/presentation/index.dart (100%) rename lib/features/{modules => module}/presentation/widgets/index.dart (100%) rename lib/features/{notifications => notification}/deep_link_service.dart (100%) rename lib/features/{notifications => notification}/firebase_messaging_service.dart (97%) rename lib/features/{notifications => notification}/index.dart (100%) rename lib/features/{notifications => notification}/notification_service.dart (100%) create mode 100644 lib/features/storage/constants/index.dart create mode 100644 lib/features/storage/constants/locals_constants.dart rename lib/{shared/constants/keychain_constants.dart => features/storage/constants/profile_constants.dart} (100%) rename lib/features/storage/enums/{database_storage.dart => database_storage_key.dart} (94%) rename lib/features/storage/enums/{secure_storage.dart => secure_storage_key.dart} (100%) rename lib/features/storage/enums/{shared_storage.dart => shared_storage_key.dart} (100%) diff --git a/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart b/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart index cecb2214..d9797e17 100644 --- a/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart +++ b/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart @@ -1,7 +1,7 @@ import 'package:easy_debounce/easy_debounce.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hub/features/authentication/index.dart'; +import 'package:hub/features/auth/index.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/validator_util.dart'; diff --git a/lib/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart b/lib/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart index 84cdf9ba..2a788357 100644 --- a/lib/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart +++ b/lib/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart @@ -4,7 +4,7 @@ import 'package:flutter_animate/flutter_animate.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:hub/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart'; import 'package:hub/components/atomic_components/term_of_use/atom_terms_of_use.dart'; -import 'package:hub/features/authentication/index.dart'; +import 'package:hub/features/auth/index.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; diff --git a/lib/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart b/lib/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart index d0cff70a..3ad2c626 100644 --- a/lib/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart +++ b/lib/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart @@ -4,7 +4,7 @@ import 'package:flutter_animate/flutter_animate.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:hub/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart'; import 'package:hub/components/atomic_components/term_of_use/atom_terms_of_use.dart'; -import 'package:hub/features/authentication/index.dart'; +import 'package:hub/features/auth/index.dart'; import 'package:hub/features/storage/index.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; diff --git a/lib/features/authentication/authentication_service.dart b/lib/features/auth/authentication_service.dart similarity index 97% rename from lib/features/authentication/authentication_service.dart rename to lib/features/auth/authentication_service.dart index 4c5e8fea..12393545 100644 --- a/lib/features/authentication/authentication_service.dart +++ b/lib/features/auth/authentication_service.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:hub/features/backend/index.dart'; -import 'package:hub/features/locals/index.dart'; -import 'package:hub/features/modules/data/repositories/license_repository_impl.dart'; +import 'package:hub/features/local/index.dart'; +import 'package:hub/features/module/data/repositories/license_repository_impl.dart'; import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; @@ -153,7 +153,7 @@ class AuthenticationService { await StorageHelper().clean(Storage.secureStorage); await LicenseRepositoryImpl().cleanLicense(); DatabaseService.isInitialized = false; - await StorageHelper().init(); + await DatabaseService.instance.init(); context.go('/welcomePage', extra: extra); } diff --git a/lib/features/authentication/index.dart b/lib/features/auth/index.dart similarity index 100% rename from lib/features/authentication/index.dart rename to lib/features/auth/index.dart diff --git a/lib/features/backend/api_requests/api_calls.dart b/lib/features/backend/api_requests/api_calls.dart index e7ab6772..b5665bea 100644 --- a/lib/features/backend/api_requests/api_calls.dart +++ b/lib/features/backend/api_requests/api_calls.dart @@ -3,7 +3,7 @@ import 'dart:convert'; import 'dart:developer'; import 'package:flutter/foundation.dart'; -import 'package:hub/features/notifications/index.dart'; +import 'package:hub/features/notification/index.dart'; import 'package:hub/features/storage/index.dart'; import 'package:hub/shared/utils/log_util.dart'; diff --git a/lib/features/home/presentation/blocs/home_bloc.dart b/lib/features/home/presentation/blocs/home_bloc.dart index 32efb9ab..c7b69418 100644 --- a/lib/features/home/presentation/blocs/home_bloc.dart +++ b/lib/features/home/presentation/blocs/home_bloc.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:hub/features/locals/index.dart'; +import 'package:hub/features/local/index.dart'; import 'package:hub/features/storage/index.dart'; import 'index.dart'; diff --git a/lib/features/home/presentation/pages/home_page.dart b/lib/features/home/presentation/pages/home_page.dart index b11c8bdd..f3a9df42 100644 --- a/lib/features/home/presentation/pages/home_page.dart +++ b/lib/features/home/presentation/pages/home_page.dart @@ -7,7 +7,7 @@ import 'package:hub/features/menu/index.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; -import 'package:hub/features/locals/index.dart'; +import 'package:hub/features/local/index.dart'; class HomePageWidget extends StatefulWidget { const HomePageWidget(this.update, {super.key}); diff --git a/lib/features/home/presentation/widgets/drawer_widget.dart b/lib/features/home/presentation/widgets/drawer_widget.dart index 9e681c10..014fa9f8 100644 --- a/lib/features/home/presentation/widgets/drawer_widget.dart +++ b/lib/features/home/presentation/widgets/drawer_widget.dart @@ -3,11 +3,11 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:hub/features/home/index.dart'; import 'package:hub/features/menu/index.dart'; -import 'package:hub/features/modules/data/index.dart'; +import 'package:hub/features/module/data/index.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; -import 'package:hub/features/locals/index.dart'; +import 'package:hub/features/local/index.dart'; class DrawerWidget extends StatelessWidget { const DrawerWidget({super.key}); diff --git a/lib/features/locals/data/data_sources/index.dart b/lib/features/local/data/data_sources/index.dart similarity index 100% rename from lib/features/locals/data/data_sources/index.dart rename to lib/features/local/data/data_sources/index.dart diff --git a/lib/features/local/data/data_sources/locals_local_data_source.dart b/lib/features/local/data/data_sources/locals_local_data_source.dart new file mode 100644 index 00000000..8fb385cd --- /dev/null +++ b/lib/features/local/data/data_sources/locals_local_data_source.dart @@ -0,0 +1,74 @@ +import 'dart:developer'; + +import 'package:hub/features/storage/constants/locals_constants.dart'; +import 'package:hub/features/storage/index.dart'; +import 'package:sqflite/sqflite.dart'; + +abstract class LocalsLocalDataSource implements BaseStorage {} + +class LocalsLocalDataSourceImpl implements LocalsLocalDataSource { + static final LocalsLocalDataSourceImpl _instance = + LocalsLocalDataSourceImpl._internal(); + factory LocalsLocalDataSourceImpl() => _instance; + LocalsLocalDataSourceImpl._internal(); + + bool _isInitialized = false; + + @override + Future init() async { + if (_isInitialized) return; + await DatabaseService.instance.init(); + _isInitialized = true; + } + + @override + Future get(String key) async { + final String? local = + await StorageHelper().get(ProfileStorageKey.clientUUID.key); + var response = await DatabaseService.database.query( + LocalsConstants.tableLocalsKeychain, + where: 'key = ? AND local = ?', + whereArgs: [key, local]); + if (response.isEmpty) { + return null; + } + return response.first['value'].toString(); + } + + @override + Future set(String key, T value) async { + var date = DateTime.now().toIso8601String(); + final String? local = + await StorageHelper().get(ProfileStorageKey.clientUUID.key); + await DatabaseService.database.insert( + LocalsConstants.tableLocalsKeychain, + { + 'key': key, + 'value': value.toString(), + 'type': 'local', + 'updateAt': date, + 'resolvedAt': date, + 'createdAt': date, + 'locals': local + }, + conflictAlgorithm: ConflictAlgorithm.replace); + } + + @override + Future delete(String key) async { + final String? local = + await StorageHelper().get(ProfileStorageKey.clientUUID.key); + await DatabaseService.database.delete(LocalsConstants.tableLocalsKeychain, + where: 'key = ? AND local = ?', whereArgs: [key, local]); + } + + @override + Future clearAll() async { + try { + await DatabaseService.database + .delete(LocalsConstants.tableLocalsKeychain); + } catch (e, s) { + log('() => clearAll keychain: $e', stackTrace: s); + } + } +} diff --git a/lib/features/locals/data/data_sources/locals_remote_data_source.dart b/lib/features/local/data/data_sources/locals_remote_data_source.dart similarity index 98% rename from lib/features/locals/data/data_sources/locals_remote_data_source.dart rename to lib/features/local/data/data_sources/locals_remote_data_source.dart index 3b656e62..b39ff764 100644 --- a/lib/features/locals/data/data_sources/locals_remote_data_source.dart +++ b/lib/features/local/data/data_sources/locals_remote_data_source.dart @@ -4,14 +4,14 @@ import 'dart:developer'; import 'package:flutter/material.dart'; import 'package:hub/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart'; -import 'package:hub/features/authentication/index.dart'; +import 'package:hub/features/auth/index.dart'; import 'package:hub/features/backend/index.dart'; -import 'package:hub/features/modules/data/index.dart'; +import 'package:hub/features/module/data/index.dart'; import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/internationalization.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/features/locals/index.dart'; +import 'package:hub/features/local/index.dart'; import 'package:hub/shared/utils/snackbar_util.dart'; abstract class LocalsRemoteDataSource { diff --git a/lib/features/locals/data/index.dart b/lib/features/local/data/index.dart similarity index 100% rename from lib/features/locals/data/index.dart rename to lib/features/local/data/index.dart diff --git a/lib/features/locals/data/models/index.dart b/lib/features/local/data/models/index.dart similarity index 100% rename from lib/features/locals/data/models/index.dart rename to lib/features/local/data/models/index.dart diff --git a/lib/features/locals/data/repositories/index.dart b/lib/features/local/data/repositories/index.dart similarity index 100% rename from lib/features/locals/data/repositories/index.dart rename to lib/features/local/data/repositories/index.dart diff --git a/lib/features/locals/data/repositories/locals_repository_impl.dart b/lib/features/local/data/repositories/locals_repository_impl.dart similarity index 86% rename from lib/features/locals/data/repositories/locals_repository_impl.dart rename to lib/features/local/data/repositories/locals_repository_impl.dart index 5957c051..e14e4227 100644 --- a/lib/features/locals/data/repositories/locals_repository_impl.dart +++ b/lib/features/local/data/repositories/locals_repository_impl.dart @@ -2,10 +2,10 @@ import 'dart:developer'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:hub/features/locals/index.dart'; +import 'package:hub/features/local/index.dart'; import 'package:hub/features/menu/index.dart'; -import 'package:hub/features/modules/data/index.dart'; -import 'package:hub/features/notifications/index.dart'; +import 'package:hub/features/module/data/index.dart'; +import 'package:hub/features/notification/index.dart'; import 'package:hub/features/storage/index.dart'; import 'package:hub/shared/utils/dialog_util.dart'; @@ -32,10 +32,16 @@ class LocalsRepositoryImpl implements LocalsRepository { } Future select(BuildContext context) async { - await localDataSource.unlinkLocal(); + await unselect(); await update(context); } + Future unselect() async { + await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); + await StorageHelper().set(ProfileStorageKey.clientName.key, ''); + await StorageHelper().set(ProfileStorageKey.ownerName.key, ''); + } + Future check(BuildContext context) async { final String? cliUUID = await StorageHelper().get(ProfileStorageKey.clientUUID.key); diff --git a/lib/features/locals/domain/entities/index.dart b/lib/features/local/domain/entities/index.dart similarity index 100% rename from lib/features/locals/domain/entities/index.dart rename to lib/features/local/domain/entities/index.dart diff --git a/lib/features/locals/domain/index.dart b/lib/features/local/domain/index.dart similarity index 100% rename from lib/features/locals/domain/index.dart rename to lib/features/local/domain/index.dart diff --git a/lib/features/locals/domain/respositories/index.dart b/lib/features/local/domain/respositories/index.dart similarity index 100% rename from lib/features/locals/domain/respositories/index.dart rename to lib/features/local/domain/respositories/index.dart diff --git a/lib/features/locals/domain/respositories/locals_repository.dart b/lib/features/local/domain/respositories/locals_repository.dart similarity index 100% rename from lib/features/locals/domain/respositories/locals_repository.dart rename to lib/features/local/domain/respositories/locals_repository.dart diff --git a/lib/features/locals/domain/usecases/index.dart b/lib/features/local/domain/usecases/index.dart similarity index 100% rename from lib/features/locals/domain/usecases/index.dart rename to lib/features/local/domain/usecases/index.dart diff --git a/lib/features/locals/index.dart b/lib/features/local/index.dart similarity index 100% rename from lib/features/locals/index.dart rename to lib/features/local/index.dart diff --git a/lib/features/locals/presentation/blocs/index.dart b/lib/features/local/presentation/blocs/index.dart similarity index 100% rename from lib/features/locals/presentation/blocs/index.dart rename to lib/features/local/presentation/blocs/index.dart diff --git a/lib/features/locals/presentation/blocs/local_profile_bloc.dart b/lib/features/local/presentation/blocs/local_profile_bloc.dart similarity index 98% rename from lib/features/locals/presentation/blocs/local_profile_bloc.dart rename to lib/features/local/presentation/blocs/local_profile_bloc.dart index 60b9b720..bca9c819 100644 --- a/lib/features/locals/presentation/blocs/local_profile_bloc.dart +++ b/lib/features/local/presentation/blocs/local_profile_bloc.dart @@ -6,7 +6,7 @@ import 'package:flutter/material.dart'; import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_model.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/features/locals/index.dart'; +import 'package:hub/features/local/index.dart'; class LocalProfileEvent {} diff --git a/lib/features/locals/presentation/index.dart b/lib/features/local/presentation/index.dart similarity index 100% rename from lib/features/locals/presentation/index.dart rename to lib/features/local/presentation/index.dart diff --git a/lib/features/locals/presentation/widgets/index.dart b/lib/features/local/presentation/widgets/index.dart similarity index 100% rename from lib/features/locals/presentation/widgets/index.dart rename to lib/features/local/presentation/widgets/index.dart diff --git a/lib/features/locals/presentation/widgets/local_profile/index.dart b/lib/features/local/presentation/widgets/local_profile/index.dart similarity index 100% rename from lib/features/locals/presentation/widgets/local_profile/index.dart rename to lib/features/local/presentation/widgets/local_profile/index.dart diff --git a/lib/features/locals/presentation/widgets/local_profile/local_profile_widget.dart b/lib/features/local/presentation/widgets/local_profile/local_profile_widget.dart similarity index 99% rename from lib/features/locals/presentation/widgets/local_profile/local_profile_widget.dart rename to lib/features/local/presentation/widgets/local_profile/local_profile_widget.dart index e3db9435..b3018ce6 100644 --- a/lib/features/locals/presentation/widgets/local_profile/local_profile_widget.dart +++ b/lib/features/local/presentation/widgets/local_profile/local_profile_widget.dart @@ -2,11 +2,11 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:hub/features/modules/index.dart'; +import 'package:hub/features/module/index.dart'; import 'package:hub/flutter_flow/custom_functions.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; -import 'package:hub/features/locals/index.dart'; +import 'package:hub/features/local/index.dart'; class LocalProfileComponentWidget extends StatefulWidget { const LocalProfileComponentWidget({super.key}); diff --git a/lib/features/locals/utils/index.dart b/lib/features/local/utils/index.dart similarity index 100% rename from lib/features/locals/utils/index.dart rename to lib/features/local/utils/index.dart diff --git a/lib/features/locals/utils/local_util.dart b/lib/features/local/utils/local_util.dart similarity index 99% rename from lib/features/locals/utils/local_util.dart rename to lib/features/local/utils/local_util.dart index 0aa0cb85..498b8834 100644 --- a/lib/features/locals/utils/local_util.dart +++ b/lib/features/local/utils/local_util.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:hub/features/backend/index.dart'; import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/internationalization.dart'; -import 'package:hub/features/locals/index.dart'; +import 'package:hub/features/local/index.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/log_util.dart'; diff --git a/lib/features/locals/data/data_sources/locals_local_data_source.dart b/lib/features/locals/data/data_sources/locals_local_data_source.dart deleted file mode 100644 index 32445b40..00000000 --- a/lib/features/locals/data/data_sources/locals_local_data_source.dart +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:hub/features/storage/index.dart'; - -abstract class LocalsLocalDataSource { - Future unlinkLocal(); -} - -class LocalsLocalDataSourceImpl { - Future unlinkLocal() async { - await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); - await StorageHelper().set(ProfileStorageKey.clientName.key, ''); - await StorageHelper().set(ProfileStorageKey.ownerName.key, ''); - } -} diff --git a/lib/features/menu/data/data_sources/menu_local_data_source.dart b/lib/features/menu/data/data_sources/menu_local_data_source.dart index d12ecc93..8b5c4421 100644 --- a/lib/features/menu/data/data_sources/menu_local_data_source.dart +++ b/lib/features/menu/data/data_sources/menu_local_data_source.dart @@ -1,14 +1,13 @@ import 'dart:developer'; import 'package:flutter/material.dart'; -import 'package:hub/features/authentication/index.dart'; +import 'package:hub/features/auth/index.dart'; import 'package:hub/features/menu/index.dart'; +import 'package:hub/features/module/index.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/shared/extensions/dialog_extensions.dart'; import 'package:hub/shared/utils/path_util.dart'; -import '../../../modules/domain/entities/index.dart'; - abstract class MenuLocalDataSource { Future addMenuEntry(EnumMenuItem item, List entries, IconData icon, String text, Function() action); diff --git a/lib/features/menu/data/repositories/menu_repository_impl.dart b/lib/features/menu/data/repositories/menu_repository_impl.dart index 4f6d7f5d..c5642310 100644 --- a/lib/features/menu/data/repositories/menu_repository_impl.dart +++ b/lib/features/menu/data/repositories/menu_repository_impl.dart @@ -1,7 +1,7 @@ import 'dart:developer'; import 'package:hub/features/menu/index.dart'; -import 'package:hub/features/modules/index.dart'; +import 'package:hub/features/module/index.dart'; import 'package:hub/flutter_flow/custom_functions.dart'; class MenuRepositoryImpl implements MenuRepository { diff --git a/lib/features/menu/presentation/blocs/menu_bloc.dart b/lib/features/menu/presentation/blocs/menu_bloc.dart index c1b7e205..4d4bb797 100644 --- a/lib/features/menu/presentation/blocs/menu_bloc.dart +++ b/lib/features/menu/presentation/blocs/menu_bloc.dart @@ -2,8 +2,8 @@ import 'dart:async'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:hub/features/menu/index.dart'; -import 'package:hub/features/modules/index.dart'; -import 'package:hub/features/locals/index.dart'; +import 'package:hub/features/module/index.dart'; +import 'package:hub/features/local/index.dart'; class MenuEvent {} diff --git a/lib/features/menu/presentation/mappers/menu_entry.dart b/lib/features/menu/presentation/mappers/menu_entry.dart index c9796188..426da056 100644 --- a/lib/features/menu/presentation/mappers/menu_entry.dart +++ b/lib/features/menu/presentation/mappers/menu_entry.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hub/features/modules/index.dart'; +import 'package:hub/features/module/index.dart'; import 'package:hub/flutter_flow/internationalization.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; diff --git a/lib/features/menu/presentation/widgets/menu_factory.dart b/lib/features/menu/presentation/widgets/menu_factory.dart index 3092a115..2229d20f 100644 --- a/lib/features/menu/presentation/widgets/menu_factory.dart +++ b/lib/features/menu/presentation/widgets/menu_factory.dart @@ -1,8 +1,8 @@ -import 'package:hub/features/locals/index.dart'; +import 'package:hub/features/local/index.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:hub/features/menu/index.dart'; -import 'package:hub/features/modules/index.dart'; +import 'package:hub/features/module/index.dart'; import 'package:hub/shared/utils/loading_util.dart'; diff --git a/lib/features/modules/constants/index.dart b/lib/features/module/constants/index.dart similarity index 100% rename from lib/features/modules/constants/index.dart rename to lib/features/module/constants/index.dart diff --git a/lib/features/modules/constants/license_constants.dart b/lib/features/module/constants/license_constants.dart similarity index 100% rename from lib/features/modules/constants/license_constants.dart rename to lib/features/module/constants/license_constants.dart diff --git a/lib/features/modules/data/data_sources/index.dart b/lib/features/module/data/data_sources/index.dart similarity index 100% rename from lib/features/modules/data/data_sources/index.dart rename to lib/features/module/data/data_sources/index.dart diff --git a/lib/features/modules/data/data_sources/license_local_data_source.dart b/lib/features/module/data/data_sources/license_local_data_source.dart similarity index 97% rename from lib/features/modules/data/data_sources/license_local_data_source.dart rename to lib/features/module/data/data_sources/license_local_data_source.dart index e2ef21aa..25251b41 100644 --- a/lib/features/modules/data/data_sources/license_local_data_source.dart +++ b/lib/features/module/data/data_sources/license_local_data_source.dart @@ -1,4 +1,4 @@ -import 'package:hub/features/modules/index.dart'; +import 'package:hub/features/module/index.dart'; import 'package:hub/features/storage/index.dart'; import 'package:hub/shared/extensions/string_extensions.dart'; diff --git a/lib/features/modules/data/data_sources/license_remote_data_source.dart b/lib/features/module/data/data_sources/license_remote_data_source.dart similarity index 96% rename from lib/features/modules/data/data_sources/license_remote_data_source.dart rename to lib/features/module/data/data_sources/license_remote_data_source.dart index 5a80c9c7..124f432d 100644 --- a/lib/features/modules/data/data_sources/license_remote_data_source.dart +++ b/lib/features/module/data/data_sources/license_remote_data_source.dart @@ -4,8 +4,8 @@ import 'dart:async'; import 'dart:developer'; import 'package:hub/features/backend/index.dart'; -import 'package:hub/features/locals/data/repositories/locals_repository_impl.dart'; -import 'package:hub/features/modules/index.dart'; +import 'package:hub/features/local/data/repositories/locals_repository_impl.dart'; +import 'package:hub/features/module/index.dart'; import 'package:sqflite/sqflite.dart'; diff --git a/lib/features/modules/data/index.dart b/lib/features/module/data/index.dart similarity index 100% rename from lib/features/modules/data/index.dart rename to lib/features/module/data/index.dart diff --git a/lib/features/modules/data/models/index.dart b/lib/features/module/data/models/index.dart similarity index 100% rename from lib/features/modules/data/models/index.dart rename to lib/features/module/data/models/index.dart diff --git a/lib/features/modules/data/models/license_model.dart b/lib/features/module/data/models/license_model.dart similarity index 100% rename from lib/features/modules/data/models/license_model.dart rename to lib/features/module/data/models/license_model.dart diff --git a/lib/features/modules/data/models/license_model.freezed.dart b/lib/features/module/data/models/license_model.freezed.dart similarity index 100% rename from lib/features/modules/data/models/license_model.freezed.dart rename to lib/features/module/data/models/license_model.freezed.dart diff --git a/lib/features/modules/data/models/license_model.g.dart b/lib/features/module/data/models/license_model.g.dart similarity index 100% rename from lib/features/modules/data/models/license_model.g.dart rename to lib/features/module/data/models/license_model.g.dart diff --git a/lib/features/modules/data/models/module_model.dart b/lib/features/module/data/models/module_model.dart similarity index 100% rename from lib/features/modules/data/models/module_model.dart rename to lib/features/module/data/models/module_model.dart diff --git a/lib/features/modules/data/models/module_model.freezed.dart b/lib/features/module/data/models/module_model.freezed.dart similarity index 100% rename from lib/features/modules/data/models/module_model.freezed.dart rename to lib/features/module/data/models/module_model.freezed.dart diff --git a/lib/features/modules/data/models/module_model.g.dart b/lib/features/module/data/models/module_model.g.dart similarity index 100% rename from lib/features/modules/data/models/module_model.g.dart rename to lib/features/module/data/models/module_model.g.dart diff --git a/lib/features/modules/data/repositories/index.dart b/lib/features/module/data/repositories/index.dart similarity index 100% rename from lib/features/modules/data/repositories/index.dart rename to lib/features/module/data/repositories/index.dart diff --git a/lib/features/modules/data/repositories/license_repository_impl.dart b/lib/features/module/data/repositories/license_repository_impl.dart similarity index 90% rename from lib/features/modules/data/repositories/license_repository_impl.dart rename to lib/features/module/data/repositories/license_repository_impl.dart index 0a5a5b48..a201b543 100644 --- a/lib/features/modules/data/repositories/license_repository_impl.dart +++ b/lib/features/module/data/repositories/license_repository_impl.dart @@ -1,7 +1,7 @@ import 'dart:developer'; -import 'package:hub/features/modules/data/data_sources/index.dart'; -import 'package:hub/features/modules/domain/index.dart'; +import 'package:hub/features/module/data/data_sources/index.dart'; +import 'package:hub/features/module/domain/index.dart'; import 'package:hub/features/storage/index.dart'; import 'package:sqflite/sqflite.dart'; diff --git a/lib/features/modules/domain/entities/base_module.dart b/lib/features/module/domain/entities/base_module.dart similarity index 100% rename from lib/features/modules/domain/entities/base_module.dart rename to lib/features/module/domain/entities/base_module.dart diff --git a/lib/features/modules/domain/entities/index.dart b/lib/features/module/domain/entities/index.dart similarity index 100% rename from lib/features/modules/domain/entities/index.dart rename to lib/features/module/domain/entities/index.dart diff --git a/lib/features/modules/domain/entities/license.dart b/lib/features/module/domain/entities/license.dart similarity index 100% rename from lib/features/modules/domain/entities/license.dart rename to lib/features/module/domain/entities/license.dart diff --git a/lib/features/modules/domain/entities/module.dart b/lib/features/module/domain/entities/module.dart similarity index 96% rename from lib/features/modules/domain/entities/module.dart rename to lib/features/module/domain/entities/module.dart index 43cff382..a0b36a12 100644 --- a/lib/features/modules/domain/entities/module.dart +++ b/lib/features/module/domain/entities/module.dart @@ -1,4 +1,4 @@ -import 'package:hub/features/modules/index.dart'; +import 'package:hub/features/module/index.dart'; enum ModuleStatus { active, inactive, disabled } diff --git a/lib/features/modules/domain/index.dart b/lib/features/module/domain/index.dart similarity index 100% rename from lib/features/modules/domain/index.dart rename to lib/features/module/domain/index.dart diff --git a/lib/features/modules/domain/respositories/index.dart b/lib/features/module/domain/respositories/index.dart similarity index 100% rename from lib/features/modules/domain/respositories/index.dart rename to lib/features/module/domain/respositories/index.dart diff --git a/lib/features/modules/domain/respositories/license_repository.dart b/lib/features/module/domain/respositories/license_repository.dart similarity index 100% rename from lib/features/modules/domain/respositories/license_repository.dart rename to lib/features/module/domain/respositories/license_repository.dart diff --git a/lib/features/modules/domain/usecases/index.dart b/lib/features/module/domain/usecases/index.dart similarity index 100% rename from lib/features/modules/domain/usecases/index.dart rename to lib/features/module/domain/usecases/index.dart diff --git a/lib/features/modules/index.dart b/lib/features/module/index.dart similarity index 100% rename from lib/features/modules/index.dart rename to lib/features/module/index.dart diff --git a/lib/features/modules/presentation/blocs/index.dart b/lib/features/module/presentation/blocs/index.dart similarity index 100% rename from lib/features/modules/presentation/blocs/index.dart rename to lib/features/module/presentation/blocs/index.dart diff --git a/lib/features/modules/presentation/index.dart b/lib/features/module/presentation/index.dart similarity index 100% rename from lib/features/modules/presentation/index.dart rename to lib/features/module/presentation/index.dart diff --git a/lib/features/modules/presentation/widgets/index.dart b/lib/features/module/presentation/widgets/index.dart similarity index 100% rename from lib/features/modules/presentation/widgets/index.dart rename to lib/features/module/presentation/widgets/index.dart diff --git a/lib/features/notifications/deep_link_service.dart b/lib/features/notification/deep_link_service.dart similarity index 100% rename from lib/features/notifications/deep_link_service.dart rename to lib/features/notification/deep_link_service.dart diff --git a/lib/features/notifications/firebase_messaging_service.dart b/lib/features/notification/firebase_messaging_service.dart similarity index 97% rename from lib/features/notifications/firebase_messaging_service.dart rename to lib/features/notification/firebase_messaging_service.dart index 3d4a77f7..68fc300a 100644 --- a/lib/features/notifications/firebase_messaging_service.dart +++ b/lib/features/notification/firebase_messaging_service.dart @@ -2,7 +2,7 @@ import 'dart:developer'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:hub/features/backend/index.dart'; -import 'package:hub/features/storage/data/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/shared/utils/log_util.dart'; diff --git a/lib/features/notifications/index.dart b/lib/features/notification/index.dart similarity index 100% rename from lib/features/notifications/index.dart rename to lib/features/notification/index.dart diff --git a/lib/features/notifications/notification_service.dart b/lib/features/notification/notification_service.dart similarity index 100% rename from lib/features/notifications/notification_service.dart rename to lib/features/notification/notification_service.dart diff --git a/lib/features/profile/data/data_sources/profile_local_data_source.dart b/lib/features/profile/data/data_sources/profile_local_data_source.dart index 481f5b67..8b0f9d1e 100644 --- a/lib/features/profile/data/data_sources/profile_local_data_source.dart +++ b/lib/features/profile/data/data_sources/profile_local_data_source.dart @@ -1,5 +1,6 @@ import 'dart:developer'; +import 'package:hub/features/storage/constants/profile_constants.dart'; import 'package:hub/features/storage/index.dart'; import 'package:hub/shared/constants/index.dart'; @@ -7,11 +8,11 @@ import 'package:sqflite/sqflite.dart'; abstract class ProfileLocalDataSource implements DatabaseStorage {} -class ProfileLocalDataSourceImpl implements BaseStorage { - ProfileLocalDataSourceImpl._(); - - static final ProfileLocalDataSourceImpl instance = - ProfileLocalDataSourceImpl._(); +class ProfileLocalDataSourceImpl implements ProfileLocalDataSource { + static final ProfileLocalDataSourceImpl _instance = + ProfileLocalDataSourceImpl._internal(); + factory ProfileLocalDataSourceImpl() => _instance; + ProfileLocalDataSourceImpl._internal(); bool _isInitialized = false; diff --git a/lib/features/storage/constants/index.dart b/lib/features/storage/constants/index.dart new file mode 100644 index 00000000..674329bd --- /dev/null +++ b/lib/features/storage/constants/index.dart @@ -0,0 +1,2 @@ +export 'locals_constants.dart'; +export 'profile_constants.dart'; diff --git a/lib/features/storage/constants/locals_constants.dart b/lib/features/storage/constants/locals_constants.dart new file mode 100644 index 00000000..544defd4 --- /dev/null +++ b/lib/features/storage/constants/locals_constants.dart @@ -0,0 +1,17 @@ +class LocalsConstants { + static const String tableLocalsKeychain = 'LocalsKeychain'; + + static String get createLocalsTable => ''' + CREATE TABLE IF NOT EXISTS $tableLocalsKeychain ( + key TEXT, + value TEXT, + type TEXT, + updateAt TEXT, + resolvedAt TEXT, + createdAt TEXT, + local TEXT + ); + '''; + static String get deleteLocalsTable => + 'DROP TABLE IF EXISTS $tableLocalsKeychain;'; +} diff --git a/lib/shared/constants/keychain_constants.dart b/lib/features/storage/constants/profile_constants.dart similarity index 100% rename from lib/shared/constants/keychain_constants.dart rename to lib/features/storage/constants/profile_constants.dart diff --git a/lib/features/storage/enums/database_storage.dart b/lib/features/storage/enums/database_storage_key.dart similarity index 94% rename from lib/features/storage/enums/database_storage.dart rename to lib/features/storage/enums/database_storage_key.dart index 9fab3420..f4028646 100644 --- a/lib/features/storage/enums/database_storage.dart +++ b/lib/features/storage/enums/database_storage_key.dart @@ -18,7 +18,7 @@ enum ProfileStorageKey implements DatabaseStorageKey { static const String table = 'profileTable'; - static List get values => + static List get keys => ProfileStorageKey.values.map((e) => e.key).toList(); } @@ -42,6 +42,6 @@ enum LocalsStorageKey implements DatabaseStorageKey { static const String table = 'LocalsStorageKey'; - static List get values => + static List get keys => LocalsStorageKey.values.map((e) => e.key).toList(); } diff --git a/lib/features/storage/enums/index.dart b/lib/features/storage/enums/index.dart index c840252e..ac61a5b2 100644 --- a/lib/features/storage/enums/index.dart +++ b/lib/features/storage/enums/index.dart @@ -1,4 +1,4 @@ -export 'database_storage.dart'; -export 'secure_storage.dart'; -export 'shared_storage.dart'; +export 'database_storage_key.dart'; +export 'secure_storage_key.dart'; +export 'shared_storage_key.dart'; export 'storage.dart'; diff --git a/lib/features/storage/enums/secure_storage.dart b/lib/features/storage/enums/secure_storage_key.dart similarity index 100% rename from lib/features/storage/enums/secure_storage.dart rename to lib/features/storage/enums/secure_storage_key.dart diff --git a/lib/features/storage/enums/shared_storage.dart b/lib/features/storage/enums/shared_storage_key.dart similarity index 100% rename from lib/features/storage/enums/shared_storage.dart rename to lib/features/storage/enums/shared_storage_key.dart diff --git a/lib/features/storage/helpers/dabase_storage_helper.dart b/lib/features/storage/helpers/dabase_storage_helper.dart index aa04e1d7..63839577 100644 --- a/lib/features/storage/helpers/dabase_storage_helper.dart +++ b/lib/features/storage/helpers/dabase_storage_helper.dart @@ -1,3 +1,4 @@ +import 'package:hub/features/local/index.dart'; import 'package:hub/features/profile/index.dart'; import 'package:hub/features/storage/index.dart'; @@ -11,20 +12,28 @@ class DatabaseStorage implements BaseStorage { // bool _isInitialized = false; static BaseStorage getInstanceByKey(String key) { - if (ProfileStorageKey.values.contains(key)) - return ProfileLocalDataSourceImpl.instance(key); - else //if (LocalsStorageKey.values.contains(key)); - return LocalsStorageKey.instance(key); + if (ProfileStorageKey.keys.contains(key)) // + { + return ProfileLocalDataSourceImpl(); + } else //if (LocalsStorageKey.values.contains(key)) + { + return LocalsLocalDataSourceImpl(); + } } @override - Future clearAll() => throw UnimplementedError(); + Future clearAll() => // + throw UnimplementedError(); @override - Future delete(String key) => throw UnimplementedError(); + Future delete(String key) async => + await getInstanceByKey(key).delete(key); @override - Future get(String key) => throw UnimplementedError(); + Future get(String key) async => // + await getInstanceByKey(key).get(key); @override - Future init() => throw UnimplementedError(); + Future init() async => // + await DatabaseService.instance.init(); @override - Future set(String key, T value) => throw UnimplementedError(); + Future set(String key, T value) async => + await getInstanceByKey(key).set(key, value); } diff --git a/lib/features/storage/index.dart b/lib/features/storage/index.dart index 8ce9944e..07a79a2a 100644 --- a/lib/features/storage/index.dart +++ b/lib/features/storage/index.dart @@ -3,3 +3,4 @@ export 'enums/index.dart'; export 'helpers/index.dart'; export 'repositories/index.dart'; export 'services/index.dart'; +export 'constants/index.dart'; diff --git a/lib/features/storage/repositories/storage_repository_impl.dart b/lib/features/storage/repositories/storage_repository_impl.dart index 56dc470c..30f3fd0d 100644 --- a/lib/features/storage/repositories/storage_repository_impl.dart +++ b/lib/features/storage/repositories/storage_repository_impl.dart @@ -20,7 +20,7 @@ class StorageHelper implements StorageRepository { Future init() async { await SecureStorage.instance.init(); await SharedPreferencesStorage.instance.init(); - await ProfileLocalDataSourceImpl.instance.init(); + await DatabaseStorage.instance.init(); String? isFirstRun = await SharedPreferencesStorage.instance .get(SharedPreferencesKey.isFirstRun.value); @@ -45,7 +45,10 @@ class StorageHelper implements StorageRepository { } static BaseStorage getInstanceByKey(String key) { - if (SecureStorageKey.values.map((e) => e.value).toList().contains(key)) { + if (SecureStorageKey.values // + .map((e) => e.value) + .toList() + .contains(key)) { return SecureStorage.instance; } else if (SharedPreferencesKey.values .map((e) => e.value) diff --git a/lib/features/storage/services/database_storage_service.dart b/lib/features/storage/services/database_storage_service.dart index 832d2be4..8f90ad3e 100644 --- a/lib/features/storage/services/database_storage_service.dart +++ b/lib/features/storage/services/database_storage_service.dart @@ -1,11 +1,12 @@ -import 'package:hub/features/modules/index.dart'; +import 'package:hub/features/module/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/shared/constants/index.dart'; import 'package:sqflite/sqflite.dart'; import 'package:path/path.dart'; class DatabaseService { static const String _dbName = 'database.db'; - static const int _dbVersion = 2; + static const int _dbVersion = 3; static final DatabaseService instance = DatabaseService._internal(); factory DatabaseService() => instance; @@ -48,14 +49,21 @@ class DatabaseService { Future _onCreate(Database database, int version) async { print('Creating database...'); - await _createTables(database, version); + await database.execute(createKeychainTable); + _onUpgrade(database, 1, _dbVersion); } Future _onUpgrade( Database database, int oldVersion, int newVersion) async { print('Upgrading database from version $oldVersion to $newVersion...'); if (oldVersion < 2 && newVersion >= 2) { - await _createTables(database, newVersion); + await database.execute(LicenseConstants.updatePetsHistoryTrigger); + await database.execute(LicenseConstants.updateDisplayTrigger); + await database.execute(LicenseConstants.insertDisplayTrigger); + await database.execute(LicenseConstants.updatePeopleDisplayTrigger); + } + if (oldVersion < 3 && newVersion >= 3) { + await database.execute(LocalsConstants.createLocalsTable); } } @@ -63,7 +71,14 @@ class DatabaseService { Database database, int oldVersion, int newVersion) async { print('Downgrading database from version $oldVersion to $newVersion...'); if (oldVersion >= 2 && newVersion < 2) { - await _dropTables(database); + await database.execute(LicenseConstants.deleteLicenseTable); + await database.execute(LicenseConstants.dropPeopleDisplayTrigger); + await database.execute(LicenseConstants.dropInsertDisplayTrigger); + await database.execute(LicenseConstants.dropUpdateDisplayTrigger); + await database.execute(LicenseConstants.dropPetsHistoryTrigger); + } + if (oldVersion >= 3 && newVersion > 3) { + await database.execute(LocalsConstants.deleteLocalsTable); } } @@ -73,23 +88,4 @@ class DatabaseService { // await database.execute('PRAGMA temp_store = MEMORY;'); // await database.execute('PRAGMA foreign_keys = ON;'); } - - Future _createTables(Database database, int version) async { - await database.execute(createKeychainTable); - await database.execute(LicenseConstants.createLicenseTable); - if (version >= 2) { - await database.execute(LicenseConstants.updatePetsHistoryTrigger); - await database.execute(LicenseConstants.updateDisplayTrigger); - await database.execute(LicenseConstants.insertDisplayTrigger); - await database.execute(LicenseConstants.updatePeopleDisplayTrigger); - } - } - - Future _dropTables(Database database) async { - await database.execute(LicenseConstants.deleteLicenseTable); - await database.execute(LicenseConstants.dropPeopleDisplayTrigger); - await database.execute(LicenseConstants.dropInsertDisplayTrigger); - await database.execute(LicenseConstants.dropUpdateDisplayTrigger); - await database.execute(LicenseConstants.dropPetsHistoryTrigger); - } } diff --git a/lib/flutter_flow/nav/nav.dart b/lib/flutter_flow/nav/nav.dart index 3178c5fd..007b1dda 100644 --- a/lib/flutter_flow/nav/nav.dart +++ b/lib/flutter_flow/nav/nav.dart @@ -6,7 +6,7 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:hub/features/backend/index.dart'; import 'package:hub/features/history/index.dart'; import 'package:hub/features/home/index.dart'; -import 'package:hub/features/locals/index.dart'; +import 'package:hub/features/local/index.dart'; import 'package:hub/features/menu/index.dart'; import 'package:hub/features/property/index.dart'; import 'package:hub/features/storage/index.dart'; diff --git a/lib/initialization.dart b/lib/initialization.dart index cdc93bc0..27bdc509 100644 --- a/lib/initialization.dart +++ b/lib/initialization.dart @@ -7,13 +7,12 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_web_plugins/url_strategy.dart'; -import 'package:hub/features/notifications/index.dart'; +import 'package:hub/features/notification/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'features/storage/index.dart'; - Future initializeApp() async { WidgetsFlutterBinding.ensureInitialized(); await _initializeTracking(); diff --git a/lib/main.dart b/lib/main.dart index f2565331..9f360bda 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -6,7 +6,8 @@ import 'package:firebase_crashlytics/firebase_crashlytics.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:hub/features/notifications/index.dart'; +import 'package:hub/features/notification/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/internationalization.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; @@ -14,7 +15,6 @@ import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:responsive_framework/responsive_framework.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'features/storage/index.dart'; import 'initialization.dart'; final GlobalKey navigatorKey = GlobalKey(); diff --git a/lib/pages/forgot_password_page/forgot_password_screen.dart b/lib/pages/forgot_password_page/forgot_password_screen.dart index 617b46d3..bf737647 100644 --- a/lib/pages/forgot_password_page/forgot_password_screen.dart +++ b/lib/pages/forgot_password_page/forgot_password_screen.dart @@ -2,7 +2,7 @@ import 'package:easy_debounce/easy_debounce.dart'; import 'package:flutter/material.dart'; import 'package:flutter_animate/flutter_animate.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hub/features/authentication/index.dart'; +import 'package:hub/features/auth/index.dart'; import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; diff --git a/lib/pages/pets_page/pets_page_model.dart b/lib/pages/pets_page/pets_page_model.dart index b59a975a..c8473787 100644 --- a/lib/pages/pets_page/pets_page_model.dart +++ b/lib/pages/pets_page/pets_page_model.dart @@ -6,7 +6,7 @@ import 'package:flutter/material.dart'; import 'package:http/http.dart'; import 'package:hub/components/templates_components/details_component/details_component_widget.dart'; import 'package:hub/features/backend/index.dart'; -import 'package:hub/features/storage/data/index.dart'; +import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/flutter_flow_widgets.dart'; diff --git a/lib/pages/preferences_settings_page/preferences_settings_model.dart b/lib/pages/preferences_settings_page/preferences_settings_model.dart index c99d439f..2f1c903f 100644 --- a/lib/pages/preferences_settings_page/preferences_settings_model.dart +++ b/lib/pages/preferences_settings_page/preferences_settings_model.dart @@ -2,12 +2,12 @@ import 'dart:developer'; import 'package:flutter/material.dart'; import 'package:hub/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart'; -import 'package:hub/features/authentication/index.dart'; +import 'package:hub/features/auth/index.dart'; import 'package:hub/features/backend/index.dart'; import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/features/locals/index.dart'; +import 'package:hub/features/local/index.dart'; import 'package:hub/shared/utils/path_util.dart'; import 'package:share_plus/share_plus.dart'; diff --git a/lib/pages/reception_page/reception_page_widget.dart b/lib/pages/reception_page/reception_page_widget.dart index 7a6d41d7..e7d5718e 100644 --- a/lib/pages/reception_page/reception_page_widget.dart +++ b/lib/pages/reception_page/reception_page_widget.dart @@ -5,15 +5,15 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:hub/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart'; -import 'package:hub/features/authentication/index.dart'; +import 'package:hub/features/auth/index.dart'; import 'package:hub/features/backend/index.dart'; -import 'package:hub/features/notifications/index.dart'; +import 'package:hub/features/notification/index.dart'; import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/flutter_flow_widgets.dart'; import 'package:hub/pages/reception_page/reception_page_model.dart'; -import 'package:hub/features/locals/index.dart'; +import 'package:hub/features/local/index.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:provider/provider.dart'; diff --git a/lib/shared/constants/index.dart b/lib/shared/constants/index.dart index a810e4ce..e69de29b 100644 --- a/lib/shared/constants/index.dart +++ b/lib/shared/constants/index.dart @@ -1 +0,0 @@ -export 'keychain_constants.dart'; From d2e12b31f453c25aef7554967572a91a7cc1dda3 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Wed, 18 Dec 2024 17:56:54 -0300 Subject: [PATCH 08/25] WIP --- lib/features/local/utils/local_util.dart | 34 ++++++++++++++++++-- lib/shared/extensions/string_extensions.dart | 8 +++++ lib/shared/utils/string_util.dart | 1 + 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 lib/shared/utils/string_util.dart diff --git a/lib/features/local/utils/local_util.dart b/lib/features/local/utils/local_util.dart index 498b8834..8d39cbcf 100644 --- a/lib/features/local/utils/local_util.dart +++ b/lib/features/local/utils/local_util.dart @@ -8,6 +8,7 @@ import 'package:hub/features/local/index.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/log_util.dart'; +import 'package:hub/shared/extensions/index.dart'; class LocalUtil { static void handleError(BuildContext context, String errorMsg) async { @@ -96,14 +97,41 @@ class LocalUtil { } } + static bool _processSystemOption(String? json) { + if (json == null) return false; + if (json == 'S') + return true; + else + return false; + } + static Future updateStorageUtil(Map jsonBody) async { try { await StorageHelper() .set(LocalsStorageKey.whatsapp.key, jsonBody['whatsapp'] ?? false); await StorageHelper().set( LocalsStorageKey.provisional.key, jsonBody['provisional'] ?? false); - await StorageHelper() - .set(LocalsStorageKey.pets.key, jsonBody['pet'] ?? false); + await StorageHelper().set( + LocalsStorageKey.pets.key, + jsonBody['pet'] ?? false, + ); + await StorageHelper().set( + LocalsStorageKey.notify.key, + _processSystemOption( + jsonBody['visitado']['VDO_NOTTERCEIROS'], + ), + ); + if (jsonBody['visitado']['VDO_SENHA'] == '') { + await StorageHelper().set( + LocalsStorageKey.access.key, + _processSystemOption(jsonBody['visitado']['VDO_SENHA']), + ); + await StorageHelper().set( + LocalsStorageKey.panic.key, + _processSystemOption(jsonBody['visitado']['VDO_SENHA_PANICO']), + ); + } + await StorageHelper().set( LocalsStorageKey.petAmount.key, jsonBody['petAmountRegister']?.toString().isEmpty ?? true @@ -113,6 +141,8 @@ class LocalUtil { jsonBody['visitado']['VDO_NOME'] ?? ''); await StorageHelper().set(ProfileStorageKey.userEmail.key, jsonBody['visitado']['VDO_EMAIL'] ?? ''); + await StorageHelper().set( + LocalsStorageKey.provisional.key, jsonBody['provisional'] ?? false); final bool isNewVersion = jsonBody['newVersion'] ?? false; await StorageHelper() diff --git a/lib/shared/extensions/string_extensions.dart b/lib/shared/extensions/string_extensions.dart index 20fa5f75..dc0b62c6 100644 --- a/lib/shared/extensions/string_extensions.dart +++ b/lib/shared/extensions/string_extensions.dart @@ -3,6 +3,12 @@ extension StringNullableExtensions on String? { if (this == null) return false; return this!.toLowerCase() == 'true'; } + + bool isNullOrEmpty() { + if (this == null) return true; + if (this == '') return true; + return false; + } } extension StringExtensions on String { @@ -10,3 +16,5 @@ extension StringExtensions on String { return this.toLowerCase() == 'true'; } } + +extension StringExtension on String? {} diff --git a/lib/shared/utils/string_util.dart b/lib/shared/utils/string_util.dart new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/lib/shared/utils/string_util.dart @@ -0,0 +1 @@ + From 926944b178b33daf0ea868789cf5818e335c7fa9 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Thu, 19 Dec 2024 11:04:45 -0300 Subject: [PATCH 09/25] =?UTF-8?q?Sincronizar=20dados=20remotos=20com=20as?= =?UTF-8?q?=20op=C3=A7=C3=B5es=20do=20sistema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data_sources/locals_local_data_source.dart | 16 ++++++++++------ lib/features/local/utils/local_util.dart | 7 +++---- .../storage/constants/locals_constants.dart | 3 ++- .../services/database_storage_service.dart | 2 +- lib/main.dart | 2 ++ .../preferences_settings_model.dart | 10 ++++++---- 6 files changed, 24 insertions(+), 16 deletions(-) diff --git a/lib/features/local/data/data_sources/locals_local_data_source.dart b/lib/features/local/data/data_sources/locals_local_data_source.dart index 8fb385cd..cac9e924 100644 --- a/lib/features/local/data/data_sources/locals_local_data_source.dart +++ b/lib/features/local/data/data_sources/locals_local_data_source.dart @@ -37,10 +37,12 @@ class LocalsLocalDataSourceImpl implements LocalsLocalDataSource { @override Future set(String key, T value) async { - var date = DateTime.now().toIso8601String(); - final String? local = - await StorageHelper().get(ProfileStorageKey.clientUUID.key); - await DatabaseService.database.insert( + try { + var date = DateTime.now().toIso8601String(); + final String? local = + await StorageHelper().get(ProfileStorageKey.clientUUID.key); + + await DatabaseService.database.insert( LocalsConstants.tableLocalsKeychain, { 'key': key, @@ -49,9 +51,11 @@ class LocalsLocalDataSourceImpl implements LocalsLocalDataSource { 'updateAt': date, 'resolvedAt': date, 'createdAt': date, - 'locals': local + 'local': local }, - conflictAlgorithm: ConflictAlgorithm.replace); + conflictAlgorithm: ConflictAlgorithm.replace, + ); + } catch (e, s) {} } @override diff --git a/lib/features/local/utils/local_util.dart b/lib/features/local/utils/local_util.dart index 8d39cbcf..202e911a 100644 --- a/lib/features/local/utils/local_util.dart +++ b/lib/features/local/utils/local_util.dart @@ -8,7 +8,6 @@ import 'package:hub/features/local/index.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/log_util.dart'; -import 'package:hub/shared/extensions/index.dart'; class LocalUtil { static void handleError(BuildContext context, String errorMsg) async { @@ -121,14 +120,14 @@ class LocalUtil { jsonBody['visitado']['VDO_NOTTERCEIROS'], ), ); - if (jsonBody['visitado']['VDO_SENHA'] == '') { + if (jsonBody['visitado']['VDO_TEM_SENHA_ACESSO'] == '') { await StorageHelper().set( LocalsStorageKey.access.key, - _processSystemOption(jsonBody['visitado']['VDO_SENHA']), + _processSystemOption(jsonBody['visitado']['VDO_TEM_SENHA_ACESSO']), ); await StorageHelper().set( LocalsStorageKey.panic.key, - _processSystemOption(jsonBody['visitado']['VDO_SENHA_PANICO']), + _processSystemOption(jsonBody['visitado']['VDO_TEM_SENHA_PANICO']), ); } diff --git a/lib/features/storage/constants/locals_constants.dart b/lib/features/storage/constants/locals_constants.dart index 544defd4..626f4087 100644 --- a/lib/features/storage/constants/locals_constants.dart +++ b/lib/features/storage/constants/locals_constants.dart @@ -9,7 +9,8 @@ class LocalsConstants { updateAt TEXT, resolvedAt TEXT, createdAt TEXT, - local TEXT + local TEXT, + UNIQUE (key, local) ); '''; static String get deleteLocalsTable => diff --git a/lib/features/storage/services/database_storage_service.dart b/lib/features/storage/services/database_storage_service.dart index 8f90ad3e..1e7dade9 100644 --- a/lib/features/storage/services/database_storage_service.dart +++ b/lib/features/storage/services/database_storage_service.dart @@ -1,6 +1,5 @@ import 'package:hub/features/module/index.dart'; import 'package:hub/features/storage/index.dart'; -import 'package:hub/shared/constants/index.dart'; import 'package:sqflite/sqflite.dart'; import 'package:path/path.dart'; @@ -57,6 +56,7 @@ class DatabaseService { Database database, int oldVersion, int newVersion) async { print('Upgrading database from version $oldVersion to $newVersion...'); if (oldVersion < 2 && newVersion >= 2) { + await database.execute(LicenseConstants.createLicenseTable); await database.execute(LicenseConstants.updatePetsHistoryTrigger); await database.execute(LicenseConstants.updateDisplayTrigger); await database.execute(LicenseConstants.insertDisplayTrigger); diff --git a/lib/main.dart b/lib/main.dart index 9f360bda..b97e09e4 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,3 +1,5 @@ +// ignore_for_file: constant_identifier_names + import 'dart:async'; import 'dart:developer'; import 'dart:io'; diff --git a/lib/pages/preferences_settings_page/preferences_settings_model.dart b/lib/pages/preferences_settings_page/preferences_settings_model.dart index 2f1c903f..6e489b66 100644 --- a/lib/pages/preferences_settings_page/preferences_settings_model.dart +++ b/lib/pages/preferences_settings_page/preferences_settings_model.dart @@ -24,6 +24,9 @@ class PreferencesPageModel with ChangeNotifier { late bool isPanic = false; Future _initialize() async { + log( + 'TESTE:' + '${await StorageHelper().get(LocalsStorageKey.notify.key)}', + ); isFingerprint = await StorageHelper().get(LocalsStorageKey.fingerprint.key) == 'true'; isPerson = await StorageHelper().get(LocalsStorageKey.person.key) == 'true'; @@ -66,8 +69,7 @@ class PreferencesPageModel with ChangeNotifier { .call(notifica: value) .then((value) async { if (value.jsonBody['error'] == false) { - await StorageHelper().set( - LocalsStorageKey.notify.key, isNotify ? 'false' : 'true'); + await StorageHelper().set(LocalsStorageKey.notify.key, !isNotify); content = FFLocalizations.of(context).getVariableText( enText: 'Notification changed successfully', ptText: 'Notificação alterada com sucesso', @@ -147,8 +149,8 @@ class PreferencesPageModel with ChangeNotifier { .then((value) async { final String content; if (jsonDecode(value.jsonBody['error'].toString()) == false) { - await StorageHelper().set( - LocalsStorageKey.access.key, isAccess ? 'false' : 'true'); + await StorageHelper() + .set(LocalsStorageKey.access.key, isAccess ? false : true); notifyListeners(); content = FFLocalizations.of(context).getVariableText( enText: 'Access pass changed successfully', From b22e6815d273789cd2f3a6a5f8c66aabd0eec574 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Thu, 19 Dec 2024 12:46:23 -0300 Subject: [PATCH 10/25] fix labels: provisional history, delivery schedule --- .../history/presentation/pages/provisional_history_page.dart | 2 +- .../delivery_schedule_page/delivery_schedule_widget.dart | 4 +++- .../molecules/menu/presentation/mappers/menu_entry.dart | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/features/history/presentation/pages/provisional_history_page.dart b/lib/features/history/presentation/pages/provisional_history_page.dart index b894f13a..4c810c91 100644 --- a/lib/features/history/presentation/pages/provisional_history_page.dart +++ b/lib/features/history/presentation/pages/provisional_history_page.dart @@ -107,7 +107,7 @@ class ProvisionalHistoryState extends State { Widget _title(BuildContext context, FlutterFlowTheme theme) { return Text( FFLocalizations.of(context).getVariableText( - ptText: 'Histórico Provisório', + ptText: 'Consultar Agendas', enText: 'Provisional History', ), style: theme.headlineMedium.override( diff --git a/lib/pages/delivery_schedule_page/delivery_schedule_widget.dart b/lib/pages/delivery_schedule_page/delivery_schedule_widget.dart index 43872127..46d3c440 100644 --- a/lib/pages/delivery_schedule_page/delivery_schedule_widget.dart +++ b/lib/pages/delivery_schedule_page/delivery_schedule_widget.dart @@ -51,7 +51,9 @@ class _DeliveryScheduleState extends State { ), title: Text( FFLocalizations.of(context).getVariableText( - enText: 'Delivery Schedule', ptText: 'Agendar Entregas'), + enText: 'Delivery Schedule', + ptText: 'Agendar Entregas', + ), style: FlutterFlowTheme.of(context).headlineMedium.override( fontFamily: 'Nunito', color: FlutterFlowTheme.of(context).primaryText, diff --git a/lib/shared/components/molecules/menu/presentation/mappers/menu_entry.dart b/lib/shared/components/molecules/menu/presentation/mappers/menu_entry.dart index 8ef2b2a5..b54ea9d8 100644 --- a/lib/shared/components/molecules/menu/presentation/mappers/menu_entry.dart +++ b/lib/shared/components/molecules/menu/presentation/mappers/menu_entry.dart @@ -35,7 +35,7 @@ class MenuEntry implements BaseModule { key: 'FRE-HUB-AGE-PROV-DELIVERY', icon: Icons.sports_motorsports_outlined, name: FFLocalizations.of(navigatorKey.currentContext!).getVariableText( - ptText: 'Agendar Delivery', + ptText: 'Agendar Entregas', enText: 'Schedule Delivery', ), route: '/deliverySchedule', From 5197ad24085b6629529ae4932699ddea943be555 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Thu, 19 Dec 2024 13:45:20 -0300 Subject: [PATCH 11/25] =?UTF-8?q?Realocar=20posi=C3=A7=C3=A3o=20do=20'Cons?= =?UTF-8?q?ultar=20Agendas'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../menu/presentation/mappers/menu_entry.dart | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/shared/components/molecules/menu/presentation/mappers/menu_entry.dart b/lib/shared/components/molecules/menu/presentation/mappers/menu_entry.dart index b54ea9d8..f7c954a1 100644 --- a/lib/shared/components/molecules/menu/presentation/mappers/menu_entry.dart +++ b/lib/shared/components/molecules/menu/presentation/mappers/menu_entry.dart @@ -61,16 +61,6 @@ class MenuEntry implements BaseModule { route: '/scheduleCompleteVisitPage', types: [MenuEntryType.Home, MenuEntryType.Drawer], ), - MenuEntry( - key: 'FRE-HUB-PROVISIONAL-HISTORY', - icon: Icons.person_search_outlined, - name: FFLocalizations.of(navigatorKey.currentContext!).getVariableText( - ptText: 'Consultar Agendas', - enText: 'Provisional History', - ), - route: '/provisionalHistoryPage', - types: [MenuEntryType.Home, MenuEntryType.Drawer], - ), MenuEntry( key: 'FRE-HUB-RESIDENTS', icon: Icons.groups, @@ -179,6 +169,16 @@ class MenuEntry implements BaseModule { route: '/liberationHistory', types: [MenuEntryType.Home, MenuEntryType.Drawer], ), + MenuEntry( + key: 'FRE-HUB-PROVISIONAL-HISTORY', + icon: Icons.person_search_outlined, + name: FFLocalizations.of(navigatorKey.currentContext!).getVariableText( + ptText: 'Consultar Agendas', + enText: 'Provisional History', + ), + route: '/provisionalHistoryPage', + types: [MenuEntryType.Home, MenuEntryType.Drawer], + ), MenuEntry( key: 'FRE-HUB-MESSAGES', icon: Icons.chat_outlined, From 3cf6fe5e69c5472247bdacd44ffe6266e890f6da Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Thu, 19 Dec 2024 16:55:55 -0300 Subject: [PATCH 12/25] WIP --- .../bottom_arrow_linked_locals_component_widget.dart | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart index 1bebbbef..6dc7b85b 100644 --- a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart +++ b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart @@ -138,8 +138,6 @@ class _BottomArrowLinkedLocalsComponentWidgetState return null; } - static Future _handleError( - BuildContext context, String errorMsg) async { static Future _handleError( BuildContext context, String errorMsg) async { await DialogUtil.error(context, errorMsg); From 74fd22ce271eba684d3694034b411b0574f6ec7d Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Fri, 20 Dec 2024 09:43:51 -0300 Subject: [PATCH 13/25] fix waits and StorageHelper label --- ..._arrow_linked_locals_component_widget.dart | 21 +- .../schedule_visit_detail_model.dart | 10 +- ...p_arrow_linked_locals_component_model.dart | 13 +- ...cation_modal_template_component_model.dart | 10 +- .../change_pass_widget.dart | 3 +- ...item_details_template_component_model.dart | 10 +- .../provisional_schedule_template_model.dart | 16 +- ...siter_vistor_template_component_model.dart | 10 +- .../sign_up_template_component_widget.dart | 5 +- .../view_visit_detail_model.dart | 10 +- ...search_modal_template_component_model.dart | 10 +- lib/features/auth/authentication_service.dart | 31 +- .../backend/api_requests/api_calls.dart | 341 ++++++++++++------ .../blocs/access_history_bloc.dart | 10 +- .../blocs/provisional_history_bloc.dart | 9 +- .../home/presentation/blocs/home_bloc.dart | 14 +- .../locals_local_data_source.dart | 6 +- .../locals_remote_data_source.dart | 27 +- .../repositories/locals_repository_impl.dart | 14 +- .../blocs/local_profile_bloc.dart | 18 +- lib/features/local/utils/local_util.dart | 76 ++-- .../license_local_data_source.dart | 2 +- .../module/domain/entities/license.dart | 6 +- .../notification/deep_link_service.dart | 8 +- .../firebase_messaging_service.dart | 3 +- .../notification/notification_service.dart | 9 +- .../repositories/storage_repository_impl.dart | 9 +- .../services/database_storage_service.dart | 2 +- lib/flutter_flow/nav/nav.dart | 28 +- lib/initialization.dart | 2 +- lib/main.dart | 14 +- .../fast_pass_page/fast_pass_page_widget.dart | 14 +- .../forgot_password_screen.dart | 2 +- .../liberation_history_model.dart | 10 +- .../message_history_page_model.dart | 10 +- .../package_order_page.dart | 3 +- .../pets_history_screen.dart | 20 +- lib/pages/pets_page/pets_page_model.dart | 13 +- .../preferences_settings_model.dart | 47 ++- .../qr_code_page/qr_code_page_model.dart | 6 +- .../qr_code_page/qr_code_page_widget.dart | 2 +- .../reception_page/reception_page_model.dart | 5 +- .../reception_page/reception_page_widget.dart | 2 +- .../reservation_page_widget.dart | 14 +- .../residents_on_the_property_model.dart | 7 +- .../schedule_complete_visit_page_model.dart | 10 +- .../visit_history_page_widget.dart | 30 +- .../sign_in_page/sign_in_page_widget.dart | 2 +- .../sign_up_page/sign_up_page_widget.dart | 2 +- lib/pages/visits_on_the_property/model.dart | 7 +- .../welcome_page/welcome_page_widget.dart | 11 +- lib/shared/utils/share_util.dart | 6 +- 52 files changed, 610 insertions(+), 360 deletions(-) diff --git a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart index 6dc7b85b..2286cc0a 100644 --- a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart +++ b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart @@ -107,13 +107,13 @@ class _BottomArrowLinkedLocalsComponentWidgetState if (isEnabled) { final local = locals[0]; - await StorageHelper() + await StorageRepositoryImpl() .set(ProfileStorageKey.clientName.key, local['CLI_NOME']); - await StorageHelper() + await StorageRepositoryImpl() .set(ProfileStorageKey.ownerName.key, local['CLU_OWNER_DSC']); - await StorageHelper() + await StorageRepositoryImpl() .set(ProfileStorageKey.clientUUID.key, local['CLI_ID']); - await StorageHelper() + await StorageRepositoryImpl() .set(ProfileStorageKey.ownerUUID.key, local['CLU_OWNER_ID']); context.pop(); @@ -145,7 +145,8 @@ class _BottomArrowLinkedLocalsComponentWidgetState Future _fetchResponseLink(String status, String cliID) async { try { - await StorageHelper().set(ProfileStorageKey.clientUUID.key, cliID); + await StorageRepositoryImpl() + .set(ProfileStorageKey.clientUUID.key, cliID); var response = await PhpGroup.resopndeVinculo.call(tarefa: status); if (response.jsonBody['error'] == false) { @@ -156,7 +157,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState enText: "Link Activated Successfully") }; } else { - await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); + await StorageRepositoryImpl().set(ProfileStorageKey.clientUUID.key, ''); return response.jsonBody; } } catch (e, s) { @@ -208,13 +209,13 @@ class _BottomArrowLinkedLocalsComponentWidgetState statusHashMap: [_statusHashMap(local)], onTapCardItemAction: () async { if (local['CLU_STATUS'] == 'A') { - await StorageHelper() + await StorageRepositoryImpl() .set(ProfileStorageKey.clientUUID.key, local['CLI_ID']); - await StorageHelper() + await StorageRepositoryImpl() .set(ProfileStorageKey.clientName.key, local['CLI_NOME']); - await StorageHelper() + await StorageRepositoryImpl() .set(ProfileStorageKey.ownerName.key, local['CLU_OWNER_DSC']); - await StorageHelper() + await StorageRepositoryImpl() .set(ProfileStorageKey.ownerUUID.key, local['CLU_OWNER_ID']); context.pop(true); diff --git a/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart b/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart index 734cb294..a1e4b4bf 100644 --- a/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart +++ b/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart @@ -58,11 +58,15 @@ class ScheduleVisitDetailModel } Future initDB() async { - devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + devUUID = + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; } @override diff --git a/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart index be8b36d1..fd45ad3b 100644 --- a/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart +++ b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart @@ -16,13 +16,18 @@ class UpArrowLinkedLocalsComponentModel } Future initDB() async { - devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + devUUID = + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; cliName = - (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientName.key)) ?? + ''; } @override diff --git a/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart index 03352151..1d872c2d 100644 --- a/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart +++ b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart @@ -32,11 +32,15 @@ class AccessNotificationModalTemplateComponentModel } Future initDB() async { - devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + devUUID = + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; } @override diff --git a/lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart b/lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart index d4938cff..9260e4a7 100644 --- a/lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart +++ b/lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart @@ -49,7 +49,8 @@ class _PassKeyTemplateWidgetState extends State { Future _initialize() async { _accessPass = - await StorageHelper().get(SecureStorageKey.accessPass.value) ?? ''; + await StorageRepositoryImpl().get(SecureStorageKey.accessPass.value) ?? + ''; } @override diff --git a/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_model.dart b/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_model.dart index 0fefa607..21be638e 100644 --- a/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_model.dart +++ b/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_model.dart @@ -27,11 +27,15 @@ class LiberationHistoryItemDetailsTemplateComponentModel void initState(BuildContext context) {} Future initDatabase() async { - devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + devUUID = + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; ; } diff --git a/lib/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart b/lib/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart index c1e82767..9d738419 100644 --- a/lib/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart +++ b/lib/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart @@ -147,15 +147,21 @@ class ScheduleProvisionalVisitPageModel } Future init() async { - devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + devUUID = + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; ownerName = - (await StorageHelper().get(ProfileStorageKey.ownerName.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.ownerName.key)) ?? + ''; ownerUUID = - (await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.ownerUUID.key)) ?? + ''; setState?.call(); } } diff --git a/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_model.dart b/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_model.dart index acff7931..4240befd 100644 --- a/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_model.dart +++ b/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_model.dart @@ -135,11 +135,15 @@ class RegisiterVistorTemplateComponentModel } Future initializeDatabase() async { - devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + devUUID = + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; ; } diff --git a/lib/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart b/lib/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart index 3ad2c626..0b64bf27 100644 --- a/lib/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart +++ b/lib/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart @@ -94,8 +94,9 @@ class _SignUpTemplateComponentWidgetState } Future _initialize() async { - _deviceType = - (await StorageHelper().get(SecureStorageKey.deviceType.value)) ?? ''; + _deviceType = (await StorageRepositoryImpl() + .get(SecureStorageKey.deviceType.value)) ?? + ''; } @override diff --git a/lib/components/templates_components/view_visit_detail/view_visit_detail_model.dart b/lib/components/templates_components/view_visit_detail/view_visit_detail_model.dart index d115ada3..dc92ba8f 100644 --- a/lib/components/templates_components/view_visit_detail/view_visit_detail_model.dart +++ b/lib/components/templates_components/view_visit_detail/view_visit_detail_model.dart @@ -36,11 +36,15 @@ class ViewVisitDetailModel extends FlutterFlowModel { } Future initializeDatabase() async { - devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + devUUID = + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; ; } diff --git a/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart b/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart index 17cc8baf..3d573b22 100644 --- a/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart +++ b/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart @@ -38,11 +38,15 @@ class VisitorSearchModalTemplateComponentModel } Future initDatabase() async { - devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + devUUID = + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; ; } diff --git a/lib/features/auth/authentication_service.dart b/lib/features/auth/authentication_service.dart index 12393545..e427a48d 100644 --- a/lib/features/auth/authentication_service.dart +++ b/lib/features/auth/authentication_service.dart @@ -28,10 +28,12 @@ class AuthenticationService { List locals = response.jsonBody['locais'] ?? []; if (locals.isEmpty) { - await StorageHelper().set(SecureStorageKey.haveLocal.value, false); + await StorageRepositoryImpl() + .set(SecureStorageKey.haveLocal.value, false); context.go('/receptionPage'); } else { - await StorageHelper().set(SecureStorageKey.isLogged.value, true); + await StorageRepositoryImpl() + .set(SecureStorageKey.isLogged.value, true); context .go('/homePage', extra: {'update': LocalsRepositoryImpl().update}); } @@ -51,7 +53,7 @@ class AuthenticationService { final ApiCallResponse? response; final LoginCall callback = PhpGroup.loginCall; String deviceDescription = randomString(10, 10, true, false, false); - await StorageHelper() + await StorageRepositoryImpl() .set(SecureStorageKey.deviceDescription.value, deviceDescription); final String? devUUID; @@ -67,9 +69,11 @@ class AuthenticationService { devUUID = await DeviceUtil.getDevUUID(); if ((email != '') && (passwd != '')) { - await StorageHelper().set(SecureStorageKey.email.value, email); - await StorageHelper().set(SecureStorageKey.password.value, passwd); - await StorageHelper().set(ProfileStorageKey.devUUID.key, devUUID!); + await StorageRepositoryImpl().set(SecureStorageKey.email.value, email); + await StorageRepositoryImpl() + .set(SecureStorageKey.password.value, passwd); + await StorageRepositoryImpl() + .set(ProfileStorageKey.devUUID.key, devUUID!); response = await callback.call(); if (response.jsonBody['error'] == false) { @@ -78,11 +82,14 @@ class AuthenticationService { userDevUUID = response.jsonBody['user']['dev_id']; userName = response.jsonBody['user']['name']; - await StorageHelper().set(ProfileStorageKey.userUUID.key, userUUID); - await StorageHelper() + await StorageRepositoryImpl() + .set(ProfileStorageKey.userUUID.key, userUUID); + await StorageRepositoryImpl() .set(ProfileStorageKey.userDevUUID.key, userDevUUID); - await StorageHelper().set(ProfileStorageKey.status.key, status); - await StorageHelper().set(ProfileStorageKey.userName.key, userName); + await StorageRepositoryImpl() + .set(ProfileStorageKey.status.key, status); + await StorageRepositoryImpl() + .set(ProfileStorageKey.userName.key, userName); await login(context); } else { @@ -149,8 +156,8 @@ class AuthenticationService { ), }; - await StorageHelper().clean(Storage.databaseStorage); - await StorageHelper().clean(Storage.secureStorage); + await StorageRepositoryImpl().clean(Storage.databaseStorage); + await StorageRepositoryImpl().clean(Storage.secureStorage); await LicenseRepositoryImpl().cleanLicense(); DatabaseService.isInitialized = false; await DatabaseService.instance.init(); diff --git a/lib/features/backend/api_requests/api_calls.dart b/lib/features/backend/api_requests/api_calls.dart index b5665bea..24f88aa2 100644 --- a/lib/features/backend/api_requests/api_calls.dart +++ b/lib/features/backend/api_requests/api_calls.dart @@ -70,11 +70,14 @@ class GetProvSchedules { Future call(final String page, final String status) async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'getAgendamentoProv'; const String pageSize = '10'; final bool isFiltered = status != '' && status != '.*'; @@ -108,11 +111,14 @@ class GetOpenedVisits { Future call(final String page) async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'getOpenedVisits'; const String pageSize = '10'; return await ApiManager.instance.makeApiCall( @@ -143,11 +149,12 @@ class GetResidentsByProperty { Future call(final String page) async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? ''; + await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key) ?? ''; final String userUUID = - await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? ''; + await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key) ?? ''; final String cliID = - await StorageHelper().get(ProfileStorageKey.clientUUID.key) ?? ''; + await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key) ?? + ''; const String atividade = 'getResidentsByProperty'; const String pageSize = '10'; return await ApiManager.instance.makeApiCall( @@ -177,11 +184,14 @@ class GetVehiclesByProperty { Future call(final String page) async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'getVehiclesByProperty'; const String pageSize = '10'; return await ApiManager.instance.makeApiCall( @@ -213,11 +223,14 @@ class GetLicense { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; return await ApiManager.instance.makeApiCall( callName: 'getLicense', @@ -247,9 +260,11 @@ class UnregisterDevice { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; return await ApiManager.instance.makeApiCall( callName: 'unregisterDevice', @@ -277,11 +292,14 @@ class DeletePet { Future call({final int? petID = 0}) async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'excluirPet'; return await ApiManager.instance.makeApiCall( @@ -325,11 +343,14 @@ class UpdatePet { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'atualizarPet'; return await ApiManager.instance.makeApiCall( @@ -376,11 +397,14 @@ class GetPets { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'consultaPets'; return await ApiManager.instance.makeApiCall( @@ -413,11 +437,14 @@ class GetPetPhoto { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'consultaFotoPet'; return await ApiManager.instance.makeApiCall( @@ -459,11 +486,14 @@ class RegisterPet { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'cadastrarPet'; return await ApiManager.instance.makeApiCall( @@ -509,11 +539,14 @@ class BuscaEnconcomendas { final String? status, }) async { final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'getEncomendas'; final String baseUrl = PhpGroup.getBaseUrl(); @@ -556,11 +589,14 @@ class CancelaVisita { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'cancelaVisita'; return await ApiManager.instance.makeApiCall( @@ -593,9 +629,11 @@ class CancelaVisita { class DeleteAccount { Future call() async { final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String baseUrl = PhpGroup.getBaseUrl(); return await ApiManager.instance.makeApiCall( @@ -627,11 +665,14 @@ class ChangePanic { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'updVisitado'; return await ApiManager.instance.makeApiCall( @@ -666,11 +707,14 @@ class ChangePass { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'updVisitado'; return await ApiManager.instance.makeApiCall( @@ -705,11 +749,14 @@ class RespondeVinculo { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; return await ApiManager.instance.makeApiCall( callName: 'respondeVinculo', @@ -742,11 +789,14 @@ class ChangeNotifica { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'updVisitado'; return await ApiManager.instance.makeApiCall( @@ -779,13 +829,17 @@ class UpdateIDE { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; - final String newIde = - (await StorageHelper().get(ProfileStorageKey.userDevUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; + final String newIde = (await StorageRepositoryImpl() + .get(ProfileStorageKey.userDevUUID.key)) ?? + ''; const String atividade = 'updVisitado'; return await ApiManager.instance.makeApiCall( @@ -818,11 +872,13 @@ class UpdToken { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String token = - (await StorageHelper().get(SecureStorageKey.token.value)) ?? ''; + (await StorageRepositoryImpl().get(SecureStorageKey.token.value)) ?? ''; return await ApiManager.instance.makeApiCall( callName: 'updToken', @@ -850,16 +906,19 @@ class LoginCall { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final String email = - (await StorageHelper().get(SecureStorageKey.email.value)) ?? ''; - final String password = - (await StorageHelper().get(SecureStorageKey.password.value)) ?? ''; - final String type = - (await StorageHelper().get(SecureStorageKey.deviceType.value)) ?? ''; - final String description = - (await StorageHelper().get(SecureStorageKey.deviceDescription.value)) ?? + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? ''; + final String email = + (await StorageRepositoryImpl().get(SecureStorageKey.email.value)) ?? ''; + final String password = + (await StorageRepositoryImpl().get(SecureStorageKey.password.value)) ?? + ''; + final String type = (await StorageRepositoryImpl() + .get(SecureStorageKey.deviceType.value)) ?? + ''; + final String description = (await StorageRepositoryImpl() + .get(SecureStorageKey.deviceDescription.value)) ?? + ''; late final String token; try { token = await FirebaseMessagingService.getToken(); @@ -943,11 +1002,14 @@ class ChangePasswordCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; return await ApiManager.instance.makeApiCall( callName: 'changePassword', @@ -1007,9 +1069,9 @@ class GetLocalsCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? ''; + await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key) ?? ''; final String userUUID = - await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? ''; + await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key) ?? ''; return await ApiManager.instance .makeApiCall( @@ -1051,11 +1113,14 @@ class PostScheduleVisitorCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'putVisitante'; return await ApiManager.instance.makeApiCall( @@ -1109,11 +1174,14 @@ class PostScheduleVisitCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'putVisita'; return await ApiManager.instance.makeApiCall( @@ -1166,11 +1234,14 @@ class GetScheduleVisitCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'getVisitas'; return await ApiManager.instance.makeApiCall( @@ -1443,11 +1514,14 @@ class GetDadosCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'getDados'; return await ApiManager.instance @@ -1691,11 +1765,14 @@ class GetVisitorByDocCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'getVisitante'; return await ApiManager.instance.makeApiCall( @@ -1748,11 +1825,14 @@ class GetFotoVisitanteCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'getFotoVisitante'; return await ApiManager.instance.makeApiCall( @@ -1790,11 +1870,14 @@ class PostProvVisitSchedulingCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'putAgendamentoProv'; return await ApiManager.instance.makeApiCall( @@ -1842,11 +1925,14 @@ class GetVisitsCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'getVisitas'; return await ApiManager.instance.makeApiCall( @@ -2108,11 +2194,14 @@ class DeleteVisitCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'cancelaVisita'; return await ApiManager.instance.makeApiCall( @@ -2154,13 +2243,17 @@ class GetPessoasLocalCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String ownerUUID = - (await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.ownerUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; return await ApiManager.instance.makeApiCall( callName: 'getPessoasLocal', @@ -2224,11 +2317,14 @@ class RespondeSolicitacaoCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'respondeSolicitacao'; return await ApiManager.instance.makeApiCall( @@ -2277,11 +2373,14 @@ class GetAccessCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'getAcessos'; return await ApiManager.instance.makeApiCall( @@ -2529,11 +2628,14 @@ class GetLiberationsCall { Future.microtask(() async { final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final String cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; + final String cliUUID = (await StorageRepositoryImpl() + .get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'getSolicitacoes'; try { @@ -2724,11 +2826,14 @@ class GetMessagesCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final String userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final String cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const String atividade = 'getMensagens'; return await ApiManager.instance.makeApiCall( diff --git a/lib/features/history/presentation/blocs/access_history_bloc.dart b/lib/features/history/presentation/blocs/access_history_bloc.dart index 9e5bd113..a1f193ff 100644 --- a/lib/features/history/presentation/blocs/access_history_bloc.dart +++ b/lib/features/history/presentation/blocs/access_history_bloc.dart @@ -32,11 +32,15 @@ class AcessHistoryPageModel extends FlutterFlowModel { } Future initDatabase() async { - devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + devUUID = + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; } @override diff --git a/lib/features/history/presentation/blocs/provisional_history_bloc.dart b/lib/features/history/presentation/blocs/provisional_history_bloc.dart index 3c6b0d9e..67e5d0c1 100644 --- a/lib/features/history/presentation/blocs/provisional_history_bloc.dart +++ b/lib/features/history/presentation/blocs/provisional_history_bloc.dart @@ -47,11 +47,14 @@ class ProvisionalHistoryBloc ) async { emit(state.copyWith(isLoading: true)); final devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; emit(state.copyWith( devUUID: devUUID, userUUID: userUUID, diff --git a/lib/features/home/presentation/blocs/home_bloc.dart b/lib/features/home/presentation/blocs/home_bloc.dart index c7b69418..9a12e337 100644 --- a/lib/features/home/presentation/blocs/home_bloc.dart +++ b/lib/features/home/presentation/blocs/home_bloc.dart @@ -18,15 +18,19 @@ class HomeBloc extends Bloc { Future _onHomeEvent(HomeEvent event, Emitter emit) async { final devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; final userName = - (await StorageHelper().get(ProfileStorageKey.userName.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userName.key)) ?? + ''; final userEmail = - (await StorageHelper().get(SecureStorageKey.email.value)) ?? ''; + (await StorageRepositoryImpl().get(SecureStorageKey.email.value)) ?? ''; emit(state.copyWith( devUUID: devUUID, diff --git a/lib/features/local/data/data_sources/locals_local_data_source.dart b/lib/features/local/data/data_sources/locals_local_data_source.dart index cac9e924..660ce5ac 100644 --- a/lib/features/local/data/data_sources/locals_local_data_source.dart +++ b/lib/features/local/data/data_sources/locals_local_data_source.dart @@ -24,7 +24,7 @@ class LocalsLocalDataSourceImpl implements LocalsLocalDataSource { @override Future get(String key) async { final String? local = - await StorageHelper().get(ProfileStorageKey.clientUUID.key); + await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key); var response = await DatabaseService.database.query( LocalsConstants.tableLocalsKeychain, where: 'key = ? AND local = ?', @@ -40,7 +40,7 @@ class LocalsLocalDataSourceImpl implements LocalsLocalDataSource { try { var date = DateTime.now().toIso8601String(); final String? local = - await StorageHelper().get(ProfileStorageKey.clientUUID.key); + await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key); await DatabaseService.database.insert( LocalsConstants.tableLocalsKeychain, @@ -61,7 +61,7 @@ class LocalsLocalDataSourceImpl implements LocalsLocalDataSource { @override Future delete(String key) async { final String? local = - await StorageHelper().get(ProfileStorageKey.clientUUID.key); + await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key); await DatabaseService.database.delete(LocalsConstants.tableLocalsKeychain, where: 'key = ? AND local = ?', whereArgs: [key, local]); } diff --git a/lib/features/local/data/data_sources/locals_remote_data_source.dart b/lib/features/local/data/data_sources/locals_remote_data_source.dart index bf4b710b..a8b2233f 100644 --- a/lib/features/local/data/data_sources/locals_remote_data_source.dart +++ b/lib/features/local/data/data_sources/locals_remote_data_source.dart @@ -56,12 +56,14 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { final bool isEnable = !isEmpty && isActive; if (isEnable) { - await StorageHelper().set(SecureStorageKey.haveLocal.value, true); - await StorageHelper().set(SecureStorageKey.isLogged.value, true); + await StorageRepositoryImpl() + .set(SecureStorageKey.haveLocal.value, true); + await StorageRepositoryImpl() + .set(SecureStorageKey.isLogged.value, true); await WidgetsBinding.instance.endOfFrame; - await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); - await StorageHelper().set(ProfileStorageKey.ownerUUID.key, ''); - StorageHelper().context?.go('/homePage'); + await StorageRepositoryImpl().set(ProfileStorageKey.clientUUID.key, ''); + await StorageRepositoryImpl().set(ProfileStorageKey.ownerUUID.key, ''); + StorageRepositoryImpl().context?.go('/homePage'); } } catch (e, s) { log(e.toString(), stackTrace: s); @@ -146,9 +148,11 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { @override Future checkLocals(BuildContext context) async { String cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; String cliName = - (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientName.key)) ?? + ''; return cliUUID.isEmpty && cliName.isEmpty; } @@ -223,9 +227,12 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { final bool status = await PhpGroup.resopndeVinculo.call(tarefa: 'I').then((value) async { if (value.jsonBody['error'] == false) { - await StorageHelper().set(ProfileStorageKey.clientName.key, ''); - await StorageHelper().set(ProfileStorageKey.ownerName.key, ''); - await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); + await StorageRepositoryImpl() + .set(ProfileStorageKey.clientName.key, ''); + await StorageRepositoryImpl() + .set(ProfileStorageKey.ownerName.key, ''); + await StorageRepositoryImpl() + .set(ProfileStorageKey.clientUUID.key, ''); context.pop(); context.go('/homePage', extra: {'update': LocalsRepositoryImpl().update}); diff --git a/lib/features/local/data/repositories/locals_repository_impl.dart b/lib/features/local/data/repositories/locals_repository_impl.dart index 2dd08bf2..5c5fd0a6 100644 --- a/lib/features/local/data/repositories/locals_repository_impl.dart +++ b/lib/features/local/data/repositories/locals_repository_impl.dart @@ -38,16 +38,16 @@ class LocalsRepositoryImpl implements LocalsRepository { } Future unselect() async { - await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); - await StorageHelper().set(ProfileStorageKey.clientName.key, ''); - await StorageHelper().set(ProfileStorageKey.ownerName.key, ''); + await StorageRepositoryImpl().set(ProfileStorageKey.clientUUID.key, ''); + await StorageRepositoryImpl().set(ProfileStorageKey.clientName.key, ''); + await StorageRepositoryImpl().set(ProfileStorageKey.ownerName.key, ''); } Future check(BuildContext context) async { final String? cliUUID = - await StorageHelper().get(ProfileStorageKey.clientUUID.key); + await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key); final String? ownerUUID = - await StorageHelper().get(ProfileStorageKey.ownerUUID.key); + await StorageRepositoryImpl().get(ProfileStorageKey.ownerUUID.key); final bool haveCli = cliUUID != null && cliUUID.isNotEmpty; final bool haveOwner = ownerUUID != null && ownerUUID.isNotEmpty; if (!haveCli && !haveOwner) { @@ -78,7 +78,7 @@ class LocalsRepositoryImpl implements LocalsRepository { } Future _handleUpdateError(BuildContext context) async { - await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); + await StorageRepositoryImpl().set(ProfileStorageKey.clientUUID.key, ''); const String errorMsg = 'Erro ao atualizar locais'; await DialogUtil.error(context, errorMsg); } @@ -92,7 +92,7 @@ class LocalsRepositoryImpl implements LocalsRepository { Future unlinkLocal(BuildContext context) async { final bool response = await remoteDataSource.detachLocal(context); if (!response) return; - unselect(); + await unselect(); context.pop(); context.go('/homePage', extra: {'update': update}); await update(context); diff --git a/lib/features/local/presentation/blocs/local_profile_bloc.dart b/lib/features/local/presentation/blocs/local_profile_bloc.dart index bca9c819..3bce66d6 100644 --- a/lib/features/local/presentation/blocs/local_profile_bloc.dart +++ b/lib/features/local/presentation/blocs/local_profile_bloc.dart @@ -41,11 +41,14 @@ class LocalProfileBloc extends Bloc { Future _onLocalProfileEvent( LocalProfileEvent event, Emitter emit) async { final cliName = - (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientName.key)) ?? + ''; final ownerName = - (await StorageHelper().get(ProfileStorageKey.ownerName.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.ownerName.key)) ?? + ''; final cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; emit(state.copyWith( cliName: cliName, cliUUID: cliUUID, ownerName: ownerName)); } @@ -72,11 +75,14 @@ class LocalProfileComponentModel Future getData() async { cliName = - (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientName.key)) ?? + ''; ownerName = - (await StorageHelper().get(ProfileStorageKey.ownerName.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.ownerName.key)) ?? + ''; cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; setStateCallback?.call(); } diff --git a/lib/features/local/utils/local_util.dart b/lib/features/local/utils/local_util.dart index 202e911a..c7ab1664 100644 --- a/lib/features/local/utils/local_util.dart +++ b/lib/features/local/utils/local_util.dart @@ -12,9 +12,9 @@ import 'package:hub/shared/utils/log_util.dart'; class LocalUtil { static void handleError(BuildContext context, String errorMsg) async { final String devUUID = - await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? ''; + await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key) ?? ''; final String userUUID = - await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? ''; + await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key) ?? ''; final bool isAuthenticated = userUUID.isNotEmpty && devUUID.isNotEmpty; final bool isDevLinked = !errorMsg.contains('Esse dispositivo nao pertence a esse usuario'); @@ -43,21 +43,21 @@ class LocalUtil { BuildContext context, List locals) async { log('() => isUnavailable'); try { - await StorageHelper() + await StorageRepositoryImpl() .set(ProfileStorageKey.clientUUID.key, locals[0]['CLI_ID']); - await StorageHelper() + await StorageRepositoryImpl() .set(ProfileStorageKey.ownerUUID.key, locals[0]['CLU_OWNER_ID']); - await StorageHelper() + await StorageRepositoryImpl() .set(ProfileStorageKey.clientName.key, locals[0]['CLI_NOME']); - await StorageHelper() + await StorageRepositoryImpl() .set(ProfileStorageKey.ownerName.key, locals[0]['CLU_OWNER_DSC']); var response = await PhpGroup.resopndeVinculo.call(tarefa: 'A'); if (response.jsonBody['error'] == true) { - await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); - await StorageHelper().set(ProfileStorageKey.ownerUUID.key, ''); - await StorageHelper().set(ProfileStorageKey.clientName.key, ''); - await StorageHelper().set(ProfileStorageKey.ownerName.key, ''); + await StorageRepositoryImpl().set(ProfileStorageKey.clientUUID.key, ''); + await StorageRepositoryImpl().set(ProfileStorageKey.ownerUUID.key, ''); + await StorageRepositoryImpl().set(ProfileStorageKey.clientName.key, ''); + await StorageRepositoryImpl().set(ProfileStorageKey.ownerName.key, ''); return false; } @@ -76,15 +76,15 @@ class LocalUtil { static Future handleEnabled(BuildContext context, dynamic local) async { log('() => isEnabled'); - await StorageHelper() + await StorageRepositoryImpl() .set(ProfileStorageKey.clientUUID.key, local['CLI_ID']); - await StorageHelper() + await StorageRepositoryImpl() .set(ProfileStorageKey.ownerUUID.key, local['CLU_OWNER_ID']); - await StorageHelper() + await StorageRepositoryImpl() .set(ProfileStorageKey.clientName.key, local['CLI_NOME']); - await StorageHelper() + await StorageRepositoryImpl() .set(ProfileStorageKey.ownerName.key, local['CLU_OWNER_DSC']); - await StorageHelper() + await StorageRepositoryImpl() .set(ProfileStorageKey.userName.key, local['USU_NOME']); return await LocalsRemoteDataSourceImpl().processData(context); } @@ -106,45 +106,45 @@ class LocalUtil { static Future updateStorageUtil(Map jsonBody) async { try { - await StorageHelper() + await StorageRepositoryImpl() .set(LocalsStorageKey.whatsapp.key, jsonBody['whatsapp'] ?? false); - await StorageHelper().set( + await StorageRepositoryImpl().set( LocalsStorageKey.provisional.key, jsonBody['provisional'] ?? false); - await StorageHelper().set( + await StorageRepositoryImpl().set( LocalsStorageKey.pets.key, jsonBody['pet'] ?? false, ); - await StorageHelper().set( + await StorageRepositoryImpl().set( LocalsStorageKey.notify.key, _processSystemOption( jsonBody['visitado']['VDO_NOTTERCEIROS'], ), ); if (jsonBody['visitado']['VDO_TEM_SENHA_ACESSO'] == '') { - await StorageHelper().set( + await StorageRepositoryImpl().set( LocalsStorageKey.access.key, _processSystemOption(jsonBody['visitado']['VDO_TEM_SENHA_ACESSO']), ); - await StorageHelper().set( + await StorageRepositoryImpl().set( LocalsStorageKey.panic.key, _processSystemOption(jsonBody['visitado']['VDO_TEM_SENHA_PANICO']), ); } - await StorageHelper().set( + await StorageRepositoryImpl().set( LocalsStorageKey.petAmount.key, jsonBody['petAmountRegister']?.toString().isEmpty ?? true ? '0' : jsonBody['petAmountRegister'].toString()); - await StorageHelper().set(ProfileStorageKey.userName.key, + await StorageRepositoryImpl().set(ProfileStorageKey.userName.key, jsonBody['visitado']['VDO_NOME'] ?? ''); - await StorageHelper().set(ProfileStorageKey.userEmail.key, + await StorageRepositoryImpl().set(ProfileStorageKey.userEmail.key, jsonBody['visitado']['VDO_EMAIL'] ?? ''); - await StorageHelper().set( + await StorageRepositoryImpl().set( LocalsStorageKey.provisional.key, jsonBody['provisional'] ?? false); final bool isNewVersion = jsonBody['newVersion'] ?? false; - await StorageHelper() + await StorageRepositoryImpl() .set(LocalsStorageKey.isNewVersion.key, isNewVersion); return isNewVersion; } catch (e, s) { @@ -159,7 +159,8 @@ class LocalUtil { static Future isInactived(List locals) async { String cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; return locals .where( (local) => local['CLI_ID'] != cliUUID && local['CLU_STATUS'] == 'A') @@ -175,27 +176,34 @@ class LocalUtil { static Future isUnselected() async { String cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; String cliName = - (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientName.key)) ?? + ''; String ownerUUID = - (await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.ownerUUID.key)) ?? + ''; return cliUUID.isEmpty && cliName.isEmpty && ownerUUID.isEmpty; } static Future isSelected(bool isInactived) async { String cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; String cliName = - (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientName.key)) ?? + ''; return cliUUID.isNotEmpty && cliName.isNotEmpty && isInactived; } static Future isAvailable() async { String cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; String cliName = - (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientName.key)) ?? + ''; return cliUUID.isNotEmpty && cliName.isNotEmpty; } } diff --git a/lib/features/module/data/data_sources/license_local_data_source.dart b/lib/features/module/data/data_sources/license_local_data_source.dart index 25251b41..f6b7266c 100644 --- a/lib/features/module/data/data_sources/license_local_data_source.dart +++ b/lib/features/module/data/data_sources/license_local_data_source.dart @@ -41,7 +41,7 @@ class LicenseLocalDataSourceImpl implements LicenseLocalDataSource { @override Future isNewVersion() async { final String? reponse = - await StorageHelper().get(LocalsStorageKey.isNewVersion.key); + await StorageRepositoryImpl().get(LocalsStorageKey.isNewVersion.key); final bool isNewVersion = reponse.toBoolean(); return isNewVersion; } diff --git a/lib/features/module/domain/entities/license.dart b/lib/features/module/domain/entities/license.dart index 17a70650..5a6e74f5 100644 --- a/lib/features/module/domain/entities/license.dart +++ b/lib/features/module/domain/entities/license.dart @@ -60,7 +60,7 @@ class License { } static Future _precessWpp() async { - final bool whatsapp = await StorageHelper() + final bool whatsapp = await StorageRepositoryImpl() .get(LocalsStorageKey.whatsapp.key) .then((v) => v.toBoolean()); if (whatsapp) @@ -70,7 +70,7 @@ class License { } static Future _processProvisional() async { - final bool provisional = await StorageHelper() + final bool provisional = await StorageRepositoryImpl() .get(LocalsStorageKey.provisional.key) .then((v) => v.toBoolean()); if (provisional) @@ -80,7 +80,7 @@ class License { } static Future _processPets() async { - final bool pets = await StorageHelper() + final bool pets = await StorageRepositoryImpl() .get(LocalsStorageKey.pets.key) .then((v) => v.toBoolean()); if (pets) diff --git a/lib/features/notification/deep_link_service.dart b/lib/features/notification/deep_link_service.dart index f7aa1ac0..fdfc4512 100644 --- a/lib/features/notification/deep_link_service.dart +++ b/lib/features/notification/deep_link_service.dart @@ -24,7 +24,7 @@ class DeepLinkService { _appLinks = AppLinks(); print('initDeepLinks'); _linkSubscription = _appLinks.uriLinkStream.listen((uri) async { - if (!StorageHelper().isRecovered) { + if (!StorageRepositoryImpl().isRecovered) { await _handleDeepLink(uri); } }); @@ -37,9 +37,9 @@ class DeepLinkService { Future _handleDeepLink(Uri uri) async { try { print('Handling deep link: $uri'); - if (StorageHelper().isRecovered) return; + if (StorageRepositoryImpl().isRecovered) return; - StorageHelper().isRecovered = true; + StorageRepositoryImpl().isRecovered = true; final email = uri.queryParameters['email'] ?? ''; final token = uri.queryParameters['token'] ?? ''; print('email: $email, token: $token'); @@ -68,7 +68,7 @@ class DeepLinkService { useSafeArea: true, enableDrag: true, ).whenComplete(() { - StorageHelper().isRecovered = false; + StorageRepositoryImpl().isRecovered = false; print('showModalBottomSheet completed'); }); }); diff --git a/lib/features/notification/firebase_messaging_service.dart b/lib/features/notification/firebase_messaging_service.dart index 68fc300a..f753900a 100644 --- a/lib/features/notification/firebase_messaging_service.dart +++ b/lib/features/notification/firebase_messaging_service.dart @@ -45,7 +45,8 @@ class FirebaseMessagingService { final String? deviceToken = await _firebaseMessaging.getToken(); if (deviceToken != null) { - await StorageHelper().set(SecureStorageKey.token.value, deviceToken); + await StorageRepositoryImpl() + .set(SecureStorageKey.token.value, deviceToken); final ApiCallResponse? response; response = await PhpGroup.updToken.call(); diff --git a/lib/features/notification/notification_service.dart b/lib/features/notification/notification_service.dart index 8e1662d6..f6077087 100644 --- a/lib/features/notification/notification_service.dart +++ b/lib/features/notification/notification_service.dart @@ -16,7 +16,8 @@ Future onMessageReceived( final localId = jsonDecode(payload['local']!)['CLI_ID']; final cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; answersRequest( {required BuildContext context, @@ -251,7 +252,7 @@ Future onMessageReceived( break; case 'enroll_cond': - await StorageHelper().set(SecureStorageKey.haveLocal.value, true); + await StorageRepositoryImpl().set(SecureStorageKey.haveLocal.value, true); navigatorKey.currentContext!.go('/homePage'); break; default: @@ -288,13 +289,13 @@ class NotificationService { await AwesomeNotifications() .isNotificationAllowed() .then((isAllowed) async { - final bool requestOSnotification = (await StorageHelper() + final bool requestOSnotification = (await StorageRepositoryImpl() .get(LocalsStorageKey.requestOSNotification.key)) == 'true'; if (requestOSnotification == false) { if (isAllowed == false) { - await StorageHelper() + await StorageRepositoryImpl() .set(LocalsStorageKey.requestOSNotification.key, true); await AwesomeNotifications().requestPermissionToSendNotifications(); } diff --git a/lib/features/storage/repositories/storage_repository_impl.dart b/lib/features/storage/repositories/storage_repository_impl.dart index 30f3fd0d..62c06253 100644 --- a/lib/features/storage/repositories/storage_repository_impl.dart +++ b/lib/features/storage/repositories/storage_repository_impl.dart @@ -4,10 +4,11 @@ import 'package:flutter/cupertino.dart'; import 'package:hub/features/profile/data/data_sources/profile_local_data_source.dart'; import 'package:hub/features/storage/index.dart'; -class StorageHelper implements StorageRepository { - static final StorageHelper _instance = StorageHelper._internal(); - factory StorageHelper() => _instance; - StorageHelper._internal(); +class StorageRepositoryImpl implements StorageRepository { + static final StorageRepositoryImpl _instance = + StorageRepositoryImpl._internal(); + factory StorageRepositoryImpl() => _instance; + StorageRepositoryImpl._internal(); late BuildContext? _context; BuildContext? get context => _context; diff --git a/lib/features/storage/services/database_storage_service.dart b/lib/features/storage/services/database_storage_service.dart index 1e7dade9..082a3e7d 100644 --- a/lib/features/storage/services/database_storage_service.dart +++ b/lib/features/storage/services/database_storage_service.dart @@ -49,7 +49,7 @@ class DatabaseService { Future _onCreate(Database database, int version) async { print('Creating database...'); await database.execute(createKeychainTable); - _onUpgrade(database, 1, _dbVersion); + await _onUpgrade(database, 1, _dbVersion); } Future _onUpgrade( diff --git a/lib/flutter_flow/nav/nav.dart b/lib/flutter_flow/nav/nav.dart index 007b1dda..dd644f4f 100644 --- a/lib/flutter_flow/nav/nav.dart +++ b/lib/flutter_flow/nav/nav.dart @@ -86,20 +86,20 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { builder: (context, _) { return FutureBuilder( future: () async { - final bool isLogged = - await StorageHelper().get(SecureStorageKey.isLogged.value) == - 'true'; - final bool haveLocal = - await StorageHelper().get(SecureStorageKey.haveLocal.value) == - 'true'; - final bool haveUserUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) - ?.isNotEmpty ?? - false; - final bool haveDevUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) - ?.isNotEmpty ?? - false; + final bool isLogged = await StorageRepositoryImpl() + .get(SecureStorageKey.isLogged.value) == + 'true'; + final bool haveLocal = await StorageRepositoryImpl() + .get(SecureStorageKey.haveLocal.value) == + 'true'; + final bool haveUserUUID = (await StorageRepositoryImpl() + .get(ProfileStorageKey.userUUID.key)) + ?.isNotEmpty ?? + false; + final bool haveDevUUID = (await StorageRepositoryImpl() + .get(ProfileStorageKey.devUUID.key)) + ?.isNotEmpty ?? + false; if (isLogged && haveDevUUID && haveUserUUID) { return haveLocal diff --git a/lib/initialization.dart b/lib/initialization.dart index 27bdc509..d8458100 100644 --- a/lib/initialization.dart +++ b/lib/initialization.dart @@ -16,7 +16,7 @@ import 'package:hub/flutter_flow/nav/nav.dart'; Future initializeApp() async { WidgetsFlutterBinding.ensureInitialized(); await _initializeTracking(); - await StorageHelper().init(); + await StorageRepositoryImpl().init(); await _initializeFirebase(); await _initializeNotificationService(); diff --git a/lib/main.dart b/lib/main.dart index b97e09e4..d0ed8268 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -29,8 +29,8 @@ void main() async { Future _foregroundHandlerMessage(RemoteMessage message) async { if (message.data['click_action'] == 'enroll_cond') { - await StorageHelper().set(SecureStorageKey.haveLocal.value, true); - StorageHelper().context?.go('/homePage'); + await StorageRepositoryImpl().set(SecureStorageKey.haveLocal.value, true); + StorageRepositoryImpl().context?.go('/homePage'); } if (!Platform.isIOS) { @@ -43,8 +43,8 @@ Future _foregroundHandlerMessage(RemoteMessage message) async { Future _backgroundHandlerMessage(RemoteMessage message) async { if (message.data['click_action'] == 'enroll_cond') { - await StorageHelper().set(SecureStorageKey.haveLocal.value, true); - StorageHelper().context?.go('/homePage'); + await StorageRepositoryImpl().set(SecureStorageKey.haveLocal.value, true); + StorageRepositoryImpl().context?.go('/homePage'); } } @@ -137,7 +137,8 @@ class _AppState extends State { FirebaseMessaging.onMessage.listen(_foregroundHandlerMessage); FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) async { if (message.data['click_action'] == 'enroll_cond') { - await StorageHelper().set(SecureStorageKey.haveLocal.value, true); + await StorageRepositoryImpl() + .set(SecureStorageKey.haveLocal.value, true); log('onMessageOpenedApp'); } else { onMessageReceived(message.data, message.notification!.body, @@ -147,7 +148,8 @@ class _AppState extends State { FirebaseMessaging.instance.getInitialMessage().then((message) async { if (message != null) { if (message.data['click_action'] == 'enroll_cond') { - await StorageHelper().set(SecureStorageKey.haveLocal.value, true); + await StorageRepositoryImpl() + .set(SecureStorageKey.haveLocal.value, true); log('getInitialMessage'); } } diff --git a/lib/pages/fast_pass_page/fast_pass_page_widget.dart b/lib/pages/fast_pass_page/fast_pass_page_widget.dart index 6cc9a845..7005069f 100644 --- a/lib/pages/fast_pass_page/fast_pass_page_widget.dart +++ b/lib/pages/fast_pass_page/fast_pass_page_widget.dart @@ -25,15 +25,19 @@ class _FastPassPageWidgetState extends State { Future> initVariables() async { final email = - (await StorageHelper().get(SecureStorageKey.email.value)) ?? ''; + (await StorageRepositoryImpl().get(SecureStorageKey.email.value)) ?? ''; final name = - (await StorageHelper().get(ProfileStorageKey.userName.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userName.key)) ?? + ''; final devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const createdAt = '0000-00-00 00:00:00'; final url = 'https://hub.freaccess.com.br/hub/fast-pass/$cliUUID'; final freUserData = diff --git a/lib/pages/forgot_password_page/forgot_password_screen.dart b/lib/pages/forgot_password_page/forgot_password_screen.dart index bf737647..9c86037b 100644 --- a/lib/pages/forgot_password_page/forgot_password_screen.dart +++ b/lib/pages/forgot_password_page/forgot_password_screen.dart @@ -112,7 +112,7 @@ class _ForgotPasswordScreenState extends State ), onPressed: () async { context.pop(); - StorageHelper().isRecovered = false; + StorageRepositoryImpl().isRecovered = false; }, ), title: Text( diff --git a/lib/pages/liberation_history/liberation_history_model.dart b/lib/pages/liberation_history/liberation_history_model.dart index dc93f26b..dd6dca6b 100644 --- a/lib/pages/liberation_history/liberation_history_model.dart +++ b/lib/pages/liberation_history/liberation_history_model.dart @@ -36,11 +36,15 @@ class LiberationHistoryModel extends FlutterFlowModel { } Future init() async { - devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + devUUID = + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; } Future answersRequest( diff --git a/lib/pages/message_history_page/message_history_page_model.dart b/lib/pages/message_history_page/message_history_page_model.dart index 68efb77d..9152fe73 100644 --- a/lib/pages/message_history_page/message_history_page_model.dart +++ b/lib/pages/message_history_page/message_history_page_model.dart @@ -41,11 +41,15 @@ class MessageHistoryPageModel } Future init() async { - devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + devUUID = + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; } @override diff --git a/lib/pages/package_order_page/package_order_page.dart b/lib/pages/package_order_page/package_order_page.dart index 8bbbd340..04efe6ee 100644 --- a/lib/pages/package_order_page/package_order_page.dart +++ b/lib/pages/package_order_page/package_order_page.dart @@ -66,7 +66,8 @@ class _PackageOrderPage extends State { Future initDatabase() async { cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key) ?? ''); + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key) ?? + ''); } @override diff --git a/lib/pages/pets_on_the_property_page/pets_history_screen.dart b/lib/pages/pets_on_the_property_page/pets_history_screen.dart index 98ad75cb..81166b5c 100644 --- a/lib/pages/pets_on_the_property_page/pets_history_screen.dart +++ b/lib/pages/pets_on_the_property_page/pets_history_screen.dart @@ -308,14 +308,18 @@ class _PetsHistoryScreenState extends State } ], onTapCardItemAction: () async { - final devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; - final cliName = - (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + final devUUID = (await StorageRepositoryImpl() + .get(ProfileStorageKey.devUUID.key)) ?? + ''; + final userUUID = (await StorageRepositoryImpl() + .get(ProfileStorageKey.userUUID.key)) ?? + ''; + final cliUUID = (await StorageRepositoryImpl() + .get(ProfileStorageKey.clientUUID.key)) ?? + ''; + final cliName = (await StorageRepositoryImpl() + .get(ProfileStorageKey.clientName.key)) ?? + ''; await showDialog( useSafeArea: true, context: context, diff --git a/lib/pages/pets_page/pets_page_model.dart b/lib/pages/pets_page/pets_page_model.dart index c8473787..1407a649 100644 --- a/lib/pages/pets_page/pets_page_model.dart +++ b/lib/pages/pets_page/pets_page_model.dart @@ -149,13 +149,18 @@ class PetsPageModel extends FlutterFlowModel { textControllerObservation = TextEditingController(); WidgetsBinding.instance.addPostFrameCallback((_) async { - devUUID = await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? ''; + devUUID = + await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key) ?? + ''; userUUID = - await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? ''; + await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key) ?? + ''; cliUUID = - await StorageHelper().get(ProfileStorageKey.clientUUID.key) ?? ''; + await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key) ?? + ''; petAmountRegister = - await StorageHelper().get(LocalsStorageKey.petAmount.key) ?? ''; + await StorageRepositoryImpl().get(LocalsStorageKey.petAmount.key) ?? + ''; }); } diff --git a/lib/pages/preferences_settings_page/preferences_settings_model.dart b/lib/pages/preferences_settings_page/preferences_settings_model.dart index 80925889..fa844ec9 100644 --- a/lib/pages/preferences_settings_page/preferences_settings_model.dart +++ b/lib/pages/preferences_settings_page/preferences_settings_model.dart @@ -23,11 +23,16 @@ class PreferencesPageModel with ChangeNotifier { Future _initialize() async { isFingerprint = - await StorageHelper().get(LocalsStorageKey.fingerprint.key) == 'true'; - isPerson = await StorageHelper().get(LocalsStorageKey.person.key) == 'true'; - isNotify = await StorageHelper().get(LocalsStorageKey.notify.key) == 'true'; - isAccess = await StorageHelper().get(LocalsStorageKey.access.key) == 'true'; - isPanic = await StorageHelper().get(LocalsStorageKey.panic.key) == 'true'; + await StorageRepositoryImpl().get(LocalsStorageKey.fingerprint.key) == + 'true'; + isPerson = await StorageRepositoryImpl().get(LocalsStorageKey.person.key) == + 'true'; + isNotify = await StorageRepositoryImpl().get(LocalsStorageKey.notify.key) == + 'true'; + isAccess = await StorageRepositoryImpl().get(LocalsStorageKey.access.key) == + 'true'; + isPanic = + await StorageRepositoryImpl().get(LocalsStorageKey.panic.key) == 'true'; notifyListeners(); } @@ -36,8 +41,9 @@ class PreferencesPageModel with ChangeNotifier { } Future enablePerson(BuildContext context) async { - final String userDevUUID = - (await StorageHelper().get(ProfileStorageKey.userDevUUID.key)) ?? ''; + final String userDevUUID = (await StorageRepositoryImpl() + .get(ProfileStorageKey.userDevUUID.key)) ?? + ''; notifyListeners(); Share.share( FFLocalizations.of(context).getVariableText( @@ -64,7 +70,8 @@ class PreferencesPageModel with ChangeNotifier { .call(notifica: value) .then((value) async { if (value.jsonBody['error'] == false) { - await StorageHelper().set(LocalsStorageKey.notify.key, !isNotify); + await StorageRepositoryImpl() + .set(LocalsStorageKey.notify.key, !isNotify); content = FFLocalizations.of(context).getVariableText( enText: 'Notification changed successfully', ptText: 'Notificação alterada com sucesso', @@ -87,7 +94,8 @@ class PreferencesPageModel with ChangeNotifier { SnackBarUtil.showSnackBar(context, content, isError: true); }) .then((_) async => isNotify = - await StorageHelper().get(LocalsStorageKey.notify.key) == 'true') + await StorageRepositoryImpl().get(LocalsStorageKey.notify.key) == + 'true') .whenComplete(() => notifyListeners()); context.pop(); } @@ -138,13 +146,13 @@ class PreferencesPageModel with ChangeNotifier { Future toggleAccess(BuildContext context) async { onChange(String key) async { - await StorageHelper().set(SecureStorageKey.accessPass.value, key); + await StorageRepositoryImpl().set(SecureStorageKey.accessPass.value, key); await PhpGroup.changePass .call(newSenha: key) .then((value) async { final String content; if (jsonDecode(value.jsonBody['error'].toString()) == false) { - await StorageHelper() + await StorageRepositoryImpl() .set(LocalsStorageKey.access.key, isAccess ? false : true); notifyListeners(); content = FFLocalizations.of(context).getVariableText( @@ -168,7 +176,8 @@ class PreferencesPageModel with ChangeNotifier { SnackBarUtil.showSnackBar(context, content, isError: true); }) .then((_) async => isAccess = - await StorageHelper().get(LocalsStorageKey.access.key) == 'true') + await StorageRepositoryImpl().get(LocalsStorageKey.access.key) == + 'true') .whenComplete(() => notifyListeners()); } @@ -177,13 +186,13 @@ class PreferencesPageModel with ChangeNotifier { Future togglePanic(BuildContext context) async { onChange(String key) async { - await StorageHelper().set(SecureStorageKey.panicPass.value, key); + await StorageRepositoryImpl().set(SecureStorageKey.panicPass.value, key); await PhpGroup.changePanic .call(newSenhaPanico: key) .then((value) async { final String content; if (jsonDecode(value.jsonBody['error'].toString()) == false) { - await StorageHelper() + await StorageRepositoryImpl() .set(LocalsStorageKey.panic.key, isPanic ? 'false' : 'true'); notifyListeners(); content = FFLocalizations.of(context).getVariableText( @@ -207,7 +216,8 @@ class PreferencesPageModel with ChangeNotifier { SnackBarUtil.showSnackBar(context, content, isError: true); }) .then((_) async => isPanic = - await StorageHelper().get(LocalsStorageKey.panic.key) == 'true') + await StorageRepositoryImpl().get(LocalsStorageKey.panic.key) == + 'true') .whenComplete(() => notifyListeners()); } @@ -222,14 +232,15 @@ class PreferencesPageModel with ChangeNotifier { onChange(String? key) async { isFingerprint = !isFingerprint; - await StorageHelper() + await StorageRepositoryImpl() .set(SecureStorageKey.fingerprintPass.value, key ?? ''); - await StorageHelper().set( + await StorageRepositoryImpl().set( LocalsStorageKey.fingerprint.key, isFingerprint ? 'true' : 'false'); notifyListeners(); SnackBarUtil.showSnackBar(context, content); isFingerprint = - await StorageHelper().get(LocalsStorageKey.fingerprint.key) == 'true'; + await StorageRepositoryImpl().get(LocalsStorageKey.fingerprint.key) == + 'true'; } isFingerprint ? onChange(null) : _showPassKey(context, onChange); diff --git a/lib/pages/qr_code_page/qr_code_page_model.dart b/lib/pages/qr_code_page/qr_code_page_model.dart index bec899f0..f5d6a8b0 100644 --- a/lib/pages/qr_code_page/qr_code_page_model.dart +++ b/lib/pages/qr_code_page/qr_code_page_model.dart @@ -30,9 +30,11 @@ class QrCodePageModel extends FlutterFlowModel { Future initVariable() async { isFingerprint = - await StorageHelper().get(LocalsStorageKey.fingerprint.key) == 'true'; + await StorageRepositoryImpl().get(LocalsStorageKey.fingerprint.key) == + 'true'; userDevUUID = - await StorageHelper().get(ProfileStorageKey.userDevUUID.key) ?? ''; + await StorageRepositoryImpl().get(ProfileStorageKey.userDevUUID.key) ?? + ''; safeSetState?.call(); } diff --git a/lib/pages/qr_code_page/qr_code_page_widget.dart b/lib/pages/qr_code_page/qr_code_page_widget.dart index 0fa56484..1c92b82d 100644 --- a/lib/pages/qr_code_page/qr_code_page_widget.dart +++ b/lib/pages/qr_code_page/qr_code_page_widget.dart @@ -396,7 +396,7 @@ class _QrCodePageWidgetState extends State await BiometricHelper.authenticateBiometric().then((value) async { if (value == false) throw Exception('Biometric authentication failed'); - final key = await StorageHelper() + final key = await StorageRepositoryImpl() .get(SecureStorageKey.fingerprintPass.value); if (key == null || key.isEmpty) throw Exception('No key found'); safeSetState(() { diff --git a/lib/pages/reception_page/reception_page_model.dart b/lib/pages/reception_page/reception_page_model.dart index e72e9b96..0cbb2fba 100644 --- a/lib/pages/reception_page/reception_page_model.dart +++ b/lib/pages/reception_page/reception_page_model.dart @@ -5,8 +5,9 @@ import 'package:share_plus/share_plus.dart'; class ReceptionPageModel with ChangeNotifier { Future getIdenfifier(BuildContext context) async { - final String userDevUUID = - (await StorageHelper().get(ProfileStorageKey.userDevUUID.key)) ?? ''; + final String userDevUUID = (await StorageRepositoryImpl() + .get(ProfileStorageKey.userDevUUID.key)) ?? + ''; notifyListeners(); Share.share( diff --git a/lib/pages/reception_page/reception_page_widget.dart b/lib/pages/reception_page/reception_page_widget.dart index e7d5718e..6ba4401e 100644 --- a/lib/pages/reception_page/reception_page_widget.dart +++ b/lib/pages/reception_page/reception_page_widget.dart @@ -61,7 +61,7 @@ class _ReceptionPageWidgetState extends State double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context); double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context); - StorageHelper().context = context; + StorageRepositoryImpl().context = context; return ChangeNotifierProvider( create: (context) => ReceptionPageModel(), child: Scaffold( diff --git a/lib/pages/reservation_page/reservation_page_widget.dart b/lib/pages/reservation_page/reservation_page_widget.dart index a75cd567..ce32974a 100644 --- a/lib/pages/reservation_page/reservation_page_widget.dart +++ b/lib/pages/reservation_page/reservation_page_widget.dart @@ -23,15 +23,19 @@ class _ReservationPageWidgetState extends State { Future> initVariables() async { final email = - (await StorageHelper().get(SecureStorageKey.email.value)) ?? ''; + (await StorageRepositoryImpl().get(SecureStorageKey.email.value)) ?? ''; final name = - (await StorageHelper().get(ProfileStorageKey.userName.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userName.key)) ?? + ''; final devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; final userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; final clientId = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; const createdAt = '0000-00-00 00:00:00'; final url = 'https://hub.freaccess.com.br/hub/reservation/$clientId'; final freUserData = diff --git a/lib/pages/residents_on_the_property/residents_on_the_property_model.dart b/lib/pages/residents_on_the_property/residents_on_the_property_model.dart index 02c42ef4..067f574e 100644 --- a/lib/pages/residents_on_the_property/residents_on_the_property_model.dart +++ b/lib/pages/residents_on_the_property/residents_on_the_property_model.dart @@ -18,9 +18,12 @@ class ResidentsOnThePropertyModel } void initVariables() async { - devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + devUUID = + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; onRefresh?.call(); } diff --git a/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart b/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart index f7248d93..651eae66 100644 --- a/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart +++ b/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart @@ -230,11 +230,15 @@ class ScheduleCompleteVisitPageModel } Future _initVariables() async { - devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + devUUID = + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; } @override diff --git a/lib/pages/schedule_complete_visit_page/visit_history_page_widget.dart b/lib/pages/schedule_complete_visit_page/visit_history_page_widget.dart index bafb04bb..09ed7282 100644 --- a/lib/pages/schedule_complete_visit_page/visit_history_page_widget.dart +++ b/lib/pages/schedule_complete_visit_page/visit_history_page_widget.dart @@ -36,11 +36,15 @@ class _VisitHistoryWidgetState extends State List _visitWrap = []; Future _initVariables() async { - devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + devUUID = + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? + ''; cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; } @override @@ -265,14 +269,18 @@ class _VisitHistoryWidgetState extends State }, ], onTapCardItemAction: () async { - final devUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; - final userUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; - final cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; - final cliName = - (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; + final devUUID = (await StorageRepositoryImpl() + .get(ProfileStorageKey.devUUID.key)) ?? + ''; + final userUUID = (await StorageRepositoryImpl() + .get(ProfileStorageKey.userUUID.key)) ?? + ''; + final cliUUID = (await StorageRepositoryImpl() + .get(ProfileStorageKey.clientUUID.key)) ?? + ''; + final cliName = (await StorageRepositoryImpl() + .get(ProfileStorageKey.clientName.key)) ?? + ''; await showDialog( useSafeArea: true, diff --git a/lib/pages/sign_in_page/sign_in_page_widget.dart b/lib/pages/sign_in_page/sign_in_page_widget.dart index e632670a..e7e18250 100644 --- a/lib/pages/sign_in_page/sign_in_page_widget.dart +++ b/lib/pages/sign_in_page/sign_in_page_widget.dart @@ -33,7 +33,7 @@ class _SignInPageWidgetState extends State { @override Widget build(BuildContext context) { - StorageHelper().context = context; + StorageRepositoryImpl().context = context; return GestureDetector( onTap: () => _model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(_model.unfocusNode) diff --git a/lib/pages/sign_up_page/sign_up_page_widget.dart b/lib/pages/sign_up_page/sign_up_page_widget.dart index e91ac753..324b05e0 100644 --- a/lib/pages/sign_up_page/sign_up_page_widget.dart +++ b/lib/pages/sign_up_page/sign_up_page_widget.dart @@ -36,7 +36,7 @@ class _SignUpPageWidgetState extends State { @override Widget build(BuildContext context) { - StorageHelper().context = context; + StorageRepositoryImpl().context = context; return GestureDetector( onTap: () => _model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(_model.unfocusNode) diff --git a/lib/pages/visits_on_the_property/model.dart b/lib/pages/visits_on_the_property/model.dart index 2ddcd047..c9f031f8 100644 --- a/lib/pages/visits_on_the_property/model.dart +++ b/lib/pages/visits_on_the_property/model.dart @@ -30,9 +30,12 @@ class VisitsModel extends FlutterFlowModel { void dispose() {} Future initAsync() async { - devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + devUUID = + (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? + ''; cliUUID = - (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? + ''; onRefresh?.call(); } diff --git a/lib/pages/welcome_page/welcome_page_widget.dart b/lib/pages/welcome_page/welcome_page_widget.dart index 5b3f46ea..479a73d6 100644 --- a/lib/pages/welcome_page/welcome_page_widget.dart +++ b/lib/pages/welcome_page/welcome_page_widget.dart @@ -31,13 +31,16 @@ class _WelcomePageWidgetState extends State { // On page load action. SchedulerBinding.instance.addPostFrameCallback((_) async { if (isAndroid == true) { - await StorageHelper().set(SecureStorageKey.deviceType.value, 'Android'); + await StorageRepositoryImpl() + .set(SecureStorageKey.deviceType.value, 'Android'); setState(() {}); } else if (isiOS == true) { - await StorageHelper().set(SecureStorageKey.deviceType.value, 'iOS'); + await StorageRepositoryImpl() + .set(SecureStorageKey.deviceType.value, 'iOS'); setState(() {}); } else { - await StorageHelper().set(SecureStorageKey.deviceType.value, 'Web'); + await StorageRepositoryImpl() + .set(SecureStorageKey.deviceType.value, 'Web'); setState(() {}); } }); @@ -51,7 +54,7 @@ class _WelcomePageWidgetState extends State { @override Widget build(BuildContext context) { - StorageHelper().context = context; + StorageRepositoryImpl().context = context; return GestureDetector( onTap: () => _model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(_model.unfocusNode) diff --git a/lib/shared/utils/share_util.dart b/lib/shared/utils/share_util.dart index a9c410f7..d4288e70 100644 --- a/lib/shared/utils/share_util.dart +++ b/lib/shared/utils/share_util.dart @@ -3,8 +3,10 @@ import 'package:share_plus/share_plus.dart'; class ShareUtil { static Future showShare(payload) async { - final cliName = await StorageHelper().get(ProfileStorageKey.clientName.key); - final cliUUID = await StorageHelper().get(ProfileStorageKey.clientUUID.key); + final cliName = + await StorageRepositoryImpl().get(ProfileStorageKey.clientName.key); + final cliUUID = + await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key); for (var i = 0; i < payload['convites'].length; i++) { await Share.share(''' From 6896f1ecf401696a78cf4dc98cf4b7acdf1a80b1 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Fri, 20 Dec 2024 10:33:31 -0300 Subject: [PATCH 14/25] WIP --- ..._arrow_linked_locals_component_widget.dart | 21 +- .../schedule_visit_detail_model.dart | 10 +- ...p_arrow_linked_locals_component_model.dart | 13 +- ...cation_modal_template_component_model.dart | 10 +- .../change_pass_widget.dart | 3 +- ...item_details_template_component_model.dart | 10 +- .../provisional_schedule_template_model.dart | 16 +- ...siter_vistor_template_component_model.dart | 10 +- .../sign_up_template_component_widget.dart | 5 +- .../view_visit_detail_model.dart | 10 +- ...search_modal_template_component_model.dart | 10 +- lib/features/auth/authentication_service.dart | 31 +- .../backend/api_requests/api_calls.dart | 337 ++++++------------ .../blocs/access_history_bloc.dart | 10 +- .../blocs/provisional_history_bloc.dart | 9 +- .../pages/provisional_history_page.dart | 16 +- .../home/presentation/blocs/home_bloc.dart | 14 +- .../locals_local_data_source.dart | 6 +- .../locals_remote_data_source.dart | 27 +- .../repositories/locals_repository_impl.dart | 12 +- .../blocs/local_profile_bloc.dart | 18 +- lib/features/local/utils/local_util.dart | 76 ++-- .../menu/presentation/mappers/menu_entry.dart | 3 +- .../license_local_data_source.dart | 2 +- .../module/domain/entities/license.dart | 6 +- .../notification/deep_link_service.dart | 8 +- .../firebase_messaging_service.dart | 3 +- .../notification/notification_service.dart | 9 +- .../repositories/storage_repository_impl.dart | 9 +- lib/flutter_flow/nav/nav.dart | 28 +- lib/initialization.dart | 2 +- lib/main.dart | 14 +- .../fast_pass_page/fast_pass_page_widget.dart | 14 +- .../forgot_password_screen.dart | 2 +- .../liberation_history_model.dart | 10 +- .../message_history_page_model.dart | 10 +- .../package_order_page.dart | 3 +- .../pets_history_screen.dart | 20 +- lib/pages/pets_page/pets_page_model.dart | 13 +- .../preferences_settings_model.dart | 47 +-- .../qr_code_page/qr_code_page_model.dart | 6 +- .../qr_code_page/qr_code_page_widget.dart | 2 +- .../reception_page/reception_page_model.dart | 5 +- .../reception_page/reception_page_widget.dart | 2 +- .../reservation_page_widget.dart | 14 +- .../residents_on_the_property_model.dart | 7 +- .../schedule_complete_visit_page_model.dart | 10 +- .../visit_history_page_widget.dart | 30 +- .../sign_in_page/sign_in_page_widget.dart | 2 +- .../sign_up_page/sign_up_page_widget.dart | 2 +- lib/pages/visits_on_the_property/model.dart | 7 +- .../welcome_page/welcome_page_widget.dart | 11 +- lib/shared/utils/share_util.dart | 6 +- 53 files changed, 366 insertions(+), 615 deletions(-) diff --git a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart index 2286cc0a..6dc7b85b 100644 --- a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart +++ b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart @@ -107,13 +107,13 @@ class _BottomArrowLinkedLocalsComponentWidgetState if (isEnabled) { final local = locals[0]; - await StorageRepositoryImpl() + await StorageHelper() .set(ProfileStorageKey.clientName.key, local['CLI_NOME']); - await StorageRepositoryImpl() + await StorageHelper() .set(ProfileStorageKey.ownerName.key, local['CLU_OWNER_DSC']); - await StorageRepositoryImpl() + await StorageHelper() .set(ProfileStorageKey.clientUUID.key, local['CLI_ID']); - await StorageRepositoryImpl() + await StorageHelper() .set(ProfileStorageKey.ownerUUID.key, local['CLU_OWNER_ID']); context.pop(); @@ -145,8 +145,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState Future _fetchResponseLink(String status, String cliID) async { try { - await StorageRepositoryImpl() - .set(ProfileStorageKey.clientUUID.key, cliID); + await StorageHelper().set(ProfileStorageKey.clientUUID.key, cliID); var response = await PhpGroup.resopndeVinculo.call(tarefa: status); if (response.jsonBody['error'] == false) { @@ -157,7 +156,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState enText: "Link Activated Successfully") }; } else { - await StorageRepositoryImpl().set(ProfileStorageKey.clientUUID.key, ''); + await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); return response.jsonBody; } } catch (e, s) { @@ -209,13 +208,13 @@ class _BottomArrowLinkedLocalsComponentWidgetState statusHashMap: [_statusHashMap(local)], onTapCardItemAction: () async { if (local['CLU_STATUS'] == 'A') { - await StorageRepositoryImpl() + await StorageHelper() .set(ProfileStorageKey.clientUUID.key, local['CLI_ID']); - await StorageRepositoryImpl() + await StorageHelper() .set(ProfileStorageKey.clientName.key, local['CLI_NOME']); - await StorageRepositoryImpl() + await StorageHelper() .set(ProfileStorageKey.ownerName.key, local['CLU_OWNER_DSC']); - await StorageRepositoryImpl() + await StorageHelper() .set(ProfileStorageKey.ownerUUID.key, local['CLU_OWNER_ID']); context.pop(true); diff --git a/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart b/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart index a1e4b4bf..734cb294 100644 --- a/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart +++ b/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart @@ -58,15 +58,11 @@ class ScheduleVisitDetailModel } Future initDB() async { - devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } @override diff --git a/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart index fd45ad3b..be8b36d1 100644 --- a/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart +++ b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart @@ -16,18 +16,13 @@ class UpArrowLinkedLocalsComponentModel } Future initDB() async { - devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; cliName = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientName.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; } @override diff --git a/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart index 1d872c2d..03352151 100644 --- a/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart +++ b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart @@ -32,15 +32,11 @@ class AccessNotificationModalTemplateComponentModel } Future initDB() async { - devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } @override diff --git a/lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart b/lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart index 9260e4a7..d4938cff 100644 --- a/lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart +++ b/lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart @@ -49,8 +49,7 @@ class _PassKeyTemplateWidgetState extends State { Future _initialize() async { _accessPass = - await StorageRepositoryImpl().get(SecureStorageKey.accessPass.value) ?? - ''; + await StorageHelper().get(SecureStorageKey.accessPass.value) ?? ''; } @override diff --git a/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_model.dart b/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_model.dart index 21be638e..0fefa607 100644 --- a/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_model.dart +++ b/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_model.dart @@ -27,15 +27,11 @@ class LiberationHistoryItemDetailsTemplateComponentModel void initState(BuildContext context) {} Future initDatabase() async { - devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; ; } diff --git a/lib/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart b/lib/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart index 9d738419..c1e82767 100644 --- a/lib/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart +++ b/lib/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart @@ -147,21 +147,15 @@ class ScheduleProvisionalVisitPageModel } Future init() async { - devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; ownerName = - (await StorageRepositoryImpl().get(ProfileStorageKey.ownerName.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.ownerName.key)) ?? ''; ownerUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.ownerUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? ''; setState?.call(); } } diff --git a/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_model.dart b/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_model.dart index 4240befd..acff7931 100644 --- a/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_model.dart +++ b/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_model.dart @@ -135,15 +135,11 @@ class RegisiterVistorTemplateComponentModel } Future initializeDatabase() async { - devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; ; } diff --git a/lib/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart b/lib/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart index 0b64bf27..3ad2c626 100644 --- a/lib/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart +++ b/lib/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart @@ -94,9 +94,8 @@ class _SignUpTemplateComponentWidgetState } Future _initialize() async { - _deviceType = (await StorageRepositoryImpl() - .get(SecureStorageKey.deviceType.value)) ?? - ''; + _deviceType = + (await StorageHelper().get(SecureStorageKey.deviceType.value)) ?? ''; } @override diff --git a/lib/components/templates_components/view_visit_detail/view_visit_detail_model.dart b/lib/components/templates_components/view_visit_detail/view_visit_detail_model.dart index dc92ba8f..d115ada3 100644 --- a/lib/components/templates_components/view_visit_detail/view_visit_detail_model.dart +++ b/lib/components/templates_components/view_visit_detail/view_visit_detail_model.dart @@ -36,15 +36,11 @@ class ViewVisitDetailModel extends FlutterFlowModel { } Future initializeDatabase() async { - devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; ; } diff --git a/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart b/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart index 3d573b22..17cc8baf 100644 --- a/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart +++ b/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart @@ -38,15 +38,11 @@ class VisitorSearchModalTemplateComponentModel } Future initDatabase() async { - devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; ; } diff --git a/lib/features/auth/authentication_service.dart b/lib/features/auth/authentication_service.dart index e427a48d..12393545 100644 --- a/lib/features/auth/authentication_service.dart +++ b/lib/features/auth/authentication_service.dart @@ -28,12 +28,10 @@ class AuthenticationService { List locals = response.jsonBody['locais'] ?? []; if (locals.isEmpty) { - await StorageRepositoryImpl() - .set(SecureStorageKey.haveLocal.value, false); + await StorageHelper().set(SecureStorageKey.haveLocal.value, false); context.go('/receptionPage'); } else { - await StorageRepositoryImpl() - .set(SecureStorageKey.isLogged.value, true); + await StorageHelper().set(SecureStorageKey.isLogged.value, true); context .go('/homePage', extra: {'update': LocalsRepositoryImpl().update}); } @@ -53,7 +51,7 @@ class AuthenticationService { final ApiCallResponse? response; final LoginCall callback = PhpGroup.loginCall; String deviceDescription = randomString(10, 10, true, false, false); - await StorageRepositoryImpl() + await StorageHelper() .set(SecureStorageKey.deviceDescription.value, deviceDescription); final String? devUUID; @@ -69,11 +67,9 @@ class AuthenticationService { devUUID = await DeviceUtil.getDevUUID(); if ((email != '') && (passwd != '')) { - await StorageRepositoryImpl().set(SecureStorageKey.email.value, email); - await StorageRepositoryImpl() - .set(SecureStorageKey.password.value, passwd); - await StorageRepositoryImpl() - .set(ProfileStorageKey.devUUID.key, devUUID!); + await StorageHelper().set(SecureStorageKey.email.value, email); + await StorageHelper().set(SecureStorageKey.password.value, passwd); + await StorageHelper().set(ProfileStorageKey.devUUID.key, devUUID!); response = await callback.call(); if (response.jsonBody['error'] == false) { @@ -82,14 +78,11 @@ class AuthenticationService { userDevUUID = response.jsonBody['user']['dev_id']; userName = response.jsonBody['user']['name']; - await StorageRepositoryImpl() - .set(ProfileStorageKey.userUUID.key, userUUID); - await StorageRepositoryImpl() + await StorageHelper().set(ProfileStorageKey.userUUID.key, userUUID); + await StorageHelper() .set(ProfileStorageKey.userDevUUID.key, userDevUUID); - await StorageRepositoryImpl() - .set(ProfileStorageKey.status.key, status); - await StorageRepositoryImpl() - .set(ProfileStorageKey.userName.key, userName); + await StorageHelper().set(ProfileStorageKey.status.key, status); + await StorageHelper().set(ProfileStorageKey.userName.key, userName); await login(context); } else { @@ -156,8 +149,8 @@ class AuthenticationService { ), }; - await StorageRepositoryImpl().clean(Storage.databaseStorage); - await StorageRepositoryImpl().clean(Storage.secureStorage); + await StorageHelper().clean(Storage.databaseStorage); + await StorageHelper().clean(Storage.secureStorage); await LicenseRepositoryImpl().cleanLicense(); DatabaseService.isInitialized = false; await DatabaseService.instance.init(); diff --git a/lib/features/backend/api_requests/api_calls.dart b/lib/features/backend/api_requests/api_calls.dart index 24f88aa2..b5665bea 100644 --- a/lib/features/backend/api_requests/api_calls.dart +++ b/lib/features/backend/api_requests/api_calls.dart @@ -70,14 +70,11 @@ class GetProvSchedules { Future call(final String page, final String status) async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getAgendamentoProv'; const String pageSize = '10'; final bool isFiltered = status != '' && status != '.*'; @@ -111,14 +108,11 @@ class GetOpenedVisits { Future call(final String page) async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getOpenedVisits'; const String pageSize = '10'; return await ApiManager.instance.makeApiCall( @@ -149,12 +143,11 @@ class GetResidentsByProperty { Future call(final String page) async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key) ?? ''; + await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? ''; final String userUUID = - await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key) ?? ''; + await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? ''; final String cliID = - await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key) ?? - ''; + await StorageHelper().get(ProfileStorageKey.clientUUID.key) ?? ''; const String atividade = 'getResidentsByProperty'; const String pageSize = '10'; return await ApiManager.instance.makeApiCall( @@ -184,14 +177,11 @@ class GetVehiclesByProperty { Future call(final String page) async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getVehiclesByProperty'; const String pageSize = '10'; return await ApiManager.instance.makeApiCall( @@ -223,14 +213,11 @@ class GetLicense { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; return await ApiManager.instance.makeApiCall( callName: 'getLicense', @@ -260,11 +247,9 @@ class UnregisterDevice { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; return await ApiManager.instance.makeApiCall( callName: 'unregisterDevice', @@ -292,14 +277,11 @@ class DeletePet { Future call({final int? petID = 0}) async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'excluirPet'; return await ApiManager.instance.makeApiCall( @@ -343,14 +325,11 @@ class UpdatePet { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'atualizarPet'; return await ApiManager.instance.makeApiCall( @@ -397,14 +376,11 @@ class GetPets { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'consultaPets'; return await ApiManager.instance.makeApiCall( @@ -437,14 +413,11 @@ class GetPetPhoto { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'consultaFotoPet'; return await ApiManager.instance.makeApiCall( @@ -486,14 +459,11 @@ class RegisterPet { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'cadastrarPet'; return await ApiManager.instance.makeApiCall( @@ -539,14 +509,11 @@ class BuscaEnconcomendas { final String? status, }) async { final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getEncomendas'; final String baseUrl = PhpGroup.getBaseUrl(); @@ -589,14 +556,11 @@ class CancelaVisita { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'cancelaVisita'; return await ApiManager.instance.makeApiCall( @@ -629,11 +593,9 @@ class CancelaVisita { class DeleteAccount { Future call() async { final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String baseUrl = PhpGroup.getBaseUrl(); return await ApiManager.instance.makeApiCall( @@ -665,14 +627,11 @@ class ChangePanic { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'updVisitado'; return await ApiManager.instance.makeApiCall( @@ -707,14 +666,11 @@ class ChangePass { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'updVisitado'; return await ApiManager.instance.makeApiCall( @@ -749,14 +705,11 @@ class RespondeVinculo { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; return await ApiManager.instance.makeApiCall( callName: 'respondeVinculo', @@ -789,14 +742,11 @@ class ChangeNotifica { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'updVisitado'; return await ApiManager.instance.makeApiCall( @@ -829,17 +779,13 @@ class UpdateIDE { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; - final String newIde = (await StorageRepositoryImpl() - .get(ProfileStorageKey.userDevUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final String newIde = + (await StorageHelper().get(ProfileStorageKey.userDevUUID.key)) ?? ''; const String atividade = 'updVisitado'; return await ApiManager.instance.makeApiCall( @@ -872,13 +818,11 @@ class UpdToken { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String token = - (await StorageRepositoryImpl().get(SecureStorageKey.token.value)) ?? ''; + (await StorageHelper().get(SecureStorageKey.token.value)) ?? ''; return await ApiManager.instance.makeApiCall( callName: 'updToken', @@ -906,19 +850,16 @@ class LoginCall { Future call() async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String email = - (await StorageRepositoryImpl().get(SecureStorageKey.email.value)) ?? ''; + (await StorageHelper().get(SecureStorageKey.email.value)) ?? ''; final String password = - (await StorageRepositoryImpl().get(SecureStorageKey.password.value)) ?? + (await StorageHelper().get(SecureStorageKey.password.value)) ?? ''; + final String type = + (await StorageHelper().get(SecureStorageKey.deviceType.value)) ?? ''; + final String description = + (await StorageHelper().get(SecureStorageKey.deviceDescription.value)) ?? ''; - final String type = (await StorageRepositoryImpl() - .get(SecureStorageKey.deviceType.value)) ?? - ''; - final String description = (await StorageRepositoryImpl() - .get(SecureStorageKey.deviceDescription.value)) ?? - ''; late final String token; try { token = await FirebaseMessagingService.getToken(); @@ -1002,14 +943,11 @@ class ChangePasswordCall { }) async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; return await ApiManager.instance.makeApiCall( callName: 'changePassword', @@ -1069,9 +1007,9 @@ class GetLocalsCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key) ?? ''; + await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? ''; final String userUUID = - await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key) ?? ''; + await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? ''; return await ApiManager.instance .makeApiCall( @@ -1113,14 +1051,11 @@ class PostScheduleVisitorCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'putVisitante'; return await ApiManager.instance.makeApiCall( @@ -1174,14 +1109,11 @@ class PostScheduleVisitCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'putVisita'; return await ApiManager.instance.makeApiCall( @@ -1234,14 +1166,11 @@ class GetScheduleVisitCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getVisitas'; return await ApiManager.instance.makeApiCall( @@ -1514,14 +1443,11 @@ class GetDadosCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getDados'; return await ApiManager.instance @@ -1765,14 +1691,11 @@ class GetVisitorByDocCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getVisitante'; return await ApiManager.instance.makeApiCall( @@ -1825,14 +1748,11 @@ class GetFotoVisitanteCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getFotoVisitante'; return await ApiManager.instance.makeApiCall( @@ -1870,14 +1790,11 @@ class PostProvVisitSchedulingCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'putAgendamentoProv'; return await ApiManager.instance.makeApiCall( @@ -1925,14 +1842,11 @@ class GetVisitsCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getVisitas'; return await ApiManager.instance.makeApiCall( @@ -2194,14 +2108,11 @@ class DeleteVisitCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'cancelaVisita'; return await ApiManager.instance.makeApiCall( @@ -2243,17 +2154,13 @@ class GetPessoasLocalCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String ownerUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.ownerUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; return await ApiManager.instance.makeApiCall( callName: 'getPessoasLocal', @@ -2317,14 +2224,11 @@ class RespondeSolicitacaoCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'respondeSolicitacao'; return await ApiManager.instance.makeApiCall( @@ -2373,14 +2277,11 @@ class GetAccessCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getAcessos'; return await ApiManager.instance.makeApiCall( @@ -2628,14 +2529,11 @@ class GetLiberationsCall { Future.microtask(() async { final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; - final String cliUUID = (await StorageRepositoryImpl() - .get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final String cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getSolicitacoes'; try { @@ -2826,14 +2724,11 @@ class GetMessagesCall { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final String userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final String cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const String atividade = 'getMensagens'; return await ApiManager.instance.makeApiCall( diff --git a/lib/features/history/presentation/blocs/access_history_bloc.dart b/lib/features/history/presentation/blocs/access_history_bloc.dart index a1f193ff..9e5bd113 100644 --- a/lib/features/history/presentation/blocs/access_history_bloc.dart +++ b/lib/features/history/presentation/blocs/access_history_bloc.dart @@ -32,15 +32,11 @@ class AcessHistoryPageModel extends FlutterFlowModel { } Future initDatabase() async { - devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } @override diff --git a/lib/features/history/presentation/blocs/provisional_history_bloc.dart b/lib/features/history/presentation/blocs/provisional_history_bloc.dart index 67e5d0c1..3c6b0d9e 100644 --- a/lib/features/history/presentation/blocs/provisional_history_bloc.dart +++ b/lib/features/history/presentation/blocs/provisional_history_bloc.dart @@ -47,14 +47,11 @@ class ProvisionalHistoryBloc ) async { emit(state.copyWith(isLoading: true)); final devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; emit(state.copyWith( devUUID: devUUID, userUUID: userUUID, diff --git a/lib/features/history/presentation/pages/provisional_history_page.dart b/lib/features/history/presentation/pages/provisional_history_page.dart index 5cf0afea..e69fc452 100644 --- a/lib/features/history/presentation/pages/provisional_history_page.dart +++ b/lib/features/history/presentation/pages/provisional_history_page.dart @@ -110,14 +110,14 @@ class ProvisionalHistoryState extends State { ptText: 'Consultar Agendas', enText: 'Provisional History', ), - style: theme.headlineMedium.override( - fontFamily: theme.headlineMediumFamily, - color: theme.primaryText, - fontSize: 16.0, - letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(theme.headlineMediumFamily), - ), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: 'Nunito', + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 15.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), + ), ); } diff --git a/lib/features/home/presentation/blocs/home_bloc.dart b/lib/features/home/presentation/blocs/home_bloc.dart index 9a12e337..c7b69418 100644 --- a/lib/features/home/presentation/blocs/home_bloc.dart +++ b/lib/features/home/presentation/blocs/home_bloc.dart @@ -18,19 +18,15 @@ class HomeBloc extends Bloc { Future _onHomeEvent(HomeEvent event, Emitter emit) async { final devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; final userName = - (await StorageRepositoryImpl().get(ProfileStorageKey.userName.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userName.key)) ?? ''; final userEmail = - (await StorageRepositoryImpl().get(SecureStorageKey.email.value)) ?? ''; + (await StorageHelper().get(SecureStorageKey.email.value)) ?? ''; emit(state.copyWith( devUUID: devUUID, diff --git a/lib/features/local/data/data_sources/locals_local_data_source.dart b/lib/features/local/data/data_sources/locals_local_data_source.dart index 660ce5ac..cac9e924 100644 --- a/lib/features/local/data/data_sources/locals_local_data_source.dart +++ b/lib/features/local/data/data_sources/locals_local_data_source.dart @@ -24,7 +24,7 @@ class LocalsLocalDataSourceImpl implements LocalsLocalDataSource { @override Future get(String key) async { final String? local = - await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key); + await StorageHelper().get(ProfileStorageKey.clientUUID.key); var response = await DatabaseService.database.query( LocalsConstants.tableLocalsKeychain, where: 'key = ? AND local = ?', @@ -40,7 +40,7 @@ class LocalsLocalDataSourceImpl implements LocalsLocalDataSource { try { var date = DateTime.now().toIso8601String(); final String? local = - await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key); + await StorageHelper().get(ProfileStorageKey.clientUUID.key); await DatabaseService.database.insert( LocalsConstants.tableLocalsKeychain, @@ -61,7 +61,7 @@ class LocalsLocalDataSourceImpl implements LocalsLocalDataSource { @override Future delete(String key) async { final String? local = - await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key); + await StorageHelper().get(ProfileStorageKey.clientUUID.key); await DatabaseService.database.delete(LocalsConstants.tableLocalsKeychain, where: 'key = ? AND local = ?', whereArgs: [key, local]); } diff --git a/lib/features/local/data/data_sources/locals_remote_data_source.dart b/lib/features/local/data/data_sources/locals_remote_data_source.dart index a8b2233f..bf4b710b 100644 --- a/lib/features/local/data/data_sources/locals_remote_data_source.dart +++ b/lib/features/local/data/data_sources/locals_remote_data_source.dart @@ -56,14 +56,12 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { final bool isEnable = !isEmpty && isActive; if (isEnable) { - await StorageRepositoryImpl() - .set(SecureStorageKey.haveLocal.value, true); - await StorageRepositoryImpl() - .set(SecureStorageKey.isLogged.value, true); + await StorageHelper().set(SecureStorageKey.haveLocal.value, true); + await StorageHelper().set(SecureStorageKey.isLogged.value, true); await WidgetsBinding.instance.endOfFrame; - await StorageRepositoryImpl().set(ProfileStorageKey.clientUUID.key, ''); - await StorageRepositoryImpl().set(ProfileStorageKey.ownerUUID.key, ''); - StorageRepositoryImpl().context?.go('/homePage'); + await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); + await StorageHelper().set(ProfileStorageKey.ownerUUID.key, ''); + StorageHelper().context?.go('/homePage'); } } catch (e, s) { log(e.toString(), stackTrace: s); @@ -148,11 +146,9 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { @override Future checkLocals(BuildContext context) async { String cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; String cliName = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientName.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; return cliUUID.isEmpty && cliName.isEmpty; } @@ -227,12 +223,9 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { final bool status = await PhpGroup.resopndeVinculo.call(tarefa: 'I').then((value) async { if (value.jsonBody['error'] == false) { - await StorageRepositoryImpl() - .set(ProfileStorageKey.clientName.key, ''); - await StorageRepositoryImpl() - .set(ProfileStorageKey.ownerName.key, ''); - await StorageRepositoryImpl() - .set(ProfileStorageKey.clientUUID.key, ''); + await StorageHelper().set(ProfileStorageKey.clientName.key, ''); + await StorageHelper().set(ProfileStorageKey.ownerName.key, ''); + await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); context.pop(); context.go('/homePage', extra: {'update': LocalsRepositoryImpl().update}); diff --git a/lib/features/local/data/repositories/locals_repository_impl.dart b/lib/features/local/data/repositories/locals_repository_impl.dart index 5c5fd0a6..37b49a95 100644 --- a/lib/features/local/data/repositories/locals_repository_impl.dart +++ b/lib/features/local/data/repositories/locals_repository_impl.dart @@ -38,16 +38,16 @@ class LocalsRepositoryImpl implements LocalsRepository { } Future unselect() async { - await StorageRepositoryImpl().set(ProfileStorageKey.clientUUID.key, ''); - await StorageRepositoryImpl().set(ProfileStorageKey.clientName.key, ''); - await StorageRepositoryImpl().set(ProfileStorageKey.ownerName.key, ''); + await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); + await StorageHelper().set(ProfileStorageKey.clientName.key, ''); + await StorageHelper().set(ProfileStorageKey.ownerName.key, ''); } Future check(BuildContext context) async { final String? cliUUID = - await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key); + await StorageHelper().get(ProfileStorageKey.clientUUID.key); final String? ownerUUID = - await StorageRepositoryImpl().get(ProfileStorageKey.ownerUUID.key); + await StorageHelper().get(ProfileStorageKey.ownerUUID.key); final bool haveCli = cliUUID != null && cliUUID.isNotEmpty; final bool haveOwner = ownerUUID != null && ownerUUID.isNotEmpty; if (!haveCli && !haveOwner) { @@ -78,7 +78,7 @@ class LocalsRepositoryImpl implements LocalsRepository { } Future _handleUpdateError(BuildContext context) async { - await StorageRepositoryImpl().set(ProfileStorageKey.clientUUID.key, ''); + await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); const String errorMsg = 'Erro ao atualizar locais'; await DialogUtil.error(context, errorMsg); } diff --git a/lib/features/local/presentation/blocs/local_profile_bloc.dart b/lib/features/local/presentation/blocs/local_profile_bloc.dart index 3bce66d6..bca9c819 100644 --- a/lib/features/local/presentation/blocs/local_profile_bloc.dart +++ b/lib/features/local/presentation/blocs/local_profile_bloc.dart @@ -41,14 +41,11 @@ class LocalProfileBloc extends Bloc { Future _onLocalProfileEvent( LocalProfileEvent event, Emitter emit) async { final cliName = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientName.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; final ownerName = - (await StorageRepositoryImpl().get(ProfileStorageKey.ownerName.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.ownerName.key)) ?? ''; final cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; emit(state.copyWith( cliName: cliName, cliUUID: cliUUID, ownerName: ownerName)); } @@ -75,14 +72,11 @@ class LocalProfileComponentModel Future getData() async { cliName = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientName.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; ownerName = - (await StorageRepositoryImpl().get(ProfileStorageKey.ownerName.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.ownerName.key)) ?? ''; cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; setStateCallback?.call(); } diff --git a/lib/features/local/utils/local_util.dart b/lib/features/local/utils/local_util.dart index c7ab1664..202e911a 100644 --- a/lib/features/local/utils/local_util.dart +++ b/lib/features/local/utils/local_util.dart @@ -12,9 +12,9 @@ import 'package:hub/shared/utils/log_util.dart'; class LocalUtil { static void handleError(BuildContext context, String errorMsg) async { final String devUUID = - await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key) ?? ''; + await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? ''; final String userUUID = - await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key) ?? ''; + await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? ''; final bool isAuthenticated = userUUID.isNotEmpty && devUUID.isNotEmpty; final bool isDevLinked = !errorMsg.contains('Esse dispositivo nao pertence a esse usuario'); @@ -43,21 +43,21 @@ class LocalUtil { BuildContext context, List locals) async { log('() => isUnavailable'); try { - await StorageRepositoryImpl() + await StorageHelper() .set(ProfileStorageKey.clientUUID.key, locals[0]['CLI_ID']); - await StorageRepositoryImpl() + await StorageHelper() .set(ProfileStorageKey.ownerUUID.key, locals[0]['CLU_OWNER_ID']); - await StorageRepositoryImpl() + await StorageHelper() .set(ProfileStorageKey.clientName.key, locals[0]['CLI_NOME']); - await StorageRepositoryImpl() + await StorageHelper() .set(ProfileStorageKey.ownerName.key, locals[0]['CLU_OWNER_DSC']); var response = await PhpGroup.resopndeVinculo.call(tarefa: 'A'); if (response.jsonBody['error'] == true) { - await StorageRepositoryImpl().set(ProfileStorageKey.clientUUID.key, ''); - await StorageRepositoryImpl().set(ProfileStorageKey.ownerUUID.key, ''); - await StorageRepositoryImpl().set(ProfileStorageKey.clientName.key, ''); - await StorageRepositoryImpl().set(ProfileStorageKey.ownerName.key, ''); + await StorageHelper().set(ProfileStorageKey.clientUUID.key, ''); + await StorageHelper().set(ProfileStorageKey.ownerUUID.key, ''); + await StorageHelper().set(ProfileStorageKey.clientName.key, ''); + await StorageHelper().set(ProfileStorageKey.ownerName.key, ''); return false; } @@ -76,15 +76,15 @@ class LocalUtil { static Future handleEnabled(BuildContext context, dynamic local) async { log('() => isEnabled'); - await StorageRepositoryImpl() + await StorageHelper() .set(ProfileStorageKey.clientUUID.key, local['CLI_ID']); - await StorageRepositoryImpl() + await StorageHelper() .set(ProfileStorageKey.ownerUUID.key, local['CLU_OWNER_ID']); - await StorageRepositoryImpl() + await StorageHelper() .set(ProfileStorageKey.clientName.key, local['CLI_NOME']); - await StorageRepositoryImpl() + await StorageHelper() .set(ProfileStorageKey.ownerName.key, local['CLU_OWNER_DSC']); - await StorageRepositoryImpl() + await StorageHelper() .set(ProfileStorageKey.userName.key, local['USU_NOME']); return await LocalsRemoteDataSourceImpl().processData(context); } @@ -106,45 +106,45 @@ class LocalUtil { static Future updateStorageUtil(Map jsonBody) async { try { - await StorageRepositoryImpl() + await StorageHelper() .set(LocalsStorageKey.whatsapp.key, jsonBody['whatsapp'] ?? false); - await StorageRepositoryImpl().set( + await StorageHelper().set( LocalsStorageKey.provisional.key, jsonBody['provisional'] ?? false); - await StorageRepositoryImpl().set( + await StorageHelper().set( LocalsStorageKey.pets.key, jsonBody['pet'] ?? false, ); - await StorageRepositoryImpl().set( + await StorageHelper().set( LocalsStorageKey.notify.key, _processSystemOption( jsonBody['visitado']['VDO_NOTTERCEIROS'], ), ); if (jsonBody['visitado']['VDO_TEM_SENHA_ACESSO'] == '') { - await StorageRepositoryImpl().set( + await StorageHelper().set( LocalsStorageKey.access.key, _processSystemOption(jsonBody['visitado']['VDO_TEM_SENHA_ACESSO']), ); - await StorageRepositoryImpl().set( + await StorageHelper().set( LocalsStorageKey.panic.key, _processSystemOption(jsonBody['visitado']['VDO_TEM_SENHA_PANICO']), ); } - await StorageRepositoryImpl().set( + await StorageHelper().set( LocalsStorageKey.petAmount.key, jsonBody['petAmountRegister']?.toString().isEmpty ?? true ? '0' : jsonBody['petAmountRegister'].toString()); - await StorageRepositoryImpl().set(ProfileStorageKey.userName.key, + await StorageHelper().set(ProfileStorageKey.userName.key, jsonBody['visitado']['VDO_NOME'] ?? ''); - await StorageRepositoryImpl().set(ProfileStorageKey.userEmail.key, + await StorageHelper().set(ProfileStorageKey.userEmail.key, jsonBody['visitado']['VDO_EMAIL'] ?? ''); - await StorageRepositoryImpl().set( + await StorageHelper().set( LocalsStorageKey.provisional.key, jsonBody['provisional'] ?? false); final bool isNewVersion = jsonBody['newVersion'] ?? false; - await StorageRepositoryImpl() + await StorageHelper() .set(LocalsStorageKey.isNewVersion.key, isNewVersion); return isNewVersion; } catch (e, s) { @@ -159,8 +159,7 @@ class LocalUtil { static Future isInactived(List locals) async { String cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; return locals .where( (local) => local['CLI_ID'] != cliUUID && local['CLU_STATUS'] == 'A') @@ -176,34 +175,27 @@ class LocalUtil { static Future isUnselected() async { String cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; String cliName = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientName.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; String ownerUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.ownerUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? ''; return cliUUID.isEmpty && cliName.isEmpty && ownerUUID.isEmpty; } static Future isSelected(bool isInactived) async { String cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; String cliName = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientName.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; return cliUUID.isNotEmpty && cliName.isNotEmpty && isInactived; } static Future isAvailable() async { String cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; String cliName = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientName.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; return cliUUID.isNotEmpty && cliName.isNotEmpty; } } diff --git a/lib/features/menu/presentation/mappers/menu_entry.dart b/lib/features/menu/presentation/mappers/menu_entry.dart index 5a30b7ef..aec4f987 100644 --- a/lib/features/menu/presentation/mappers/menu_entry.dart +++ b/lib/features/menu/presentation/mappers/menu_entry.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:hub/features/module/index.dart'; import 'package:hub/flutter_flow/internationalization.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; +import 'package:material_symbols_icons/symbols.dart'; enum MenuEntryType { Home, Drawer, Property } @@ -171,7 +172,7 @@ class MenuEntry implements BaseModule { ), MenuEntry( key: 'FRE-HUB-PROVISIONAL-HISTORY', - icon: Icons.person_search_outlined, + icon: Symbols.calendar_clock, name: FFLocalizations.of(navigatorKey.currentContext!).getVariableText( ptText: 'Consultar Agendas', enText: 'Provisional History', diff --git a/lib/features/module/data/data_sources/license_local_data_source.dart b/lib/features/module/data/data_sources/license_local_data_source.dart index f6b7266c..25251b41 100644 --- a/lib/features/module/data/data_sources/license_local_data_source.dart +++ b/lib/features/module/data/data_sources/license_local_data_source.dart @@ -41,7 +41,7 @@ class LicenseLocalDataSourceImpl implements LicenseLocalDataSource { @override Future isNewVersion() async { final String? reponse = - await StorageRepositoryImpl().get(LocalsStorageKey.isNewVersion.key); + await StorageHelper().get(LocalsStorageKey.isNewVersion.key); final bool isNewVersion = reponse.toBoolean(); return isNewVersion; } diff --git a/lib/features/module/domain/entities/license.dart b/lib/features/module/domain/entities/license.dart index 5a6e74f5..17a70650 100644 --- a/lib/features/module/domain/entities/license.dart +++ b/lib/features/module/domain/entities/license.dart @@ -60,7 +60,7 @@ class License { } static Future _precessWpp() async { - final bool whatsapp = await StorageRepositoryImpl() + final bool whatsapp = await StorageHelper() .get(LocalsStorageKey.whatsapp.key) .then((v) => v.toBoolean()); if (whatsapp) @@ -70,7 +70,7 @@ class License { } static Future _processProvisional() async { - final bool provisional = await StorageRepositoryImpl() + final bool provisional = await StorageHelper() .get(LocalsStorageKey.provisional.key) .then((v) => v.toBoolean()); if (provisional) @@ -80,7 +80,7 @@ class License { } static Future _processPets() async { - final bool pets = await StorageRepositoryImpl() + final bool pets = await StorageHelper() .get(LocalsStorageKey.pets.key) .then((v) => v.toBoolean()); if (pets) diff --git a/lib/features/notification/deep_link_service.dart b/lib/features/notification/deep_link_service.dart index fdfc4512..f7aa1ac0 100644 --- a/lib/features/notification/deep_link_service.dart +++ b/lib/features/notification/deep_link_service.dart @@ -24,7 +24,7 @@ class DeepLinkService { _appLinks = AppLinks(); print('initDeepLinks'); _linkSubscription = _appLinks.uriLinkStream.listen((uri) async { - if (!StorageRepositoryImpl().isRecovered) { + if (!StorageHelper().isRecovered) { await _handleDeepLink(uri); } }); @@ -37,9 +37,9 @@ class DeepLinkService { Future _handleDeepLink(Uri uri) async { try { print('Handling deep link: $uri'); - if (StorageRepositoryImpl().isRecovered) return; + if (StorageHelper().isRecovered) return; - StorageRepositoryImpl().isRecovered = true; + StorageHelper().isRecovered = true; final email = uri.queryParameters['email'] ?? ''; final token = uri.queryParameters['token'] ?? ''; print('email: $email, token: $token'); @@ -68,7 +68,7 @@ class DeepLinkService { useSafeArea: true, enableDrag: true, ).whenComplete(() { - StorageRepositoryImpl().isRecovered = false; + StorageHelper().isRecovered = false; print('showModalBottomSheet completed'); }); }); diff --git a/lib/features/notification/firebase_messaging_service.dart b/lib/features/notification/firebase_messaging_service.dart index f753900a..68fc300a 100644 --- a/lib/features/notification/firebase_messaging_service.dart +++ b/lib/features/notification/firebase_messaging_service.dart @@ -45,8 +45,7 @@ class FirebaseMessagingService { final String? deviceToken = await _firebaseMessaging.getToken(); if (deviceToken != null) { - await StorageRepositoryImpl() - .set(SecureStorageKey.token.value, deviceToken); + await StorageHelper().set(SecureStorageKey.token.value, deviceToken); final ApiCallResponse? response; response = await PhpGroup.updToken.call(); diff --git a/lib/features/notification/notification_service.dart b/lib/features/notification/notification_service.dart index f6077087..8e1662d6 100644 --- a/lib/features/notification/notification_service.dart +++ b/lib/features/notification/notification_service.dart @@ -16,8 +16,7 @@ Future onMessageReceived( final localId = jsonDecode(payload['local']!)['CLI_ID']; final cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; answersRequest( {required BuildContext context, @@ -252,7 +251,7 @@ Future onMessageReceived( break; case 'enroll_cond': - await StorageRepositoryImpl().set(SecureStorageKey.haveLocal.value, true); + await StorageHelper().set(SecureStorageKey.haveLocal.value, true); navigatorKey.currentContext!.go('/homePage'); break; default: @@ -289,13 +288,13 @@ class NotificationService { await AwesomeNotifications() .isNotificationAllowed() .then((isAllowed) async { - final bool requestOSnotification = (await StorageRepositoryImpl() + final bool requestOSnotification = (await StorageHelper() .get(LocalsStorageKey.requestOSNotification.key)) == 'true'; if (requestOSnotification == false) { if (isAllowed == false) { - await StorageRepositoryImpl() + await StorageHelper() .set(LocalsStorageKey.requestOSNotification.key, true); await AwesomeNotifications().requestPermissionToSendNotifications(); } diff --git a/lib/features/storage/repositories/storage_repository_impl.dart b/lib/features/storage/repositories/storage_repository_impl.dart index 62c06253..30f3fd0d 100644 --- a/lib/features/storage/repositories/storage_repository_impl.dart +++ b/lib/features/storage/repositories/storage_repository_impl.dart @@ -4,11 +4,10 @@ import 'package:flutter/cupertino.dart'; import 'package:hub/features/profile/data/data_sources/profile_local_data_source.dart'; import 'package:hub/features/storage/index.dart'; -class StorageRepositoryImpl implements StorageRepository { - static final StorageRepositoryImpl _instance = - StorageRepositoryImpl._internal(); - factory StorageRepositoryImpl() => _instance; - StorageRepositoryImpl._internal(); +class StorageHelper implements StorageRepository { + static final StorageHelper _instance = StorageHelper._internal(); + factory StorageHelper() => _instance; + StorageHelper._internal(); late BuildContext? _context; BuildContext? get context => _context; diff --git a/lib/flutter_flow/nav/nav.dart b/lib/flutter_flow/nav/nav.dart index dd644f4f..007b1dda 100644 --- a/lib/flutter_flow/nav/nav.dart +++ b/lib/flutter_flow/nav/nav.dart @@ -86,20 +86,20 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { builder: (context, _) { return FutureBuilder( future: () async { - final bool isLogged = await StorageRepositoryImpl() - .get(SecureStorageKey.isLogged.value) == - 'true'; - final bool haveLocal = await StorageRepositoryImpl() - .get(SecureStorageKey.haveLocal.value) == - 'true'; - final bool haveUserUUID = (await StorageRepositoryImpl() - .get(ProfileStorageKey.userUUID.key)) - ?.isNotEmpty ?? - false; - final bool haveDevUUID = (await StorageRepositoryImpl() - .get(ProfileStorageKey.devUUID.key)) - ?.isNotEmpty ?? - false; + final bool isLogged = + await StorageHelper().get(SecureStorageKey.isLogged.value) == + 'true'; + final bool haveLocal = + await StorageHelper().get(SecureStorageKey.haveLocal.value) == + 'true'; + final bool haveUserUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) + ?.isNotEmpty ?? + false; + final bool haveDevUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) + ?.isNotEmpty ?? + false; if (isLogged && haveDevUUID && haveUserUUID) { return haveLocal diff --git a/lib/initialization.dart b/lib/initialization.dart index d8458100..27bdc509 100644 --- a/lib/initialization.dart +++ b/lib/initialization.dart @@ -16,7 +16,7 @@ import 'package:hub/flutter_flow/nav/nav.dart'; Future initializeApp() async { WidgetsFlutterBinding.ensureInitialized(); await _initializeTracking(); - await StorageRepositoryImpl().init(); + await StorageHelper().init(); await _initializeFirebase(); await _initializeNotificationService(); diff --git a/lib/main.dart b/lib/main.dart index d0ed8268..b97e09e4 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -29,8 +29,8 @@ void main() async { Future _foregroundHandlerMessage(RemoteMessage message) async { if (message.data['click_action'] == 'enroll_cond') { - await StorageRepositoryImpl().set(SecureStorageKey.haveLocal.value, true); - StorageRepositoryImpl().context?.go('/homePage'); + await StorageHelper().set(SecureStorageKey.haveLocal.value, true); + StorageHelper().context?.go('/homePage'); } if (!Platform.isIOS) { @@ -43,8 +43,8 @@ Future _foregroundHandlerMessage(RemoteMessage message) async { Future _backgroundHandlerMessage(RemoteMessage message) async { if (message.data['click_action'] == 'enroll_cond') { - await StorageRepositoryImpl().set(SecureStorageKey.haveLocal.value, true); - StorageRepositoryImpl().context?.go('/homePage'); + await StorageHelper().set(SecureStorageKey.haveLocal.value, true); + StorageHelper().context?.go('/homePage'); } } @@ -137,8 +137,7 @@ class _AppState extends State { FirebaseMessaging.onMessage.listen(_foregroundHandlerMessage); FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) async { if (message.data['click_action'] == 'enroll_cond') { - await StorageRepositoryImpl() - .set(SecureStorageKey.haveLocal.value, true); + await StorageHelper().set(SecureStorageKey.haveLocal.value, true); log('onMessageOpenedApp'); } else { onMessageReceived(message.data, message.notification!.body, @@ -148,8 +147,7 @@ class _AppState extends State { FirebaseMessaging.instance.getInitialMessage().then((message) async { if (message != null) { if (message.data['click_action'] == 'enroll_cond') { - await StorageRepositoryImpl() - .set(SecureStorageKey.haveLocal.value, true); + await StorageHelper().set(SecureStorageKey.haveLocal.value, true); log('getInitialMessage'); } } diff --git a/lib/pages/fast_pass_page/fast_pass_page_widget.dart b/lib/pages/fast_pass_page/fast_pass_page_widget.dart index 7005069f..6cc9a845 100644 --- a/lib/pages/fast_pass_page/fast_pass_page_widget.dart +++ b/lib/pages/fast_pass_page/fast_pass_page_widget.dart @@ -25,19 +25,15 @@ class _FastPassPageWidgetState extends State { Future> initVariables() async { final email = - (await StorageRepositoryImpl().get(SecureStorageKey.email.value)) ?? ''; + (await StorageHelper().get(SecureStorageKey.email.value)) ?? ''; final name = - (await StorageRepositoryImpl().get(ProfileStorageKey.userName.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userName.key)) ?? ''; final devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const createdAt = '0000-00-00 00:00:00'; final url = 'https://hub.freaccess.com.br/hub/fast-pass/$cliUUID'; final freUserData = diff --git a/lib/pages/forgot_password_page/forgot_password_screen.dart b/lib/pages/forgot_password_page/forgot_password_screen.dart index 9c86037b..bf737647 100644 --- a/lib/pages/forgot_password_page/forgot_password_screen.dart +++ b/lib/pages/forgot_password_page/forgot_password_screen.dart @@ -112,7 +112,7 @@ class _ForgotPasswordScreenState extends State ), onPressed: () async { context.pop(); - StorageRepositoryImpl().isRecovered = false; + StorageHelper().isRecovered = false; }, ), title: Text( diff --git a/lib/pages/liberation_history/liberation_history_model.dart b/lib/pages/liberation_history/liberation_history_model.dart index dd6dca6b..dc93f26b 100644 --- a/lib/pages/liberation_history/liberation_history_model.dart +++ b/lib/pages/liberation_history/liberation_history_model.dart @@ -36,15 +36,11 @@ class LiberationHistoryModel extends FlutterFlowModel { } Future init() async { - devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } Future answersRequest( diff --git a/lib/pages/message_history_page/message_history_page_model.dart b/lib/pages/message_history_page/message_history_page_model.dart index 9152fe73..68efb77d 100644 --- a/lib/pages/message_history_page/message_history_page_model.dart +++ b/lib/pages/message_history_page/message_history_page_model.dart @@ -41,15 +41,11 @@ class MessageHistoryPageModel } Future init() async { - devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } @override diff --git a/lib/pages/package_order_page/package_order_page.dart b/lib/pages/package_order_page/package_order_page.dart index 04efe6ee..8bbbd340 100644 --- a/lib/pages/package_order_page/package_order_page.dart +++ b/lib/pages/package_order_page/package_order_page.dart @@ -66,8 +66,7 @@ class _PackageOrderPage extends State { Future initDatabase() async { cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key) ?? - ''); + (await StorageHelper().get(ProfileStorageKey.clientUUID.key) ?? ''); } @override diff --git a/lib/pages/pets_on_the_property_page/pets_history_screen.dart b/lib/pages/pets_on_the_property_page/pets_history_screen.dart index 81166b5c..98ad75cb 100644 --- a/lib/pages/pets_on_the_property_page/pets_history_screen.dart +++ b/lib/pages/pets_on_the_property_page/pets_history_screen.dart @@ -308,18 +308,14 @@ class _PetsHistoryScreenState extends State } ], onTapCardItemAction: () async { - final devUUID = (await StorageRepositoryImpl() - .get(ProfileStorageKey.devUUID.key)) ?? - ''; - final userUUID = (await StorageRepositoryImpl() - .get(ProfileStorageKey.userUUID.key)) ?? - ''; - final cliUUID = (await StorageRepositoryImpl() - .get(ProfileStorageKey.clientUUID.key)) ?? - ''; - final cliName = (await StorageRepositoryImpl() - .get(ProfileStorageKey.clientName.key)) ?? - ''; + final devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final cliName = + (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; await showDialog( useSafeArea: true, context: context, diff --git a/lib/pages/pets_page/pets_page_model.dart b/lib/pages/pets_page/pets_page_model.dart index 1407a649..c8473787 100644 --- a/lib/pages/pets_page/pets_page_model.dart +++ b/lib/pages/pets_page/pets_page_model.dart @@ -149,18 +149,13 @@ class PetsPageModel extends FlutterFlowModel { textControllerObservation = TextEditingController(); WidgetsBinding.instance.addPostFrameCallback((_) async { - devUUID = - await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key) ?? - ''; + devUUID = await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? ''; userUUID = - await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key) ?? - ''; + await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? ''; cliUUID = - await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key) ?? - ''; + await StorageHelper().get(ProfileStorageKey.clientUUID.key) ?? ''; petAmountRegister = - await StorageRepositoryImpl().get(LocalsStorageKey.petAmount.key) ?? - ''; + await StorageHelper().get(LocalsStorageKey.petAmount.key) ?? ''; }); } diff --git a/lib/pages/preferences_settings_page/preferences_settings_model.dart b/lib/pages/preferences_settings_page/preferences_settings_model.dart index fa844ec9..80925889 100644 --- a/lib/pages/preferences_settings_page/preferences_settings_model.dart +++ b/lib/pages/preferences_settings_page/preferences_settings_model.dart @@ -23,16 +23,11 @@ class PreferencesPageModel with ChangeNotifier { Future _initialize() async { isFingerprint = - await StorageRepositoryImpl().get(LocalsStorageKey.fingerprint.key) == - 'true'; - isPerson = await StorageRepositoryImpl().get(LocalsStorageKey.person.key) == - 'true'; - isNotify = await StorageRepositoryImpl().get(LocalsStorageKey.notify.key) == - 'true'; - isAccess = await StorageRepositoryImpl().get(LocalsStorageKey.access.key) == - 'true'; - isPanic = - await StorageRepositoryImpl().get(LocalsStorageKey.panic.key) == 'true'; + await StorageHelper().get(LocalsStorageKey.fingerprint.key) == 'true'; + isPerson = await StorageHelper().get(LocalsStorageKey.person.key) == 'true'; + isNotify = await StorageHelper().get(LocalsStorageKey.notify.key) == 'true'; + isAccess = await StorageHelper().get(LocalsStorageKey.access.key) == 'true'; + isPanic = await StorageHelper().get(LocalsStorageKey.panic.key) == 'true'; notifyListeners(); } @@ -41,9 +36,8 @@ class PreferencesPageModel with ChangeNotifier { } Future enablePerson(BuildContext context) async { - final String userDevUUID = (await StorageRepositoryImpl() - .get(ProfileStorageKey.userDevUUID.key)) ?? - ''; + final String userDevUUID = + (await StorageHelper().get(ProfileStorageKey.userDevUUID.key)) ?? ''; notifyListeners(); Share.share( FFLocalizations.of(context).getVariableText( @@ -70,8 +64,7 @@ class PreferencesPageModel with ChangeNotifier { .call(notifica: value) .then((value) async { if (value.jsonBody['error'] == false) { - await StorageRepositoryImpl() - .set(LocalsStorageKey.notify.key, !isNotify); + await StorageHelper().set(LocalsStorageKey.notify.key, !isNotify); content = FFLocalizations.of(context).getVariableText( enText: 'Notification changed successfully', ptText: 'Notificação alterada com sucesso', @@ -94,8 +87,7 @@ class PreferencesPageModel with ChangeNotifier { SnackBarUtil.showSnackBar(context, content, isError: true); }) .then((_) async => isNotify = - await StorageRepositoryImpl().get(LocalsStorageKey.notify.key) == - 'true') + await StorageHelper().get(LocalsStorageKey.notify.key) == 'true') .whenComplete(() => notifyListeners()); context.pop(); } @@ -146,13 +138,13 @@ class PreferencesPageModel with ChangeNotifier { Future toggleAccess(BuildContext context) async { onChange(String key) async { - await StorageRepositoryImpl().set(SecureStorageKey.accessPass.value, key); + await StorageHelper().set(SecureStorageKey.accessPass.value, key); await PhpGroup.changePass .call(newSenha: key) .then((value) async { final String content; if (jsonDecode(value.jsonBody['error'].toString()) == false) { - await StorageRepositoryImpl() + await StorageHelper() .set(LocalsStorageKey.access.key, isAccess ? false : true); notifyListeners(); content = FFLocalizations.of(context).getVariableText( @@ -176,8 +168,7 @@ class PreferencesPageModel with ChangeNotifier { SnackBarUtil.showSnackBar(context, content, isError: true); }) .then((_) async => isAccess = - await StorageRepositoryImpl().get(LocalsStorageKey.access.key) == - 'true') + await StorageHelper().get(LocalsStorageKey.access.key) == 'true') .whenComplete(() => notifyListeners()); } @@ -186,13 +177,13 @@ class PreferencesPageModel with ChangeNotifier { Future togglePanic(BuildContext context) async { onChange(String key) async { - await StorageRepositoryImpl().set(SecureStorageKey.panicPass.value, key); + await StorageHelper().set(SecureStorageKey.panicPass.value, key); await PhpGroup.changePanic .call(newSenhaPanico: key) .then((value) async { final String content; if (jsonDecode(value.jsonBody['error'].toString()) == false) { - await StorageRepositoryImpl() + await StorageHelper() .set(LocalsStorageKey.panic.key, isPanic ? 'false' : 'true'); notifyListeners(); content = FFLocalizations.of(context).getVariableText( @@ -216,8 +207,7 @@ class PreferencesPageModel with ChangeNotifier { SnackBarUtil.showSnackBar(context, content, isError: true); }) .then((_) async => isPanic = - await StorageRepositoryImpl().get(LocalsStorageKey.panic.key) == - 'true') + await StorageHelper().get(LocalsStorageKey.panic.key) == 'true') .whenComplete(() => notifyListeners()); } @@ -232,15 +222,14 @@ class PreferencesPageModel with ChangeNotifier { onChange(String? key) async { isFingerprint = !isFingerprint; - await StorageRepositoryImpl() + await StorageHelper() .set(SecureStorageKey.fingerprintPass.value, key ?? ''); - await StorageRepositoryImpl().set( + await StorageHelper().set( LocalsStorageKey.fingerprint.key, isFingerprint ? 'true' : 'false'); notifyListeners(); SnackBarUtil.showSnackBar(context, content); isFingerprint = - await StorageRepositoryImpl().get(LocalsStorageKey.fingerprint.key) == - 'true'; + await StorageHelper().get(LocalsStorageKey.fingerprint.key) == 'true'; } isFingerprint ? onChange(null) : _showPassKey(context, onChange); diff --git a/lib/pages/qr_code_page/qr_code_page_model.dart b/lib/pages/qr_code_page/qr_code_page_model.dart index f5d6a8b0..bec899f0 100644 --- a/lib/pages/qr_code_page/qr_code_page_model.dart +++ b/lib/pages/qr_code_page/qr_code_page_model.dart @@ -30,11 +30,9 @@ class QrCodePageModel extends FlutterFlowModel { Future initVariable() async { isFingerprint = - await StorageRepositoryImpl().get(LocalsStorageKey.fingerprint.key) == - 'true'; + await StorageHelper().get(LocalsStorageKey.fingerprint.key) == 'true'; userDevUUID = - await StorageRepositoryImpl().get(ProfileStorageKey.userDevUUID.key) ?? - ''; + await StorageHelper().get(ProfileStorageKey.userDevUUID.key) ?? ''; safeSetState?.call(); } diff --git a/lib/pages/qr_code_page/qr_code_page_widget.dart b/lib/pages/qr_code_page/qr_code_page_widget.dart index 1c92b82d..0fa56484 100644 --- a/lib/pages/qr_code_page/qr_code_page_widget.dart +++ b/lib/pages/qr_code_page/qr_code_page_widget.dart @@ -396,7 +396,7 @@ class _QrCodePageWidgetState extends State await BiometricHelper.authenticateBiometric().then((value) async { if (value == false) throw Exception('Biometric authentication failed'); - final key = await StorageRepositoryImpl() + final key = await StorageHelper() .get(SecureStorageKey.fingerprintPass.value); if (key == null || key.isEmpty) throw Exception('No key found'); safeSetState(() { diff --git a/lib/pages/reception_page/reception_page_model.dart b/lib/pages/reception_page/reception_page_model.dart index 0cbb2fba..e72e9b96 100644 --- a/lib/pages/reception_page/reception_page_model.dart +++ b/lib/pages/reception_page/reception_page_model.dart @@ -5,9 +5,8 @@ import 'package:share_plus/share_plus.dart'; class ReceptionPageModel with ChangeNotifier { Future getIdenfifier(BuildContext context) async { - final String userDevUUID = (await StorageRepositoryImpl() - .get(ProfileStorageKey.userDevUUID.key)) ?? - ''; + final String userDevUUID = + (await StorageHelper().get(ProfileStorageKey.userDevUUID.key)) ?? ''; notifyListeners(); Share.share( diff --git a/lib/pages/reception_page/reception_page_widget.dart b/lib/pages/reception_page/reception_page_widget.dart index 6ba4401e..e7d5718e 100644 --- a/lib/pages/reception_page/reception_page_widget.dart +++ b/lib/pages/reception_page/reception_page_widget.dart @@ -61,7 +61,7 @@ class _ReceptionPageWidgetState extends State double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context); double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context); - StorageRepositoryImpl().context = context; + StorageHelper().context = context; return ChangeNotifierProvider( create: (context) => ReceptionPageModel(), child: Scaffold( diff --git a/lib/pages/reservation_page/reservation_page_widget.dart b/lib/pages/reservation_page/reservation_page_widget.dart index ce32974a..a75cd567 100644 --- a/lib/pages/reservation_page/reservation_page_widget.dart +++ b/lib/pages/reservation_page/reservation_page_widget.dart @@ -23,19 +23,15 @@ class _ReservationPageWidgetState extends State { Future> initVariables() async { final email = - (await StorageRepositoryImpl().get(SecureStorageKey.email.value)) ?? ''; + (await StorageHelper().get(SecureStorageKey.email.value)) ?? ''; final name = - (await StorageRepositoryImpl().get(ProfileStorageKey.userName.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userName.key)) ?? ''; final devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; final userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; final clientId = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; const createdAt = '0000-00-00 00:00:00'; final url = 'https://hub.freaccess.com.br/hub/reservation/$clientId'; final freUserData = diff --git a/lib/pages/residents_on_the_property/residents_on_the_property_model.dart b/lib/pages/residents_on_the_property/residents_on_the_property_model.dart index 067f574e..02c42ef4 100644 --- a/lib/pages/residents_on_the_property/residents_on_the_property_model.dart +++ b/lib/pages/residents_on_the_property/residents_on_the_property_model.dart @@ -18,12 +18,9 @@ class ResidentsOnThePropertyModel } void initVariables() async { - devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; onRefresh?.call(); } diff --git a/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart b/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart index 651eae66..f7248d93 100644 --- a/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart +++ b/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart @@ -230,15 +230,11 @@ class ScheduleCompleteVisitPageModel } Future _initVariables() async { - devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } @override diff --git a/lib/pages/schedule_complete_visit_page/visit_history_page_widget.dart b/lib/pages/schedule_complete_visit_page/visit_history_page_widget.dart index 09ed7282..bafb04bb 100644 --- a/lib/pages/schedule_complete_visit_page/visit_history_page_widget.dart +++ b/lib/pages/schedule_complete_visit_page/visit_history_page_widget.dart @@ -36,15 +36,11 @@ class _VisitHistoryWidgetState extends State List _visitWrap = []; Future _initVariables() async { - devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; userUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.userUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; } @override @@ -269,18 +265,14 @@ class _VisitHistoryWidgetState extends State }, ], onTapCardItemAction: () async { - final devUUID = (await StorageRepositoryImpl() - .get(ProfileStorageKey.devUUID.key)) ?? - ''; - final userUUID = (await StorageRepositoryImpl() - .get(ProfileStorageKey.userUUID.key)) ?? - ''; - final cliUUID = (await StorageRepositoryImpl() - .get(ProfileStorageKey.clientUUID.key)) ?? - ''; - final cliName = (await StorageRepositoryImpl() - .get(ProfileStorageKey.clientName.key)) ?? - ''; + final devUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; + final userUUID = + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? ''; + final cliUUID = + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; + final cliName = + (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? ''; await showDialog( useSafeArea: true, diff --git a/lib/pages/sign_in_page/sign_in_page_widget.dart b/lib/pages/sign_in_page/sign_in_page_widget.dart index e7e18250..e632670a 100644 --- a/lib/pages/sign_in_page/sign_in_page_widget.dart +++ b/lib/pages/sign_in_page/sign_in_page_widget.dart @@ -33,7 +33,7 @@ class _SignInPageWidgetState extends State { @override Widget build(BuildContext context) { - StorageRepositoryImpl().context = context; + StorageHelper().context = context; return GestureDetector( onTap: () => _model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(_model.unfocusNode) diff --git a/lib/pages/sign_up_page/sign_up_page_widget.dart b/lib/pages/sign_up_page/sign_up_page_widget.dart index 324b05e0..e91ac753 100644 --- a/lib/pages/sign_up_page/sign_up_page_widget.dart +++ b/lib/pages/sign_up_page/sign_up_page_widget.dart @@ -36,7 +36,7 @@ class _SignUpPageWidgetState extends State { @override Widget build(BuildContext context) { - StorageRepositoryImpl().context = context; + StorageHelper().context = context; return GestureDetector( onTap: () => _model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(_model.unfocusNode) diff --git a/lib/pages/visits_on_the_property/model.dart b/lib/pages/visits_on_the_property/model.dart index c9f031f8..2ddcd047 100644 --- a/lib/pages/visits_on_the_property/model.dart +++ b/lib/pages/visits_on_the_property/model.dart @@ -30,12 +30,9 @@ class VisitsModel extends FlutterFlowModel { void dispose() {} Future initAsync() async { - devUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.devUUID.key)) ?? - ''; + devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? ''; cliUUID = - (await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key)) ?? - ''; + (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? ''; onRefresh?.call(); } diff --git a/lib/pages/welcome_page/welcome_page_widget.dart b/lib/pages/welcome_page/welcome_page_widget.dart index 479a73d6..5b3f46ea 100644 --- a/lib/pages/welcome_page/welcome_page_widget.dart +++ b/lib/pages/welcome_page/welcome_page_widget.dart @@ -31,16 +31,13 @@ class _WelcomePageWidgetState extends State { // On page load action. SchedulerBinding.instance.addPostFrameCallback((_) async { if (isAndroid == true) { - await StorageRepositoryImpl() - .set(SecureStorageKey.deviceType.value, 'Android'); + await StorageHelper().set(SecureStorageKey.deviceType.value, 'Android'); setState(() {}); } else if (isiOS == true) { - await StorageRepositoryImpl() - .set(SecureStorageKey.deviceType.value, 'iOS'); + await StorageHelper().set(SecureStorageKey.deviceType.value, 'iOS'); setState(() {}); } else { - await StorageRepositoryImpl() - .set(SecureStorageKey.deviceType.value, 'Web'); + await StorageHelper().set(SecureStorageKey.deviceType.value, 'Web'); setState(() {}); } }); @@ -54,7 +51,7 @@ class _WelcomePageWidgetState extends State { @override Widget build(BuildContext context) { - StorageRepositoryImpl().context = context; + StorageHelper().context = context; return GestureDetector( onTap: () => _model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(_model.unfocusNode) diff --git a/lib/shared/utils/share_util.dart b/lib/shared/utils/share_util.dart index d4288e70..a9c410f7 100644 --- a/lib/shared/utils/share_util.dart +++ b/lib/shared/utils/share_util.dart @@ -3,10 +3,8 @@ import 'package:share_plus/share_plus.dart'; class ShareUtil { static Future showShare(payload) async { - final cliName = - await StorageRepositoryImpl().get(ProfileStorageKey.clientName.key); - final cliUUID = - await StorageRepositoryImpl().get(ProfileStorageKey.clientUUID.key); + final cliName = await StorageHelper().get(ProfileStorageKey.clientName.key); + final cliUUID = await StorageHelper().get(ProfileStorageKey.clientUUID.key); for (var i = 0; i < payload['convites'].length; i++) { await Share.share(''' From 76d053ff10fef75e29665b8243447c83397321de Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Fri, 20 Dec 2024 11:08:49 -0300 Subject: [PATCH 15/25] fix updateStorage --- lib/features/local/utils/local_util.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/features/local/utils/local_util.dart b/lib/features/local/utils/local_util.dart index 202e911a..0338315e 100644 --- a/lib/features/local/utils/local_util.dart +++ b/lib/features/local/utils/local_util.dart @@ -120,7 +120,7 @@ class LocalUtil { jsonBody['visitado']['VDO_NOTTERCEIROS'], ), ); - if (jsonBody['visitado']['VDO_TEM_SENHA_ACESSO'] == '') { + if (jsonBody['visitado']['VDO_TEM_SENHA_ACESSO'] != null) { await StorageHelper().set( LocalsStorageKey.access.key, _processSystemOption(jsonBody['visitado']['VDO_TEM_SENHA_ACESSO']), From 50fa56841efa5211150ae3d720a66da093c385fc Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Fri, 20 Dec 2024 11:22:07 -0300 Subject: [PATCH 16/25] change fre.png --- assets/images/fre.png | Bin 37300 -> 49860 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/assets/images/fre.png b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59fc9dd2a902815ea6ee04d3dfccfebff4 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Fri, 20 Dec 2024 11:29:23 -0300 Subject: [PATCH 17/25] wip --- assets/images/fre.png | Bin 49860 -> 67162 bytes .../preferences_settings_model.dart | 4 ++-- .../preferences_settings_widget.dart | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/assets/images/fre.png b/assets/images/fre.png index 415089a380f973eb1cc370ac902039a2b11e73ad..642a511caa53ba3679013cc828df9fa6c2a2a13e 100644 GIT binary patch literal 67162 zcmeFYby!qyw?0lc2!gca&^5ylGjzjH0xDg@%+MuW5&|M1HAts~hzQb%NT~>jfRqSG zNJxi-f)c+ye&W36_kGVf@AZxUUN61ev-h)~SkJxIx}UYyjyE#Yrlw$}z{A6%M(Ajm z;NcNz;o%YPlaT;-ZfQ&(ATt63eGVsgwTh&0SD52*6TqZPRIhIxLM zEOOGIZAa?uuLw!bN4kW(_HAq!?t2s;I!7x>AVlwri(F|hMOGS4OVeIcsm%JtW<=q0 zfv5ZKD2&!Fa>`ec^FF+b%Eu00|Ei5!q$QSS++z2}z!Qwc=nlUsD1|g9c?jCd85gfh zKQUs=)VE7$58-r|z1nKp^tAmb;#`q#@&Mymq)nzGs>o!a8uU;+;wH0v`lds#Hw(=! zGUNujP1d^wpRz@>*)n#YQGq4`uj}o#vxDo(eSjp%y>%>n@$kfXasTjx%9R7~@TfLi zZkYR-8|cfSygbB_IQfbPd3Xb@@$eLsgS?R_H;f;b1IEe4Q;}!4t&@k#1+B_{6a=*S@l43v$ zG2dWMKV*=Yr!VhcJ!oKjQ9dr-elA{~T(};Q4qpC#iafwf|5$>D_ut)m`u-^0CTK{%-B-rx^e&<4=M7)7HK>g1s>kCKz8Ye;*V^GXNNo_pjCX`k7$< zL!SS_>p=6rU-olx{4d_cJ^4=pzy!Jc7fo?b{%-0mr|yG6`g!@>@bYs13p+-CNt{bv z9fuV-m!O%8C)z8}R|vO^Ki|P}8#WDDQZ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W52OYAtS6-4#9RLBnptK=IS~DqsUTZj( zmzvI3|EUMsiFX@Q#mcJ0%Z9-mh(N@g8=R7Z?bAgjOD+fXyV9d`AmhE;{I}D9EyO3g zDdcLJv5QV#Y`bguPW3(Ya1V9MU1$%?d1*DOfn#!6B+xTtd!P#y@A-*lRb3%oBb3Lg zu<4KNsLUUm%gpNXDNwo*98FOl@Rd^TS8=~?(5Mwjh+z7)?8nvru_(?{ZYlzop`4gw z7t{3dO#EjR%(#hZI0Pp-5>ZKADdeUM_stf52^Kg72p9V@b9{=fs=5jqiII$7BUIcN z%-Hdmtq8RVO_spL zp=bj4`n`r_UQo%IfBy0*^bFJ8m(IKPZ3rTml|Y`EZ2_A8_n2`XgS$rp;FV*~kkOaE zCGt?&46>^*n70UWw$Zp%l_usa!s5mS>MKX2veTL*_U#-{!?Aona67ze5coEMajpuh zI|RBTzz??YZj^<>$WDuQ=0nQ(m3rSc7(N7?GOYJoi};N+H|b!cdK(AKfXx8ep?lR} zvgL#JxENqfdDP5aZPpiVKu!64v^ae);;(D$HZ$IC)vmK)c)}zfLFqlbEXasb+ZnKV zZqk>rlxDlM2^u26CvXj0mA-nGqg(VQL6~*n{kf2AtO7TP!1I(?CrBe&I4p#16NMNP zaxfJ<_|vlvP?+IkJ|i{wQCQXHspc?&2W;;Q^TLooi;bClj!c&(h_Q0H;bPtRbVn%C z-?X8<{6k}j(U_#}n&W=a3gL#cuG?@v?v*P@PC%+h*1>W*$U&Ge{YRqj4km}g$J%cU zNtEt~k=p$fcm-i%JG&s@_cEyO=p)g-Wsu;uo1BQBKYs`|9t}geFFb|0{=fxKvL@HSi*~kD4^6}>ID3t6*S~aZrywIKL(iOFaQ7m diff --git a/lib/pages/preferences_settings_page/preferences_settings_model.dart b/lib/pages/preferences_settings_page/preferences_settings_model.dart index 80925889..e3be441a 100644 --- a/lib/pages/preferences_settings_page/preferences_settings_model.dart +++ b/lib/pages/preferences_settings_page/preferences_settings_model.dart @@ -66,8 +66,8 @@ class PreferencesPageModel with ChangeNotifier { if (value.jsonBody['error'] == false) { await StorageHelper().set(LocalsStorageKey.notify.key, !isNotify); content = FFLocalizations.of(context).getVariableText( - enText: 'Notification changed successfully', - ptText: 'Notificação alterada com sucesso', + enText: 'Setting changed successfully', + ptText: 'Opção alterada com sucesso', ); notifyListeners(); SnackBarUtil.showSnackBar(context, content); diff --git a/lib/pages/preferences_settings_page/preferences_settings_widget.dart b/lib/pages/preferences_settings_page/preferences_settings_widget.dart index 7cf47f3b..a8da0d72 100644 --- a/lib/pages/preferences_settings_page/preferences_settings_widget.dart +++ b/lib/pages/preferences_settings_page/preferences_settings_widget.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; +import 'package:hub/features/local/data/index.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; @@ -21,6 +22,7 @@ class _PreferencesPageWidgetState extends State { @override void initState() { super.initState(); + LocalsRepositoryImpl().update(context); } @override From 66302358b9e74f1795189d3a9482cafeea0bb063 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Fri, 20 Dec 2024 11:46:04 -0300 Subject: [PATCH 18/25] =?UTF-8?q?fix:=20atualiza=20o=20getDados=20ao=20ent?= =?UTF-8?q?rar=20na=20tela=20de=20op=C3=A7=C3=B5es=20e=20refatora=20o=20pr?= =?UTF-8?q?ocessData=20do=20LocalsRemoteDataSource=20para=20somente=20proc?= =?UTF-8?q?essar=20a=20propriedade=20(Single=20Responsability)=20(antes=20?= =?UTF-8?q?o=20proprio=20m=C3=A9todo=20chamava=20para=20atualizar=20licen?= =?UTF-8?q?=C3=A7a).=20E=20como=20isso=20precisei=20fazer=20com=20que=20el?= =?UTF-8?q?e=20retorna-se=20true=20e=20que=20chama=20processa=20propriedad?= =?UTF-8?q?e=20caso=20retorne=20true=20chame=20processa=20licen=C3=A7a?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../home/presentation/pages/about_system.dart | 4 ++-- .../locals_remote_data_source.dart | 21 +++++++++++----- .../repositories/locals_repository_impl.dart | 24 +++++++++++++++++-- .../respositories/locals_repository.dart | 1 + lib/features/local/utils/local_util.dart | 4 ++-- .../preferences_settings_model.dart | 1 + .../preferences_settings_widget.dart | 1 - 7 files changed, 43 insertions(+), 13 deletions(-) diff --git a/lib/features/home/presentation/pages/about_system.dart b/lib/features/home/presentation/pages/about_system.dart index 26fb1b72..388a464a 100644 --- a/lib/features/home/presentation/pages/about_system.dart +++ b/lib/features/home/presentation/pages/about_system.dart @@ -124,8 +124,8 @@ class _AboutSystemPageState extends State { Widget _buildLogo() { return SizedBox( - height: 50, - width: 50, + height: 100, + width: 100, child: Image.asset('assets/images/fre.png'), ); } diff --git a/lib/features/local/data/data_sources/locals_remote_data_source.dart b/lib/features/local/data/data_sources/locals_remote_data_source.dart index bf4b710b..fd91b648 100644 --- a/lib/features/local/data/data_sources/locals_remote_data_source.dart +++ b/lib/features/local/data/data_sources/locals_remote_data_source.dart @@ -18,7 +18,7 @@ abstract class LocalsRemoteDataSource { Future linkLocal(BuildContext context); Future checkLocals(BuildContext context); Future processLocals(BuildContext context); - Future processData(BuildContext context); + Future processProperty(BuildContext context); Future selectLocal(BuildContext context, ApiCallResponse? response); Future detachLocal(BuildContext context); } @@ -118,10 +118,16 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { return await selectLocal(context, response); } else if (isSelected) { log('() => isSelected'); - return await processData(context); + return await processProperty(context).then((v) async { + if (v == true) return await LicenseRepositoryImpl().updateLicense(); + return v; + }); } else if (isAvailable) { log('() => isAvailable'); - return await processData(context); + return await processProperty(context).then((v) async { + if (v == true) return await LicenseRepositoryImpl().updateLicense(); + return v; + }); } else { if (!isUnique && !isActive) log('() => not unique and not active'); if (!isUnique && isInactived) log('() => not unique and inactived'); @@ -153,7 +159,7 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { } @override - Future processData(BuildContext context) async { + Future processProperty(BuildContext context) async { try { final GetDadosCall callback = PhpGroup.getDadosCall; ApiCallResponse? response = await callback.call(); @@ -178,7 +184,7 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { return false; } else { await LocalUtil.updateStorageUtil(response.jsonBody); - return await LicenseRepositoryImpl().updateLicense(); + return true; } } catch (e, s) { log('() => error processData: $e', stackTrace: s); @@ -209,7 +215,10 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { child: BottomArrowLinkedLocalsComponentWidget(response: response), ), ), - ).then((_) async => await processData(context)); + ).then((_) async => await processProperty(context).then((v) async { + if (v == true) return await LicenseRepositoryImpl().updateLicense(); + return v; + })); } @override diff --git a/lib/features/local/data/repositories/locals_repository_impl.dart b/lib/features/local/data/repositories/locals_repository_impl.dart index 37b49a95..232e511e 100644 --- a/lib/features/local/data/repositories/locals_repository_impl.dart +++ b/lib/features/local/data/repositories/locals_repository_impl.dart @@ -27,11 +27,16 @@ class LocalsRepositoryImpl implements LocalsRepository { @override Future update(BuildContext context) async { LocalsRepositoryImpl.license.add(false); - final bool response = await _handleReponse(context); + final bool response = await _handleLocal(context); LocalsRepositoryImpl.license.add(response); return response; } + @override + Future fetch(BuildContext context) async { + return await _handleProperty(context); + } + Future select(BuildContext context) async { await unselect(); await update(context); @@ -56,7 +61,7 @@ class LocalsRepositoryImpl implements LocalsRepository { } } - Future _handleReponse(BuildContext context) async { + Future _handleLocal(BuildContext context) async { bool response = false; final bool isUnselected = await remoteDataSource.checkLocals(context); if (isUnselected) { @@ -74,6 +79,21 @@ class LocalsRepositoryImpl implements LocalsRepository { } else { return true; } + + return response; + } + + Future _handleProperty(BuildContext context) async { + bool response = false; + try { + response = await remoteDataSource.processProperty(context); + if (!response) { + await _handleUpdateError(context); + } + } catch (e, s) { + log('Error updating locals: $e', stackTrace: s); + await _handleUpdateError(context); + } return response; } diff --git a/lib/features/local/domain/respositories/locals_repository.dart b/lib/features/local/domain/respositories/locals_repository.dart index 1862d79c..6e4dcd97 100644 --- a/lib/features/local/domain/respositories/locals_repository.dart +++ b/lib/features/local/domain/respositories/locals_repository.dart @@ -4,4 +4,5 @@ abstract class LocalsRepository { Future validateLocal(BuildContext context) async {} Future update(BuildContext context) async => false; Future unlinkLocal(BuildContext context) async {} + Future fetch(BuildContext context) async {} } diff --git a/lib/features/local/utils/local_util.dart b/lib/features/local/utils/local_util.dart index 0338315e..32541690 100644 --- a/lib/features/local/utils/local_util.dart +++ b/lib/features/local/utils/local_util.dart @@ -63,7 +63,7 @@ class LocalUtil { } if (response.jsonBody['error'] == false) return await LocalsRemoteDataSourceImpl() - .processData(context) + .processProperty(context) .then((value) => value); } catch (e, s) { await DialogUtil.errorDefault(context); @@ -86,7 +86,7 @@ class LocalUtil { .set(ProfileStorageKey.ownerName.key, local['CLU_OWNER_DSC']); await StorageHelper() .set(ProfileStorageKey.userName.key, local['USU_NOME']); - return await LocalsRemoteDataSourceImpl().processData(context); + return await LocalsRemoteDataSourceImpl().processProperty(context); } static void logLocalsStatus(List locals) { diff --git a/lib/pages/preferences_settings_page/preferences_settings_model.dart b/lib/pages/preferences_settings_page/preferences_settings_model.dart index e3be441a..5e05a735 100644 --- a/lib/pages/preferences_settings_page/preferences_settings_model.dart +++ b/lib/pages/preferences_settings_page/preferences_settings_model.dart @@ -22,6 +22,7 @@ class PreferencesPageModel with ChangeNotifier { late bool isPanic = false; Future _initialize() async { + await LocalsRepositoryImpl().fetch(navigatorKey.currentContext!); isFingerprint = await StorageHelper().get(LocalsStorageKey.fingerprint.key) == 'true'; isPerson = await StorageHelper().get(LocalsStorageKey.person.key) == 'true'; diff --git a/lib/pages/preferences_settings_page/preferences_settings_widget.dart b/lib/pages/preferences_settings_page/preferences_settings_widget.dart index a8da0d72..06c1d96b 100644 --- a/lib/pages/preferences_settings_page/preferences_settings_widget.dart +++ b/lib/pages/preferences_settings_page/preferences_settings_widget.dart @@ -22,7 +22,6 @@ class _PreferencesPageWidgetState extends State { @override void initState() { super.initState(); - LocalsRepositoryImpl().update(context); } @override From ed33d32930307176d45980d905c524162b46d6cb Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Fri, 20 Dec 2024 16:41:21 -0300 Subject: [PATCH 19/25] wip labels --- .../shared_components_atoms/appbar.dart | 10 ++------- .../pages/acess_history_page_widget.dart | 10 ++------- .../pages/provisional_history_page.dart | 10 ++------- .../home/presentation/pages/about_system.dart | 10 ++------- .../delivery_schedule_widget.dart | 10 ++------- .../liberation_history_widget.dart | 10 ++------- .../message_history_page_widget.dart | 10 ++------- .../package_order_page.dart | 15 +++++-------- .../people_on_the_property_page_widget.dart | 10 ++------- .../pets_history_screen.dart | 19 +++++++---------- .../preferences_settings_model.dart | 3 +++ .../preferences_settings_widget.dart | 17 ++++++--------- .../provisional_schedule_widget.dart | 10 ++------- .../qr_code_page/qr_code_page_widget.dart | 21 +++---------------- .../register_visitor_page_widget.dart | 11 ++-------- .../residents_on_the_property_screen.dart | 15 +++++-------- .../vehicles_on_the_property.dart | 15 +++++-------- .../visits_on_the_property_screen.dart | 15 +++++-------- lib/shared/utils/style_util.dart | 16 ++++++++++++++ 19 files changed, 75 insertions(+), 162 deletions(-) create mode 100644 lib/shared/utils/style_util.dart diff --git a/lib/components/atomic_components/shared_components_atoms/appbar.dart b/lib/components/atomic_components/shared_components_atoms/appbar.dart index 6fe9a824..1db784d7 100644 --- a/lib/components/atomic_components/shared_components_atoms/appbar.dart +++ b/lib/components/atomic_components/shared_components_atoms/appbar.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; +import 'package:hub/shared/utils/style_util.dart'; class AppBarUtil extends StatelessWidget implements PreferredSizeWidget { final String title; @@ -36,14 +37,7 @@ class AppBarUtil extends StatelessWidget implements PreferredSizeWidget { ), title: Text( title, - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ), + style: DesignUtil.appbarStyle(), ), actions: [ if (actionButton != null) actionButton!, diff --git a/lib/features/history/presentation/pages/acess_history_page_widget.dart b/lib/features/history/presentation/pages/acess_history_page_widget.dart index b97d5450..a033a071 100644 --- a/lib/features/history/presentation/pages/acess_history_page_widget.dart +++ b/lib/features/history/presentation/pages/acess_history_page_widget.dart @@ -12,6 +12,7 @@ import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; +import 'package:hub/shared/utils/style_util.dart'; import 'package:rxdart/rxdart.dart'; @immutable @@ -110,14 +111,7 @@ class _AccessHistoryState extends State { Widget _title(BuildContext context, FlutterFlowTheme theme) { return Text( FFLocalizations.of(context).getText('ch8qymga'), - style: theme.headlineMedium.override( - fontFamily: theme.headlineMediumFamily, - color: theme.primaryText, - fontSize: 16.0, - letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(theme.headlineMediumFamily), - ), + style: DesignUtil.appbarStyle(), ); } diff --git a/lib/features/history/presentation/pages/provisional_history_page.dart b/lib/features/history/presentation/pages/provisional_history_page.dart index e69fc452..e7672e6f 100644 --- a/lib/features/history/presentation/pages/provisional_history_page.dart +++ b/lib/features/history/presentation/pages/provisional_history_page.dart @@ -14,6 +14,7 @@ import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; import 'package:hub/shared/utils/snackbar_util.dart'; +import 'package:hub/shared/utils/style_util.dart'; import 'package:rxdart/rxdart.dart'; @immutable @@ -110,14 +111,7 @@ class ProvisionalHistoryState extends State { ptText: 'Consultar Agendas', enText: 'Provisional History', ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - fontWeight: FontWeight.bold, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ), + style: DesignUtil.appbarStyle(), ); } diff --git a/lib/features/home/presentation/pages/about_system.dart b/lib/features/home/presentation/pages/about_system.dart index 388a464a..3d934065 100644 --- a/lib/features/home/presentation/pages/about_system.dart +++ b/lib/features/home/presentation/pages/about_system.dart @@ -7,6 +7,7 @@ import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/internationalization.dart'; +import 'package:hub/shared/utils/style_util.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -87,14 +88,7 @@ class _AboutSystemPageState extends State { ptText: 'Sobre o Sistema', enText: 'About the System', ), - style: theme.headlineMedium.override( - fontFamily: theme.headlineMediumFamily, - color: theme.primaryText, - fontSize: 16.0, - letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(theme.headlineMediumFamily), - ), + style: DesignUtil.appbarStyle(), ); } diff --git a/lib/pages/delivery_schedule_page/delivery_schedule_widget.dart b/lib/pages/delivery_schedule_page/delivery_schedule_widget.dart index 46d3c440..cc661034 100644 --- a/lib/pages/delivery_schedule_page/delivery_schedule_widget.dart +++ b/lib/pages/delivery_schedule_page/delivery_schedule_widget.dart @@ -4,6 +4,7 @@ import 'package:hub/components/templates_components/provisional_schedule_templat import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; +import 'package:hub/shared/utils/style_util.dart'; import '/flutter_flow/flutter_flow_util.dart'; @@ -54,14 +55,7 @@ class _DeliveryScheduleState extends State { enText: 'Delivery Schedule', ptText: 'Agendar Entregas', ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - fontWeight: FontWeight.bold, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ), + style: DesignUtil.appbarStyle(), ), actions: const [], centerTitle: true, diff --git a/lib/pages/liberation_history/liberation_history_widget.dart b/lib/pages/liberation_history/liberation_history_widget.dart index 53c22e26..dc8a9b50 100644 --- a/lib/pages/liberation_history/liberation_history_widget.dart +++ b/lib/pages/liberation_history/liberation_history_widget.dart @@ -13,6 +13,7 @@ import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; import 'package:hub/shared/utils/snackbar_util.dart'; +import 'package:hub/shared/utils/style_util.dart'; import 'package:hub/shared/utils/validator_util.dart'; class LiberationHistoryWidget extends StatefulWidget { @@ -120,14 +121,7 @@ class _LiberationHistoryWidgetState extends State { FFLocalizations.of(context).getText( '784f83pc' /* Histórico de Liberação */, ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - fontWeight: FontWeight.bold, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ), + style: DesignUtil.appbarStyle(), ), actions: const [], centerTitle: true, diff --git a/lib/pages/message_history_page/message_history_page_widget.dart b/lib/pages/message_history_page/message_history_page_widget.dart index 98f1effd..ce9294c3 100644 --- a/lib/pages/message_history_page/message_history_page_widget.dart +++ b/lib/pages/message_history_page/message_history_page_widget.dart @@ -9,6 +9,7 @@ import 'package:hub/pages/message_history_page/message_history_page_model.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; +import 'package:hub/shared/utils/style_util.dart'; class MessageHistoryPageWidget extends StatefulWidget { const MessageHistoryPageWidget({super.key}); @@ -164,14 +165,7 @@ class _MessageHistoryPageWidgetState extends State enText: 'Message History', ptText: 'Consultar Mensagens', ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: LimitedFontSizeUtil.getHeaderFontSize(context), - fontWeight: FontWeight.bold, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ), + style: DesignUtil.appbarStyle(), ), actions: const [], centerTitle: true, diff --git a/lib/pages/package_order_page/package_order_page.dart b/lib/pages/package_order_page/package_order_page.dart index 8bbbd340..3f2c1fb3 100644 --- a/lib/pages/package_order_page/package_order_page.dart +++ b/lib/pages/package_order_page/package_order_page.dart @@ -14,6 +14,7 @@ import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; +import 'package:hub/shared/utils/style_util.dart'; import 'package:hub/shared/utils/validator_util.dart'; import 'package:rxdart/rxdart.dart'; @@ -233,16 +234,10 @@ class _PackageOrderPage extends State { backgroundColor: FlutterFlowTheme.of(context).primaryBackground, automaticallyImplyLeading: false, title: Text( - FFLocalizations.of(context) - .getVariableText(enText: 'Orders', ptText: 'Encomendas'), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - )), + FFLocalizations.of(context) + .getVariableText(enText: 'Orders', ptText: 'Encomendas'), + style: DesignUtil.appbarStyle(), + ), leading: _backButton(context, FlutterFlowTheme.of(context)), centerTitle: true, elevation: 0.0, diff --git a/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart b/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart index 09a545b1..5af550a6 100644 --- a/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart +++ b/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart @@ -8,6 +8,7 @@ import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/pages/people_on_the_property_page/people_on_the_property_page_model.dart'; +import 'package:hub/shared/utils/style_util.dart'; import '../../shared/utils/log_util.dart'; @@ -64,14 +65,7 @@ class _PeopleOnThePropertyPageState extends State { FFLocalizations.of(context).getText( 'nsu13r5d' /* Pessoas na Propriedade */, ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ), + style: DesignUtil.appbarStyle(), ), actions: const [], centerTitle: true, diff --git a/lib/pages/pets_on_the_property_page/pets_history_screen.dart b/lib/pages/pets_on_the_property_page/pets_history_screen.dart index 98ad75cb..f908cd71 100644 --- a/lib/pages/pets_on_the_property_page/pets_history_screen.dart +++ b/lib/pages/pets_on_the_property_page/pets_history_screen.dart @@ -13,6 +13,7 @@ import 'package:hub/pages/pets_page/pets_page_model.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; +import 'package:hub/shared/utils/style_util.dart'; class PetsHistoryScreen extends StatefulWidget { const PetsHistoryScreen({super.key, this.model, required this.isApp}); @@ -62,18 +63,12 @@ class _PetsHistoryScreenState extends State backgroundColor: FlutterFlowTheme.of(context).primaryBackground, automaticallyImplyLeading: false, title: Text( - FFLocalizations.of(context).getVariableText( - ptText: 'Pets', - enText: 'Pets', - ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - )), + FFLocalizations.of(context).getVariableText( + ptText: 'Pets', + enText: 'Pets', + ), + style: DesignUtil.appbarStyle(), + ), leading: _backButton(context, FlutterFlowTheme.of(context)), centerTitle: true, elevation: 0.0, diff --git a/lib/pages/preferences_settings_page/preferences_settings_model.dart b/lib/pages/preferences_settings_page/preferences_settings_model.dart index 5e05a735..cd52eb59 100644 --- a/lib/pages/preferences_settings_page/preferences_settings_model.dart +++ b/lib/pages/preferences_settings_page/preferences_settings_model.dart @@ -1,3 +1,6 @@ +import 'dart:async'; +import 'dart:isolate'; + import 'package:flutter/material.dart'; import 'package:hub/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart'; import 'package:hub/features/auth/index.dart'; diff --git a/lib/pages/preferences_settings_page/preferences_settings_widget.dart b/lib/pages/preferences_settings_page/preferences_settings_widget.dart index 06c1d96b..e6f5f7f8 100644 --- a/lib/pages/preferences_settings_page/preferences_settings_widget.dart +++ b/lib/pages/preferences_settings_page/preferences_settings_widget.dart @@ -7,6 +7,7 @@ import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/pages/preferences_settings_page/preferences_settings_model.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; +import 'package:hub/shared/utils/style_util.dart'; import 'package:material_symbols_icons/symbols.dart'; import 'package:provider/provider.dart'; @@ -28,8 +29,8 @@ class _PreferencesPageWidgetState extends State { Widget build(BuildContext context) { return ChangeNotifierProvider( create: (_) => PreferencesPageModel(), - child: Consumer( - builder: (context, model, child) => GestureDetector( + child: Consumer(builder: (context, model, child) { + return GestureDetector( onTap: () => model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(model.unfocusNode) : FocusScope.of(context).unfocus(), @@ -58,13 +59,7 @@ class _PreferencesPageWidgetState extends State { enText: 'System Settings', ptText: 'Opções do Sistema', ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ), + style: DesignUtil.appbarStyle(), ), centerTitle: true, elevation: 0.0, @@ -89,8 +84,8 @@ class _PreferencesPageWidgetState extends State { ], ), ), - ), - ), + ); + }), ); } diff --git a/lib/pages/provisional_schedule_page/provisional_schedule_widget.dart b/lib/pages/provisional_schedule_page/provisional_schedule_widget.dart index 022822ed..656c638f 100644 --- a/lib/pages/provisional_schedule_page/provisional_schedule_widget.dart +++ b/lib/pages/provisional_schedule_page/provisional_schedule_widget.dart @@ -4,6 +4,7 @@ import 'package:hub/components/templates_components/provisional_schedule_templat import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; +import 'package:hub/shared/utils/style_util.dart'; import '/flutter_flow/flutter_flow_util.dart'; @@ -54,14 +55,7 @@ class _ProvisionalScheduleState extends State { enText: 'Schedule Providers', ptText: 'Agendar Prestadores', ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ), + style: DesignUtil.appbarStyle(), ), actions: const [], centerTitle: true, diff --git a/lib/pages/qr_code_page/qr_code_page_widget.dart b/lib/pages/qr_code_page/qr_code_page_widget.dart index 0fa56484..6bc1aaf4 100644 --- a/lib/pages/qr_code_page/qr_code_page_widget.dart +++ b/lib/pages/qr_code_page/qr_code_page_widget.dart @@ -21,6 +21,7 @@ import 'package:hub/pages/qr_code_page/qr_code_page_model.dart'; import 'package:hub/shared/utils/biometric_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; +import 'package:hub/shared/utils/style_util.dart'; import 'package:percent_indicator/circular_percent_indicator.dart'; import 'package:qr_flutter/qr_flutter.dart'; @@ -126,15 +127,7 @@ class _QrCodePageWidgetState extends State enText: 'Use this QR Code for access', ), textAlign: TextAlign.center, - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: - FlutterFlowTheme.of(context).bodyMediumFamily, - fontSize: limitedHeaderTextSize, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey( - FlutterFlowTheme.of(context).bodyMediumFamily), - ), + style: DesignUtil.appbarStyle(), ), ), Stack( @@ -490,15 +483,7 @@ class _QrCodePageWidgetState extends State ), title: Text( FFLocalizations.of(context).getText('ku7jqe53'), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - fontWeight: FontWeight.bold, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey( - FlutterFlowTheme.of(context).headlineMediumFamily), - ), + style: DesignUtil.appbarStyle(), ), actions: const [], centerTitle: true, diff --git a/lib/pages/register_visitor_page/register_visitor_page_widget.dart b/lib/pages/register_visitor_page/register_visitor_page_widget.dart index 483364bf..6fc5c530 100644 --- a/lib/pages/register_visitor_page/register_visitor_page_widget.dart +++ b/lib/pages/register_visitor_page/register_visitor_page_widget.dart @@ -4,6 +4,7 @@ import 'package:hub/components/templates_components/regisiter_vistor_template_co import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; +import 'package:hub/shared/utils/style_util.dart'; import '/flutter_flow/flutter_flow_util.dart'; import 'register_visitor_page_model.dart'; @@ -60,15 +61,7 @@ class _RegisterVisitorPageWidgetState extends State { FFLocalizations.of(context).getText( 'megskb6s' /* Cadastrar Visitante */, ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - fontWeight: FontWeight.bold, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey( - FlutterFlowTheme.of(context).headlineMediumFamily), - ), + style: DesignUtil.appbarStyle(), ), actions: const [], centerTitle: true, diff --git a/lib/pages/residents_on_the_property/residents_on_the_property_screen.dart b/lib/pages/residents_on_the_property/residents_on_the_property_screen.dart index d33aa753..3170e3af 100644 --- a/lib/pages/residents_on_the_property/residents_on_the_property_screen.dart +++ b/lib/pages/residents_on_the_property/residents_on_the_property_screen.dart @@ -9,6 +9,7 @@ import 'package:hub/pages/residents_on_the_property/residents_on_the_property_mo import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; +import 'package:hub/shared/utils/style_util.dart'; class ResidentsOnTheProperty extends StatefulWidget { const ResidentsOnTheProperty({super.key}); @@ -136,16 +137,10 @@ class _ResidentsOnThePropertyState extends State backgroundColor: FlutterFlowTheme.of(context).primaryBackground, automaticallyImplyLeading: false, title: Text( - FFLocalizations.of(context) - .getVariableText(ptText: 'Moradores', enText: 'Residents'), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - )), + FFLocalizations.of(context) + .getVariableText(ptText: 'Moradores', enText: 'Residents'), + style: DesignUtil.appbarStyle(), + ), leading: _backButton(context, FlutterFlowTheme.of(context)), centerTitle: true, elevation: 0.0, diff --git a/lib/pages/vehicles_on_the_property/vehicles_on_the_property.dart b/lib/pages/vehicles_on_the_property/vehicles_on_the_property.dart index 6d3e51e0..0f448b61 100644 --- a/lib/pages/vehicles_on_the_property/vehicles_on_the_property.dart +++ b/lib/pages/vehicles_on_the_property/vehicles_on_the_property.dart @@ -9,6 +9,7 @@ import 'package:hub/pages/vehicles_on_the_property/vehicle_model.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; +import 'package:hub/shared/utils/style_util.dart'; class VehicleOnTheProperty extends StatefulWidget { const VehicleOnTheProperty({super.key}); @@ -131,16 +132,10 @@ class _VehicleOnThePropertyState extends State backgroundColor: FlutterFlowTheme.of(context).primaryBackground, automaticallyImplyLeading: false, title: Text( - FFLocalizations.of(context) - .getVariableText(enText: 'Vehicles', ptText: 'Veículos'), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - )), + FFLocalizations.of(context) + .getVariableText(enText: 'Vehicles', ptText: 'Veículos'), + style: DesignUtil.appbarStyle(), + ), leading: _backButton(context, FlutterFlowTheme.of(context)), centerTitle: true, elevation: 0.0, diff --git a/lib/pages/visits_on_the_property/visits_on_the_property_screen.dart b/lib/pages/visits_on_the_property/visits_on_the_property_screen.dart index 3a2b6950..652f00ae 100644 --- a/lib/pages/visits_on_the_property/visits_on_the_property_screen.dart +++ b/lib/pages/visits_on_the_property/visits_on_the_property_screen.dart @@ -9,6 +9,7 @@ import 'package:hub/pages/visits_on_the_property/model.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/log_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; +import 'package:hub/shared/utils/style_util.dart'; class VisitsOnTheProperty extends StatefulWidget { const VisitsOnTheProperty({super.key}); @@ -134,16 +135,10 @@ class _VisitsOnThePropertyState extends State backgroundColor: FlutterFlowTheme.of(context).primaryBackground, automaticallyImplyLeading: false, title: Text( - FFLocalizations.of(context).getVariableText( - ptText: 'Visitas em aberto', enText: 'Opened visits'), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - )), + FFLocalizations.of(context).getVariableText( + ptText: 'Visitas em aberto', enText: 'Opened visits'), + style: DesignUtil.appbarStyle(), + ), leading: _backButton(context, FlutterFlowTheme.of(context)), centerTitle: true, elevation: 0.0, diff --git a/lib/shared/utils/style_util.dart b/lib/shared/utils/style_util.dart new file mode 100644 index 00000000..ef5bd7e6 --- /dev/null +++ b/lib/shared/utils/style_util.dart @@ -0,0 +1,16 @@ +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:hub/flutter_flow/index.dart'; + +class DesignUtil { + static appbarStyle() { + FlutterFlowTheme.of(navigatorKey.currentContext!).headlineMedium.override( + fontFamily: 'Nunito', + color: FlutterFlowTheme.of(navigatorKey.currentContext!).primaryText, + fontSize: 15.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), + ); + } +} From 8478d0d37257601ddc3119b9b982d638c7b629a3 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Fri, 20 Dec 2024 17:25:53 -0300 Subject: [PATCH 20/25] fix headers --- .../shared_components_atoms/appbar.dart | 11 +++++++-- .../pages/acess_history_page_widget.dart | 11 +++++++-- .../pages/provisional_history_page.dart | 12 ++++++++-- .../home/presentation/pages/about_system.dart | 12 ++++++++-- .../delivery_schedule_widget.dart | 11 +++++++-- .../liberation_history_widget.dart | 12 ++++++++-- .../message_history_page_widget.dart | 11 +++++++-- .../package_order_page.dart | 12 ++++++++-- .../people_on_the_property_page_widget.dart | 11 +++++++-- .../pets_history_screen.dart | 11 +++++++-- .../preferences_settings_widget.dart | 13 ++++++++-- .../provisional_schedule_widget.dart | 11 +++++++-- .../qr_code_page/qr_code_page_widget.dart | 24 ++++++++++++++++--- .../register_visitor_page_widget.dart | 11 +++++++-- .../residents_on_the_property_screen.dart | 11 +++++++-- .../vehicles_on_the_property.dart | 11 +++++++-- .../visits_on_the_property_screen.dart | 11 +++++++-- lib/shared/utils/style_util.dart | 16 ------------- 18 files changed, 171 insertions(+), 51 deletions(-) delete mode 100644 lib/shared/utils/style_util.dart diff --git a/lib/components/atomic_components/shared_components_atoms/appbar.dart b/lib/components/atomic_components/shared_components_atoms/appbar.dart index 1db784d7..9bdfdab4 100644 --- a/lib/components/atomic_components/shared_components_atoms/appbar.dart +++ b/lib/components/atomic_components/shared_components_atoms/appbar.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; -import 'package:hub/shared/utils/style_util.dart'; class AppBarUtil extends StatelessWidget implements PreferredSizeWidget { final String title; @@ -37,7 +36,15 @@ class AppBarUtil extends StatelessWidget implements PreferredSizeWidget { ), title: Text( title, - style: DesignUtil.appbarStyle(), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 16.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).headlineMediumFamily), + ), ), actions: [ if (actionButton != null) actionButton!, diff --git a/lib/features/history/presentation/pages/acess_history_page_widget.dart b/lib/features/history/presentation/pages/acess_history_page_widget.dart index a033a071..16708425 100644 --- a/lib/features/history/presentation/pages/acess_history_page_widget.dart +++ b/lib/features/history/presentation/pages/acess_history_page_widget.dart @@ -12,7 +12,6 @@ import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; -import 'package:hub/shared/utils/style_util.dart'; import 'package:rxdart/rxdart.dart'; @immutable @@ -111,7 +110,15 @@ class _AccessHistoryState extends State { Widget _title(BuildContext context, FlutterFlowTheme theme) { return Text( FFLocalizations.of(context).getText('ch8qymga'), - style: DesignUtil.appbarStyle(), + style: theme.headlineMedium.override( + fontFamily: theme.headlineMediumFamily, + color: theme.primaryText, + fontSize: 16.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: + GoogleFonts.asMap().containsKey(theme.headlineMediumFamily), + ), ); } diff --git a/lib/features/history/presentation/pages/provisional_history_page.dart b/lib/features/history/presentation/pages/provisional_history_page.dart index e7672e6f..758e65b5 100644 --- a/lib/features/history/presentation/pages/provisional_history_page.dart +++ b/lib/features/history/presentation/pages/provisional_history_page.dart @@ -14,7 +14,7 @@ import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; import 'package:hub/shared/utils/snackbar_util.dart'; -import 'package:hub/shared/utils/style_util.dart'; + import 'package:rxdart/rxdart.dart'; @immutable @@ -111,7 +111,15 @@ class ProvisionalHistoryState extends State { ptText: 'Consultar Agendas', enText: 'Provisional History', ), - style: DesignUtil.appbarStyle(), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 16.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap() + .containsKey(FlutterFlowTheme.of(context).headlineMediumFamily), + ), ); } diff --git a/lib/features/home/presentation/pages/about_system.dart b/lib/features/home/presentation/pages/about_system.dart index 3d934065..78a409c2 100644 --- a/lib/features/home/presentation/pages/about_system.dart +++ b/lib/features/home/presentation/pages/about_system.dart @@ -7,7 +7,7 @@ import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/internationalization.dart'; -import 'package:hub/shared/utils/style_util.dart'; + import 'package:package_info_plus/package_info_plus.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -88,7 +88,15 @@ class _AboutSystemPageState extends State { ptText: 'Sobre o Sistema', enText: 'About the System', ), - style: DesignUtil.appbarStyle(), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 16.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap() + .containsKey(FlutterFlowTheme.of(context).headlineMediumFamily), + ), ); } diff --git a/lib/pages/delivery_schedule_page/delivery_schedule_widget.dart b/lib/pages/delivery_schedule_page/delivery_schedule_widget.dart index cc661034..1cb9787f 100644 --- a/lib/pages/delivery_schedule_page/delivery_schedule_widget.dart +++ b/lib/pages/delivery_schedule_page/delivery_schedule_widget.dart @@ -4,7 +4,6 @@ import 'package:hub/components/templates_components/provisional_schedule_templat import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/shared/utils/style_util.dart'; import '/flutter_flow/flutter_flow_util.dart'; @@ -55,7 +54,15 @@ class _DeliveryScheduleState extends State { enText: 'Delivery Schedule', ptText: 'Agendar Entregas', ), - style: DesignUtil.appbarStyle(), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 16.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).headlineMediumFamily), + ), ), actions: const [], centerTitle: true, diff --git a/lib/pages/liberation_history/liberation_history_widget.dart b/lib/pages/liberation_history/liberation_history_widget.dart index dc8a9b50..2560e511 100644 --- a/lib/pages/liberation_history/liberation_history_widget.dart +++ b/lib/pages/liberation_history/liberation_history_widget.dart @@ -13,7 +13,7 @@ import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; import 'package:hub/shared/utils/snackbar_util.dart'; -import 'package:hub/shared/utils/style_util.dart'; + import 'package:hub/shared/utils/validator_util.dart'; class LiberationHistoryWidget extends StatefulWidget { @@ -121,7 +121,15 @@ class _LiberationHistoryWidgetState extends State { FFLocalizations.of(context).getText( '784f83pc' /* Histórico de Liberação */, ), - style: DesignUtil.appbarStyle(), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 16.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).headlineMediumFamily), + ), ), actions: const [], centerTitle: true, diff --git a/lib/pages/message_history_page/message_history_page_widget.dart b/lib/pages/message_history_page/message_history_page_widget.dart index ce9294c3..645a445d 100644 --- a/lib/pages/message_history_page/message_history_page_widget.dart +++ b/lib/pages/message_history_page/message_history_page_widget.dart @@ -9,7 +9,6 @@ import 'package:hub/pages/message_history_page/message_history_page_model.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; -import 'package:hub/shared/utils/style_util.dart'; class MessageHistoryPageWidget extends StatefulWidget { const MessageHistoryPageWidget({super.key}); @@ -165,7 +164,15 @@ class _MessageHistoryPageWidgetState extends State enText: 'Message History', ptText: 'Consultar Mensagens', ), - style: DesignUtil.appbarStyle(), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 16.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).headlineMediumFamily), + ), ), actions: const [], centerTitle: true, diff --git a/lib/pages/package_order_page/package_order_page.dart b/lib/pages/package_order_page/package_order_page.dart index 3f2c1fb3..a0b76920 100644 --- a/lib/pages/package_order_page/package_order_page.dart +++ b/lib/pages/package_order_page/package_order_page.dart @@ -14,7 +14,7 @@ import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; -import 'package:hub/shared/utils/style_util.dart'; + import 'package:hub/shared/utils/validator_util.dart'; import 'package:rxdart/rxdart.dart'; @@ -236,7 +236,15 @@ class _PackageOrderPage extends State { title: Text( FFLocalizations.of(context) .getVariableText(enText: 'Orders', ptText: 'Encomendas'), - style: DesignUtil.appbarStyle(), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 16.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).headlineMediumFamily), + ), ), leading: _backButton(context, FlutterFlowTheme.of(context)), centerTitle: true, diff --git a/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart b/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart index 5af550a6..af732129 100644 --- a/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart +++ b/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart @@ -8,7 +8,6 @@ import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/pages/people_on_the_property_page/people_on_the_property_page_model.dart'; -import 'package:hub/shared/utils/style_util.dart'; import '../../shared/utils/log_util.dart'; @@ -65,7 +64,15 @@ class _PeopleOnThePropertyPageState extends State { FFLocalizations.of(context).getText( 'nsu13r5d' /* Pessoas na Propriedade */, ), - style: DesignUtil.appbarStyle(), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 16.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).headlineMediumFamily), + ), ), actions: const [], centerTitle: true, diff --git a/lib/pages/pets_on_the_property_page/pets_history_screen.dart b/lib/pages/pets_on_the_property_page/pets_history_screen.dart index f908cd71..4881c182 100644 --- a/lib/pages/pets_on_the_property_page/pets_history_screen.dart +++ b/lib/pages/pets_on_the_property_page/pets_history_screen.dart @@ -13,7 +13,6 @@ import 'package:hub/pages/pets_page/pets_page_model.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; -import 'package:hub/shared/utils/style_util.dart'; class PetsHistoryScreen extends StatefulWidget { const PetsHistoryScreen({super.key, this.model, required this.isApp}); @@ -67,7 +66,15 @@ class _PetsHistoryScreenState extends State ptText: 'Pets', enText: 'Pets', ), - style: DesignUtil.appbarStyle(), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 16.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).headlineMediumFamily), + ), ), leading: _backButton(context, FlutterFlowTheme.of(context)), centerTitle: true, diff --git a/lib/pages/preferences_settings_page/preferences_settings_widget.dart b/lib/pages/preferences_settings_page/preferences_settings_widget.dart index e6f5f7f8..9b2b9418 100644 --- a/lib/pages/preferences_settings_page/preferences_settings_widget.dart +++ b/lib/pages/preferences_settings_page/preferences_settings_widget.dart @@ -7,7 +7,7 @@ import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/pages/preferences_settings_page/preferences_settings_model.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; -import 'package:hub/shared/utils/style_util.dart'; + import 'package:material_symbols_icons/symbols.dart'; import 'package:provider/provider.dart'; @@ -59,7 +59,16 @@ class _PreferencesPageWidgetState extends State { enText: 'System Settings', ptText: 'Opções do Sistema', ), - style: DesignUtil.appbarStyle(), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: + FlutterFlowTheme.of(context).headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 16.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).headlineMediumFamily), + ), ), centerTitle: true, elevation: 0.0, diff --git a/lib/pages/provisional_schedule_page/provisional_schedule_widget.dart b/lib/pages/provisional_schedule_page/provisional_schedule_widget.dart index 656c638f..3d5c32d4 100644 --- a/lib/pages/provisional_schedule_page/provisional_schedule_widget.dart +++ b/lib/pages/provisional_schedule_page/provisional_schedule_widget.dart @@ -4,7 +4,6 @@ import 'package:hub/components/templates_components/provisional_schedule_templat import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/shared/utils/style_util.dart'; import '/flutter_flow/flutter_flow_util.dart'; @@ -55,7 +54,15 @@ class _ProvisionalScheduleState extends State { enText: 'Schedule Providers', ptText: 'Agendar Prestadores', ), - style: DesignUtil.appbarStyle(), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 16.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).headlineMediumFamily), + ), ), actions: const [], centerTitle: true, diff --git a/lib/pages/qr_code_page/qr_code_page_widget.dart b/lib/pages/qr_code_page/qr_code_page_widget.dart index 6bc1aaf4..2ea60636 100644 --- a/lib/pages/qr_code_page/qr_code_page_widget.dart +++ b/lib/pages/qr_code_page/qr_code_page_widget.dart @@ -21,7 +21,7 @@ import 'package:hub/pages/qr_code_page/qr_code_page_model.dart'; import 'package:hub/shared/utils/biometric_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; -import 'package:hub/shared/utils/style_util.dart'; + import 'package:percent_indicator/circular_percent_indicator.dart'; import 'package:qr_flutter/qr_flutter.dart'; @@ -127,7 +127,17 @@ class _QrCodePageWidgetState extends State enText: 'Use this QR Code for access', ), textAlign: TextAlign.center, - style: DesignUtil.appbarStyle(), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: + FlutterFlowTheme.of(context).headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 16.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .headlineMediumFamily), + ), ), ), Stack( @@ -483,7 +493,15 @@ class _QrCodePageWidgetState extends State ), title: Text( FFLocalizations.of(context).getText('ku7jqe53'), - style: DesignUtil.appbarStyle(), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 16.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).headlineMediumFamily), + ), ), actions: const [], centerTitle: true, diff --git a/lib/pages/register_visitor_page/register_visitor_page_widget.dart b/lib/pages/register_visitor_page/register_visitor_page_widget.dart index 6fc5c530..6d39e4dc 100644 --- a/lib/pages/register_visitor_page/register_visitor_page_widget.dart +++ b/lib/pages/register_visitor_page/register_visitor_page_widget.dart @@ -4,7 +4,6 @@ import 'package:hub/components/templates_components/regisiter_vistor_template_co import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; -import 'package:hub/shared/utils/style_util.dart'; import '/flutter_flow/flutter_flow_util.dart'; import 'register_visitor_page_model.dart'; @@ -61,7 +60,15 @@ class _RegisterVisitorPageWidgetState extends State { FFLocalizations.of(context).getText( 'megskb6s' /* Cadastrar Visitante */, ), - style: DesignUtil.appbarStyle(), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 16.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).headlineMediumFamily), + ), ), actions: const [], centerTitle: true, diff --git a/lib/pages/residents_on_the_property/residents_on_the_property_screen.dart b/lib/pages/residents_on_the_property/residents_on_the_property_screen.dart index 3170e3af..664d713a 100644 --- a/lib/pages/residents_on_the_property/residents_on_the_property_screen.dart +++ b/lib/pages/residents_on_the_property/residents_on_the_property_screen.dart @@ -9,7 +9,6 @@ import 'package:hub/pages/residents_on_the_property/residents_on_the_property_mo import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; -import 'package:hub/shared/utils/style_util.dart'; class ResidentsOnTheProperty extends StatefulWidget { const ResidentsOnTheProperty({super.key}); @@ -139,7 +138,15 @@ class _ResidentsOnThePropertyState extends State title: Text( FFLocalizations.of(context) .getVariableText(ptText: 'Moradores', enText: 'Residents'), - style: DesignUtil.appbarStyle(), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 16.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).headlineMediumFamily), + ), ), leading: _backButton(context, FlutterFlowTheme.of(context)), centerTitle: true, diff --git a/lib/pages/vehicles_on_the_property/vehicles_on_the_property.dart b/lib/pages/vehicles_on_the_property/vehicles_on_the_property.dart index 0f448b61..9eda1f48 100644 --- a/lib/pages/vehicles_on_the_property/vehicles_on_the_property.dart +++ b/lib/pages/vehicles_on_the_property/vehicles_on_the_property.dart @@ -9,7 +9,6 @@ import 'package:hub/pages/vehicles_on_the_property/vehicle_model.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; -import 'package:hub/shared/utils/style_util.dart'; class VehicleOnTheProperty extends StatefulWidget { const VehicleOnTheProperty({super.key}); @@ -134,7 +133,15 @@ class _VehicleOnThePropertyState extends State title: Text( FFLocalizations.of(context) .getVariableText(enText: 'Vehicles', ptText: 'Veículos'), - style: DesignUtil.appbarStyle(), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 16.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).headlineMediumFamily), + ), ), leading: _backButton(context, FlutterFlowTheme.of(context)), centerTitle: true, diff --git a/lib/pages/visits_on_the_property/visits_on_the_property_screen.dart b/lib/pages/visits_on_the_property/visits_on_the_property_screen.dart index 652f00ae..c1a59ca6 100644 --- a/lib/pages/visits_on_the_property/visits_on_the_property_screen.dart +++ b/lib/pages/visits_on_the_property/visits_on_the_property_screen.dart @@ -9,7 +9,6 @@ import 'package:hub/pages/visits_on_the_property/model.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/log_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; -import 'package:hub/shared/utils/style_util.dart'; class VisitsOnTheProperty extends StatefulWidget { const VisitsOnTheProperty({super.key}); @@ -137,7 +136,15 @@ class _VisitsOnThePropertyState extends State title: Text( FFLocalizations.of(context).getVariableText( ptText: 'Visitas em aberto', enText: 'Opened visits'), - style: DesignUtil.appbarStyle(), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 16.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).headlineMediumFamily), + ), ), leading: _backButton(context, FlutterFlowTheme.of(context)), centerTitle: true, diff --git a/lib/shared/utils/style_util.dart b/lib/shared/utils/style_util.dart deleted file mode 100644 index ef5bd7e6..00000000 --- a/lib/shared/utils/style_util.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:hub/flutter_flow/index.dart'; - -class DesignUtil { - static appbarStyle() { - FlutterFlowTheme.of(navigatorKey.currentContext!).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(navigatorKey.currentContext!).primaryText, - fontSize: 15.0, - fontWeight: FontWeight.bold, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ); - } -} From 810c4f4b5f98ec702a5aab22c53277c77690f99d Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Mon, 13 Jan 2025 16:23:55 -0300 Subject: [PATCH 21/25] WIP --- .../modules/data/data_sources/license_remote_data_source.dart | 4 +--- .../modules/data/repositories/license_repository_impl.dart | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/shared/components/molecules/modules/data/data_sources/license_remote_data_source.dart b/lib/shared/components/molecules/modules/data/data_sources/license_remote_data_source.dart index c47abfd2..f2dfd632 100644 --- a/lib/shared/components/molecules/modules/data/data_sources/license_remote_data_source.dart +++ b/lib/shared/components/molecules/modules/data/data_sources/license_remote_data_source.dart @@ -6,8 +6,6 @@ import 'dart:developer'; import 'package:hub/backend/api_requests/api_calls.dart'; import 'package:hub/shared/components/molecules/locals/index.dart'; import 'package:hub/shared/components/molecules/modules/index.dart'; -import 'package:hub/shared/helpers/database/database_helper.dart'; - import 'package:sqflite/sqflite.dart'; abstract class LicenseRemoteDataSource { @@ -96,7 +94,7 @@ class LicenseRemoteDataSourceImpl implements LicenseRemoteDataSource { } catch (e, s) { log('Erro ao obter licenças: $e', stackTrace: s); // return await setupLicense(DatabaseStorage.database, isNewVersion); - return false; + return true; } } diff --git a/lib/shared/components/molecules/modules/data/repositories/license_repository_impl.dart b/lib/shared/components/molecules/modules/data/repositories/license_repository_impl.dart index 824315c6..bcfa25e4 100644 --- a/lib/shared/components/molecules/modules/data/repositories/license_repository_impl.dart +++ b/lib/shared/components/molecules/modules/data/repositories/license_repository_impl.dart @@ -21,9 +21,10 @@ class LicenseRepositoryImpl implements LicenseRepository { log('updateLicense'); bool result = false; final bool isNewVersion = await localDataSource.isNewVersion(); - result = await remoteDataSource.setupLicense(database, isNewVersion); if (isNewVersion) { result = await remoteDataSource.fetchLicenses(isNewVersion); + } else { + result = await remoteDataSource.setupLicense(database, isNewVersion); } return result; From 100b14e083adc1ee79ef3deaf702eb23cf5a379c Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Tue, 14 Jan 2025 10:04:09 -0300 Subject: [PATCH 22/25] alterei a label do status 'CO' de 'Convidado' para 'Concluido' --- .../presentation/pages/provisional_history_page.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/features/history/presentation/pages/provisional_history_page.dart b/lib/features/history/presentation/pages/provisional_history_page.dart index 4c810c91..f70b89ab 100644 --- a/lib/features/history/presentation/pages/provisional_history_page.dart +++ b/lib/features/history/presentation/pages/provisional_history_page.dart @@ -1,5 +1,4 @@ import 'dart:async'; -import 'dart:developer'; import 'package:flutter/material.dart'; import 'package:flutter_spinkit/flutter_spinkit.dart'; @@ -11,7 +10,6 @@ import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/shared/utils/dialog_util.dart'; -import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; import 'package:hub/shared/utils/snackbar_util.dart'; import 'package:rxdart/rxdart.dart'; @@ -20,8 +18,10 @@ import 'package:rxdart/rxdart.dart'; // ignore: must_be_immutable class ProvisionalHistoryPage extends StatefulWidget { Map opt; + ProvisionalHistoryPage({super.key, Map? opt}) : opt = opt ?? const {'AGP_STATUS': '.*'}; + @override State createState() => ProvisionalHistoryState(opt); } @@ -157,8 +157,8 @@ class ProvisionalHistoryState extends State { { 'title': FFLocalizations.of(context) .getVariableText( - ptText: 'Convidado', - enText: 'Guest', + ptText: 'Concluído', + enText: 'Completed', ), 'value': 'CO', }, From dd291959c6eb06d9722e9fe22be9cf02e3761184 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Tue, 14 Jan 2025 12:27:31 -0300 Subject: [PATCH 23/25] WIP --- .../module/data/data_sources/license_remote_data_source.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/features/module/data/data_sources/license_remote_data_source.dart b/lib/features/module/data/data_sources/license_remote_data_source.dart index 2df88afd..12e75bac 100644 --- a/lib/features/module/data/data_sources/license_remote_data_source.dart +++ b/lib/features/module/data/data_sources/license_remote_data_source.dart @@ -6,7 +6,6 @@ import 'dart:developer'; import 'package:hub/features/backend/index.dart'; import 'package:hub/features/local/data/repositories/locals_repository_impl.dart'; import 'package:hub/features/module/index.dart'; - import 'package:sqflite/sqflite.dart'; abstract class LicenseRemoteDataSource { From 6e4c2ca7fee33e743829366a0892c62afce5d38a Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Wed, 15 Jan 2025 09:52:39 -0300 Subject: [PATCH 24/25] =?UTF-8?q?fix=20setupLicense=20quando=20api=20nova?= =?UTF-8?q?=20com=20modulariza=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/features/auth/authentication_service.dart | 6 +++--- .../data/repositories/license_repository_impl.dart | 1 + .../storage/helpers/dabase_storage_helper.dart | 11 +++++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/features/auth/authentication_service.dart b/lib/features/auth/authentication_service.dart index 12393545..557b05ba 100644 --- a/lib/features/auth/authentication_service.dart +++ b/lib/features/auth/authentication_service.dart @@ -1,14 +1,14 @@ +import 'dart:developer'; + import 'package:flutter/material.dart'; import 'package:hub/features/backend/index.dart'; import 'package:hub/features/local/index.dart'; import 'package:hub/features/module/data/repositories/license_repository_impl.dart'; import 'package:hub/features/storage/index.dart'; - import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/shared/utils/device_util.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/log_util.dart'; - import 'package:hub/shared/utils/snackbar_util.dart'; import '../../../flutter_flow/flutter_flow_util.dart'; @@ -140,6 +140,7 @@ class AuthenticationService { } static Future signOut(BuildContext context) async { + log('Sign Out'); await PhpGroup.unregisterDevice.call(); final Map extra = { kTransitionInfoKey: const TransitionInfo( @@ -151,7 +152,6 @@ class AuthenticationService { await StorageHelper().clean(Storage.databaseStorage); await StorageHelper().clean(Storage.secureStorage); - await LicenseRepositoryImpl().cleanLicense(); DatabaseService.isInitialized = false; await DatabaseService.instance.init(); diff --git a/lib/features/module/data/repositories/license_repository_impl.dart b/lib/features/module/data/repositories/license_repository_impl.dart index 087de1a5..643f6473 100644 --- a/lib/features/module/data/repositories/license_repository_impl.dart +++ b/lib/features/module/data/repositories/license_repository_impl.dart @@ -21,6 +21,7 @@ class LicenseRepositoryImpl implements LicenseRepository { bool result = false; final bool isNewVersion = await localDataSource.isNewVersion(); if (isNewVersion) { + await remoteDataSource.setupLicense(database, isNewVersion); result = await remoteDataSource.fetchLicenses(isNewVersion); } else { result = await remoteDataSource.setupLicense(database, isNewVersion); diff --git a/lib/features/storage/helpers/dabase_storage_helper.dart b/lib/features/storage/helpers/dabase_storage_helper.dart index 63839577..7bf0ba2c 100644 --- a/lib/features/storage/helpers/dabase_storage_helper.dart +++ b/lib/features/storage/helpers/dabase_storage_helper.dart @@ -4,6 +4,7 @@ import 'package:hub/features/storage/index.dart'; class DatabaseStorage implements BaseStorage { DatabaseStorage._(); + static final DatabaseStorage instance = DatabaseStorage._(); // static final DatabaseStorage instance = DatabaseStorage._(); @@ -22,17 +23,23 @@ class DatabaseStorage implements BaseStorage { } @override - Future clearAll() => // - throw UnimplementedError(); + Future clearAll() async { + await ProfileLocalDataSourceImpl().clearAll(); + await LocalsLocalDataSourceImpl().clearAll(); + } + @override Future delete(String key) async => await getInstanceByKey(key).delete(key); + @override Future get(String key) async => // await getInstanceByKey(key).get(key); + @override Future init() async => // await DatabaseService.instance.init(); + @override Future set(String key, T value) async => await getInstanceByKey(key).set(key, value); From 05d98044884642ea4d6faebe329358f291aea379 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Wed, 15 Jan 2025 10:09:18 -0300 Subject: [PATCH 25/25] remove logs --- lib/features/auth/authentication_service.dart | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/features/auth/authentication_service.dart b/lib/features/auth/authentication_service.dart index 557b05ba..d8ce20ae 100644 --- a/lib/features/auth/authentication_service.dart +++ b/lib/features/auth/authentication_service.dart @@ -1,9 +1,6 @@ -import 'dart:developer'; - import 'package:flutter/material.dart'; import 'package:hub/features/backend/index.dart'; import 'package:hub/features/local/index.dart'; -import 'package:hub/features/module/data/repositories/license_repository_impl.dart'; import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/shared/utils/device_util.dart'; @@ -140,7 +137,6 @@ class AuthenticationService { } static Future signOut(BuildContext context) async { - log('Sign Out'); await PhpGroup.unregisterDevice.call(); final Map extra = { kTransitionInfoKey: const TransitionInfo(