├── .firebase ├── flutter-end-to-end │ └── hosting │ │ ├── .last_build_id │ │ ├── assets │ │ ├── AssetManifest.bin │ │ ├── AssetManifest.bin.json │ │ ├── AssetManifest.json │ │ ├── FontManifest.json │ │ ├── NOTICES │ │ ├── fonts │ │ │ └── MaterialIcons-Regular.otf │ │ ├── packages │ │ │ ├── cupertino_icons │ │ │ │ └── assets │ │ │ │ │ └── CupertinoIcons.ttf │ │ │ ├── flutter_inappwebview │ │ │ │ └── assets │ │ │ │ │ └── t_rex_runner │ │ │ │ │ ├── t-rex.css │ │ │ │ │ └── t-rex.html │ │ │ └── youtube_player_flutter │ │ │ │ └── assets │ │ │ │ └── speedometer.webp │ │ └── shaders │ │ │ └── ink_sparkle.frag │ │ ├── canvaskit │ │ ├── canvaskit.js │ │ ├── canvaskit.wasm │ │ ├── chromium │ │ │ ├── canvaskit.js │ │ │ └── canvaskit.wasm │ │ ├── skwasm.js │ │ ├── skwasm.wasm │ │ └── skwasm.worker.js │ │ ├── favicon.png │ │ ├── flutter.js │ │ ├── flutter_service_worker.js │ │ ├── icons │ │ ├── Icon-192.png │ │ ├── Icon-512.png │ │ ├── Icon-maskable-192.png │ │ └── Icon-maskable-512.png │ │ ├── index.html │ │ ├── main.dart.js │ │ ├── manifest.json │ │ └── version.json ├── hosting.LmZpcmViYXNlL2ZsdXR0ZXItZW5kLXRvLWVuZC9ob3N0aW5n.cache └── hosting.YnVpbGQvd2Vi.cache ├── .firebaserc ├── .github └── workflows │ ├── firebase-hosting-merge.yml │ ├── firebase-hosting-pull-request.yml │ └── main.yaml ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ ├── flutter_end_to_end.jks │ ├── key.properties │ └── src │ │ ├── dart │ │ └── res │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── strings.xml │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── flutter │ │ └── res │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── strings.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── sample_latest │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ ├── dash_desktop.png │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── asset ├── daily_tracker │ ├── auth │ │ ├── landscape_backgroun.png │ │ └── user_landscape_image.png │ ├── daily_tracker_check_in.png │ ├── pre_checkin_background.png │ └── pre_checkin_background1.png ├── dart_flavor │ ├── dart_leading_logo.png │ └── launcher_icons │ │ ├── dart_desktop.png │ │ └── dart_web.png ├── default_dash_flavor │ ├── launcher_icons │ │ ├── dash_android_desktop.jpeg │ │ └── dash_flutter.jpeg │ └── leading_logo.png ├── exception_error │ ├── no_access.png │ ├── no_internet.gif │ ├── no_internet.png │ ├── offline_error.png │ ├── page_not_found.png │ ├── server_not_found.png │ ├── something_went_wrong.png │ └── timeout.png ├── flutter_flavor │ ├── flutter_leading_logo.png │ ├── launcher_icons │ │ ├── flutter_logo.jpg │ │ └── flutter_logo_web.png │ └── leading_logo.png ├── gifs │ ├── happy.gif │ └── waiting.gif ├── icons │ └── discover.png ├── launcher_icons │ └── dash_desktop.png ├── school_data.zip └── sound_effects │ └── check_in.mp3 ├── build.yaml ├── coverage └── lcov.info ├── devtools_options.yaml ├── firebase.json ├── flutter_launcher_icons-dart.yaml ├── flutter_launcher_icons-flutter.yaml ├── flutter_launcher_icons.yaml ├── integration_test └── app_test.dart ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Podfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ ├── Runner.xcscheme │ │ ├── dart.xcscheme │ │ └── flutter.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings ├── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon-dart.appiconset │ │ │ ├── AppIcon-dart-1024x1024@1x.png │ │ │ ├── AppIcon-dart-20x20@1x.png │ │ │ ├── AppIcon-dart-20x20@2x.png │ │ │ ├── AppIcon-dart-20x20@3x.png │ │ │ ├── AppIcon-dart-29x29@1x.png │ │ │ ├── AppIcon-dart-29x29@2x.png │ │ │ ├── AppIcon-dart-29x29@3x.png │ │ │ ├── AppIcon-dart-40x40@1x.png │ │ │ ├── AppIcon-dart-40x40@2x.png │ │ │ ├── AppIcon-dart-40x40@3x.png │ │ │ ├── AppIcon-dart-50x50@1x.png │ │ │ ├── AppIcon-dart-50x50@2x.png │ │ │ ├── AppIcon-dart-57x57@1x.png │ │ │ ├── AppIcon-dart-57x57@2x.png │ │ │ ├── AppIcon-dart-60x60@2x.png │ │ │ ├── AppIcon-dart-60x60@3x.png │ │ │ ├── AppIcon-dart-72x72@1x.png │ │ │ ├── AppIcon-dart-72x72@2x.png │ │ │ ├── AppIcon-dart-76x76@1x.png │ │ │ ├── AppIcon-dart-76x76@2x.png │ │ │ ├── AppIcon-dart-83.5x83.5@2x.png │ │ │ └── Contents.json │ │ ├── AppIcon-flutter.appiconset │ │ │ ├── AppIcon-flutter-1024x1024@1x.png │ │ │ ├── AppIcon-flutter-20x20@1x.png │ │ │ ├── AppIcon-flutter-20x20@2x.png │ │ │ ├── AppIcon-flutter-20x20@3x.png │ │ │ ├── AppIcon-flutter-29x29@1x.png │ │ │ ├── AppIcon-flutter-29x29@2x.png │ │ │ ├── AppIcon-flutter-29x29@3x.png │ │ │ ├── AppIcon-flutter-40x40@1x.png │ │ │ ├── AppIcon-flutter-40x40@2x.png │ │ │ ├── AppIcon-flutter-40x40@3x.png │ │ │ ├── AppIcon-flutter-50x50@1x.png │ │ │ ├── AppIcon-flutter-50x50@2x.png │ │ │ ├── AppIcon-flutter-57x57@1x.png │ │ │ ├── AppIcon-flutter-57x57@2x.png │ │ │ ├── AppIcon-flutter-60x60@2x.png │ │ │ ├── AppIcon-flutter-60x60@3x.png │ │ │ ├── AppIcon-flutter-72x72@1x.png │ │ │ ├── AppIcon-flutter-72x72@2x.png │ │ │ ├── AppIcon-flutter-76x76@1x.png │ │ │ ├── AppIcon-flutter-76x76@2x.png │ │ │ ├── AppIcon-flutter-83.5x83.5@2x.png │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-50x50@1x.png │ │ │ ├── Icon-App-50x50@2x.png │ │ │ ├── Icon-App-57x57@1x.png │ │ │ ├── Icon-App-57x57@2x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-72x72@1x.png │ │ │ ├── Icon-App-72x72@2x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── Runner-Bridging-Header.h │ └── Runner.entitlements ├── RunnerTests │ └── RunnerTests.swift ├── build │ └── .last_build_id ├── ci_scripts │ └── ci_post_clone.sh └── firebase_app_id_file.json ├── l10n.yaml ├── lib ├── adsense_web.dart ├── adsense_web_stub.dart ├── analytics_exception_handler │ ├── analytics_logging.dart │ ├── custom_exception.dart │ ├── error_reporting.dart │ └── exception_handler.dart ├── core │ ├── constants │ │ └── theme_constants.dart │ ├── data │ │ ├── base_service.dart │ │ ├── db │ │ │ ├── db_configuration.dart │ │ │ ├── db_handler.dart │ │ │ ├── dumping_offline_data.dart │ │ │ ├── module_db_handler │ │ │ │ ├── common_db_handler.dart │ │ │ │ ├── schools_db_handler.dart │ │ │ │ └── todo_list_db_handler.dart │ │ │ ├── offline_handler.dart │ │ │ └── queries │ │ │ │ ├── create_common_tables_queries.sql │ │ │ │ ├── create_school_table_queries.sql │ │ │ │ └── create_todolist_table_queries.sql │ │ ├── interceptors │ │ │ └── interceptor.dart │ │ ├── models │ │ │ └── queue_item │ │ │ │ ├── queue_item.dart │ │ │ │ └── queue_item.g.dart │ │ ├── urls.dart │ │ └── utils │ │ │ ├── abstract_db_handler.dart │ │ │ ├── db_constants.dart │ │ │ └── service_enums_typedef.dart │ ├── device │ │ ├── config │ │ │ └── device_configurations.dart │ │ ├── enums │ │ │ └── device_enums.dart │ │ ├── utils │ │ │ └── screen_break_points.dart │ │ └── widgets │ │ │ ├── adapative_container.dart │ │ │ ├── adapative_padding.dart │ │ │ └── adaptive_layout_builder.dart │ ├── environment │ │ ├── app_configuration.dart │ │ └── environment.dart │ ├── extensions │ │ ├── build_context.dart │ │ ├── dio_request_extension.dart │ │ └── widget_extension.dart │ ├── local_server │ │ ├── config │ │ │ └── local_server_config.dart │ │ ├── handlers │ │ │ └── base_request_handler.dart │ │ ├── local_server_manager.dart │ │ ├── model │ │ │ └── callback_response_handler.dart │ │ └── widgets │ │ │ └── server_initilize_wrapper.dart │ ├── mixins │ │ ├── buttons_mixin.dart │ │ ├── cards_mixin.dart │ │ ├── date_formats.dart │ │ ├── dialogs.dart │ │ ├── feature_discovery_mixin.dart │ │ ├── helper_methods.dart │ │ ├── helper_widgets_mixin.dart │ │ ├── loaders.dart │ │ ├── notifiers.dart │ │ └── validators.dart │ ├── presentation │ │ └── provider │ │ │ ├── common_provider.dart │ │ │ └── route_provider.dart │ ├── router_helper.dart │ ├── routing.dart │ ├── theme │ │ ├── text_theme.dart │ │ ├── theme.dart │ │ └── theme_extensions.dart │ ├── utils │ │ ├── connectivity_handler.dart │ │ ├── constants.dart │ │ ├── enums_type_def.dart │ │ ├── responsive_utils.dart │ │ └── type_def.dart │ └── widgets │ │ ├── custom_app_bar.dart │ │ ├── custom_dropdown.dart │ │ └── text_field.dart ├── features │ ├── automatic_keep_alive.dart │ ├── daily_tracker │ │ ├── core │ │ │ ├── daily_tracker_injection_module.dart │ │ │ ├── daily_tracker_router_module.dart │ │ │ ├── daily_tracker_wrapper_page.dart │ │ │ └── services │ │ │ │ └── session_manager.dart │ │ ├── data │ │ │ ├── model │ │ │ │ ├── action_event.dart │ │ │ │ ├── action_event.g.dart │ │ │ │ ├── auth │ │ │ │ │ ├── user_auth_dto.dart │ │ │ │ │ └── user_auth_dto.g.dart │ │ │ │ ├── daily_tracker_event_model.dart │ │ │ │ ├── daily_tracker_event_model.g.dart │ │ │ │ ├── profile_dto.dart │ │ │ │ └── profile_dto.g.dart │ │ │ └── repository │ │ │ │ ├── auth_repository_impl.dart │ │ │ │ ├── checkIn_status_repo_impl.dart │ │ │ │ ├── daily_tracker_repository.dart │ │ │ │ ├── events_repos_impl.dart │ │ │ │ └── profiles_repo_impl.dart │ │ ├── domain │ │ │ ├── entities │ │ │ │ ├── checkIn_status_entity.dart │ │ │ │ ├── event_entity.dart │ │ │ │ ├── greeting_status_entity.dart │ │ │ │ ├── profile_entity.dart │ │ │ │ └── user_entity.dart │ │ │ ├── repository │ │ │ │ ├── authRepository.dart │ │ │ │ ├── check_in_status_repo.dart │ │ │ │ ├── events_repository.dart │ │ │ │ └── profiles_repository.dart │ │ │ └── usecases │ │ │ │ ├── auth_use_case.dart │ │ │ │ ├── check_in_status_useCase.dart │ │ │ │ ├── check_in_usecase.dart │ │ │ │ ├── create_edit_profile_usecase.dart │ │ │ │ ├── create_update_event_usecase.dart │ │ │ │ ├── delete_event_usecase.dart │ │ │ │ ├── events_usecase.dart │ │ │ │ ├── update_today_event_useCase.dart │ │ │ │ └── users_useCase.dart │ │ ├── features │ │ │ ├── authentication │ │ │ │ ├── login_page.dart │ │ │ │ ├── presentation │ │ │ │ │ └── cubit │ │ │ │ │ │ ├── auth_cubit.dart │ │ │ │ │ │ └── auth_state.dart │ │ │ │ └── sign_up_form.dart │ │ │ ├── dashboard │ │ │ │ └── presentation │ │ │ │ │ └── page │ │ │ │ │ └── daily_tracker_home.dart │ │ │ ├── events │ │ │ │ └── presentation │ │ │ │ │ ├── create_tracker_event.dart │ │ │ │ │ ├── cubit │ │ │ │ │ ├── event_cubit_state.dart │ │ │ │ │ └── events_cubit.dart │ │ │ │ │ └── existing_events.dart │ │ │ ├── greetings │ │ │ │ └── presentation │ │ │ │ │ └── cubit │ │ │ │ │ ├── check_in_status_cubit.dart │ │ │ │ │ └── check_in_status_state.dart │ │ │ └── users │ │ │ │ └── presentation │ │ │ │ ├── create_profile_dialog.dart │ │ │ │ ├── cubit │ │ │ │ ├── profiles_cubit.dart │ │ │ │ └── profiles_cubit_state.dart │ │ │ │ └── profiles_page.dart │ │ ├── presentation │ │ │ ├── screens │ │ │ │ ├── check_in_status.dart │ │ │ │ ├── daily_tracker_event_list.dart │ │ │ │ ├── daily_tracker_events.dart │ │ │ │ ├── reminders_actions_checklist.dart │ │ │ │ ├── selected_event.dart │ │ │ │ └── today_events.dart │ │ │ └── widgets │ │ │ │ ├── check_in_btn.dart │ │ │ │ ├── digital_clock.dart │ │ │ │ └── time_of_day_message.dart │ │ └── shared │ │ │ ├── models │ │ │ ├── profile_executed_task.dart │ │ │ └── profiles_executed_task.dart │ │ │ ├── params │ │ │ ├── create_update_event_param.dart │ │ │ ├── profile_params.dart │ │ │ ├── today_event_update_param.dart │ │ │ ├── user_check_in_params.dart │ │ │ └── user_credentails.dart │ │ │ └── utils │ │ │ └── event_sorter_converter.dart │ ├── dashboard │ │ └── home_screen.dart │ ├── deep_linking │ │ └── deep_linking.dart │ ├── feature_discovery │ │ ├── home_feature_discovery.dart │ │ └── school_feature_discovery.dart │ ├── generative_ai │ │ └── presentation │ │ │ ├── provider │ │ │ └── gemini_provider.dart │ │ │ └── screen │ │ │ └── gemini.dart │ ├── isolates │ │ ├── isolate_home.dart │ │ └── isolate_with_compute.dart │ ├── life_cycle_of_widget.dart │ ├── localization.dart │ ├── plugins │ │ ├── local_authentication.dart │ │ ├── plugins_dashboard.dart │ │ └── youtube.dart │ ├── push_notifcations │ │ ├── firebase_push_notifications.dart │ │ ├── local_pushNotifications.dart │ │ ├── notifications.dart │ │ └── push_notification_service.dart │ ├── regular_widgets │ │ ├── animations │ │ │ ├── custom_implicit_animation_widgets.dart │ │ │ ├── explicit_animation_widgets.dart │ │ │ └── implicit_animations_widgets.dart │ │ ├── cards_list_view_grid.dart │ │ ├── cupertino_components.dart │ │ ├── dialogs.dart │ │ ├── material_components.dart │ │ ├── regular_widgets_dashboard.dart │ │ ├── selectable_text.dart │ │ ├── stepper_ui.dart │ │ └── tables.dart │ ├── routing_features │ │ ├── dynamic_routing_configuration.dart │ │ ├── route_dashboard.dart │ │ ├── shell_route │ │ │ ├── shell_child_one │ │ │ │ ├── shell_child_one.dart │ │ │ │ ├── shell_child_three.dart │ │ │ │ ├── shell_child_two.dart │ │ │ │ └── shell_parent.dart │ │ │ └── shell_routing.dart │ │ ├── state_ful_shell_routing_with_indexed.dart │ │ └── stateful_shell_routing_without_indexed.dart │ ├── schools │ │ ├── core │ │ │ ├── school_module_wrapper_page.dart │ │ │ ├── schools_injection_module.dart │ │ │ └── schools_router_module.dart │ │ ├── data │ │ │ ├── model │ │ │ │ ├── school_details_model.dart │ │ │ │ ├── school_details_model.g.dart │ │ │ │ ├── school_model.dart │ │ │ │ ├── school_model.g.dart │ │ │ │ ├── student_model.dart │ │ │ │ └── student_model.g.dart │ │ │ └── repository │ │ │ │ ├── school_details_repository_impl.dart │ │ │ │ ├── school_repository.dart │ │ │ │ ├── schools_repository_impl.dart │ │ │ │ └── students_repository_impl.dart │ │ ├── domain │ │ │ ├── entities │ │ │ │ ├── school_details_entity.dart │ │ │ │ ├── school_entity.dart │ │ │ │ └── student_entity.dart │ │ │ ├── repository │ │ │ │ ├── school_details_repository.dart │ │ │ │ ├── school_repository.dart │ │ │ │ └── students_repository.dart │ │ │ └── use_cases │ │ │ │ ├── school_details_usecase │ │ │ │ ├── school_details_modify_useCase.dart │ │ │ │ └── school_details_usecase.dart │ │ │ │ ├── schools_usecase │ │ │ │ ├── delete_school_usecase.dart │ │ │ │ ├── school_modify_usecase.dart │ │ │ │ └── school_usecase.dart │ │ │ │ └── student_usecases │ │ │ │ ├── delete_student_usecase.dart │ │ │ │ ├── student_modify_usecase.dart │ │ │ │ ├── student_usecase.dart │ │ │ │ └── students_usecase.dart │ │ ├── presentation │ │ │ ├── blocs │ │ │ │ ├── school_bloc.dart │ │ │ │ ├── school_details_bloc │ │ │ │ │ ├── school_details_bloc.dart │ │ │ │ │ └── schools_details_state.dart │ │ │ │ ├── school_state.dart │ │ │ │ ├── schools_bloc │ │ │ │ │ ├── schools_bloc.dart │ │ │ │ │ └── schools_state.dart │ │ │ │ └── students_bloc │ │ │ │ │ ├── students_bloc.dart │ │ │ │ │ └── students_state.dart │ │ │ └── screens │ │ │ │ ├── db_configurations_for_devs.dart │ │ │ │ ├── dumping_status.dart │ │ │ │ ├── school_details │ │ │ │ ├── add_update_school_details.dart │ │ │ │ └── school_details.dart │ │ │ │ ├── schools │ │ │ │ ├── create_update_school.dart │ │ │ │ └── schools.dart │ │ │ │ └── student │ │ │ │ ├── create_update_student.dart │ │ │ │ └── student.dart │ │ └── shared │ │ │ ├── models │ │ │ ├── school_details_view_model.dart │ │ │ ├── school_executed_task_model.dart │ │ │ ├── school_view_model.dart │ │ │ └── student_view_model.dart │ │ │ └── params │ │ │ ├── school_details_param.dart │ │ │ ├── school_params.dart │ │ │ └── student_params.dart │ ├── schools_mvc │ │ ├── bloc │ │ │ ├── school_bloc.dart │ │ │ └── school_state.dart │ │ ├── model │ │ │ ├── school_details_model.dart │ │ │ ├── school_details_model.g.dart │ │ │ ├── school_model.dart │ │ │ ├── school_model.g.dart │ │ │ ├── student_model.dart │ │ │ └── student_model.g.dart │ │ ├── repository │ │ │ └── school_repository.dart │ │ └── screens │ │ │ ├── add_update_school_details.dart │ │ │ ├── create_update_school.dart │ │ │ ├── create_update_student.dart │ │ │ ├── db_configurations_for_devs.dart │ │ │ ├── dumping_status.dart │ │ │ ├── school_details.dart │ │ │ ├── schools.dart │ │ │ └── student.dart │ ├── scrolling │ │ └── scroll_types.dart │ ├── shortcuts │ │ ├── call_back_shortcuts.dart │ │ ├── shortcut_actions.dart │ │ └── shortcuts_main.dart │ └── smart_control_iot │ │ ├── core │ │ ├── local_server │ │ │ └── local_server_handler │ │ │ │ └── local_server_handler.dart │ │ ├── smart_control_router_module.dart │ │ └── smart_control_wrapper_page.dart │ │ ├── features │ │ ├── dashboard │ │ │ └── presentation │ │ │ │ └── smart_control_dashboard.dart │ │ └── on_and_off │ │ │ ├── data │ │ │ └── respository │ │ │ │ └── on_off_repository.dart │ │ │ ├── domain │ │ │ └── use_cases │ │ │ │ └── on_off_usecase.dart │ │ │ └── presentation │ │ │ ├── cubit │ │ │ ├── on_off_cubit.dart │ │ │ └── on_off_state.dart │ │ │ └── on_and_off_view.dart │ │ └── shared │ │ └── utils │ │ └── enums.dart ├── global_variables.dart ├── l10n │ ├── app_en.arb │ ├── app_es.arb │ ├── app_he.arb │ └── app_hi.arb ├── latest_3.0.dart ├── main.dart └── ui │ └── exception │ ├── exception.dart │ └── page_not_found.dart ├── linux ├── .gitignore ├── CMakeLists.txt ├── flutter │ ├── CMakeLists.txt │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake ├── main.cc ├── my_application.cc └── my_application.h ├── macos ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Podfile ├── Podfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── app_icon_1024.png │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_512.png │ │ │ └── app_icon_64.png │ ├── Base.lproj │ │ └── MainMenu.xib │ ├── Configs │ │ ├── AppInfo.xcconfig │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── Warnings.xcconfig │ ├── DebugProfile.entitlements │ ├── Info.plist │ ├── MainFlutterWindow.swift │ └── Release.entitlements ├── RunnerTests │ └── RunnerTests.swift └── firebase_app_id_file.json ├── pubspec.lock ├── pubspec.yaml ├── test ├── mock_data │ ├── configuration_data.dart │ ├── mock_firebase.dart │ └── school │ │ └── school_mock_data.dart ├── unit_testing │ ├── bloc │ │ ├── school_bloc_test.dart │ │ └── school_bloc_test.mocks.dart │ ├── repository │ │ ├── school_repo_test.dart │ │ └── school_repo_test.mocks.dart │ └── validator_test.dart └── widget_testing │ ├── home_widget_test.dart │ └── school │ ├── create_edit_school_details_test.dart │ ├── create_edit_school_details_test.mocks.dart │ ├── create_edit_school_test.dart │ ├── create_edit_school_test.mocks.dart │ ├── create_edit_student_test.dart │ ├── school_widget_test.dart │ ├── school_widget_test.mocks.dart │ └── view_student_details_test.dart ├── test_driver └── integration_test.dart ├── web ├── .well-known │ ├── apple-app-site-association │ └── assetlinks.json ├── favicon.png ├── firebase-messaging-sw.js ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── index.html └── manifest.json └── windows ├── .gitignore ├── CMakeLists.txt ├── flutter ├── CMakeLists.txt ├── generated_plugin_registrant.cc ├── generated_plugin_registrant.h └── generated_plugins.cmake └── runner ├── CMakeLists.txt ├── Runner.rc ├── flutter_window.cpp ├── flutter_window.h ├── main.cpp ├── resource.h ├── resources └── app_icon.ico ├── runner.exe.manifest ├── utils.cpp ├── utils.h ├── win32_window.cpp └── win32_window.h /.firebase/flutter-end-to-end/hosting/.last_build_id: -------------------------------------------------------------------------------- 1 | 644acc4cc80bbf2a0f7a366a4c88690c -------------------------------------------------------------------------------- /.firebase/flutter-end-to-end/hosting/assets/AssetManifest.bin: -------------------------------------------------------------------------------- 1 | 2packages/cupertino_icons/assets/CupertinoIcons.ttf  asset2packages/cupertino_icons/assets/CupertinoIcons.ttf;packages/flutter_inappwebview/assets/t_rex_runner/t-rex.css  asset;packages/flutter_inappwebview/assets/t_rex_runner/t-rex.css 2 | 3 | Dart E2E 4 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/flutter/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/android/app/src/flutter/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/flutter/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/android/app/src/flutter/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/flutter/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/android/app/src/flutter/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/flutter/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/android/app/src/flutter/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/flutter/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/android/app/src/flutter/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/flutter/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Flutter E2E 4 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/sample_latest/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.sample_latest 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/dash_desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/android/app/src/main/res/drawable/dash_desktop.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Flutter E2E 4 | 5 | 10 | 16 | 19 | 20 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | 2 | allprojects { 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | } 8 | 9 | rootProject.buildDir = '../build' 10 | subprojects { 11 | project.buildDir = "${rootProject.buildDir}/${project.name}" 12 | } 13 | subprojects { 14 | project.evaluationDependsOn(':app') 15 | } 16 | 17 | tasks.register("clean", Delete) { 18 | delete rootProject.buildDir 19 | } 20 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | #org.gradle.java.home=/opt/homebrew/opt/openjdk@11 5 | org.gradle.java.home=/opt/homebrew/opt/openjdk@17 6 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip 6 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file("local.properties").withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty("flutter.sdk") 6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 7 | return flutterSdkPath 8 | }() 9 | 10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") 11 | 12 | repositories { 13 | google() 14 | mavenCentral() 15 | gradlePluginPortal() 16 | } 17 | } 18 | 19 | plugins { 20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0" 21 | id "com.android.application" version "8.1.0" apply false 22 | id 'org.jetbrains.kotlin.android' version '1.8.10' apply false 23 | } 24 | 25 | include ":app" -------------------------------------------------------------------------------- /asset/daily_tracker/auth/landscape_backgroun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/daily_tracker/auth/landscape_backgroun.png -------------------------------------------------------------------------------- /asset/daily_tracker/auth/user_landscape_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/daily_tracker/auth/user_landscape_image.png -------------------------------------------------------------------------------- /asset/daily_tracker/daily_tracker_check_in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/daily_tracker/daily_tracker_check_in.png -------------------------------------------------------------------------------- /asset/daily_tracker/pre_checkin_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/daily_tracker/pre_checkin_background.png -------------------------------------------------------------------------------- /asset/daily_tracker/pre_checkin_background1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/daily_tracker/pre_checkin_background1.png -------------------------------------------------------------------------------- /asset/dart_flavor/dart_leading_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/dart_flavor/dart_leading_logo.png -------------------------------------------------------------------------------- /asset/dart_flavor/launcher_icons/dart_desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/dart_flavor/launcher_icons/dart_desktop.png -------------------------------------------------------------------------------- /asset/dart_flavor/launcher_icons/dart_web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/dart_flavor/launcher_icons/dart_web.png -------------------------------------------------------------------------------- /asset/default_dash_flavor/launcher_icons/dash_android_desktop.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/default_dash_flavor/launcher_icons/dash_android_desktop.jpeg -------------------------------------------------------------------------------- /asset/default_dash_flavor/launcher_icons/dash_flutter.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/default_dash_flavor/launcher_icons/dash_flutter.jpeg -------------------------------------------------------------------------------- /asset/default_dash_flavor/leading_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/default_dash_flavor/leading_logo.png -------------------------------------------------------------------------------- /asset/exception_error/no_access.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/exception_error/no_access.png -------------------------------------------------------------------------------- /asset/exception_error/no_internet.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/exception_error/no_internet.gif -------------------------------------------------------------------------------- /asset/exception_error/no_internet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/exception_error/no_internet.png -------------------------------------------------------------------------------- /asset/exception_error/offline_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/exception_error/offline_error.png -------------------------------------------------------------------------------- /asset/exception_error/page_not_found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/exception_error/page_not_found.png -------------------------------------------------------------------------------- /asset/exception_error/server_not_found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/exception_error/server_not_found.png -------------------------------------------------------------------------------- /asset/exception_error/something_went_wrong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/exception_error/something_went_wrong.png -------------------------------------------------------------------------------- /asset/exception_error/timeout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/exception_error/timeout.png -------------------------------------------------------------------------------- /asset/flutter_flavor/flutter_leading_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/flutter_flavor/flutter_leading_logo.png -------------------------------------------------------------------------------- /asset/flutter_flavor/launcher_icons/flutter_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/flutter_flavor/launcher_icons/flutter_logo.jpg -------------------------------------------------------------------------------- /asset/flutter_flavor/launcher_icons/flutter_logo_web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/flutter_flavor/launcher_icons/flutter_logo_web.png -------------------------------------------------------------------------------- /asset/flutter_flavor/leading_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/flutter_flavor/leading_logo.png -------------------------------------------------------------------------------- /asset/gifs/happy.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/gifs/happy.gif -------------------------------------------------------------------------------- /asset/gifs/waiting.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/gifs/waiting.gif -------------------------------------------------------------------------------- /asset/icons/discover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/icons/discover.png -------------------------------------------------------------------------------- /asset/launcher_icons/dash_desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/launcher_icons/dash_desktop.png -------------------------------------------------------------------------------- /asset/school_data.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/school_data.zip -------------------------------------------------------------------------------- /asset/sound_effects/check_in.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/asset/sound_effects/check_in.mp3 -------------------------------------------------------------------------------- /build.yaml: -------------------------------------------------------------------------------- 1 | targets: 2 | $default: 3 | sources: 4 | exclude: 5 | - lib/test_driver/runner.dart 6 | - lib/tools/**.dart 7 | -------------------------------------------------------------------------------- /devtools_options.yaml: -------------------------------------------------------------------------------- 1 | extensions: 2 | - provider: true -------------------------------------------------------------------------------- /firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "public": "build/web", 4 | "ignore": [ 5 | "firebase.json", 6 | "**/.*", 7 | "**/node_modules/**" 8 | ], 9 | "rewrites": [ 10 | { 11 | "source": "**", 12 | "destination": "/index.html" 13 | } 14 | ], 15 | "frameworksBackend": { 16 | "region": "us-central1" 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /flutter_launcher_icons-dart.yaml: -------------------------------------------------------------------------------- 1 | flutter_launcher_icons: 2 | image_path_android: "asset/dart_flavor/launcher_icons/dart_web.png" 3 | image_path_ios: "asset/dart_flavor/launcher_icons/dart_web.png" 4 | android: true # can specify file name here e.g. "ic_launcher" 5 | ios: true # can specify file name here e.g. "My-Launcher-Icon" 6 | # adaptive_icon_background: "assets/images/christmas-background.png" # only available for Android 8.0 devices and above 7 | # adaptive_icon_foreground: "assets/images/icon-foreground-432x432.png" # only available for Android 8.0 devices and above 8 | # adaptive_icon_monochrome: "assets/images/icon-monochrome-432x432.png" # only available for Android 13 devices and above 9 | min_sdk_android: 21 # android min sdk min:16, default 21 10 | remove_alpha_ios: true 11 | background_color_ios: "#ffffff" 12 | web: 13 | generate: true 14 | image_path: "asset/dart_flavor/launcher_icons/dart_web.png" 15 | background_color: "#hexcode" 16 | theme_color: "#hexcode" 17 | windows: 18 | generate: true 19 | image_path: "asset/dart_flavor/launcher_icons/dart_desktop.png" 20 | icon_size: 48 # min:48, max:256, default: 48 21 | macos: 22 | generate: true 23 | image_path: "asset/dart_flavor/launcher_icons/dart_desktop.png" 24 | -------------------------------------------------------------------------------- /flutter_launcher_icons-flutter.yaml: -------------------------------------------------------------------------------- 1 | flutter_launcher_icons: 2 | image_path_android: "asset/flutter_flavor/launcher_icons/flutter_logo.jpg" 3 | image_path_ios: "asset/flutter_flavor/launcher_icons/flutter_logo.jpg" 4 | android: true # can specify file name here e.g. "ic_launcher" 5 | ios: true # can specify file name here e.g. "My-Launcher-Icon" 6 | # adaptive_icon_background: "assets/images/christmas-background.png" # only available for Android 8.0 devices and above 7 | # adaptive_icon_foreground: "assets/images/icon-foreground-432x432.png" # only available for Android 8.0 devices and above 8 | # adaptive_icon_monochrome: "assets/images/icon-monochrome-432x432.png" # only available for Android 13 devices and above 9 | min_sdk_android: 21 # android min sdk min:16, default 21 10 | remove_alpha_ios: true 11 | background_color_ios: "#ffffff" 12 | web: 13 | generate: true 14 | image_path: "asset/flutter_flavor/launcher_icons/flutter_logo_web.png" 15 | # background_color: "#hexcode" 16 | # theme_color: "#hexcode" 17 | windows: 18 | generate: true 19 | image_path: "asset/flutter_flavor/launcher_icons/flutter_logo.jpg" 20 | icon_size: 48 # min:48, max:256, default: 48 21 | macos: 22 | generate: true 23 | image_path: "asset/flutter_flavor/launcher_icons/flutter_logo.jpg" -------------------------------------------------------------------------------- /flutter_launcher_icons.yaml: -------------------------------------------------------------------------------- 1 | flutter_launcher_icons: 2 | image_path_android: "asset/default_dash_flavor/launcher_icons/dash_android_desktop.jpeg" 3 | image_path_ios: "asset/default_dash_flavor/launcher_icons/dash_flutter.jpeg" 4 | android: true # can specify file name here e.g. "ic_launcher" 5 | ios: true # can specify file name here e.g. "My-Launcher-Icon" 6 | # adaptive_icon_background: "assets/images/christmas-background.png" # only available for Android 8.0 devices and above 7 | # adaptive_icon_foreground: "assets/images/icon-foreground-432x432.png" # only available for Android 8.0 devices and above 8 | # adaptive_icon_monochrome: "assets/images/icon-monochrome-432x432.png" # only available for Android 13 devices and above 9 | min_sdk_android: 21 # android min sdk min:16, default 21 10 | remove_alpha_ios: true 11 | background_color_ios: "#ffffff" 12 | web: 13 | generate: true 14 | image_path: "asset/default_dash_flavor/launcher_icons/dash_flutter.jpeg" 15 | background_color: "#hexcode" 16 | theme_color: "#hexcode" 17 | windows: 18 | generate: true 19 | image_path: "asset/default_dash_flavor/launcher_icons/dash_flutter.jpeg" 20 | icon_size: 48 # min:48, max:256, default: 48 21 | macos: 22 | generate: true 23 | image_path: "asset/default_dash_flavor/launcher_icons/dash_flutter.jpeg" 24 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | Runner/GoogleService-Info.plist 30 | 31 | # Exceptions to above rules. 32 | !default.mode1v3 33 | !default.mode2v3 34 | !default.pbxuser 35 | !default.perspectivev3 36 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 12.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '12.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | target 'RunnerTests' do 36 | inherit! :search_paths 37 | end 38 | end 39 | 40 | post_install do |installer| 41 | installer.pods_project.targets.each do |target| 42 | flutter_additional_ios_build_settings(target) 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | import workmanager 4 | import flutter_local_notifications 5 | 6 | @main 7 | @objc class AppDelegate: FlutterAppDelegate { 8 | override func application( 9 | _ application: UIApplication, 10 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 11 | ) -> Bool { 12 | 13 | FlutterLocalNotificationsPlugin.setPluginRegistrantCallback { (registry) in 14 | GeneratedPluginRegistrant.register(with: registry)} 15 | 16 | GeneratedPluginRegistrant.register(with: self) 17 | 18 | if #available(iOS 10.0, *) { 19 | UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate 20 | } 21 | 22 | WorkmanagerPlugin.registerTask(withIdentifier: "task-identifier") 23 | UIApplication.shared.setMinimumBackgroundFetchInterval(TimeInterval(60*15)) 24 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-50x50@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-50x50@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-57x57@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-57x57@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-72x72@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-72x72@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-dart.appiconset/AppIcon-dart-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-50x50@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-50x50@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-57x57@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-57x57@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-72x72@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-72x72@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon-flutter.appiconset/AppIcon-flutter-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | com.apple.developer.associated-domains 8 | 9 | applinks:flutter-end-to-end.web.app 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /ios/build/.last_build_id: -------------------------------------------------------------------------------- 1 | e728d5ba4e52068eb059d8c80cc8e750 -------------------------------------------------------------------------------- /ios/ci_scripts/ci_post_clone.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Fail this script if any subcommand fails. 4 | set -e 5 | 6 | # The default execution directory of this script is the ci_scripts directory. 7 | cd $CI_PRIMARY_REPOSITORY_PATH # change working directory to the root of your cloned repo. 8 | 9 | # Install Flutter using git. 10 | git clone https://github.com/flutter/flutter.git --depth 1 -b stable $HOME/flutter 11 | export PATH="$PATH:$HOME/flutter/bin" 12 | 13 | # Install Flutter artifacts for iOS (--ios), or macOS (--macos) platforms. 14 | flutter precache --ios 15 | 16 | # Install Flutter dependencies. 17 | flutter pub get 18 | 19 | # Install CocoaPods using Homebrew. 20 | HOMEBREW_NO_AUTO_UPDATE=1 # disable homebrew's automatic updates. 21 | brew install cocoapods 22 | 23 | # Install CocoaPods dependencies. 24 | cd ios && pod install # run `pod install` in the `ios` directory. 25 | 26 | exit 0 -------------------------------------------------------------------------------- /ios/firebase_app_id_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "file_generated_by": "FlutterFire CLI", 3 | "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory", 4 | "GOOGLE_APP_ID": "1:334267766183:ios:d93d9771baaabea8a35282", 5 | "FIREBASE_PROJECT_ID": "flutter-end-to-end", 6 | "GCM_SENDER_ID": "334267766183" 7 | } -------------------------------------------------------------------------------- /l10n.yaml: -------------------------------------------------------------------------------- 1 | arb-dir: lib/l10n 2 | template-arb-file: app_en.arb 3 | output-localization-file: app_localizations.dart 4 | use-escaping : true -------------------------------------------------------------------------------- /lib/adsense_web.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_web_plugins/flutter_web_plugins.dart'; 2 | 3 | void executeWebDependencies() { 4 | usePathUrlStrategy(); 5 | } 6 | -------------------------------------------------------------------------------- /lib/adsense_web_stub.dart: -------------------------------------------------------------------------------- 1 | executeWebDependencies() {} 2 | -------------------------------------------------------------------------------- /lib/analytics_exception_handler/analytics_logging.dart: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/analytics_exception_handler/custom_exception.dart: -------------------------------------------------------------------------------- 1 | class OfflineException implements Exception { 2 | final Object? error; 3 | 4 | final StackTrace? stackTrace; 5 | 6 | OfflineException({this.error, this.stackTrace}); 7 | } 8 | -------------------------------------------------------------------------------- /lib/analytics_exception_handler/error_reporting.dart: -------------------------------------------------------------------------------- 1 | class ReportError { 2 | static errorLog(Object error, [StackTrace? stackTrace]) {} 3 | } 4 | -------------------------------------------------------------------------------- /lib/core/constants/theme_constants.dart: -------------------------------------------------------------------------------- 1 | abstract class ThemeConstants { 2 | // Base width (iPhone X) 3 | static const double baseWidth = 375.0; 4 | 5 | // Breakpoints 6 | static const double mobileBreakpoint = 375.0; 7 | static const double tabletBreakpoint = 768.0; 8 | static const double desktopBreakpoint = 1024.0; 9 | 10 | // Scale factors for different screen sizes 11 | static const double mobileScaleFactor = 1.0; 12 | static const double tabletScaleFactor = 1.1; 13 | static const double desktopScaleFactor = 1.2; 14 | 15 | // Font size limits 16 | static const double minScaleFactor = 0.8; 17 | static const double maxScaleFactor = 1.15; // Reduced from 1.4 18 | } 19 | -------------------------------------------------------------------------------- /lib/core/data/db/queries/create_common_tables_queries.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE queue_items (queueId INTEGER PRIMARY KEY AUTOINCREMENT, id TEXT, path TEXT, methodType TEXT, body TEXT, queryParams TEXT, priority INTEGER); 2 | -------------------------------------------------------------------------------- /lib/core/data/db/queries/create_school_table_queries.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE schools (id TEXT PRIMARY KEY, schoolName TEXT, location TEXT, country TEXT, createdDate INTEGER, updatedDate INTEGER); 2 | CREATE TABLE school_details (id TEXT PRIMARY KEY, schoolName TEXT, country TEXT, location TEXT, image TEXT, studentCount INTEGER, employeeCount INTEGER, hostelAvailability INTEGER, createdDate INTEGER, updatedDate INTEGER); 3 | CREATE TABLE students (id TEXT PRIMARY KEY, schoolId TEXT, studentName TEXT, standard TEXT, studentLocation TEXT, createdDate INTEGER, updatedDate INTEGER); 4 | -------------------------------------------------------------------------------- /lib/core/data/db/queries/create_todolist_table_queries.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS users ( 2 | id INTEGER PRIMARY KEY, 3 | name TEXT, 4 | age INTEGER 5 | ); -------------------------------------------------------------------------------- /lib/core/data/models/queue_item/queue_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'queue_item.g.dart'; 4 | 5 | @JsonSerializable() 6 | class QueueItem { 7 | final String? id; 8 | 9 | final int? queueId; 10 | 11 | final String path; 12 | 13 | final String methodType; 14 | 15 | final dynamic body; 16 | 17 | final Map? queryParams; 18 | 19 | final int priority; 20 | 21 | QueueItem(this.path, this.methodType, 22 | {this.body, this.queryParams, this.priority = -1, this.id, this.queueId}); 23 | 24 | factory QueueItem.fromJson(Map json) => 25 | _$QueueItemFromJson(json); 26 | 27 | Map toJson() => _$QueueItemToJson(this); 28 | } 29 | -------------------------------------------------------------------------------- /lib/core/data/models/queue_item/queue_item.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'queue_item.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | QueueItem _$QueueItemFromJson(Map json) => QueueItem( 10 | json['path'] as String, 11 | json['methodType'] as String, 12 | body: json['body'], 13 | queryParams: json['queryParams'] as Map?, 14 | priority: json['priority'] as int? ?? -1, 15 | id: json['id'] as String?, 16 | queueId: json['queueId'] as int?, 17 | ); 18 | 19 | Map _$QueueItemToJson(QueueItem instance) => { 20 | 'id': instance.id, 21 | 'queueId': instance.queueId, 22 | 'path': instance.path, 23 | 'methodType': instance.methodType, 24 | 'body': instance.body, 25 | 'queryParams': instance.queryParams, 26 | 'priority': instance.priority, 27 | }; 28 | -------------------------------------------------------------------------------- /lib/core/data/urls.dart: -------------------------------------------------------------------------------- 1 | class Urls { 2 | static const String baseUrl = 3 | 'https://flutter-end-to-end-default-rtdb.firebaseio.com/'; 4 | 5 | static const String schools = 'schools'; 6 | static const String students = 'students'; 7 | static const String schoolDetails = 'schooldetails'; 8 | static const String todoList = 'todoList'; 9 | 10 | static const String dailyCheckIns = 'daily-checkins'; 11 | static const String profiles = 'profiles'; 12 | static const String events = 'events'; 13 | } 14 | -------------------------------------------------------------------------------- /lib/core/data/utils/abstract_db_handler.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:sample_latest/core/mixins/helper_methods.dart'; 3 | import 'package:sample_latest/core/data/db/db_handler.dart'; 4 | import 'package:sample_latest/core/data/utils/service_enums_typedef.dart'; 5 | 6 | abstract class DbHandler { 7 | bool isDbInitialized = false; 8 | 9 | late SqfLiteDbHandler _dbHandler; 10 | 11 | SqfLiteDbHandler get dbHandler { 12 | return _dbHandler; 13 | } 14 | 15 | Future initializeDb(DbInfo dbInfo) async { 16 | if (!isDbInitialized) { 17 | _dbHandler = await SqfLiteDbHandler.initializeDb(dbInfo); 18 | isDbInitialized = true; 19 | } 20 | return true; 21 | } 22 | 23 | RequestType requestType(String requestType) { 24 | return HelperMethods.enumFromString( 25 | RequestType.values, requestType.toLowerCase()) ?? 26 | RequestType.get; 27 | } 28 | 29 | Future initializeDbIfNot(); 30 | 31 | Future performCrudOperation(RequestOptions options); 32 | 33 | Future performPostOperation(RequestOptions options); 34 | 35 | Future performGetOperation(RequestOptions options); 36 | 37 | Future performDeleteOperation(RequestOptions options); 38 | 39 | Future performPatchOperation(RequestOptions options); 40 | 41 | Future performBulkLocalDataStoreOperation(RequestOptions options); 42 | 43 | Future deleteOutdatedData(int millisecondsSinceEpoch); 44 | 45 | Future resetDataBase(); 46 | } 47 | -------------------------------------------------------------------------------- /lib/core/data/utils/db_constants.dart: -------------------------------------------------------------------------------- 1 | class DbConstants { 2 | static const String schoolDbName = 'school'; 3 | 4 | static const String todoListDbName = 'todolist'; 5 | 6 | static const String studentsTableName = 'students'; 7 | 8 | static const String idColumnName = 'id'; 9 | 10 | static const String queueColumnName = 'queueId'; 11 | 12 | static const String reqDataColumnName = 'reqdata'; 13 | 14 | static const String queueItems = 'queue_items'; 15 | 16 | static const String notRequiredToStoreInQueue = 'notRequiredToStoreInQueue'; 17 | 18 | static const String isOfflineApi = 'isOfflineApi'; 19 | 20 | static const String isFromQueue = 'isFromQueue'; 21 | 22 | static const String priority = 'priority'; 23 | 24 | static const String notSupportedOfflineErrorMsg = 25 | 'Currently not supported Offline. Please retry when Online'; 26 | 27 | static const String failedToProcessInOfflineErrorMsg = 28 | 'Failed to process the data, Unexpected error occurred'; 29 | } 30 | 31 | class SchoolDbConstants { 32 | static const String schoolsTableName = 'schools'; 33 | 34 | static const String schoolDetailsTableName = 'school_details'; 35 | 36 | static const String studentsTableName = 'students'; 37 | 38 | static const String schoolIdColumnName = 'schoolId'; 39 | } 40 | -------------------------------------------------------------------------------- /lib/core/data/utils/service_enums_typedef.dart: -------------------------------------------------------------------------------- 1 | enum DataErrorStateType { 2 | noInternet, 3 | timeoutException, 4 | serverNotFound, 5 | somethingWentWrong, 6 | fetchData, 7 | unauthorized, 8 | none, 9 | offlineError 10 | } 11 | 12 | enum RequestType { get, put, post, delete, patch, store } 13 | 14 | typedef DbInfo = ({String dbName, String queryFileName, int dbVersion}); 15 | 16 | typedef ErrorDetails = (DataErrorStateType, {String? message}); 17 | -------------------------------------------------------------------------------- /lib/core/device/enums/device_enums.dart: -------------------------------------------------------------------------------- 1 | enum OperatingSystemType { 2 | ios, 3 | android, 4 | androidFolded, 5 | windows, 6 | linux, 7 | macos, 8 | web 9 | } 10 | 11 | enum DeviceResolutionType { mobile, tab, desktop } 12 | 13 | enum ApplicationType { mobile, web, desktop } 14 | -------------------------------------------------------------------------------- /lib/core/device/utils/screen_break_points.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ScreenBreakPoints { 4 | static const mobileBreakPoint = 600.0; 5 | 6 | static const tabletBreakPoint = 900.0; 7 | 8 | static const desktopBreakPoint = 1024.0; 9 | 10 | static bool isMobile(Size size) => size.width < mobileBreakPoint; 11 | 12 | static bool isTablet(Size size) => 13 | size.width >= mobileBreakPoint && size.width < desktopBreakPoint; 14 | 15 | static bool isDesktop(Size size) => size.width >= desktopBreakPoint; 16 | } 17 | -------------------------------------------------------------------------------- /lib/core/device/widgets/adapative_padding.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:sample_latest/core/device/utils/screen_break_points.dart'; 3 | 4 | class AdaptivePadding extends StatelessWidget { 5 | final Widget child; 6 | final EdgeInsetsGeometry? padding; 7 | 8 | const AdaptivePadding({ 9 | Key? key, 10 | required this.child, 11 | this.padding, 12 | }) : super(key: key); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Padding( 17 | padding: padding ?? _getPadding(context), 18 | child: child, 19 | ); 20 | } 21 | 22 | EdgeInsets _getPadding(BuildContext context) { 23 | double screenWidth = MediaQuery.of(context).size.width; 24 | 25 | if (screenWidth < ScreenBreakPoints.mobileBreakPoint) { 26 | return const EdgeInsets.all(8); 27 | } else if (screenWidth > ScreenBreakPoints.mobileBreakPoint && 28 | screenWidth < ScreenBreakPoints.desktopBreakPoint) { 29 | return const EdgeInsets.all(16); 30 | } else { 31 | return const EdgeInsets.all(20); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/core/environment/app_configuration.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class AppConfiguration { 4 | final String appBarLogoPath; 5 | 6 | final Color seedColor; 7 | 8 | final Color? hoverColor; 9 | 10 | AppConfiguration( 11 | {required this.appBarLogoPath, 12 | this.seedColor = Colors.green, 13 | this.hoverColor}); 14 | } 15 | -------------------------------------------------------------------------------- /lib/core/extensions/build_context.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | extension BuildContextExtensions on BuildContext { 4 | bool get isDarkMode { 5 | final brightness = MediaQuery.of(this).platformBrightness; 6 | return brightness == Brightness.dark; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /lib/core/extensions/dio_request_extension.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:sample_latest/core/data/utils/db_constants.dart'; 3 | 4 | extension DioRequestExtension on RequestOptions { 5 | /// To check whether this Api supports Offline or not 6 | bool get isOfflineApi => 7 | extra.containsKey(DbConstants.isOfflineApi) && 8 | extra[DbConstants.isOfflineApi]; 9 | 10 | ///To check whether this request is Queue items 11 | bool get isFromQueueItem => 12 | extra.containsKey(DbConstants.isFromQueue) && 13 | extra[DbConstants.isFromQueue]; 14 | 15 | ///Whether this request is required to store in local db or not 16 | bool get notRequiredToStoreInQueue => 17 | extra.containsKey(DbConstants.notRequiredToStoreInQueue) && 18 | extra[DbConstants.notRequiredToStoreInQueue]; 19 | 20 | /// Get the Priority or else default is -1 21 | int get priority => extra.containsKey(DbConstants.priority) 22 | ? extra[DbConstants.priority] 23 | : -1; 24 | 25 | /// For setting the flag value of is Offline support or not 26 | set isOfflineApi(bool status) => extra[DbConstants.isOfflineApi] = status; 27 | 28 | /// Setter to set the is From Queue item or not 29 | set isFromQueueItem(bool status) => extra[DbConstants.isFromQueue] = status; 30 | 31 | /// Setter to set the status of whether to store in Queue or not 32 | set notRequiredToStoreInQueue(bool status) => 33 | extra[DbConstants.notRequiredToStoreInQueue] = status; 34 | 35 | /// Setter to set the priority 36 | set priority(int status) => extra[DbConstants.priority] = status; 37 | } 38 | -------------------------------------------------------------------------------- /lib/core/extensions/widget_extension.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | extension WidgetExtension on Widget { 4 | Padding screenPadding() { 5 | return Padding( 6 | padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 16), 7 | child: this, 8 | ); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/core/local_server/config/local_server_config.dart: -------------------------------------------------------------------------------- 1 | 2 | class ServerConfig { 3 | static const defaultPort = 8080; 4 | static const defaultHost = 'localhost'; 5 | static const apiPrefix = 'api'; 6 | // Add other configuration constants 7 | } -------------------------------------------------------------------------------- /lib/core/local_server/handlers/base_request_handler.dart: -------------------------------------------------------------------------------- 1 | 2 | import '../model/callback_response_handler.dart'; 3 | 4 | import 'dart:convert'; 5 | 6 | import 'package:shelf/shelf.dart'; 7 | 8 | abstract class BaseRequestHandler { 9 | Future> handleRequest(Request request); 10 | 11 | // Common utility methods that all handlers might need 12 | Future> parseJsonBody(Request request) async { 13 | try { 14 | final String body = await request.readAsString(); 15 | return json.decode(body) as Map; 16 | } catch (e) { 17 | throw Exception('Invalid JSON body'); 18 | } 19 | } 20 | 21 | Response createJsonResponse(dynamic data, {int statusCode = 200}) { 22 | return Response( 23 | statusCode, 24 | body: json.encode(data), 25 | headers: {'content-type': 'application/json'}, 26 | ); 27 | } 28 | 29 | error(String message) { 30 | // TODO: implement error 31 | throw UnimplementedError(); 32 | } 33 | 34 | String success(dyamic) { 35 | return ''; 36 | } 37 | 38 | 39 | } -------------------------------------------------------------------------------- /lib/core/local_server/model/callback_response_handler.dart: -------------------------------------------------------------------------------- 1 | 2 | // Result class for handling responses 3 | class Result { 4 | final T? data; 5 | final String? error; 6 | final bool isSuccess; 7 | 8 | Result.ok(this.data) 9 | : error = null, 10 | isSuccess = true; 11 | 12 | Result.error(this.error) 13 | : data = null, 14 | isSuccess = false; 15 | } -------------------------------------------------------------------------------- /lib/core/mixins/buttons_mixin.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | mixin ButtonMixin { 4 | Widget customTextButton({required String label, VoidCallback? callback}) { 5 | return Builder(builder: (context) { 6 | return TextButton( 7 | onPressed: callback, 8 | style: ButtonStyle( 9 | backgroundColor: WidgetStateProperty.resolveWith((states) { 10 | if (states.contains(WidgetState.hovered)) { 11 | return Colors.orange; 12 | } else { 13 | return Colors.lightGreen; 14 | } 15 | }), 16 | shape: WidgetStateProperty.all(const RoundedRectangleBorder( 17 | borderRadius: BorderRadius.all(Radius.circular(5))))), 18 | child: Text( 19 | label, 20 | style: Theme.of(context) 21 | .textTheme 22 | .labelLarge! 23 | .copyWith(color: Colors.white), 24 | ), 25 | ); 26 | }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/core/mixins/feature_discovery_mixin.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | mixin FeatureDiscovery { 4 | Widget featureDiscovery(VoidCallback callback) { 5 | return Tooltip( 6 | message: 'Feature Discovery', 7 | child: InkResponse( 8 | onTap: callback, 9 | child: Image.asset('asset/icons/discover.png', 10 | height: 30, width: 30, color: Colors.white))); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/core/mixins/helper_methods.dart: -------------------------------------------------------------------------------- 1 | import 'package:sample_latest/core/utils/enums_type_def.dart'; 2 | import 'package:uuid/uuid.dart'; 3 | 4 | mixin HelperMethods { 5 | static const _uuid = Uuid(); 6 | 7 | static K? enumFromString(Iterable values, String value) { 8 | return values 9 | .firstWhere((type) => type.toString().split(".").last == value); 10 | } 11 | 12 | static String get uuid { 13 | return _uuid.v1().replaceAll('-', ''); 14 | } 15 | 16 | PartsOfDay getTimeOfDay() { 17 | DateTime now = DateTime.now(); 18 | int hour = now.hour; 19 | 20 | if (hour >= 6 && hour < 12) { 21 | return PartsOfDay.morning; 22 | } else if (hour >= 12 && hour < 16) { 23 | return PartsOfDay.afternoon; 24 | } else if (hour >= 16 && hour < 21) { 25 | return PartsOfDay.evening; 26 | } else { 27 | return PartsOfDay.night; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/core/mixins/loaders.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | mixin Loaders { 4 | Widget circularLoader() { 5 | return const Center(child: CircularProgressIndicator()); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/core/mixins/notifiers.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fluttertoast/fluttertoast.dart'; 3 | 4 | mixin Notifiers { 5 | static void toastNotifier(String label) { 6 | Fluttertoast.showToast( 7 | msg: label, 8 | webShowClose: true, 9 | toastLength: Toast.LENGTH_SHORT, 10 | gravity: ToastGravity.CENTER, 11 | timeInSecForIosWeb: 5, 12 | // webBgColor: Colors.grey, 13 | backgroundColor: Colors.red, 14 | textColor: Colors.white, 15 | fontSize: 16.0); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/core/mixins/validators.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | 3 | mixin Validators { 4 | static final TextInputFormatter onlyNumerics = 5 | FilteringTextInputFormatter.allow(RegExp('[0-9]')); 6 | 7 | String? textEmptyValidator(String? value, String message) { 8 | if (value == null || value.trim().isEmpty) { 9 | return message; 10 | } 11 | return null; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/core/presentation/provider/route_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class RouteProvider with ChangeNotifier { 4 | int value = 0; 5 | 6 | void increase() { 7 | value++; 8 | notifyListeners(); 9 | } 10 | 11 | void decrease() { 12 | value--; 13 | notifyListeners(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/core/router_helper.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:go_router/go_router.dart'; 3 | 4 | class RouterHelper { 5 | static String? redirectWithToast(BuildContext context, 6 | {required GoRouterState state, 7 | required String redirectPath, 8 | required List paramKeys, 9 | required toastMessage}) { 10 | if (paramKeys.any((key) => !state.uri.queryParameters.containsKey(key))) { 11 | return redirectPath; 12 | } 13 | return null; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/core/theme/theme_extensions.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | class ResponsiveThemeExtension 6 | extends ThemeExtension { 7 | final double displayScale; 8 | final double headlineScale; 9 | final double bodyScale; 10 | 11 | ResponsiveThemeExtension({ 12 | required this.displayScale, 13 | required this.headlineScale, 14 | required this.bodyScale, 15 | }); 16 | 17 | @override 18 | ResponsiveThemeExtension copyWith({ 19 | double? displayScale, 20 | double? headlineScale, 21 | double? bodyScale, 22 | }) { 23 | return ResponsiveThemeExtension( 24 | displayScale: displayScale ?? this.displayScale, 25 | headlineScale: headlineScale ?? this.headlineScale, 26 | bodyScale: bodyScale ?? this.bodyScale, 27 | ); 28 | } 29 | 30 | @override 31 | ThemeExtension lerp( 32 | ThemeExtension? other, 33 | double t, 34 | ) { 35 | if (other is! ResponsiveThemeExtension) return this; 36 | 37 | return ResponsiveThemeExtension( 38 | displayScale: lerpDouble(displayScale, other.displayScale, t)!, 39 | headlineScale: lerpDouble(headlineScale, other.headlineScale, t)!, 40 | bodyScale: lerpDouble(bodyScale, other.bodyScale, t)!, 41 | ); 42 | } 43 | 44 | static ResponsiveThemeExtension of(BuildContext context) { 45 | return Theme.of(context).extension()!; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/core/utils/constants.dart: -------------------------------------------------------------------------------- 1 | class Constants { 2 | /// Feature Discovery 3 | static const String homeDiscoveryStatus = 'homeDiscoveryStatus'; 4 | static const String schoolDiscoveryStatus = 'schoolDiscoveryStatus'; 5 | } 6 | -------------------------------------------------------------------------------- /lib/core/utils/enums_type_def.dart: -------------------------------------------------------------------------------- 1 | enum ScreenType { 2 | dashboard, 3 | routing, 4 | school, 5 | smartControl, 6 | schoolMvc, 7 | automaticKeepAlive, 8 | localizationWithCalendar, 9 | isolates, 10 | shortcuts, 11 | plugins, 12 | scrollTypes, 13 | pushNotifications, 14 | deepLinking, 15 | gemini, 16 | dailyTracker 17 | } 18 | 19 | enum RouteType { 20 | shellRouting, 21 | stateFullShellRoutingWithIndexed, 22 | stateFullShellRoutingWithoutIndexed 23 | } 24 | 25 | enum IsolateType { isolateWithWithOutLag, isolateWithSpawn } 26 | 27 | enum PluginType { 28 | youtube, 29 | localAuthentication, 30 | localNotifications, 31 | sharePlus, 32 | audioPlayer, 33 | networkInfo 34 | } 35 | 36 | typedef OfflineDumpingStatus = ({String title, int percentage})?; 37 | 38 | enum SchoolDiscoverFeatureType { 39 | create, 40 | edit, 41 | delete, 42 | sync, 43 | dumpOfflineData, 44 | setDdConfig, 45 | resetDb 46 | } 47 | 48 | enum PartsOfDay { allDay, morning, afternoon, evening, night, customTime } 49 | 50 | enum EventDayType { 51 | everyday, 52 | dayByDay, 53 | weekly, 54 | fortnight, 55 | quaterly, 56 | customDate, 57 | action 58 | } 59 | 60 | enum EventStatus { inProgress, pending, completed, skip } 61 | 62 | enum EventActionType { edit, completed, skip, inProgress } 63 | -------------------------------------------------------------------------------- /lib/core/utils/responsive_utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../constants/theme_constants.dart'; 3 | 4 | class ResponsiveUtils { 5 | static double getScaleFactor(BuildContext context) { 6 | double screenWidth = MediaQuery.of(context).size.width; 7 | 8 | // Progressive scaling based on screen size 9 | if (screenWidth <= ThemeConstants.mobileBreakpoint) { 10 | // Mobile devices 11 | return (screenWidth / ThemeConstants.baseWidth) 12 | .clamp(ThemeConstants.minScaleFactor, 1.0); 13 | } else if (screenWidth <= ThemeConstants.tabletBreakpoint) { 14 | // Tablets 15 | double scale = 1.0 + 16 | (((screenWidth - ThemeConstants.mobileBreakpoint) / 17 | (ThemeConstants.tabletBreakpoint - 18 | ThemeConstants.mobileBreakpoint)) * 19 | 0.1); 20 | return scale.clamp(1.0, 1.1); 21 | } else { 22 | // Larger screens 23 | return ThemeConstants.maxScaleFactor; // Fixed scale for larger screens 24 | } 25 | } 26 | 27 | static double getResponsiveFontSize(double baseSize, BuildContext context) { 28 | double scaleFactor = getScaleFactor(context); 29 | return baseSize * scaleFactor; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/core/utils/type_def.dart: -------------------------------------------------------------------------------- 1 | typedef Redirect = void Function(String path); 2 | -------------------------------------------------------------------------------- /lib/core/widgets/custom_dropdown.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CustomDropDown extends StatelessWidget { 4 | const CustomDropDown( 5 | {Key? key, 6 | required this.value, 7 | required this.items, 8 | required this.onChanged, 9 | this.hint, 10 | this.validator}) 11 | : super(key: key); 12 | 13 | final T? value; 14 | 15 | final List> items; 16 | 17 | final ValueChanged onChanged; 18 | 19 | final String? hint; 20 | 21 | final String? Function(T?)? validator; 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return DropdownButtonFormField( 26 | hint: hint != null ? Text(hint!) : null, 27 | items: items, 28 | onChanged: onChanged, 29 | value: value, 30 | validator: validator, 31 | style: const TextStyle(fontWeight: FontWeight.w100, color: Colors.black), 32 | decoration: const InputDecoration(border: OutlineInputBorder()), 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/core/widgets/text_field.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | 4 | class CustomTextField extends StatelessWidget { 5 | const CustomTextField( 6 | {Key? key, 7 | required this.controller, 8 | required this.label, 9 | this.suffixIcon, 10 | this.validator, 11 | this.inputFormatter, 12 | this.prefix, 13 | this.maxLines, 14 | this.onChange}) 15 | : super(key: key); 16 | 17 | final TextEditingController controller; 18 | 19 | final String label; 20 | 21 | final Widget? suffixIcon; 22 | 23 | final String? prefix; 24 | 25 | final String? Function(String?)? validator; 26 | 27 | final List? inputFormatter; 28 | 29 | final int? maxLines; 30 | 31 | final ValueChanged? onChange; 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | return TextFormField( 36 | controller: controller, 37 | decoration: outlineDecoration(), 38 | validator: validator, 39 | inputFormatters: inputFormatter, 40 | maxLines: maxLines, 41 | onChanged: onChange, 42 | ); 43 | } 44 | 45 | InputDecoration outlineDecoration() { 46 | return InputDecoration( 47 | label: Text(label), 48 | suffixIcon: suffixIcon, 49 | prefixText: prefix, 50 | border: const OutlineInputBorder()); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/core/services/session_manager.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 4 | import 'package:sample_latest/features/daily_tracker/domain/entities/user_entity.dart'; 5 | 6 | class SessionManager { 7 | late final String userId; 8 | late final String userEmail; 9 | late final String token; 10 | late final int expiresIn; 11 | 12 | final _storage = const FlutterSecureStorage(); 13 | 14 | void initialize(UserAuthEntity userDetails) { 15 | userId = userDetails.id; 16 | userEmail = userDetails.userEmail; 17 | token = userDetails.token; 18 | expiresIn = userDetails.expiresIn; 19 | 20 | storeLoginDetails(userDetails); 21 | } 22 | 23 | Future getLoginStatus() async { 24 | var status = false; 25 | try { 26 | status = await _storage.containsKey(key: 'loginDetails'); 27 | if (status) { 28 | var loginDetails = 29 | jsonDecode((await _storage.read(key: 'loginDetails'))!); 30 | initialize(UserAuthEntity.fromJson(loginDetails)); 31 | } 32 | } catch (e) {} 33 | return status; 34 | } 35 | 36 | Future storeLoginDetails(UserAuthEntity userDetails) async { 37 | try { 38 | _storage.write( 39 | key: 'loginDetails', value: jsonEncode(userDetails.toJson())); 40 | } catch (e) {} 41 | } 42 | 43 | String get accountId => userId; 44 | 45 | void clear() {} 46 | } 47 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/data/model/action_event.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'action_event.g.dart'; 4 | 5 | @JsonSerializable() 6 | class ActionEventModel { 7 | ActionEventModel(this.label, this.isSelected); 8 | 9 | @JsonKey(required: true) 10 | final String label; 11 | 12 | @JsonKey(required: true) 13 | bool isSelected = false; 14 | 15 | factory ActionEventModel.fromJson(Map json) => 16 | _$ActionEventModelFromJson(json); 17 | 18 | Map toJson() => _$ActionEventModelToJson(this); 19 | } 20 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/data/model/action_event.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'action_event.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ActionEventModel _$ActionEventModelFromJson(Map json) { 10 | $checkKeys( 11 | json, 12 | requiredKeys: const ['label', 'isSelected'], 13 | ); 14 | return ActionEventModel( 15 | json['label'] as String, 16 | json['isSelected'] as bool, 17 | ); 18 | } 19 | 20 | Map _$ActionEventModelToJson(ActionEventModel instance) => 21 | { 22 | 'label': instance.label, 23 | 'isSelected': instance.isSelected, 24 | }; 25 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/data/model/auth/user_auth_dto.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | import '../../../domain/entities/user_entity.dart'; 4 | 5 | part 'user_auth_dto.g.dart'; 6 | 7 | @JsonSerializable() 8 | class UserAuthDTO { 9 | final String kind; 10 | final String localId; 11 | final String email; 12 | final String displayName; 13 | final String idToken; 14 | final bool registered; 15 | final String refreshToken; 16 | final String expiresIn; 17 | 18 | UserAuthDTO({ 19 | required this.kind, 20 | required this.localId, 21 | required this.email, 22 | required this.displayName, 23 | required this.idToken, 24 | required this.registered, 25 | required this.refreshToken, 26 | required this.expiresIn, 27 | }); 28 | 29 | UserAuthEntity toEntity() { 30 | return UserAuthEntity( 31 | localId, 32 | email, 33 | idToken, 34 | int.tryParse(expiresIn) ?? 0, 35 | ); 36 | } 37 | 38 | factory UserAuthDTO.fromJson(Map json) => 39 | _$UserAuthDTOFromJson(json); 40 | Map toJson() => _$UserAuthDTOToJson(this); 41 | } 42 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/data/model/auth/user_auth_dto.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'user_auth_dto.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | UserAuthDTO _$UserAuthDTOFromJson(Map json) => UserAuthDTO( 10 | kind: json['kind'] as String, 11 | localId: json['localId'] as String, 12 | email: json['email'] as String, 13 | displayName: json['displayName'] as String, 14 | idToken: json['idToken'] as String, 15 | registered: json['registered'] as bool, 16 | refreshToken: json['refreshToken'] as String, 17 | expiresIn: json['expiresIn'] as String, 18 | ); 19 | 20 | Map _$UserAuthDTOToJson(UserAuthDTO instance) => 21 | { 22 | 'kind': instance.kind, 23 | 'localId': instance.localId, 24 | 'email': instance.email, 25 | 'displayName': instance.displayName, 26 | 'idToken': instance.idToken, 27 | 'registered': instance.registered, 28 | 'refreshToken': instance.refreshToken, 29 | 'expiresIn': instance.expiresIn, 30 | }; 31 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/data/model/profile_dto.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | import 'package:sample_latest/features/daily_tracker/domain/entities/profile_entity.dart'; 3 | 4 | part 'profile_dto.g.dart'; 5 | 6 | @JsonSerializable() 7 | class ProfileDto { 8 | ProfileDto(this.id, this.name); 9 | 10 | @JsonKey(required: true) 11 | final String id; 12 | 13 | @JsonKey(required: true) 14 | final String name; 15 | 16 | ProfileEntity toProfileEntity() { 17 | return ProfileEntity(id, name); 18 | } 19 | 20 | factory ProfileDto.fromJson(Map json) => 21 | _$ProfileDtoFromJson(json); 22 | 23 | Map toJson() => _$ProfileDtoToJson(this); 24 | } 25 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/data/model/profile_dto.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'profile_dto.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ProfileDto _$ProfileDtoFromJson(Map json) { 10 | $checkKeys( 11 | json, 12 | requiredKeys: const ['id', 'name'], 13 | ); 14 | return ProfileDto( 15 | json['id'] as String, 16 | json['name'] as String, 17 | ); 18 | } 19 | 20 | Map _$ProfileDtoToJson(ProfileDto instance) => 21 | { 22 | 'id': instance.id, 23 | 'name': instance.name, 24 | }; 25 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/data/repository/auth_repository_impl.dart: -------------------------------------------------------------------------------- 1 | import 'package:sample_latest/features/daily_tracker/domain/entities/user_entity.dart'; 2 | import 'package:sample_latest/features/daily_tracker/shared/params/user_credentails.dart'; 3 | 4 | import '../../../../core/data/base_service.dart'; 5 | import '../../../../core/data/utils/service_enums_typedef.dart'; 6 | import '../../domain/repository/AuthRepository.dart'; 7 | import '../model/auth/user_auth_dto.dart'; 8 | 9 | class AuthRepositoryImpl implements AuthRepository { 10 | final BaseService baseService; 11 | 12 | AuthRepositoryImpl(this.baseService); 13 | 14 | @override 15 | Future validateTheUserLoginCredentials( 16 | UserCredentialsParams params) async { 17 | UserAuthEntity? userEntity; 18 | 19 | var body = { 20 | "email": params.userEmail, 21 | "password": params.password, 22 | "returnSecureToken": true 23 | }; 24 | 25 | var response = await baseService.makeRequest( 26 | baseUrl: 27 | 'https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword', 28 | url: '', 29 | body: body, 30 | queryParameters: {'key': 'AIzaSyAYUkLiGg_EsknSReddn1ZVijODPdEwqGw'}, 31 | method: RequestType.post); 32 | if (response != null) { 33 | userEntity = UserAuthDTO.fromJson(response).toEntity(); 34 | } else { 35 | throw UnimplementedError(); 36 | } 37 | return userEntity; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/domain/entities/checkIn_status_entity.dart: -------------------------------------------------------------------------------- 1 | import 'event_entity.dart'; 2 | 3 | class CheckInStatusEntity { 4 | CheckInStatusEntity( 5 | {this.status = false, this.events = const []}); 6 | 7 | final bool status; 8 | 9 | final List events; 10 | } 11 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/domain/entities/greeting_status_entity.dart: -------------------------------------------------------------------------------- 1 | class CheckInStatusEntity { 2 | final String formattedDate; 3 | final String greetingStatus; 4 | final String assetPath; 5 | 6 | CheckInStatusEntity(this.formattedDate, this.greetingStatus, this.assetPath); 7 | } 8 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/domain/entities/profile_entity.dart: -------------------------------------------------------------------------------- 1 | class ProfileEntity { 2 | ProfileEntity(this.id, this.name, {this.isSelected = false}); 3 | 4 | final String id; 5 | 6 | final String name; 7 | 8 | bool isSelected; 9 | 10 | Map toJson() { 11 | return {'id': id, 'name': name}; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/domain/entities/user_entity.dart: -------------------------------------------------------------------------------- 1 | class UserAuthEntity { 2 | final String id; 3 | final String userEmail; 4 | final String token; 5 | final int expiresIn; 6 | 7 | UserAuthEntity(this.id, this.userEmail, this.token, this.expiresIn); 8 | 9 | // Convert an instance to JSON 10 | Map toJson() { 11 | return { 12 | 'id': id, 13 | 'userEmail': userEmail, 14 | 'token': token, 15 | 'expiresIn': expiresIn, 16 | }; 17 | } 18 | 19 | // Create an instance from JSON 20 | factory UserAuthEntity.fromJson(Map json) { 21 | return UserAuthEntity( 22 | json['id'] as String, 23 | json['userEmail'] as String, 24 | json['token'] as String, 25 | json['expiresIn'] as int, 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/domain/repository/authRepository.dart: -------------------------------------------------------------------------------- 1 | import '../../shared/params/user_credentails.dart'; 2 | import '../entities/user_entity.dart'; 3 | 4 | abstract class AuthRepository { 5 | Future validateTheUserLoginCredentials( 6 | UserCredentialsParams params); 7 | } 8 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/domain/repository/check_in_status_repo.dart: -------------------------------------------------------------------------------- 1 | import '../../shared/params/user_check_in_params.dart'; 2 | import '../entities/checkIn_status_entity.dart'; 3 | 4 | abstract class CheckInStatusRepository { 5 | Future isCheckedIn(UserCheckInParams params); 6 | 7 | Future submitUserCheckIn(UserCheckInParams params); 8 | } 9 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/domain/repository/events_repository.dart: -------------------------------------------------------------------------------- 1 | import '../../shared/params/create_update_event_param.dart'; 2 | import '../../shared/params/today_event_update_param.dart'; 3 | import '../entities/event_entity.dart'; 4 | 5 | abstract class EventsRepository { 6 | Future> fetchEventsBasedOnProfile(String id); 7 | 8 | Future updateOrCreateEvent(CreateUpdateEventParams params); 9 | 10 | Future updateTodayEvents(TodayEventParam params); 11 | 12 | Future deleteEvent(String profileId, String eventId); 13 | } 14 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/domain/repository/profiles_repository.dart: -------------------------------------------------------------------------------- 1 | import '../entities/profile_entity.dart'; 2 | 3 | abstract class ProfilesRepository { 4 | Future> fetchExistingProfiles(); 5 | 6 | Future createOrEditProfile(ProfileEntity profile); 7 | } 8 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/domain/usecases/auth_use_case.dart: -------------------------------------------------------------------------------- 1 | import 'package:fpdart/fpdart.dart'; 2 | import 'package:sample_latest/features/daily_tracker/core/services/session_manager.dart'; 3 | 4 | import '../../../../analytics_exception_handler/exception_handler.dart'; 5 | import '../../../../core/data/utils/service_enums_typedef.dart'; 6 | import '../../shared/params/user_credentails.dart'; 7 | import '../repository/AuthRepository.dart'; 8 | 9 | class AuthUseCase { 10 | final AuthRepository _authRepository; 11 | final SessionManager _sessionManager; 12 | 13 | AuthUseCase(this._authRepository, this._sessionManager); 14 | 15 | Future> call(String email, String pwd) async { 16 | try { 17 | var params = UserCredentialsParams(email, pwd); 18 | var res = await _authRepository.validateTheUserLoginCredentials(params); 19 | _sessionManager.initialize(res); 20 | return const Left(true); 21 | } catch (e, s) { 22 | return Right(ExceptionHandler().handleException(e, s)); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/domain/usecases/check_in_status_useCase.dart: -------------------------------------------------------------------------------- 1 | import 'package:fpdart/fpdart.dart'; 2 | import 'package:sample_latest/core/data/utils/service_enums_typedef.dart'; 3 | import 'package:sample_latest/features/daily_tracker/shared/models/profile_executed_task.dart'; 4 | 5 | import '../../../../analytics_exception_handler/exception_handler.dart'; 6 | import '../../shared/params/user_check_in_params.dart'; 7 | import '../entities/checkIn_status_entity.dart'; 8 | import '../repository/check_in_status_repo.dart'; 9 | 10 | class CheckInStatusUseCase { 11 | CheckInStatusUseCase(this.checkInStatusRepository, this.profileExecutedTask); 12 | 13 | final CheckInStatusRepository checkInStatusRepository; 14 | 15 | final ProfileExecutedTask profileExecutedTask; 16 | 17 | Future> call(String date) async { 18 | try { 19 | var params = UserCheckInParams(profileExecutedTask.profileId, [], date); 20 | var checkInDetails = await checkInStatusRepository.isCheckedIn(params); 21 | profileExecutedTask.todayEvents = checkInDetails.events; 22 | return Right(checkInDetails); 23 | } catch (e, s) { 24 | return Left(ExceptionHandler().handleException(e, s)); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/domain/usecases/delete_event_usecase.dart: -------------------------------------------------------------------------------- 1 | import 'package:fpdart/fpdart.dart'; 2 | import 'package:sample_latest/features/daily_tracker/data/model/daily_tracker_event_model.dart'; 3 | import 'package:sample_latest/features/daily_tracker/domain/entities/event_entity.dart'; 4 | import 'package:sample_latest/features/daily_tracker/domain/repository/events_repository.dart'; 5 | 6 | import '../../../../analytics_exception_handler/exception_handler.dart'; 7 | import '../../../../core/data/utils/service_enums_typedef.dart'; 8 | import '../../shared/models/profile_executed_task.dart'; 9 | 10 | class DeleteEventUseCase { 11 | final ProfileExecutedTask _profileExecutedTask; 12 | 13 | final EventsRepository _eventsRepository; 14 | 15 | DeleteEventUseCase(this._profileExecutedTask, this._eventsRepository); 16 | 17 | Future, ErrorDetails>> call(String eventId) async { 18 | try { 19 | var res = await _eventsRepository.deleteEvent( 20 | _profileExecutedTask.profileId, eventId); 21 | 22 | return Left(deleteEventFromList(eventId)); 23 | } catch (e, s) { 24 | return Right(ExceptionHandler().handleException(e, s)); 25 | } 26 | } 27 | 28 | List deleteEventFromList(String eventId) { 29 | _profileExecutedTask.userEvents.removeWhere((e) => eventId == e.id); 30 | return List.from(_profileExecutedTask.userEvents 31 | .map((e) => DailyTrackerEventModel.fromJson(e.toJson()).toEntity()) 32 | .toList()); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/domain/usecases/events_usecase.dart: -------------------------------------------------------------------------------- 1 | import 'package:fpdart/fpdart.dart'; 2 | import 'package:sample_latest/features/daily_tracker/domain/entities/event_entity.dart'; 3 | import 'package:sample_latest/features/daily_tracker/domain/repository/events_repository.dart'; 4 | 5 | import '../../../../analytics_exception_handler/exception_handler.dart'; 6 | import '../../../../core/data/utils/service_enums_typedef.dart'; 7 | import '../../shared/models/profile_executed_task.dart'; 8 | import '../../shared/utils/event_sorter_converter.dart'; 9 | 10 | class EventsUseCase { 11 | EventsUseCase(this._repository, this._profileExecutedTask); 12 | 13 | final EventsRepository _repository; 14 | 15 | final ProfileExecutedTask _profileExecutedTask; 16 | 17 | Future>> call() async { 18 | try { 19 | var events = await _repository 20 | .fetchEventsBasedOnProfile(_profileExecutedTask.profileId); 21 | 22 | var todayEvents = EventSortHelper().getTodaySortedEvent(events); 23 | _profileExecutedTask.userEvents = todayEvents; 24 | return Right(todayEvents); 25 | } catch (e, s) { 26 | return Left(ExceptionHandler().handleException(e, s)); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/domain/usecases/update_today_event_useCase.dart: -------------------------------------------------------------------------------- 1 | import 'package:fpdart/fpdart.dart'; 2 | import 'package:sample_latest/core/data/utils/service_enums_typedef.dart'; 3 | import 'package:sample_latest/features/daily_tracker/shared/models/profile_executed_task.dart'; 4 | 5 | import '../../../../analytics_exception_handler/exception_handler.dart'; 6 | import '../../shared/params/today_event_update_param.dart'; 7 | import '../entities/event_entity.dart'; 8 | import '../repository/events_repository.dart'; 9 | 10 | class UpdateTodayEventUseCase { 11 | UpdateTodayEventUseCase(this._eventRepositoryImpl, this.profileExecutedTask); 12 | 13 | final EventsRepository _eventRepositoryImpl; 14 | 15 | final ProfileExecutedTask profileExecutedTask; 16 | 17 | Future> call( 18 | String date, EventEntity event) async { 19 | try { 20 | var params = TodayEventParam(profileExecutedTask.profileId, event, date); 21 | var index = 22 | profileExecutedTask.todayEvents.indexWhere((e) => e.id == event.id); 23 | if (index != -1) { 24 | profileExecutedTask.todayEvents[index] = event; 25 | } 26 | var status = await _eventRepositoryImpl.updateTodayEvents(params); 27 | return Right(status); 28 | } catch (e, s) { 29 | return Left(ExceptionHandler().handleException(e, s)); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/domain/usecases/users_useCase.dart: -------------------------------------------------------------------------------- 1 | import 'package:sample_latest/features/daily_tracker/domain/repository/profiles_repository.dart'; 2 | import 'package:sample_latest/features/daily_tracker/shared/models/profiles_executed_task.dart'; 3 | 4 | import '../entities/profile_entity.dart'; 5 | 6 | class ProfilesUseCase { 7 | ProfilesUseCase(this._repository, this._profilesExecutedTask); 8 | 9 | final ProfilesRepository _repository; 10 | 11 | final ProfilesExecutedTask _profilesExecutedTask; 12 | 13 | Future> call() async { 14 | var profiles = await _repository.fetchExistingProfiles(); 15 | _profilesExecutedTask.setProfiles = profiles; 16 | return profiles; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/features/authentication/presentation/cubit/auth_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter_bloc/flutter_bloc.dart'; 4 | import 'package:equatable/equatable.dart'; 5 | import 'package:sample_latest/features/daily_tracker/domain/usecases/auth_use_case.dart'; 6 | 7 | import '../../../../../../core/mixins/notifiers.dart'; 8 | 9 | part 'auth_state.dart'; 10 | 11 | class AuthCubit extends Cubit { 12 | final AuthUseCase _authUseCase; 13 | 14 | AuthCubit(this._authUseCase) : super(AuthStateLoading()); 15 | 16 | Future validateUserCredentials(String email, String pwd) async { 17 | var status = false; 18 | var completer = Completer(); 19 | 20 | var res = await _authUseCase.call(email, pwd); 21 | res.fold((loginStatus) { 22 | status = loginStatus; 23 | completer.complete(); 24 | }, (error) { 25 | Notifiers.toastNotifier('Invalid Credentials'); 26 | }); 27 | await completer.future; 28 | return status; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/features/authentication/presentation/cubit/auth_state.dart: -------------------------------------------------------------------------------- 1 | part of 'auth_cubit.dart'; 2 | 3 | sealed class AuthState extends Equatable { 4 | const AuthState(); 5 | } 6 | 7 | class AuthStateLoading extends AuthState { 8 | @override 9 | // TODO: implement props 10 | List get props => []; 11 | } 12 | 13 | class AuthStateLoaded extends AuthState { 14 | const AuthStateLoaded(); 15 | 16 | @override 17 | // TODO: implement props 18 | List get props => []; 19 | } 20 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/features/events/presentation/cubit/event_cubit_state.dart: -------------------------------------------------------------------------------- 1 | part of 'events_cubit.dart'; 2 | 3 | sealed class EventsState extends Equatable { 4 | const EventsState(); 5 | } 6 | 7 | class EventsStateLoading extends EventsState { 8 | @override 9 | // TODO: implement props 10 | List get props => []; 11 | } 12 | 13 | class EventsStateLoaded extends EventsState { 14 | final List events; 15 | 16 | const EventsStateLoaded(this.events); 17 | 18 | @override 19 | // TODO: implement props 20 | List get props => []; 21 | } 22 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/features/greetings/presentation/cubit/check_in_status_state.dart: -------------------------------------------------------------------------------- 1 | part of 'check_in_status_cubit.dart'; 2 | 3 | sealed class CheckInStatusState extends Equatable { 4 | const CheckInStatusState(); 5 | } 6 | 7 | class CheckInStatusLoading extends CheckInStatusState { 8 | const CheckInStatusLoading(); 9 | 10 | @override 11 | List get props => []; 12 | } 13 | 14 | class CheckInStatusWithChecked extends CheckInStatusState { 15 | final List events; 16 | 17 | const CheckInStatusWithChecked(this.events); 18 | 19 | @override 20 | List get props => [events]; 21 | } 22 | 23 | class CheckInStatusNotYetChecked extends CheckInStatusState { 24 | final PartsOfDay timeOfDay; 25 | const CheckInStatusNotYetChecked(this.timeOfDay); 26 | 27 | @override 28 | List get props => []; 29 | } 30 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/features/users/presentation/cubit/profiles_cubit_state.dart: -------------------------------------------------------------------------------- 1 | part of 'profiles_cubit.dart'; 2 | 3 | sealed class ProfilesState { 4 | const ProfilesState(); 5 | } 6 | 7 | class ProfilesStateInitial extends ProfilesState { 8 | const ProfilesStateInitial(); 9 | } 10 | 11 | class ProfilesStateLoading extends ProfilesState { 12 | ProfilesStateLoading(); 13 | } 14 | 15 | class ProfilesStateLoaded extends ProfilesState { 16 | final List profiles; 17 | final ProfileEntity? selectedProfile; 18 | 19 | ProfilesStateLoaded(this.profiles, {this.selectedProfile}); 20 | } 21 | 22 | class ProfilesStateFailed extends ProfilesState { 23 | const ProfilesStateFailed(); 24 | } 25 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/presentation/screens/check_in_status.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class UserCheckInStatus extends StatefulWidget { 4 | const UserCheckInStatus({super.key}); 5 | 6 | @override 7 | State createState() => _UserCheckInStatusState(); 8 | } 9 | 10 | class _UserCheckInStatusState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return Container(); 14 | // return BlocBuilder( 15 | // 16 | // builder: (context, state) { 17 | // if (state is SchoolsInfoInitial || state is SchoolsInfoLoading) { 18 | // return circularLoader(); 19 | // } else if (state is SchoolsInfoLoaded) { 20 | // return _buildRegisteredSchools(state.schools); 21 | // } else if (state is SchoolDataError) { 22 | // return ExceptionView(state.errorStateType); 23 | // } else { 24 | // return Container(); 25 | // } 26 | // }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/presentation/screens/daily_tracker_event_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_database/firebase_database.dart'; 2 | import 'package:firebase_database/ui/firebase_animated_list.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class DailyTrackerEventList extends StatefulWidget { 6 | const DailyTrackerEventList({super.key}); 7 | 8 | @override 9 | State createState() => _DailyTrackerEventListState(); 10 | } 11 | 12 | class _DailyTrackerEventListState extends State { 13 | final DatabaseReference _databaseReference = 14 | FirebaseDatabase.instance.ref().child('events'); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return FirebaseAnimatedList( 19 | query: _databaseReference, 20 | itemBuilder: (BuildContext context, DataSnapshot snapshot, 21 | Animation animation, int index) { 22 | Map data = snapshot.value as Map; 23 | String dataString = 24 | data['events'].toString(); // Modify as per your data structure 25 | return ListTile( 26 | title: Text(dataString), 27 | ); 28 | }, 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/presentation/screens/daily_tracker_events.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class DailyTodayEvents extends StatefulWidget { 4 | const DailyTodayEvents({super.key}); 5 | 6 | @override 7 | State createState() => _DailyTodayEventsState(); 8 | } 9 | 10 | class _DailyTodayEventsState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return const Placeholder(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/shared/models/profile_executed_task.dart: -------------------------------------------------------------------------------- 1 | import 'package:sample_latest/features/daily_tracker/domain/entities/event_entity.dart'; 2 | import 'package:sample_latest/features/daily_tracker/domain/entities/profile_entity.dart'; 3 | 4 | class ProfileExecutedTask { 5 | late ProfileEntity _profileEntity; 6 | 7 | var todayEvents = []; 8 | 9 | var userEvents = []; 10 | 11 | set setProfile(ProfileEntity profileEntity) { 12 | _profileEntity = profileEntity; 13 | } 14 | 15 | String get profileId => _profileEntity.id; 16 | } 17 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/shared/models/profiles_executed_task.dart: -------------------------------------------------------------------------------- 1 | import 'package:sample_latest/features/daily_tracker/domain/entities/profile_entity.dart'; 2 | 3 | class ProfilesExecutedTask { 4 | var _profiles = []; 5 | 6 | set setProfiles(List profiles) { 7 | if (profiles.isNotEmpty) { 8 | _profiles = profiles; 9 | } 10 | } 11 | 12 | set addProfile(ProfileEntity profile) { 13 | _profiles.add(profile); 14 | } 15 | 16 | set updateProfile(ProfileEntity profile) { 17 | var index = _profiles.indexWhere((p) => p.id == profile.id); 18 | if (index != -1) { 19 | _profiles[index] = profile; 20 | } 21 | } 22 | 23 | List get profiles => _profiles; 24 | 25 | ProfileEntity getProfileBasedOnId(String id) => 26 | _profiles.firstWhere((p) => p.id == id); 27 | 28 | deleteProfile(String id) => _profiles.removeWhere((p) => p.id == id); 29 | } 30 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/shared/params/create_update_event_param.dart: -------------------------------------------------------------------------------- 1 | import '../../domain/entities/event_entity.dart'; 2 | 3 | class CreateUpdateEventParams { 4 | final String profileId; 5 | final EventEntity event; 6 | 7 | CreateUpdateEventParams(this.profileId, this.event); 8 | } 9 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/shared/params/profile_params.dart: -------------------------------------------------------------------------------- 1 | class ProfileParams { 2 | final String name; 3 | 4 | final String? id; 5 | 6 | ProfileParams(this.name, {this.id}); 7 | } 8 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/shared/params/today_event_update_param.dart: -------------------------------------------------------------------------------- 1 | import '../../domain/entities/event_entity.dart'; 2 | 3 | class TodayEventParam { 4 | final String profileId; 5 | final EventEntity event; 6 | final String date; 7 | 8 | TodayEventParam(this.profileId, this.event, this.date); 9 | } 10 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/shared/params/user_check_in_params.dart: -------------------------------------------------------------------------------- 1 | import '../../domain/entities/event_entity.dart'; 2 | 3 | class UserCheckInParams { 4 | final String profileId; 5 | final List events; 6 | final String date; 7 | 8 | UserCheckInParams(this.profileId, this.events, this.date); 9 | } 10 | -------------------------------------------------------------------------------- /lib/features/daily_tracker/shared/params/user_credentails.dart: -------------------------------------------------------------------------------- 1 | class UserCredentialsParams { 2 | final String userEmail; 3 | final String password; 4 | 5 | UserCredentialsParams(this.userEmail, this.password); 6 | } 7 | -------------------------------------------------------------------------------- /lib/features/isolates/isolate_home.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:go_router/go_router.dart'; 3 | import 'package:sample_latest/core/utils/enums_type_def.dart'; 4 | 5 | class IsolateHome extends StatelessWidget { 6 | const IsolateHome({Key? key}) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | var a = [ 11 | ( 12 | 'Isolate With and Without Compute', 13 | 'Lag', 14 | IsolateType.isolateWithWithOutLag 15 | ), 16 | ('Isolate With Spawn', 'Without Lag', IsolateType.isolateWithSpawn) 17 | ]; 18 | return Scaffold( 19 | body: GridView.builder( 20 | itemCount: a.length, 21 | itemBuilder: (_, index) => Card( 22 | child: InkWell( 23 | onTap: () => onTap(a.elementAt(index).$3, context), 24 | child: Wrap( 25 | children: [ 26 | Text(a.elementAt(index).$1), 27 | Text(a.elementAt(index).$2), 28 | ], 29 | ), 30 | ), 31 | ), 32 | gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( 33 | crossAxisCount: 2)), 34 | ); 35 | } 36 | 37 | void onTap(IsolateType isolateType, BuildContext context) { 38 | switch (isolateType) { 39 | case IsolateType.isolateWithWithOutLag: 40 | context.go('/home/isolates/isolateWithWithOutLag'); 41 | case IsolateType.isolateWithSpawn: 42 | context.go('/home/isolates/isolateWithSpawn'); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/features/plugins/local_authentication.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class LocalAuthentication extends StatelessWidget { 4 | const LocalAuthentication({Key? key}) : super(key: key); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Container(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/features/plugins/youtube.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:youtube_player_flutter/youtube_player_flutter.dart'; 3 | 4 | class Youtube extends StatelessWidget { 5 | Youtube({Key? key}) : super(key: key); 6 | 7 | final YoutubePlayerController _controller = YoutubePlayerController( 8 | initialVideoId: YoutubePlayer.convertUrlToId( 9 | "https://www.youtube.com/watch?v=sozlt0eA8aQ&t=2416s&ab_channel=RawTalksWithVK") ?? 10 | '', 11 | flags: const YoutubePlayerFlags( 12 | autoPlay: true, 13 | mute: true, 14 | )); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return YoutubePlayer( 19 | controller: _controller, 20 | showVideoProgressIndicator: true, 21 | // videoProgressIndicatorColor: Colors.amber, 22 | // progressColors: ProgressColors( 23 | // playedColor: Colors.amber, 24 | // handleColor: Colors.amberAccent, 25 | // ), 26 | onReady: () { 27 | // _controller.addListener(listener); 28 | }, 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/features/push_notifcations/local_pushNotifications.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class LocalPushNotifications extends StatefulWidget { 4 | const LocalPushNotifications({super.key}); 5 | 6 | @override 7 | State createState() => _LocalPushNotificationsState(); 8 | } 9 | 10 | class _LocalPushNotificationsState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return const SingleChildScrollView( 14 | child: Column( 15 | children: [], 16 | ), 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/features/regular_widgets/animations/custom_implicit_animation_widgets.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CustomImplicitAnimationsWidgets extends StatefulWidget { 4 | const CustomImplicitAnimationsWidgets({Key? key}) : super(key: key); 5 | 6 | @override 7 | State createState() => 8 | _CustomImplicitAnimationsWidgetsState(); 9 | } 10 | 11 | class _CustomImplicitAnimationsWidgetsState 12 | extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | return Container(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/features/routing_features/dynamic_routing_configuration.dart: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/features/routing_features/shell_route/shell_child_one/shell_child_three.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | import 'package:sample_latest/core/presentation/provider/route_provider.dart'; 4 | 5 | class ShellChildOneChildThree extends StatelessWidget { 6 | const ShellChildOneChildThree({Key? key}) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Align( 11 | alignment: Alignment.center, 12 | child: Wrap( 13 | runSpacing: 10, 14 | spacing: 10, 15 | direction: Axis.vertical, 16 | crossAxisAlignment: WrapCrossAlignment.center, 17 | children: [ 18 | Wrap( 19 | spacing: 5, 20 | children: [ 21 | IconButton.filledTonal( 22 | onPressed: context.read().decrease, 23 | icon: const Icon(Icons.remove)), 24 | Text('${context.watch().value}', 25 | style: Theme.of(context).textTheme.displaySmall), 26 | IconButton.filledTonal( 27 | onPressed: context.read().increase, 28 | icon: const Icon(Icons.add)), 29 | ], 30 | ), 31 | ElevatedButton( 32 | onPressed: () => Navigator.pop(context), child: const Text('pop')) 33 | ], 34 | ), 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/features/routing_features/shell_route/shell_routing.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:go_router/go_router.dart'; 3 | import 'package:provider/provider.dart'; 4 | import 'package:sample_latest/core/presentation/provider/route_provider.dart'; 5 | import 'package:sample_latest/core/widgets/custom_app_bar.dart'; 6 | 7 | class ShellRouting extends StatelessWidget { 8 | final Widget widget; 9 | 10 | const ShellRouting(this.widget, {super.key}); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return ChangeNotifierProvider( 15 | create: (context) => RouteProvider(), 16 | child: Scaffold( 17 | appBar: CustomAppBar( 18 | title: const Text('Shell Routing'), 19 | leading: IconButton( 20 | icon: const Icon(Icons.arrow_back_ios), 21 | onPressed: () { 22 | if (GoRouter.of(context).canPop()) GoRouter.of(context).pop(); 23 | }, 24 | ), 25 | appBar: AppBar(), 26 | ), 27 | body: widget, 28 | )); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/features/routing_features/stateful_shell_routing_without_indexed.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class StateFulShellRoutingWithoutIndexed extends StatefulWidget { 4 | const StateFulShellRoutingWithoutIndexed({Key? key}) : super(key: key); 5 | 6 | @override 7 | State createState() => 8 | _StateFulShellRoutingWithIndexedState(); 9 | } 10 | 11 | class _StateFulShellRoutingWithIndexedState 12 | extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | return Container(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/features/schools/core/schools_injection_module.dart: -------------------------------------------------------------------------------- 1 | import 'package:get_it/get_it.dart'; 2 | import 'package:sample_latest/features/schools/shared/models/school_executed_task_model.dart'; 3 | 4 | class SchoolsInjectionModule { 5 | SchoolsInjectionModule._(); // Private constructor to enforce singleton 6 | 7 | static final SchoolsInjectionModule _instance = SchoolsInjectionModule._(); 8 | 9 | factory SchoolsInjectionModule() => _instance; 10 | 11 | final GetIt injector = GetIt.instance; 12 | 13 | Future registerDependencies() async { 14 | _registerExecutedCacheManager(); 15 | } 16 | 17 | void _registerExecutedCacheManager() { 18 | if (!injector.isRegistered()) { 19 | injector 20 | .registerSingleton(SchoolExecutedTaskFlow()); 21 | } 22 | } 23 | 24 | void _unRegisterDependencies() async { 25 | await injector.unregister(instance: SchoolExecutedTaskFlow); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/features/schools/data/model/school_details_model.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'school_details_model.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SchoolDetailsModel _$SchoolDetailsModelFromJson(Map json) { 10 | $checkKeys( 11 | json, 12 | requiredKeys: const ['id', 'schoolName'], 13 | ); 14 | return SchoolDetailsModel( 15 | json['id'] as String, 16 | json['schoolName'] as String, 17 | json['country'] as String, 18 | json['location'] as String, 19 | json['image'] as String, 20 | json['studentCount'] as int, 21 | json['employeeCount'] as int, 22 | json['hostelAvailability'] as bool, 23 | json['createdDate'] as int, 24 | updatedDate: json['updatedDate'] as int?, 25 | ); 26 | } 27 | 28 | Map _$SchoolDetailsModelToJson(SchoolDetailsModel instance) => 29 | { 30 | 'id': instance.id, 31 | 'schoolName': instance.schoolName, 32 | 'country': instance.country, 33 | 'location': instance.location, 34 | 'image': instance.image, 35 | 'studentCount': instance.studentCount, 36 | 'employeeCount': instance.employeeCount, 37 | 'hostelAvailability': instance.hostelAvailability, 38 | 'createdDate': instance.createdDate, 39 | 'updatedDate': instance.updatedDate, 40 | }; 41 | -------------------------------------------------------------------------------- /lib/features/schools/data/model/school_model.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'school_model.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SchoolModel _$SchoolModelFromJson(Map json) { 10 | $checkKeys( 11 | json, 12 | requiredKeys: const ['schoolName', 'id'], 13 | ); 14 | return SchoolModel( 15 | json['schoolName'] as String, 16 | json['country'] as String, 17 | json['location'] as String, 18 | json['id'] as String, 19 | json['createdDate'] as int, 20 | updatedDate: json['updatedDate'] as int?, 21 | ); 22 | } 23 | 24 | Map _$SchoolModelToJson(SchoolModel instance) => 25 | { 26 | 'schoolName': instance.schoolName, 27 | 'id': instance.id, 28 | 'country': instance.country, 29 | 'location': instance.location, 30 | 'createdDate': instance.createdDate, 31 | 'updatedDate': instance.updatedDate, 32 | }; 33 | -------------------------------------------------------------------------------- /lib/features/schools/data/model/student_model.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'student_model.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | StudentModel _$StudentModelFromJson(Map json) { 10 | $checkKeys( 11 | json, 12 | requiredKeys: const ['id'], 13 | ); 14 | return StudentModel( 15 | json['id'] as String, 16 | json['schoolId'] as String, 17 | json['studentName'] as String, 18 | json['studentLocation'] as String, 19 | json['standard'] as String, 20 | json['createdDate'] as int, 21 | updatedDate: json['updatedDate'] as int?, 22 | ); 23 | } 24 | 25 | Map _$StudentModelToJson(StudentModel instance) => 26 | { 27 | 'id': instance.id, 28 | 'schoolId': instance.schoolId, 29 | 'studentName': instance.studentName, 30 | 'studentLocation': instance.studentLocation, 31 | 'standard': instance.standard, 32 | 'createdDate': instance.createdDate, 33 | 'updatedDate': instance.updatedDate, 34 | }; 35 | -------------------------------------------------------------------------------- /lib/features/schools/data/repository/school_details_repository_impl.dart: -------------------------------------------------------------------------------- 1 | import '../../../../core/data/base_service.dart'; 2 | import '../../../../core/data/urls.dart'; 3 | import '../../../../core/data/utils/service_enums_typedef.dart'; 4 | import '../../domain/entities/school_details_entity.dart'; 5 | import '../../domain/repository/school_details_repository.dart'; 6 | import '../model/school_details_model.dart'; 7 | 8 | class SchoolsDetailsRepositoryImpl implements SchoolDetailsRepository { 9 | SchoolsDetailsRepositoryImpl(this.baseService); 10 | 11 | final BaseService baseService; 12 | 13 | @override 14 | Future fetchSchoolDetails(String id) async { 15 | SchoolDetailsEntity? schoolDetails; 16 | var response = 17 | await baseService.makeRequest(url: '${Urls.schoolDetails}/$id.json'); 18 | if (response != null) { 19 | schoolDetails = SchoolDetailsModel.fromJson(response).toEntity(); 20 | } 21 | return schoolDetails; 22 | } 23 | 24 | @override 25 | Future addOrEditSchoolDetails( 26 | SchoolDetailsEntity schoolDetails) async { 27 | Map body = { 28 | schoolDetails.id: schoolDetails.toDtoModel().toJson() 29 | }; 30 | 31 | var response = await baseService.makeRequest( 32 | url: '${Urls.schoolDetails}.json', 33 | body: body, 34 | method: RequestType.patch); 35 | if (response != null && response is Map && response.keys.isNotEmpty) { 36 | schoolDetails = 37 | SchoolDetailsModel.fromJson(response[response.keys.first]).toEntity(); 38 | } else { 39 | throw UnimplementedError(); 40 | } 41 | return schoolDetails; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /lib/features/schools/domain/entities/school_entity.dart: -------------------------------------------------------------------------------- 1 | import 'package:sample_latest/features/schools/data/model/school_model.dart'; 2 | 3 | class SchoolEntity { 4 | SchoolEntity( 5 | this.schoolName, this.country, this.location, this.id, this.createdDate, 6 | {this.updatedDate}); 7 | 8 | final String schoolName; 9 | 10 | String id; 11 | 12 | final String country; 13 | 14 | final String location; 15 | 16 | final int createdDate; 17 | 18 | final int? updatedDate; 19 | 20 | SchoolEntity copyWith({ 21 | String? schoolName, 22 | String? country, 23 | String? location, 24 | int? createdDate, 25 | int? updatedDate, 26 | }) { 27 | return SchoolEntity( 28 | schoolName ?? this.schoolName, 29 | country ?? this.country, 30 | location ?? this.location, 31 | id, 32 | createdDate ?? this.createdDate, 33 | updatedDate: updatedDate ?? this.updatedDate, 34 | ); 35 | } 36 | 37 | SchoolModel toJson() { 38 | return SchoolModel(schoolName, country, location, id, createdDate, 39 | updatedDate: updatedDate); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/features/schools/domain/repository/school_details_repository.dart: -------------------------------------------------------------------------------- 1 | import '../entities/school_details_entity.dart'; 2 | 3 | abstract class SchoolDetailsRepository { 4 | Future fetchSchoolDetails(String id); 5 | Future addOrEditSchoolDetails( 6 | SchoolDetailsEntity schoolDetails); 7 | } 8 | -------------------------------------------------------------------------------- /lib/features/schools/domain/repository/school_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:sample_latest/features/schools/domain/entities/school_entity.dart'; 2 | 3 | abstract class SchoolRepository { 4 | Future> fetchSchools(); 5 | Future createOrEditSchool(SchoolEntity school); 6 | Future deleteSchool(String schoolId); 7 | } 8 | -------------------------------------------------------------------------------- /lib/features/schools/domain/repository/students_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:sample_latest/features/schools/domain/entities/student_entity.dart'; 2 | 3 | abstract class StudentsRepository { 4 | Future fetchStudent(String studentId, String schoolId); 5 | Future> fetchStudents(String schoolId); 6 | Future createOrEditStudent(StudentEntity student); 7 | Future deleteStudent(String studentId, String schoolId); 8 | } 9 | -------------------------------------------------------------------------------- /lib/features/schools/domain/use_cases/school_details_usecase/school_details_usecase.dart: -------------------------------------------------------------------------------- 1 | import 'package:sample_latest/features/schools/shared/models/school_executed_task_model.dart'; 2 | 3 | import '../../entities/school_details_entity.dart'; 4 | import '../../repository/school_details_repository.dart'; 5 | 6 | class SchoolDetailsUseCase { 7 | SchoolDetailsUseCase(this._repository, this._executedTaskFlow); 8 | 9 | final SchoolDetailsRepository _repository; 10 | 11 | final SchoolExecutedTaskFlow _executedTaskFlow; 12 | 13 | Future call(String schoolId) async { 14 | var schoolDetails = await _repository.fetchSchoolDetails(schoolId); 15 | _executedTaskFlow.schoolDetailsEntity = schoolDetails; 16 | return schoolDetails; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/features/schools/domain/use_cases/schools_usecase/delete_school_usecase.dart: -------------------------------------------------------------------------------- 1 | import '../../../shared/models/school_executed_task_model.dart'; 2 | import '../../entities/school_entity.dart'; 3 | import '../../repository/school_repository.dart'; 4 | 5 | class DeleteSchoolUseCase { 6 | DeleteSchoolUseCase(this._repository, this._executedTask); 7 | 8 | final SchoolRepository _repository; 9 | 10 | final SchoolExecutedTaskFlow _executedTask; 11 | 12 | Future> call(String schoolId) async { 13 | var deletedSchool = await _repository.deleteSchool(schoolId); 14 | 15 | _executedTask.schools.removeWhere((s) => s.id == schoolId); 16 | 17 | return _executedTask.schools; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/features/schools/domain/use_cases/schools_usecase/school_usecase.dart: -------------------------------------------------------------------------------- 1 | import '../../../shared/models/school_executed_task_model.dart'; 2 | import '../../entities/school_entity.dart'; 3 | import '../../repository/school_repository.dart'; 4 | 5 | class SchoolsUseCase { 6 | SchoolsUseCase(this._repository, this._executedTask); 7 | 8 | final SchoolRepository _repository; 9 | 10 | final SchoolExecutedTaskFlow _executedTask; 11 | 12 | Future> call() async { 13 | var schools = await _repository.fetchSchools(); 14 | _executedTask.schools = schools; 15 | return schools; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/features/schools/domain/use_cases/student_usecases/delete_student_usecase.dart: -------------------------------------------------------------------------------- 1 | import 'package:sample_latest/features/schools/domain/entities/student_entity.dart'; 2 | 3 | import '../../../shared/models/school_executed_task_model.dart'; 4 | import '../../repository/students_repository.dart'; 5 | 6 | class DeleteStudentUseCase { 7 | DeleteStudentUseCase(this._repository, this._executedTask); 8 | 9 | final StudentsRepository _repository; 10 | 11 | final SchoolExecutedTaskFlow _executedTask; 12 | 13 | Future> call( 14 | {required String studentId, required String schoolId}) async { 15 | await _repository.deleteStudent(studentId, schoolId); 16 | _executedTask.students.removeWhere((s) => s.id == studentId); 17 | 18 | return _executedTask.students; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/features/schools/domain/use_cases/student_usecases/student_usecase.dart: -------------------------------------------------------------------------------- 1 | import 'package:sample_latest/features/schools/domain/entities/student_entity.dart'; 2 | 3 | import '../../../shared/models/school_executed_task_model.dart'; 4 | import '../../repository/students_repository.dart'; 5 | 6 | class StudentUseCase { 7 | StudentUseCase(this._repository, this._executedTask); 8 | 9 | final StudentsRepository _repository; 10 | 11 | final SchoolExecutedTaskFlow _executedTask; 12 | 13 | Future call(String studentId, String schoolId) async { 14 | var student = await _repository.fetchStudent(studentId, schoolId); 15 | return student; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/features/schools/domain/use_cases/student_usecases/students_usecase.dart: -------------------------------------------------------------------------------- 1 | import 'package:sample_latest/features/schools/domain/entities/student_entity.dart'; 2 | 3 | import '../../../shared/models/school_executed_task_model.dart'; 4 | import '../../repository/students_repository.dart'; 5 | 6 | class StudentsUseCase { 7 | StudentsUseCase(this._repository, this._executedTask); 8 | 9 | final StudentsRepository _repository; 10 | 11 | final SchoolExecutedTaskFlow _executedTask; 12 | 13 | Future> call(String schoolId) async { 14 | _executedTask.students.clear(); 15 | var students = await _repository.fetchStudents(schoolId); 16 | _executedTask.students = students; 17 | return _executedTask.students; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/features/schools/presentation/blocs/schools_bloc/schools_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | 3 | import '../../../../../core/data/utils/service_enums_typedef.dart'; 4 | import '../../../shared/models/school_view_model.dart'; 5 | 6 | abstract class SchoolsState extends Equatable { 7 | final bool isWelcomeMessageShowed; 8 | 9 | const SchoolsState({this.isWelcomeMessageShowed = true}); 10 | } 11 | 12 | class SchoolsInfoInitial extends SchoolsState { 13 | const SchoolsInfoInitial(); 14 | 15 | @override 16 | List get props => []; 17 | } 18 | 19 | class SchoolsInfoLoading extends SchoolsState { 20 | const SchoolsInfoLoading({bool showedWelcomeMessage = true}) 21 | : super(isWelcomeMessageShowed: showedWelcomeMessage); 22 | 23 | @override 24 | List get props => []; 25 | } 26 | 27 | class SchoolsInfoLoaded extends SchoolsState { 28 | final List schools; 29 | 30 | const SchoolsInfoLoaded(this.schools); 31 | 32 | @override 33 | List get props => [schools]; 34 | } 35 | 36 | class SchoolDataError extends SchoolsState { 37 | final ErrorDetails errorStateType; 38 | 39 | const SchoolDataError(this.errorStateType); 40 | 41 | @override 42 | List get props => [errorStateType]; 43 | } 44 | -------------------------------------------------------------------------------- /lib/features/schools/shared/models/school_details_view_model.dart: -------------------------------------------------------------------------------- 1 | class SchoolDetailsViewModel { 2 | final String id; 3 | final String schoolName; 4 | final String country; 5 | final String location; 6 | final String image; 7 | final int studentCount; 8 | final int employeeCount; 9 | final bool hostelAvailability; 10 | 11 | SchoolDetailsViewModel({ 12 | required this.id, 13 | required this.schoolName, 14 | required this.country, 15 | required this.location, 16 | required this.image, 17 | required this.studentCount, 18 | required this.employeeCount, 19 | required this.hostelAvailability, 20 | }); 21 | } 22 | -------------------------------------------------------------------------------- /lib/features/schools/shared/models/school_executed_task_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:sample_latest/features/schools/domain/entities/school_details_entity.dart'; 2 | import 'package:sample_latest/features/schools/domain/entities/school_entity.dart'; 3 | import 'package:sample_latest/features/schools/domain/entities/student_entity.dart'; 4 | 5 | /// This will store the information of executed school info 6 | class SchoolExecutedTaskFlow { 7 | var schools = []; 8 | 9 | SchoolDetailsEntity? schoolDetailsEntity; 10 | 11 | var students = []; 12 | } 13 | -------------------------------------------------------------------------------- /lib/features/schools/shared/models/school_view_model.dart: -------------------------------------------------------------------------------- 1 | import '../../domain/entities/school_entity.dart'; 2 | 3 | class SchoolViewModel { 4 | SchoolViewModel(this.schoolName, this.country, this.location, this.id); 5 | 6 | final String schoolName; 7 | 8 | String id; 9 | 10 | final String country; 11 | 12 | final String location; 13 | 14 | factory SchoolViewModel.fromEntity(SchoolEntity school) { 15 | return SchoolViewModel( 16 | school.schoolName, school.country, school.location, school.id); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/features/schools/shared/models/student_view_model.dart: -------------------------------------------------------------------------------- 1 | import '../../domain/entities/student_entity.dart'; 2 | 3 | class StudentViewModel { 4 | final String id; 5 | final String schoolId; 6 | final String studentName; 7 | final String studentLocation; 8 | final String standard; 9 | 10 | StudentViewModel({ 11 | required this.id, 12 | required this.schoolId, 13 | required this.studentName, 14 | required this.studentLocation, 15 | required this.standard, 16 | }); 17 | 18 | /// Convert from StudentEntity to StudentViewModel 19 | factory StudentViewModel.fromEntity(StudentEntity entity) { 20 | return StudentViewModel( 21 | id: entity.id, 22 | schoolId: entity.schoolId, 23 | studentName: entity.studentName, 24 | studentLocation: entity.studentLocation, 25 | standard: entity.standard, 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/features/schools/shared/params/school_details_param.dart: -------------------------------------------------------------------------------- 1 | class SchoolDetailsParams { 2 | SchoolDetailsParams( 3 | this.schoolName, 4 | this.country, 5 | this.location, 6 | this.id, 7 | this.image, 8 | this.studentCount, 9 | this.employeeCount, 10 | this.hostelAvailability, 11 | this.schoolId); 12 | 13 | final String schoolName; 14 | 15 | final String? id; 16 | 17 | final String schoolId; 18 | 19 | final String country; 20 | 21 | final String location; 22 | 23 | final String image; 24 | 25 | final int studentCount; 26 | 27 | final int employeeCount; 28 | 29 | final bool hostelAvailability; 30 | } 31 | -------------------------------------------------------------------------------- /lib/features/schools/shared/params/school_params.dart: -------------------------------------------------------------------------------- 1 | class SchoolParams { 2 | SchoolParams(this.schoolName, this.country, this.location, this.id); 3 | 4 | final String schoolName; 5 | 6 | String? id; 7 | 8 | final String country; 9 | 10 | final String location; 11 | } 12 | -------------------------------------------------------------------------------- /lib/features/schools/shared/params/student_params.dart: -------------------------------------------------------------------------------- 1 | class StudentParams { 2 | StudentParams(this.id, this.schoolId, this.studentName, this.studentLocation, 3 | this.standard); 4 | 5 | final String? id; 6 | final String schoolId; 7 | final String studentName; 8 | final String studentLocation; 9 | final String standard; 10 | } 11 | -------------------------------------------------------------------------------- /lib/features/schools_mvc/model/school_details_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'school_details_model.g.dart'; 4 | 5 | @JsonSerializable() 6 | class SchoolDetailsModel { 7 | SchoolDetailsModel( 8 | this.id, 9 | this.schoolName, 10 | this.country, 11 | this.location, 12 | this.image, 13 | this.studentCount, 14 | this.employeeCount, 15 | this.hostelAvailability, 16 | this.createdDate, 17 | {this.updatedDate}); 18 | 19 | @JsonKey(required: true) 20 | final String id; 21 | 22 | @JsonKey(required: true) 23 | final String schoolName; 24 | 25 | final String country; 26 | 27 | final String location; 28 | 29 | final String image; 30 | 31 | final int studentCount; 32 | 33 | final int employeeCount; 34 | 35 | final bool hostelAvailability; 36 | 37 | final int createdDate; 38 | 39 | final int? updatedDate; 40 | 41 | factory SchoolDetailsModel.fromJson(Map json) => 42 | _$SchoolDetailsModelFromJson(json); 43 | 44 | Map toJson() => _$SchoolDetailsModelToJson(this); 45 | 46 | Map toRouteJson() { 47 | var json = _$SchoolDetailsModelToJson(this); 48 | json['createdDate'] = createdDate.toString(); 49 | json['updatedDate'] = updatedDate.toString(); 50 | return json; 51 | } 52 | 53 | SchoolDetailsModel fromRouteJson(Map json) { 54 | var json = _$SchoolDetailsModelToJson(this); 55 | json['createdDate'] = int.parse(json['createdDate']); 56 | json['updatedDate'] = int.parse(json['updatedDate']); 57 | 58 | return SchoolDetailsModel.fromJson(json); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lib/features/schools_mvc/model/school_details_model.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'school_details_model.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SchoolDetailsModel _$SchoolDetailsModelFromJson(Map json) { 10 | $checkKeys( 11 | json, 12 | requiredKeys: const ['id', 'schoolName'], 13 | ); 14 | return SchoolDetailsModel( 15 | json['id'] as String, 16 | json['schoolName'] as String, 17 | json['country'] as String, 18 | json['location'] as String, 19 | json['image'] as String, 20 | json['studentCount'] as int, 21 | json['employeeCount'] as int, 22 | json['hostelAvailability'] as bool, 23 | json['createdDate'] as int, 24 | updatedDate: json['updatedDate'] as int?, 25 | ); 26 | } 27 | 28 | Map _$SchoolDetailsModelToJson(SchoolDetailsModel instance) => 29 | { 30 | 'id': instance.id, 31 | 'schoolName': instance.schoolName, 32 | 'country': instance.country, 33 | 'location': instance.location, 34 | 'image': instance.image, 35 | 'studentCount': instance.studentCount, 36 | 'employeeCount': instance.employeeCount, 37 | 'hostelAvailability': instance.hostelAvailability, 38 | 'createdDate': instance.createdDate, 39 | 'updatedDate': instance.updatedDate, 40 | }; 41 | -------------------------------------------------------------------------------- /lib/features/schools_mvc/model/school_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'school_model.g.dart'; 4 | 5 | @JsonSerializable() 6 | class SchoolModel { 7 | SchoolModel( 8 | this.schoolName, this.country, this.location, this.id, this.createdDate, 9 | {this.updatedDate}); 10 | 11 | @JsonKey(required: true) 12 | final String schoolName; 13 | 14 | @JsonKey(required: true) 15 | String id; 16 | 17 | final String country; 18 | final String location; 19 | 20 | final int createdDate; 21 | 22 | final int? updatedDate; 23 | 24 | factory SchoolModel.fromJson(Map json) => 25 | _$SchoolModelFromJson(json); 26 | 27 | Map toJson() => _$SchoolModelToJson(this); 28 | 29 | Map toRouteJson() { 30 | var json = _$SchoolModelToJson(this); 31 | json['createdDate'] = createdDate.toString(); 32 | json['updatedDate'] = updatedDate.toString(); 33 | return json; 34 | } 35 | 36 | factory SchoolModel.fromRouteJson(Map json) { 37 | json['createdDate'] = int.parse(json['createdDate']); 38 | json['updatedDate'] = int.parse(json['updatedDate']); 39 | 40 | return SchoolModel.fromJson(json); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/features/schools_mvc/model/school_model.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'school_model.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SchoolModel _$SchoolModelFromJson(Map json) { 10 | $checkKeys( 11 | json, 12 | requiredKeys: const ['schoolName', 'id'], 13 | ); 14 | return SchoolModel( 15 | json['schoolName'] as String, 16 | json['country'] as String, 17 | json['location'] as String, 18 | json['id'] as String, 19 | json['createdDate'] as int, 20 | updatedDate: json['updatedDate'] as int?, 21 | ); 22 | } 23 | 24 | Map _$SchoolModelToJson(SchoolModel instance) => 25 | { 26 | 'schoolName': instance.schoolName, 27 | 'id': instance.id, 28 | 'country': instance.country, 29 | 'location': instance.location, 30 | 'createdDate': instance.createdDate, 31 | 'updatedDate': instance.updatedDate, 32 | }; 33 | -------------------------------------------------------------------------------- /lib/features/schools_mvc/model/student_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'student_model.g.dart'; 4 | 5 | @JsonSerializable() 6 | class StudentModel { 7 | StudentModel(this.id, this.schoolId, this.studentName, this.studentLocation, 8 | this.standard, this.createdDate, 9 | {this.updatedDate}); 10 | 11 | @JsonKey( 12 | required: true, 13 | ) 14 | final String id; 15 | final String schoolId; 16 | final String studentName; 17 | final String studentLocation; 18 | final String standard; 19 | 20 | final int createdDate; 21 | 22 | final int? updatedDate; 23 | 24 | factory StudentModel.fromJson(Map json) => 25 | _$StudentModelFromJson(json); 26 | 27 | Map toJson() => _$StudentModelToJson(this); 28 | 29 | Map toRouteJson() { 30 | var json = _$StudentModelToJson(this); 31 | json['createdDate'] = createdDate.toString(); 32 | json['updatedDate'] = updatedDate.toString(); 33 | return json; 34 | } 35 | 36 | StudentModel fromRouteJson(Map json) { 37 | var json = _$StudentModelToJson(this); 38 | json['createdDate'] = int.parse(json['createdDate']); 39 | json['updatedDate'] = int.parse(json['updatedDate']); 40 | 41 | return StudentModel.fromJson(json); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /lib/features/schools_mvc/model/student_model.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'student_model.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | StudentModel _$StudentModelFromJson(Map json) { 10 | $checkKeys( 11 | json, 12 | requiredKeys: const ['id'], 13 | ); 14 | return StudentModel( 15 | json['id'] as String, 16 | json['schoolId'] as String, 17 | json['studentName'] as String, 18 | json['studentLocation'] as String, 19 | json['standard'] as String, 20 | json['createdDate'] as int, 21 | updatedDate: json['updatedDate'] as int?, 22 | ); 23 | } 24 | 25 | Map _$StudentModelToJson(StudentModel instance) => 26 | { 27 | 'id': instance.id, 28 | 'schoolId': instance.schoolId, 29 | 'studentName': instance.studentName, 30 | 'studentLocation': instance.studentLocation, 31 | 'standard': instance.standard, 32 | 'createdDate': instance.createdDate, 33 | 'updatedDate': instance.updatedDate, 34 | }; 35 | -------------------------------------------------------------------------------- /lib/features/smart_control_iot/core/local_server/local_server_handler/local_server_handler.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:sample_latest/core/local_server/handlers/base_request_handler.dart'; 3 | import 'package:shelf/shelf.dart'; 4 | 5 | import '../../../../../core/local_server/model/callback_response_handler.dart'; 6 | 7 | class SmartControlServerRequestHandler implements BaseRequestHandler { 8 | 9 | @override 10 | Future> handleRequest(Request request) async { 11 | try { 12 | print('##** path : ${request.url.path}'); 13 | switch (request.url.path) { 14 | case 'motion': 15 | return Result.ok('sucees'); 16 | // return await _handleUsersRequest(request); 17 | case 'api/products': 18 | // return await _handleProductsRequest(request); 19 | case 'api/settings': 20 | // return await _handleSettingsRequest(request); 21 | default: 22 | return Result.error('Route not found'); 23 | } 24 | } catch (e) { 25 | return Result.error('Error processing request: $e'); 26 | } 27 | } 28 | 29 | @override 30 | createJsonResponse(data, {int statusCode = 200}) { 31 | // TODO: implement createJsonResponse 32 | throw UnimplementedError(); 33 | } 34 | 35 | @override 36 | error(String message) { 37 | // TODO: implement error 38 | throw UnimplementedError(); 39 | } 40 | 41 | @override 42 | Future> parseJsonBody(request) { 43 | // TODO: implement parseJsonBody 44 | throw UnimplementedError(); 45 | } 46 | 47 | @override 48 | success(data) { 49 | // TODO: implement success 50 | throw UnimplementedError(); 51 | } 52 | } -------------------------------------------------------------------------------- /lib/features/smart_control_iot/features/on_and_off/data/respository/on_off_repository.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import 'package:sample_latest/core/data/base_service.dart'; 4 | 5 | class OnOffRepository { 6 | 7 | final BaseService _baseService; 8 | 9 | final String baseUrl = 'http://192.168.1.9/'; 10 | 11 | OnOffRepository(this._baseService); 12 | 13 | Future getStatus() async { 14 | var response = await _baseService.makeRequest(baseUrl: baseUrl, url: 'status'); 15 | return int.parse(response) == 1 ? true : false; 16 | } 17 | 18 | Future on() async { 19 | var response = await _baseService.makeRequest(baseUrl: baseUrl, url: 'turnOn'); 20 | return int.parse(response) == 1 ? true : false; 21 | } 22 | 23 | Future off() async { 24 | var response = await _baseService.makeRequest(baseUrl: baseUrl, url: 'turnOff'); 25 | return int.parse(response) == 1 ? true : false; 26 | } 27 | } -------------------------------------------------------------------------------- /lib/features/smart_control_iot/features/on_and_off/domain/use_cases/on_off_usecase.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import '../../data/respository/on_off_repository.dart'; 4 | 5 | class OnOffUsecase { 6 | 7 | final OnOffRepository _repository; 8 | 9 | OnOffUsecase(this._repository); 10 | 11 | Future status() async { 12 | return _repository.getStatus(); 13 | } 14 | 15 | Future on() async { 16 | return _repository.on(); 17 | } 18 | 19 | Future off() async { 20 | return _repository.off(); 21 | } 22 | } -------------------------------------------------------------------------------- /lib/features/smart_control_iot/features/on_and_off/presentation/cubit/on_off_cubit.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | 4 | import '../../domain/use_cases/on_off_usecase.dart'; 5 | import 'on_off_state.dart'; 6 | 7 | class OnOffCubit extends Cubit { 8 | OnOffCubit(this._onOffUsecase) 9 | : super(OnOffStateLoading()); 10 | 11 | final OnOffUsecase _onOffUsecase; 12 | 13 | 14 | Future loadStatus() async { 15 | var status = await _onOffUsecase.status(); 16 | emit(CurrentOnOffState(status)); 17 | } 18 | 19 | Future on() async { 20 | emit(OnOffStateLoading()); 21 | var status = await _onOffUsecase.on(); 22 | emit(CurrentOnOffState(status)); 23 | } 24 | 25 | Future off() async { 26 | emit(OnOffStateLoading()); 27 | var status = await _onOffUsecase.off(); 28 | 29 | emit(CurrentOnOffState(status)); 30 | } 31 | } -------------------------------------------------------------------------------- /lib/features/smart_control_iot/features/on_and_off/presentation/cubit/on_off_state.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:equatable/equatable.dart'; 3 | 4 | abstract class OnOffState extends Equatable { 5 | 6 | const OnOffState(); 7 | } 8 | 9 | class OnOffStateLoading extends OnOffState { 10 | 11 | @override 12 | // TODO: implement props 13 | List get props => []; 14 | 15 | } 16 | 17 | class CurrentOnOffState extends OnOffState { 18 | 19 | final bool status; 20 | 21 | const CurrentOnOffState(this.status); 22 | 23 | @override 24 | // TODO: implement props 25 | List get props => []; 26 | } -------------------------------------------------------------------------------- /lib/features/smart_control_iot/features/on_and_off/presentation/on_and_off_view.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter_bloc/flutter_bloc.dart'; 6 | import 'package:sample_latest/core/mixins/loaders.dart'; 7 | 8 | import 'cubit/on_off_cubit.dart'; 9 | import 'cubit/on_off_state.dart'; 10 | 11 | class OnAndOffView extends StatefulWidget { 12 | const OnAndOffView({super.key}); 13 | 14 | @override 15 | State createState() => _OnAndOffViewState(); 16 | } 17 | 18 | class _OnAndOffViewState extends State with Loaders { 19 | @override 20 | Widget build(BuildContext context) { 21 | context.read().loadStatus(); 22 | return BlocBuilder( 23 | builder: (context, OnOffState state) { 24 | if (state is CurrentOnOffState) { 25 | if(state.status) { 26 | return Center(child: ElevatedButton(onPressed: ()=> context.read().off(), child: Text('Off'))); 27 | }else{ 28 | return Center(child: ElevatedButton(onPressed: ()=> context.read().on(), child: Text('On'))); 29 | } 30 | } else { 31 | return circularLoader(); 32 | } 33 | }); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/features/smart_control_iot/shared/utils/enums.dart: -------------------------------------------------------------------------------- 1 | 2 | enum SmartControlType {onOff, motionDetector} -------------------------------------------------------------------------------- /lib/global_variables.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | final navigatorKey = GlobalKey(); 4 | final shellRouteCardsKey = GlobalKey(); 5 | final shellRouteShortcutsKey = GlobalKey(); 6 | -------------------------------------------------------------------------------- /lib/ui/exception/page_not_found.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:go_router/go_router.dart'; 3 | import 'package:sample_latest/core/device/config/device_configurations.dart'; 4 | import 'package:sample_latest/core/widgets/custom_app_bar.dart'; 5 | 6 | class PageNotFound extends StatelessWidget { 7 | final GoRouterState state; 8 | 9 | const PageNotFound(this.state, {Key? key}) : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: CustomAppBar( 15 | appBar: AppBar(), 16 | ), 17 | body: LayoutBuilder(builder: (context, constraints) { 18 | double? size = DeviceConfiguration.isMobileResolution ? null : null; 19 | return Container( 20 | padding: const EdgeInsets.all(16), 21 | alignment: Alignment.center, 22 | child: Wrap(spacing: 10, runSpacing: 10, children: [ 23 | Text('${state.error?.message}\n'), 24 | Image.asset('asset/exception_error/page_not_found.png', 25 | fit: BoxFit.scaleDown, height: size, width: size), 26 | ])); 27 | })); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | 11 | void fl_register_plugins(FlPluginRegistry* registry) { 12 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = 13 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); 14 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); 15 | } 16 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | url_launcher_linux 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | 9 | Runner/GoogleService-Info.plist 10 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '14' 2 | 3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 5 | 6 | project 'Runner', { 7 | 'Debug' => :debug, 8 | 'Profile' => :release, 9 | 'Release' => :release, 10 | } 11 | 12 | def flutter_root 13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) 14 | unless File.exist?(generated_xcode_build_settings_path) 15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" 16 | end 17 | 18 | File.foreach(generated_xcode_build_settings_path) do |line| 19 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 20 | return matches[1].strip if matches 21 | end 22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" 23 | end 24 | 25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 26 | 27 | flutter_macos_podfile_setup 28 | 29 | target 'Runner' do 30 | use_frameworks! 31 | use_modular_headers! 32 | 33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) 34 | target 'RunnerTests' do 35 | inherit! :search_paths 36 | end 37 | end 38 | 39 | post_install do |installer| 40 | installer.pods_project.targets.each do |target| 41 | flutter_additional_macos_build_settings(target) 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /macos/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FlutterMacOS (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - FlutterMacOS (from `Flutter/ephemeral`) 6 | 7 | EXTERNAL SOURCES: 8 | FlutterMacOS: 9 | :path: Flutter/ephemeral 10 | 11 | SPEC CHECKSUMS: 12 | FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 13 | 14 | PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367 15 | 16 | COCOAPODS: 1.11.3 17 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @main 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = sample_latest 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.sampleLatest 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | com.apple.security.network.client 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import FlutterMacOS 2 | import Cocoa 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /macos/firebase_app_id_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "file_generated_by": "FlutterFire CLI", 3 | "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory", 4 | "GOOGLE_APP_ID": "1:334267766183:ios:a241a09460830bcda35282", 5 | "FIREBASE_PROJECT_ID": "flutter-end-to-end", 6 | "GCM_SENDER_ID": "334267766183" 7 | } -------------------------------------------------------------------------------- /test/mock_data/configuration_data.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_localizations/flutter_localizations.dart'; 4 | import 'package:flutter_gen/gen_l10n/app_localizations.dart'; 5 | 6 | class TestConfigurationData { 7 | 8 | static const List screenSizes = [ 9 | // Size(320, 480), // Small Mobile: e.g., old iPhone SE 10 | Size(375, 667), // Regular Mobile: e.g., iPhone 8 11 | Size(768, 1024), // Tablet: e.g., iPad 12 | Size(1440, 900), // Desktop: Typical resolution 13 | ]; 14 | 15 | static const supportedLocales = [ 16 | Locale('en'), 17 | Locale('es'), 18 | Locale('hi'), 19 | Locale('he'), 20 | ]; 21 | 22 | static const localizationDelegate = [ 23 | AppLocalizations.delegate, 24 | GlobalMaterialLocalizations.delegate, 25 | GlobalCupertinoLocalizations.delegate, 26 | GlobalWidgetsLocalizations.delegate, 27 | ]; 28 | } -------------------------------------------------------------------------------- /test/mock_data/mock_firebase.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:mockito/mockito.dart'; 4 | import 'package:firebase_core/firebase_core.dart'; 5 | import 'package:firebase_core_platform_interface/firebase_core_platform_interface.dart'; 6 | 7 | class MockFirebase extends Mock implements FirebasePlatform {} 8 | 9 | void setupFirebaseMockss() { 10 | 11 | TestWidgetsFlutterBinding.ensureInitialized(); 12 | 13 | final mockFirebaseCore = MockFirebaseApp(); 14 | 15 | setupFirebaseCoreMocks(); 16 | 17 | 18 | when(mockFirebaseCore.initializeApp('name', PigeonFirebaseOptions( 19 | apiKey: '123', 20 | projectId: '123', 21 | appId: '123', 22 | messagingSenderId: '123', 23 | )).then((_) async => FirebaseApp)); 24 | 25 | // FirebasePlatform.instance = mockFirebaseCore; 26 | 27 | } -------------------------------------------------------------------------------- /test/unit_testing/repository/school_repo_test.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import 'package:flutter_test/flutter_test.dart'; 4 | import 'package:mockito/annotations.dart'; 5 | import 'package:mockito/mockito.dart'; 6 | import 'package:sample_latest/features/schools/data/model/school_model.dart'; 7 | import 'package:sample_latest/core/data/base_service.dart'; 8 | import 'package:sample_latest/features/schools/data/repository/school_repository.dart'; 9 | import 'package:sample_latest/core/data/urls.dart'; 10 | 11 | import '../../mock_data/school/school_mock_data.dart'; 12 | import 'school_repo_test.mocks.dart'; 13 | 14 | @GenerateMocks([BaseService]) 15 | void main() { 16 | 17 | late SchoolRepository schoolRepo; 18 | late MockBaseService mockBaseService; 19 | 20 | 21 | group('School Repository Testing', (){ 22 | 23 | setUpAll((){ 24 | mockBaseService = MockBaseService(); 25 | schoolRepo = SchoolRepository(baseService: mockBaseService); 26 | }); 27 | 28 | test('Fetch Empty Schools', () async { 29 | 30 | when(mockBaseService.makeRequest(url: '${Urls.schools}.json', 31 | )).thenAnswer((_) => Future.value(null)); 32 | 33 | final schools = await schoolRepo.fetchSchools(); 34 | 35 | expect(schools, isA>()); 36 | 37 | }); 38 | 39 | test('Fetch Existing Schools', () async { 40 | when(mockBaseService.makeRequest(url: '${Urls.schools}.json', 41 | )).thenAnswer((_) => Future.value(SchoolMockData.schoolsJson)); 42 | 43 | final schools = await schoolRepo.fetchSchools(); 44 | 45 | expect(schools.length, 2); 46 | expect(schools.first.schoolName, 'Kennedy'); 47 | }); 48 | 49 | }); 50 | } -------------------------------------------------------------------------------- /test/unit_testing/validator_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:sample_latest/core/mixins/validators.dart'; 3 | 4 | class ValidatorTest with Validators {} 5 | 6 | void main() { 7 | late ValidatorTest validatorTest; 8 | 9 | setUp((){ 10 | validatorTest = ValidatorTest(); 11 | }); 12 | 13 | group('Validator testing', () { 14 | 15 | test('email validator test', () { 16 | expect(validatorTest.textEmptyValidator('', 'email required'), 17 | 'email required'); 18 | 19 | expect(validatorTest.textEmptyValidator(null, 'email required'), 20 | 'email required'); 21 | }); 22 | }); 23 | } 24 | -------------------------------------------------------------------------------- /test_driver/integration_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:integration_test/integration_test_driver.dart'; 2 | 3 | Future main() => integrationDriver(); -------------------------------------------------------------------------------- /web/.well-known/apple-app-site-association: -------------------------------------------------------------------------------- 1 | { 2 | "applinks": { 3 | "apps": [], 4 | "details": [ 5 | { 6 | "appID": "A6QN8A42J2.com.example.sampleLatest", 7 | "paths": ["/home/*"] 8 | } 9 | ] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /web/.well-known/assetlinks.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "relation": ["delegate_permission/common.handle_all_urls"], 3 | "target": { 4 | "namespace": "android_app", 5 | "package_name": "com.example.sample_latest", 6 | "sha256_cert_fingerprints": 7 | ["3C:98:D3:DC:00:DD:DE:5A:FF:93:1D:6E:80:3C:C7:E0:34:67:E9:84:AD:8F:23:DC:2F:75:5A:30:F6:BA:F1:97"] 8 | } 9 | }] 10 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/web/favicon.png -------------------------------------------------------------------------------- /web/firebase-messaging-sw.js: -------------------------------------------------------------------------------- 1 | importScripts("https://www.gstatic.com/firebasejs/9.6.10/firebase-app-compat.js"); 2 | importScripts("https://www.gstatic.com/firebasejs/9.6.10/firebase-messaging-compat.js"); 3 | 4 | // For Firebase JS SDK v7.20.0 and later, measurementId is optional 5 | const firebaseConfig = { 6 | apiKey: "AIzaSyCtodL7DA8dz3B5HEMuJ7di0DY2MEQOjws", 7 | authDomain: "flutter-end-to-end.firebaseapp.com", 8 | projectId: "flutter-end-to-end", 9 | storageBucket: "flutter-end-to-end.appspot.com", 10 | messagingSenderId: "334267766183", 11 | appId: "1:334267766183:web:a26cc63b3cc29fe3a35282", 12 | measurementId: "G-NJEW95MV5Z" 13 | }; 14 | 15 | firebase.initializeApp(firebaseConfig); 16 | const messaging = firebase.messaging(); 17 | -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sample_latest", 3 | "short_name": "sample_latest", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#hexcode", 7 | "theme_color": "#hexcode", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | void RegisterPlugins(flutter::PluginRegistry* registry) { 15 | ConnectivityPlusWindowsPluginRegisterWithRegistrar( 16 | registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); 17 | FirebaseCorePluginCApiRegisterWithRegistrar( 18 | registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); 19 | LocalAuthPluginRegisterWithRegistrar( 20 | registry->GetRegistrarForPlugin("LocalAuthPlugin")); 21 | UrlLauncherWindowsRegisterWithRegistrar( 22 | registry->GetRegistrarForPlugin("UrlLauncherWindows")); 23 | } 24 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | connectivity_plus 7 | firebase_core 8 | local_auth_windows 9 | url_launcher_windows 10 | ) 11 | 12 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 13 | ) 14 | 15 | set(PLUGIN_BUNDLED_LIBRARIES) 16 | 17 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 18 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 19 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 20 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 21 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 22 | endforeach(plugin) 23 | 24 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 25 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 26 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 27 | endforeach(ffi_plugin) 28 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.Create(L"sample_latest", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krishnaji-yedlapalli/flutter_end_to_end/1b788ef610ac4683ee4e0cab4c6ed2b76673339a/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | --------------------------------------------------------------------------------