├── .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? information, 13 | bool? printDetails, 14 | }); 15 | 16 | Future setCrashlyticsCollectionEnabled(bool enabled); 17 | 18 | Future log(String message); 19 | 20 | Future setCustomKey(String key, Object value); 21 | } 22 | -------------------------------------------------------------------------------- /packages/ap_common_core/lib/src/utilities/preference_util.dart: -------------------------------------------------------------------------------- 1 | import 'package:ap_common_core/injector.dart'; 2 | 3 | abstract class PreferenceUtil { 4 | static PreferenceUtil get instance => injector.get(); 5 | 6 | bool get isSupport => true; 7 | 8 | Future setString(String key, String data); 9 | 10 | String getString(String key, String defaultValue); 11 | 12 | Future setStringSecurity(String key, String data); 13 | 14 | String getStringSecurity(String key, String defaultValue); 15 | 16 | Future setInt(String key, int data); 17 | 18 | int getInt(String key, int defaultValue); 19 | 20 | Future setDouble(String key, double data); 21 | 22 | double getDouble(String key, double defaultValue); 23 | 24 | Future setBool(String key, bool data); 25 | 26 | bool getBool(String key, bool defaultValue); 27 | 28 | Future setStringList(String key, List data); 29 | 30 | List getStringList(String key, List defaultValue); 31 | 32 | Set getKeys(); 33 | 34 | Future? remove(String key); 35 | } 36 | -------------------------------------------------------------------------------- /packages/ap_common_core/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: ap_common_core 2 | description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" 3 | version: 0.0.5 4 | homepage: https://github.com/abc873693/ap_common 5 | repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_core 6 | 7 | environment: 8 | sdk: ^3.0.0 9 | 10 | dependencies: 11 | sprintf: ^7.0.0 12 | intl: ">=0.16.0 <1.0.0" 13 | dio: ">=5.4.1 <6.0.0" 14 | dio_cookie_manager: ^3.1.1 15 | cookie_jar: ^4.0.0 16 | jwt_decoder: ^2.0.1 17 | json_annotation: ^4.6.0 18 | injector: ^4.0.0 19 | 20 | dev_dependencies: 21 | build_runner: ^2.0.3 22 | json_serializable: ^6.3.0 -------------------------------------------------------------------------------- /packages/ap_common_firebase/.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: f139b11009aeb8ed2a3a3aa8b0066e482709dde3 8 | channel: unknown 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /packages/ap_common_firebase/.pubignore: -------------------------------------------------------------------------------- 1 | example/ 2 | build/ 3 | pubspec_overrides.yaml -------------------------------------------------------------------------------- /packages/ap_common_firebase/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2021 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_firebase/README.md: -------------------------------------------------------------------------------- 1 | # 校務通系列 Firebase 共用 2 | 3 | 基於應用校務通系列使用到 Firebase 的功能製作的函式庫 4 | 5 | ## 套件使用要求 6 | - Flutter `v3.10` 以上 7 | 8 | 9 | ## Firebase 支援列表 10 | 11 | | 名稱 | Android | iOS | MacOS | Web | 12 | |:---------:|:-------:|:---:|:-----:|:---:| 13 | | `firebase_core`️ | ✔️ | ✔️ | ✔️ | ✔️ | 14 | | `firebase_analytics`️ | ✔️ | ✔️ | ✔️ | ✔️ | 15 | | `firebase_crashlytics`️ | ✔️ | ✔️ | ️ | ️ | 16 | | `firebase_messaging`️ | ✔️ | ✔️ | ✔️ | ✔️ | 17 | | `firebase_remote_config`️ | ✔️ | ✔️ | ✔️ | ✔️ | 18 | | `firebase_performance`️ | ✔️ | ✔️ | ️ | ✔️ | 19 | 20 | ## Getting Started 21 | 22 | 在 `pubspec.yaml` 中加入 package 23 | 24 | ```yaml 25 | ap_common_firebase: ^0.15.0 26 | ``` 27 | 28 | 執行加入套件 29 | 30 | ```bash 31 | $ flutter package get 32 | ``` 33 | 34 | 參考 [FlutterFire](https://firebase.flutter.dev/docs/overview) 的官方文件,加入對應 Firebase 功能的設定 -------------------------------------------------------------------------------- /packages/ap_common_firebase/RELEASE_NOTE.md: -------------------------------------------------------------------------------- 1 | ### 基於 Flutter v3.24.2 開發 2 | 3 | * 提升 `ap_common` 最低支援版本至 `0.25` 4 | * 更新 `ap_common` 最新版本 API 變動 5 | * 提升 Flutter 最低版本限制至 `3.13` 6 | * 更新 `firebase` 至 iOS `13` 限制最後版本 7 | * 更新 `firebase` 套件至最新版本 8 | * 更新套件至最新版本以修正 windows 版本設定 9 | -------------------------------------------------------------------------------- /packages/ap_common_firebase/lib/ap_common_firebase.dart: -------------------------------------------------------------------------------- 1 | export 'src/utils/firebase_analytics_utils.dart'; 2 | export 'src/utils/firebase_crashlytics_utils.dart'; 3 | export 'src/utils/firebase_message_utils.dart'; 4 | export 'src/utils/firebase_performance_utils.dart'; 5 | export 'src/utils/firebase_remote_config_utils.dart'; 6 | export 'src/utils/firebase_utils.dart'; 7 | -------------------------------------------------------------------------------- /packages/ap_common_firebase/lib/src/utils/firebase_performance_utils.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:firebase_performance/firebase_performance.dart'; 4 | import 'package:flutter/foundation.dart'; 5 | 6 | export 'package:firebase_performance/firebase_performance.dart'; 7 | 8 | class FirebasePerformancesUtils { 9 | FirebasePerformancesUtils() { 10 | if (isSupported) { 11 | performance = FirebasePerformance.instance; 12 | } 13 | } 14 | static FirebasePerformancesUtils? _instance; 15 | 16 | //ignore: prefer_constructors_over_static_methods 17 | static FirebasePerformancesUtils get instance { 18 | return _instance ??= FirebasePerformancesUtils(); 19 | } 20 | 21 | static bool get isSupported => kIsWeb || Platform.isAndroid || Platform.isIOS; 22 | 23 | FirebasePerformance? performance; 24 | 25 | void init() { 26 | performance?.setPerformanceCollectionEnabled(!kDebugMode); 27 | } 28 | 29 | Trace? newTrace(String name) { 30 | return performance?.newTrace(name); 31 | } 32 | 33 | HttpMetric? newHttpMetric(String url, HttpMethod httpMethod) { 34 | return performance?.newHttpMetric(url, httpMethod); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /packages/ap_common_firebase/lib/src/utils/firebase_remote_config_utils.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; 4 | import 'package:firebase_remote_config/firebase_remote_config.dart'; 5 | import 'package:flutter/foundation.dart'; 6 | 7 | export 'package:firebase_remote_config/firebase_remote_config.dart'; 8 | 9 | class FirebaseRemoteConfigUtils { 10 | FirebaseRemoteConfigUtils() { 11 | if (isSupported) remoteConfig = FirebaseRemoteConfig.instance; 12 | } 13 | static FirebaseRemoteConfigUtils? _instance; 14 | 15 | //ignore: prefer_constructors_over_static_methods 16 | static FirebaseRemoteConfigUtils get instance { 17 | return _instance ??= FirebaseRemoteConfigUtils(); 18 | } 19 | 20 | FirebaseRemoteConfig? remoteConfig; 21 | 22 | static bool get isSupported => 23 | kIsWeb || Platform.isAndroid || Platform.isIOS || Platform.isMacOS; 24 | } 25 | 26 | extension RemoteConfigExtension on FirebaseRemoteConfig { 27 | VersionInfo get versionInfo => VersionInfo( 28 | code: getInt(ApConstants.appVersion), 29 | isForceUpdate: getBool(ApConstants.isForceUpdate), 30 | content: getString(ApConstants.newVersionContent), 31 | ); 32 | } 33 | -------------------------------------------------------------------------------- /packages/ap_common_firebase/lib/src/utils/firebase_utils.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:ap_common_firebase/src/utils/firebase_analytics_utils.dart'; 4 | import 'package:ap_common_firebase/src/utils/firebase_crashlytics_utils.dart'; 5 | import 'package:ap_common_firebase/src/utils/firebase_performance_utils.dart'; 6 | import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; 7 | import 'package:flutter/foundation.dart'; 8 | 9 | export 'package:firebase_analytics/firebase_analytics.dart'; 10 | export 'package:firebase_core/firebase_core.dart'; 11 | export 'package:firebase_crashlytics/firebase_crashlytics.dart'; 12 | export 'package:firebase_messaging/firebase_messaging.dart'; 13 | 14 | class FirebaseUtils { 15 | static FirebaseAnalytics? init() { 16 | registerApCommonService( 17 | analytics: FirebaseAnalyticsUtils(), 18 | crashlytics: FirebaseCrashlyticsUtils(), 19 | ); 20 | FirebasePerformancesUtils.instance.init(); 21 | return null; 22 | } 23 | 24 | static bool get isSupportCore => 25 | kIsWeb || Platform.isAndroid || Platform.isIOS || Platform.isMacOS; 26 | } 27 | -------------------------------------------------------------------------------- /packages/ap_common_firebase/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: ap_common_firebase 2 | description: ap_common for firebase instructure 3 | version: 0.17.0-dev.4 4 | homepage: https://github.com/abc873693/ap_common 5 | repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_firebase 6 | 7 | environment: 8 | sdk: '>=2.12.0 <4.0.0' 9 | flutter: ">=3.13.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | 15 | ap_common_flutter_core: ^0.0.3 16 | # path: ../../GitHub-NKUST-ITC/ap_common 17 | url_launcher: ^6.1.0 18 | #firebase must use particular version 19 | firebase_core: ^2.30.0 20 | firebase_analytics: ^10.10.7 21 | firebase_crashlytics: ^3.5.7 22 | firebase_messaging: ^14.9.4 23 | firebase_remote_config: ^4.4.7 24 | firebase_performance: ^0.9.4+7 25 | 26 | dev_dependencies: 27 | flutter_test: 28 | sdk: flutter 29 | 30 | 31 | #dependency_overrides: 32 | # ap_common: 33 | # path: ../../GitHub-NKUST-ITC/ap_common 34 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_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_flutter_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: "2663184aa79047d0a33a14a3b607954f8fdd8730" 8 | channel: "stable" 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_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_flutter_core/lib/ap_common_flutter_core.dart: -------------------------------------------------------------------------------- 1 | import 'package:ap_common_core/injector.dart'; 2 | import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; 3 | 4 | export 'package:ap_common_core/ap_common_core.dart'; 5 | export 'package:cross_file/cross_file.dart'; 6 | 7 | export 'src/callback/general_callback.dart'; 8 | export 'src/l10n/ap_localizations.dart'; 9 | export 'src/models/general_permission_status.dart'; 10 | export 'src/ui/ap_icon.dart'; 11 | export 'src/utilities/app_store_util.dart'; 12 | export 'src/utilities/media_util.dart'; 13 | export 'src/utilities/notification_util.dart'; 14 | export 'src/utilities/platform_calendar_util.dart'; 15 | export 'src/utilities/platform_util.dart'; 16 | export 'src/utilities/ui_util.dart'; 17 | 18 | void registerApCommonFlutter({ 19 | required UiUtil ui, 20 | required PlatformUtil platform, 21 | required MediaUtil media, 22 | required PlatformCalendarUtil platformCalendar, 23 | required NotificationUtil notification, 24 | required AppStoreUtil appStore, 25 | }) { 26 | injector 27 | ..registerSingleton(() => ui) 28 | ..registerSingleton(() => platform) 29 | ..registerSingleton(() => media) 30 | ..registerSingleton(() => platformCalendar) 31 | ..registerSingleton(() => notification) 32 | ..registerSingleton(() => appStore); 33 | } 34 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_core/lib/src/models/general_permission_status.dart: -------------------------------------------------------------------------------- 1 | enum GeneralPermissionStatus { 2 | notDetermined, 3 | restricted, 4 | denied, 5 | authorized, 6 | notSupported, 7 | } 8 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_core/lib/src/utilities/app_store_util.dart: -------------------------------------------------------------------------------- 1 | import 'package:ap_common_core/injector.dart'; 2 | import 'package:ap_common_flutter_core/src/models/general_permission_status.dart'; 3 | 4 | abstract class AppStoreUtil { 5 | static AppStoreUtil get instance => injector.get(); 6 | 7 | Future get isAppTrackingApiSupported; 8 | 9 | Future get trackingAuthorizationStatus; 10 | 11 | Future openAppReview({ 12 | String defaultUrl = '', 13 | }); 14 | 15 | Future requestTrackingAuthorization(); 16 | } 17 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_core/lib/src/utilities/media_util.dart: -------------------------------------------------------------------------------- 1 | import 'package:ap_common_core/injector.dart'; 2 | import 'package:ap_common_flutter_core/src/callback/general_callback.dart'; 3 | import 'package:cross_file/cross_file.dart'; 4 | import 'package:flutter/foundation.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | abstract class MediaUtil { 8 | static MediaUtil get instance => injector.get(); 9 | 10 | Future pickImage(); 11 | 12 | Future saveImage( 13 | BuildContext context, { 14 | required ByteData byteData, 15 | required String fileName, 16 | required String successMessage, 17 | GeneralResponseCallback? onSuccess, 18 | GeneralResponseCallback? onError, 19 | }); 20 | } 21 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_core/lib/src/utilities/platform_calendar_util.dart: -------------------------------------------------------------------------------- 1 | import 'package:ap_common_core/injector.dart'; 2 | 3 | abstract class PlatformCalendarUtil { 4 | static PlatformCalendarUtil get instance => 5 | injector.get(); 6 | 7 | Future addToApp({ 8 | required String title, 9 | String? description, 10 | String? location, 11 | String? timeZone, 12 | required DateTime startDate, 13 | required DateTime endDate, 14 | bool allDay = false, 15 | Map? extra, 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_core/lib/src/utilities/platform_util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:ap_common_core/injector.dart'; 4 | 5 | abstract class PlatformUtil { 6 | static PlatformUtil get instance => injector.get(); 7 | 8 | Future launchUrl(String url); 9 | 10 | Future callPhone(String url); 11 | 12 | Future shareTo( 13 | String content, { 14 | Rect? sharePositionOrigin, 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_core/lib/src/utilities/ui_util.dart: -------------------------------------------------------------------------------- 1 | import 'package:ap_common_core/injector.dart'; 2 | import 'package:flutter/widgets.dart'; 3 | 4 | abstract class UiUtil { 5 | static UiUtil get instance => injector.get(); 6 | 7 | void showToast( 8 | BuildContext context, 9 | String message, { 10 | int? gravity, 11 | }); 12 | } 13 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_core/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: ap_common_flutter_core 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_flutter_core 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_core: ^0.0.5 16 | dio: ^5.7.0 17 | intl: ">=0.16.0 <1.0.0" 18 | multiple_localization: ^0.5.0 19 | cross_file: ^0.3.4+2 20 | 21 | dev_dependencies: 22 | flutter_test: 23 | sdk: flutter 24 | 25 | flutter: 26 | 27 | flutter_intl: 28 | enabled: true 29 | class_name: ApLocalizations 30 | main_locale: 'zh_TW' 31 | arb_dir: lib/src/l10n 32 | output_dir: lib/src/l10n 33 | use_deferred_loading: true 34 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_platform/.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 -------------------------------------------------------------------------------- /packages/ap_common_flutter_platform/.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_flutter_platform/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_flutter_platform/lib/ap_common_flutter_platform.dart: -------------------------------------------------------------------------------- 1 | export 'src/utilities/ap_media_util.dart'; 2 | export 'src/utilities/ap_platform_util.dart'; 3 | export 'src/utilities/app_store_util.dart'; 4 | export 'src/utilities/notification_utils.dart'; 5 | export 'src/utilities/platform_calendar_util.dart'; 6 | export 'src/utilities/preferences.dart'; 7 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_platform/lib/src/utilities/ap_platform_util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'dart:ui'; 3 | 4 | import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; 5 | import 'package:package_info_plus/package_info_plus.dart'; 6 | import 'package:share_plus/share_plus.dart'; 7 | import 'package:url_launcher/url_launcher.dart' as url_launcher; 8 | 9 | class ApPlatformUtil extends PlatformUtil { 10 | @override 11 | Future launchUrl(String url) async { 12 | await url_launcher.launchUrl(Uri.parse(url)); 13 | } 14 | 15 | @override 16 | Future callPhone(String url) async { 17 | String newUrl = url.replaceAll('#', ','); 18 | newUrl = newUrl.replaceAll('(', ''); 19 | newUrl = newUrl.replaceAll(')', ''); 20 | newUrl = newUrl.replaceAll('-', ''); 21 | newUrl = newUrl.replaceAll(' ', ''); 22 | newUrl = 'tel:$newUrl'; 23 | await url_launcher.launchUrl(Uri.parse(newUrl)); 24 | } 25 | 26 | @override 27 | Future shareTo( 28 | String content, { 29 | Rect? sharePositionOrigin, 30 | }) async { 31 | final PackageInfo packageInfo = await PackageInfo.fromPlatform(); 32 | Share.share( 33 | '$content\n\n' 34 | 'Send from ${packageInfo.appName} ${Platform.operatingSystem}', 35 | sharePositionOrigin: sharePositionOrigin, 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_platform/lib/src/utilities/platform_calendar_util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:add_2_calendar/add_2_calendar.dart'; 4 | import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; 5 | import 'package:flutter/foundation.dart'; 6 | 7 | export 'package:add_2_calendar/add_2_calendar.dart'; 8 | 9 | class ApPlatformCalendarUtil extends PlatformCalendarUtil { 10 | static bool isSupported = !kIsWeb && (Platform.isAndroid || Platform.isIOS); 11 | 12 | static ApPlatformCalendarUtil? _instance; 13 | 14 | //ignore: prefer_constructors_over_static_methods 15 | static ApPlatformCalendarUtil get instance { 16 | return _instance ??= ApPlatformCalendarUtil(); 17 | } 18 | 19 | @override 20 | Future addToApp({ 21 | required String title, 22 | String? description, 23 | String? location, 24 | String? timeZone, 25 | required DateTime startDate, 26 | required DateTime endDate, 27 | bool allDay = false, 28 | Map? extra, 29 | }) async { 30 | return Add2Calendar.addEvent2Cal( 31 | Event( 32 | title: title, 33 | description: description, 34 | timeZone: timeZone, 35 | startDate: startDate, 36 | endDate: endDate, 37 | allDay: allDay, 38 | ), 39 | ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_platform/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: ap_common_flutter_platform 2 | description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" 3 | version: 0.0.4 4 | homepage: https://github.com/abc873693/ap_common 5 | repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_flutter_platform 6 | 7 | environment: 8 | sdk: ^3.5.3 9 | flutter: ">=1.17.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | ap_common_flutter_core: ^0.0.3 15 | 16 | # Dart Package 17 | encrypt: ^5.0.1 18 | timezone: ">=0.9.0 <1.0.0" 19 | sprintf: ^7.0.0 20 | # Flutter Native Plugin 21 | app_tracking_transparency: ^2.0.6 22 | flutter_local_notifications: ^17.2.2 23 | shared_preferences: ^2.5.0 24 | url_launcher: ^6.2.5 25 | share_plus: ">=10.1.0 <=11.0.0" 26 | package_info_plus: ^8.3.0 27 | add_2_calendar: ^3.0.1 28 | in_app_review: ^2.0.3 29 | path: ^1.7.0 30 | path_provider: ^2.1.2 31 | image_picker: ^1.0.7 32 | photo_manager: ^3.6.0 33 | file_saver: ^0.2.12 34 | 35 | dev_dependencies: 36 | flutter_test: 37 | sdk: flutter 38 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_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_flutter_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_flutter_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_flutter_ui/assets/icons/barcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/packages/ap_common_flutter_ui/assets/icons/barcode.png -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/assets/icons/calendar_import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/packages/ap_common_flutter_ui/assets/icons/calendar_import.png -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/assets/icons/qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/packages/ap_common_flutter_ui/assets/icons/qrcode.png -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/assets/images/dash_line_dark.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/packages/ap_common_flutter_ui/assets/images/dash_line_dark.webp -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/assets/images/dash_line_light.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/packages/ap_common_flutter_ui/assets/images/dash_line_light.webp -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/assets/images/drawer_background_dark.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/packages/ap_common_flutter_ui/assets/images/drawer_background_dark.webp -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/assets/images/drawer_background_light.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/packages/ap_common_flutter_ui/assets/images/drawer_background_light.webp -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/assets/images/email.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/packages/ap_common_flutter_ui/assets/images/email.webp -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/assets/images/fb.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/packages/ap_common_flutter_ui/assets/images/fb.webp -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/assets/images/gdg_on_campus_nkust_itc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/packages/ap_common_flutter_ui/assets/images/gdg_on_campus_nkust_itc.jpg -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/assets/images/github.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/packages/ap_common_flutter_ui/assets/images/github.webp -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/assets/images/instagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/packages/ap_common_flutter_ui/assets/images/instagram.png -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/assets/images/nkutst_itc.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/packages/ap_common_flutter_ui/assets/images/nkutst_itc.webp -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/assets/images/nsysu_gdsc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/packages/ap_common_flutter_ui/assets/images/nsysu_gdsc.png -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/lib/ap_common_flutter_ui.dart: -------------------------------------------------------------------------------- 1 | export 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; 2 | export 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; 3 | 4 | export 'src/pages/about_us_page.dart'; 5 | export 'src/resources/ap_colors.dart'; 6 | export 'src/resources/ap_theme.dart'; 7 | export 'src/resources/resources.dart'; 8 | export 'src/scaffold/course_scaffold.dart'; 9 | export 'src/scaffold/home_page_scaffold.dart'; 10 | export 'src/scaffold/image_viewer_scaffold.dart'; 11 | export 'src/scaffold/login_scaffold.dart'; 12 | export 'src/scaffold/score_scaffold.dart'; 13 | export 'src/scaffold/user_info_scaffold.dart'; 14 | export 'src/utils/ap_ui_util.dart'; 15 | export 'src/utils/ap_utils.dart'; 16 | export 'src/utils/app_tracking_utils.dart'; 17 | export 'src/utils/dialog_utils.dart'; 18 | export 'src/utils/toast.dart'; 19 | export 'src/views/notification_list_view.dart'; 20 | export 'src/views/pdf_view.dart'; 21 | export 'src/views/phone_list_view.dart'; 22 | export 'src/widgets/ap_drawer.dart'; 23 | export 'src/widgets/ap_network_image.dart'; 24 | export 'src/widgets/default_dialog.dart'; 25 | export 'src/widgets/dialog_option.dart'; 26 | export 'src/widgets/hint_content.dart'; 27 | export 'src/widgets/item_picker.dart'; 28 | export 'src/widgets/option_dialog.dart'; 29 | export 'src/widgets/progress_dialog.dart'; 30 | export 'src/widgets/setting_page_widgets.dart'; 31 | export 'src/widgets/yes_no_dialog.dart'; 32 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/lib/src/resources/ap_image_assets.dart: -------------------------------------------------------------------------------- 1 | part of 'resources.dart'; 2 | 3 | class ApImageAssets { 4 | ApImageAssets._(); 5 | 6 | static const String email = 7 | 'packages/ap_common_flutter_ui/assets/images/email.webp'; 8 | static const String github = 9 | 'packages/ap_common_flutter_ui/assets/images/github.webp'; 10 | static const String drawerBackgroundLight = 11 | 'packages/ap_common_flutter_ui/assets/images/drawer_background_light.webp'; 12 | static const String drawerBackgroundDark = 13 | 'packages/ap_common_flutter_ui/assets/images/drawer_background_dark.webp'; 14 | static const String nkutstItc = 15 | 'packages/ap_common_flutter_ui/assets/images/nkutst_itc.webp'; 16 | static const String gdgOnCampusNkustItc = 17 | 'packages/ap_common_flutter_ui/assets/images/gdg_on_campus_nkust_itc.jpg'; 18 | static const String nsysuGdsc = 19 | 'packages/ap_common_flutter_ui/assets/images/nsysu_gdsc.png'; 20 | static const String fb = 21 | 'packages/ap_common_flutter_ui/assets/images/fb.webp'; 22 | static const String instagram = 23 | 'packages/ap_common_flutter_ui/assets/images/instagram.png'; 24 | static const String dashLineDark = 25 | 'packages/ap_common_flutter_ui/assets/images/dash_line_dark.webp'; 26 | static const String dashLineLight = 27 | 'packages/ap_common_flutter_ui/assets/images/dash_line_light.webp'; 28 | } 29 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/lib/src/resources/ap_image_icons.dart: -------------------------------------------------------------------------------- 1 | part of 'resources.dart'; 2 | 3 | class ApImageIcons { 4 | ApImageIcons._(); 5 | 6 | static const String calendarImport = 7 | 'packages/ap_common_flutter_ui/assets/icons/calendar_import.png'; 8 | static const String qrcode = 9 | 'packages/ap_common_flutter_ui/assets/icons/qrcode.png'; 10 | static const String barcode = 11 | 'packages/ap_common_flutter_ui/assets/icons/barcode.png'; 12 | } 13 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/lib/src/resources/resources.dart: -------------------------------------------------------------------------------- 1 | part 'ap_image_assets.dart'; 2 | 3 | part 'ap_image_icons.dart'; 4 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/lib/src/utils/ap_ui_util.dart: -------------------------------------------------------------------------------- 1 | import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; 2 | import 'package:ap_common_flutter_ui/src/resources/ap_theme.dart'; 3 | import 'package:ap_common_flutter_ui/src/utils/toast.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | class ApUiUtil extends UiUtil { 7 | @override 8 | void showToast( 9 | BuildContext context, 10 | String? message, { 11 | int? gravity, 12 | }) { 13 | Toast.show( 14 | message, 15 | context, 16 | duration: Toast.lengthLong, 17 | gravity: gravity ?? Toast.bottom, 18 | textStyle: TextStyle( 19 | color: ApTheme.of(context).toastText, 20 | ), 21 | backgroundColor: ApTheme.of(context).toastBackground, 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/lib/src/widgets/ap_network_image.dart: -------------------------------------------------------------------------------- 1 | import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; 2 | import 'package:cached_network_image/cached_network_image.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class ApNetworkImage extends StatelessWidget { 6 | const ApNetworkImage({super.key, required this.url}); 7 | final String url; 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return ApUtils.isSupportCacheNetworkImage 12 | ? CachedNetworkImage( 13 | imageUrl: url, 14 | placeholder: ( 15 | BuildContext context, 16 | String url, 17 | ) => 18 | const Center( 19 | child: CircularProgressIndicator(), 20 | ), 21 | errorWidget: ( 22 | BuildContext context, 23 | String url, 24 | dynamic error, 25 | ) => 26 | Icon(ApIcon.error), 27 | ) 28 | : Image.network(url); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/lib/src/widgets/dialog_option.dart: -------------------------------------------------------------------------------- 1 | import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class DialogOption extends StatelessWidget { 5 | const DialogOption({ 6 | super.key, 7 | required this.text, 8 | required this.check, 9 | required this.onPressed, 10 | }); 11 | 12 | final String text; 13 | final bool check; 14 | final Function() onPressed; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return SimpleDialogOption( 19 | onPressed: onPressed, 20 | child: Row( 21 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 22 | children: [ 23 | Expanded( 24 | child: Padding( 25 | padding: const EdgeInsets.symmetric(vertical: 2.0), 26 | child: Text( 27 | text, 28 | style: TextStyle( 29 | fontSize: 16.0, 30 | color: check ? ApTheme.of(context).blueAccent : null, 31 | ), 32 | overflow: TextOverflow.clip, 33 | ), 34 | ), 35 | ), 36 | if (check) 37 | Icon( 38 | ApIcon.check, 39 | color: ApTheme.of(context).blueAccent, 40 | ), 41 | ], 42 | ), 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/lib/src/widgets/hint_content.dart: -------------------------------------------------------------------------------- 1 | import 'package:ap_common_flutter_ui/src/resources/ap_theme.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class HintContent extends StatelessWidget { 5 | const HintContent({ 6 | required this.icon, 7 | required this.content, 8 | }); 9 | 10 | final IconData icon; 11 | final String content; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Center( 16 | child: Flex( 17 | mainAxisAlignment: MainAxisAlignment.center, 18 | direction: Axis.vertical, 19 | children: [ 20 | Container( 21 | padding: const EdgeInsets.all(25.0), 22 | decoration: BoxDecoration( 23 | image: DecorationImage( 24 | image: AssetImage(ApTheme.of(context).dashLine), 25 | ), 26 | ), 27 | child: Icon( 28 | icon, 29 | size: 50.0, 30 | color: ApTheme.of(context).blueAccent, 31 | ), 32 | ), 33 | const SizedBox(height: 20.0), 34 | Text( 35 | content, 36 | textAlign: TextAlign.center, 37 | style: TextStyle(color: ApTheme.of(context).grey), 38 | ), 39 | ], 40 | ), 41 | ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/lib/src/widgets/progress_dialog.dart: -------------------------------------------------------------------------------- 1 | import 'package:ap_common_flutter_ui/src/resources/ap_theme.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class ProgressDialog extends StatelessWidget { 5 | const ProgressDialog(this.content); 6 | 7 | final String content; 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return AlertDialog( 12 | shape: const RoundedRectangleBorder( 13 | borderRadius: BorderRadius.all( 14 | Radius.circular(16), 15 | ), 16 | ), 17 | content: Column( 18 | mainAxisSize: MainAxisSize.min, 19 | mainAxisAlignment: MainAxisAlignment.center, 20 | children: [ 21 | const SizedBox(height: 8.0), 22 | CircularProgressIndicator( 23 | valueColor: 24 | AlwaysStoppedAnimation(ApTheme.of(context).blueAccent), 25 | ), 26 | const SizedBox(height: 28.0), 27 | Text( 28 | content, 29 | style: TextStyle(color: ApTheme.of(context).blueAccent), 30 | textAlign: TextAlign.center, 31 | ), 32 | ], 33 | ), 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /packages/ap_common_flutter_ui/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: ap_common_flutter_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_flutter_ui 6 | 7 | environment: 8 | sdk: ^3.4.0 9 | flutter: ">=3.22.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | ap_common_flutter_core: ^0.0.3 15 | # Dart Package 16 | sprintf: ^7.0.0 17 | # Flutter UI Package 18 | photo_view: ^0.15.0 19 | barcode_widget: ^2.0.1 20 | barcode: ^2.2.1 21 | pdf: ^3.8.1 22 | auto_size_text_pk: ^3.0.0 23 | flutter_linkify: ^6.0.0 24 | cupertino_back_gesture: ^0.1.0 25 | # Flutter Native Plugin 26 | package_info_plus: ^8.0.2 27 | flutter_keyboard_visibility: ^6.0.0 28 | printing: ^5.10.4 29 | cached_network_image: ^3.3.1 30 | 31 | dev_dependencies: 32 | flutter_test: 33 | sdk: flutter 34 | spider: ^4.2.2 35 | 36 | flutter: 37 | assets: 38 | - assets/images/ 39 | - assets/icons/ -------------------------------------------------------------------------------- /packages/ap_common_plugin/.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 | 31 | android/gradlew 32 | android/gradlew.bat 33 | melos_ap_common_plugin.iml 34 | pubspec.lock -------------------------------------------------------------------------------- /packages/ap_common_plugin/.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: f139b11009aeb8ed2a3a3aa8b0066e482709dde3 8 | channel: unknown 9 | 10 | project_type: plugin 11 | -------------------------------------------------------------------------------- /packages/ap_common_plugin/.pubignore: -------------------------------------------------------------------------------- 1 | example/ 2 | android/gradlew 3 | android/gradlew.bat 4 | melos_ap_common_plugin.iml 5 | pubspec.lock 6 | pubspec_overrides.yaml -------------------------------------------------------------------------------- /packages/ap_common_plugin/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2021 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_plugin/README.md: -------------------------------------------------------------------------------- 1 | # 校務通系列 Native Plugin 共用 2 | 3 | 基於應用校務通系列使用到原生(Native)的功能製作的Plugin 4 | 5 | ## 套件使用要求 6 | - Flutter `v1.20` 以上 7 | - [ap_common](https://pub.dev/packages/ap_common) `v0.11` 以上 8 | 9 | 10 | ## 支援列表 11 | 12 | | 名稱 | Android | iOS | MacOS | Web | 13 | |:---------:|:-------:|:---:|:-----:|:---:| 14 | | 桌面小工具 | ✔️ | ✔️ | ️ | ️ | 15 | 16 | ## Demo 17 | 18 | ## Getting Started 19 | 20 | 在 `pubspec.yaml` 中加入 package 21 | 22 | v0.1.2 版本以後 23 | 24 | ```yaml 25 | ap_common_firebase: ^0.1.2 26 | ``` 27 | 28 | 29 | v0.5.0 版本以前 30 | 31 | ```yaml 32 | ap_common_firebase: 33 | git: 34 | url: https://github.com/abc873693/ap_common_plugin 35 | ref: v0.1.2 36 | ``` 37 | 38 | 執行加入套件 39 | 40 | ```bash 41 | $ flutter package get 42 | ``` -------------------------------------------------------------------------------- /packages/ap_common_plugin/RELEASE_NOTE.md: -------------------------------------------------------------------------------- 1 | * 修正小工具 Android 12 錯誤 -------------------------------------------------------------------------------- /packages/ap_common_plugin/android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /packages/ap_common_plugin/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /packages/ap_common_plugin/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/packages/ap_common_plugin/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /packages/ap_common_plugin/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-7.5-all.zip 6 | -------------------------------------------------------------------------------- /packages/ap_common_plugin/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ap_common_plugin' 2 | -------------------------------------------------------------------------------- /packages/ap_common_plugin/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /packages/ap_common_plugin/android/src/main/kotlin/me/rainvisitor/ap_common_plugin/ApCommonPlugin.kt: -------------------------------------------------------------------------------- 1 | package me.rainvisitor.ap_common_plugin 2 | 3 | import androidx.annotation.NonNull; 4 | import io.flutter.embedding.engine.plugins.FlutterPlugin 5 | import io.flutter.plugin.common.MethodCall 6 | import io.flutter.plugin.common.MethodChannel 7 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler 8 | import io.flutter.plugin.common.MethodChannel.Result 9 | 10 | /** ApCommonPlugin */ 11 | public class ApCommonPlugin: FlutterPlugin, MethodCallHandler { 12 | override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { 13 | val channel = MethodChannel(flutterPluginBinding.getFlutterEngine().getDartExecutor(), "ap_common_plugin") 14 | channel.setMethodCallHandler(ApCommonPlugin()); 15 | } 16 | 17 | override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) { 18 | if (call.method == "getPlatformVersion") { 19 | result.success("Android ${android.os.Build.VERSION.RELEASE}") 20 | } else { 21 | result.notImplemented() 22 | } 23 | } 24 | 25 | override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) { 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/ap_common_plugin/android/src/main/kotlin/me/rainvisitor/ap_common_plugin/Course.kt: -------------------------------------------------------------------------------- 1 | package me.rainvisitor.ap_common_plugin 2 | 3 | class Course(var location: String, var title: String, var startTime: String) -------------------------------------------------------------------------------- /packages/ap_common_plugin/android/src/main/res/drawable/ic_refresh.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/ap_common_plugin/android/src/main/res/values-zh-rTW/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 上課提醒 3 | 太好了今天沒有任何課 4 | 尚無課程資料 5 | 下一節課是%s\n在 %s 的 %s 6 | 太好了今天已經沒有任何課 7 | 請進入App重新載入課表 8 | 9 | -------------------------------------------------------------------------------- /packages/ap_common_plugin/android/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Course Hint 3 | Good! No course today 4 | No course data yet 5 | The next class will be %s\n%s in %s 6 | Good! No course today already 7 | Please enter app reload Course Data 8 | -------------------------------------------------------------------------------- /packages/ap_common_plugin/android/src/main/res/xml/course_appwidget_info.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ap_common_plugin/ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/Generated.xcconfig 37 | /Flutter/ephemeral/ 38 | /Flutter/flutter_export_environment.sh 39 | -------------------------------------------------------------------------------- /packages/ap_common_plugin/ios/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/packages/ap_common_plugin/ios/Assets/.gitkeep -------------------------------------------------------------------------------- /packages/ap_common_plugin/ios/Classes/ApCommonPlugin.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface ApCommonPlugin : NSObject 4 | @end 5 | -------------------------------------------------------------------------------- /packages/ap_common_plugin/ios/Classes/ApCommonPlugin.m: -------------------------------------------------------------------------------- 1 | #import "ApCommonPlugin.h" 2 | #if __has_include() 3 | #import 4 | #else 5 | // Support project import fallback if the generated compatibility header 6 | // is not copied when this plugin is created as a library. 7 | // https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 8 | #import "ap_common_plugin-Swift.h" 9 | #endif 10 | 11 | @implementation ApCommonPlugin 12 | + (void)registerWithRegistrar:(NSObject*)registrar { 13 | [SwiftApCommonPlugin registerWithRegistrar:registrar]; 14 | } 15 | @end 16 | -------------------------------------------------------------------------------- /packages/ap_common_plugin/ios/Classes/SwiftApCommonPlugin.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | 4 | public class SwiftApCommonPlugin: NSObject, FlutterPlugin { 5 | public static func register(with registrar: FlutterPluginRegistrar) { 6 | let channel = FlutterMethodChannel(name: "ap_common_plugin", binaryMessenger: registrar.messenger()) 7 | let instance = SwiftApCommonPlugin() 8 | registrar.addMethodCallDelegate(instance, channel: channel) 9 | } 10 | 11 | public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { 12 | result("iOS " + UIDevice.current.systemVersion) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/ap_common_plugin/ios/Resources/PrivacyInfo.xcprivacy: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSPrivacyTrackingDomains 6 | 7 | NSPrivacyAccessedAPITypes 8 | 9 | NSPrivacyCollectedDataTypes 10 | 11 | NSPrivacyTracking 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /packages/ap_common_plugin/ios/ap_common_plugin.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. 3 | # Run `pod lib lint ap_common_plugin.podspec' to validate before publishing. 4 | # 5 | Pod::Spec.new do |s| 6 | s.name = 'ap_common_plugin' 7 | s.version = '0.0.1' 8 | s.summary = 'A new Flutter plugin project.' 9 | s.description = <<-DESC 10 | A new Flutter plugin. 11 | DESC 12 | s.homepage = 'http://example.com' 13 | s.license = { :file => '../LICENSE' } 14 | s.author = { 'Your Company' => 'email@example.com' } 15 | s.source = { :path => '.' } 16 | s.source_files = 'Classes/**/*' 17 | s.dependency 'Flutter' 18 | s.platform = :ios, '12.0' 19 | 20 | # Flutter.framework does not contain a i386 slice. 21 | s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } 22 | s.swift_version = '5.0' 23 | 24 | # If your plugin requires a privacy manifest, for example if it uses any 25 | # required reason APIs, update the PrivacyInfo.xcprivacy file to describe your 26 | # plugin's privacy impact, and then uncomment this line. For more information, 27 | # see https://developer.apple.com/documentation/bundleresources/privacy_manifest_files 28 | # s.resource_bundles = {'hell_privacy' => ['Resources/PrivacyInfo.xcprivacy']} 29 | end 30 | -------------------------------------------------------------------------------- /packages/ap_common_plugin/lib/ap_common_plugin.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/services.dart'; 4 | 5 | class ApCommonPlugin { 6 | static const MethodChannel _channel = MethodChannel('ap_common_plugin'); 7 | 8 | static Future get platformVersion async { 9 | final String? version = await _channel.invokeMethod('getPlatformVersion'); 10 | return version; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/ap_common_plugin/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: ap_common_plugin 2 | description: ap_common Native Plugin 3 | version: 0.5.0-dev.4 4 | homepage: https://github.com/abc873693/ap_common 5 | repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_plugin 6 | 7 | environment: 8 | sdk: '>=3.0.0 <4.0.0' 9 | flutter: ">=3.0.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | 15 | dev_dependencies: 16 | flutter_test: 17 | sdk: flutter 18 | 19 | flutter: 20 | plugin: 21 | platforms: 22 | android: 23 | package: me.rainvisitor.ap_common_plugin 24 | pluginClass: ApCommonPlugin 25 | ios: 26 | pluginClass: ApCommonPlugin -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: ap_common 2 | 3 | environment: 4 | sdk: ">=3.0.0 <4.0.0" 5 | flutter: ">=3.24.0 <4.0.0" 6 | 7 | dev_dependencies: 8 | melos: ^6.1.0 9 | lint: ^2.1.2 -------------------------------------------------------------------------------- /website/.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "ap-common" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /website/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | /build 6 | 7 | # Generated files 8 | .docusaurus 9 | .cache-loader 10 | 11 | # Misc 12 | .DS_Store 13 | .env.local 14 | .env.development.local 15 | .env.test.local 16 | .env.production.local 17 | 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | firebase-debug.log* 22 | 23 | # Firebase cache 24 | .firebase/ -------------------------------------------------------------------------------- /website/README.md: -------------------------------------------------------------------------------- 1 | # Website 2 | 3 | This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. 4 | 5 | ## Installation 6 | 7 | ```console 8 | yarn install 9 | ``` 10 | 11 | ## Local Development 12 | 13 | ```console 14 | yarn start 15 | ``` 16 | 17 | This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. 18 | 19 | ## Build 20 | 21 | ```console 22 | yarn build 23 | ``` 24 | 25 | This command generates static content into the `build` directory and can be served using any static contents hosting service. 26 | 27 | ## Deployment 28 | 29 | ```console 30 | GIT_USER= USE_SSH=true yarn deploy 31 | ``` 32 | 33 | If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. 34 | -------------------------------------------------------------------------------- /website/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')], 3 | }; 4 | -------------------------------------------------------------------------------- /website/blog/2021-05-19-welcome.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: welcome 3 | title: Welcome 4 | authors: rainvisitor 5 | tags: [flutter, ap_common] 6 | --- 7 | 8 | 歡迎來到校務通的 Under World 9 | 10 | {/* truncate */} 11 | -------------------------------------------------------------------------------- /website/blog/authors.yml: -------------------------------------------------------------------------------- 1 | rainvisitor: 2 | name: Rainer 3 | title: 校務通維護者 4 | description: 'App Developer, Focus on Flutter' 5 | page: true 6 | url: https://github.com/abc873693 7 | image_url: https://avatars.githubusercontent.com/u/15196250?s=400&v=4 -------------------------------------------------------------------------------- /website/docs/api-models/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "API - Models", 3 | "position": 6 4 | } 5 | -------------------------------------------------------------------------------- /website/docs/api-models/cloud-message.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 7 3 | --- 4 | 5 | # CloudMessage 6 | 7 | 提供基本雲端通知所需的基本欄位,有整合 [`Hive`](https://pub.dev/packages/hive) 的 `HiveObject` 8 | 9 | | 參數名稱 | 型態 | 描述 | 10 | | ------------------------------- | ------------------------------- | ------------------------------- | 11 | | title | `String` | 標題 | 12 | | dateTime | `DateTime?` | 時間 | 13 | | content | `String?` | 內容 | 14 | | url | `String?` | 網址 | 15 | | imageUrl | `String?` | 圖片網址 | 16 | | data | `Map?` | 其他資料 | -------------------------------------------------------------------------------- /website/docs/api-models/notification-data.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 5 3 | --- 4 | 5 | # NotificationData 6 | 7 | | 參數名稱 | 型態 | 描述 | 8 | | ------------------------------- | ------------------------------- | ------------------------------- | 9 | | data | `List` | 最新消息列表 | 10 | | page | `int` | 第幾頁 | 11 | 12 | ## Notification 13 | 14 | | 參數名稱 | 型態 | 描述 | 15 | | ------------------------------- | ------------------------------- | ------------------------------- | 16 | | id | String | id | 17 | | link | String | 連結 | 18 | | title | String | 標題 | 19 | | department | String | 發布處室 | 20 | | date | String | 日期 格式 `YYYY-MM-DD` | 21 | 22 | ## 範例 23 | 24 | ```json 25 | //TODO 修改 26 | ``` -------------------------------------------------------------------------------- /website/docs/api-models/phone-data.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 6 3 | --- 4 | 5 | # PhoneModel 6 | 7 | | 參數名稱 | 型態 | 描述 | 8 | | ------------------------------- | ------------------------------- | ------------------------------- | 9 | | name | String | 名稱 | 10 | | number | String | 電話號碼 | 11 | 12 | ## 範例 13 | 14 | ```json 15 | //TODO 修改 16 | ``` -------------------------------------------------------------------------------- /website/docs/api-models/user-info.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 5 3 | --- 4 | 5 | # UserInfo 6 | 7 | 使用者資訊 8 | 9 | | 參數名稱 | 型態 | 描述 | 10 | | ------------------------------- | ------------------------------- | ------------------------------- | 11 | | educationSystem | `String` | 學制 | 12 | | department | `String` | 科系 | 13 | | className | `String` | 班級名稱 | 14 | | id | `String` | 學號 | 15 | | name | `String` | 名字 | 16 | | pictureUrl | `String` | 照片網址,但 `UserInfoScaffold` 不使用此載入圖片 | 17 | | email | `String` | 電子信箱 | 18 | | pictureBytes | `Uint8List` | 照片Raw Data,`UserInfoScaffold` 使用此載入圖片 | 19 | 20 | ## 範例 21 | 22 | ```json 23 | { 24 | "educationSystem": "日間部四技", 25 | "department": "停車管理系", 26 | "className": "停車管理系四甲", 27 | "id": "1101234532", 28 | "name": "Dash", 29 | "pictureUrl": "https://i.imgur.com/5MBrWIB.png" 30 | } 31 | ``` -------------------------------------------------------------------------------- /website/docs/api-models/version-info.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | --- 4 | 5 | # VersionInfo 6 | 7 | 版本資訊,版本號(int)格式應該為語意化版本以每兩碼區隔 8 | 9 | 範例:`3.5.6` 轉換成版本號為 `30506` 10 | 11 | | 參數名稱 | 型態 | 描述 | 12 | | ------------------------------- | ------------------------------- | ------------------------------- | 13 | | code | int | 版本號,Android 應為 `Version Code`,iOS 和 macOS 應為 `Builder Number` | 14 | | isForceUpdate | VersionInfo | 是否強制更新 | 15 | | content | String | 更新內容 | -------------------------------------------------------------------------------- /website/docs/api-pages/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "API - 頁面", 3 | "position": 5 4 | } 5 | -------------------------------------------------------------------------------- /website/docs/api-pages/about-us-page.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | --- 4 | 5 | 此項目必須加入多國語言設定,否則會無法正常使用 6 | 7 | # 關於我們 AboutUsPage 8 | 9 | 提供校務通系列的歷任作者及社群介紹,可在此頁面放置自己專案的License,期望您使用這份套件時可以加入此頁面,以及PR這個頁面加入您的資訊,我會同步到所有校務通專案中 10 | 11 |
12 | drawing 13 | drawing 14 | drawing 15 |
16 | 17 | | 參數名稱 | 型態 | 描述 | 18 | | ------------------------------- | ------------------------------- | ------------------------------- | 19 | | assetImage | String | 頂端 Header 的圖片,採Asset Image 載入 | 20 | | fbFanPageUrl | String | Facebook 粉絲專頁網址 | 21 | | fbFanPageId | String | Facebook 粉絲專頁id,點擊facebook logo時優先以 app link 的方法開啟 | 22 | | githubUrl | String | GitHub 網址 | 23 | | githubName | String | GitHub 的 username 或 Oraganization GitHub logo時優先以 app link 的方法開啟 | 24 | | email | String | 聯絡 email | 25 | | appLicense | String | App的License | 26 | | actions | `List` | 右上角的元件列表,為Flutter Scaffold原生的API | 27 | | logEvent | Function(String name, String value) | 可搜集使用者行為的事件 | 28 | | setCurrentScreen | Function | 可搜集目前畫面的事件 | -------------------------------------------------------------------------------- /website/docs/api-pages/announcemnet-content-page.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 3 3 | --- 4 | 5 | 此項目必須加入多國語言設定,否則會無法正常使用 6 | 7 | # 最新消息詳細資訊 AnnouncementContentPage 8 | 9 | 最新消息詳細資訊,採用頁面顯示 10 | 11 | 手機介面 12 | 13 | drawing 14 | 15 | 平板 or 桌面版介面 16 | 17 | drawing 18 | 19 | 20 | | 參數名稱 | 型態 | 描述 | 21 | | ------------------------------- | ------------------------------- | ------------------------------- | 22 | | announcement | Announcement | 最新消息 | 23 | | logEvent | Function(String name, String value) | 可搜集使用者行為的事件 | 24 | | setCurrentScreen | Function | 可搜集目前畫面的事件 | -------------------------------------------------------------------------------- /website/docs/api-pages/cloud-message-page.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 2 3 | --- 4 | 5 | 此項目必須加入多國語言設定,否則會無法正常使用 6 | 7 | ## 雲端通知列表 CloudMessageListPage 8 | 9 | 顯示來自雲端通知的訊息,必須透過 [CloudMessageUtils](../api-utils/cloud-message-utils) 存取相關資訊 10 | 11 | ## 雲端通知內悚 CloudMessageContentPage 12 | 13 | 提供顯示 `CloudMessage` 內的資訊頁面 -------------------------------------------------------------------------------- /website/docs/api-pages/open-source-page.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 2 3 | --- 4 | 5 | 此項目必須加入多國語言設定,否則會無法正常使用 6 | 7 | # 開放原始碼 OpenSourcePage 8 | 9 | 列出校務通系統有使用到的開放原始碼的License 10 | -------------------------------------------------------------------------------- /website/docs/api-scaffolds/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "API - 骨架", 3 | "position": 3 4 | } 5 | -------------------------------------------------------------------------------- /website/docs/api-scaffolds/image-viewer-scaffold.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 5 3 | --- 4 | 5 | # 圖片瀏覽器骨架 ImageViewerScaffold 6 | 7 | 以 Package [photo_view](https://pub.dev/packages/photo_view) 封裝的圖片瀏覽器,可設定複數的圖片,透過 [`TabBarView`](https://api.flutter.dev/flutter/material/TabBarView-class.html) 瀏覽,若 `imageViewers` 的數量為1時則不顯示Tab 8 | 9 | ## 參數 10 | 11 | | 參數名稱 | 型態 | 描述 | 12 | | ------------------------------- | ------------------------------- | ------------------------------- | 13 | | title | `String` | `Scaffold` 標題 | 14 | | imageViewers | `List` | 圖片瀏覽器物件,載入 `ImageViewer` 的 `assetName` 的圖片 | 15 | | actions | `List` | 右上角的元件列表,為 Flutter `Scaffold` 原生的API | 16 | 17 | ## ImageViewer 18 | 19 | | 參數名稱 | 型態 | 描述 | 20 | | ------------------------------- | ------------------------------- | ------------------------------- | 21 | | title | `String` | 圖片名稱 | 22 | | assetName | `String` | 以 `Asset` 方式存取得圖片路徑 | 23 | 24 | -------------------------------------------------------------------------------- /website/docs/api-scaffolds/overview.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 0 3 | --- 4 | 5 | # 導覽 6 | 7 | 基於 Flutter 的 `Scaffold` 包裝功能,以功能為導向,像是首頁、課表、成績、Pdf 顯示 8 | 9 | :::caution 所有骨架使用時必須先完成 10 | - [主題色設定](../installation/theme) 11 | - [多國語言設定](../installation/localization) 12 | ::: 13 | -------------------------------------------------------------------------------- /website/docs/api-scaffolds/user-info-scaffold.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 6 3 | --- 4 | 5 | # 使用者資訊骨架 UserInfoScaffold 6 | 7 | 提供使用者資訊骨架 8 | - 可點擊右上角的icon,切換顯示 QR Code 或 Bar Code 9 | - QR Code 或 Bar Code 顯示時內容是學號 10 | - 部分欄位為 `Null` 時則不顯示 11 | 12 | 手機介面 13 | 14 |
15 | drawing 16 | drawing 17 |
18 | 19 | | 參數名稱 | 型態 | 描述 | 20 | | ------------------------------- | ------------------------------- | ------------------------------- | 21 | | userInfo | [`UserInfo`](../api-models/user-info) | 使用者資訊物件 | 22 | | heroTag | `String` | 照片的 Hero Tag,預設為 `tag_student_picture` | 23 | | actions | `List` | 右上角的元件列表,為 Flutter `Scaffold` 原生的API | 24 | | onRefresh | `Future Function()` | 下拉更新事件,需回傳更新後的使用者資訊 | 25 | | enableBarCode | `bool` | 是否顯示 Bar Code | 26 | 27 | ## 分析事件 28 | 29 | 使用抽象函式 `AnalyticsUtils.instance.logEvent()` 30 | 31 | | 事件名稱 | 描述 | 32 | | ------------------------------- | ------------------------------- | 33 | | `user_info_barcode_switch` | 切換 Qc Code 及 Bar Code 的點擊事件 | 34 | | `user_info_refresh` | 下拉式更新事件 | -------------------------------------------------------------------------------- /website/docs/api-utils/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "API - 工具類", 3 | "position": 2 4 | } 5 | -------------------------------------------------------------------------------- /website/docs/api-utils/app-store-util.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 9 3 | --- 4 | 5 | # ApAppStoreUtil 6 | 7 | :::info 實作類別 8 | 此為 `AppStoreUtil` 的實作類別 9 | ::: 10 | 11 | :::caution 注意 12 | 使用時必須先完成 [相關設定](../installation/app-tracking-transparency) 13 | ::: 14 | 15 | 提供顯示 App 與平台商店(Play Store / App Store)相關權限或功能的 API 16 | 17 | ## isAppTrackingApiSupported 18 | 19 | 目前實作有關的只有 Apple 平台的 `App Tracking API`,只僅於 iOS 14 以上會回傳 `true` 20 | ,其餘平台皆為 `false` 21 | 22 | ## trackingAuthorizationStatus 23 | 24 | 封裝套件 [`app_tracking_transparency`](https://developer.apple.com/documentation/apptrackingtransparency) 25 | 的變數`trackingAuthorizationStatus` 會轉換成通用的 `GeneralPermissionStatus` 26 | 27 | ## openAppReview 28 | 29 | 開啟原生評分功能,若無原生API則開啟 `defaultUrl` 30 | ,以 [in_app_review](https://pub.dev/packages/in_app_review) 呼叫原生評分 API,支援 `Android`、`iOS` 31 | 及 `macOS`,其他平台會透過 `PlatformUtil.instance.launchUrl(url)` 開啟連結 32 | 33 | | 參數名稱 | 型態 | 描述 | 34 | |------------|----------|-------------| 35 | | defaultUrl | `String` | 無原生API則開啟網址 | 36 | 37 | ## requestTrackingAuthorization 38 | 39 | 目前實作有關的只有 Apple 平台的 `App Tracking API`,開啟原生授權隱私權追蹤的授權 40 | -------------------------------------------------------------------------------- /website/docs/api-utils/cloud-message-utils.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 8 3 | --- 4 | 5 | # CloudMessageUtils 6 | 7 | :::caution 注意 8 | 因考量 Flutter 背景儲存機制無法實現,Hive 儲存雲端訊息功能已在 0.24.0 移除 9 | ::: 10 | 11 | 提供雲端通知相關的工具 -------------------------------------------------------------------------------- /website/docs/api-utils/crashlytics-utils.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 7 3 | --- 4 | 5 | # CrashlyticsUtil 6 | 7 | :::info 實作類別 8 | 目前可使用的實作類別有 `FirebaseCrashlyticsUtil` 9 | 10 | 必需透過套件 [`ap_common_firebase`](https://github.com/abc873693/ap_common_firebase/blob/master/lib/utils/firebase_analytics_utils.dart) 11 | 使用 12 | ::: 13 | 14 | 部分元件的崩潰或是發生錯誤會透過此類別紀錄 15 | 16 | 需透過 `registerApCommonService()` 指定成實例 17 | 18 | ## recordError 19 | 20 | 紀錄錯誤 21 | 22 | | 參數名稱 | 型態 | 描述 | 23 | |--------------|-----------------------------|--------| 24 | | exception | `dynamic` | 例外事件物件 | 25 | | stack | `StackTrace` | 函式堆疊紀錄 | 26 | | reason | `dynamic` | 原因 | 27 | | information | `Iterable` | 資訊 | 28 | | printDetails | `bool` | 是否列印細節 | 29 | 30 | ## log 31 | 32 | 事件紀錄 33 | 34 | | 參數名稱 | 型態 | 描述 | 35 | |------|----------|----| 36 | | name | `String` | 名稱 | -------------------------------------------------------------------------------- /website/docs/api-utils/platform-util.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 9 3 | --- 4 | 5 | # PlatformUtil 6 | 7 | :::info 實作類別 8 | 目前可使用的實作類別有 `ApPlatformUtil` 9 | 10 | 必需透過套件 [`ap_common_flutter_platform`](https://pub.dev/packages/ap_common_flutter_platform) 11 | 使用 12 | ::: 13 | 14 | 需透過 `registerApCommonFlutter()` 指定成實例,並透過 `PlatformUtil.instance` 使用 15 | 16 | 17 | ## launchUrl 18 | 19 | 開啟 URL,以 [url_launcher](https://pub.dev/packages/url_launcher) 實作 20 | 21 | | 參數名稱 | 型態 | 描述 | 22 | |------|----------|-----| 23 | | url | `String` | URL | 24 | 25 | ## callPhone 26 | 27 | 播打電話,會將 `#xxx(yyy)` 格式更改成 `tel:xxx,yyy` 28 | ,以 [url_launcher](https://pub.dev/packages/url_launcher) 實作 29 | 30 | 31 | | 參數名稱 | 型態 | 描述 | 32 | |------|----------|-----| 33 | | url | `String` | URL | 34 | 35 | ## shareTo 36 | 37 | 呼叫原生分享功能,以 [share_plus](https://pub.dev/packages/share_plus) 實作 38 | 39 | 分享格式 40 | 41 | ```s 42 | ${分享內容}\n\nSend from ${App名稱} ${作業系統名稱} 43 | ``` 44 | 45 | | 參數名稱 | 型態 | 描述 | 46 | |---------|----------|------| 47 | | content | `String` | 分享內容 | 48 | 49 | :::caution 注意 50 | 因為在 iPad 51 | 使用者會有圖層錯誤,需要另外加上此程式碼,詳細[可參考](https://github.com/fluttercommunity/plus_plugins/tree/main/packages/share_plus/share_plus#ipad) 52 | ::: 53 | 54 | ```dart 55 | 56 | final box = context.findRenderObject() as RenderBox?; 57 | 58 | PlatformUtil.instance.shareTo( 59 | 'Sharing Content', 60 | sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size, 61 | ); 62 | ``` -------------------------------------------------------------------------------- /website/docs/api-utils/preference-utils.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 4 3 | --- 4 | 5 | # PreferenceUtil 6 | 7 | :::info 實作類別 8 | 目前可使用的實作類別有 `ApPreferenceUtil` 9 | 10 | 必需透過套件 [`ap_common_flutter_platform`](https://pub.dev/packages/ap_common_flutter_platform),為套件 11 | 封裝 Flutter 官方維護的 [shared_preferences](https://pub.dev/packages/shared_preferences) 12 | ,支援所有平台,另外支援使用 [encrypt](https://pub.dev/packages/encrypt) 加密字串(AES cbc 模式)的功能。 13 | 14 | 使用時必須先完成 [相關設定](../installation/shared-preferences) 15 | ::: 16 | 17 | 本地偏好設定儲存,以 key-value 一對的類型為主 18 | 19 | 需透過 `registerApCommonCore()` 指定成實例 20 | -------------------------------------------------------------------------------- /website/docs/api-utils/ui-util.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 9 3 | --- 4 | 5 | # UiUtil 6 | 7 | :::info 實作類別 8 | 目前可使用的實作類別有 `ApUiUtil` 9 | 10 | 必需透過套件 [`ap_common_flutter_ui`](https://pub.dev/packages/ap_common_flutter_ui) 11 | 使用 12 | ::: 13 | 14 | 需透過 `registerApCommonFlutter()` 指定成實例,並透過 `ApUiUtil.instance` 使用 15 | 16 | ## showToast 17 | 18 | 顯示 Android 風格的 toast 提示字 19 | 20 | | 參數名稱 | 型態 | 描述 | 21 | |---------|----------------|-------------------------| 22 | | context | `BuildContext` | Flutter Widget context | 23 | | message | `String` | 想要顯示的文字 | 24 | | gravity | `int` | 顯示位置,預設為 `Toast.bottom` | -------------------------------------------------------------------------------- /website/docs/api-views/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "API - 畫面", 3 | "position": 4 4 | } 5 | -------------------------------------------------------------------------------- /website/docs/api-views/notification-list-view.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | --- 4 | 5 | # 校園最新消息列表 NotificationListView 6 | 7 | 提供校園最新消息列表 8 | - 點擊時會開啟 [`Notifications`](../api-models/notification-data) 中的 `link` 設定的連結 9 | - 長按時會啟動原生的分享功能,使用 [share](https://pub.dev/packages/share) 實作 10 | 11 | 手機介面,不包含 `AppBar` 及 `BottomNavigationBar` 的區塊 12 | 13 | drawing 14 | 15 | ## 參數 16 | 17 | | 參數名稱 | 型態 | 描述 | 18 | | ------------------------------- | ------------------------------- | ------------------------------- | 19 | | state | `NotificationState` | 必要欄位,總共有 `loading` `finish` `error` `empty` `offlineEmpty` 的狀態,只有`finish`才會顯示,其餘都是顯示錯誤狀況 | 20 | | notificationList | `List` | 校園最新消息列表 | 21 | | onRefresh | `Function()` | 下拉更新事件 | 22 | | onLoadingMore | `Function()` | 滾動最底事件 | 23 | 24 | ## 分析事件 25 | 26 | 使用抽象函式 `AnalyticsUtils.instance.logEvent()` 27 | 28 | | 事件名稱 | 描述 | 29 | | ------------------------------- | ------------------------------- | 30 | | `share_long_click` | 長按分享的事件 | 31 | | `notification_link_click` | 項目的點擊事件 | 32 | | `refresh` | 下拉式更新事件 | 33 | | `notification_load_more` | 當畫面滾動到最底部的事件 | -------------------------------------------------------------------------------- /website/docs/api-views/pdf-view.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 3 3 | --- 4 | 5 | # PDF骨架 PdfView 6 | 7 | 以套件 [pdf](https://pub.dev/packages/pdf) 封裝的PDF瀏覽器,另包含列印功能使用同作者開發的 [printing](https://pub.dev/packages/printing),支援所有平台 8 | 9 | 手機介面,不包含 `AppBar` 及 `BottomNavigationBar` 的區塊 10 | 11 | drawing 12 | 13 | ## 參數 14 | 15 | | 參數名稱 | 型態 | 描述 | 16 | | ------------------------------- | ------------------------------- | ------------------------------- | 17 | | state | `PdfState` | 畫面狀態,總共有 `loading`、`finish`、`error`,以防載入不正確資料或是其他錯誤 | 18 | | onRefresh | `Function()` | 當 `state` 為 `PdfState.error` 點擊畫面的事件 | 19 | | byteList | `Uint8List` | PDF 的 Raw Data | 20 | | fileName | `String` | 檔案名稱,匯出或下載會使用到 | 21 | 22 | ## 分析事件 23 | 24 | 使用抽象函式 `AnalyticsUtils.instance.logEvent()` 25 | 26 | | 事件名稱 | 描述 | 27 | | ------------------------------- | ------------------------------- | 28 | | `export_by_share` | 匯出透過分享 | 29 | | `export_by_printing` | 匯出透過印表機 | -------------------------------------------------------------------------------- /website/docs/api-views/phone-list-view.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 2 3 | --- 4 | 5 | # 學校電話骨架 PhoneListView 6 | 7 | 提供電話列表的骨架 8 | - 點擊會撥打`PhoneModel` 中的 `number` 9 | - `PhoneModel` 中的 `number` 為 `null` 時則作為標題區隔 10 | 11 | 撥打功能使用 [PlatformUtil.instance.callPhone](../api-utils/utils#callphone) 12 | 13 | 手機介面,不包含 `AppBar` 及 `BottomNavigationBar` 的區塊 14 | 15 | drawing 16 | 17 | 18 | | 參數名稱 | 型態 | 描述 | 19 | | ------------------------------- | ------------------------------- | ------------------------------- | 20 | | state | PhoneState | 必要欄位,總共有 `loading` `finish` `error` 的狀態,只有`finish`才會顯示,其餘都是顯示錯誤狀況 | 21 | | phoneModelList | `List` | 電話列表 | 22 | 23 | ## 分析事件 24 | 25 | 使用抽象函式 `AnalyticsUtils.instance.logEvent()` 26 | 27 | | 事件名稱 | 描述 | 28 | | ------------------------------- | ------------------------------- | 29 | | `call_phone_click` | 項目的點擊事件 | 30 | | `call_phone_success` | 撥打電話成功 | 31 | | `call_phone_error` | 撥打電話錯誤 | -------------------------------------------------------------------------------- /website/docs/api-widgets/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "API - 小元件", 3 | "position": 5 4 | } 5 | -------------------------------------------------------------------------------- /website/docs/api-widgets/ap-network-image.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 2 3 | --- 4 | 5 | # 網路圖片 ApNetworkImage 6 | 7 | 封裝 [CachedNetworkImage](https://pub.dev/packages/cached_network_image/changelog),此套件因為在未支援平台會錯誤,故此封裝 8 | 9 | :::caution 注意 10 | 因支援平台有限,未來可能替換掉實作內容 11 | ::: 12 | 13 | | 參數名稱 | 型態 | 描述 | 14 | | ------------------------------- | ------------------------------- | ------------------------------- | 15 | | url | `String` | 圖片來源網址 | 16 | -------------------------------------------------------------------------------- /website/docs/api-widgets/default-dialog.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 3 3 | --- 4 | 5 | # 一般對話框 DefaultDialog 6 | 7 | :::caution 使用時必須先完成 8 | - [主題色設定](../installation/theme) 9 | - [多國語言設定](../installation/localization) 10 | ::: 11 | 12 | 提供校務通v3風格對話框,使用 Flutter 官方的 `AlertDialog` 封裝 13 | 14 | drawing 15 | 16 | 17 | | 參數名稱 | 型態 | 描述 | 18 | | ------------------------------- | ------------------------------- | ------------------------------- | 19 | | title | `String` | 對話框標題 | 20 | | contentWidget | `Widget` | 對話框內容的 Widget | 21 | | actionText | `String` | 按鍵的文字 | 22 | | actionFunction | `Function()` | 按鍵點擊事件 | 23 | | contentPadding | `EdgeInsetsGeometry` | 內容間距 | -------------------------------------------------------------------------------- /website/docs/api-widgets/dialog-option.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 4 3 | --- 4 | 5 | # 選項對話框中選項 DialogOption 6 | 7 | :::caution 使用時必須先完成 8 | - [主題色設定](../installation/theme) 9 | ::: 10 | 11 | 對話框 `SimpleOptionDialog` 使用的選項,也可自訂 Dialog 使用它 12 | 13 | | 參數名稱 | 型態 | 描述 | 14 | | ------------------------------- | ------------------------------- | ------------------------------- | 15 | | text | `String` | 內容文字 | 16 | | check | `bool` | 是否顯示打勾的圖示 | 17 | | onPressed | `Function()` | 點擊事件 | -------------------------------------------------------------------------------- /website/docs/api-widgets/hint-content.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 5 3 | --- 4 | 5 | # 頁面提示 HintContent 6 | 7 | :::caution 使用時必須先完成 8 | - [主題色設定](../installation/theme) 9 | ::: 10 | 11 | 提供校務通v3風格的提示內容 12 | 13 | drawing 14 | 15 | | 參數名稱 | 型態 | 描述 | 16 | | ------------------------------- | ------------------------------- | ------------------------------- | 17 | | icon | `IconData` | 圖示 | 18 | | content | `String` | 內容文字 | -------------------------------------------------------------------------------- /website/docs/api-widgets/item-picker.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 6 3 | --- 4 | 5 | # 選項選擇器 ItemPicker 6 | 7 | :::caution 使用時必須先完成 8 | - [主題色設定](../installation/theme) 9 | ::: 10 | 11 | 將 `SimpleOptionDialog` 功能整合至一個元件,點擊時會顯示 `SimpleOptionDialog` 12 | 13 | drawing 14 | 15 | | 參數名稱 | 型態 | 描述 | 16 | | ------------------------------- | ------------------------------- | ------------------------------- | 17 | | items | `List` | 選項列表,純文字顯示 | 18 | | dialogTitle | String | `SimpleOptionDialog` 的標題 | 19 | | currentIndex | int | 目前的選項的索引值 | 20 | | onSelected | Function(int index) | `SimpleOptionDialog` 點擊事件,回傳索引值 | 21 | | featureTag | String | 事件記錄的前綴標籤 | 22 | 23 | ## 分析事件 24 | 25 | 使用抽象函式 `AnalyticsUtils` 26 | 27 | | 事件名稱 | 描述 | 28 | | ------------------------------- | ------------------------------- | 29 | | `${featureTag}_item_picker_click` | 當點擊時紀錄 | -------------------------------------------------------------------------------- /website/docs/api-widgets/overview.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 0 3 | --- 4 | 5 | # 導覽 6 | 7 | 將實用的元件基於 Flutter 的 `StatusfulWidget` 與 `StalessWidget` 包裝 8 | 9 | :::caution 部分元件使用時必須先完成 10 | - [主題色設定](../installation/theme) 11 | - [多國語言設定](../installation/localization) 12 | ::: 13 | -------------------------------------------------------------------------------- /website/docs/api-widgets/progress-dialog.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 7 3 | --- 4 | 5 | # 進度對話框 ProgressDialog 6 | 7 | :::caution 使用時必須先完成 8 | - [主題色設定](../installation/theme) 9 | ::: 10 | 11 | 將 [`CircularProgressIndicator`](https://api.flutter.dev/flutter/material/CircularProgressIndicator-class.html) 12 | 包裝成一個對話框,並包含文字 13 | 14 | | 參數名稱 | 型態 | 描述 | 15 | | ------------------------------- | ------------------------------- | ------------------------------- | 16 | | content | `String` | 內容文字 | -------------------------------------------------------------------------------- /website/docs/api-widgets/simple-option-dialog.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 7 3 | --- 4 | 5 | # 選項對話框 SimpleOptionDialog 6 | 7 | :::caution 使用時必須先完成 8 | - [主題色設定](../installation/theme) 9 | ::: 10 | 11 | 提供選項對話框,項目以 `DialogOption` 顯示,透過 `index` 設定目前選取的項目 12 | 13 | drawing 14 | 15 | | 參數名稱 | 型態 | 描述 | 16 | | ------------------------------- | ------------------------------- | ------------------------------- | 17 | | title | `String` | 標題 | 18 | | items | `List` | 選項列表,純文字顯示 | 19 | | index | `int` | 目前的選項的索引值 | 20 | | onSelected | `Function(int index)` | 點擊事件,回傳索引值 | -------------------------------------------------------------------------------- /website/docs/api-widgets/yes-no-dialog.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 8 3 | --- 4 | 5 | # 是否對話框 YesNoDialog 6 | 7 | :::caution 使用時必須先完成 8 | - [主題色設定](../installation/theme) 9 | - [多國語言設定](../installation/localization) 10 | ::: 11 | 12 | 提供校務通v3風格對話框,使用 Flutter 官方的 `AlertDialog` 封裝 13 | 14 | drawing 15 | 16 | | 參數名稱 | 型態 | 描述 | 17 | | ------------------------------- | ------------------------------- | ------------------------------- | 18 | | title | `String` | 對話框標題 | 19 | | contentWidget | `Widget` | 對話框內容的 Widget | 20 | | contentWidgetPadding | `EdgeInsetsGeometry` | 對話框內容的 Widget 的內縮間距 | 21 | | leftActionText | `String` | 左邊按鍵的文字 | 22 | | rightActionText | `String` | 右邊按鍵的文字 | 23 | | leftActionFunction | `Function` | 左邊按鍵點擊事件 | 24 | | rightActionFunction | `Function` | 右邊按鍵點擊事件 | -------------------------------------------------------------------------------- /website/docs/collaborate/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "協作", 3 | "position": 7 4 | } 5 | -------------------------------------------------------------------------------- /website/docs/collaborate/localization.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | --- 4 | 5 | # 多國語言(i18n) 6 | 7 | 現行透過 `Google Sheet` 管理多國語言設定,透過 `App Script` 匯出 8 | 9 | 可至 [`表格`](https://docs.google.com/spreadsheets/d/1-RsXDTJhsn6bGXYHpgonbxYhAGrvkrqIjH2e-2bFvuk/edit?ouid=112810366409225298544&usp=sheets_home) 提出翻譯修改 10 | 11 | ## 匯出翻譯表格 12 | 13 | 可使用 `fetch_i18n.sh` 下載最新的翻譯檔案 14 | 15 | ```bash 16 | bash fetch_i18n.sh 17 | ``` 18 | 19 | ## 生成多國語言類別 20 | 21 | 透過套件 [`intl_utils`](https://pub.dev/packages/intl_utils) 生成對應的類別 22 | 23 | ```bash 24 | flutter pub run intl_utils:generate 25 | ``` -------------------------------------------------------------------------------- /website/docs/installation/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "如何開始", 3 | "position": 1 4 | } 5 | -------------------------------------------------------------------------------- /website/docs/installation/app-tracking-transparency.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 8 3 | --- 4 | 5 | # App 透明度追蹤 6 | 7 | 因應 iOS 14 以後上架需加入 [`App 隱私權追蹤 API`](https://developer.apple.com/documentation/apptrackingtransparency) 8 | 9 | `iOS` 使用 [`app_tracking_transparency`](https://pub.dev/packages/app_tracking_transparency) 實作,細節可參考原專案 10 | 11 | :::caution 注意 12 | 需根據上架需求,通常為審查會要求加入 13 | ::: 14 | 15 | ## 限制 16 | 17 | 此功能只支援 `iOS` 18 | 19 | ## 設定 20 | 21 | ### Android 22 | 23 | 尚未支援 24 | 25 | ### iOS 26 | 27 | 在 `ios/Runner/Info.plist` `dict` 中加入 28 | 29 | ```xml title='Info.plist' 30 | NSUserTrackingUsageDescription 31 | We would like to log your usage to improve user experience, and collect crash report to fix bugs and improve stability. 32 | ``` 33 | 34 | 字串中的說明為取得權限時會出現的文字說明,可根據你的 App 語言做修改 -------------------------------------------------------------------------------- /website/docs/installation/export-to-calendar.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 5 3 | --- 4 | 5 | # 匯出至行事曆 App 6 | 7 | 使用 [`add_2_calendar`](https://pub.dev/packages/add_2_calendar) 實作,細節可參考原專案 8 | 9 | :::caution 10 | 若未設定此頁面會影響以下功能 11 | 12 | - [課表骨架](../api-scaffolds/course-scaffold) 中的匯出至行事曆 13 | 14 | ::: 15 | 16 | ## 限制 17 | 18 | 此功能只支援,默認相關功能會不顯示 19 | 20 | - Android 21 | - iOS 22 | 23 | ## 設定 24 | 25 | ### Android 26 | 27 | 從 Android 11 (API 級別 30) 開始,Android 系統要求應用程式在 `AndroidManifest.xml` 設定。 28 | 29 | 至 `android/app/src/main/AndroidManifest.xml` 增加相關權限設定 30 | 31 | ```xml title='AndroidManifest.xml' 32 | 33 | 34 | 35 | 36 | 37 | 38 | ``` 39 | 40 | ### iOS 41 | 42 | 在 `ios/Runner/Info.plist` `dict` 中加入 43 | 44 | ```xml title='Info.plist' 45 | NSCalendarsUsageDescription 46 | Feature calendar would be add schedule to calendar app 47 | ``` 48 | 49 | 字串中的說明為取得權限時會出現的文字說明,可根據你的 App 語言做修改 50 | 51 | ------ -------------------------------------------------------------------------------- /website/docs/installation/shared-preferences.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 7 3 | --- 4 | 5 | # SharedPreference 6 | 7 | 使用官方套件 `shared_preference` 實作,整合的功能可查看 [API 說明](../api-utils/preference-utils) 8 | 9 | :::caution 注意 10 | 若未設定此頁面會影響以下功能 11 | 12 | - [PreferenceUtil](../api-utils/preference-utils) 的功能 13 | - [課表骨架](../api-scaffolds/course-scaffold) 中的上課提醒 14 | - 課表小工具 15 | ::: 16 | 17 | ## 設定 18 | 19 | 使用前需要先初始化加密設定,在 `main()` 執行 `runApp` 前執行 `(PreferenceUtil.instance as ApPreferenceUtil).init()` 一定要加 `await` 20 | 21 | ```dart 22 | 23 | Future main() async { 24 | WidgetsFlutterBinding.ensureInitialized(); 25 | registerOneForAll(); 26 | await (PreferenceUtil.instance as ApPreferenceUtil).init( 27 | key: Constants.key, 28 | iv: Constants.iv, 29 | ); 30 | runApp(const MyApp()); 31 | } 32 | 33 | 34 | ``` 35 | 36 | 參數說明可見 37 | 38 | | 參數名稱 | 型態 | 描述 | 39 | |---------------|--------|--------------------| 40 | | key | `Key` | AES 加密演算法中的 key | 41 | | iv | `IV` | AES 加密演算法中的 iv key | 42 | 43 | 金鑰的部分可以另外使用獨立靜態變數儲存 44 | 45 | ```dart title='constants.dart' 46 | import 'package:encrypt/encrypt.dart'; 47 | 48 | class Constants { 49 | static final key = Key.fromUtf8('<修改成自己的Key>'); 50 | static final iv = IV.fromUtf8('<修改成自己的IV Key>'); 51 | } 52 | ``` -------------------------------------------------------------------------------- /website/docs/installation/theme.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 2 3 | --- 4 | 5 | # 主題色設定 6 | 7 | 校務通主題目前提供: 8 | - 淺色主題 9 | - 深色主題 10 | 11 | ## 如何設定 12 | 13 | 在 `MaterialApp` 的上一層加入 `ApTheme`,並設定主題色模式 [`ThemeMode`](https://api.flutter.dev/flutter/material/MaterialApp/themeMode.html) 14 | 15 | 16 | :::caution 17 | 此 API 只支援 Flutter v1.9 以上 18 | ::: 19 | 20 | 在 `MaterialApp` 的參數 `theme` 設定 `ApTheme.light`,參數 `darkTheme` 設定 `ApTheme.dark`, 21 | 22 | 並設定與 `ApTheme` 設定相同的 `themeMode`,`ApTheme` 會根據 `themeMode` 切換主題顏色 23 | 24 | ```dart title="app.dart" 25 | ThemeMode themeMode = ThemeMode.system; 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | return ApTheme( 30 | themeMode, 31 | child: MaterialApp( 32 | theme: ApTheme.light, 33 | darkTheme: ApTheme.dark, 34 | themeMode: themeMode, 35 | ), 36 | ); 37 | } 38 | 39 | ``` 40 | 41 | ## 原理說明 42 | 43 | MaterialApp 預設主題(`Theme`) 由參數 `theme` 所決定,若有設定參數 `darkTheme`(深色主題), 44 | 45 | 且系統主題或是 themeMode 設定 `ThemeMode.dark` 時,則由參數 `darkTheme` 決定 46 | 47 | 可透過參數 `themeMode` 設定主題切換 48 | 49 | 此 `enum` 總共有三種: 50 | - `system`:系統主題,若系統不支援深色主題,則使用 `theme` 51 | - `light`:淺色主題 52 | - `dark`:深色主題 53 | 54 | ## 支援深色主題的系統 55 | 56 | - Android `9.0` 或以上 57 | - iOS `13` 或以上 58 | - macOS Mojave `10.14.2` 或以上 59 | - Winodws 10 Build `14393.10` 以後 -------------------------------------------------------------------------------- /website/firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "public": "build", 4 | "ignore": [ 5 | "firebase.json", 6 | "**/.*", 7 | "**/node_modules/**" 8 | ], 9 | "rewrites": [ 10 | { 11 | "source": "**", 12 | "destination": "/index.html" 13 | } 14 | ] 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /website/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "website", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "docusaurus": "docusaurus", 7 | "start": "docusaurus start", 8 | "build": "docusaurus build", 9 | "swizzle": "docusaurus swizzle", 10 | "deploy": "docusaurus deploy", 11 | "clear": "docusaurus clear", 12 | "serve": "docusaurus serve", 13 | "write-translations": "docusaurus write-translations", 14 | "write-heading-ids": "docusaurus write-heading-ids" 15 | }, 16 | "dependencies": { 17 | "@docusaurus/core": "3.5.2", 18 | "@docusaurus/preset-classic": "3.5.2", 19 | "@docusaurus/theme-classic": "^3.5.2", 20 | "@docusaurus/theme-common": "^3.5.2", 21 | "@docusaurus/theme-mermaid": "^3.5.2", 22 | "@mdx-js/react": "^3.0.0", 23 | "prism-react-renderer": "^2.1.0", 24 | "react": "^18.2.0", 25 | "react-dom": "^18.2.0" 26 | }, 27 | "devDependencies": { 28 | "@docusaurus/module-type-aliases": "3.5.0", 29 | "@docusaurus/types": "3.5.0" 30 | }, 31 | "engines": { 32 | "node": ">=18.0" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /website/sidebars.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Creating a sidebar enables you to: 3 | - create an ordered group of docs 4 | - render a sidebar for each doc of that group 5 | - provide next/previous navigation 6 | 7 | The sidebars can be generated from the filesystem, or explicitly defined here. 8 | 9 | Create as many sidebars as you want. 10 | */ 11 | 12 | module.exports = { 13 | // By default, Docusaurus generates a sidebar from the docs folder structure 14 | tutorialSidebar: [{type: 'autogenerated', dirName: '.'}], 15 | 16 | // But you can create a sidebar manually 17 | /* 18 | tutorialSidebar: [ 19 | { 20 | type: 'category', 21 | label: 'Tutorial', 22 | items: ['hello'], 23 | }, 24 | ], 25 | */ 26 | }; 27 | -------------------------------------------------------------------------------- /website/src/components/HomepageFeatures.module.css: -------------------------------------------------------------------------------- 1 | /* stylelint-disable docusaurus/copyright-header */ 2 | 3 | .features { 4 | display: flex; 5 | align-items: center; 6 | padding: 2rem 0; 7 | width: 100%; 8 | } 9 | 10 | .featureSvg { 11 | height: 200px; 12 | width: 200px; 13 | } 14 | -------------------------------------------------------------------------------- /website/src/css/custom.css: -------------------------------------------------------------------------------- 1 | /* stylelint-disable docusaurus/copyright-header */ 2 | /** 3 | * Any CSS included here will be global. The classic template 4 | * bundles Infima by default. Infima is a CSS framework designed to 5 | * work well for content-centric websites. 6 | */ 7 | 8 | /* You can override the default Infima variables here. */ 9 | :root { 10 | --ifm-color-primary: #25c2a0; 11 | --ifm-color-primary-dark: rgb(33, 175, 144); 12 | --ifm-color-primary-darker: rgb(31, 165, 136); 13 | --ifm-color-primary-darkest: rgb(26, 136, 112); 14 | --ifm-color-primary-light: rgb(70, 203, 174); 15 | --ifm-color-primary-lighter: rgb(102, 212, 189); 16 | --ifm-color-primary-lightest: rgb(146, 224, 208); 17 | --ifm-code-font-size: 95%; 18 | } 19 | 20 | .docusaurus-highlight-code-line { 21 | background-color: rgb(72, 77, 91); 22 | display: block; 23 | margin: 0 calc(-1 * var(--ifm-pre-padding)); 24 | padding: 0 var(--ifm-pre-padding); 25 | } 26 | -------------------------------------------------------------------------------- /website/src/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import clsx from 'clsx'; 3 | import Layout from '@theme/Layout'; 4 | import Link from '@docusaurus/Link'; 5 | import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; 6 | import styles from './index.module.css'; 7 | import HomepageFeatures from '../components/HomepageFeatures'; 8 | 9 | function HomepageHeader() { 10 | const {siteConfig} = useDocusaurusContext(); 11 | return ( 12 |
13 |
14 |

