├── .env-example
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
└── workflows
│ └── main.yaml
├── .gitignore
├── .metadata
├── HiSchool!.png
├── LICENSE
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ ├── google-services.json
│ ├── proguard-rules.pro
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── flutter_mobile_2school
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── launcher_icon.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── launcher_icon.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── launcher_icon.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── launcher_icon.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── launcher_icon.png
│ │ │ ├── values-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── settings.gradle
└── settings_aar.gradle
├── assets
├── fonts
│ ├── Allison-Regular.ttf
│ ├── DancingScript.ttf
│ └── Lato-Regular.ttf
├── icons
│ └── launcher_icon.png
└── lottie
│ ├── cat_sleeping.json
│ └── splash.json
├── build.sh
├── compile.sh
├── init.sh
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ ├── Flutter 2.podspec
│ ├── Generated 2.xcconfig
│ └── Release.xcconfig
├── Podfile
├── Podfile.lock
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── Runner
│ ├── AppDelegate.swift
│ ├── Assets 2.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── HiSchool!-1024.png
│ │ │ ├── HiSchool!-20.png
│ │ │ ├── HiSchool!-20@2x.png
│ │ │ ├── HiSchool!-20@3x.png
│ │ │ ├── HiSchool!-29.png
│ │ │ ├── HiSchool!-29@2x.png
│ │ │ ├── HiSchool!-29@3x.png
│ │ │ ├── HiSchool!-40.png
│ │ │ ├── HiSchool!-40@2x.png
│ │ │ ├── HiSchool!-40@3x.png
│ │ │ ├── HiSchool!-60@2x.png
│ │ │ ├── HiSchool!-60@3x.png
│ │ │ ├── HiSchool!-76.png
│ │ │ ├── HiSchool!-76@2x.png
│ │ │ └── HiSchool!-83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── HiSchool!-1024.png
│ │ │ ├── HiSchool!-20.png
│ │ │ ├── HiSchool!-20@2x.png
│ │ │ ├── HiSchool!-20@3x.png
│ │ │ ├── HiSchool!-29.png
│ │ │ ├── HiSchool!-29@2x.png
│ │ │ ├── HiSchool!-29@3x.png
│ │ │ ├── HiSchool!-40.png
│ │ │ ├── HiSchool!-40@2x.png
│ │ │ ├── HiSchool!-40@3x.png
│ │ │ ├── HiSchool!-60@2x.png
│ │ │ ├── HiSchool!-60@3x.png
│ │ │ ├── HiSchool!-76.png
│ │ │ ├── HiSchool!-76@2x.png
│ │ │ └── HiSchool!-83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── GoogleService-Info.plist
│ ├── Info.plist
│ ├── Runner-Bridging-Header.h
│ └── Runner.entitlements
├── build
│ └── XCBuildData
│ │ ├── 63dc6ff226954aff1defa2bc5b630bc5-buildRequest.json
│ │ ├── 63dc6ff226954aff1defa2bc5b630bc5-targetGraph.txt
│ │ ├── BuildDescriptionCacheIndex-14f1afe95d2361a2bb30c2a7ffd2414e
│ │ ├── b09b6a9e6e7a242bc3f5302f5e3c06fb-buildRequest.json
│ │ ├── b09b6a9e6e7a242bc3f5302f5e3c06fb-desc.xcbuild
│ │ ├── b09b6a9e6e7a242bc3f5302f5e3c06fb-manifest.xcbuild
│ │ ├── b09b6a9e6e7a242bc3f5302f5e3c06fb-targetGraph 2.txt
│ │ ├── b09b6a9e6e7a242bc3f5302f5e3c06fb-targetGraph.txt
│ │ ├── build.db
│ │ ├── d87afb5e48aa690e3bd8be2cf84600bf-buildRequest 2.json
│ │ ├── d87afb5e48aa690e3bd8be2cf84600bf-buildRequest.json
│ │ ├── d87afb5e48aa690e3bd8be2cf84600bf-desc.xcbuild
│ │ ├── d87afb5e48aa690e3bd8be2cf84600bf-manifest.xcbuild
│ │ ├── d87afb5e48aa690e3bd8be2cf84600bf-targetGraph.txt
│ │ ├── dff818068802d9c42a73f2c8aacbe41d-buildRequest.json
│ │ ├── dff818068802d9c42a73f2c8aacbe41d-desc.xcbuild
│ │ ├── dff818068802d9c42a73f2c8aacbe41d-manifest.xcbuild
│ │ ├── dff818068802d9c42a73f2c8aacbe41d-targetGraph 2.txt
│ │ ├── dff818068802d9c42a73f2c8aacbe41d-targetGraph.txt
│ │ ├── fbc6cd67855b3fa763c4f0085931aa2c-buildRequest.json
│ │ ├── fbc6cd67855b3fa763c4f0085931aa2c-desc.xcbuild
│ │ ├── fbc6cd67855b3fa763c4f0085931aa2c-manifest.xcbuild
│ │ ├── fbc6cd67855b3fa763c4f0085931aa2c-targetGraph 2.txt
│ │ └── fbc6cd67855b3fa763c4f0085931aa2c-targetGraph.txt
└── clean-pods.sh
├── lib
├── main.dart
└── src
│ ├── app.dart
│ ├── blocs
│ ├── app_bloc.dart
│ ├── app_state
│ │ ├── app_state_bloc 2.dart
│ │ ├── app_state_bloc.dart
│ │ ├── app_state_event 2.dart
│ │ ├── app_state_event.dart
│ │ ├── app_state_state.dart
│ │ └── bloc.dart
│ ├── application
│ │ ├── application_bloc.dart
│ │ ├── application_event.dart
│ │ ├── application_state.dart
│ │ └── bloc.dart
│ ├── authentication
│ │ ├── authentication_bloc.dart
│ │ ├── authentication_event.dart
│ │ ├── authentication_state.dart
│ │ └── bloc.dart
│ ├── bloc.dart
│ ├── bloc
│ │ ├── transaction_bloc.dart
│ │ ├── transaction_event.dart
│ │ └── transaction_state.dart
│ ├── conversation
│ │ ├── conversation_bloc.dart
│ │ ├── conversation_event.dart
│ │ └── conversation_state.dart
│ ├── count_down
│ │ ├── count_down_bloc.dart
│ │ ├── count_down_event 2.dart
│ │ ├── count_down_event.dart
│ │ └── count_down_state.dart
│ ├── message
│ │ ├── message_bloc.dart
│ │ ├── message_event.dart
│ │ └── message_state.dart
│ ├── post_class
│ │ ├── post_class_bloc.dart
│ │ ├── post_class_event.dart
│ │ └── post_class_state.dart
│ ├── post_home
│ │ ├── post_home_bloc.dart
│ │ ├── post_home_event.dart
│ │ └── post_home_state.dart
│ ├── schedules
│ │ ├── schedules_bloc.dart
│ │ ├── schedules_event.dart
│ │ └── schedules_state.dart
│ ├── share_exam
│ │ ├── share_exam_bloc.dart
│ │ ├── share_exam_event.dart
│ │ └── share_exam_state.dart
│ └── theme
│ │ ├── bloc.dart
│ │ ├── theme_bloc.dart
│ │ ├── theme_event.dart
│ │ └── theme_state.dart
│ ├── configs
│ ├── application.dart
│ └── language.dart
│ ├── helpers
│ ├── audio_helper.dart
│ ├── date_time_helper.dart
│ ├── device_helper.dart
│ ├── export_excel.dart
│ ├── int.dart
│ ├── members_helpers.dart
│ ├── path_helper.dart
│ ├── picker
│ │ └── custom_image_picker.dart
│ ├── role_helper.dart
│ ├── string.dart
│ └── validators
│ │ ├── login_validator 2.dart
│ │ └── login_validator.dart
│ ├── lang
│ ├── language_service.dart
│ └── localization.dart
│ ├── models
│ ├── activity.dart
│ ├── assignment_firestore_model.dart
│ ├── class_model.dart
│ ├── conversation_model.dart
│ ├── device_model.dart
│ ├── exam.dart
│ ├── exam_model.dart
│ ├── history_quiz_model.dart
│ ├── message_model.dart
│ ├── notification_model.dart
│ ├── post_model.dart
│ ├── question.dart
│ ├── question_mode.dart
│ ├── question_type_enum.dart
│ ├── road_map_content_model.dart
│ ├── road_map_content_type.dart
│ ├── road_map_model.dart
│ ├── slide_mode.dart
│ ├── statistic_model.dart
│ ├── transaction_model.dart
│ ├── upload_response_model.dart
│ └── user.dart
│ ├── public
│ ├── api_gateway.dart
│ ├── constants.dart
│ └── sockets.dart
│ ├── resources
│ ├── base_repository.dart
│ ├── hard
│ │ ├── hard_activities.dart
│ │ ├── hard_attended.dart
│ │ ├── hard_chat.dart
│ │ ├── hard_exam_post.dart
│ │ ├── hard_normal_post.dart
│ │ ├── hard_post.dart
│ │ └── hard_schedule.dart
│ ├── local
│ │ └── user_local.dart
│ └── remote
│ │ ├── authentication_repository.dart
│ │ ├── class_repository.dart
│ │ ├── conversation_repository.dart
│ │ ├── exam_repository.dart
│ │ ├── history_quiz_repository.dart
│ │ ├── member_repository.dart
│ │ ├── message_repository.dart
│ │ ├── notification_repository.dart
│ │ ├── post_repository.dart
│ │ ├── question_repository.dart
│ │ ├── road_map_content_repository.dart
│ │ ├── road_map_repository.dart
│ │ ├── share_exam_repository.dart
│ │ ├── transaction_repository.dart
│ │ ├── upload_repository.dart
│ │ └── user_repository.dart
│ ├── routes
│ ├── app_pages.dart
│ ├── app_routes.dart
│ ├── scaffold_wrapper.dart
│ └── slides
│ │ ├── fade_route.dart
│ │ ├── slide_from_bottom_route.dart
│ │ ├── slide_from_left_route.dart
│ │ ├── slide_from_right_route.dart
│ │ └── slide_from_top_route.dart
│ ├── services
│ ├── firebase_firestore
│ │ ├── attendance_firestore.dart
│ │ └── post_firestore.dart
│ ├── firebase_messaging
│ │ └── handle_messaging.dart
│ ├── firebase_storage
│ │ └── upload_file.dart
│ ├── payment
│ │ └── momo_payment.dart
│ └── socket
│ │ ├── socket.dart
│ │ └── socket_emit.dart
│ ├── themes
│ ├── app_colors.dart
│ ├── app_decorations.dart
│ ├── font_family.dart
│ ├── theme_service.dart
│ └── themes.dart
│ ├── ui
│ ├── authentication
│ │ ├── authentication_screen.dart
│ │ └── screens
│ │ │ ├── login_screen.dart
│ │ │ └── register_screen.dart
│ ├── calendar
│ │ ├── calendar_screen.dart
│ │ └── widgets
│ │ │ └── dot_below_date.dart
│ ├── chats
│ │ ├── chat_screen.dart
│ │ └── widgets
│ │ │ └── message_card.dart
│ ├── classes
│ │ ├── blocs
│ │ │ ├── class
│ │ │ │ ├── class_bloc.dart
│ │ │ │ ├── class_event.dart
│ │ │ │ └── class_state.dart
│ │ │ ├── do_exam
│ │ │ │ ├── do_exam_bloc.dart
│ │ │ │ ├── do_exam_event.dart
│ │ │ │ └── do_exam_state.dart
│ │ │ ├── exam
│ │ │ │ ├── exam_bloc.dart
│ │ │ │ ├── exam_event.dart
│ │ │ │ └── exam_state.dart
│ │ │ ├── history_quiz
│ │ │ │ ├── history_quiz_bloc.dart
│ │ │ │ ├── history_quiz_event.dart
│ │ │ │ └── history_quiz_state.dart
│ │ │ ├── member
│ │ │ │ ├── member_bloc.dart
│ │ │ │ ├── member_event.dart
│ │ │ │ └── member_state.dart
│ │ │ ├── question
│ │ │ │ ├── question_bloc.dart
│ │ │ │ ├── question_event.dart
│ │ │ │ └── question_state.dart
│ │ │ ├── road_map
│ │ │ │ ├── road_map_bloc.dart
│ │ │ │ ├── road_map_event.dart
│ │ │ │ └── road_map_state.dart
│ │ │ └── road_map_content
│ │ │ │ ├── road_map_content_bloc.dart
│ │ │ │ ├── road_map_content_event.dart
│ │ │ │ └── road_map_content_state.dart
│ │ ├── classes_screen.dart
│ │ ├── screens
│ │ │ ├── class_information_screen.dart
│ │ │ ├── create_class_screen.dart
│ │ │ ├── create_deadline_screen.dart
│ │ │ ├── create_exam_screen.dart
│ │ │ ├── create_question_screen.dart
│ │ │ ├── create_road_map_content_screen.dart
│ │ │ ├── create_roadmap_screen.dart
│ │ │ ├── details_history_screen.dart
│ │ │ ├── do_exam_screen.dart
│ │ │ ├── history_quiz_screen.dart
│ │ │ ├── list_exam_screen.dart
│ │ │ ├── list_questions_screen.dart
│ │ │ ├── list_request_screen.dart
│ │ │ ├── lobby_screen.dart
│ │ │ ├── members_screen.dart
│ │ │ ├── new_post_screen.dart
│ │ │ ├── road_map_content_screen.dart
│ │ │ ├── road_map_screen.dart
│ │ │ ├── share_exam_screen.dart
│ │ │ ├── statistic_final_screen.dart
│ │ │ ├── statistic_in_exam_screen.dart
│ │ │ └── submit_deadline_screen.dart
│ │ └── widgets
│ │ │ ├── bottom_option_exam.dart
│ │ │ ├── bottom_option_question.dart
│ │ │ ├── bottom_option_road_map.dart
│ │ │ ├── character_counter.dart
│ │ │ ├── class_card.dart
│ │ │ ├── dialog_add_answer.dart
│ │ │ ├── dialog_add_dad.dart
│ │ │ ├── drawer_option.dart
│ │ │ ├── exam_card.dart
│ │ │ ├── history_quiz_item.dart
│ │ │ ├── lobby_user_card.dart
│ │ │ ├── question_card.dart
│ │ │ ├── recommend_class_card.dart
│ │ │ ├── transaction_card.dart
│ │ │ ├── user_request_card.dart
│ │ │ └── user_score_card.dart
│ ├── common
│ │ ├── dialogs
│ │ │ ├── dialog_confirm.dart
│ │ │ ├── dialog_loading.dart
│ │ │ └── dialog_notice.dart
│ │ ├── network_cached.dart
│ │ ├── screens
│ │ │ └── loading_screen.dart
│ │ └── widgets
│ │ │ ├── animated_fade.dart
│ │ │ ├── custom_date_picker.dart
│ │ │ ├── fade_shimmer.dart
│ │ │ ├── get_snack_bar.dart
│ │ │ ├── indicator.dart
│ │ │ └── pie_chart.dart
│ ├── conversation
│ │ ├── conversation_screen.dart
│ │ └── widgets
│ │ │ ├── input_message.dart
│ │ │ └── message_conversation_card.dart
│ ├── home
│ │ ├── home_screen.dart
│ │ └── widgets
│ │ │ ├── active_friend_card.dart
│ │ │ ├── attendance_in_post.dart
│ │ │ ├── bottom_sheet_assignment.dart
│ │ │ ├── bottom_sheet_attendance.dart
│ │ │ ├── bottom_sheet_comment.dart
│ │ │ ├── bottom_sheet_pick_class.dart
│ │ │ ├── comment_card.dart
│ │ │ ├── date_bar.dart
│ │ │ ├── deadline_in_post.dart
│ │ │ ├── exam_in_post.dart
│ │ │ ├── image_body_post.dart
│ │ │ ├── input_comment_post.dart
│ │ │ ├── new_post.dart
│ │ │ ├── post_card.dart
│ │ │ ├── post_shimmer_card.dart
│ │ │ ├── post_shimmer_list.dart
│ │ │ └── user_assignment_done.dart
│ ├── navigation
│ │ ├── navigation.dart
│ │ └── widgets
│ │ │ └── notification_card.dart
│ ├── notification
│ │ ├── blocs
│ │ │ ├── notification_bloc.dart
│ │ │ ├── notification_event.dart
│ │ │ └── notification_state.dart
│ │ └── notification_screen.dart
│ ├── profile
│ │ ├── profile_screen.dart
│ │ └── screens
│ │ │ └── edit_profile_screen.dart
│ └── splash
│ │ └── splash_screen.dart
│ └── utils
│ ├── blurhash.dart
│ ├── logger.dart
│ ├── sizer_custom
│ ├── extension.dart
│ ├── sizer.dart
│ ├── util.dart
│ └── widget.dart
│ └── stack_avatar.dart
├── pubspec.lock
├── pubspec.yaml
├── screenshots
├── class.png
├── details_class.png
├── home.png
└── profile.png
└── test
└── main_test.dart
/.env-example:
--------------------------------------------------------------------------------
1 | BASE_URL=domain
2 | SOCKET_URL=domain
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Desktop (please complete the following information):**
27 | - OS: [e.g. iOS]
28 | - Browser [e.g. chrome, safari]
29 | - Version [e.g. 22]
30 |
31 | **Smartphone (please complete the following information):**
32 | - Device: [e.g. iPhone6]
33 | - OS: [e.g. iOS8.1]
34 | - Browser [e.g. stock browser, safari]
35 | - Version [e.g. 22]
36 |
37 | **Additional context**
38 | Add any other context about the problem here.
39 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.github/workflows/main.yaml:
--------------------------------------------------------------------------------
1 | name: Test, Build, Release apk
2 |
3 | on:
4 | push:
5 | tags:
6 | - "*"
7 |
8 | jobs:
9 | test:
10 | name: Unit Test
11 | runs-on: ubuntu-latest
12 | steps:
13 | - uses: actions/checkout@v1
14 | - uses: actions/setup-java@v1
15 | with:
16 | java-version: "12.x"
17 | - uses: subosito/flutter-action@v1
18 | with:
19 | flutter-version: "3.7.9"
20 | - run: flutter pub get
21 | - run: flutter test
22 |
23 | build:
24 | needs: [test]
25 | name: Build APK
26 | runs-on: ubuntu-latest
27 | steps:
28 | - uses: actions/checkout@v1
29 | - uses: actions/setup-java@v1
30 | with:
31 | java-version: "12.x"
32 | - uses: subosito/flutter-action@v1
33 | with:
34 | flutter-version: "3.7.9"
35 | - run: flutter pub get
36 | - run: flutter build apk --release
37 | - name: Create a Release APK
38 | uses: ncipollo/release-action@v1
39 | with:
40 | artifacts: "build/app/outputs/apk/release/*.apk"
41 | token: ${{ secrets.TOKEN }}
42 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
43 | # Android Studio will place build artifacts here
44 | /android/app/debug
45 | /android/app/profile
46 | /android/app/release
47 | lib/src/secret_key.dart
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: f4abaa0735eba4dfd8f33f73363911d63931fe03
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/HiSchool!.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/HiSchool!.png
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 lambiengcode
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # include: package:pedantic/analysis_options.1.9.0.yaml
2 | # linter:
3 | # rules:
4 | # prefer_single_quotes: false
5 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | /app/hischool-keystore.jks
--------------------------------------------------------------------------------
/android/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "346586327036",
4 | "project_id": "cloudmate-243bf",
5 | "storage_bucket": "cloudmate-243bf.appspot.com"
6 | },
7 | "client": [
8 | {
9 | "client_info": {
10 | "mobilesdk_app_id": "1:346586327036:android:22508e54c1752947f77479",
11 | "android_client_info": {
12 | "package_name": "com.wanted.cloudmate"
13 | }
14 | },
15 | "oauth_client": [
16 | {
17 | "client_id": "346586327036-fjps5ntuml5676862ju5eljav2qoq8sr.apps.googleusercontent.com",
18 | "client_type": 3
19 | }
20 | ],
21 | "api_key": [
22 | {
23 | "current_key": "AIzaSyDwdoptIa5nvx6rZp_Jia_6dS7c0nYF_9I"
24 | }
25 | ],
26 | "services": {
27 | "appinvite_service": {
28 | "other_platform_oauth_client": [
29 | {
30 | "client_id": "346586327036-fjps5ntuml5676862ju5eljav2qoq8sr.apps.googleusercontent.com",
31 | "client_type": 3
32 | },
33 | {
34 | "client_id": "346586327036-cukqoq8teu58v3eb35rdugq1sjq7va0t.apps.googleusercontent.com",
35 | "client_type": 2,
36 | "ios_info": {
37 | "bundle_id": "com.wanted.cloudmate"
38 | }
39 | }
40 | ]
41 | }
42 | }
43 | }
44 | ],
45 | "configuration_version": "1"
46 | }
--------------------------------------------------------------------------------
/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | ## Flutter wrapper
2 | -keep class io.flutter.app.** { *; }
3 | -keep class io.flutter.plugin.** { *; }
4 | -keep class io.flutter.util.** { *; }
5 | -keep class io.flutter.view.** { *; }
6 | -keep class io.flutter.** { *; }
7 | -keep class io.flutter.plugins.** { *; }
8 | -dontwarn io.flutter.embedding.**
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/flutter_mobile_2school/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.wanted.cloudmate
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/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/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/android/app/src/main/res/mipmap-hdpi/launcher_icon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/android/app/src/main/res/mipmap-mdpi/launcher_icon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.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 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.8.22'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.4.2'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | classpath 'com.google.gms:google-services:4.3.15'
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | google()
18 | jcenter()
19 | }
20 | }
21 |
22 | rootProject.buildDir = '../build'
23 | subprojects {
24 | project.buildDir = "${rootProject.buildDir}/${project.name}"
25 | project.evaluationDependsOn(':app')
26 | }
27 |
28 | tasks.register("clean", Delete) {
29 | delete rootProject.buildDir
30 | }
31 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | # android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/android/settings_aar.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/assets/fonts/Allison-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/assets/fonts/Allison-Regular.ttf
--------------------------------------------------------------------------------
/assets/fonts/DancingScript.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/assets/fonts/DancingScript.ttf
--------------------------------------------------------------------------------
/assets/fonts/Lato-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/assets/fonts/Lato-Regular.ttf
--------------------------------------------------------------------------------
/assets/icons/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/assets/icons/launcher_icon.png
--------------------------------------------------------------------------------
/build.sh:
--------------------------------------------------------------------------------
1 | echo "1. APK"
2 | echo "2. AppBundle"
3 | while :
4 | do
5 | read -p "Build to: " input
6 | case $input in
7 | 1)
8 | flutter build apk --target-platform android-arm,android-arm64 --release -v
9 | break
10 | ;;
11 | 2)
12 | flutter build appbundle --target-platform android-arm,android-arm64 --release -v
13 | break
14 | ;;
15 | *)
16 | ;;
17 | esac
18 | done
19 | echo "Build successfully!"
--------------------------------------------------------------------------------
/compile.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
4 | echo "Use path: $SCRIPTPATH/"
5 | cd $SCRIPTPATH
6 |
7 | case "$(uname -s)" in
8 | Linux*) windows=0;mac=0;;
9 | Darwin*) windows=0;mac=1;;
10 | CYGWIN*) windows=1;mac=0;;
11 | MINGW*) windows=1;mac=0;;
12 | *) windows=0;mac=0
13 | esac
14 |
15 | if [ -e ./build ]; then
16 | rm -rf ./build
17 | fi
18 |
19 | flutter format modules lib test
20 | flutter clean
21 | flutter pub get
22 | clear
23 |
24 | # Analyze before build
25 | flutter analyze
26 | if [ ! $? -eq 0 ]; then
27 | exit 1
28 | fi
29 |
30 | # Generate app icons & splash screen
31 | flutter pub run flutter_launcher_icons:main
32 |
33 | # Remove ununsed icons
34 | rm -f ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png
35 | rm -f ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png
36 | rm -f ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png
37 | rm -f ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png
38 | rm -f ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png
39 | rm -f ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png
40 |
41 | if [ "$1" == "run" ]; then
42 | # Run on all devices
43 | flutter run -d all
44 | else
45 | # Android App Bundle
46 | # Support app bundles with 32-bit and 64-bit binaries
47 | # https://github.com/flutter/flutter/issues/3192#
48 | # brew cask install java
49 | # brew install gradle
50 | flutter build appbundle --release --shrink --split-debug-info=build/debug_info $@
51 |
52 | if [ "$mac" == "1" ]; then
53 | # Short pause
54 | sleep 3
55 |
56 | # iOS Build
57 | flutter build ios --release --obfuscate --split-debug-info=build/debug_info $@
58 | if [ $? -eq 0 ]; then
59 | du -sh build/ios/iphoneos/Runner.app
60 | rm -Rf build/ios/iphoneos/Runner.app
61 | fi
62 | fi
63 | fi
64 |
--------------------------------------------------------------------------------
/init.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
4 | echo "Use path: $SCRIPTPATH/"
5 | cd $SCRIPTPATH
6 |
7 | case "$(uname -s)" in
8 | Linux*) windows=0;mac=0;;
9 | Darwin*) windows=0;mac=1;;
10 | CYGWIN*) windows=1;mac=0;;
11 | MINGW*) windows=1;mac=0;;
12 | *) windows=0;mac=0
13 | esac
14 |
15 | # Remove all pub caches
16 | if [ "$windows" != "1" ]; then
17 | rm -Rf ~/.pub-cache/
18 |
19 | if [ "$mac" == "1" ]; then
20 | rm -Rf ~/Library/Developer/Xcode/DerivedData
21 | rm -Rf ~/.cocoapods/
22 | fi
23 | else
24 | rm -Rf ~/AppData/Local/Pub/Cache
25 | rm -Rf ~/AppData/Roaming/Pub/Cache
26 | fi
27 |
28 | # Remove all logs and temp files
29 | rm -Rf .dart_tool/
30 | rm -Rf .flutter-plugins
31 | rm -Rf .flutter-plugins-dependencies
32 | rm -Rf *.iml
33 | rm -Rf *.lock
34 | rm -Rf *.log
35 | rm -Rf android/.gradle/
36 | rm -Rf android/.idea/
37 | rm -Rf build/
38 |
39 | if [ "$mac" == "1" ]; then
40 | rm -Rf ios/.symlinks/
41 | rm -Rf ios/Flutter/Flutter.framework
42 | rm -Rf ios/Flutter/Flutter.podspec
43 | rm -Rf ios/Pods/
44 | rm -Rf ios/Runner.xcworkspace
45 | fi
46 |
47 | # Upgrade the framework (only works on mac) bash configbash
48 | if [ "$windows" != "1" ]; then
49 | flutter channel stable
50 | flutter upgrade --force
51 | fi
52 |
53 | # Get pub packages
54 | if [ ! -e .packages ]; then
55 | flutter pub get
56 | else
57 | flutter clean
58 | flutter pub cache repair
59 | flutter pub upgrade
60 | fi
61 |
62 | # Install ios packages (only works on mac)
63 | if [ "$mac" == "1" ]; then
64 | cd ios
65 | pod deintegrate
66 | pod install --clean-install
67 | cd ..
68 | fi
69 |
70 | # Get packages for sub modules
71 | get_modules() {
72 | local root=$(pwd)
73 | local path="$1"
74 | cd $path
75 | flutter packages get
76 | cd $root
77 | }
78 | for folder in modules/*; do
79 | if [ -d "$folder" ]; then get_modules "$folder"; fi
80 | done
81 |
82 | # Get the flutter packages
83 | flutter config --no-analytics
84 | flutter doctor --android-licenses
85 | flutter packages get
86 |
87 | # Run flutter doctor
88 | clear ; flutter doctor -v
89 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/ephemeral/
22 | Flutter/app.flx
23 | Flutter/app.zip
24 | Flutter/flutter_assets/
25 | Flutter/flutter_export_environment.sh
26 | ServiceDefinitions.json
27 | Runner/GeneratedPluginRegistrant.*
28 |
29 | # Exceptions to above rules.
30 | !default.mode1v3
31 | !default.mode2v3
32 | !default.pbxuser
33 | !default.perspectivev3
34 |
--------------------------------------------------------------------------------
/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 | 11.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/Flutter 2.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # NOTE: This podspec is NOT to be published. It is only used as a local source!
3 | # This is a generated file; do not edit or check into version control.
4 | #
5 |
6 | Pod::Spec.new do |s|
7 | s.name = 'Flutter'
8 | s.version = '1.0.0'
9 | s.summary = 'High-performance, high-fidelity mobile apps.'
10 | s.homepage = 'https://flutter.io'
11 | s.license = { :type => 'MIT' }
12 | s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' }
13 | s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s }
14 | s.ios.deployment_target = '9.0'
15 | # Framework linking is handled by Flutter tooling, not CocoaPods.
16 | # Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs.
17 | s.vendored_frameworks = 'path/to/nothing'
18 | end
19 |
--------------------------------------------------------------------------------
/ios/Flutter/Generated 2.xcconfig:
--------------------------------------------------------------------------------
1 | // This is a generated file; do not edit or check into version control.
2 | FLUTTER_ROOT=/Applications/flutter
3 | FLUTTER_APPLICATION_PATH=/Users/lambiengcode/Documents/lambiengcode/opensource_hi_school
4 | COCOAPODS_PARALLEL_CODE_SIGN=true
5 | FLUTTER_TARGET=/Users/lambiengcode/Documents/lambiengcode/opensource_hi_school/lib/main.dart
6 | FLUTTER_BUILD_DIR=build
7 | FLUTTER_BUILD_NAME=1.0.0
8 | FLUTTER_BUILD_NUMBER=1
9 | EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386 arm64
10 | DART_DEFINES=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ==
11 | DART_OBFUSCATION=false
12 | TRACK_WIDGET_CREATION=true
13 | TREE_SHAKE_ICONS=false
14 | PACKAGE_CONFIG=/Users/lambiengcode/Documents/lambiengcode/opensource_hi_school/.dart_tool/package_config.json
15 |
--------------------------------------------------------------------------------
/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, '11.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 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
34 | end
35 |
36 | post_install do |installer|
37 | installer.pods_project.targets.each do |target|
38 | flutter_additional_ios_build_settings(target)
39 | end
40 | installer.pods_project.build_configurations.each do |config|
41 | config.build_settings['IPHONE_DEPLOYMENT_TARGET']='11.0'
42 | config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64 i386"
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/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 | import Firebase
4 | import momo_vn
5 |
6 | @UIApplicationMain
7 | @objc class AppDelegate: FlutterAppDelegate {
8 | override func application(
9 | _ application: UIApplication,
10 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
11 | ) -> Bool {
12 | FirebaseApp.configure()
13 | GeneratedPluginRegistrant.register(with: self)
14 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
15 | }
16 |
17 | override func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
18 | MoMoPayment.handleOpenUrl(url: url, sourceApp: sourceApplication!)
19 | return true
20 | }
21 |
22 | override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any]) -> Bool {
23 | MoMoPayment.handleOpenUrl(url: url, sourceApp: "")
24 | return true
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-1024.png
--------------------------------------------------------------------------------
/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-20.png
--------------------------------------------------------------------------------
/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-29.png
--------------------------------------------------------------------------------
/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-40.png
--------------------------------------------------------------------------------
/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-76.png
--------------------------------------------------------------------------------
/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets 2.xcassets/AppIcon.appiconset/HiSchool!-83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets 2.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 2.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets 2.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets 2.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets 2.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets 2.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets 2.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets 2.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/Assets.xcassets/AppIcon.appiconset/HiSchool!-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-1024.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-20.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-29.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-40.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-76.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets.xcassets/AppIcon.appiconset/HiSchool!-83.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/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/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/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/GoogleService-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CLIENT_ID
6 | 346586327036-vg1kj72ndm3pmul858lcs7qm9q4c0nij.apps.googleusercontent.com
7 | REVERSED_CLIENT_ID
8 | com.googleusercontent.apps.346586327036-vg1kj72ndm3pmul858lcs7qm9q4c0nij
9 | API_KEY
10 | AIzaSyCMAwsOQIix9eFm_QquAQaFSq2-W59K968
11 | GCM_SENDER_ID
12 | 346586327036
13 | PLIST_VERSION
14 | 1
15 | BUNDLE_ID
16 | com.wanted.hischool
17 | PROJECT_ID
18 | cloudmate-243bf
19 | STORAGE_BUCKET
20 | cloudmate-243bf.appspot.com
21 | IS_ADS_ENABLED
22 |
23 | IS_ANALYTICS_ENABLED
24 |
25 | IS_APPINVITE_ENABLED
26 |
27 | IS_GCM_ENABLED
28 |
29 | IS_SIGNIN_ENABLED
30 |
31 | GOOGLE_APP_ID
32 | 1:346586327036:ios:9148ba5bdf1ce85cf77479
33 |
34 |
--------------------------------------------------------------------------------
/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 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/build/XCBuildData/63dc6ff226954aff1defa2bc5b630bc5-buildRequest.json:
--------------------------------------------------------------------------------
1 | {
2 | "buildCommand" : "build",
3 | "configuredTargets" : [
4 | {
5 | "guid" : "3111b870364814bc5334e9082f29c72f88a783a885d8b0b3beb2e9f90bde3f49"
6 | }
7 | ],
8 | "continueBuildingAfterErrors" : false,
9 | "enableIndexBuildArena" : false,
10 | "hideShellScriptEnvironment" : false,
11 | "parameters" : {
12 | "action" : "build",
13 | "configurationName" : "Debug",
14 | "overrides" : {
15 | "commandLine" : {
16 | "table" : {
17 | "COMPILER_INDEX_STORE_ENABLE" : "NO",
18 | "FLUTTER_SUPPRESS_ANALYTICS" : "true",
19 | "SDKROOT" : "iphonesimulator14.5"
20 | }
21 | },
22 | "synthesized" : {
23 | "table" : {
24 | "ACTION" : "build",
25 | "ENABLE_PREVIEWS" : "NO"
26 | }
27 | }
28 | }
29 | },
30 | "schemeCommand" : "launch",
31 | "shouldCollectMetrics" : false,
32 | "showNonLoggedProgress" : true,
33 | "useDryRun" : false,
34 | "useImplicitDependencies" : false,
35 | "useLegacyBuildLocations" : false,
36 | "useParallelTargets" : false
37 | }
--------------------------------------------------------------------------------
/ios/build/XCBuildData/63dc6ff226954aff1defa2bc5b630bc5-targetGraph.txt:
--------------------------------------------------------------------------------
1 | Target dependency graph (1 target)
2 | Runner in Runner
--------------------------------------------------------------------------------
/ios/build/XCBuildData/BuildDescriptionCacheIndex-14f1afe95d2361a2bb30c2a7ffd2414e:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/build/XCBuildData/BuildDescriptionCacheIndex-14f1afe95d2361a2bb30c2a7ffd2414e
--------------------------------------------------------------------------------
/ios/build/XCBuildData/b09b6a9e6e7a242bc3f5302f5e3c06fb-buildRequest.json:
--------------------------------------------------------------------------------
1 | {
2 | "buildCommand" : "build",
3 | "configuredTargets" : [
4 | {
5 | "guid" : "3111b870364814bc5334e9082f29c72f88a783a885d8b0b3beb2e9f90bde3f49"
6 | }
7 | ],
8 | "continueBuildingAfterErrors" : false,
9 | "enableIndexBuildArena" : false,
10 | "hideShellScriptEnvironment" : false,
11 | "parameters" : {
12 | "action" : "build",
13 | "configurationName" : "Debug",
14 | "overrides" : {
15 | "commandLine" : {
16 | "table" : {
17 | "COMPILER_INDEX_STORE_ENABLE" : "NO",
18 | "FLUTTER_SUPPRESS_ANALYTICS" : "true",
19 | "SCRIPT_OUTPUT_STREAM_FILE" : "/var/folders/85/b90cyd197q98d8fd834f2mkr0000gn/T/flutter_tools.f0qZO2/flutter_build_log_pipe.2Oc7mJ/pipe_to_stdout",
20 | "SDKROOT" : "iphonesimulator14.5"
21 | }
22 | },
23 | "synthesized" : {
24 | "table" : {
25 | "ACTION" : "build",
26 | "ENABLE_PREVIEWS" : "NO"
27 | }
28 | }
29 | }
30 | },
31 | "schemeCommand" : "launch",
32 | "shouldCollectMetrics" : false,
33 | "showNonLoggedProgress" : true,
34 | "useDryRun" : false,
35 | "useImplicitDependencies" : false,
36 | "useLegacyBuildLocations" : false,
37 | "useParallelTargets" : false
38 | }
--------------------------------------------------------------------------------
/ios/build/XCBuildData/b09b6a9e6e7a242bc3f5302f5e3c06fb-desc.xcbuild:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/build/XCBuildData/b09b6a9e6e7a242bc3f5302f5e3c06fb-desc.xcbuild
--------------------------------------------------------------------------------
/ios/build/XCBuildData/b09b6a9e6e7a242bc3f5302f5e3c06fb-targetGraph 2.txt:
--------------------------------------------------------------------------------
1 | Target dependency graph (1 target)
2 | Runner in Runner
--------------------------------------------------------------------------------
/ios/build/XCBuildData/b09b6a9e6e7a242bc3f5302f5e3c06fb-targetGraph.txt:
--------------------------------------------------------------------------------
1 | Target dependency graph (1 target)
2 | Runner in Runner
--------------------------------------------------------------------------------
/ios/build/XCBuildData/build.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/build/XCBuildData/build.db
--------------------------------------------------------------------------------
/ios/build/XCBuildData/d87afb5e48aa690e3bd8be2cf84600bf-buildRequest 2.json:
--------------------------------------------------------------------------------
1 | {
2 | "buildCommand" : "build",
3 | "configuredTargets" : [
4 | {
5 | "guid" : "3111b870364814bc5334e9082f29c72f88a783a885d8b0b3beb2e9f90bde3f49"
6 | }
7 | ],
8 | "continueBuildingAfterErrors" : false,
9 | "enableIndexBuildArena" : false,
10 | "hideShellScriptEnvironment" : false,
11 | "parameters" : {
12 | "action" : "build",
13 | "configurationName" : "Debug",
14 | "overrides" : {
15 | "commandLine" : {
16 | "table" : {
17 | "COMPILER_INDEX_STORE_ENABLE" : "NO",
18 | "FLUTTER_SUPPRESS_ANALYTICS" : "true",
19 | "SDKROOT" : "iphonesimulator14.5"
20 | }
21 | },
22 | "synthesized" : {
23 | "table" : {
24 | "ACTION" : "build",
25 | "ENABLE_PREVIEWS" : "NO"
26 | }
27 | }
28 | }
29 | },
30 | "schemeCommand" : "launch",
31 | "shouldCollectMetrics" : false,
32 | "showNonLoggedProgress" : true,
33 | "useDryRun" : false,
34 | "useImplicitDependencies" : false,
35 | "useLegacyBuildLocations" : false,
36 | "useParallelTargets" : false
37 | }
--------------------------------------------------------------------------------
/ios/build/XCBuildData/d87afb5e48aa690e3bd8be2cf84600bf-buildRequest.json:
--------------------------------------------------------------------------------
1 | {
2 | "buildCommand" : "build",
3 | "configuredTargets" : [
4 | {
5 | "guid" : "3111b870364814bc5334e9082f29c72f88a783a885d8b0b3beb2e9f90bde3f49"
6 | }
7 | ],
8 | "continueBuildingAfterErrors" : false,
9 | "enableIndexBuildArena" : false,
10 | "hideShellScriptEnvironment" : false,
11 | "parameters" : {
12 | "action" : "build",
13 | "configurationName" : "Debug",
14 | "overrides" : {
15 | "commandLine" : {
16 | "table" : {
17 | "COMPILER_INDEX_STORE_ENABLE" : "NO",
18 | "FLUTTER_SUPPRESS_ANALYTICS" : "true",
19 | "SDKROOT" : "iphonesimulator14.5"
20 | }
21 | },
22 | "synthesized" : {
23 | "table" : {
24 | "ACTION" : "build",
25 | "ENABLE_PREVIEWS" : "NO"
26 | }
27 | }
28 | }
29 | },
30 | "schemeCommand" : "launch",
31 | "shouldCollectMetrics" : false,
32 | "showNonLoggedProgress" : true,
33 | "useDryRun" : false,
34 | "useImplicitDependencies" : false,
35 | "useLegacyBuildLocations" : false,
36 | "useParallelTargets" : false
37 | }
--------------------------------------------------------------------------------
/ios/build/XCBuildData/d87afb5e48aa690e3bd8be2cf84600bf-desc.xcbuild:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/build/XCBuildData/d87afb5e48aa690e3bd8be2cf84600bf-desc.xcbuild
--------------------------------------------------------------------------------
/ios/build/XCBuildData/d87afb5e48aa690e3bd8be2cf84600bf-targetGraph.txt:
--------------------------------------------------------------------------------
1 | Target dependency graph (1 target)
2 | Runner in Runner
--------------------------------------------------------------------------------
/ios/build/XCBuildData/dff818068802d9c42a73f2c8aacbe41d-buildRequest.json:
--------------------------------------------------------------------------------
1 | {
2 | "buildCommand" : "build",
3 | "configuredTargets" : [
4 | {
5 | "guid" : "3111b870364814bc5334e9082f29c72f88a783a885d8b0b3beb2e9f90bde3f49"
6 | }
7 | ],
8 | "continueBuildingAfterErrors" : false,
9 | "enableIndexBuildArena" : false,
10 | "hideShellScriptEnvironment" : false,
11 | "parameters" : {
12 | "action" : "build",
13 | "configurationName" : "Debug",
14 | "overrides" : {
15 | "commandLine" : {
16 | "table" : {
17 | "COMPILER_INDEX_STORE_ENABLE" : "NO",
18 | "FLUTTER_SUPPRESS_ANALYTICS" : "true",
19 | "SDKROOT" : "iphonesimulator14.5"
20 | }
21 | },
22 | "synthesized" : {
23 | "table" : {
24 | "ACTION" : "build",
25 | "ENABLE_PREVIEWS" : "NO"
26 | }
27 | }
28 | }
29 | },
30 | "schemeCommand" : "launch",
31 | "shouldCollectMetrics" : false,
32 | "showNonLoggedProgress" : true,
33 | "useDryRun" : false,
34 | "useImplicitDependencies" : false,
35 | "useLegacyBuildLocations" : false,
36 | "useParallelTargets" : false
37 | }
--------------------------------------------------------------------------------
/ios/build/XCBuildData/dff818068802d9c42a73f2c8aacbe41d-desc.xcbuild:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/build/XCBuildData/dff818068802d9c42a73f2c8aacbe41d-desc.xcbuild
--------------------------------------------------------------------------------
/ios/build/XCBuildData/dff818068802d9c42a73f2c8aacbe41d-targetGraph 2.txt:
--------------------------------------------------------------------------------
1 | Target dependency graph (1 target)
2 | Runner in Runner
--------------------------------------------------------------------------------
/ios/build/XCBuildData/dff818068802d9c42a73f2c8aacbe41d-targetGraph.txt:
--------------------------------------------------------------------------------
1 | Target dependency graph (1 target)
2 | Runner in Runner
--------------------------------------------------------------------------------
/ios/build/XCBuildData/fbc6cd67855b3fa763c4f0085931aa2c-buildRequest.json:
--------------------------------------------------------------------------------
1 | {
2 | "buildCommand" : "build",
3 | "configuredTargets" : [
4 | {
5 | "guid" : "3111b870364814bc5334e9082f29c72f88a783a885d8b0b3beb2e9f90bde3f49"
6 | }
7 | ],
8 | "continueBuildingAfterErrors" : false,
9 | "enableIndexBuildArena" : false,
10 | "hideShellScriptEnvironment" : false,
11 | "parameters" : {
12 | "action" : "build",
13 | "configurationName" : "Debug",
14 | "overrides" : {
15 | "commandLine" : {
16 | "table" : {
17 | "COMPILER_INDEX_STORE_ENABLE" : "NO",
18 | "FLUTTER_SUPPRESS_ANALYTICS" : "true",
19 | "SCRIPT_OUTPUT_STREAM_FILE" : "/var/folders/85/b90cyd197q98d8fd834f2mkr0000gn/T/flutter_tools.UBotKS/flutter_build_log_pipe.wMS0DJ/pipe_to_stdout",
20 | "SDKROOT" : "iphonesimulator14.5"
21 | }
22 | },
23 | "synthesized" : {
24 | "table" : {
25 | "ACTION" : "build",
26 | "ENABLE_PREVIEWS" : "NO"
27 | }
28 | }
29 | }
30 | },
31 | "schemeCommand" : "launch",
32 | "shouldCollectMetrics" : false,
33 | "showNonLoggedProgress" : true,
34 | "useDryRun" : false,
35 | "useImplicitDependencies" : false,
36 | "useLegacyBuildLocations" : false,
37 | "useParallelTargets" : false
38 | }
--------------------------------------------------------------------------------
/ios/build/XCBuildData/fbc6cd67855b3fa763c4f0085931aa2c-desc.xcbuild:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Py-Ec/cloudmate-classroom-flutter/d1d241a3416e19b192dfd9743e4ce12e0d05357f/ios/build/XCBuildData/fbc6cd67855b3fa763c4f0085931aa2c-desc.xcbuild
--------------------------------------------------------------------------------
/ios/build/XCBuildData/fbc6cd67855b3fa763c4f0085931aa2c-targetGraph 2.txt:
--------------------------------------------------------------------------------
1 | Target dependency graph (1 target)
2 | Runner in Runner
--------------------------------------------------------------------------------
/ios/build/XCBuildData/fbc6cd67855b3fa763c4f0085931aa2c-targetGraph.txt:
--------------------------------------------------------------------------------
1 | Target dependency graph (1 target)
2 | Runner in Runner
--------------------------------------------------------------------------------
/ios/clean-pods.sh:
--------------------------------------------------------------------------------
1 | rm -rf Pods
2 | rm -rf Podfile.lock
3 | flutter clean
4 | flutter pub get
5 | # pod install --repo-update
6 | arch -x86_64 pod install
7 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_core/firebase_core.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter/services.dart';
4 | import 'package:flutter_bloc/flutter_bloc.dart';
5 | import 'package:cloudmate/src/app.dart';
6 | import 'package:cloudmate/src/utils/logger.dart';
7 |
8 | void main() async {
9 | WidgetsFlutterBinding.ensureInitialized();
10 | await Firebase.initializeApp();
11 | Bloc.observer = AppBlocObserver();
12 | SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
13 | statusBarColor: Colors.transparent,
14 | statusBarBrightness: Brightness.dark,
15 | statusBarIconBrightness: Brightness.dark,
16 | ));
17 | runApp(MyApp());
18 | }
19 |
20 | class MyApp extends StatelessWidget {
21 | @override
22 | Widget build(BuildContext context) {
23 | return App();
24 | }
25 | }
26 |
27 | class AppBlocObserver extends BlocObserver {
28 | @override
29 | void onEvent(Bloc bloc, Object? event) {
30 | UtilLogger.log('BLOC EVENT', event);
31 | super.onEvent(bloc, event);
32 | }
33 |
34 | @override
35 | void onError(BlocBase bloc, Object error, StackTrace stackTrace) {
36 | UtilLogger.log('BLOC ERROR', error);
37 | super.onError(bloc, error, stackTrace);
38 | }
39 |
40 | @override
41 | void onTransition(Bloc bloc, Transition transition) {
42 | UtilLogger.log('BLOC TRANSITION', transition.event);
43 | super.onTransition(bloc, transition);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/lib/src/blocs/app_state/app_state_bloc 2.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:bloc/bloc.dart';
4 | import 'bloc.dart';
5 |
6 | class AppStateBloc extends Bloc {
7 | AppStateBloc() : super(AppStateInitial());
8 |
9 | @override
10 | Stream mapEventToState(AppStateEvent event) async* {
11 | if (event is OnResume) {
12 | yield Active();
13 |
14 | ///More Task
15 | }
16 | if (event is OnBackground) {
17 | yield Background();
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/lib/src/blocs/app_state/app_state_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:bloc/bloc.dart';
4 | import 'bloc.dart';
5 |
6 | class AppStateBloc extends Bloc {
7 | AppStateBloc() : super(AppStateInitial());
8 |
9 | @override
10 | Stream mapEventToState(AppStateEvent event) async* {
11 | if (event is OnResume) {
12 | yield Active();
13 |
14 | ///More Task
15 | }
16 | if (event is OnBackground) {
17 | yield Background();
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/lib/src/blocs/app_state/app_state_event 2.dart:
--------------------------------------------------------------------------------
1 | abstract class AppStateEvent {}
2 |
3 | class OnResume extends AppStateEvent {}
4 |
5 | class OnBackground extends AppStateEvent {}
6 |
7 | class OnUpdateDatabase extends AppStateEvent {}
8 |
--------------------------------------------------------------------------------
/lib/src/blocs/app_state/app_state_event.dart:
--------------------------------------------------------------------------------
1 | abstract class AppStateEvent {}
2 |
3 | class OnResume extends AppStateEvent {}
4 |
5 | class OnBackground extends AppStateEvent {}
6 |
7 | class OnUpdateDatabase extends AppStateEvent {}
8 |
--------------------------------------------------------------------------------
/lib/src/blocs/app_state/app_state_state.dart:
--------------------------------------------------------------------------------
1 | abstract class AppState {}
2 |
3 | class AppStateInitial extends AppState {}
4 |
5 | class Active extends AppState {}
6 |
7 | class Background extends AppState {}
8 |
--------------------------------------------------------------------------------
/lib/src/blocs/app_state/bloc.dart:
--------------------------------------------------------------------------------
1 | export 'app_state_bloc.dart';
2 | export 'app_state_event.dart';
3 | export 'app_state_state.dart';
4 |
--------------------------------------------------------------------------------
/lib/src/blocs/application/application_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'package:bloc/bloc.dart';
3 | import 'package:cloudmate/src/blocs/authentication/bloc.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:cloudmate/src/blocs/app_bloc.dart';
6 | import 'package:cloudmate/src/blocs/bloc.dart';
7 | import 'package:cloudmate/src/configs/application.dart';
8 | import 'package:cloudmate/src/themes/theme_service.dart';
9 |
10 | class ApplicationBloc extends Bloc {
11 | ApplicationBloc() : super(InitialApplicationState());
12 |
13 | @override
14 | Stream mapEventToState(event) async* {
15 | if (event is OnSetupApplication) {
16 | // Get themeMode
17 | await Application().initialAppLication();
18 | AppBloc.themeBloc.add(
19 | InitialTheme(
20 | themeMode: ThemeService().isSavedDarkMode() ? ThemeMode.dark : ThemeMode.light,
21 | ),
22 | );
23 |
24 | AppBloc.authBloc.add(OnAuthCheck());
25 |
26 | yield ApplicationCompleted();
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/src/blocs/application/application_event.dart:
--------------------------------------------------------------------------------
1 | abstract class ApplicationEvent {}
2 |
3 | ///Event setup application
4 | class OnSetupApplication extends ApplicationEvent {}
5 |
--------------------------------------------------------------------------------
/lib/src/blocs/application/application_state.dart:
--------------------------------------------------------------------------------
1 | abstract class ApplicationState {}
2 |
3 | class InitialApplicationState extends ApplicationState {}
4 |
5 | class ApplicationCompleted extends ApplicationState {}
6 |
--------------------------------------------------------------------------------
/lib/src/blocs/application/bloc.dart:
--------------------------------------------------------------------------------
1 | export 'application_bloc.dart';
2 | export 'application_event.dart';
3 | export 'application_state.dart';
4 |
--------------------------------------------------------------------------------
/lib/src/blocs/authentication/authentication_event.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | abstract class AuthEvent {}
4 |
5 | class OnAuthCheck extends AuthEvent {}
6 |
7 | class OnAuthProcess extends AuthEvent {
8 | final String username;
9 | final String password;
10 | OnAuthProcess({required this.username, required this.password});
11 | }
12 |
13 | class OnClear extends AuthEvent {}
14 |
15 | class RegisterEvent extends AuthEvent {
16 | final String firstName;
17 | final String lastName;
18 | final String username;
19 | final String password;
20 | RegisterEvent({
21 | required this.username,
22 | required this.password,
23 | required this.firstName,
24 | required this.lastName,
25 | });
26 | }
27 |
28 | class LoginEvent extends AuthEvent {
29 | final String username;
30 | final String password;
31 | LoginEvent({required this.username, required this.password});
32 | }
33 |
34 | class LogOutEvent extends AuthEvent {}
35 |
36 | class GetInfoUser extends AuthEvent {}
37 |
38 | class UpdateInfoUser extends AuthEvent {
39 | final String firstName;
40 | final String lastName;
41 | final String intro;
42 | final String phone;
43 | UpdateInfoUser({
44 | required this.firstName,
45 | required this.lastName,
46 | required this.intro,
47 | required this.phone,
48 | });
49 | }
50 |
51 | class UpdateAvatarUser extends AuthEvent {
52 | final File avatar;
53 | UpdateAvatarUser({required this.avatar});
54 | }
55 |
56 | class DeleteAccount extends AuthEvent {}
57 |
--------------------------------------------------------------------------------
/lib/src/blocs/authentication/authentication_state.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloudmate/src/models/user.dart';
2 |
3 | abstract class AuthState {}
4 |
5 | class InitialAuthenticationState extends AuthState {}
6 |
7 | class AuthenticationSuccess extends AuthState {
8 | UserModel? userModel;
9 | AuthenticationSuccess({this.userModel});
10 | }
11 |
12 | class AuthenticationFail extends AuthState {}
13 |
14 | class Authenticating extends AuthState {}
15 |
--------------------------------------------------------------------------------
/lib/src/blocs/authentication/bloc.dart:
--------------------------------------------------------------------------------
1 | export 'authentication_bloc.dart';
2 | export 'authentication_event.dart';
3 | export 'authentication_state.dart';
4 |
--------------------------------------------------------------------------------
/lib/src/blocs/bloc.dart:
--------------------------------------------------------------------------------
1 | export 'app_state/bloc.dart';
2 | export 'application/bloc.dart';
3 | export 'theme/bloc.dart';
4 |
--------------------------------------------------------------------------------
/lib/src/blocs/bloc/transaction_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'package:bloc/bloc.dart';
2 | import 'package:cloudmate/src/models/transaction_model.dart';
3 | import 'package:cloudmate/src/resources/remote/transaction_repository.dart';
4 | import 'package:meta/meta.dart';
5 |
6 | part 'transaction_event.dart';
7 | part 'transaction_state.dart';
8 |
9 | class TransactionBloc extends Bloc {
10 | TransactionBloc() : super(TransactionInitial());
11 |
12 | List transactions = [];
13 |
14 | @override
15 | Stream mapEventToState(TransactionEvent event) async* {
16 | if (event is GetTransactionEvent) {
17 | transactions.clear();
18 | yield TransactionInitial();
19 | await _getTransactions();
20 | yield GetDoneTransaction(transactions: transactions);
21 | }
22 | }
23 |
24 | // MARK: Private methods
25 | Future _getTransactions() async {
26 | List _transactions = await TransactionRepository().getTransactions();
27 |
28 | transactions.addAll(_transactions);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/src/blocs/bloc/transaction_event.dart:
--------------------------------------------------------------------------------
1 | part of 'transaction_bloc.dart';
2 |
3 | abstract class TransactionEvent {}
4 |
5 | class GetTransactionEvent extends TransactionEvent {}
6 |
--------------------------------------------------------------------------------
/lib/src/blocs/bloc/transaction_state.dart:
--------------------------------------------------------------------------------
1 | part of 'transaction_bloc.dart';
2 |
3 | @immutable
4 | abstract class TransactionState {}
5 |
6 | class TransactionInitial extends TransactionState {}
7 |
8 | class GetDoneTransaction extends TransactionState {
9 | final List transactions;
10 | GetDoneTransaction({required this.transactions});
11 | }
12 |
--------------------------------------------------------------------------------
/lib/src/blocs/conversation/conversation_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'package:bloc/bloc.dart';
2 | import 'package:cloudmate/src/models/conversation_model.dart';
3 | import 'package:cloudmate/src/models/message_model.dart';
4 | import 'package:cloudmate/src/resources/remote/conversation_repository.dart';
5 | import 'package:meta/meta.dart';
6 |
7 | part 'conversation_event.dart';
8 | part 'conversation_state.dart';
9 |
10 | class ConversationBloc extends Bloc {
11 | ConversationBloc() : super(ConversationInitial());
12 |
13 | List conversations = [];
14 | bool isOver = false;
15 |
16 | @override
17 | Stream mapEventToState(ConversationEvent event) async* {
18 | if (event is OnConversationEvent) {
19 | conversations.clear();
20 | if (conversations.isEmpty) {
21 | yield ConversationInitial();
22 | await _getConversations();
23 | }
24 | yield _getDoneConversation;
25 | }
26 |
27 | if (event is GetConversationEvent) {
28 | if (!isOver) {
29 | yield _gettingConversation;
30 | await _getConversations();
31 | yield _getDoneConversation;
32 | }
33 | }
34 |
35 | if (event is UpdateLatestMessageEvent) {
36 | int indexOfConversation =
37 | conversations.indexWhere((element) => element.idClass.id == event.message.idClass);
38 |
39 | if (indexOfConversation != -1) {
40 | conversations[indexOfConversation].latestMessage =
41 | LatestMessage.fromMessageModel(event.message);
42 |
43 | yield _getDoneConversation;
44 | }
45 | }
46 | }
47 |
48 | // MARK: Private methods
49 | GettingConversation get _gettingConversation => GettingConversation(conversations: conversations);
50 | GetDoneConversation get _getDoneConversation => GetDoneConversation(conversations: conversations);
51 |
52 | Future _getConversations() async {
53 | List _conversations = await ConversationRepository().getListClasses(
54 | skip: conversations.length,
55 | );
56 |
57 | if (_conversations.length < 10) {
58 | isOver = true;
59 | }
60 |
61 | conversations.addAll(_conversations);
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/lib/src/blocs/conversation/conversation_event.dart:
--------------------------------------------------------------------------------
1 | part of 'conversation_bloc.dart';
2 |
3 | @immutable
4 | abstract class ConversationEvent {}
5 |
6 | class OnConversationEvent extends ConversationEvent {}
7 |
8 | class GetConversationEvent extends ConversationEvent {}
9 |
10 | class UpdateLatestMessageEvent extends ConversationEvent {
11 | final MessageModel message;
12 | UpdateLatestMessageEvent({required this.message});
13 | }
14 |
--------------------------------------------------------------------------------
/lib/src/blocs/conversation/conversation_state.dart:
--------------------------------------------------------------------------------
1 | part of 'conversation_bloc.dart';
2 |
3 | @immutable
4 | abstract class ConversationState {
5 | List get props => [];
6 | }
7 |
8 | class ConversationInitial extends ConversationState {}
9 |
10 | class GettingConversation extends ConversationState {
11 | final List conversations;
12 | GettingConversation({required this.conversations});
13 |
14 | @override
15 | List get props => [conversations];
16 | }
17 |
18 | class GetDoneConversation extends ConversationState {
19 | final List conversations;
20 | GetDoneConversation({required this.conversations});
21 |
22 | @override
23 | List get props => [conversations];
24 | }
25 |
--------------------------------------------------------------------------------
/lib/src/blocs/count_down/count_down_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'package:bloc/bloc.dart';
2 | import 'package:cloudmate/src/blocs/app_bloc.dart';
3 | import 'package:cloudmate/src/ui/classes/blocs/do_exam/do_exam_bloc.dart';
4 | import 'package:meta/meta.dart';
5 |
6 | part 'count_down_event.dart';
7 | part 'count_down_state.dart';
8 |
9 | class CountDownBloc extends Bloc {
10 | CountDownBloc() : super(CountDownInitial());
11 |
12 | int duration = 30;
13 | bool flagTimer = false;
14 |
15 | @override
16 | Stream mapEventToState(CountDownEvent event) async* {
17 | if (event is StartCountDownEvent) {
18 | flagTimer = false;
19 | await _onStart();
20 | yield _inProgress;
21 | }
22 |
23 | if (event is ResetCountDownEvent) {
24 | flagTimer = false;
25 | duration = 30;
26 | yield _inProgress;
27 | await _onStart();
28 | }
29 |
30 | if (event is UpdateCountDownEvent) {
31 | await _onStart();
32 | yield _inProgress;
33 | }
34 |
35 | if (event is EndCountDownEvent) {
36 | flagTimer = true;
37 | duration = 30;
38 | yield CountDownInitial();
39 | }
40 | }
41 |
42 | // MARK: Private methods
43 | InProgressCountDown get _inProgress => InProgressCountDown(duration: duration);
44 |
45 | Future _onStart() async {
46 | if (!flagTimer) {
47 | await Future.delayed(Duration(seconds: 1), () {
48 | if (duration > 0) {
49 | duration--;
50 | }
51 | if (duration == 0) {
52 | if (AppBloc.doExamBloc.users
53 | .indexWhere((user) => user.id == AppBloc.authBloc.userModel?.id) ==
54 | -1) {
55 | AppBloc.doExamBloc.add(StartQuizEvent());
56 | } else {
57 | add(EndCountDownEvent());
58 | }
59 | } else {
60 | add(UpdateCountDownEvent());
61 | }
62 | });
63 | }
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/lib/src/blocs/count_down/count_down_event 2.dart:
--------------------------------------------------------------------------------
1 | part of 'count_down_bloc.dart';
2 |
3 | abstract class CountDownEvent {}
4 |
5 | class StartCountDownEvent extends CountDownEvent {}
6 |
7 | class ResetCountDownEvent extends CountDownEvent {}
8 |
9 | class UpdateCountDownEvent extends CountDownEvent {}
10 |
11 | class EndCountDownEvent extends CountDownEvent {}
12 |
--------------------------------------------------------------------------------
/lib/src/blocs/count_down/count_down_event.dart:
--------------------------------------------------------------------------------
1 | part of 'count_down_bloc.dart';
2 |
3 | abstract class CountDownEvent {}
4 |
5 | class StartCountDownEvent extends CountDownEvent {}
6 |
7 | class ResetCountDownEvent extends CountDownEvent {}
8 |
9 | class UpdateCountDownEvent extends CountDownEvent {}
10 |
11 | class EndCountDownEvent extends CountDownEvent {}
12 |
--------------------------------------------------------------------------------
/lib/src/blocs/count_down/count_down_state.dart:
--------------------------------------------------------------------------------
1 | part of 'count_down_bloc.dart';
2 |
3 | @immutable
4 | abstract class CountDownState {}
5 |
6 | class CountDownInitial extends CountDownState {}
7 |
8 | class InProgressCountDown extends CountDownState {
9 | final int duration;
10 | InProgressCountDown({required this.duration});
11 | }
12 |
--------------------------------------------------------------------------------
/lib/src/blocs/message/message_event.dart:
--------------------------------------------------------------------------------
1 | part of 'message_bloc.dart';
2 |
3 | @immutable
4 | abstract class MessageEvent {}
5 |
6 | class OnMessageEvent extends MessageEvent {
7 | final ConversationModel conversation;
8 | OnMessageEvent({required this.conversation});
9 | }
10 |
11 | class GetMessageEvent extends MessageEvent {}
12 |
13 | class SendMessageEvent extends MessageEvent {
14 | final String message;
15 | SendMessageEvent({required this.message});
16 | }
17 |
18 | class InsertMessageEvent extends MessageEvent {
19 | final MessageModel message;
20 | InsertMessageEvent({required this.message});
21 | }
22 |
--------------------------------------------------------------------------------
/lib/src/blocs/message/message_state.dart:
--------------------------------------------------------------------------------
1 | part of 'message_bloc.dart';
2 |
3 | @immutable
4 | abstract class MessageState {
5 | List get props => [];
6 | }
7 |
8 | class MessageInitial extends MessageState {}
9 |
10 | class GettingMessage extends MessageState {
11 | final List messages;
12 | GettingMessage({required this.messages});
13 |
14 | @override
15 | List get props => [messages];
16 | }
17 |
18 | class GetDoneMessage extends MessageState {
19 | final List messages;
20 | GetDoneMessage({required this.messages});
21 |
22 | @override
23 | List get props => [messages];
24 | }
25 |
--------------------------------------------------------------------------------
/lib/src/blocs/post_class/post_class_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'package:bloc/bloc.dart';
2 | import 'package:cloudmate/src/models/post_model.dart';
3 | import 'package:cloudmate/src/resources/remote/post_repository.dart';
4 | import 'package:meta/meta.dart';
5 |
6 | part 'post_class_event.dart';
7 | part 'post_class_state.dart';
8 |
9 | class PostClassBloc extends Bloc {
10 | PostClassBloc() : super(PostClassInitial());
11 |
12 | Map> postsClass = {};
13 | String currentClassId = '';
14 |
15 | @override
16 | Stream mapEventToState(PostClassEvent event) async* {
17 | if (event is GetPostClassEvent) {
18 | currentClassId = event.classId;
19 | await _getPosts();
20 | yield _getDonePostClass;
21 | }
22 |
23 | if (event is CleanPostClassEvent) {
24 | postsClass = {};
25 | yield PostClassInitial();
26 | }
27 | }
28 |
29 | // MARK: Private methods
30 | // GettingPostClass get _gettingPostClass => GettingPostClass(
31 | // posts: postsClass[currentClassId] ?? [],
32 | // );
33 | GetDonePostClass get _getDonePostClass => GetDonePostClass(
34 | posts: postsClass[currentClassId] ?? [],
35 | );
36 |
37 | Future _getPosts() async {
38 | List _posts = await PostRepository().getListPostClass(classId: currentClassId);
39 |
40 | postsClass[currentClassId] = _posts;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/lib/src/blocs/post_class/post_class_event.dart:
--------------------------------------------------------------------------------
1 | part of 'post_class_bloc.dart';
2 |
3 | @immutable
4 | abstract class PostClassEvent {}
5 |
6 | class GetPostClassEvent extends PostClassEvent {
7 | final String classId;
8 | GetPostClassEvent({required this.classId});
9 | }
10 |
11 | class CleanPostClassEvent extends PostClassEvent {}
12 |
--------------------------------------------------------------------------------
/lib/src/blocs/post_class/post_class_state.dart:
--------------------------------------------------------------------------------
1 | part of 'post_class_bloc.dart';
2 |
3 | @immutable
4 | abstract class PostClassState {
5 | List get props => [];
6 | }
7 |
8 | class PostClassInitial extends PostClassState {
9 | @override
10 | List get props => [[]];
11 | }
12 |
13 | class GettingPostClass extends PostClassState {
14 | final List posts;
15 | GettingPostClass({required this.posts});
16 |
17 | @override
18 | List get props => [posts];
19 | }
20 |
21 | class GetDonePostClass extends PostClassState {
22 | final List posts;
23 | GetDonePostClass({required this.posts});
24 |
25 | @override
26 | List get props => [posts];
27 | }
28 |
--------------------------------------------------------------------------------
/lib/src/blocs/post_home/post_home_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'package:bloc/bloc.dart';
2 | import 'package:cloudmate/src/models/post_model.dart';
3 | import 'package:cloudmate/src/resources/remote/post_repository.dart';
4 | import 'package:cloudmate/src/routes/app_pages.dart';
5 | import 'package:meta/meta.dart';
6 |
7 | part 'post_home_event.dart';
8 | part 'post_home_state.dart';
9 |
10 | class PostHomeBloc extends Bloc {
11 | PostHomeBloc() : super(PostHomeInitial());
12 |
13 | List posts = [];
14 | bool isOver = false;
15 |
16 | @override
17 | Stream mapEventToState(PostHomeEvent event) async* {
18 | if (event is OnPostHomeEvent) {
19 | posts = [];
20 | isOver = false;
21 | if (posts.isEmpty) {
22 | await _getPosts();
23 | yield _getDonePostHome;
24 | }
25 | }
26 |
27 | if (event is GetPostHomeEvent) {
28 | if (!isOver) {
29 | yield _gettingPostHome;
30 | await _getPosts();
31 | yield _getDonePostHome;
32 | }
33 | }
34 |
35 | if (event is CreatePostHomeEvent) {
36 | for (int index = 0; index < event.classChooses.length; index++) {
37 | PostModel? post = await PostRepository().createPost(
38 | content: event.content,
39 | classId: event.classChooses[index],
40 | );
41 |
42 | if (post != null) {
43 | posts.insert(0, post);
44 | yield _getDonePostHome;
45 | }
46 | }
47 |
48 | AppNavigator.pop();
49 | }
50 |
51 | if (event is CleanPostHomeEvent) {
52 | yield PostHomeInitial();
53 | }
54 | }
55 |
56 | // MARK: Private methods
57 | GettingPostHome get _gettingPostHome => GettingPostHome(posts: posts);
58 | GetDonePostHome get _getDonePostHome => GetDonePostHome(posts: posts);
59 |
60 | Future _getPosts() async {
61 | List _posts = await PostRepository().getListPostHome();
62 |
63 | if (_posts.length < 15) {
64 | isOver = true;
65 | }
66 |
67 | posts.addAll(_posts);
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/lib/src/blocs/post_home/post_home_event.dart:
--------------------------------------------------------------------------------
1 | part of 'post_home_bloc.dart';
2 |
3 | @immutable
4 | abstract class PostHomeEvent {}
5 |
6 | class OnPostHomeEvent extends PostHomeEvent {}
7 |
8 | class GetPostHomeEvent extends PostHomeEvent {}
9 |
10 | class CreatePostHomeEvent extends PostHomeEvent {
11 | final List classChooses;
12 | final String content;
13 | CreatePostHomeEvent({required this.classChooses, required this.content});
14 | }
15 |
16 | class CleanPostHomeEvent extends PostHomeEvent {}
17 |
--------------------------------------------------------------------------------
/lib/src/blocs/post_home/post_home_state.dart:
--------------------------------------------------------------------------------
1 | part of 'post_home_bloc.dart';
2 |
3 | @immutable
4 | abstract class PostHomeState {
5 | List get props => [];
6 | }
7 |
8 | class PostHomeInitial extends PostHomeState {
9 | @override
10 | List get props => [[]];
11 | }
12 |
13 | class GettingPostHome extends PostHomeState {
14 | final List posts;
15 | GettingPostHome({required this.posts});
16 |
17 | @override
18 | List get props => [posts];
19 | }
20 |
21 | class GetDonePostHome extends PostHomeState {
22 | final List posts;
23 | GetDonePostHome({required this.posts});
24 |
25 | @override
26 | List get props => [posts];
27 | }
28 |
--------------------------------------------------------------------------------
/lib/src/blocs/schedules/schedules_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'package:bloc/bloc.dart';
2 | import 'package:cloudmate/src/helpers/date_time_helper.dart';
3 | import 'package:cloudmate/src/models/road_map_content_model.dart';
4 | import 'package:cloudmate/src/resources/remote/road_map_content_repository.dart';
5 | import 'package:intl/intl.dart';
6 | import 'package:meta/meta.dart';
7 |
8 | part 'schedules_event.dart';
9 | part 'schedules_state.dart';
10 |
11 | class SchedulesBloc extends Bloc {
12 | SchedulesBloc() : super(SchedulesInitial());
13 |
14 | Map> roadmapContentMap = {};
15 | DateTime _currentDate = DateTime.now();
16 |
17 | @override
18 | Stream mapEventToState(SchedulesEvent event) async* {
19 | if (event is GetScheduleEvent) {
20 | _currentDate = event.currentDate;
21 | String date = DateFormat('MM/yyyy').format(event.currentDate);
22 |
23 | if (roadmapContentMap[date] == null || roadmapContentMap[date]!.isEmpty) {
24 | List _roadmapContent = await RoadMapContentRepository().getSchedules(
25 | month: event.currentDate.month.toString(),
26 | year: event.currentDate.year.toString(),
27 | );
28 |
29 | roadmapContentMap[date] = _roadmapContent;
30 | }
31 |
32 | yield GetScheduleDone(roadmapContent: getByDate());
33 | }
34 |
35 | if (event is CleanScheduleEvent) {
36 | roadmapContentMap = {};
37 | yield SchedulesInitial();
38 | }
39 | }
40 |
41 | List getByDate() {
42 | List roadMapContents =
43 | roadmapContentMap[DateFormat('MM/yyyy').format(_currentDate)] ?? [];
44 |
45 | return roadMapContents
46 | .where((request) => isEqualTwoDate(_currentDate, request.endTime))
47 | .toList();
48 | }
49 |
50 | int quantityPerDate(DateTime date) {
51 | List roadMapContents =
52 | roadmapContentMap[DateFormat('MM/yyyy').format(date)] ?? [];
53 | int quantity =
54 | roadMapContents.where((request) => isEqualTwoDate(date, request.endTime)).toList().length;
55 | return quantity >= 3 ? 3 : quantity;
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/lib/src/blocs/schedules/schedules_event.dart:
--------------------------------------------------------------------------------
1 | part of 'schedules_bloc.dart';
2 |
3 | @immutable
4 | abstract class SchedulesEvent {}
5 |
6 | class GetScheduleEvent extends SchedulesEvent {
7 | final DateTime currentDate;
8 | GetScheduleEvent({required this.currentDate});
9 | }
10 |
11 | class CleanScheduleEvent extends SchedulesEvent {}
12 |
--------------------------------------------------------------------------------
/lib/src/blocs/schedules/schedules_state.dart:
--------------------------------------------------------------------------------
1 | part of 'schedules_bloc.dart';
2 |
3 | @immutable
4 | abstract class SchedulesState {}
5 |
6 | class SchedulesInitial extends SchedulesState {}
7 |
8 | class GetScheduleDone extends SchedulesState {
9 | final List roadmapContent;
10 | GetScheduleDone({required this.roadmapContent});
11 | }
12 |
--------------------------------------------------------------------------------
/lib/src/blocs/share_exam/share_exam_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'package:bloc/bloc.dart';
2 | import 'package:cloudmate/src/models/exam_model.dart';
3 | import 'package:cloudmate/src/resources/remote/share_exam_repository.dart';
4 | import 'package:cloudmate/src/routes/app_pages.dart';
5 | import 'package:flutter/material.dart';
6 | part 'share_exam_event.dart';
7 | part 'share_exam_state.dart';
8 |
9 | class ShareExamBloc extends Bloc {
10 | ShareExamBloc() : super(ShareExamInitial());
11 |
12 | List exams = [];
13 |
14 | @override
15 | Stream mapEventToState(ShareExamEvent event) async* {
16 | if (event is GetShareExamEvent) {
17 | if (exams.isEmpty) {
18 | await _getExams();
19 | yield _getDoneShareExam;
20 | }
21 | }
22 |
23 | if (event is CreateShareExamEvent) {
24 | await _createExam(event);
25 | yield _getDoneShareExam;
26 | }
27 | }
28 |
29 | // MARK: Private methods
30 | GetDoneShareExam get _getDoneShareExam => GetDoneShareExam(exams: exams);
31 |
32 | Future _getExams() async {
33 | List _exams = await ShareExamRepository().getListExam();
34 |
35 | exams.addAll(_exams);
36 | }
37 |
38 | Future _createExam(CreateShareExamEvent event) async {
39 | ExamModel? _exam = await ShareExamRepository().createExam(
40 | name: event.name,
41 | description: event.description,
42 | );
43 |
44 | AppNavigator.pop();
45 |
46 | if (_exam != null) {
47 | exams.add(_exam);
48 | AppNavigator.pop();
49 | } else {
50 | // Show dialog failure
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/lib/src/blocs/share_exam/share_exam_event.dart:
--------------------------------------------------------------------------------
1 | part of 'share_exam_bloc.dart';
2 |
3 | @immutable
4 | abstract class ShareExamEvent {}
5 |
6 | class GetShareExamEvent extends ShareExamEvent {}
7 |
8 | class CreateShareExamEvent extends ShareExamEvent {
9 | final BuildContext context;
10 | final String name;
11 | final String description;
12 | CreateShareExamEvent({
13 | required this.context,
14 | required this.name,
15 | required this.description,
16 | });
17 | }
18 |
--------------------------------------------------------------------------------
/lib/src/blocs/share_exam/share_exam_state.dart:
--------------------------------------------------------------------------------
1 | part of 'share_exam_bloc.dart';
2 |
3 | @immutable
4 | abstract class ShareExamState {}
5 |
6 | class ShareExamInitial extends ShareExamState {}
7 |
8 | class GetDoneShareExam extends ShareExamState {
9 | final List exams;
10 | GetDoneShareExam({required this.exams});
11 | }
12 |
--------------------------------------------------------------------------------
/lib/src/blocs/theme/bloc.dart:
--------------------------------------------------------------------------------
1 | export 'theme_bloc.dart';
2 | export 'theme_event.dart';
3 | export 'theme_state.dart';
4 |
--------------------------------------------------------------------------------
/lib/src/blocs/theme/theme_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'package:bloc/bloc.dart';
3 | import 'package:cloudmate/src/themes/theme_service.dart';
4 | import 'bloc.dart';
5 |
6 | class ThemeBloc extends Bloc {
7 | ThemeBloc() : super(InitialThemeState());
8 |
9 | @override
10 | Stream mapEventToState(event) async* {
11 | if (event is InitialTheme) {
12 | yield ThemeUpdating();
13 | ThemeService.currentTheme = event.themeMode ?? ThemeService.currentTheme;
14 | ThemeService().switchStatusColor();
15 | yield ThemeUpdated();
16 | }
17 |
18 | if (event is OnChangeTheme) {
19 | yield ThemeUpdating();
20 | ThemeService.currentTheme = event.themeMode ?? ThemeService.currentTheme;
21 | ThemeService().changeThemeMode();
22 | yield ThemeUpdated();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/lib/src/blocs/theme/theme_event.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | abstract class ThemeEvent {}
4 |
5 | class InitialTheme extends ThemeEvent {
6 | final ThemeMode? themeMode;
7 |
8 | InitialTheme({
9 | this.themeMode,
10 | });
11 | }
12 |
13 | class OnChangeTheme extends ThemeEvent {
14 | final ThemeMode? themeMode;
15 |
16 | OnChangeTheme({
17 | this.themeMode,
18 | });
19 | }
20 |
--------------------------------------------------------------------------------
/lib/src/blocs/theme/theme_state.dart:
--------------------------------------------------------------------------------
1 | abstract class ThemeState {}
2 |
3 | class InitialThemeState extends ThemeState {}
4 |
5 | class ThemeUpdating extends ThemeState {}
6 |
7 | class ThemeUpdated extends ThemeState {}
8 |
--------------------------------------------------------------------------------
/lib/src/configs/application.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloudmate/src/services/firebase_messaging/handle_messaging.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:get_storage/get_storage.dart';
4 |
5 | class Application {
6 | /// [Production - Dev]
7 | static String version = '1.0.0';
8 | static String baseUrl = '';
9 | static String imageUrl = '';
10 | static String socketUrl = '';
11 | static String mode = '';
12 | static bool isProductionMode = true;
13 |
14 | Future initialAppLication() async {
15 | try {
16 | await GetStorage.init();
17 | baseUrl = 'https://services.streamos.tk/';
18 | imageUrl = baseUrl + 'api/up-load-file?id=';
19 | socketUrl = 'https://services.streamos.tk/';
20 | mode = 'PRODUCTION';
21 | requestPermission();
22 | handleReceiveNotification();
23 | } catch (error) {
24 | debugPrint(error.toString());
25 | }
26 | }
27 |
28 | ///Singleton factory
29 | static final Application _instance = Application._internal();
30 |
31 | factory Application() {
32 | return _instance;
33 | }
34 |
35 | Application._internal();
36 | }
37 |
--------------------------------------------------------------------------------
/lib/src/configs/language.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class AppLanguage {
4 | ///Default Language
5 | static Locale defaultLanguage = Locale("vi");
6 |
7 | ///List Language support in Application
8 | static List supportLanguage = [
9 | Locale("en"),
10 | Locale("vi"),
11 | Locale("da"),
12 | Locale("de"),
13 | Locale("el"),
14 | Locale("fr"),
15 | Locale("id"),
16 | Locale("ja"),
17 | Locale("ko"),
18 | Locale("nl"),
19 | Locale("zh"),
20 | Locale("ru"),
21 | ];
22 |
23 | ///Singleton factory
24 | static final AppLanguage _instance = AppLanguage._internal();
25 |
26 | factory AppLanguage() {
27 | return _instance;
28 | }
29 |
30 | AppLanguage._internal();
31 | }
32 |
--------------------------------------------------------------------------------
/lib/src/helpers/audio_helper.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'package:just_audio/just_audio.dart';
3 |
4 | class AudioHelper {
5 | static AudioPlayer player = AudioPlayer();
6 |
7 | static StreamController bufferedController = StreamController.broadcast();
8 |
9 | Future soundAndRing(String url) async {
10 | player = AudioPlayer();
11 |
12 | try {
13 | if (player.playing) {
14 | player.stop();
15 | }
16 | await player.setUrl(url);
17 | player.setVolume(1);
18 | player.play();
19 |
20 | player.bufferedPositionStream.listen((event) {
21 | print('BUFFERED: $event');
22 | bufferedController.add(event);
23 | });
24 |
25 | player.durationStream.listen((event) {
26 | print('DURATION: $event');
27 | });
28 |
29 | player.positionStream.listen((event) {
30 | print('POSITION: $event');
31 | });
32 |
33 | player.setLoopMode(LoopMode.off);
34 | } catch (error) {
35 | print('audio error: ${error.toString()}');
36 | }
37 | }
38 |
39 | // Stream get positionDataStream =>
40 | // Rx.combineLatest3(
41 | // player.positionStream,
42 | // player.bufferedPositionStream,
43 | // player.durationStream,
44 | // (position, bufferedPosition, duration) =>
45 | // PositionData(position, bufferedPosition, duration ?? Duration.zero));
46 | }
47 |
48 | class PositionData {
49 | Duration position;
50 | Duration duration;
51 | Duration bufferedPosition;
52 |
53 | PositionData(this.position, this.bufferedPosition, this.duration);
54 |
55 | @override
56 | String toString() {
57 | return 'PositionData{position: ${position.toString()}, duration: ${duration.toString()}, bufferedPosition: ${bufferedPosition}}';
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/lib/src/helpers/device_helper.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:cloudmate/src/models/device_model.dart';
4 | import 'package:cloudmate/src/services/firebase_messaging/handle_messaging.dart';
5 | import 'package:device_info/device_info.dart';
6 | import 'package:flutter/services.dart';
7 |
8 | Future getDeviceDetails() async {
9 | late String deviceName;
10 | // late String deviceVersion;
11 | late String identifier;
12 | late String appVersion;
13 | final String? fcmToken = await getFirebaseMessagingToken();
14 | print(fcmToken);
15 | final DeviceInfoPlugin deviceInfoPlugin = new DeviceInfoPlugin();
16 | try {
17 | if (Platform.isAndroid) {
18 | var build = await deviceInfoPlugin.androidInfo;
19 | deviceName = build.model;
20 | // deviceVersion = build.version.toString();
21 | identifier = build.androidId; //UUID for Android
22 | appVersion = "1.0.0";
23 | } else if (Platform.isIOS) {
24 | var data = await deviceInfoPlugin.iosInfo;
25 | deviceName = data.name;
26 | // deviceVersion = data.systemVersion;
27 | identifier = data.identifierForVendor; //UUID for iOS
28 | appVersion = "1.0.0";
29 | }
30 | } on PlatformException {
31 | print('Failed to get platform version');
32 | }
33 | return DeviceModel(
34 | appVersion: appVersion,
35 | deviceModel: deviceName,
36 | deviceUUid: identifier,
37 | fcmToken: fcmToken!,
38 | );
39 | }
40 |
--------------------------------------------------------------------------------
/lib/src/helpers/int.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloudmate/src/themes/app_colors.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | extension IntHelper on int {
5 | String formatTwoDigits() {
6 | Duration duration = Duration(seconds: this);
7 | String twoDigits(int n) => n.toString().padLeft(2, "0");
8 | String twoDigitMinutes = twoDigits(duration.inMinutes.remainder(60));
9 | String twoDigitSeconds = twoDigits(duration.inSeconds.remainder(60));
10 | return "${twoDigits(duration.inHours)}:$twoDigitMinutes:$twoDigitSeconds";
11 | }
12 |
13 | Color getColorByPing() {
14 | if (this < 200) {
15 | return colorActive;
16 | } else if (this < 400) {
17 | return colorMedium;
18 | } else {
19 | return colorHigh;
20 | }
21 | }
22 |
23 | String getRoleName() {
24 | switch (this) {
25 | case 0:
26 | return "Thành viên";
27 | case 1:
28 | return "Admin";
29 | default:
30 | return "Quản lí";
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/lib/src/helpers/members_helpers.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloudmate/src/blocs/app_bloc.dart';
2 | import 'package:cloudmate/src/models/user.dart';
3 |
4 | class MembersHelper {
5 | List getMembers(List users) {
6 | String userId = AppBloc.authBloc.userModel!.id;
7 | return users.where((user) => user.id != userId && user.role == 0).toList();
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/lib/src/helpers/path_helper.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 | import 'package:flutter/services.dart';
3 | import 'package:path_provider/path_provider.dart' as path_provider;
4 |
5 | class PathHelper {
6 | static Future deleteCacheImageDir(String path) async {
7 | final cacheDir = Directory(path);
8 | if (cacheDir.existsSync()) {
9 | cacheDir.deleteSync(recursive: true);
10 | }
11 | }
12 |
13 | static Future get tempDir async => await path_provider.getTemporaryDirectory();
14 |
15 | static Future get appDir async =>
16 | await path_provider.getApplicationDocumentsDirectory();
17 |
18 | static Future get downloadsDir async {
19 | Directory downloadsDirectory;
20 | try {
21 | if (Platform.isIOS) {
22 | downloadsDirectory = await path_provider.getApplicationDocumentsDirectory();
23 | } else {
24 | downloadsDirectory = await path_provider.getApplicationSupportDirectory();
25 | }
26 |
27 | return downloadsDirectory;
28 | } on PlatformException {
29 | print('Could not get the downloads directory');
30 | return null;
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/lib/src/helpers/role_helper.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloudmate/src/blocs/app_bloc.dart';
2 | import 'package:cloudmate/src/models/user.dart';
3 |
4 | class RoleHelper {
5 | bool canShowOptionReport(List members, String createdBy) {
6 | String userId = AppBloc.authBloc.userModel!.id;
7 | List memberIds = members.map((m) => m.id).toList();
8 | if (memberIds.contains(userId) && userId != createdBy) {
9 | return true;
10 | }
11 | return false;
12 | }
13 |
14 | bool canShowDrawerClass(List members, String createdBy) {
15 | String userId = AppBloc.authBloc.userModel!.id;
16 | List memberIds = members.map((m) => m.id).toList();
17 | if (memberIds.contains(userId) || userId == createdBy) {
18 | return true;
19 | }
20 | return false;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/src/helpers/string.dart:
--------------------------------------------------------------------------------
1 | extension StringHelper on String {
2 | String limitLength(int length) {
3 | String input = this;
4 | return input.toString().length <= length
5 | ? input
6 | : input.toString().substring(0, length - 2) + '..';
7 | }
8 |
9 | formatMoney({String splitBy = ','}) {
10 | String result = '';
11 | int count = 0;
12 | for (int i = this.length - 1; i >= 0; i--) {
13 | if (count == 3) {
14 | count = 1;
15 | result += splitBy;
16 | } else {
17 | count++;
18 | }
19 | result += this[i];
20 | }
21 | String formatMoney = '';
22 | for (int i = result.length - 1; i >= 0; i--) {
23 | formatMoney += result[i];
24 | }
25 | return formatMoney;
26 | }
27 |
28 | String formatName(int length) {
29 | String name = this;
30 | List names = name.split(' ');
31 | switch (names.length) {
32 | case 1:
33 | return name;
34 | case 2:
35 | return name;
36 | case 3:
37 | if (name.length > length) {
38 | names.removeAt(1);
39 | return names.join(' ');
40 | } else {
41 | return name;
42 | }
43 | case 4:
44 | if (name.length > length) {
45 | names.removeAt(1);
46 | names.removeAt(1);
47 | return names.join(' ');
48 | } else {
49 | return name;
50 | }
51 | default:
52 | if (name.length > length) {
53 | names.removeAt(1);
54 | names.removeAt(1);
55 | names.removeAt(1);
56 | return names.join(' ');
57 | } else {
58 | return name;
59 | }
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/lib/src/helpers/validators/login_validator 2.dart:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/src/helpers/validators/login_validator.dart:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/src/lang/language_service.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:get_storage/get_storage.dart';
3 | import 'package:i18n_extension/i18n_widget.dart';
4 |
5 | class LanguageService {
6 | final _getStorage = GetStorage();
7 | final storageKey = 'locale';
8 |
9 | String getLocale() {
10 | return _getStorage.read(storageKey) ?? 'vi_vn';
11 | }
12 |
13 | Future saveLocale(String locale) async {
14 | await _getStorage.write(storageKey, locale);
15 | }
16 |
17 | switchLanguage(context) async {
18 | await saveLocale(((I18n.localeStr == "vi_vn") ? "en_us" : "vi_vn"));
19 | I18n.of(context).locale =
20 | (I18n.localeStr == "vi_vn") ? null : const Locale("vi", "VN");
21 | }
22 |
23 | initialLanguage(context) {
24 | String localeStr = getLocale();
25 | if (localeStr == "vi_vn") {
26 | I18n.of(context).locale = Locale("vi", "VN");
27 | } else {
28 | I18n.of(context).locale = null;
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/lib/src/lang/localization.dart:
--------------------------------------------------------------------------------
1 | import 'package:i18n_extension/i18n_extension.dart';
2 |
3 | const classTitle = 'class';
4 | const yourClass = 'yourClass';
5 | const recommendClass = 'recommendClass';
6 |
7 | extension Localization on String {
8 | static final _t = Translations.from("en_us", {
9 | classTitle: {
10 | "en_us": "Lớp học",
11 | "vi_vn": "Lớp học",
12 | },
13 | yourClass: {
14 | "en_us": "Lớp học của bạn",
15 | "vi_vn": "Lớp học của bạn",
16 | },
17 | recommendClass: {
18 | "en_us": "Lớp học đề xuất",
19 | "vi_vn": "Lớp học đề xuất",
20 | }
21 | });
22 |
23 | String get i18n => localize(this, _t);
24 |
25 | String fill(List