├── .fvmrc
├── .github
└── workflows
│ ├── ci.workflow.yml
│ ├── deploy.dev.workflow.yml
│ ├── deploy.workflow.yml
│ ├── firebase-hosting-merge.yml
│ ├── firebase-hosting-pull-request.yml
│ └── page.workflow.yml
├── .gitignore
├── CHANGELOG.md
├── README.md
├── analysis_options.yaml
├── apps
└── example
│ ├── .gitignore
│ ├── .metadata
│ ├── README.md
│ ├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── me
│ │ │ │ │ └── rainvisitor
│ │ │ │ │ └── ap_common_example
│ │ │ │ │ └── MainActivity.kt
│ │ │ ├── res
│ │ │ │ ├── drawable-hdpi
│ │ │ │ │ └── ic_stat_name.png
│ │ │ │ ├── drawable-mdpi
│ │ │ │ │ └── ic_stat_name.png
│ │ │ │ ├── drawable-v24
│ │ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── drawable-xhdpi
│ │ │ │ │ └── ic_stat_name.png
│ │ │ │ ├── drawable-xxhdpi
│ │ │ │ │ └── ic_stat_name.png
│ │ │ │ ├── drawable-xxxhdpi
│ │ │ │ │ └── ic_stat_name.png
│ │ │ │ ├── drawable
│ │ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ │ ├── ic_launcher.xml
│ │ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ └── values
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ └── styles.xml
│ │ │ └── values-zh-rTW
│ │ │ │ └── strings.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ ├── settings.gradle
│ └── settings_aar.gradle
│ ├── assets
│ ├── coursetable.json
│ ├── images
│ │ ├── K.webp
│ │ ├── drawer-icon.webp
│ │ ├── kuasap.webp
│ │ ├── kuasap2.webp
│ │ ├── kuasap3.webp
│ │ ├── kuasap_text.webp
│ │ ├── section_first1.webp
│ │ ├── section_first2.webp
│ │ ├── section_jiangong.webp
│ │ ├── section_nanzi.webp
│ │ ├── section_qijin.webp
│ │ └── section_yanchao.webp
│ ├── notifications.json
│ ├── scores.json
│ ├── semesters.json
│ └── user_info.json
│ ├── ios
│ ├── .gitignore
│ ├── CourseAppWidget
│ │ ├── Assets.xcassets
│ │ │ ├── AccentColor.colorset
│ │ │ │ └── Contents.json
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ ├── Contents.json
│ │ │ └── WidgetBackground.colorset
│ │ │ │ └── Contents.json
│ │ ├── CourseAppWidget.intentdefinition
│ │ ├── CourseAppWidget.swift
│ │ ├── CourseData.swift
│ │ └── Info.plist
│ ├── CourseAppWidgetExtension.entitlements
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Podfile
│ ├── Podfile.lock
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ ├── Runner-Bridging-Header.h
│ │ └── Runner.entitlements
│ ├── lib
│ ├── app.dart
│ ├── config
│ │ └── constants.dart
│ ├── l10n
│ │ ├── intl
│ │ │ ├── messages_all.dart
│ │ │ ├── messages_en.dart
│ │ │ └── messages_zh_TW.dart
│ │ ├── intl_en.arb
│ │ ├── intl_zh_TW.arb
│ │ └── l10n.dart
│ ├── main.dart
│ ├── pages
│ │ ├── diolog_utils_page.dart
│ │ ├── home_page.dart
│ │ ├── login_page.dart
│ │ ├── notification_utils_page.dart
│ │ ├── setting_page.dart
│ │ ├── shcool_info_page.dart
│ │ ├── study
│ │ │ ├── course_page.dart
│ │ │ └── score_page.dart
│ │ └── user_info_page.dart
│ ├── res
│ │ └── assets.dart
│ ├── utils
│ │ └── app_localizations.dart
│ └── widgets
│ │ └── share_data_widget.dart
│ ├── linux
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── flutter
│ │ ├── CMakeLists.txt
│ │ ├── generated_plugin_registrant.cc
│ │ ├── generated_plugin_registrant.h
│ │ └── generated_plugins.cmake
│ ├── main.cc
│ ├── my_application.cc
│ └── my_application.h
│ ├── macos
│ ├── .gitignore
│ ├── Flutter
│ │ ├── Flutter-Debug.xcconfig
│ │ ├── Flutter-Release.xcconfig
│ │ └── GeneratedPluginRegistrant.swift
│ ├── Podfile
│ ├── Podfile.lock
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── app_icon_1024.png
│ │ │ ├── app_icon_128.png
│ │ │ ├── app_icon_16.png
│ │ │ ├── app_icon_256.png
│ │ │ ├── app_icon_32.png
│ │ │ ├── app_icon_512.png
│ │ │ └── app_icon_64.png
│ │ ├── Base.lproj
│ │ └── MainMenu.xib
│ │ ├── Configs
│ │ ├── AppInfo.xcconfig
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── Warnings.xcconfig
│ │ ├── DebugProfile.entitlements
│ │ ├── Info.plist
│ │ ├── MainFlutterWindow.swift
│ │ └── Release.entitlements
│ ├── pubspec.lock
│ ├── pubspec.yaml
│ ├── pubspec_overrides.yaml
│ ├── web
│ ├── favicon.ico
│ ├── icons
│ │ ├── Icon-192.png
│ │ ├── Icon-512.png
│ │ ├── Icon-maskable-192.png
│ │ └── Icon-maskable-512.png
│ ├── index.html
│ └── manifest.json
│ └── windows
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
│ └── runner
│ ├── CMakeLists.txt
│ ├── Runner.rc
│ ├── flutter_window.cpp
│ ├── flutter_window.h
│ ├── main.cpp
│ ├── resource.h
│ ├── resources
│ └── app_icon.ico
│ ├── runner.exe.manifest
│ ├── utils.cpp
│ ├── utils.h
│ ├── win32_window.cpp
│ └── win32_window.h
├── melos.yaml
├── melos_ap_common.iml
├── packages
├── ap_common
│ ├── .fvmrc
│ ├── .gitignore
│ ├── .metadata
│ ├── .pubignore
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── RELEASE_NOTE.md
│ ├── build.yaml
│ ├── fetch_i18n.sh
│ ├── lib
│ │ └── ap_common.dart
│ ├── pubspec.yaml
│ ├── spider.yaml
│ └── test
│ │ └── model_test.dart
├── ap_common_announcement_ui
│ ├── .gitignore
│ ├── .metadata
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── lib
│ │ ├── ap_common_announcement_ui.dart
│ │ └── src
│ │ │ ├── api
│ │ │ ├── announcement_helper.dart
│ │ │ ├── github_helper.dart
│ │ │ └── imgur_helper.dart
│ │ │ └── ui
│ │ │ ├── announcement_content_page.dart
│ │ │ ├── black_list_page.dart
│ │ │ ├── edit_page.dart
│ │ │ └── home_page.dart
│ └── pubspec.yaml
├── ap_common_core
│ ├── .gitignore
│ ├── .metadata
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── build.yaml
│ ├── lib
│ │ ├── ap_common_core.dart
│ │ ├── injector.dart
│ │ └── src
│ │ │ ├── config
│ │ │ ├── analytics_constants.dart
│ │ │ └── ap_constants.dart
│ │ │ ├── mock_util.dart
│ │ │ ├── models
│ │ │ ├── announcement_data.dart
│ │ │ ├── announcement_data.g.dart
│ │ │ ├── announcement_login_data.dart
│ │ │ ├── announcement_login_data.g.dart
│ │ │ ├── ap_support_language.dart
│ │ │ ├── course_data.dart
│ │ │ ├── course_data.g.dart
│ │ │ ├── course_notify_data.dart
│ │ │ ├── course_notify_data.g.dart
│ │ │ ├── general_response.dart
│ │ │ ├── general_response.g.dart
│ │ │ ├── imgur_upload_response.dart
│ │ │ ├── imgur_upload_response.g.dart
│ │ │ ├── notification_data.dart
│ │ │ ├── notification_data.g.dart
│ │ │ ├── phone_model.dart
│ │ │ ├── private_cookies_manager.dart
│ │ │ ├── score_data.dart
│ │ │ ├── score_data.g.dart
│ │ │ ├── semester_data.dart
│ │ │ ├── semester_data.g.dart
│ │ │ ├── time_code.dart
│ │ │ ├── time_code.g.dart
│ │ │ ├── user_info.dart
│ │ │ ├── user_info.g.dart
│ │ │ └── version_info.dart
│ │ │ └── utilities
│ │ │ ├── analytics_utils.dart
│ │ │ ├── cloud_message_utils.dart
│ │ │ ├── crashlytics_utils.dart
│ │ │ └── preference_util.dart
│ └── pubspec.yaml
├── ap_common_firebase
│ ├── .gitignore
│ ├── .metadata
│ ├── .pubignore
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── RELEASE_NOTE.md
│ ├── lib
│ │ ├── ap_common_firebase.dart
│ │ └── src
│ │ │ └── utils
│ │ │ ├── firebase_analytics_utils.dart
│ │ │ ├── firebase_crashlytics_utils.dart
│ │ │ ├── firebase_message_utils.dart
│ │ │ ├── firebase_performance_utils.dart
│ │ │ ├── firebase_remote_config_utils.dart
│ │ │ └── firebase_utils.dart
│ └── pubspec.yaml
├── ap_common_flutter_core
│ ├── .gitignore
│ ├── .metadata
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── lib
│ │ ├── ap_common_flutter_core.dart
│ │ └── src
│ │ │ ├── callback
│ │ │ └── general_callback.dart
│ │ │ ├── l10n
│ │ │ ├── ap_localizations.dart
│ │ │ ├── intl
│ │ │ │ ├── messages_all.dart
│ │ │ │ ├── messages_en.dart
│ │ │ │ └── messages_zh_TW.dart
│ │ │ ├── intl_en.arb
│ │ │ ├── intl_zh_TW.arb
│ │ │ └── l10n.dart
│ │ │ ├── models
│ │ │ └── general_permission_status.dart
│ │ │ ├── ui
│ │ │ └── ap_icon.dart
│ │ │ └── utilities
│ │ │ ├── app_store_util.dart
│ │ │ ├── media_util.dart
│ │ │ ├── notification_util.dart
│ │ │ ├── platform_calendar_util.dart
│ │ │ ├── platform_util.dart
│ │ │ └── ui_util.dart
│ └── pubspec.yaml
├── ap_common_flutter_platform
│ ├── .gitignore
│ ├── .metadata
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── lib
│ │ ├── ap_common_flutter_platform.dart
│ │ └── src
│ │ │ └── utilities
│ │ │ ├── ap_media_util.dart
│ │ │ ├── ap_platform_util.dart
│ │ │ ├── app_store_util.dart
│ │ │ ├── notification_utils.dart
│ │ │ ├── platform_calendar_util.dart
│ │ │ └── preferences.dart
│ └── pubspec.yaml
├── ap_common_flutter_ui
│ ├── .gitignore
│ ├── .metadata
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── assets
│ │ ├── icons
│ │ │ ├── barcode.png
│ │ │ ├── calendar_import.png
│ │ │ └── qrcode.png
│ │ └── images
│ │ │ ├── dash_line_dark.webp
│ │ │ ├── dash_line_light.webp
│ │ │ ├── drawer_background_dark.webp
│ │ │ ├── drawer_background_light.webp
│ │ │ ├── email.webp
│ │ │ ├── fb.webp
│ │ │ ├── gdg_on_campus_nkust_itc.jpg
│ │ │ ├── github.webp
│ │ │ ├── instagram.png
│ │ │ ├── nkutst_itc.webp
│ │ │ └── nsysu_gdsc.png
│ ├── lib
│ │ ├── ap_common_flutter_ui.dart
│ │ └── src
│ │ │ ├── pages
│ │ │ └── about_us_page.dart
│ │ │ ├── resources
│ │ │ ├── ap_colors.dart
│ │ │ ├── ap_image_assets.dart
│ │ │ ├── ap_image_icons.dart
│ │ │ ├── ap_theme.dart
│ │ │ └── resources.dart
│ │ │ ├── scaffold
│ │ │ ├── course_scaffold.dart
│ │ │ ├── home_page_scaffold.dart
│ │ │ ├── image_viewer_scaffold.dart
│ │ │ ├── login_scaffold.dart
│ │ │ ├── score_scaffold.dart
│ │ │ └── user_info_scaffold.dart
│ │ │ ├── utils
│ │ │ ├── ap_ui_util.dart
│ │ │ ├── ap_utils.dart
│ │ │ ├── app_tracking_utils.dart
│ │ │ ├── dialog_utils.dart
│ │ │ └── toast.dart
│ │ │ ├── views
│ │ │ ├── notification_list_view.dart
│ │ │ ├── pdf_view.dart
│ │ │ └── phone_list_view.dart
│ │ │ └── widgets
│ │ │ ├── ap_drawer.dart
│ │ │ ├── ap_network_image.dart
│ │ │ ├── default_dialog.dart
│ │ │ ├── dialog_option.dart
│ │ │ ├── hint_content.dart
│ │ │ ├── item_picker.dart
│ │ │ ├── option_dialog.dart
│ │ │ ├── progress_dialog.dart
│ │ │ ├── setting_page_widgets.dart
│ │ │ └── yes_no_dialog.dart
│ └── pubspec.yaml
└── ap_common_plugin
│ ├── .gitignore
│ ├── .metadata
│ ├── .pubignore
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── RELEASE_NOTE.md
│ ├── android
│ ├── .gitignore
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── settings.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ └── me
│ │ │ └── rainvisitor
│ │ │ └── ap_common_plugin
│ │ │ ├── ApCommonPlugin.kt
│ │ │ ├── Course.kt
│ │ │ └── CourseAppWidgetProvider.kt
│ │ └── res
│ │ ├── drawable
│ │ └── ic_refresh.xml
│ │ ├── layout
│ │ └── course_appwidget_provider_layout.xml
│ │ ├── values-zh-rTW
│ │ └── strings.xml
│ │ ├── values
│ │ └── strings.xml
│ │ └── xml
│ │ └── course_appwidget_info.xml
│ ├── ios
│ ├── .gitignore
│ ├── Assets
│ │ └── .gitkeep
│ ├── Classes
│ │ ├── ApCommonPlugin.h
│ │ ├── ApCommonPlugin.m
│ │ └── SwiftApCommonPlugin.swift
│ ├── Resources
│ │ └── PrivacyInfo.xcprivacy
│ └── ap_common_plugin.podspec
│ ├── lib
│ └── ap_common_plugin.dart
│ ├── melos_ap_common_plugin.iml
│ ├── pubspec.lock
│ └── pubspec.yaml
├── pubspec.lock
├── pubspec.yaml
└── website
├── .firebaserc
├── .gitignore
├── README.md
├── babel.config.js
├── blog
├── 2021-05-19-welcome.md
└── authors.yml
├── docs
├── api-models
│ ├── _category_.json
│ ├── announcement.mdx
│ ├── cloud-message.mdx
│ ├── course-data.mdx
│ ├── notification-data.mdx
│ ├── phone-data.mdx
│ ├── score-data.mdx
│ ├── user-info.mdx
│ └── version-info.mdx
├── api-pages
│ ├── _category_.json
│ ├── about-us-page.mdx
│ ├── announcemnet-content-page.mdx
│ ├── cloud-message-page.mdx
│ └── open-source-page.mdx
├── api-scaffolds
│ ├── _category_.json
│ ├── course-scaffold.mdx
│ ├── home-scaffold.mdx
│ ├── image-viewer-scaffold.mdx
│ ├── login-scaffold.mdx
│ ├── overview.mdx
│ ├── score-scaffold.mdx
│ └── user-info-scaffold.mdx
├── api-utils
│ ├── _category_.json
│ ├── analytics-utils.mdx
│ ├── app-store-util.mdx
│ ├── cloud-message-utils.mdx
│ ├── crashlytics-utils.mdx
│ ├── dialog-utils.mdx
│ ├── media-util.mdx
│ ├── notification-utils.mdx
│ ├── platform-util.mdx
│ ├── preference-utils.mdx
│ ├── ui-util.mdx
│ └── utils.mdx
├── api-views
│ ├── _category_.json
│ ├── notification-list-view.mdx
│ ├── pdf-view.mdx
│ └── phone-list-view.mdx
├── api-widgets
│ ├── _category_.json
│ ├── ap-drawer.mdx
│ ├── ap-network-image.mdx
│ ├── default-dialog.mdx
│ ├── dialog-option.mdx
│ ├── hint-content.mdx
│ ├── item-picker.mdx
│ ├── overview.mdx
│ ├── progress-dialog.mdx
│ ├── setting-page-widget.mdx
│ ├── simple-option-dialog.mdx
│ └── yes-no-dialog.mdx
├── collaborate
│ ├── _category_.json
│ └── localization.mdx
└── installation
│ ├── _category_.json
│ ├── app-tracking-transparency.mdx
│ ├── export-course-table-image.mdx
│ ├── export-to-calendar.mdx
│ ├── local-notification.mdx
│ ├── localization.mdx
│ ├── overview.mdx
│ ├── shared-preferences.mdx
│ └── theme.mdx
├── docusaurus.config.js
├── firebase.json
├── package.json
├── sidebars.js
├── src
├── components
│ ├── HomepageFeatures.js
│ └── HomepageFeatures.module.css
├── css
│ └── custom.css
└── pages
│ ├── index.js
│ ├── index.module.css
│ └── markdown-page.md
├── static
├── .nojekyll
└── img
│ ├── ap.png
│ ├── favicon.ico
│ ├── package-architecture.png
│ ├── pages
│ ├── about_us_page
│ │ ├── mobile_1.png
│ │ ├── mobile_2.png
│ │ └── mobile_3.png
│ └── announcement_content_page
│ │ ├── mobile.jpg
│ │ └── tablet.png
│ ├── scaffolds
│ ├── course
│ │ ├── course_bottom_sheet.jpg
│ │ ├── course_detail.png
│ │ ├── mobile.png
│ │ └── tablet.png
│ ├── home
│ │ ├── mobile.png
│ │ └── tablet.png
│ ├── login
│ │ ├── mobile.png
│ │ └── tablet.png
│ ├── notification
│ │ └── mobile.png
│ ├── pdf
│ │ └── mobile.png
│ ├── phone
│ │ └── mobile.png
│ ├── score
│ │ ├── mobile.png
│ │ └── tablet.png
│ └── user_info
│ │ ├── mobile_1.png
│ │ └── mobile_2.png
│ ├── undraw_docusaurus_mountain.svg
│ ├── undraw_docusaurus_react.svg
│ ├── undraw_docusaurus_tree.svg
│ └── widgets
│ ├── ap_drawer.jpg
│ ├── default_dialog.jpg
│ ├── hint_content.jpg
│ ├── item_picker.jpg
│ ├── setting_page_widgets.jpg
│ ├── simple_option_dialog.jpg
│ └── yes_no_dialog.jpg
└── yarn.lock
/.fvmrc:
--------------------------------------------------------------------------------
1 | {
2 | "flutter": "3.29.1",
3 | "flavors": {}
4 | }
--------------------------------------------------------------------------------
/.github/workflows/ci.workflow.yml:
--------------------------------------------------------------------------------
1 | name: CI Test
2 | on:
3 | push:
4 | tags-ignore:
5 | - v*
6 | pull_request:
7 | branches:
8 | - master
9 | paths-ignore:
10 | - "docs/**"
11 | - "website/**"
12 | - "**.md"
13 |
14 | jobs:
15 | build:
16 | name: Flutter Build Test
17 | runs-on: ubuntu-latest
18 |
19 | steps:
20 | - uses: actions/checkout@v4
21 | - uses: actions/setup-java@v1
22 | with:
23 | java-version: '12.x'
24 | - uses: subosito/flutter-action@v2
25 | with:
26 | flutter-version: '3.24.x'
27 | channel: 'stable'
28 | cache: true
29 | cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
30 | - uses: bluefireteam/melos-action@v3
31 | with:
32 | run-bootstrap: false
33 | melos-version: '6.1.0'
34 | - name: 'Bootstrap package'
35 | run: melos bootstrap
36 | - name: Run Test
37 | run: melos run test --no-select
38 | - name: Analyze files
39 | run: melos run analyze-ci
40 | - name: Build Web
41 | run: flutter build web
42 | working-directory: ./apps/example
43 | # - name: Run Flutter Driver tests
44 | # run: flutter drive
45 | # working-directory: ./apps/example
--------------------------------------------------------------------------------
/.github/workflows/deploy.dev.workflow.yml:
--------------------------------------------------------------------------------
1 | name: Deploy to Pub Hub
2 |
3 | on:
4 | push:
5 | tags:
6 | - v**dev
7 |
8 | jobs:
9 |
10 | deploy:
11 | name: Deploy
12 | runs-on: ubuntu-latest
13 | steps:
14 | - name: 'Checkout'
15 | uses: actions/checkout@v2 # required!
16 |
17 | - name: '>> Dart package <<'
18 | uses: k-paxian/dart-package-publisher@master
19 | with:
20 | accessToken: ${{ secrets.OAUTH_ACCESS_TOKEN }}
21 | refreshToken: ${{ secrets.OAUTH_REFRESH_TOKEN }}
22 |
23 | github_pre_release:
24 | name: Create GitHub Pre-Release
25 | needs: [deploy]
26 | runs-on: ubuntu-latest
27 | steps:
28 | - name: Checkout code
29 | uses: actions/checkout@v2
30 | - name: Create Release
31 | id: create_release
32 | uses: actions/create-release@v1
33 | env:
34 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
35 | with:
36 | tag_name: ${{ github.ref }}
37 | release_name: ${{ github.ref }}
38 | body_path: RELEASE_NOTE.md
39 | draft: false
40 | prerelease: true
--------------------------------------------------------------------------------
/.github/workflows/deploy.workflow.yml:
--------------------------------------------------------------------------------
1 | name: Deploy to Pub Hub
2 |
3 | on:
4 | push:
5 | tags:
6 | - v*
7 | jobs:
8 |
9 | deploy:
10 | name: Deploy
11 | runs-on: ubuntu-latest
12 | steps:
13 | - name: 'Checkout'
14 | uses: actions/checkout@v2 # required!
15 |
16 | - name: '>> Dart package <<'
17 | uses: k-paxian/dart-package-publisher@master
18 | with:
19 | accessToken: ${{ secrets.OAUTH_ACCESS_TOKEN }}
20 | refreshToken: ${{ secrets.OAUTH_REFRESH_TOKEN }}
21 |
22 | github_release:
23 | name: Create GitHub Release
24 | needs: [deploy]
25 | runs-on: ubuntu-latest
26 | steps:
27 | - name: Checkout code
28 | uses: actions/checkout@v2
29 | - name: Create Release
30 | id: create_release
31 | uses: actions/create-release@v1
32 | env:
33 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
34 | with:
35 | tag_name: ${{ github.ref }}
36 | release_name: ${{ github.ref }}
37 | body_path: RELEASE_NOTE.md
38 | draft: false
39 | prerelease: false
--------------------------------------------------------------------------------
/.github/workflows/firebase-hosting-merge.yml:
--------------------------------------------------------------------------------
1 | name: Deploy document to Firebase Hosting
2 | on:
3 | push:
4 | tags:
5 | - v*
6 |
7 | jobs:
8 | build_and_deploy:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions/checkout@v2
12 | - name: Run Build
13 | working-directory: ./website
14 | run: |
15 | yarn
16 | yarn run build
17 | - uses: FirebaseExtended/action-hosting-deploy@v0
18 | with:
19 | repoToken: '${{ secrets.GITHUB_TOKEN }}'
20 | firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_AP_COMMON }}'
21 | channelId: live
22 | projectId: ap-common
23 | entryPoint: "website"
24 |
--------------------------------------------------------------------------------
/.github/workflows/firebase-hosting-pull-request.yml:
--------------------------------------------------------------------------------
1 | name: Deploy to Firebase Hosting on PR
2 | on:
3 | pull_request:
4 | paths:
5 | - "docs/**"
6 | - "website/**"
7 | jobs:
8 | build_and_preview:
9 | if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
10 | runs-on: ubuntu-latest
11 | steps:
12 | - uses: actions/checkout@v2
13 | - name: Run Build
14 | working-directory: ./website
15 | run: |
16 | yarn
17 | yarn run build
18 | - uses: FirebaseExtended/action-hosting-deploy@v0
19 | with:
20 | repoToken: '${{ secrets.GITHUB_TOKEN }}'
21 | firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_AP_COMMON }}'
22 | projectId: ap-common
23 | entryPoint: "website"
24 | expires: 7d
25 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .atom/
3 | .idea/
4 | .vscode/
5 | **/lcov.info
6 | coverage
7 | .packages
8 | .pub/
9 | .dart_tool/
10 | pubspec.lock
11 | pubspec_overrides.yaml
12 | flutter_export_environment.sh
13 |
14 | # Dependencies
15 | /node_modules
16 |
17 | Podfile
18 | Podfile.lock
19 | Pods/
20 | .symlinks/
21 | **/Flutter/App.framework/
22 | **/Flutter/ephemeral/
23 | **/Flutter/Flutter.framework/
24 | **/Flutter/Generated.xcconfig
25 | **/Flutter/flutter_assets/
26 |
27 | ServiceDefinitions.json
28 | xcuserdata/
29 | **/DerivedData/
30 |
31 | local.properties
32 | keystore.properties
33 | .gradle/
34 | gradlew
35 | gradlew.bat
36 | gradle-wrapper.jar
37 | .flutter-plugins-dependencies
38 | *.iml
39 |
40 | generated_plugin_registrant.dart
41 | GeneratedPluginRegistrant.h
42 | GeneratedPluginRegistrant.m
43 | GeneratedPluginRegistrant.java
44 | GeneratedPluginRegistrant.swift
45 | build/
46 | .flutter-plugins
47 |
48 | .project
49 | .classpath
50 | .settings
51 | **/.fvm
52 |
53 | .melos_tool/
54 |
55 | # FVM Version Cache
56 | .fvm/
--------------------------------------------------------------------------------
/apps/example/.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 |
36 | # Symbolication related
37 | app.*.symbols
38 |
39 | # Obfuscation related
40 | app.*.map.json
41 |
42 | # Exceptions to above rules.
43 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
44 |
45 | # FVM Version Cache
46 | .fvm/
--------------------------------------------------------------------------------
/apps/example/.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.
5 |
6 | version:
7 | revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
8 | channel: stable
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
17 | base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
18 | - platform: windows
19 | create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
20 | base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
21 |
22 | # User provided section
23 |
24 | # List of Local paths (relative to this file) that should be
25 | # ignored by the migrate tool.
26 | #
27 | # Files that are not part of the templates will be ignored by default.
28 | unmanaged_files:
29 | - 'lib/main.dart'
30 | - 'ios/Runner.xcodeproj/project.pbxproj'
31 |
--------------------------------------------------------------------------------
/apps/example/README.md:
--------------------------------------------------------------------------------
1 | # ap_common_example
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/apps/example/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 | .cxx
9 |
10 | # Remember to never publicly share your keystore.
11 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
12 | key.properties
13 |
--------------------------------------------------------------------------------
/apps/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/kotlin/me/rainvisitor/ap_common_example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package me.rainvisitor.ap_common_example
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/drawable-hdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/android/app/src/main/res/drawable-hdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/drawable-mdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/android/app/src/main/res/drawable-mdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/drawable-xhdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/android/app/src/main/res/drawable-xhdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/drawable-xxhdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/android/app/src/main/res/drawable-xxhdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/drawable-xxxhdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/android/app/src/main/res/drawable-xxxhdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | AP Demo
3 |
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/apps/example/android/app/src/main/values-zh-rTW/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 校務通展示
3 |
4 |
--------------------------------------------------------------------------------
/apps/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/apps/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | allprojects {
2 | repositories {
3 | google()
4 | mavenCentral()
5 | }
6 | }
7 |
8 | rootProject.buildDir = "../build"
9 | subprojects {
10 | project.buildDir = "${rootProject.buildDir}/${project.name}"
11 | }
12 | subprojects {
13 | project.evaluationDependsOn(":app")
14 | }
15 |
16 | tasks.register("clean", Delete) {
17 | delete rootProject.buildDir
18 | }
19 |
--------------------------------------------------------------------------------
/apps/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/apps/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
6 |
--------------------------------------------------------------------------------
/apps/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }()
9 |
10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
11 |
12 | repositories {
13 | google()
14 | mavenCentral()
15 | gradlePluginPortal()
16 | }
17 | }
18 |
19 | plugins {
20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21 | id "com.android.application" version "8.1.0" apply false
22 | id "org.jetbrains.kotlin.android" version "1.9.10" apply false
23 | }
24 |
25 | include ":app"
26 |
--------------------------------------------------------------------------------
/apps/example/android/settings_aar.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/apps/example/assets/images/K.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/assets/images/K.webp
--------------------------------------------------------------------------------
/apps/example/assets/images/drawer-icon.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/assets/images/drawer-icon.webp
--------------------------------------------------------------------------------
/apps/example/assets/images/kuasap.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/assets/images/kuasap.webp
--------------------------------------------------------------------------------
/apps/example/assets/images/kuasap2.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/assets/images/kuasap2.webp
--------------------------------------------------------------------------------
/apps/example/assets/images/kuasap3.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/assets/images/kuasap3.webp
--------------------------------------------------------------------------------
/apps/example/assets/images/kuasap_text.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/assets/images/kuasap_text.webp
--------------------------------------------------------------------------------
/apps/example/assets/images/section_first1.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/assets/images/section_first1.webp
--------------------------------------------------------------------------------
/apps/example/assets/images/section_first2.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/assets/images/section_first2.webp
--------------------------------------------------------------------------------
/apps/example/assets/images/section_jiangong.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/assets/images/section_jiangong.webp
--------------------------------------------------------------------------------
/apps/example/assets/images/section_nanzi.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/assets/images/section_nanzi.webp
--------------------------------------------------------------------------------
/apps/example/assets/images/section_qijin.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/assets/images/section_qijin.webp
--------------------------------------------------------------------------------
/apps/example/assets/images/section_yanchao.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/assets/images/section_yanchao.webp
--------------------------------------------------------------------------------
/apps/example/assets/user_info.json:
--------------------------------------------------------------------------------
1 | {
2 | "educationSystem": "日間部四技",
3 | "department": "停車管理系",
4 | "className": "停車管理系四甲",
5 | "id": "1101234532",
6 | "name": "Dash",
7 | "pictureUrl": "https://i.imgur.com/5MBrWIB.png"
8 | }
--------------------------------------------------------------------------------
/apps/example/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/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/apps/example/ios/CourseAppWidget/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/apps/example/ios/CourseAppWidget/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/apps/example/ios/CourseAppWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/apps/example/ios/CourseAppWidget/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | CourseAppWidget
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
19 | CFBundleShortVersionString
20 | 1.0.1
21 | CFBundleVersion
22 | 1
23 | NSExtension
24 |
25 | NSExtensionPointIdentifier
26 | com.apple.widgetkit-extension
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/apps/example/ios/CourseAppWidgetExtension.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.application-groups
6 |
7 | group.common.ap.example
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/apps/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
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 | 9.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/apps/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
3 | #include "Generated.xcconfig"
4 |
--------------------------------------------------------------------------------
/apps/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
3 | #include "Generated.xcconfig"
4 |
--------------------------------------------------------------------------------
/apps/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/apps/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/apps/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/apps/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/apps/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/apps/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/apps/example/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @main
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | if #available(iOS 10.0, *) {
12 | UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
13 | }
14 | if(!UserDefaults.standard.bool(forKey: "Notification")) {
15 | UIApplication.shared.cancelAllLocalNotifications()
16 | UserDefaults.standard.set(true, forKey: "Notification")
17 | }
18 | //Course app widget must be iOS 14 above
19 | if #available(iOS 14.0, *) {
20 | //Course data export to app group
21 | let standrtUserDefaults = UserDefaults.standard
22 | let groupUserDefaults = UserDefaults(suiteName: "group.common.ap.example")
23 | if let semester = standrtUserDefaults.string(forKey: "flutter.ap_common.current_semester_code"){
24 | if let text = standrtUserDefaults.string(forKey: "flutter.ap_common.course_data_\(semester)"){
25 | groupUserDefaults?.set(text, forKey: "course_notify")
26 | }
27 | }
28 | }
29 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/apps/example/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 |
--------------------------------------------------------------------------------
/apps/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/apps/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/apps/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/apps/example/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.
--------------------------------------------------------------------------------
/apps/example/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/apps/example/ios/Runner/Runner.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | aps-environment
6 | development
7 | com.apple.security.application-groups
8 |
9 | group.common.ap.example
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/apps/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:ap_common/ap_common.dart';
4 | import 'package:ap_common_example/app.dart';
5 | import 'package:ap_common_example/config/constants.dart';
6 | import 'package:flutter/cupertino.dart';
7 | import 'package:flutter/foundation.dart';
8 | import 'package:flutter/material.dart';
9 | import 'package:google_sign_in_dartio/google_sign_in_dartio.dart';
10 |
11 | // ignore_for_file: lines_longer_than_80_chars
12 | Future main() async {
13 | WidgetsFlutterBinding.ensureInitialized();
14 | registerOneForAll();
15 | registerApCommonService();
16 | await (PreferenceUtil.instance as ApPreferenceUtil)
17 | .init(key: Constants.key, iv: Constants.iv);
18 | if (!kIsWeb && (Platform.isMacOS || Platform.isWindows || Platform.isLinux)) {
19 | GoogleSignInDart.register(
20 | clientId:
21 | '141403473068-9gii2blqbggijifq0ijoqkqv8oj2i2ff.apps.googleusercontent.com',
22 | );
23 | }
24 | ApIcon.code = PreferenceUtil.instance
25 | .getString(Constants.PREF_ICON_STYLE_CODE, ApIcon.outlined);
26 | runApp(const MyApp());
27 | }
28 |
--------------------------------------------------------------------------------
/apps/example/lib/pages/user_info_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:ap_common/ap_common.dart';
2 | import 'package:ap_common_example/res/assets.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter/services.dart';
5 |
6 | class UserInfoPage extends StatefulWidget {
7 | const UserInfoPage({Key? key, this.userInfo}) : super(key: key);
8 |
9 | static const String routerName = '/userInfo';
10 |
11 | final UserInfo? userInfo;
12 |
13 | @override
14 | UserInfoPageState createState() => UserInfoPageState();
15 | }
16 |
17 | class UserInfoPageState extends State {
18 | UserInfo? userInfo;
19 |
20 | @override
21 | void initState() {
22 | userInfo = widget.userInfo;
23 | super.initState();
24 | }
25 |
26 | @override
27 | Widget build(BuildContext context) {
28 | return UserInfoScaffold(
29 | userInfo: widget.userInfo!,
30 | enableBarCode: true,
31 | onRefresh: () async {
32 | final String rawString =
33 | await rootBundle.loadString(FileAssets.userInfo);
34 | final UserInfo userInfo = UserInfo.fromRawJson(rawString);
35 | setState(
36 | () => this.userInfo = userInfo.copyWith(
37 | pictureBytes: this.userInfo!.pictureBytes,
38 | ),
39 | );
40 | // FirebaseAnalyticsUtils.instance.logUserInfo(userInfo);
41 | return null;
42 | },
43 | );
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/apps/example/lib/res/assets.dart:
--------------------------------------------------------------------------------
1 | class ImageAssets {
2 | static const String basePath = 'assets/images';
3 |
4 | static const String kuasap1 = '$basePath/kuasap.webp';
5 | static const String kuasap2 = '$basePath/kuasap2.webp';
6 | static const String kuasap3 = '$basePath/kuasap3.webp';
7 | static const String drawerIconLight = '$basePath/drawer-icon.webp';
8 | static const String drawerIconDark = '$basePath/drawer-icon.webp';
9 | static const String K = '$basePath/K.webp';
10 | static const String dashLineLight = '$basePath/dash_line_light.webp';
11 | static const String dashLineDarkTheme = '$basePath/dash_line_dark.webp';
12 |
13 | static String sectionJiangong = '$basePath/section_jiangong.webp';
14 | static String sectionYanchao = '$basePath/section_yanchao.webp';
15 | static String sectionFirst1 = '$basePath/section_first1.webp';
16 | static String sectionFirst2 = '$basePath/section_first2.webp';
17 | static String sectionNanzi = '$basePath/section_nanzi.webp';
18 | static String sectionQijin = '$basePath/section_qijin.webp';
19 | }
20 |
21 | class FileAssets {
22 | static const String basePath = 'assets';
23 |
24 | static String courses = '$basePath/coursetable.json';
25 | static String scores = '$basePath/scores.json';
26 | static String semesters = '$basePath/semesters.json';
27 |
28 | static String userInfo = '$basePath/user_info.json';
29 |
30 | static String notifications = '$basePath/notifications.json';
31 | }
32 |
--------------------------------------------------------------------------------
/apps/example/lib/utils/app_localizations.dart:
--------------------------------------------------------------------------------
1 | import 'package:ap_common_example/l10n/intl/messages_all.dart';
2 | import 'package:ap_common_example/l10n/l10n.dart';
3 | import 'package:flutter/cupertino.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:multiple_localization/multiple_localization.dart';
6 |
7 | export 'package:ap_common_example/l10n/l10n.dart';
8 |
9 | const _AppLocalizationsDelegate appDelegate = _AppLocalizationsDelegate();
10 |
11 | class _AppLocalizationsDelegate
12 | extends LocalizationsDelegate {
13 | const _AppLocalizationsDelegate();
14 |
15 | @override
16 | bool isSupported(Locale locale) {
17 | return true;
18 | }
19 |
20 | @override
21 | Future load(Locale locale) {
22 | return MultipleLocalizations.load(
23 | initializeMessages,
24 | locale,
25 | (String l) => AppLocalizations.load(locale),
26 | setDefaultLocale: true,
27 | );
28 | }
29 |
30 | @override
31 | bool shouldReload(LocalizationsDelegate old) {
32 | return false;
33 | }
34 | }
35 |
36 | extension AppLocalizationsExtension on AppLocalizations {
37 | List get busSegment => [
38 | fromJiangong,
39 | fromYanchao,
40 | ];
41 |
42 | List get campuses => [
43 | jiangong,
44 | yanchao,
45 | first,
46 | nanzi,
47 | qijin,
48 | ];
49 | }
50 |
--------------------------------------------------------------------------------
/apps/example/lib/widgets/share_data_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:ap_common_example/app.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter/widgets.dart';
4 |
5 | class ShareDataWidget extends InheritedWidget {
6 | const ShareDataWidget({this.data, required Widget child})
7 | : super(
8 | child: child,
9 | );
10 |
11 | final MyAppState? data;
12 |
13 | static ShareDataWidget? of(BuildContext context) {
14 | return context.dependOnInheritedWidgetOfExactType();
15 | }
16 |
17 | @override
18 | bool updateShouldNotify(ShareDataWidget oldWidget) {
19 | return true;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/apps/example/linux/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral
2 |
--------------------------------------------------------------------------------
/apps/example/linux/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #include "generated_plugin_registrant.h"
8 |
9 | #include
10 | #include
11 | #include
12 | #include
13 |
14 | void fl_register_plugins(FlPluginRegistry* registry) {
15 | g_autoptr(FlPluginRegistrar) file_saver_registrar =
16 | fl_plugin_registry_get_registrar_for_plugin(registry, "FileSaverPlugin");
17 | file_saver_plugin_register_with_registrar(file_saver_registrar);
18 | g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
19 | fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
20 | file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
21 | g_autoptr(FlPluginRegistrar) printing_registrar =
22 | fl_plugin_registry_get_registrar_for_plugin(registry, "PrintingPlugin");
23 | printing_plugin_register_with_registrar(printing_registrar);
24 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
25 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
26 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
27 | }
28 |
--------------------------------------------------------------------------------
/apps/example/linux/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void fl_register_plugins(FlPluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/apps/example/linux/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | file_saver
7 | file_selector_linux
8 | printing
9 | url_launcher_linux
10 | )
11 |
12 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
13 | )
14 |
15 | set(PLUGIN_BUNDLED_LIBRARIES)
16 |
17 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
18 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
19 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
20 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
21 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
22 | endforeach(plugin)
23 |
24 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
25 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
26 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
27 | endforeach(ffi_plugin)
28 |
--------------------------------------------------------------------------------
/apps/example/linux/main.cc:
--------------------------------------------------------------------------------
1 | #include "my_application.h"
2 |
3 | int main(int argc, char** argv) {
4 | g_autoptr(MyApplication) app = my_application_new();
5 | return g_application_run(G_APPLICATION(app), argc, argv);
6 | }
7 |
--------------------------------------------------------------------------------
/apps/example/linux/my_application.h:
--------------------------------------------------------------------------------
1 | #ifndef FLUTTER_MY_APPLICATION_H_
2 | #define FLUTTER_MY_APPLICATION_H_
3 |
4 | #include
5 |
6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,
7 | GtkApplication)
8 |
9 | /**
10 | * my_application_new:
11 | *
12 | * Creates a new Flutter-based application.
13 | *
14 | * Returns: a new #MyApplication.
15 | */
16 | MyApplication* my_application_new();
17 |
18 | #endif // FLUTTER_MY_APPLICATION_H_
19 |
--------------------------------------------------------------------------------
/apps/example/macos/.gitignore:
--------------------------------------------------------------------------------
1 | # Flutter-related
2 | **/Flutter/ephemeral/
3 | **/Pods/
4 |
5 | # Xcode-related
6 | **/dgph
7 | **/xcuserdata/
8 |
--------------------------------------------------------------------------------
/apps/example/macos/Flutter/Flutter-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/apps/example/macos/Flutter/Flutter-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/apps/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/apps/example/macos/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/apps/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/apps/example/macos/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | @NSApplicationMain
5 | class AppDelegate: FlutterAppDelegate {
6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
7 | return true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/apps/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
--------------------------------------------------------------------------------
/apps/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/apps/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/apps/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/apps/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/apps/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/apps/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/apps/example/macos/Runner/Configs/AppInfo.xcconfig:
--------------------------------------------------------------------------------
1 | // Application-level settings for the Runner target.
2 | //
3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
4 | // future. If not, the values below would default to using the project name when this becomes a
5 | // 'flutter create' template.
6 |
7 | // The application's name. By default this is also the title of the Flutter window.
8 | PRODUCT_NAME = ap_common_example
9 |
10 | // The application's bundle identifier
11 | PRODUCT_BUNDLE_IDENTIFIER = me.rainvisitor.apCommonExample
12 |
13 | // The copyright displayed in application information
14 | PRODUCT_COPYRIGHT = Copyright © 2022 me.rainvisitor. All rights reserved.
15 |
--------------------------------------------------------------------------------
/apps/example/macos/Runner/Configs/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Debug.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/apps/example/macos/Runner/Configs/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Release.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/apps/example/macos/Runner/Configs/Warnings.xcconfig:
--------------------------------------------------------------------------------
1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
2 | GCC_WARN_UNDECLARED_SELECTOR = YES
3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
6 | CLANG_WARN_PRAGMA_PACK = YES
7 | CLANG_WARN_STRICT_PROTOTYPES = YES
8 | CLANG_WARN_COMMA = YES
9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES
10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
12 | GCC_WARN_SHADOW = YES
13 | CLANG_WARN_UNREACHABLE_CODE = YES
14 |
--------------------------------------------------------------------------------
/apps/example/macos/Runner/DebugProfile.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.cs.allow-jit
8 |
9 | com.apple.security.network.client
10 |
11 | com.apple.security.network.server
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/apps/example/macos/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | $(PRODUCT_COPYRIGHT)
27 | NSMainNibFile
28 | MainMenu
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/apps/example/macos/Runner/MainFlutterWindow.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | class MainFlutterWindow: NSWindow {
5 | override func awakeFromNib() {
6 | let flutterViewController = FlutterViewController.init()
7 | let windowFrame = self.frame
8 | self.contentViewController = flutterViewController
9 | self.setFrame(windowFrame, display: true)
10 |
11 | RegisterGeneratedPlugins(registry: flutterViewController)
12 |
13 | super.awakeFromNib()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/apps/example/macos/Runner/Release.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.network.client
8 |
9 | com.apple.security.network.server
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/apps/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: ap_common_example
2 | description: A new Flutter project.
3 |
4 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
5 |
6 | version: 1.0.1+10001
7 |
8 | environment:
9 | sdk: '>=2.12.0 <3.0.0'
10 |
11 | dependencies:
12 | flutter:
13 | sdk: flutter
14 | flutter_localizations:
15 | sdk: flutter
16 | google_sign_in_dartio: 0.3.0
17 |
18 | ap_common:
19 | path: ../../packages/ap_common
20 |
21 | encrypt: any
22 | http: any
23 | sprintf: any
24 | multiple_localization: any
25 |
26 | ap_common_plugin: 0.5.0-dev.4
27 | # path: ../../../GitHub/ap_common_plugin
28 |
29 | dependency_overrides:
30 | intl: 0.18.0
31 |
32 | dev_dependencies:
33 | flutter_test:
34 | sdk: flutter
35 | lint: ^1.5.3
36 |
37 | flutter:
38 |
39 | uses-material-design: true
40 | assets:
41 | - assets/images/
42 | - assets/
43 |
44 | flutter_intl:
45 | enabled: true
46 | class_name: AppLocalizations
47 | main_locale: 'zh_TW'
48 | arb_dir: lib/l10n
49 | output_dir: lib/l10n
50 | use_deferred_loading: true
--------------------------------------------------------------------------------
/apps/example/pubspec_overrides.yaml:
--------------------------------------------------------------------------------
1 | # melos_managed_dependency_overrides: ap_common,ap_common_announcement_ui,ap_common_core,ap_common_flutter_core,ap_common_flutter_platform,ap_common_flutter_ui,ap_common_plugin,intl
2 | dependency_overrides:
3 | ap_common:
4 | path: ../../packages/ap_common
5 | ap_common_announcement_ui:
6 | path: ../../packages/ap_common_announcement_ui
7 | ap_common_core:
8 | path: ../../packages/ap_common_core
9 | ap_common_flutter_core:
10 | path: ../../packages/ap_common_flutter_core
11 | ap_common_flutter_platform:
12 | path: ../../packages/ap_common_flutter_platform
13 | ap_common_flutter_ui:
14 | path: ../../packages/ap_common_flutter_ui
15 | ap_common_plugin:
16 | path: ../../packages/ap_common_plugin
17 | intl: 0.18.0
18 |
--------------------------------------------------------------------------------
/apps/example/web/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/web/favicon.ico
--------------------------------------------------------------------------------
/apps/example/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/apps/example/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/apps/example/web/icons/Icon-maskable-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/web/icons/Icon-maskable-192.png
--------------------------------------------------------------------------------
/apps/example/web/icons/Icon-maskable-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/web/icons/Icon-maskable-512.png
--------------------------------------------------------------------------------
/apps/example/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nkust_ap",
3 | "short_name": "nkust_ap",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "史上最強高科大校務系統 APP",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | },
22 | {
23 | "src": "icons/Icon-maskable-192.png",
24 | "sizes": "192x192",
25 | "type": "image/png",
26 | "purpose": "maskable"
27 | },
28 | {
29 | "src": "icons/Icon-maskable-512.png",
30 | "sizes": "512x512",
31 | "type": "image/png",
32 | "purpose": "maskable"
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/apps/example/windows/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral/
2 |
3 | # Visual Studio user-specific files.
4 | *.suo
5 | *.user
6 | *.userosscache
7 | *.sln.docstates
8 |
9 | # Visual Studio build-related files.
10 | x64/
11 | x86/
12 |
13 | # Visual Studio cache files
14 | # files ending in .cache can be ignored
15 | *.[Cc]ache
16 | # but keep track of directories ending in .cache
17 | !*.[Cc]ache/
18 |
--------------------------------------------------------------------------------
/apps/example/windows/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #include "generated_plugin_registrant.h"
8 |
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 |
15 | void RegisterPlugins(flutter::PluginRegistry* registry) {
16 | FileSaverPluginRegisterWithRegistrar(
17 | registry->GetRegistrarForPlugin("FileSaverPlugin"));
18 | FileSelectorWindowsRegisterWithRegistrar(
19 | registry->GetRegistrarForPlugin("FileSelectorWindows"));
20 | PrintingPluginRegisterWithRegistrar(
21 | registry->GetRegistrarForPlugin("PrintingPlugin"));
22 | SharePlusWindowsPluginCApiRegisterWithRegistrar(
23 | registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
24 | UrlLauncherWindowsRegisterWithRegistrar(
25 | registry->GetRegistrarForPlugin("UrlLauncherWindows"));
26 | }
27 |
--------------------------------------------------------------------------------
/apps/example/windows/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void RegisterPlugins(flutter::PluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/apps/example/windows/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | file_saver
7 | file_selector_windows
8 | printing
9 | share_plus
10 | url_launcher_windows
11 | )
12 |
13 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
14 | )
15 |
16 | set(PLUGIN_BUNDLED_LIBRARIES)
17 |
18 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
19 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})
20 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
21 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
23 | endforeach(plugin)
24 |
25 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
26 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
27 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
28 | endforeach(ffi_plugin)
29 |
--------------------------------------------------------------------------------
/apps/example/windows/runner/flutter_window.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_FLUTTER_WINDOW_H_
2 | #define RUNNER_FLUTTER_WINDOW_H_
3 |
4 | #include
5 | #include
6 |
7 | #include
8 |
9 | #include "win32_window.h"
10 |
11 | // A window that does nothing but host a Flutter view.
12 | class FlutterWindow : public Win32Window {
13 | public:
14 | // Creates a new FlutterWindow hosting a Flutter view running |project|.
15 | explicit FlutterWindow(const flutter::DartProject& project);
16 | virtual ~FlutterWindow();
17 |
18 | protected:
19 | // Win32Window:
20 | bool OnCreate() override;
21 | void OnDestroy() override;
22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,
23 | LPARAM const lparam) noexcept override;
24 |
25 | private:
26 | // The project to run.
27 | flutter::DartProject project_;
28 |
29 | // The Flutter instance hosted by this window.
30 | std::unique_ptr flutter_controller_;
31 | };
32 |
33 | #endif // RUNNER_FLUTTER_WINDOW_H_
34 |
--------------------------------------------------------------------------------
/apps/example/windows/runner/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #include "flutter_window.h"
6 | #include "utils.h"
7 |
8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
9 | _In_ wchar_t *command_line, _In_ int show_command) {
10 | // Attach to console when present (e.g., 'flutter run') or create a
11 | // new console when running with a debugger.
12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
13 | CreateAndAttachConsole();
14 | }
15 |
16 | // Initialize COM, so that it is available for use in the library and/or
17 | // plugins.
18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
19 |
20 | flutter::DartProject project(L"data");
21 |
22 | std::vector command_line_arguments =
23 | GetCommandLineArguments();
24 |
25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
26 |
27 | FlutterWindow window(project);
28 | Win32Window::Point origin(10, 10);
29 | Win32Window::Size size(1280, 720);
30 | if (!window.Create(L"ap_common_example", origin, size)) {
31 | return EXIT_FAILURE;
32 | }
33 | window.SetQuitOnClose(true);
34 |
35 | ::MSG msg;
36 | while (::GetMessage(&msg, nullptr, 0, 0)) {
37 | ::TranslateMessage(&msg);
38 | ::DispatchMessage(&msg);
39 | }
40 |
41 | ::CoUninitialize();
42 | return EXIT_SUCCESS;
43 | }
44 |
--------------------------------------------------------------------------------
/apps/example/windows/runner/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Runner.rc
4 | //
5 | #define IDI_APP_ICON 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 102
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/apps/example/windows/runner/resources/app_icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/apps/example/windows/runner/resources/app_icon.ico
--------------------------------------------------------------------------------
/apps/example/windows/runner/runner.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PerMonitorV2
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/apps/example/windows/runner/utils.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_UTILS_H_
2 | #define RUNNER_UTILS_H_
3 |
4 | #include
5 | #include
6 |
7 | // Creates a console for the process, and redirects stdout and stderr to
8 | // it for both the runner and the Flutter library.
9 | void CreateAndAttachConsole();
10 |
11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string
12 | // encoded in UTF-8. Returns an empty std::string on failure.
13 | std::string Utf8FromUtf16(const wchar_t* utf16_string);
14 |
15 | // Gets the command line arguments passed in as a std::vector,
16 | // encoded in UTF-8. Returns an empty std::vector on failure.
17 | std::vector GetCommandLineArguments();
18 |
19 | #endif // RUNNER_UTILS_H_
20 |
--------------------------------------------------------------------------------
/packages/ap_common/.fvmrc:
--------------------------------------------------------------------------------
1 | {
2 | "flutter": "3.24.2",
3 | "flavors": {}
4 | }
--------------------------------------------------------------------------------
/packages/ap_common/.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 |
36 | # Symbolication related
37 | app.*.symbols
38 |
39 | # Obfuscation related
40 | app.*.map.json
41 |
42 | # Exceptions to above rules.
43 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
44 |
45 | # FVM Version Cache
46 | .fvm/
--------------------------------------------------------------------------------
/packages/ap_common/.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: 27321ebbad34b0a3fafe99fac037102196d655ff
8 | channel: unknown
9 |
10 | project_type: package
11 |
--------------------------------------------------------------------------------
/packages/ap_common/.pubignore:
--------------------------------------------------------------------------------
1 | website/
2 | example/
3 | build/
--------------------------------------------------------------------------------
/packages/ap_common/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2024 RainVisitor
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/packages/ap_common/RELEASE_NOTE.md:
--------------------------------------------------------------------------------
1 | ### 基於 Flutter v3.24 開發
2 |
3 | * 修正課表通知實際星期錯誤
--------------------------------------------------------------------------------
/packages/ap_common/build.yaml:
--------------------------------------------------------------------------------
1 | targets:
2 | $default:
3 | builders:
4 | json_serializable:
5 | options:
6 | # Options configure how source code is generated for every
7 | # `@JsonSerializable`-annotated class in the package.
8 | #
9 | # The default value for each is listed.
10 | any_map: false
11 | checked: false
12 | constructor: ""
13 | create_factory: true
14 | create_to_json: true
15 | disallow_unrecognized_keys: false
16 | explicit_to_json: true
17 | field_rename: none
18 | generic_argument_factories: false
19 | ignore_unannotated: false
20 | include_if_null: true
--------------------------------------------------------------------------------
/packages/ap_common/fetch_i18n.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ID="AKfycbwmc3I2ZfMBE9f8tvkJCvwWDb3hYPVWn3AzNr-kr6-tZNCJVspuhftOxmFJ7ONWMesF"
4 |
5 | echo "Generate i18n data from google sheet"
6 |
7 | for locale in "en" "zh_TW"
8 | do
9 | wget "https://script.google.com/macros/s/${ID}/exec?locale=${locale}" \
10 | -O lib/l10n/intl_${locale}.arb
11 | done
12 |
13 | echo "Generate successful"
--------------------------------------------------------------------------------
/packages/ap_common/lib/ap_common.dart:
--------------------------------------------------------------------------------
1 | import 'package:ap_common_flutter_platform/ap_common_flutter_platform.dart';
2 | import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart';
3 |
4 | export 'package:ap_common_announcement_ui/ap_common_announcement_ui.dart';
5 | export 'package:ap_common_flutter_platform/ap_common_flutter_platform.dart';
6 | export 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart';
7 |
8 | void registerOneForAll() {
9 | registerApCommonFlutter(
10 | ui: ApUiUtil(),
11 | platform: ApPlatformUtil(),
12 | media: ApMediaUtil(),
13 | platformCalendar: ApPlatformCalendarUtil(),
14 | notification: ApNotificationUtil(),
15 | appStore: ApAppStoreUtil(),
16 | );
17 | registerApCommonCore(
18 | preference: ApPreferenceUtil(),
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/packages/ap_common/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: ap_common
2 | description: The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app
3 | version: 0.26.0-dev.4
4 | homepage: https://github.com/abc873693/ap_common
5 | repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common
6 |
7 | environment:
8 | sdk: '>=3.0.0 <4.0.0'
9 |
10 | dependencies:
11 | flutter:
12 | sdk: flutter
13 | flutter_localizations:
14 | sdk: flutter
15 |
16 | ap_common_flutter_ui: ^0.0.3
17 | ap_common_flutter_platform: ^0.0.4
18 | ap_common_announcement_ui: ^0.0.3
19 |
20 | #dependency_overrides:
21 | # ap_common_core:
22 | # path: ../ap_common_core/
23 | # ap_common_flutter_core:
24 | # path: ../ap_common_flutter_core/
25 |
26 | dev_dependencies:
27 | flutter_test:
28 | sdk: flutter
29 |
30 | false_secrets:
31 | - /example/lib/main.dart
32 | - /example/web/index.html
33 | - /website/node_modules/selfsigned/README.md
--------------------------------------------------------------------------------
/packages/ap_common/spider.yaml:
--------------------------------------------------------------------------------
1 | # Generated by Spider
2 |
3 | # Generates unit tests to verify that the assets exists in assets directory
4 | generate_tests: false
5 |
6 | # Use this to remove vcs noise created by the `generated` comments in dart code
7 | no_comments: true
8 |
9 | # Exports all the generated file as the one library
10 | export: true
11 |
12 | # This allows you to import all the generated references with 1 single import!
13 | use_part_of: true
14 |
15 | # Location where all the generated references will be stored
16 | package: resources
17 |
18 | groups:
19 | - path: assets/images
20 | class_name: ApImageAssets
21 | types: [ .png, .jpg, .jpeg, .webp, .webm, .bmp ]
22 |
23 | - path: assets/icons
24 | class_name: ApImageIcons
25 | types: [ .png, .jpg, .jpeg, .webp, .webm, .bmp ]
--------------------------------------------------------------------------------
/packages/ap_common_announcement_ui/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
26 | /pubspec.lock
27 | **/doc/api/
28 | .dart_tool/
29 | build/
30 | .flutter-plugins
31 |
--------------------------------------------------------------------------------
/packages/ap_common_announcement_ui/.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: "2663184aa79047d0a33a14a3b607954f8fdd8730"
8 | channel: "stable"
9 |
10 | project_type: package
11 |
--------------------------------------------------------------------------------
/packages/ap_common_announcement_ui/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2024 RainVisitor
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/packages/ap_common_announcement_ui/lib/ap_common_announcement_ui.dart:
--------------------------------------------------------------------------------
1 | export 'src/api/announcement_helper.dart';
2 | export 'src/ui/announcement_content_page.dart';
3 | export 'src/ui/black_list_page.dart';
4 | export 'src/ui/edit_page.dart';
5 | export 'src/ui/home_page.dart';
6 |
--------------------------------------------------------------------------------
/packages/ap_common_announcement_ui/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: ap_common_announcement_ui
2 | description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app"
3 | version: 0.0.3
4 | homepage: https://github.com/abc873693/ap_common
5 | repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_announcement_ui
6 |
7 |
8 | environment:
9 | sdk: ^3.4.0
10 | flutter: ">=3.22.0"
11 |
12 | dependencies:
13 | flutter:
14 | sdk: flutter
15 | ap_common_flutter_core: ^0.0.3
16 | ap_common_flutter_ui: ^0.0.3
17 | # Dart Packages
18 | path: ^1.9.0
19 | dio_cookie_manager: ^3.1.1
20 | cookie_jar: ^4.0.0
21 | sprintf: ^7.0.0
22 | # UI Package
23 | photo_view: ^0.15.0
24 | cached_network_image: ^3.3.1
25 | flutter_linkify: ^6.0.0
26 | # Third-party Login Package
27 | google_sign_in: ^6.2.1
28 | sign_in_with_apple: ^6.1.1
29 |
30 | dev_dependencies:
31 | flutter_test:
32 | sdk: flutter
33 |
34 | flutter:
35 |
--------------------------------------------------------------------------------
/packages/ap_common_core/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
26 | /pubspec.lock
27 | **/doc/api/
28 | .dart_tool/
29 | build/
30 | .flutter-plugins
31 |
--------------------------------------------------------------------------------
/packages/ap_common_core/.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: "80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819"
8 | channel: "stable"
9 |
10 | project_type: package
11 |
--------------------------------------------------------------------------------
/packages/ap_common_core/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2024 RainVisitor
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/packages/ap_common_core/build.yaml:
--------------------------------------------------------------------------------
1 | targets:
2 | $default:
3 | sources:
4 | - lib/**
5 | builders:
6 | json_serializable:
7 | options:
8 | # Options configure how source code is generated for every
9 | # `@JsonSerializable`-annotated class in the package.
10 | #
11 | # The default value for each is listed.
12 | any_map: false
13 | checked: false
14 | constructor: ""
15 | create_factory: true
16 | create_to_json: true
17 | disallow_unrecognized_keys: false
18 | explicit_to_json: true
19 | field_rename: none
20 | generic_argument_factories: false
21 | ignore_unannotated: false
22 | include_if_null: true
--------------------------------------------------------------------------------
/packages/ap_common_core/lib/injector.dart:
--------------------------------------------------------------------------------
1 | // Use this static instance
2 | import 'package:injector/injector.dart';
3 |
4 | export 'package:injector/injector.dart';
5 |
6 | final Injector injector = Injector.appInstance;
7 |
--------------------------------------------------------------------------------
/packages/ap_common_core/lib/src/config/analytics_constants.dart:
--------------------------------------------------------------------------------
1 | class AnalyticsConstants {
2 | // user property
3 | static const String studentId = 'student_id';
4 | static const String department = 'department';
5 | static const String className = 'class_name';
6 | static const String theme = 'theme';
7 | static const String iconStyle = 'icon_style';
8 | static const String language = 'language';
9 | static const String hasEnableNotification = 'has_enable_notification';
10 |
11 | static const String yes = 'yes';
12 | static const String no = 'no';
13 |
14 | //analytics
15 | static const String courseHtmlParser = 'course_html_parser';
16 | static const String scoreHtmlParser = 'score_html_parser';
17 | static const String refresh = 'refresh';
18 | }
19 |
--------------------------------------------------------------------------------
/packages/ap_common_core/lib/src/models/announcement_login_data.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'announcement_login_data.dart';
4 |
5 | // **************************************************************************
6 | // JsonSerializableGenerator
7 | // **************************************************************************
8 |
9 | AnnouncementLoginData _$AnnouncementLoginDataFromJson(
10 | Map json) =>
11 | AnnouncementLoginData(
12 | key: json['key'] as String,
13 | );
14 |
15 | Map _$AnnouncementLoginDataToJson(
16 | AnnouncementLoginData instance) =>
17 | {
18 | 'key': instance.key,
19 | };
20 |
--------------------------------------------------------------------------------
/packages/ap_common_core/lib/src/models/ap_support_language.dart:
--------------------------------------------------------------------------------
1 | enum ApSupportLanguage {
2 | system,
3 | zh,
4 | en,
5 | }
6 |
7 | extension ApSupportLanguageExtension on ApSupportLanguage {
8 | String get code {
9 | switch (index) {
10 | case 1:
11 | return ApSupportLanguageConstants.zh;
12 | case 2:
13 | return ApSupportLanguageConstants.en;
14 | case 0:
15 | default:
16 | return ApSupportLanguageConstants.system;
17 | }
18 | }
19 |
20 | static int fromCode(String code) {
21 | switch (code) {
22 | case ApSupportLanguageConstants.zh:
23 | return 1;
24 | case ApSupportLanguageConstants.en:
25 | return 2;
26 | case ApSupportLanguageConstants.system:
27 | default:
28 | return 0;
29 | }
30 | }
31 | }
32 |
33 | class ApSupportLanguageConstants {
34 | static const String system = 'system';
35 | static const String zh = 'zh';
36 | static const String en = 'en';
37 | }
38 |
--------------------------------------------------------------------------------
/packages/ap_common_core/lib/src/models/general_response.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'general_response.dart';
4 |
5 | // **************************************************************************
6 | // JsonSerializableGenerator
7 | // **************************************************************************
8 |
9 | GeneralResponse _$GeneralResponseFromJson(Map json) =>
10 | GeneralResponse(
11 | statusCode: json['code'] as int,
12 | message: json['description'] as String,
13 | );
14 |
15 | Map _$GeneralResponseToJson(GeneralResponse instance) =>
16 | {
17 | 'code': instance.statusCode,
18 | 'description': instance.message,
19 | };
20 |
--------------------------------------------------------------------------------
/packages/ap_common_core/lib/src/models/phone_model.dart:
--------------------------------------------------------------------------------
1 | class PhoneModel {
2 | PhoneModel(
3 | this.name,
4 | this.number,
5 | );
6 |
7 | final String name;
8 | final String number;
9 | }
10 |
--------------------------------------------------------------------------------
/packages/ap_common_core/lib/src/models/semester_data.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'semester_data.dart';
4 |
5 | // **************************************************************************
6 | // JsonSerializableGenerator
7 | // **************************************************************************
8 |
9 | SemesterData _$SemesterDataFromJson(Map json) => SemesterData(
10 | data: (json['data'] as List)
11 | .map((e) => Semester.fromJson(e as Map))
12 | .toList(),
13 | defaultSemester:
14 | Semester.fromJson(json['default'] as Map),
15 | currentIndex: json['currentIndex'] as int? ?? 0,
16 | );
17 |
18 | Map _$SemesterDataToJson(SemesterData instance) =>
19 | {
20 | 'data': instance.data.map((e) => e.toJson()).toList(),
21 | 'default': instance.defaultSemester.toJson(),
22 | 'currentIndex': instance.currentIndex,
23 | };
24 |
25 | Semester _$SemesterFromJson(Map json) => Semester(
26 | year: json['year'] as String,
27 | value: json['value'] as String,
28 | text: json['text'] as String,
29 | );
30 |
31 | Map _$SemesterToJson(Semester instance) => {
32 | 'year': instance.year,
33 | 'value': instance.value,
34 | 'text': instance.text,
35 | };
36 |
--------------------------------------------------------------------------------
/packages/ap_common_core/lib/src/models/time_code.dart:
--------------------------------------------------------------------------------
1 | // To parse this JSON data, do
2 | //
3 | // final timeCodeConfig = timeCodeConfigFromJson(jsonString);
4 |
5 | import 'dart:convert';
6 |
7 | import 'package:ap_common_core/src/models/course_data.dart' show TimeCode;
8 | import 'package:json_annotation/json_annotation.dart';
9 |
10 | part 'time_code.g.dart';
11 |
12 | @JsonSerializable()
13 | class TimeCodeConfig {
14 | TimeCodeConfig({
15 | required this.timeCodes,
16 | });
17 |
18 | factory TimeCodeConfig.fromJson(Map json) =>
19 | _$TimeCodeConfigFromJson(json);
20 |
21 | factory TimeCodeConfig.fromRawJson(String str) => TimeCodeConfig.fromJson(
22 | json.decode(str) as Map,
23 | );
24 |
25 | List timeCodes;
26 |
27 | Map toJson() => _$TimeCodeConfigToJson(this);
28 |
29 | String toRawJson() => jsonEncode(toJson());
30 |
31 | List get textList {
32 | final List tmp = [];
33 | for (final TimeCode timeCode in timeCodes) {
34 | tmp.add(timeCode.title);
35 | }
36 | return tmp;
37 | }
38 |
39 | int indexOf(String section) {
40 | return textList.indexOf(section);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/packages/ap_common_core/lib/src/models/time_code.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'time_code.dart';
4 |
5 | // **************************************************************************
6 | // JsonSerializableGenerator
7 | // **************************************************************************
8 |
9 | TimeCodeConfig _$TimeCodeConfigFromJson(Map json) =>
10 | TimeCodeConfig(
11 | timeCodes: (json['timeCodes'] as List)
12 | .map((e) => TimeCode.fromJson(e as Map))
13 | .toList(),
14 | );
15 |
16 | Map _$TimeCodeConfigToJson(TimeCodeConfig instance) =>
17 | {
18 | 'timeCodes': instance.timeCodes.map((e) => e.toJson()).toList(),
19 | };
20 |
--------------------------------------------------------------------------------
/packages/ap_common_core/lib/src/models/user_info.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'user_info.dart';
4 |
5 | // **************************************************************************
6 | // JsonSerializableGenerator
7 | // **************************************************************************
8 |
9 | UserInfo _$UserInfoFromJson(Map json) => UserInfo(
10 | educationSystem: json['educationSystem'] as String?,
11 | department: json['department'] as String?,
12 | className: json['className'] as String?,
13 | id: json['id'] as String,
14 | name: json['name'] as String?,
15 | pictureUrl: json['pictureUrl'] as String?,
16 | email: json['email'] as String?,
17 | );
18 |
19 | Map _$UserInfoToJson(UserInfo instance) => {
20 | 'educationSystem': instance.educationSystem,
21 | 'department': instance.department,
22 | 'className': instance.className,
23 | 'id': instance.id,
24 | 'name': instance.name,
25 | 'pictureUrl': instance.pictureUrl,
26 | 'email': instance.email,
27 | };
28 |
--------------------------------------------------------------------------------
/packages/ap_common_core/lib/src/models/version_info.dart:
--------------------------------------------------------------------------------
1 | class VersionInfo {
2 | VersionInfo({
3 | required this.code,
4 | required this.isForceUpdate,
5 | required this.content,
6 | });
7 |
8 | int code;
9 | bool isForceUpdate;
10 | String content;
11 | }
12 |
--------------------------------------------------------------------------------
/packages/ap_common_core/lib/src/utilities/analytics_utils.dart:
--------------------------------------------------------------------------------
1 | import 'package:ap_common_core/injector.dart';
2 | import 'package:ap_common_core/src/models/user_info.dart';
3 |
4 | abstract class AnalyticsUtil {
5 | const AnalyticsUtil();
6 |
7 | static AnalyticsUtil get instance => injector.get();
8 |
9 | Future setCurrentScreen(String screenName, String screenClassOverride);
10 |
11 | Future setUserId(String id);
12 |
13 | Future setUserProperty(String name, String value);
14 |
15 | Future logUserInfo(UserInfo userInfo);
16 |
17 | Future logEvent(String name, {Map? parameters});
18 |
19 | Future logApiEvent(String type, int status, {String message = ''});
20 |
21 | Future logTimeEvent(String name, double seconds);
22 |
23 | //TODO: migration to implement level
24 | // Future logThemeEvent(ThemeMode themeMode);
25 | }
26 |
--------------------------------------------------------------------------------
/packages/ap_common_core/lib/src/utilities/cloud_message_utils.dart:
--------------------------------------------------------------------------------
1 | class CloudMessageUtil {
2 | static CloudMessageUtil? _instance;
3 |
4 | // ignore: prefer_constructors_over_static_methods
5 | static CloudMessageUtil get instance {
6 | return _instance ?? CloudMessageUtil();
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/packages/ap_common_core/lib/src/utilities/crashlytics_utils.dart:
--------------------------------------------------------------------------------
1 | import 'package:ap_common_core/injector.dart';
2 |
3 | abstract class CrashlyticsUtil {
4 | const CrashlyticsUtil();
5 |
6 | static CrashlyticsUtil get instance => injector.get();
7 |
8 | Future recordError(
9 | dynamic exception,
10 | StackTrace stack, {
11 | dynamic reason,
12 | Iterable