{siteConfig.title}

15 |

{siteConfig.tagline}

16 |
17 | 20 | 開始吧! 21 | 22 |
23 |
24 |
25 | ); 26 | } 27 | 28 | export default function Home() { 29 | const {siteConfig} = useDocusaurusContext(); 30 | return ( 31 | 34 | 35 |
36 | 37 |
38 |
39 | ); 40 | } 41 | -------------------------------------------------------------------------------- /website/src/pages/index.module.css: -------------------------------------------------------------------------------- 1 | /* stylelint-disable docusaurus/copyright-header */ 2 | 3 | /** 4 | * CSS files with the .module.css suffix will be treated as CSS modules 5 | * and scoped locally. 6 | */ 7 | 8 | .heroBanner { 9 | padding: 4rem 0; 10 | text-align: center; 11 | position: relative; 12 | overflow: hidden; 13 | } 14 | 15 | @media screen and (max-width: 966px) { 16 | .heroBanner { 17 | padding: 2rem; 18 | } 19 | } 20 | 21 | .buttons { 22 | display: flex; 23 | align-items: center; 24 | justify-content: center; 25 | } 26 | -------------------------------------------------------------------------------- /website/src/pages/markdown-page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Markdown page example 3 | --- 4 | 5 | # Markdown page example 6 | 7 | You don't need React to write simple standalone pages. 8 | -------------------------------------------------------------------------------- /website/static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/.nojekyll -------------------------------------------------------------------------------- /website/static/img/ap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/ap.png -------------------------------------------------------------------------------- /website/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/favicon.ico -------------------------------------------------------------------------------- /website/static/img/package-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/package-architecture.png -------------------------------------------------------------------------------- /website/static/img/pages/about_us_page/mobile_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/pages/about_us_page/mobile_1.png -------------------------------------------------------------------------------- /website/static/img/pages/about_us_page/mobile_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/pages/about_us_page/mobile_2.png -------------------------------------------------------------------------------- /website/static/img/pages/about_us_page/mobile_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/pages/about_us_page/mobile_3.png -------------------------------------------------------------------------------- /website/static/img/pages/announcement_content_page/mobile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/pages/announcement_content_page/mobile.jpg -------------------------------------------------------------------------------- /website/static/img/pages/announcement_content_page/tablet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/pages/announcement_content_page/tablet.png -------------------------------------------------------------------------------- /website/static/img/scaffolds/course/course_bottom_sheet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/scaffolds/course/course_bottom_sheet.jpg -------------------------------------------------------------------------------- /website/static/img/scaffolds/course/course_detail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/scaffolds/course/course_detail.png -------------------------------------------------------------------------------- /website/static/img/scaffolds/course/mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/scaffolds/course/mobile.png -------------------------------------------------------------------------------- /website/static/img/scaffolds/course/tablet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/scaffolds/course/tablet.png -------------------------------------------------------------------------------- /website/static/img/scaffolds/home/mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/scaffolds/home/mobile.png -------------------------------------------------------------------------------- /website/static/img/scaffolds/home/tablet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/scaffolds/home/tablet.png -------------------------------------------------------------------------------- /website/static/img/scaffolds/login/mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/scaffolds/login/mobile.png -------------------------------------------------------------------------------- /website/static/img/scaffolds/login/tablet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/scaffolds/login/tablet.png -------------------------------------------------------------------------------- /website/static/img/scaffolds/notification/mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/scaffolds/notification/mobile.png -------------------------------------------------------------------------------- /website/static/img/scaffolds/pdf/mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/scaffolds/pdf/mobile.png -------------------------------------------------------------------------------- /website/static/img/scaffolds/phone/mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/scaffolds/phone/mobile.png -------------------------------------------------------------------------------- /website/static/img/scaffolds/score/mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/scaffolds/score/mobile.png -------------------------------------------------------------------------------- /website/static/img/scaffolds/score/tablet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/scaffolds/score/tablet.png -------------------------------------------------------------------------------- /website/static/img/scaffolds/user_info/mobile_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/scaffolds/user_info/mobile_1.png -------------------------------------------------------------------------------- /website/static/img/scaffolds/user_info/mobile_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/scaffolds/user_info/mobile_2.png -------------------------------------------------------------------------------- /website/static/img/widgets/ap_drawer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/widgets/ap_drawer.jpg -------------------------------------------------------------------------------- /website/static/img/widgets/default_dialog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/widgets/default_dialog.jpg -------------------------------------------------------------------------------- /website/static/img/widgets/hint_content.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/widgets/hint_content.jpg -------------------------------------------------------------------------------- /website/static/img/widgets/item_picker.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/widgets/item_picker.jpg -------------------------------------------------------------------------------- /website/static/img/widgets/setting_page_widgets.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/widgets/setting_page_widgets.jpg -------------------------------------------------------------------------------- /website/static/img/widgets/simple_option_dialog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/widgets/simple_option_dialog.jpg -------------------------------------------------------------------------------- /website/static/img/widgets/yes_no_dialog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abc873693/ap_common/54ae5f087f95858e551b0a78008072f74faaa17b/website/static/img/widgets/yes_no_dialog.jpg --------------------------------------------------------------------------------