From 3887bc05ebf8612f2b2a1cc607ec3c3fdf3135e1 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Fri, 4 Oct 2024 15:53:37 +0800 Subject: [PATCH 01/41] feat: migrate `model` `util` `config` to new `ap_common_core` --- packages/ap_common_core/.gitignore | 29 +++++++++ packages/ap_common_core/.metadata | 10 +++ packages/ap_common_core/CHANGELOG.md | 3 + packages/ap_common_core/LICENSE | 9 +++ packages/ap_common_core/README.md | 29 +++++++++ packages/ap_common_core/analysis_options.yaml | 4 ++ packages/ap_common_core/build.yaml | 22 +++++++ .../ap_common_core/lib/ap_common_core.dart | 23 +++++++ packages/ap_common_core/lib/injector.dart | 4 ++ .../lib/src}/config/analytics_constants.dart | 0 .../lib/src}/config/ap_constants.dart | 0 .../lib/src}/models/announcement_data.dart | 0 .../lib/src}/models/announcement_data.g.dart | 0 .../src}/models/announcement_login_data.dart | 0 .../models/announcement_login_data.g.dart | 0 .../lib/src}/models/ap_support_language.dart | 0 .../lib/src}/models/course_data.dart | 0 .../lib/src}/models/course_data.g.dart | 0 .../lib/src}/models/course_notify_data.dart | 0 .../lib/src}/models/course_notify_data.g.dart | 0 .../lib/src}/models/general_response.dart | 0 .../lib/src}/models/general_response.g.dart | 0 .../src}/models/imgur_upload_response.dart | 0 .../src}/models/imgur_upload_response.g.dart | 0 .../lib/src}/models/notification_data.dart | 0 .../lib/src}/models/notification_data.g.dart | 0 .../lib/src}/models/phone_model.dart | 0 .../src}/models/private_cookies_manager.dart | 0 .../lib/src}/models/score_data.dart | 0 .../lib/src}/models/score_data.g.dart | 0 .../lib/src}/models/semester_data.dart | 0 .../lib/src}/models/semester_data.g.dart | 0 .../lib/src}/models/time_code.dart | 0 .../lib/src}/models/time_code.g.dart | 0 .../lib/src}/models/user_info.dart | 0 .../lib/src}/models/user_info.g.dart | 0 .../lib/src}/models/version_info.dart | 0 .../lib/src/utilities}/analytics_utils.dart | 0 .../lib/src/utilities}/crashlytics_utils.dart | 0 .../lib/src/utilities/notification_util.dart | 62 +++++++++++++++++++ .../lib/src/utilities/preference_util.dart | 35 +++++++++++ packages/ap_common_core/pubspec.yaml | 25 ++++++++ 42 files changed, 255 insertions(+) create mode 100644 packages/ap_common_core/.gitignore create mode 100644 packages/ap_common_core/.metadata create mode 100644 packages/ap_common_core/CHANGELOG.md create mode 100644 packages/ap_common_core/LICENSE create mode 100644 packages/ap_common_core/README.md create mode 100644 packages/ap_common_core/analysis_options.yaml create mode 100644 packages/ap_common_core/build.yaml create mode 100644 packages/ap_common_core/lib/ap_common_core.dart create mode 100644 packages/ap_common_core/lib/injector.dart rename packages/{ap_common/lib => ap_common_core/lib/src}/config/analytics_constants.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/config/ap_constants.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/announcement_data.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/announcement_data.g.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/announcement_login_data.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/announcement_login_data.g.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/ap_support_language.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/course_data.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/course_data.g.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/course_notify_data.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/course_notify_data.g.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/general_response.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/general_response.g.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/imgur_upload_response.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/imgur_upload_response.g.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/notification_data.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/notification_data.g.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/phone_model.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/private_cookies_manager.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/score_data.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/score_data.g.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/semester_data.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/semester_data.g.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/time_code.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/time_code.g.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/user_info.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/user_info.g.dart (100%) rename packages/{ap_common/lib => ap_common_core/lib/src}/models/version_info.dart (100%) rename packages/{ap_common/lib/utils => ap_common_core/lib/src/utilities}/analytics_utils.dart (100%) rename packages/{ap_common/lib/utils => ap_common_core/lib/src/utilities}/crashlytics_utils.dart (100%) create mode 100644 packages/ap_common_core/lib/src/utilities/notification_util.dart create mode 100644 packages/ap_common_core/lib/src/utilities/preference_util.dart create mode 100644 packages/ap_common_core/pubspec.yaml diff --git a/packages/ap_common_core/.gitignore b/packages/ap_common_core/.gitignore new file mode 100644 index 00000000..ac5aa989 --- /dev/null +++ b/packages/ap_common_core/.gitignore @@ -0,0 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ diff --git a/packages/ap_common_core/.metadata b/packages/ap_common_core/.metadata new file mode 100644 index 00000000..02c1b52f --- /dev/null +++ b/packages/ap_common_core/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819" + channel: "stable" + +project_type: package diff --git a/packages/ap_common_core/CHANGELOG.md b/packages/ap_common_core/CHANGELOG.md new file mode 100644 index 00000000..ec4a0b21 --- /dev/null +++ b/packages/ap_common_core/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* initial release from `ap_common` package separate. diff --git a/packages/ap_common_core/LICENSE b/packages/ap_common_core/LICENSE new file mode 100644 index 00000000..d25d4a88 --- /dev/null +++ b/packages/ap_common_core/LICENSE @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2024 RainVisitor + +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: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +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. \ No newline at end of file diff --git a/packages/ap_common_core/README.md b/packages/ap_common_core/README.md new file mode 100644 index 00000000..5481ec0c --- /dev/null +++ b/packages/ap_common_core/README.md @@ -0,0 +1,29 @@ +# 校務通系列介面與函式共用 + +[![](https://img.shields.io/badge/Flutter-v3.24-blue)](https://github.com/flutter/flutter) +[![](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common/) +[![melos](https://img.shields.io/badge/maintained%20with-melos-f700ff.svg?style=flat-square)](https://github.com/invertase/melos) + +長期校務通相關系列的app,介面與相關功能都極為相似,將相關的介面與函式庫,製作此套件以方便維護。 + +[展示網頁](https://abc873693.github.io/ap_common/#/) +[文件](https://ap-common.web.app/) + +## 相關專案 + +- [高科校務通](https://github.com/NKUST-ITC/NKUST-AP-Flutter) +- [中山校務通](https://github.com/abc873693/NSYSU-AP) +- [文藻校務通](https://github.com/abc873693/WTUC-AP) +- [台科校務通(已下架)](https://github.com/abc873693/NTUST-AP) + +## 套件 + +| Name | pub.dev | 說明 | +|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|---------------------| +| `ap_common` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common/) | 函式庫與相關介面共用 | +| `ap_common_plugin` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_plugin.svg?style=flat-square)](https://pub.dev/packages/ap_common_plugin/) | 課表小工具 | +| `ap_common_firebase` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_firebase.svg?style=flat-square)](https://pub.dev/packages/ap_common_firebase/) | 服務 `Firebase` 的整合實作 | + +## 套件使用要求 + +- Flutter `v1.20` 以上 diff --git a/packages/ap_common_core/analysis_options.yaml b/packages/ap_common_core/analysis_options.yaml new file mode 100644 index 00000000..a5744c1c --- /dev/null +++ b/packages/ap_common_core/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/ap_common_core/build.yaml b/packages/ap_common_core/build.yaml new file mode 100644 index 00000000..1ba16a20 --- /dev/null +++ b/packages/ap_common_core/build.yaml @@ -0,0 +1,22 @@ +targets: + $default: + sources: + - lib/** + builders: + json_serializable: + options: + # Options configure how source code is generated for every + # `@JsonSerializable`-annotated class in the package. + # + # The default value for each is listed. + any_map: false + checked: false + constructor: "" + create_factory: true + create_to_json: true + disallow_unrecognized_keys: false + explicit_to_json: true + field_rename: none + generic_argument_factories: false + ignore_unannotated: false + include_if_null: true \ No newline at end of file diff --git a/packages/ap_common_core/lib/ap_common_core.dart b/packages/ap_common_core/lib/ap_common_core.dart new file mode 100644 index 00000000..a31db257 --- /dev/null +++ b/packages/ap_common_core/lib/ap_common_core.dart @@ -0,0 +1,23 @@ +library ap_common_core; + +export 'src/config/analytics_constants.dart'; +export 'src/config/ap_constants.dart'; +export 'src/models/announcement_data.dart'; +export 'src/models/announcement_login_data.dart'; +export 'src/models/ap_support_language.dart'; +export 'src/models/course_data.dart'; +export 'src/models/course_notify_data.dart'; +export 'src/models/general_response.dart'; +export 'src/models/imgur_upload_response.dart'; +export 'src/models/notification_data.dart'; +export 'src/models/phone_model.dart'; +export 'src/models/private_cookies_manager.dart'; +export 'src/models/score_data.dart'; +export 'src/models/semester_data.dart'; +export 'src/models/time_code.dart'; +export 'src/models/user_info.dart'; +export 'src/models/version_info.dart'; +export 'src/utilities/analytics_utils.dart'; +export 'src/utilities/crashlytics_utils.dart'; +export 'src/utilities/notification_util.dart'; +export 'src/utilities/preference_util.dart'; diff --git a/packages/ap_common_core/lib/injector.dart b/packages/ap_common_core/lib/injector.dart new file mode 100644 index 00000000..0e979962 --- /dev/null +++ b/packages/ap_common_core/lib/injector.dart @@ -0,0 +1,4 @@ +// Use this static instance +import 'package:injector/injector.dart'; + +final injector = Injector.appInstance; diff --git a/packages/ap_common/lib/config/analytics_constants.dart b/packages/ap_common_core/lib/src/config/analytics_constants.dart similarity index 100% rename from packages/ap_common/lib/config/analytics_constants.dart rename to packages/ap_common_core/lib/src/config/analytics_constants.dart diff --git a/packages/ap_common/lib/config/ap_constants.dart b/packages/ap_common_core/lib/src/config/ap_constants.dart similarity index 100% rename from packages/ap_common/lib/config/ap_constants.dart rename to packages/ap_common_core/lib/src/config/ap_constants.dart diff --git a/packages/ap_common/lib/models/announcement_data.dart b/packages/ap_common_core/lib/src/models/announcement_data.dart similarity index 100% rename from packages/ap_common/lib/models/announcement_data.dart rename to packages/ap_common_core/lib/src/models/announcement_data.dart diff --git a/packages/ap_common/lib/models/announcement_data.g.dart b/packages/ap_common_core/lib/src/models/announcement_data.g.dart similarity index 100% rename from packages/ap_common/lib/models/announcement_data.g.dart rename to packages/ap_common_core/lib/src/models/announcement_data.g.dart diff --git a/packages/ap_common/lib/models/announcement_login_data.dart b/packages/ap_common_core/lib/src/models/announcement_login_data.dart similarity index 100% rename from packages/ap_common/lib/models/announcement_login_data.dart rename to packages/ap_common_core/lib/src/models/announcement_login_data.dart diff --git a/packages/ap_common/lib/models/announcement_login_data.g.dart b/packages/ap_common_core/lib/src/models/announcement_login_data.g.dart similarity index 100% rename from packages/ap_common/lib/models/announcement_login_data.g.dart rename to packages/ap_common_core/lib/src/models/announcement_login_data.g.dart diff --git a/packages/ap_common/lib/models/ap_support_language.dart b/packages/ap_common_core/lib/src/models/ap_support_language.dart similarity index 100% rename from packages/ap_common/lib/models/ap_support_language.dart rename to packages/ap_common_core/lib/src/models/ap_support_language.dart diff --git a/packages/ap_common/lib/models/course_data.dart b/packages/ap_common_core/lib/src/models/course_data.dart similarity index 100% rename from packages/ap_common/lib/models/course_data.dart rename to packages/ap_common_core/lib/src/models/course_data.dart diff --git a/packages/ap_common/lib/models/course_data.g.dart b/packages/ap_common_core/lib/src/models/course_data.g.dart similarity index 100% rename from packages/ap_common/lib/models/course_data.g.dart rename to packages/ap_common_core/lib/src/models/course_data.g.dart diff --git a/packages/ap_common/lib/models/course_notify_data.dart b/packages/ap_common_core/lib/src/models/course_notify_data.dart similarity index 100% rename from packages/ap_common/lib/models/course_notify_data.dart rename to packages/ap_common_core/lib/src/models/course_notify_data.dart diff --git a/packages/ap_common/lib/models/course_notify_data.g.dart b/packages/ap_common_core/lib/src/models/course_notify_data.g.dart similarity index 100% rename from packages/ap_common/lib/models/course_notify_data.g.dart rename to packages/ap_common_core/lib/src/models/course_notify_data.g.dart diff --git a/packages/ap_common/lib/models/general_response.dart b/packages/ap_common_core/lib/src/models/general_response.dart similarity index 100% rename from packages/ap_common/lib/models/general_response.dart rename to packages/ap_common_core/lib/src/models/general_response.dart diff --git a/packages/ap_common/lib/models/general_response.g.dart b/packages/ap_common_core/lib/src/models/general_response.g.dart similarity index 100% rename from packages/ap_common/lib/models/general_response.g.dart rename to packages/ap_common_core/lib/src/models/general_response.g.dart diff --git a/packages/ap_common/lib/models/imgur_upload_response.dart b/packages/ap_common_core/lib/src/models/imgur_upload_response.dart similarity index 100% rename from packages/ap_common/lib/models/imgur_upload_response.dart rename to packages/ap_common_core/lib/src/models/imgur_upload_response.dart diff --git a/packages/ap_common/lib/models/imgur_upload_response.g.dart b/packages/ap_common_core/lib/src/models/imgur_upload_response.g.dart similarity index 100% rename from packages/ap_common/lib/models/imgur_upload_response.g.dart rename to packages/ap_common_core/lib/src/models/imgur_upload_response.g.dart diff --git a/packages/ap_common/lib/models/notification_data.dart b/packages/ap_common_core/lib/src/models/notification_data.dart similarity index 100% rename from packages/ap_common/lib/models/notification_data.dart rename to packages/ap_common_core/lib/src/models/notification_data.dart diff --git a/packages/ap_common/lib/models/notification_data.g.dart b/packages/ap_common_core/lib/src/models/notification_data.g.dart similarity index 100% rename from packages/ap_common/lib/models/notification_data.g.dart rename to packages/ap_common_core/lib/src/models/notification_data.g.dart diff --git a/packages/ap_common/lib/models/phone_model.dart b/packages/ap_common_core/lib/src/models/phone_model.dart similarity index 100% rename from packages/ap_common/lib/models/phone_model.dart rename to packages/ap_common_core/lib/src/models/phone_model.dart diff --git a/packages/ap_common/lib/models/private_cookies_manager.dart b/packages/ap_common_core/lib/src/models/private_cookies_manager.dart similarity index 100% rename from packages/ap_common/lib/models/private_cookies_manager.dart rename to packages/ap_common_core/lib/src/models/private_cookies_manager.dart diff --git a/packages/ap_common/lib/models/score_data.dart b/packages/ap_common_core/lib/src/models/score_data.dart similarity index 100% rename from packages/ap_common/lib/models/score_data.dart rename to packages/ap_common_core/lib/src/models/score_data.dart diff --git a/packages/ap_common/lib/models/score_data.g.dart b/packages/ap_common_core/lib/src/models/score_data.g.dart similarity index 100% rename from packages/ap_common/lib/models/score_data.g.dart rename to packages/ap_common_core/lib/src/models/score_data.g.dart diff --git a/packages/ap_common/lib/models/semester_data.dart b/packages/ap_common_core/lib/src/models/semester_data.dart similarity index 100% rename from packages/ap_common/lib/models/semester_data.dart rename to packages/ap_common_core/lib/src/models/semester_data.dart diff --git a/packages/ap_common/lib/models/semester_data.g.dart b/packages/ap_common_core/lib/src/models/semester_data.g.dart similarity index 100% rename from packages/ap_common/lib/models/semester_data.g.dart rename to packages/ap_common_core/lib/src/models/semester_data.g.dart diff --git a/packages/ap_common/lib/models/time_code.dart b/packages/ap_common_core/lib/src/models/time_code.dart similarity index 100% rename from packages/ap_common/lib/models/time_code.dart rename to packages/ap_common_core/lib/src/models/time_code.dart diff --git a/packages/ap_common/lib/models/time_code.g.dart b/packages/ap_common_core/lib/src/models/time_code.g.dart similarity index 100% rename from packages/ap_common/lib/models/time_code.g.dart rename to packages/ap_common_core/lib/src/models/time_code.g.dart diff --git a/packages/ap_common/lib/models/user_info.dart b/packages/ap_common_core/lib/src/models/user_info.dart similarity index 100% rename from packages/ap_common/lib/models/user_info.dart rename to packages/ap_common_core/lib/src/models/user_info.dart diff --git a/packages/ap_common/lib/models/user_info.g.dart b/packages/ap_common_core/lib/src/models/user_info.g.dart similarity index 100% rename from packages/ap_common/lib/models/user_info.g.dart rename to packages/ap_common_core/lib/src/models/user_info.g.dart diff --git a/packages/ap_common/lib/models/version_info.dart b/packages/ap_common_core/lib/src/models/version_info.dart similarity index 100% rename from packages/ap_common/lib/models/version_info.dart rename to packages/ap_common_core/lib/src/models/version_info.dart diff --git a/packages/ap_common/lib/utils/analytics_utils.dart b/packages/ap_common_core/lib/src/utilities/analytics_utils.dart similarity index 100% rename from packages/ap_common/lib/utils/analytics_utils.dart rename to packages/ap_common_core/lib/src/utilities/analytics_utils.dart diff --git a/packages/ap_common/lib/utils/crashlytics_utils.dart b/packages/ap_common_core/lib/src/utilities/crashlytics_utils.dart similarity index 100% rename from packages/ap_common/lib/utils/crashlytics_utils.dart rename to packages/ap_common_core/lib/src/utilities/crashlytics_utils.dart diff --git a/packages/ap_common_core/lib/src/utilities/notification_util.dart b/packages/ap_common_core/lib/src/utilities/notification_util.dart new file mode 100644 index 00000000..eb97d7c3 --- /dev/null +++ b/packages/ap_common_core/lib/src/utilities/notification_util.dart @@ -0,0 +1,62 @@ +import 'package:ap_common_core/injector.dart'; + +abstract class NotificationUtil { + static NotificationUtil get instance => injector.get(); + + static bool get isSupport => true; + + static const String androidResourceName = '@drawable/ic_stat_name'; + + // Notification ID + static const int bus = 100; + static const int course = 101; + static const int fcm = 200; + + Future show({ + required int id, + required String androidChannelId, + required String androidChannelDescription, + required String title, + required String content, + bool enableVibration = true, + String androidResourceIcon = androidResourceName, + void Function()? onSelectNotification, + }) async {} + + // Future scheduleWeeklyNotify({ + // required int id, + // required String androidChannelId, + // required String androidChannelDescription, + // required Day day, + // required TimeOfDay time, + // required String title, + // required String content, + // String androidResourceIcon = androidResourceName, + // void Function()? onSelectNotification, + // }) async { + // + // } + + Future schedule({ + required int id, + required String androidChannelId, + required String androidChannelDescription, + required DateTime dateTime, + required String title, + required String content, + String androidResourceIcon = androidResourceName, + void Function()? onSelectNotification, + }) async {} + + Future requestPermissions({ + bool sound = true, + bool alert = true, + bool badge = true, + }); + + Future cancelNotify({ + required int id, + }); + + Future cancelAll(); +} diff --git a/packages/ap_common_core/lib/src/utilities/preference_util.dart b/packages/ap_common_core/lib/src/utilities/preference_util.dart new file mode 100644 index 00000000..d4381579 --- /dev/null +++ b/packages/ap_common_core/lib/src/utilities/preference_util.dart @@ -0,0 +1,35 @@ +import 'package:ap_common_core/injector.dart'; + +abstract class PreferenceUtil { + static PreferenceUtil get instance => injector.get(); + + static bool get isSupport => true; + + Future setString(String key, String data); + + String getString(String key, String defaultValue); + + Future setStringSecurity(String key, String data); + + String getStringSecurity(String key, String defaultValue); + + Future setInt(String key, int data); + + int getInt(String key, int defaultValue); + + Future setDouble(String key, double data); + + double getDouble(String key, double defaultValue); + + Future setBool(String key, bool data); + + bool getBool(String key, bool defaultValue); + + Future setStringList(String key, List data); + + List getStringList(String key, List defaultValue); + + List getKeys(); + + Future? remove(String key); +} diff --git a/packages/ap_common_core/pubspec.yaml b/packages/ap_common_core/pubspec.yaml new file mode 100644 index 00000000..3fdd95e6 --- /dev/null +++ b/packages/ap_common_core/pubspec.yaml @@ -0,0 +1,25 @@ +name: ap_common_core +description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" +version: 0.0.1 +homepage: https://github.com/abc873693/ap_common +repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_core + +environment: + sdk: ^3.0.0 + +dependencies: + sprintf: ^7.0.0 + intl: ">=0.16.0 <1.0.0" + encrypt: ^5.0.1 + dio: ">=5.4.1 <6.0.0" + dio_cookie_manager: ^3.1.1 + cookie_jar: ^4.0.0 + timezone: ^0.9.4 + jwt_decoder: ^2.0.1 + json_annotation: ^4.6.0 + injector: ^4.0.0 + +dev_dependencies: + lint: ^2.1.2 + build_runner: ^2.0.3 + json_serializable: ^6.3.0 \ No newline at end of file From 177a00fd613c7d869643f8d2c7ab02bc102fc064 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Fri, 4 Oct 2024 16:03:57 +0800 Subject: [PATCH 02/41] fix: `ap_common_core` separate static error --- .../src/models/announcement_login_data.dart | 8 +- .../lib/src/models/course_data.dart | 78 +++++++++---------- .../lib/src/models/course_notify_data.dart | 76 +++++++++--------- .../lib/src/models/score_data.dart | 8 +- .../lib/src/models/semester_data.dart | 8 +- .../lib/src/models/time_code.dart | 2 +- .../lib/src/models/user_info.dart | 8 +- .../lib/src/utilities/analytics_utils.dart | 6 +- .../lib/src/utilities/crashlytics_utils.dart | 4 +- 9 files changed, 98 insertions(+), 100 deletions(-) diff --git a/packages/ap_common_core/lib/src/models/announcement_login_data.dart b/packages/ap_common_core/lib/src/models/announcement_login_data.dart index 9f2c2de8..7505dd04 100644 --- a/packages/ap_common_core/lib/src/models/announcement_login_data.dart +++ b/packages/ap_common_core/lib/src/models/announcement_login_data.dart @@ -1,7 +1,7 @@ import 'dart:convert'; -import 'package:ap_common/config/ap_constants.dart'; -import 'package:ap_common/utils/preferences.dart'; +import 'package:ap_common_core/src/config/ap_constants.dart'; +import 'package:ap_common_core/src/utilities/preference_util.dart'; import 'package:json_annotation/json_annotation.dart'; import 'package:jwt_decoder/jwt_decoder.dart'; @@ -51,7 +51,7 @@ class AnnouncementLoginData { ); void save() { - Preferences.setStringSecurity( + PreferenceUtil.instance.setStringSecurity( '${ApConstants.packageName}' '.announcement_login_data', toRawJson(), @@ -59,7 +59,7 @@ class AnnouncementLoginData { } static AnnouncementLoginData? load() { - final String rawString = Preferences.getStringSecurity( + final String rawString = PreferenceUtil.instance.getStringSecurity( '${ApConstants.packageName}' '.announcement_login_data', '', diff --git a/packages/ap_common_core/lib/src/models/course_data.dart b/packages/ap_common_core/lib/src/models/course_data.dart index 8c06a28f..7c3fd8c8 100644 --- a/packages/ap_common_core/lib/src/models/course_data.dart +++ b/packages/ap_common_core/lib/src/models/course_data.dart @@ -1,9 +1,8 @@ import 'dart:convert'; +import 'dart:developer'; -import 'package:ap_common/config/ap_constants.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; -import 'package:ap_common/utils/preferences.dart'; -import 'package:flutter/material.dart'; +import 'package:ap_common_core/src/config/ap_constants.dart'; +import 'package:ap_common_core/src/utilities/preference_util.dart'; import 'package:json_annotation/json_annotation.dart'; part 'course_data.g.dart'; @@ -28,7 +27,7 @@ class CourseData { ); static CourseData? load(String tag) { - final String rawString = Preferences.getString( + final String rawString = PreferenceUtil.instance.getString( '${ApConstants.packageName}' '.course_data_$tag', '', @@ -94,7 +93,7 @@ class CourseData { String toRawJson() => jsonEncode(toJson()); void save(String tag) { - Preferences.setString( + PreferenceUtil.instance.setString( '${ApConstants.packageName}' '.course_data_$tag', toRawJson(), @@ -102,10 +101,10 @@ class CourseData { } static Future migrateFrom0_10() async { - Preferences.prefs?.getKeys().forEach((String key) { + PreferenceUtil.instance.getKeys().forEach((String key) { if (key.contains('course_data')) { - debugPrint(key); - Preferences.remove(key); + log(key); + PreferenceUtil.instance.remove(key); } }); } @@ -195,36 +194,37 @@ class Course { return buffer.toString(); } - String getTimesShortName(List? timeCode) { - String text = ''; - if (times.isEmpty) return text; - int startIndex = -1; - int repeat = 0; - final int len = times.length; - for (int i = 0; i < len; i++) { - final SectionTime time = times[i]; - if (startIndex != -1 && - time.index - 1 == times[i - 1].index && - time.weekday == times[i - 1].weekday) { - repeat++; - if (i == len - 1 || - times[i + 1].weekday != times[i].weekday || - times[i + 1].index != times[i].index + 1) { - final SectionTime endTime = times[startIndex + repeat]; - text += '-' - '${timeCode![endTime.index].title}'; - repeat = 0; - startIndex = -1; - } - } else { - startIndex = i; - text += '${text.isEmpty ? '' : ' '}' - '(${ApLocalizations.current.weekdaysCourse[time.weekDayIndex]}) ' - '${timeCode![time.index].title}'; - } - } - return text; - } + //TODO: revert for i18n implement + // String getTimesShortName(List? timeCode) { + // String text = ''; + // if (times.isEmpty) return text; + // int startIndex = -1; + // int repeat = 0; + // final int len = times.length; + // for (int i = 0; i < len; i++) { + // final SectionTime time = times[i]; + // if (startIndex != -1 && + // time.index - 1 == times[i - 1].index && + // time.weekday == times[i - 1].weekday) { + // repeat++; + // if (i == len - 1 || + // times[i + 1].weekday != times[i].weekday || + // times[i + 1].index != times[i].index + 1) { + // final SectionTime endTime = times[startIndex + repeat]; + // text += '-' + // '${timeCode![endTime.index].title}'; + // repeat = 0; + // startIndex = -1; + // } + // } else { + // startIndex = i; + // text += '${text.isEmpty ? '' : ' '}' + // '(${ApLocalizations.current.weekdaysCourse[time.weekDayIndex]}) ' + // '${timeCode![time.index].title}'; + // } + // } + // return text; + // } Course copyWith({ String? code, diff --git a/packages/ap_common_core/lib/src/models/course_notify_data.dart b/packages/ap_common_core/lib/src/models/course_notify_data.dart index 11ee5b64..edbcbdb7 100644 --- a/packages/ap_common_core/lib/src/models/course_notify_data.dart +++ b/packages/ap_common_core/lib/src/models/course_notify_data.dart @@ -1,13 +1,11 @@ import 'dart:convert'; +import 'dart:developer'; -import 'package:ap_common/config/ap_constants.dart'; -import 'package:ap_common/models/course_data.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; -import 'package:ap_common/utils/notification_utils.dart'; -import 'package:ap_common/utils/preferences.dart'; -import 'package:flutter/cupertino.dart'; +import 'package:ap_common_core/src/config/ap_constants.dart'; +import 'package:ap_common_core/src/models/course_data.dart'; +import 'package:ap_common_core/src/utilities/notification_util.dart'; +import 'package:ap_common_core/src/utilities/preference_util.dart'; import 'package:json_annotation/json_annotation.dart'; -import 'package:sprintf/sprintf.dart'; part 'course_notify_data.g.dart'; @@ -27,7 +25,7 @@ class CourseNotifyData { ); factory CourseNotifyData.load(String? tag) { - final String rawString = Preferences.getString( + final String rawString = PreferenceUtil.instance.getString( '${ApConstants.packageName}.' 'course_notify_data_$tag', '', @@ -40,16 +38,16 @@ class CourseNotifyData { } factory CourseNotifyData.loadCurrent() { - final String semester = Preferences.getString( + final String semester = PreferenceUtil.instance.getString( ApConstants.currentSemesterCode, ApConstants.semesterLatest, ); - final String rawString = Preferences.getString( + final String rawString = PreferenceUtil.instance.getString( '${ApConstants.packageName}.' 'course_notify_data_$semester', '', ); - debugPrint(rawString); + log('loadCurrent $rawString', name: 'ap_common'); if (rawString == '') { return CourseNotifyData(data: [])..tag = semester; } else { @@ -81,57 +79,59 @@ class CourseNotifyData { } void save() { - Preferences.setString( + PreferenceUtil.instance.setString( '${ApConstants.packageName}' '.course_notify_data_$tag', toRawJson(), ); } - void update(BuildContext context, String tag, CourseData courseData) { - final String key = '${ApConstants.packageName}.course_notify_data_$tag'; - final ApLocalizations ap = ApLocalizations.of(context); - final CourseNotifyData cache = CourseNotifyData.load(key); - for (final CourseNotify courseNotify in cache.data) { - for (final Course courseDetail in courseData.courses) { - if (courseDetail.code == courseNotify.code) { - courseNotify.title = sprintf(ap.courseNotifyContent, [ - courseNotify.title, - if (courseNotify.location == null || courseNotify.location!.isEmpty) - ap.courseNotifyUnknown - else - courseNotify.location, - ]); - } - } - } - Preferences.setString( - key, - toRawJson(), - ); - } + //TODO: revert for i18n implement + // void update(BuildContext context, String tag, CourseData courseData) { + // final String key = '${ApConstants.packageName}.course_notify_data_$tag'; + // final ApLocalizations ap = ApLocalizations.of(context); + // final CourseNotifyData cache = CourseNotifyData.load(key); + // for (final CourseNotify courseNotify in cache.data) { + // for (final Course courseDetail in courseData.courses) { + // if (courseDetail.code == courseNotify.code) { + // courseNotify.title = sprintf(ap.courseNotifyContent, [ + // courseNotify.title, + // if (courseNotify.location == null || courseNotify.location!.isEmpty) + // ap.courseNotifyUnknown + // else + // courseNotify.location, + // ]); + // } + // } + // } + // PreferenceUtil.instance.setString( + // key, + // toRawJson(), + // ); + // } static void clearOldVersionNotification({ required String tag, required String newTag, }) { - final String rawString = Preferences.getString( + final String rawString = PreferenceUtil.instance.getString( '${ApConstants.packageName}.' 'course_notify_data_$tag', '', ); - debugPrint(rawString); + log('clearOldVersionNotification $rawString', name: 'ap_common'); if (rawString.isNotEmpty) { final CourseNotifyData courseNotifyData = CourseNotifyData.fromRawJson(rawString); for (final CourseNotify element in courseNotifyData.data) { - NotificationUtils.cancelCourseNotify(id: element.id); + NotificationUtil.instance.cancelNotify(id: element.id); } courseNotifyData.data.clear(); courseNotifyData.tag = newTag; courseNotifyData.save(); } - Preferences.remove('${ApConstants.packageName}.course_notify_data_$tag'); + PreferenceUtil.instance + .remove('${ApConstants.packageName}.course_notify_data_$tag'); } } diff --git a/packages/ap_common_core/lib/src/models/score_data.dart b/packages/ap_common_core/lib/src/models/score_data.dart index db550dff..ca494df1 100644 --- a/packages/ap_common_core/lib/src/models/score_data.dart +++ b/packages/ap_common_core/lib/src/models/score_data.dart @@ -1,7 +1,7 @@ import 'dart:convert'; -import 'package:ap_common/config/ap_constants.dart'; -import 'package:ap_common/utils/preferences.dart'; +import 'package:ap_common_core/src/config/ap_constants.dart'; +import 'package:ap_common_core/src/utilities/preference_util.dart'; import 'package:json_annotation/json_annotation.dart'; part 'score_data.g.dart'; @@ -26,7 +26,7 @@ class ScoreData { ); static ScoreData? load(String tag) { - final String rawString = Preferences.getString( + final String rawString = PreferenceUtil.instance.getString( '${ApConstants.packageName}' '.score_data_$tag', '', @@ -46,7 +46,7 @@ class ScoreData { String toRawJson() => jsonEncode(toJson()); void save(String tag) { - Preferences.setString( + PreferenceUtil.instance.setString( '${ApConstants.packageName}' '.score_data_$tag', toRawJson(), diff --git a/packages/ap_common_core/lib/src/models/semester_data.dart b/packages/ap_common_core/lib/src/models/semester_data.dart index c75b858f..e31d127d 100644 --- a/packages/ap_common_core/lib/src/models/semester_data.dart +++ b/packages/ap_common_core/lib/src/models/semester_data.dart @@ -1,7 +1,7 @@ import 'dart:convert'; -import 'package:ap_common/config/ap_constants.dart'; -import 'package:ap_common/utils/preferences.dart'; +import 'package:ap_common_core/src/config/ap_constants.dart'; +import 'package:ap_common_core/src/utilities/preference_util.dart'; import 'package:json_annotation/json_annotation.dart'; part 'semester_data.g.dart'; @@ -22,7 +22,7 @@ class SemesterData { ); static SemesterData? load() { - final String rawString = Preferences.getString( + final String rawString = PreferenceUtil.instance.getString( '${ApConstants.packageName}' 'semester_data', '', @@ -63,7 +63,7 @@ class SemesterData { String toRawJson() => jsonEncode(toJson()); void save() { - Preferences.setString( + PreferenceUtil.instance.setString( '${ApConstants.packageName}' 'semester_data', toRawJson(), diff --git a/packages/ap_common_core/lib/src/models/time_code.dart b/packages/ap_common_core/lib/src/models/time_code.dart index 90e4da5e..e2d65503 100644 --- a/packages/ap_common_core/lib/src/models/time_code.dart +++ b/packages/ap_common_core/lib/src/models/time_code.dart @@ -4,7 +4,7 @@ import 'dart:convert'; -import 'package:ap_common/models/course_data.dart' show TimeCode; +import 'package:ap_common_core/src/models/course_data.dart' show TimeCode; import 'package:json_annotation/json_annotation.dart'; part 'time_code.g.dart'; diff --git a/packages/ap_common_core/lib/src/models/user_info.dart b/packages/ap_common_core/lib/src/models/user_info.dart index 38feb86f..e32cc51a 100644 --- a/packages/ap_common_core/lib/src/models/user_info.dart +++ b/packages/ap_common_core/lib/src/models/user_info.dart @@ -1,8 +1,8 @@ import 'dart:convert'; import 'dart:typed_data'; -import 'package:ap_common/config/ap_constants.dart'; -import 'package:ap_common/utils/preferences.dart'; +import 'package:ap_common_core/src/config/ap_constants.dart'; +import 'package:ap_common_core/src/utilities/preference_util.dart'; import 'package:json_annotation/json_annotation.dart'; part 'user_info.g.dart'; @@ -34,7 +34,7 @@ class UserInfo { ); static UserInfo? load(String tag) { - final String rawString = Preferences.getString( + final String rawString = PreferenceUtil.instance.getString( '${ApConstants.packageName}' '.user_info_$tag', '', @@ -62,7 +62,7 @@ class UserInfo { String toRawJson() => jsonEncode(toJson()); void save(String tag) { - Preferences.setString( + PreferenceUtil.instance.setString( '${ApConstants.packageName}' '.user_info_$tag', toRawJson(), diff --git a/packages/ap_common_core/lib/src/utilities/analytics_utils.dart b/packages/ap_common_core/lib/src/utilities/analytics_utils.dart index db18deb9..21fde358 100644 --- a/packages/ap_common_core/lib/src/utilities/analytics_utils.dart +++ b/packages/ap_common_core/lib/src/utilities/analytics_utils.dart @@ -1,5 +1,4 @@ -import 'package:ap_common/models/user_info.dart'; -import 'package:flutter/material.dart'; +import 'package:ap_common_core/src/models/user_info.dart'; abstract class AnalyticsUtils { static AnalyticsUtils? instance; @@ -18,5 +17,6 @@ abstract class AnalyticsUtils { Future logTimeEvent(String name, double seconds); - Future logThemeEvent(ThemeMode themeMode); + //TODO: migration to implement level + // Future logThemeEvent(ThemeMode themeMode); } diff --git a/packages/ap_common_core/lib/src/utilities/crashlytics_utils.dart b/packages/ap_common_core/lib/src/utilities/crashlytics_utils.dart index 5c0bae87..33c1833b 100644 --- a/packages/ap_common_core/lib/src/utilities/crashlytics_utils.dart +++ b/packages/ap_common_core/lib/src/utilities/crashlytics_utils.dart @@ -1,5 +1,3 @@ -import 'package:flutter/material.dart'; - abstract class CrashlyticsUtils { static CrashlyticsUtils? instance; @@ -7,7 +5,7 @@ abstract class CrashlyticsUtils { dynamic exception, StackTrace stack, { dynamic reason, - Iterable? information, + Iterable? information, bool? printDetails, }); From d463f7c7b5cd78c171b90eea0210f81649fc5626 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Fri, 4 Oct 2024 18:15:00 +0800 Subject: [PATCH 03/41] feat: `ap_common` import `ap_common_core` --- .../lib/api/announcement_helper.dart | 5 +- packages/ap_common/lib/api/github_helper.dart | 2 +- packages/ap_common/lib/api/imgur_helper.dart | 4 +- .../lib/callback/general_callback.dart | 3 +- .../ap_common/lib/pages/about_us_page.dart | 2 +- .../lib/pages/announcement/edit_page.dart | 2 - .../lib/pages/announcement/home_page.dart | 3 -- .../lib/pages/announcement_content_page.dart | 4 +- .../lib/scaffold/course_scaffold.dart | 42 ++++++++++++++--- .../lib/scaffold/home_page_scaffold.dart | 6 +-- .../lib/scaffold/score_scaffold.dart | 4 +- .../lib/scaffold/user_info_scaffold.dart | 4 +- .../ap_common/lib/utils/ap_localizations.dart | 1 - packages/ap_common/lib/utils/ap_utils.dart | 2 +- .../ap_common/lib/utils/dialog_utils.dart | 2 +- .../lib/utils/notification_utils.dart | 2 +- packages/ap_common/lib/utils/preferences.dart | 2 +- .../lib/views/notification_list_view.dart | 4 +- packages/ap_common/lib/views/pdf_view.dart | 2 +- .../ap_common/lib/views/phone_list_view.dart | 3 +- packages/ap_common/lib/widgets/ap_drawer.dart | 3 +- .../ap_common/lib/widgets/item_picker.dart | 2 +- .../lib/widgets/setting_page_widgets.dart | 7 +-- packages/ap_common/pubspec.lock | 16 +++++++ packages/ap_common/pubspec.yaml | 2 + packages/ap_common/test/model_test.dart | 7 +-- packages/ap_common_core/analysis_options.yaml | 47 +++++++++++++++++-- .../ap_common_core/lib/ap_common_core.dart | 2 - packages/ap_common_core/lib/injector.dart | 2 +- .../lib/src/models/course_data.dart | 32 ------------- 30 files changed, 122 insertions(+), 97 deletions(-) diff --git a/packages/ap_common/lib/api/announcement_helper.dart b/packages/ap_common/lib/api/announcement_helper.dart index ce75383c..17f1f9b8 100644 --- a/packages/ap_common/lib/api/announcement_helper.dart +++ b/packages/ap_common/lib/api/announcement_helper.dart @@ -4,11 +4,10 @@ import 'dart:ui' show Locale; import 'package:ap_common/callback/general_callback.dart'; import 'package:ap_common/l10n/l10n.dart'; -import 'package:ap_common/models/announcement_data.dart'; -import 'package:ap_common/models/announcement_login_data.dart'; +import 'package:ap_common_core/ap_common_core.dart'; export 'package:ap_common/callback/general_callback.dart'; -export 'package:ap_common/models/announcement_login_data.dart'; +export 'package:ap_common_core/ap_common_core.dart'; enum AnnouncementLoginType { normal, diff --git a/packages/ap_common/lib/api/github_helper.dart b/packages/ap_common/lib/api/github_helper.dart index a16bbac1..f4f243e1 100644 --- a/packages/ap_common/lib/api/github_helper.dart +++ b/packages/ap_common/lib/api/github_helper.dart @@ -1,7 +1,7 @@ import 'dart:convert'; import 'package:ap_common/callback/general_callback.dart'; -import 'package:ap_common/models/announcement_data.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:cookie_jar/cookie_jar.dart'; import 'package:dio_cookie_manager/dio_cookie_manager.dart'; diff --git a/packages/ap_common/lib/api/imgur_helper.dart b/packages/ap_common/lib/api/imgur_helper.dart index b9c9b22d..80db0cd0 100644 --- a/packages/ap_common/lib/api/imgur_helper.dart +++ b/packages/ap_common/lib/api/imgur_helper.dart @@ -2,13 +2,13 @@ import 'dart:async'; import 'dart:typed_data'; import 'package:ap_common/callback/general_callback.dart'; -import 'package:ap_common/models/imgur_upload_response.dart'; import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:path/path.dart' as p; export 'package:ap_common/callback/general_callback.dart'; -export 'package:ap_common/models/announcement_login_data.dart'; +export 'package:ap_common_core/ap_common_core.dart'; class ImgurHelper { ImgurHelper() { diff --git a/packages/ap_common/lib/callback/general_callback.dart b/packages/ap_common/lib/callback/general_callback.dart index f502fe0a..8c9cff5f 100644 --- a/packages/ap_common/lib/callback/general_callback.dart +++ b/packages/ap_common/lib/callback/general_callback.dart @@ -1,9 +1,8 @@ -import 'package:ap_common/models/general_response.dart'; import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:flutter/widgets.dart'; -export 'package:ap_common/models/general_response.dart'; export 'package:dio/dio.dart'; typedef DioExceptionCallback = Function(DioException); diff --git a/packages/ap_common/lib/pages/about_us_page.dart b/packages/ap_common/lib/pages/about_us_page.dart index 0f6f0baf..43232c78 100644 --- a/packages/ap_common/lib/pages/about_us_page.dart +++ b/packages/ap_common/lib/pages/about_us_page.dart @@ -1,9 +1,9 @@ import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common/resources/resources.dart'; -import 'package:ap_common/utils/analytics_utils.dart'; import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:flutter/material.dart'; import 'package:flutter_linkify/flutter_linkify.dart'; diff --git a/packages/ap_common/lib/pages/announcement/edit_page.dart b/packages/ap_common/lib/pages/announcement/edit_page.dart index 251138cf..f784f667 100644 --- a/packages/ap_common/lib/pages/announcement/edit_page.dart +++ b/packages/ap_common/lib/pages/announcement/edit_page.dart @@ -1,7 +1,5 @@ import 'package:ap_common/api/announcement_helper.dart'; import 'package:ap_common/api/imgur_helper.dart'; -import 'package:ap_common/models/announcement_data.dart'; -import 'package:ap_common/models/imgur_upload_response.dart'; import 'package:ap_common/pages/announcement/home_page.dart' show TagColors; import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; diff --git a/packages/ap_common/lib/pages/announcement/home_page.dart b/packages/ap_common/lib/pages/announcement/home_page.dart index ae6565aa..14425154 100644 --- a/packages/ap_common/lib/pages/announcement/home_page.dart +++ b/packages/ap_common/lib/pages/announcement/home_page.dart @@ -1,8 +1,6 @@ import 'dart:io'; import 'package:ap_common/api/announcement_helper.dart'; -import 'package:ap_common/config/ap_constants.dart'; -import 'package:ap_common/models/announcement_data.dart'; import 'package:ap_common/pages/announcement/black_list_page.dart'; import 'package:ap_common/pages/announcement/edit_page.dart'; import 'package:ap_common/resources/ap_icon.dart'; @@ -10,7 +8,6 @@ import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common/scaffold/login_scaffold.dart'; import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; -import 'package:ap_common/utils/crashlytics_utils.dart'; import 'package:ap_common/utils/preferences.dart'; import 'package:ap_common/widgets/hint_content.dart'; import 'package:ap_common/widgets/progress_dialog.dart'; diff --git a/packages/ap_common/lib/pages/announcement_content_page.dart b/packages/ap_common/lib/pages/announcement_content_page.dart index 660ad67f..e94dd4f0 100644 --- a/packages/ap_common/lib/pages/announcement_content_page.dart +++ b/packages/ap_common/lib/pages/announcement_content_page.dart @@ -1,12 +1,10 @@ -import 'package:ap_common/config/ap_constants.dart'; -import 'package:ap_common/models/announcement_data.dart'; import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/analytics_utils.dart'; import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common/widgets/ap_network_image.dart'; import 'package:ap_common/widgets/hint_content.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:flutter_linkify/flutter_linkify.dart'; diff --git a/packages/ap_common/lib/scaffold/course_scaffold.dart b/packages/ap_common/lib/scaffold/course_scaffold.dart index a85171f5..f2101879 100644 --- a/packages/ap_common/lib/scaffold/course_scaffold.dart +++ b/packages/ap_common/lib/scaffold/course_scaffold.dart @@ -2,16 +2,10 @@ import 'dart:io'; import 'dart:ui' as ui; import 'package:add_2_calendar/add_2_calendar.dart'; -import 'package:ap_common/config/ap_constants.dart'; -import 'package:ap_common/models/course_data.dart'; -import 'package:ap_common/models/course_notify_data.dart'; -import 'package:ap_common/models/general_response.dart'; -import 'package:ap_common/models/semester_data.dart'; import 'package:ap_common/resources/ap_colors.dart'; import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common/resources/resources.dart'; -import 'package:ap_common/utils/analytics_utils.dart'; import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common/utils/notification_utils.dart'; @@ -20,12 +14,13 @@ import 'package:ap_common/widgets/default_dialog.dart'; import 'package:ap_common/widgets/hint_content.dart'; import 'package:ap_common/widgets/item_picker.dart'; import 'package:ap_common/widgets/option_dialog.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:auto_size_text_pk/auto_size_text_pk.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; -export 'package:ap_common/models/course_data.dart'; +export 'package:ap_common_core/ap_common_core.dart'; typedef CourseNotifyCallback = Function( CourseNotify? courseNotify, @@ -1344,3 +1339,36 @@ extension DateTimeExtension on DateTime { ); } } + +extension _CourseExtension on Course { + String getTimesShortName(List? timeCode) { + String text = ''; + if (times.isEmpty) return text; + int startIndex = -1; + int repeat = 0; + final int len = times.length; + for (int i = 0; i < len; i++) { + final SectionTime time = times[i]; + if (startIndex != -1 && + time.index - 1 == times[i - 1].index && + time.weekday == times[i - 1].weekday) { + repeat++; + if (i == len - 1 || + times[i + 1].weekday != times[i].weekday || + times[i + 1].index != times[i].index + 1) { + final SectionTime endTime = times[startIndex + repeat]; + text += '-' + '${timeCode![endTime.index].title}'; + repeat = 0; + startIndex = -1; + } + } else { + startIndex = i; + text += '${text.isEmpty ? '' : ' '}' + '(${ApLocalizations.current.weekdaysCourse[time.weekDayIndex]}) ' + '${timeCode![time.index].title}'; + } + } + return text; + } +} diff --git a/packages/ap_common/lib/scaffold/home_page_scaffold.dart b/packages/ap_common/lib/scaffold/home_page_scaffold.dart index 1da569e7..54a3d28b 100644 --- a/packages/ap_common/lib/scaffold/home_page_scaffold.dart +++ b/packages/ap_common/lib/scaffold/home_page_scaffold.dart @@ -1,19 +1,17 @@ import 'dart:async'; import 'dart:io'; -import 'package:ap_common/config/ap_constants.dart'; -import 'package:ap_common/models/announcement_data.dart'; import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/analytics_utils.dart'; import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/widgets/ap_network_image.dart'; import 'package:ap_common/widgets/hint_content.dart'; import 'package:ap_common/widgets/yes_no_dialog.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -export 'package:ap_common/models/announcement_data.dart'; +export 'package:ap_common_core/ap_common_core.dart'; enum HomeState { loading, finish, error, empty, offline } diff --git a/packages/ap_common/lib/scaffold/score_scaffold.dart b/packages/ap_common/lib/scaffold/score_scaffold.dart index 7e070435..94a06c01 100644 --- a/packages/ap_common/lib/scaffold/score_scaffold.dart +++ b/packages/ap_common/lib/scaffold/score_scaffold.dart @@ -1,12 +1,10 @@ -import 'package:ap_common/models/score_data.dart'; -import 'package:ap_common/models/semester_data.dart'; import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/analytics_utils.dart'; import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/widgets/hint_content.dart'; import 'package:ap_common/widgets/item_picker.dart'; import 'package:ap_common/widgets/option_dialog.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:flutter/material.dart'; enum ScoreState { loading, finish, error, empty, offlineEmpty, custom } diff --git a/packages/ap_common/lib/scaffold/user_info_scaffold.dart b/packages/ap_common/lib/scaffold/user_info_scaffold.dart index 1566059a..d6ee947d 100644 --- a/packages/ap_common/lib/scaffold/user_info_scaffold.dart +++ b/packages/ap_common/lib/scaffold/user_info_scaffold.dart @@ -1,9 +1,7 @@ -import 'package:ap_common/config/ap_constants.dart'; -import 'package:ap_common/models/user_info.dart'; import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common/resources/resources.dart'; -import 'package:ap_common/utils/analytics_utils.dart'; import 'package:ap_common/utils/ap_localizations.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:barcode_widget/barcode_widget.dart'; import 'package:flutter/material.dart'; diff --git a/packages/ap_common/lib/utils/ap_localizations.dart b/packages/ap_common/lib/utils/ap_localizations.dart index 08ad6608..ad9259fd 100644 --- a/packages/ap_common/lib/utils/ap_localizations.dart +++ b/packages/ap_common/lib/utils/ap_localizations.dart @@ -7,7 +7,6 @@ import 'package:intl/intl.dart'; import 'package:multiple_localization/multiple_localization.dart'; export 'package:ap_common/l10n/l10n.dart'; -export 'package:ap_common/models/ap_support_language.dart'; export 'package:intl/intl.dart'; extension ApExtension on ApLocalizations { diff --git a/packages/ap_common/lib/utils/ap_utils.dart b/packages/ap_common/lib/utils/ap_utils.dart index b91becab..eaa19e86 100644 --- a/packages/ap_common/lib/utils/ap_utils.dart +++ b/packages/ap_common/lib/utils/ap_utils.dart @@ -3,9 +3,9 @@ import 'dart:io'; import 'package:ap_common/callback/general_callback.dart'; import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common/utils/ap_localizations.dart'; -import 'package:ap_common/utils/crashlytics_utils.dart'; import 'package:ap_common/utils/toast.dart'; import 'package:ap_common/widgets/yes_no_dialog.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:file_saver/file_saver.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; diff --git a/packages/ap_common/lib/utils/dialog_utils.dart b/packages/ap_common/lib/utils/dialog_utils.dart index 6062fd48..0b619ad4 100644 --- a/packages/ap_common/lib/utils/dialog_utils.dart +++ b/packages/ap_common/lib/utils/dialog_utils.dart @@ -1,12 +1,12 @@ import 'dart:convert'; import 'dart:io'; -import 'package:ap_common/models/version_info.dart'; import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common/widgets/default_dialog.dart'; import 'package:ap_common/widgets/yes_no_dialog.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:flutter/material.dart'; import 'package:sprintf/sprintf.dart'; diff --git a/packages/ap_common/lib/utils/notification_utils.dart b/packages/ap_common/lib/utils/notification_utils.dart index c77698fc..52067cd9 100644 --- a/packages/ap_common/lib/utils/notification_utils.dart +++ b/packages/ap_common/lib/utils/notification_utils.dart @@ -1,7 +1,7 @@ import 'dart:io'; -import 'package:ap_common/models/course_notify_data.dart'; import 'package:ap_common/utils/ap_localizations.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; diff --git a/packages/ap_common/lib/utils/preferences.dart b/packages/ap_common/lib/utils/preferences.dart index 682dee0a..e1f52796 100644 --- a/packages/ap_common/lib/utils/preferences.dart +++ b/packages/ap_common/lib/utils/preferences.dart @@ -1,7 +1,7 @@ import 'dart:io'; -import 'package:ap_common/config/ap_constants.dart'; import 'package:ap_common/resources/ap_icon.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:encrypt/encrypt.dart' as encrypt; import 'package:flutter/foundation.dart'; import 'package:shared_preferences/shared_preferences.dart'; diff --git a/packages/ap_common/lib/views/notification_list_view.dart b/packages/ap_common/lib/views/notification_list_view.dart index 0f093901..b5c9b4ff 100644 --- a/packages/ap_common/lib/views/notification_list_view.dart +++ b/packages/ap_common/lib/views/notification_list_view.dart @@ -1,11 +1,9 @@ -import 'package:ap_common/config/analytics_constants.dart'; -import 'package:ap_common/models/notification_data.dart'; import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/analytics_utils.dart'; import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common/widgets/hint_content.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:flutter/material.dart'; enum NotificationState { loading, finish, loadingMore, error, empty, offline } diff --git a/packages/ap_common/lib/views/pdf_view.dart b/packages/ap_common/lib/views/pdf_view.dart index cffa84cc..27c016d0 100644 --- a/packages/ap_common/lib/views/pdf_view.dart +++ b/packages/ap_common/lib/views/pdf_view.dart @@ -1,9 +1,9 @@ import 'dart:typed_data'; import 'package:ap_common/resources/ap_icon.dart'; -import 'package:ap_common/utils/analytics_utils.dart'; import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/widgets/hint_content.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:flutter/material.dart'; import 'package:pdf/pdf.dart'; import 'package:printing/printing.dart'; diff --git a/packages/ap_common/lib/views/phone_list_view.dart b/packages/ap_common/lib/views/phone_list_view.dart index 72266aa0..192fff56 100644 --- a/packages/ap_common/lib/views/phone_list_view.dart +++ b/packages/ap_common/lib/views/phone_list_view.dart @@ -1,10 +1,9 @@ -import 'package:ap_common/models/phone_model.dart'; import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/analytics_utils.dart'; import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common/widgets/hint_content.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:flutter/material.dart'; enum PhoneState { loading, finish, error } diff --git a/packages/ap_common/lib/widgets/ap_drawer.dart b/packages/ap_common/lib/widgets/ap_drawer.dart index 28623789..c9cd0d83 100644 --- a/packages/ap_common/lib/widgets/ap_drawer.dart +++ b/packages/ap_common/lib/widgets/ap_drawer.dart @@ -1,10 +1,9 @@ import 'dart:typed_data'; -import 'package:ap_common/config/ap_constants.dart'; -import 'package:ap_common/models/user_info.dart'; import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common/utils/ap_localizations.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:flutter/material.dart'; class ApDrawer extends StatefulWidget { diff --git a/packages/ap_common/lib/widgets/item_picker.dart b/packages/ap_common/lib/widgets/item_picker.dart index 841b4257..806c6744 100644 --- a/packages/ap_common/lib/widgets/item_picker.dart +++ b/packages/ap_common/lib/widgets/item_picker.dart @@ -1,7 +1,7 @@ import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/analytics_utils.dart'; import 'package:ap_common/widgets/option_dialog.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:flutter/material.dart'; class ItemPicker extends StatelessWidget { diff --git a/packages/ap_common/lib/widgets/setting_page_widgets.dart b/packages/ap_common/lib/widgets/setting_page_widgets.dart index ec28df72..37eb0436 100644 --- a/packages/ap_common/lib/widgets/setting_page_widgets.dart +++ b/packages/ap_common/lib/widgets/setting_page_widgets.dart @@ -1,14 +1,11 @@ -import 'package:ap_common/config/analytics_constants.dart'; -import 'package:ap_common/config/ap_constants.dart'; -import 'package:ap_common/models/course_notify_data.dart'; import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/analytics_utils.dart'; import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common/utils/notification_utils.dart'; import 'package:ap_common/utils/preferences.dart'; import 'package:ap_common/widgets/option_dialog.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:flutter/material.dart'; export 'package:package_info_plus/package_info_plus.dart'; @@ -289,7 +286,7 @@ class ChangeThemeModeItem extends StatelessWidget { 'code': mode.toString(), }, ); - AnalyticsUtils.instance?.logThemeEvent(mode); + // AnalyticsUtils.instance?.logThemeEvent(mode); }, ), ); diff --git a/packages/ap_common/pubspec.lock b/packages/ap_common/pubspec.lock index 03e45d16..417cd527 100644 --- a/packages/ap_common/pubspec.lock +++ b/packages/ap_common/pubspec.lock @@ -38,6 +38,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.3" + ap_common_core: + dependency: "direct main" + description: + name: ap_common_core + sha256: "7fc149e4ae7899cd60d2c35523dc83e1593e4d91906176dae29a53a6684ea36c" + url: "https://pub.dev" + source: hosted + version: "0.0.1" app_tracking_transparency: dependency: "direct main" description: @@ -722,6 +730,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.5" + injector: + dependency: transitive + description: + name: injector + sha256: d692c37788872bfd4bd7c01b864b0712190a25ae5a346431ff69949d5728a2e1 + url: "https://pub.dev" + source: hosted + version: "4.0.0" intl: dependency: "direct main" description: diff --git a/packages/ap_common/pubspec.yaml b/packages/ap_common/pubspec.yaml index e2e54e4d..b8916f64 100644 --- a/packages/ap_common/pubspec.yaml +++ b/packages/ap_common/pubspec.yaml @@ -13,6 +13,8 @@ dependencies: flutter_localizations: sdk: flutter + ap_common_core: ^0.0.1 + # Dart Packages sprintf: ^7.0.0 intl: ">=0.16.0 <1.0.0" diff --git a/packages/ap_common/test/model_test.dart b/packages/ap_common/test/model_test.dart index 2af3329f..48ba4139 100644 --- a/packages/ap_common/test/model_test.dart +++ b/packages/ap_common/test/model_test.dart @@ -1,9 +1,4 @@ -import 'package:ap_common/models/announcement_data.dart'; -import 'package:ap_common/models/course_data.dart'; -import 'package:ap_common/models/notification_data.dart'; -import 'package:ap_common/models/score_data.dart'; -import 'package:ap_common/models/semester_data.dart'; -import 'package:ap_common/models/user_info.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:flutter_test/flutter_test.dart'; //ignore_for_file: lines_longer_than_80_chars diff --git a/packages/ap_common_core/analysis_options.yaml b/packages/ap_common_core/analysis_options.yaml index a5744c1c..8a312e70 100644 --- a/packages/ap_common_core/analysis_options.yaml +++ b/packages/ap_common_core/analysis_options.yaml @@ -1,4 +1,45 @@ -include: package:flutter_lints/flutter.yaml +include: package:lint/strict.yaml -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options +analyzer: + exclude: + # generated files + - lib/src/models/*.g.dart + - lib/src/**/*.g.dart + +linter: + rules: + # ------ Disable individual rules ----- # + # --- # + # Turn off what you don't like. # + # ------------------------------------- # + + # Use parameter order as in json response + always_put_required_named_parameters_first: false + + # Util classes are awesome! + avoid_classes_with_only_static_members: false + + + # ------ Enable individual rules ------ # + # --- # + # These rules here are good but too # + # opinionated to enable them by default # + # ------------------------------------- # + + # Make constructors the first thing in every class + sort_constructors_first: true + + # The new tabs vs. spaces. Choose wisely + prefer_single_quotes: true + prefer_double_quotes: false + + # Good packages document everything + public_member_api_docs: false + + # Blindly follow the Flutter code style, which prefers types everywhere + always_specify_types: true + + # Back to the 80s + lines_longer_than_80_chars: false + + sort_pub_dependencies: false \ No newline at end of file diff --git a/packages/ap_common_core/lib/ap_common_core.dart b/packages/ap_common_core/lib/ap_common_core.dart index a31db257..3494a5ce 100644 --- a/packages/ap_common_core/lib/ap_common_core.dart +++ b/packages/ap_common_core/lib/ap_common_core.dart @@ -1,5 +1,3 @@ -library ap_common_core; - export 'src/config/analytics_constants.dart'; export 'src/config/ap_constants.dart'; export 'src/models/announcement_data.dart'; diff --git a/packages/ap_common_core/lib/injector.dart b/packages/ap_common_core/lib/injector.dart index 0e979962..49c13f81 100644 --- a/packages/ap_common_core/lib/injector.dart +++ b/packages/ap_common_core/lib/injector.dart @@ -1,4 +1,4 @@ // Use this static instance import 'package:injector/injector.dart'; -final injector = Injector.appInstance; +final Injector injector = Injector.appInstance; diff --git a/packages/ap_common_core/lib/src/models/course_data.dart b/packages/ap_common_core/lib/src/models/course_data.dart index 7c3fd8c8..a1769c00 100644 --- a/packages/ap_common_core/lib/src/models/course_data.dart +++ b/packages/ap_common_core/lib/src/models/course_data.dart @@ -194,38 +194,6 @@ class Course { return buffer.toString(); } - //TODO: revert for i18n implement - // String getTimesShortName(List? timeCode) { - // String text = ''; - // if (times.isEmpty) return text; - // int startIndex = -1; - // int repeat = 0; - // final int len = times.length; - // for (int i = 0; i < len; i++) { - // final SectionTime time = times[i]; - // if (startIndex != -1 && - // time.index - 1 == times[i - 1].index && - // time.weekday == times[i - 1].weekday) { - // repeat++; - // if (i == len - 1 || - // times[i + 1].weekday != times[i].weekday || - // times[i + 1].index != times[i].index + 1) { - // final SectionTime endTime = times[startIndex + repeat]; - // text += '-' - // '${timeCode![endTime.index].title}'; - // repeat = 0; - // startIndex = -1; - // } - // } else { - // startIndex = i; - // text += '${text.isEmpty ? '' : ' '}' - // '(${ApLocalizations.current.weekdaysCourse[time.weekDayIndex]}) ' - // '${timeCode![time.index].title}'; - // } - // } - // return text; - // } - Course copyWith({ String? code, String? title, From 4326c12e28732d86a1b5a0fff2fdd6d3a3c6e5e6 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Fri, 4 Oct 2024 19:22:32 +0800 Subject: [PATCH 04/41] feat: migrate `NotificationUtil` and `Preference` to injection version --- .../lib/pages/announcement/home_page.dart | 53 +++++++++++-------- .../lib/scaffold/course_scaffold.dart | 31 +++++------ .../lib/utils/notification_utils.dart | 52 ++++++++++-------- packages/ap_common/lib/utils/preferences.dart | 52 ++++++++++++------ .../lib/widgets/setting_page_widgets.dart | 21 ++++---- .../lib/src/utilities/notification_util.dart | 2 +- .../lib/src/utilities/preference_util.dart | 2 +- 7 files changed, 125 insertions(+), 88 deletions(-) diff --git a/packages/ap_common/lib/pages/announcement/home_page.dart b/packages/ap_common/lib/pages/announcement/home_page.dart index 14425154..3253976a 100644 --- a/packages/ap_common/lib/pages/announcement/home_page.dart +++ b/packages/ap_common/lib/pages/announcement/home_page.dart @@ -8,7 +8,6 @@ import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common/scaffold/login_scaffold.dart'; import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; -import 'package:ap_common/utils/preferences.dart'; import 'package:ap_common/widgets/hint_content.dart'; import 'package:ap_common/widgets/progress_dialog.dart'; import 'package:ap_common/widgets/yes_no_dialog.dart'; @@ -115,7 +114,7 @@ class _AnnouncementHomePageState extends State { setState(() { onlyShowNotReview = !onlyShowNotReview!; }); - Preferences.setBool( + PreferenceUtil.instance.setBool( ApConstants.announcementOnlyNotReview, onlyShowNotReview!, ); @@ -128,7 +127,7 @@ class _AnnouncementHomePageState extends State { setState(() { onlyShowNotReview = value; }); - Preferences.setBool( + PreferenceUtil.instance.setBool( ApConstants.announcementOnlyNotReview, onlyShowNotReview!, ); @@ -154,7 +153,8 @@ class _AnnouncementHomePageState extends State { }, ), ], - if (Preferences.getBool(ApConstants.announcementIsLogin, false)) + if (PreferenceUtil.instance + .getBool(ApConstants.announcementIsLogin, false)) IconButton( icon: const Icon(Icons.exit_to_app), tooltip: ap.logout, @@ -162,7 +162,10 @@ class _AnnouncementHomePageState extends State { if (AnnouncementHelper.instance.loginType == AnnouncementLoginType.google) await _googleSignIn.signOut(); setState(() { - Preferences.setBool(ApConstants.announcementIsLogin, false); + PreferenceUtil.instance.setBool( + ApConstants.announcementIsLogin, + false, + ); state = _State.notLogin; loginData = null; }); @@ -680,13 +683,15 @@ class _AnnouncementHomePageState extends State { Future _getPreference() async { final bool isLogin = - Preferences.getBool(ApConstants.announcementIsLogin, false); - onlyShowNotReview = - Preferences.getBool(ApConstants.announcementOnlyNotReview, false); + PreferenceUtil.instance.getBool(ApConstants.announcementIsLogin, false); + onlyShowNotReview = PreferenceUtil.instance + .getBool(ApConstants.announcementOnlyNotReview, false); _username.text = - Preferences.getString(ApConstants.announcementUsername, ''); - _password.text = - Preferences.getStringSecurity(ApConstants.announcementPassword, ''); + PreferenceUtil.instance.getString(ApConstants.announcementUsername, ''); + _password.text = PreferenceUtil.instance.getStringSecurity( + ApConstants.announcementPassword, + '', + ); if (isLogin) { setState(() => state = _State.done); loginData = AnnouncementLoginData.load(); @@ -699,8 +704,8 @@ class _AnnouncementHomePageState extends State { ); } if (loginData?.isExpired ?? true) { - final int index = - Preferences.getInt(ApConstants.announcementLoginType, 0); + final int index = PreferenceUtil.instance + .getInt(ApConstants.announcementLoginType, 0); _login(AnnouncementLoginType.values[index]); } else { AnnouncementHelper.instance.setAuthorization(loginData!.key); @@ -721,8 +726,8 @@ class _AnnouncementHomePageState extends State { (_username.text.isEmpty || _password.text.isEmpty)) { ApUtils.showToast(context, ap.doNotEmpty); } else { - final bool isNotLogin = - !Preferences.getBool(ApConstants.announcementIsLogin, false); + final bool isNotLogin = !PreferenceUtil.instance + .getBool(ApConstants.announcementIsLogin, false); if (isNotLogin) { showDialog( context: context, @@ -733,11 +738,14 @@ class _AnnouncementHomePageState extends State { barrierDismissible: false, ); } - String? idToken = Preferences.getBool( + String? idToken = PreferenceUtil.instance.getBool( ApConstants.announcementIsLogin, false, ) - ? Preferences.getStringSecurity(ApConstants.announcementIdToken, '') + ? PreferenceUtil.instance.getStringSecurity( + ApConstants.announcementIdToken, + '', + ) : ''; final GeneralCallback callback = @@ -762,19 +770,20 @@ class _AnnouncementHomePageState extends State { if (kDebugMode) debugPrint(loginData.key); if (isNotLogin) Navigator.of(context, rootNavigator: true).pop(); if (loginType == AnnouncementLoginType.normal) { - Preferences.setStringSecurity( + PreferenceUtil.instance.setStringSecurity( ApConstants.announcementPassword, _password.text, ); } else { - Preferences.setStringSecurity( + PreferenceUtil.instance.setStringSecurity( ApConstants.announcementIdToken, idToken!, ); } ApUtils.showToast(context, ap.loginSuccess); - Preferences.setBool(ApConstants.announcementIsLogin, true); - Preferences.setInt( + PreferenceUtil.instance + .setBool(ApConstants.announcementIsLogin, true); + PreferenceUtil.instance.setInt( ApConstants.announcementLoginType, loginType.index, ); @@ -787,7 +796,7 @@ class _AnnouncementHomePageState extends State { debugPrint('$loginType'); switch (loginType) { case AnnouncementLoginType.normal: - Preferences.setString( + PreferenceUtil.instance.setString( ApConstants.announcementUsername, _username.text, ); diff --git a/packages/ap_common/lib/scaffold/course_scaffold.dart b/packages/ap_common/lib/scaffold/course_scaffold.dart index f2101879..1d46e3d3 100644 --- a/packages/ap_common/lib/scaffold/course_scaffold.dart +++ b/packages/ap_common/lib/scaffold/course_scaffold.dart @@ -9,7 +9,6 @@ import 'package:ap_common/resources/resources.dart'; import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common/utils/notification_utils.dart'; -import 'package:ap_common/utils/preferences.dart'; import 'package:ap_common/widgets/default_dialog.dart'; import 'package:ap_common/widgets/hint_content.dart'; import 'package:ap_common/widgets/item_picker.dart'; @@ -140,13 +139,15 @@ class CourseScaffoldState extends State { @override void initState() { showSectionTime = widget.showSectionTime ?? - Preferences.getBool(ApConstants.showSectionTime, true); + PreferenceUtil.instance.getBool(ApConstants.showSectionTime, true); showInstructors = widget.showInstructors ?? - Preferences.getBool(ApConstants.showInstructors, true); + PreferenceUtil.instance.getBool(ApConstants.showInstructors, true); showClassroomLocation = widget.showClassroomLocation ?? - Preferences.getBool(ApConstants.showClassroomLocation, true); + PreferenceUtil.instance + .getBool(ApConstants.showClassroomLocation, true); showSearchButton = widget.showSearchButton ?? - Preferences.getBool(ApConstants.showCourseSearchButton, true); + PreferenceUtil.instance + .getBool(ApConstants.showCourseSearchButton, true); fetchInvisibleCourseCodes(); super.initState(); } @@ -191,28 +192,28 @@ class CourseScaffoldState extends State { showSearchButton: showSearchButton, showSectionTimeOnChanged: (bool? value) { setState(() => showSectionTime = value); - Preferences.setBool( + PreferenceUtil.instance.setBool( ApConstants.showSectionTime, showSectionTime!, ); }, showInstructorsOnChanged: (bool? value) { setState(() => showInstructors = value); - Preferences.setBool( + PreferenceUtil.instance.setBool( ApConstants.showInstructors, showInstructors!, ); }, showClassroomLocationOnChanged: (bool? value) { setState(() => showClassroomLocation = value); - Preferences.setBool( + PreferenceUtil.instance.setBool( ApConstants.showClassroomLocation, showClassroomLocation!, ); }, showSearchButtonOnChanged: (bool? value) { setState(() => showSearchButton = value); - Preferences.setBool( + PreferenceUtil.instance.setBool( ApConstants.showCourseSearchButton, showSearchButton!, ); @@ -669,7 +670,7 @@ class CourseScaffoldState extends State { } else { invisibleCourseCodes.add(course.code); } - Preferences.setStringList( + PreferenceUtil.instance.setStringList( '$_kCourseInvisibleKey${widget.courseNotifySaveKey}', invisibleCourseCodes, ); @@ -677,7 +678,7 @@ class CourseScaffoldState extends State { } void fetchInvisibleCourseCodes() { - invisibleCourseCodes = Preferences.getStringList( + invisibleCourseCodes = PreferenceUtil.instance.getStringList( '$_kCourseInvisibleKey${widget.courseNotifySaveKey}', [], ); @@ -797,7 +798,7 @@ class _CourseContentState extends State { ), if (widget.enableNotifyControl && widget.notifyData != null && - NotificationUtils.isSupport) + ApNotificationUtil.isSupport) IconButton( icon: Icon( state == CourseNotifyState.schedule @@ -818,10 +819,10 @@ class _CourseContentState extends State { weekday: widget.weekday, timeCode: widget.timeCode, ); - await NotificationUtils.scheduleCourseNotify( + await ApNotificationUtil.instance.scheduleCourseNotify( context: context, courseNotify: courseNotify, - day: NotificationUtils.getDay(widget.weekday), + weekday: widget.weekday, androidResourceIcon: widget.androidResourceIcon, ); widget.notifyData!.lastId++; @@ -834,7 +835,7 @@ class _CourseContentState extends State { AnalyticsUtils.instance ?.logEvent('course_notify_schedule'); } else { - await NotificationUtils.cancelCourseNotify( + await NotificationUtil.instance.cancelNotify( id: courseNotify.id, ); widget.notifyData!.data diff --git a/packages/ap_common/lib/utils/notification_utils.dart b/packages/ap_common/lib/utils/notification_utils.dart index 52067cd9..8de7375f 100644 --- a/packages/ap_common/lib/utils/notification_utils.dart +++ b/packages/ap_common/lib/utils/notification_utils.dart @@ -11,7 +11,7 @@ import 'package:timezone/timezone.dart' as tz; export 'package:flutter_local_notifications/flutter_local_notifications.dart'; -class NotificationUtils { +class ApNotificationUtil extends NotificationUtil { static const String androidResourceName = '@drawable/ic_stat_name'; // Notification ID @@ -22,7 +22,10 @@ class NotificationUtils { static bool get isSupport => !kIsWeb && (Platform.isAndroid || Platform.isIOS || Platform.isMacOS); - static InitializationSettings get settings { + static ApNotificationUtil get instance => + NotificationUtil.instance as ApNotificationUtil; + + InitializationSettings get settings { const AndroidInitializationSettings initializationSettingsAndroid = AndroidInitializationSettings(androidResourceName); const DarwinInitializationSettings initializationSettingsIOS = @@ -41,7 +44,7 @@ class NotificationUtils { /// /// In accordance with ISO 8601 /// a week starts with Monday, which has the value 1. - static Day getDay(int weekday) { + Day getDay(int weekday) { if (weekday == 7) { return Day.sunday; } else { @@ -49,7 +52,7 @@ class NotificationUtils { } } - static TimeOfDay parseTime(String text, {int beforeMinutes = 0}) { + TimeOfDay parseTime(String text, {int beforeMinutes = 0}) { final DateFormat formatter = DateFormat('HH:mm', 'zh'); final DateTime dateTime = formatter.parse(text).add( Duration(minutes: -beforeMinutes), @@ -60,7 +63,7 @@ class NotificationUtils { ); } - static DateTime getNextWeekdayDateTime(Day day, TimeOfDay time) { + DateTime getNextWeekdayDateTime(Day day, TimeOfDay time) { final DateTime now = DateTime.now(); final DateTime dateTime = DateTime( now.year, @@ -76,7 +79,8 @@ class NotificationUtils { ); } - static Future show({ + @override + Future show({ required int id, required String androidChannelId, required String androidChannelDescription, @@ -103,7 +107,7 @@ class NotificationUtils { macOS: const DarwinNotificationDetails(presentAlert: true), ); flutterLocalNotificationsPlugin.initialize( - settings ?? NotificationUtils.settings, + settings ?? this.settings, // onSelectNotification: (String? text) async => // onSelectNotification?.call(), ); @@ -116,10 +120,10 @@ class NotificationUtils { ); } - static Future scheduleCourseNotify({ + Future scheduleCourseNotify({ required BuildContext context, required CourseNotify courseNotify, - required Day day, + required int weekday, bool enableVibration = true, int beforeMinutes = 10, String? androidResourceIcon = androidResourceName, @@ -143,7 +147,7 @@ class NotificationUtils { id: courseNotify.id, title: ap.courseNotify, content: content, - day: day, + weekday: weekday, time: time, androidChannelId: '$course', androidChannelDescription: ap.courseNotify, @@ -152,11 +156,12 @@ class NotificationUtils { ); } - static Future scheduleWeeklyNotify({ + //TODO: use interface + Future scheduleWeeklyNotify({ required int id, required String androidChannelId, required String androidChannelDescription, - required Day day, + required int weekday, required TimeOfDay time, required String title, required String content, @@ -181,11 +186,11 @@ class NotificationUtils { ); tz.initializeTimeZones(); final tz.TZDateTime scheduleDateTime = tz.TZDateTime.from( - getNextWeekdayDateTime(day, time), + getNextWeekdayDateTime(getDay(weekday), time), tz.local, ); flutterLocalNotificationsPlugin.initialize( - settings ?? NotificationUtils.settings, + settings ?? this.settings, // onSelectNotification: (String? text) async => // onSelectNotification?.call(), ); @@ -203,7 +208,8 @@ class NotificationUtils { ); } - static Future schedule({ + @override + Future schedule({ required int id, required String androidChannelId, required String androidChannelDescription, @@ -235,7 +241,7 @@ class NotificationUtils { tz.local, ); flutterLocalNotificationsPlugin.initialize( - settings ?? NotificationUtils.settings, + settings ?? this.settings, // onSelectNotification: (String? text) async => // onSelectNotification?.call(), ); @@ -252,7 +258,8 @@ class NotificationUtils { ); } - static Future requestPermissions({ + @override + Future requestPermissions({ bool sound = true, bool alert = true, bool badge = true, @@ -285,20 +292,19 @@ class NotificationUtils { } } - static Future cancelCourseNotify({ - required int id, - }) async { + @override + Future cancelNotify({required int id}) async { final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin(); await flutterLocalNotificationsPlugin.cancel(id); } - static Future> - getPendingNotificationList() async { + Future> getPendingNotificationList() async { return FlutterLocalNotificationsPlugin().pendingNotificationRequests(); } - static Future cancelAll() async { + @override + Future cancelAll() async { await FlutterLocalNotificationsPlugin().cancelAll(); } } diff --git a/packages/ap_common/lib/utils/preferences.dart b/packages/ap_common/lib/utils/preferences.dart index e1f52796..b681ed71 100644 --- a/packages/ap_common/lib/utils/preferences.dart +++ b/packages/ap_common/lib/utils/preferences.dart @@ -6,7 +6,7 @@ import 'package:encrypt/encrypt.dart' as encrypt; import 'package:flutter/foundation.dart'; import 'package:shared_preferences/shared_preferences.dart'; -class Preferences { +class ApPreferenceUtil extends PreferenceUtil { static SharedPreferences? prefs; static late encrypt.Encrypter encrypter; @@ -21,14 +21,14 @@ class Preferences { Platform.isLinux || Platform.isWindows; - static Future init({ + Future init({ required encrypt.Key key, required encrypt.IV iv, bool initialApIcon = true, }) async { if (isSupport) { prefs = await SharedPreferences.getInstance(); - ApIcon.code = Preferences.getString( + ApIcon.code = getString( ApConstants.prefIconStyleCode, ApIcon.outlined, ); @@ -38,26 +38,30 @@ class Preferences { mode: encrypt.AESMode.cbc, ), ); - Preferences.iv = iv; + ApPreferenceUtil.iv = iv; } } - static Future setString(String key, String data) async { + @override + Future setString(String key, String data) async { await prefs?.setString(key, data); } - static String getString(String key, String defaultValue) { + @override + String getString(String key, String defaultValue) { return prefs?.getString(key) ?? defaultValue; } - static Future setStringSecurity(String key, String data) async { + @override + Future setStringSecurity(String key, String data) async { await prefs?.setString( key, encrypter.encrypt(data, iv: iv).base64, ); } - static String getStringSecurity(String key, String defaultValue) { + @override + String getStringSecurity(String key, String defaultValue) { final String data = prefs?.getString(key) ?? ''; if (data == '') { return defaultValue; @@ -66,39 +70,53 @@ class Preferences { } } - static Future setInt(String key, int data) async { + @override + Future setInt(String key, int data) async { await prefs?.setInt(key, data); } - static int getInt(String key, int defaultValue) { + @override + int getInt(String key, int defaultValue) { return prefs?.getInt(key) ?? defaultValue; } - static Future setDouble(String key, double data) async { + @override + Future setDouble(String key, double data) async { await prefs?.setDouble(key, data); } - static double getDouble(String key, double defaultValue) { + @override + double getDouble(String key, double defaultValue) { return prefs?.getDouble(key) ?? defaultValue; } - static Future setBool(String key, bool data) async { + @override + Future setBool(String key, bool data) async { await prefs?.setBool(key, data); } - static bool getBool(String key, bool defaultValue) { + @override + bool getBool(String key, bool defaultValue) { return prefs?.getBool(key) ?? defaultValue; } - static Future setStringList(String key, List data) async { + @override + Future setStringList(String key, List data) async { await prefs?.setStringList(key, data); } - static List getStringList(String key, List defaultValue) { + @override + List getStringList(String key, List defaultValue) { return prefs?.getStringList(key) ?? defaultValue; } - static Future? remove(String key) { + @override + Set getKeys() { + return prefs!.getKeys(); + } + + @override + Future? remove(String key) { return prefs?.remove(key); } } diff --git a/packages/ap_common/lib/widgets/setting_page_widgets.dart b/packages/ap_common/lib/widgets/setting_page_widgets.dart index 37eb0436..9da980a1 100644 --- a/packages/ap_common/lib/widgets/setting_page_widgets.dart +++ b/packages/ap_common/lib/widgets/setting_page_widgets.dart @@ -3,7 +3,6 @@ import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common/utils/notification_utils.dart'; -import 'package:ap_common/utils/preferences.dart'; import 'package:ap_common/widgets/option_dialog.dart'; import 'package:ap_common_core/ap_common_core.dart'; import 'package:flutter/material.dart'; @@ -99,6 +98,7 @@ class SettingItem extends StatelessWidget { class CheckCourseNotifyItem extends StatelessWidget { const CheckCourseNotifyItem({super.key, this.tag}); + final String? tag; @override @@ -111,7 +111,7 @@ class CheckCourseNotifyItem extends StatelessWidget { final CourseNotifyData notifyData = tag == null ? CourseNotifyData.loadCurrent() : CourseNotifyData.load(tag); - if (NotificationUtils.isSupport) { + if (ApNotificationUtil.isSupport) { if (notifyData.data.isNotEmpty) { showDialog( context: context, @@ -124,7 +124,7 @@ class CheckCourseNotifyItem extends StatelessWidget { ], index: -1, onSelected: (int index) { - NotificationUtils.cancelCourseNotify( + NotificationUtil.instance.cancelNotify( id: notifyData.data[index].id, ); notifyData.data.removeAt(index); @@ -156,8 +156,8 @@ class ClearAllNotifyItem extends StatelessWidget { text: ap.cancelAllNotify, subText: ap.cancelAllNotifySubTitle, onTap: () { - if (NotificationUtils.isSupport) { - NotificationUtils.cancelAll(); + if (ApNotificationUtil.isSupport) { + NotificationUtil.instance.cancelAll(); final CourseNotifyData notifyData = tag == null ? CourseNotifyData.loadCurrent() : CourseNotifyData.load(tag); @@ -191,7 +191,7 @@ class ChangeLanguageItem extends StatelessWidget { ApLocalizations.of(context).traditionalChinese, ApLocalizations.of(context).english, ]; - final String code = Preferences.getString( + final String code = PreferenceUtil.instance.getString( ApConstants.prefLanguageCode, ApSupportLanguageConstants.system, ); @@ -229,7 +229,8 @@ class ChangeLanguageItem extends StatelessWidget { break; } onChange.call(locale); - Preferences.setString(ApConstants.prefLanguageCode, code); + PreferenceUtil.instance + .setString(ApConstants.prefLanguageCode, code); AnalyticsUtils.instance?.logEvent( 'change_language', parameters: {'code': code}, @@ -279,7 +280,8 @@ class ChangeThemeModeItem extends StatelessWidget { onSelected: (int index) { final ThemeMode mode = ThemeMode.values[index]; onChange.call(mode); - Preferences.setInt(ApConstants.prefThemeModeIndex, index); + PreferenceUtil.instance + .setInt(ApConstants.prefThemeModeIndex, index); AnalyticsUtils.instance?.logEvent( 'change_theme', parameters: { @@ -324,7 +326,8 @@ class ChangeIconStyleItem extends StatelessWidget { onSelected: (int index) { final String code = ApIcon.values[index]; ApIcon.code = code; - Preferences.setString(ApConstants.prefIconStyleCode, code); + PreferenceUtil.instance + .setString(ApConstants.prefIconStyleCode, code); onChange.call(code); AnalyticsUtils.instance?.logEvent( 'change_icon_style', diff --git a/packages/ap_common_core/lib/src/utilities/notification_util.dart b/packages/ap_common_core/lib/src/utilities/notification_util.dart index eb97d7c3..2f8c4271 100644 --- a/packages/ap_common_core/lib/src/utilities/notification_util.dart +++ b/packages/ap_common_core/lib/src/utilities/notification_util.dart @@ -27,7 +27,7 @@ abstract class NotificationUtil { // required int id, // required String androidChannelId, // required String androidChannelDescription, - // required Day day, + // required int weekday, // required TimeOfDay time, // required String title, // required String content, diff --git a/packages/ap_common_core/lib/src/utilities/preference_util.dart b/packages/ap_common_core/lib/src/utilities/preference_util.dart index d4381579..b2292980 100644 --- a/packages/ap_common_core/lib/src/utilities/preference_util.dart +++ b/packages/ap_common_core/lib/src/utilities/preference_util.dart @@ -29,7 +29,7 @@ abstract class PreferenceUtil { List getStringList(String key, List defaultValue); - List getKeys(); + Set getKeys(); Future? remove(String key); } From 65b8a2738092e0e261cd4088c778d54784e44b05 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Sat, 5 Oct 2024 01:07:14 +0800 Subject: [PATCH 05/41] fix: `ap_common_firebase` separate static error --- .../lib/utils/firebase_analytics_utils.dart | 4 +- .../lib/utils/firebase_crashlytics_utils.dart | 4 +- .../lib/utils/firebase_message_utils.dart | 5 +- .../utils/firebase_remote_config_utils.dart | 4 +- .../lib/utils/firebase_utils.dart | 3 +- packages/ap_common_firebase/pubspec.lock | 70 ++++++++++++++++++- packages/ap_common_firebase/pubspec.yaml | 2 +- 7 files changed, 75 insertions(+), 17 deletions(-) diff --git a/packages/ap_common_firebase/lib/utils/firebase_analytics_utils.dart b/packages/ap_common_firebase/lib/utils/firebase_analytics_utils.dart index 079f2b86..f90d7688 100644 --- a/packages/ap_common_firebase/lib/utils/firebase_analytics_utils.dart +++ b/packages/ap_common_firebase/lib/utils/firebase_analytics_utils.dart @@ -1,10 +1,8 @@ import 'dart:async'; import 'dart:io'; -import 'package:ap_common/config/analytics_constants.dart'; -import 'package:ap_common/models/user_info.dart'; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/analytics_utils.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:firebase_analytics/firebase_analytics.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; diff --git a/packages/ap_common_firebase/lib/utils/firebase_crashlytics_utils.dart b/packages/ap_common_firebase/lib/utils/firebase_crashlytics_utils.dart index 6b85d1ee..365cb192 100644 --- a/packages/ap_common_firebase/lib/utils/firebase_crashlytics_utils.dart +++ b/packages/ap_common_firebase/lib/utils/firebase_crashlytics_utils.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'dart:io'; -import 'package:ap_common/utils/crashlytics_utils.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_firebase/utils/firebase_utils.dart'; import 'package:firebase_crashlytics/firebase_crashlytics.dart'; import 'package:flutter/foundation.dart'; @@ -34,7 +34,7 @@ class FirebaseCrashlyticsUtils extends CrashlyticsUtils { exception, StackTrace stack, { reason, - Iterable? information, + Iterable? information, bool? printDetails, }) async { information ??= const []; diff --git a/packages/ap_common_firebase/lib/utils/firebase_message_utils.dart b/packages/ap_common_firebase/lib/utils/firebase_message_utils.dart index 8d13b497..8c1c4ce5 100644 --- a/packages/ap_common_firebase/lib/utils/firebase_message_utils.dart +++ b/packages/ap_common_firebase/lib/utils/firebase_message_utils.dart @@ -1,7 +1,6 @@ import 'dart:io'; -import 'package:ap_common/config/analytics_constants.dart'; -import 'package:ap_common/utils/notification_utils.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_firebase/utils/firebase_utils.dart'; import 'package:flutter/foundation.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -48,7 +47,7 @@ class FirebaseMessagingUtils { FirebaseMessaging.onMessage.listen((RemoteMessage message) async { if (message.notification != null) { debugPrint("onMessage: $message"); - NotificationUtils.show( + NotificationUtil.instance.show( id: NOTIFY_ID, androidChannelId: NOTIFY_ANDROID_CHANNEL_ID, androidChannelDescription: androidChannelDescription, diff --git a/packages/ap_common_firebase/lib/utils/firebase_remote_config_utils.dart b/packages/ap_common_firebase/lib/utils/firebase_remote_config_utils.dart index f45c5b25..1204506d 100644 --- a/packages/ap_common_firebase/lib/utils/firebase_remote_config_utils.dart +++ b/packages/ap_common_firebase/lib/utils/firebase_remote_config_utils.dart @@ -1,11 +1,9 @@ import 'dart:io'; -import 'package:ap_common/config/ap_constants.dart'; -import 'package:ap_common/models/version_info.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:firebase_remote_config/firebase_remote_config.dart'; import 'package:flutter/foundation.dart'; -export 'package:ap_common/models/version_info.dart'; export 'package:firebase_remote_config/firebase_remote_config.dart'; class FirebaseRemoteConfigUtils { diff --git a/packages/ap_common_firebase/lib/utils/firebase_utils.dart b/packages/ap_common_firebase/lib/utils/firebase_utils.dart index 5b61faf5..a0486ffd 100644 --- a/packages/ap_common_firebase/lib/utils/firebase_utils.dart +++ b/packages/ap_common_firebase/lib/utils/firebase_utils.dart @@ -1,7 +1,6 @@ import 'dart:io'; -import 'package:ap_common/utils/analytics_utils.dart'; -import 'package:ap_common/utils/crashlytics_utils.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_firebase/utils/firebase_analytics_utils.dart'; import 'package:ap_common_firebase/utils/firebase_crashlytics_utils.dart'; import 'package:flutter/foundation.dart'; diff --git a/packages/ap_common_firebase/pubspec.lock b/packages/ap_common_firebase/pubspec.lock index f939c0b8..f84c96e0 100644 --- a/packages/ap_common_firebase/pubspec.lock +++ b/packages/ap_common_firebase/pubspec.lock @@ -18,12 +18,20 @@ packages: source: hosted version: "3.0.1" ap_common: - dependency: "direct main" + dependency: "direct overridden" description: path: "../ap_common" relative: true source: path version: "0.25.3" + ap_common_core: + dependency: "direct main" + description: + name: ap_common_core + sha256: "7fc149e4ae7899cd60d2c35523dc83e1593e4d91906176dae29a53a6684ea36c" + url: "https://pub.dev" + source: hosted + version: "0.0.1" app_tracking_transparency: dependency: transitive description: @@ -136,6 +144,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" + chopper: + dependency: transitive + description: + name: chopper + sha256: "40899b729fb6d8969d967264b189efaf2452bc3ccf6ed0782d00f1d8a6161c31" + url: "https://pub.dev" + source: hosted + version: "8.0.3" clock: dependency: transitive description: @@ -224,6 +240,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.0.1" + equatable: + dependency: transitive + description: + name: equatable + sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 + url: "https://pub.dev" + source: hosted + version: "2.0.5" fake_async: dependency: transitive description: @@ -600,10 +624,10 @@ packages: dependency: transitive description: name: http - sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "0.13.6" + version: "1.2.2" http_parser: dependency: transitive description: @@ -700,6 +724,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.3" + injector: + dependency: transitive + description: + name: injector + sha256: d692c37788872bfd4bd7c01b864b0712190a25ae5a346431ff69949d5728a2e1 + url: "https://pub.dev" + source: hosted + version: "4.0.0" intl: dependency: transitive description: @@ -764,6 +796,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.0.0" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" matcher: dependency: transitive description: @@ -980,6 +1020,22 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.1" + qs_dart: + dependency: transitive + description: + name: qs_dart + sha256: be73d060d29c0716ded88380ba32e87ce8105f0ba234edb3edefa0d74d47d64b + url: "https://pub.dev" + source: hosted + version: "1.2.4" + recursive_regex: + dependency: transitive + description: + name: recursive_regex + sha256: f7252e3d3dfd1665e594d9fe035eca6bc54139b1f2fee38256fa427ea41adc60 + url: "https://pub.dev" + source: hosted + version: "1.0.0" rxdart: dependency: transitive description: @@ -1273,6 +1329,14 @@ packages: url: "https://pub.dev" source: hosted version: "14.2.5" + weak_map: + dependency: transitive + description: + name: weak_map + sha256: "95ca338f0cdf5f0022cc283dfa4d97f6f6b03752f67eca85ebe6d7a679ffe3ed" + url: "https://pub.dev" + source: hosted + version: "3.0.1" web: dependency: transitive description: diff --git a/packages/ap_common_firebase/pubspec.yaml b/packages/ap_common_firebase/pubspec.yaml index f73201d6..00c2ffb5 100644 --- a/packages/ap_common_firebase/pubspec.yaml +++ b/packages/ap_common_firebase/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: flutter: sdk: flutter - ap_common: '>=0.25.0 <2.0.0' + ap_common_core: '>=0.0.1 <1.0.0' # path: ../../GitHub-NKUST-ITC/ap_common url_launcher: ^6.1.0 #firebase must use particular version From 81c664780f2819f174579205487cfc678688d1c6 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Sat, 5 Oct 2024 01:09:34 +0800 Subject: [PATCH 06/41] chore: rename original util class naming --- packages/ap_common/lib/pages/about_us_page.dart | 12 ++++++------ .../lib/pages/announcement/home_page.dart | 6 +++--- .../lib/pages/announcement_content_page.dart | 6 +++--- .../ap_common/lib/scaffold/course_scaffold.dart | 16 ++++++++-------- .../lib/scaffold/home_page_scaffold.dart | 6 +++--- .../ap_common/lib/scaffold/score_scaffold.dart | 6 +++--- .../lib/scaffold/user_info_scaffold.dart | 4 ++-- packages/ap_common/lib/utils/ap_utils.dart | 4 ++-- .../lib/views/notification_list_view.dart | 10 +++++----- packages/ap_common/lib/views/pdf_view.dart | 6 +++--- .../ap_common/lib/views/phone_list_view.dart | 8 ++++---- packages/ap_common/lib/widgets/item_picker.dart | 2 +- .../lib/widgets/setting_page_widgets.dart | 14 +++++++------- .../lib/src/utilities/analytics_utils.dart | 4 ++-- .../lib/src/utilities/crashlytics_utils.dart | 4 ++-- 15 files changed, 54 insertions(+), 54 deletions(-) diff --git a/packages/ap_common/lib/pages/about_us_page.dart b/packages/ap_common/lib/pages/about_us_page.dart index 43232c78..5b70bd8f 100644 --- a/packages/ap_common/lib/pages/about_us_page.dart +++ b/packages/ap_common/lib/pages/about_us_page.dart @@ -50,7 +50,7 @@ class AboutUsPageState extends State { @override void initState() { - AnalyticsUtils.instance?.setCurrentScreen( + AnalyticsUtil.instance?.setCurrentScreen( 'AboutUsPage', 'about_us_page.dart', ); @@ -87,7 +87,7 @@ class AboutUsPageState extends State { ), ), ); - AnalyticsUtils.instance?.logEvent('license_page_click'); + AnalyticsUtil.instance?.logEvent('license_page_click'); }, ), ], @@ -184,7 +184,7 @@ class AboutUsPageState extends State { ApUtils.launchUrl( 'https://m.me/${widget.fbFanPageId}', ); - AnalyticsUtils.instance?.logEvent('fb_click'); + AnalyticsUtil.instance?.logEvent('fb_click'); }, iconSize: 48.0, ), @@ -196,7 +196,7 @@ class AboutUsPageState extends State { ApUtils.launchUrl( 'https://ig.me/m/$username', ); - AnalyticsUtils.instance + AnalyticsUtil.instance ?.logEvent('instagram_click'); }, iconSize: 48.0, @@ -214,7 +214,7 @@ class AboutUsPageState extends State { ); }, ); - AnalyticsUtils.instance + AnalyticsUtil.instance ?.logEvent('github_click'); }, iconSize: 48.0, @@ -232,7 +232,7 @@ class AboutUsPageState extends State { ); }, ); - AnalyticsUtils.instance + AnalyticsUtil.instance ?.logEvent('email_click'); }, iconSize: 48.0, diff --git a/packages/ap_common/lib/pages/announcement/home_page.dart b/packages/ap_common/lib/pages/announcement/home_page.dart index 3253976a..c79bb8cf 100644 --- a/packages/ap_common/lib/pages/announcement/home_page.dart +++ b/packages/ap_common/lib/pages/announcement/home_page.dart @@ -824,9 +824,9 @@ class _AnnouncementHomePageState extends State { } catch (e, s) { if (!mounted) return; ApUtils.showToast(context, ap.thirdPartyLoginFail); - CrashlyticsUtils.instance?.recordError(e, s); + CrashlyticsUtil.instance?.recordError(e, s); if (isNotLogin) Navigator.of(context, rootNavigator: true).pop(); - if (CrashlyticsUtils.instance != null) rethrow; + if (CrashlyticsUtil.instance != null) rethrow; } case AnnouncementLoginType.apple: try { @@ -843,7 +843,7 @@ class _AnnouncementHomePageState extends State { if (!mounted) return; ApUtils.showToast(context, ap.thirdPartyLoginFail); if (isNotLogin) Navigator.of(context, rootNavigator: true).pop(); - CrashlyticsUtils.instance?.recordError(e, s); + CrashlyticsUtil.instance?.recordError(e, s); } } } diff --git a/packages/ap_common/lib/pages/announcement_content_page.dart b/packages/ap_common/lib/pages/announcement_content_page.dart index e94dd4f0..22ecb2d8 100644 --- a/packages/ap_common/lib/pages/announcement_content_page.dart +++ b/packages/ap_common/lib/pages/announcement_content_page.dart @@ -31,7 +31,7 @@ class AnnouncementContentPageState extends State { @override void initState() { - AnalyticsUtils.instance?.setCurrentScreen( + AnalyticsUtil.instance?.setCurrentScreen( 'AnnouncementContentPage', 'announcement_content_page.dart', ); @@ -109,7 +109,7 @@ class AnnouncementContentPageState extends State { ), ), ); - AnalyticsUtils.instance?.logEvent('announcement_content_image_click'); + AnalyticsUtil.instance?.logEvent('announcement_content_image_click'); }, child: AspectRatio( aspectRatio: orientation == Orientation.portrait ? 4 / 3 : 9 / 16, @@ -174,7 +174,7 @@ class AnnouncementContentPageState extends State { ), onPressed: () { ApUtils.launchUrl(widget.announcement.url!); - AnalyticsUtils.instance?.logEvent('announcement_link_click'); + AnalyticsUtil.instance?.logEvent('announcement_link_click'); }, child: Icon( ApIcon.exitToApp, diff --git a/packages/ap_common/lib/scaffold/course_scaffold.dart b/packages/ap_common/lib/scaffold/course_scaffold.dart index 1d46e3d3..80f2fd89 100644 --- a/packages/ap_common/lib/scaffold/course_scaffold.dart +++ b/packages/ap_common/lib/scaffold/course_scaffold.dart @@ -220,7 +220,7 @@ class CourseScaffoldState extends State { }, ), ); - AnalyticsUtils.instance?.logEvent('course_setting_click'); + AnalyticsUtil.instance?.logEvent('course_setting_click'); }, tooltip: ApLocalizations.of(context).courseScaffoldSetting, ), @@ -269,7 +269,7 @@ class CourseScaffoldState extends State { child: RefreshIndicator( onRefresh: () async { await widget.onRefresh!(); - AnalyticsUtils.instance?.logEvent('course_refresh'); + AnalyticsUtil.instance?.logEvent('course_refresh'); return; }, child: _body(), @@ -309,7 +309,7 @@ class CourseScaffoldState extends State { floatingActionButton: showSearchButton! ? FloatingActionButton( onPressed: () { - AnalyticsUtils.instance + AnalyticsUtil.instance ?.logEvent('course_search_button_click'); _pickSemester(); }, @@ -453,7 +453,7 @@ class CourseScaffoldState extends State { context, ), ); - AnalyticsUtils.instance?.logEvent('export_course_table_image_success'); + AnalyticsUtil.instance?.logEvent('export_course_table_image_success'); } else { if (!mounted) return; ApUtils.showToast(context, app.unknownError); @@ -780,7 +780,7 @@ class _CourseContentState extends State { timeZone: 'GMT+8', ); Add2Calendar.addEvent2Cal(event); - AnalyticsUtils.instance + AnalyticsUtil.instance ?.logEvent('course_export_to_calendar'); }, ), @@ -832,7 +832,7 @@ class _CourseContentState extends State { context, ApLocalizations.of(context).courseNotifyHint, ); - AnalyticsUtils.instance + AnalyticsUtil.instance ?.logEvent('course_notify_schedule'); } else { await NotificationUtil.instance.cancelNotify( @@ -850,7 +850,7 @@ class _CourseContentState extends State { } widget.notifyData!.save(); setState(() {}); - AnalyticsUtils.instance?.logEvent('course_notify_cancel'); + AnalyticsUtil.instance?.logEvent('course_notify_cancel'); } if (widget.onNotifyClick != null) { if (!mounted) return; @@ -1178,7 +1178,7 @@ class CourseBorder extends StatelessWidget { : InkWell( onTap: () { onPressed?.call(sectionTime!.weekday, timeCode!, course!); - AnalyticsUtils.instance?.logEvent('course_border_click'); + AnalyticsUtil.instance?.logEvent('course_border_click'); }, radius: 6.0, child: Padding( diff --git a/packages/ap_common/lib/scaffold/home_page_scaffold.dart b/packages/ap_common/lib/scaffold/home_page_scaffold.dart index 54a3d28b..1ec56329 100644 --- a/packages/ap_common/lib/scaffold/home_page_scaffold.dart +++ b/packages/ap_common/lib/scaffold/home_page_scaffold.dart @@ -177,7 +177,7 @@ class HomePageScaffoldState extends State { return GestureDetector( onTap: () { widget.onImageTapped?.call(announcement); - AnalyticsUtils.instance?.logEvent('announcement_image_click'); + AnalyticsUtil.instance?.logEvent('announcement_image_click'); }, onTapDown: (TapDownDetails detail) { _timer?.cancel(); @@ -316,12 +316,12 @@ class HomePageScaffoldState extends State { leftActionText: app.cancel, rightActionText: app.confirm, rightActionFunction: () { - AnalyticsUtils.instance?.logEvent('logout_dialog_confirm'); + AnalyticsUtil.instance?.logEvent('logout_dialog_confirm'); SystemNavigator.pop(); }, ), ); - AnalyticsUtils.instance?.logEvent('logout_dialog_open'); + AnalyticsUtil.instance?.logEvent('logout_dialog_open'); } void hideSnackBar() { diff --git a/packages/ap_common/lib/scaffold/score_scaffold.dart b/packages/ap_common/lib/scaffold/score_scaffold.dart index 94a06c01..79409dde 100644 --- a/packages/ap_common/lib/scaffold/score_scaffold.dart +++ b/packages/ap_common/lib/scaffold/score_scaffold.dart @@ -84,7 +84,7 @@ class ScoreScaffoldState extends State { ? FloatingActionButton( onPressed: () { _pickSemester(); - AnalyticsUtils.instance?.logEvent('score_search_button_click'); + AnalyticsUtil.instance?.logEvent('score_search_button_click'); }, child: const Icon(Icons.search), ) @@ -114,7 +114,7 @@ class ScoreScaffoldState extends State { child: RefreshIndicator( onRefresh: () async { await widget.onRefresh?.call(); - AnalyticsUtils.instance?.logEvent('score_refresh'); + AnalyticsUtil.instance?.logEvent('score_refresh'); return; }, child: _body(), @@ -295,7 +295,7 @@ class _ScoreContentState extends State { onTap: (widget.onScoreSelect != null) ? () { widget.onScoreSelect!(i); - AnalyticsUtils.instance + AnalyticsUtil.instance ?.logEvent('score_title_click'); } : null, diff --git a/packages/ap_common/lib/scaffold/user_info_scaffold.dart b/packages/ap_common/lib/scaffold/user_info_scaffold.dart index d6ee947d..9041551b 100644 --- a/packages/ap_common/lib/scaffold/user_info_scaffold.dart +++ b/packages/ap_common/lib/scaffold/user_info_scaffold.dart @@ -72,7 +72,7 @@ class UserInfoScaffoldState extends State { () => codeMode = BarCodeMode .values[(codeMode.index + 1) % BarCodeMode.values.length], ); - AnalyticsUtils.instance?.logEvent('user_info_barcode_switch'); + AnalyticsUtil.instance?.logEvent('user_info_barcode_switch'); }, ), ], @@ -80,7 +80,7 @@ class UserInfoScaffoldState extends State { body: RefreshIndicator( onRefresh: () async { if (widget.onRefresh != null) await widget.onRefresh!(); - AnalyticsUtils.instance?.logEvent('user_info_refresh'); + AnalyticsUtil.instance?.logEvent('user_info_refresh'); return; }, child: ListView( diff --git a/packages/ap_common/lib/utils/ap_utils.dart b/packages/ap_common/lib/utils/ap_utils.dart index eaa19e86..70e75f15 100644 --- a/packages/ap_common/lib/utils/ap_utils.dart +++ b/packages/ap_common/lib/utils/ap_utils.dart @@ -289,10 +289,10 @@ class ApUtils { } catch (e, s) { if (!context.mounted) return; ApUtils.showToast(context, ap.unknownError); - if (CrashlyticsUtils.instance == null) { + if (CrashlyticsUtil.instance == null) { rethrow; } else { - CrashlyticsUtils.instance?.recordError(e, s); + CrashlyticsUtil.instance?.recordError(e, s); } } } diff --git a/packages/ap_common/lib/views/notification_list_view.dart b/packages/ap_common/lib/views/notification_list_view.dart index b5c9b4ff..eeff38f7 100644 --- a/packages/ap_common/lib/views/notification_list_view.dart +++ b/packages/ap_common/lib/views/notification_list_view.dart @@ -47,7 +47,7 @@ class NotificationListViewState extends State @override void initState() { - AnalyticsUtils.instance?.setCurrentScreen( + AnalyticsUtil.instance?.setCurrentScreen( 'NotificationListView', 'notification_list_view.dart', ); @@ -69,11 +69,11 @@ class NotificationListViewState extends State '${notification.info.title}\n${notification.link}', sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size, ); - AnalyticsUtils.instance?.logEvent('share_long_click'); + AnalyticsUtil.instance?.logEvent('share_long_click'); }, onTap: () { ApUtils.launchUrl(notification.link); - AnalyticsUtils.instance?.logEvent('notification_link_click'); + AnalyticsUtil.instance?.logEvent('notification_link_click'); }, child: Container( width: double.infinity, @@ -134,7 +134,7 @@ class NotificationListViewState extends State return InkWell( onTap: () { widget.onRefresh.call(); - AnalyticsUtils.instance?.logEvent(AnalyticsConstants.refresh); + AnalyticsUtil.instance?.logEvent(AnalyticsConstants.refresh); }, child: HintContent( icon: ApIcon.assignment, @@ -166,7 +166,7 @@ class NotificationListViewState extends State if (controller!.position.extentAfter < 500) { if (widget.state == NotificationState.finish) { widget.onLoadingMore?.call(); - AnalyticsUtils.instance?.logEvent('notification_load_more'); + AnalyticsUtil.instance?.logEvent('notification_load_more'); } } } diff --git a/packages/ap_common/lib/views/pdf_view.dart b/packages/ap_common/lib/views/pdf_view.dart index 27c016d0..7475b2db 100644 --- a/packages/ap_common/lib/views/pdf_view.dart +++ b/packages/ap_common/lib/views/pdf_view.dart @@ -31,7 +31,7 @@ class PdfView extends StatefulWidget { class _PdfViewState extends State { @override void initState() { - AnalyticsUtils.instance?.setCurrentScreen( + AnalyticsUtil.instance?.setCurrentScreen( 'PdfView', 'pdf_view.dart', ); @@ -60,7 +60,7 @@ class _PdfViewState extends State { children: [ FloatingActionButton( onPressed: () async { - AnalyticsUtils.instance?.logEvent('export_by_share'); + AnalyticsUtil.instance?.logEvent('export_by_share'); await Printing.sharePdf( bytes: widget.data!, filename: '${widget.fileName ?? 'export'}.pdf', @@ -71,7 +71,7 @@ class _PdfViewState extends State { const SizedBox(height: 16.0), FloatingActionButton( onPressed: () async { - AnalyticsUtils.instance?.logEvent('export_by_printing'); + AnalyticsUtil.instance?.logEvent('export_by_printing'); await Printing.layoutPdf( name: widget.fileName ?? 'export', onLayout: (PdfPageFormat format) => widget.data!, diff --git a/packages/ap_common/lib/views/phone_list_view.dart b/packages/ap_common/lib/views/phone_list_view.dart index 192fff56..397d1082 100644 --- a/packages/ap_common/lib/views/phone_list_view.dart +++ b/packages/ap_common/lib/views/phone_list_view.dart @@ -43,7 +43,7 @@ class PhoneListViewState extends State @override void initState() { - AnalyticsUtils.instance?.setCurrentScreen( + AnalyticsUtil.instance?.setCurrentScreen( 'PhoneListView', 'phone_list_view.dart', ); @@ -122,12 +122,12 @@ class PhoneListViewState extends State Widget _phoneItem(PhoneModel phone) { return InkWell( onTap: () { - AnalyticsUtils.instance?.logEvent('call_phone_click'); + AnalyticsUtil.instance?.logEvent('call_phone_click'); try { ApUtils.callPhone(phone.number); - AnalyticsUtils.instance?.logEvent('call_phone_success'); + AnalyticsUtil.instance?.logEvent('call_phone_success'); } catch (e) { - AnalyticsUtils.instance?.logEvent('call_phone_error'); + AnalyticsUtil.instance?.logEvent('call_phone_error'); } }, child: Container( diff --git a/packages/ap_common/lib/widgets/item_picker.dart b/packages/ap_common/lib/widgets/item_picker.dart index 806c6744..50f9cf80 100644 --- a/packages/ap_common/lib/widgets/item_picker.dart +++ b/packages/ap_common/lib/widgets/item_picker.dart @@ -34,7 +34,7 @@ class ItemPicker extends StatelessWidget { ), ); if (featureTag != null) { - AnalyticsUtils.instance?.logEvent('${featureTag}_item_picker_click'); + AnalyticsUtil.instance?.logEvent('${featureTag}_item_picker_click'); } }, child: Padding( diff --git a/packages/ap_common/lib/widgets/setting_page_widgets.dart b/packages/ap_common/lib/widgets/setting_page_widgets.dart index 9da980a1..7b2654ce 100644 --- a/packages/ap_common/lib/widgets/setting_page_widgets.dart +++ b/packages/ap_common/lib/widgets/setting_page_widgets.dart @@ -231,18 +231,18 @@ class ChangeLanguageItem extends StatelessWidget { onChange.call(locale); PreferenceUtil.instance .setString(ApConstants.prefLanguageCode, code); - AnalyticsUtils.instance?.logEvent( + AnalyticsUtil.instance?.logEvent( 'change_language', parameters: {'code': code}, ); - AnalyticsUtils.instance?.setUserProperty( + AnalyticsUtil.instance?.setUserProperty( AnalyticsConstants.language, locale.toLanguageTag(), ); }, ), ); - AnalyticsUtils.instance?.logEvent('language_setting_click'); + AnalyticsUtil.instance?.logEvent('language_setting_click'); }, ); } @@ -282,7 +282,7 @@ class ChangeThemeModeItem extends StatelessWidget { onChange.call(mode); PreferenceUtil.instance .setInt(ApConstants.prefThemeModeIndex, index); - AnalyticsUtils.instance?.logEvent( + AnalyticsUtil.instance?.logEvent( 'change_theme', parameters: { 'code': mode.toString(), @@ -292,7 +292,7 @@ class ChangeThemeModeItem extends StatelessWidget { }, ), ); - AnalyticsUtils.instance?.logEvent('theme_mode_setting_click'); + AnalyticsUtil.instance?.logEvent('theme_mode_setting_click'); }, ); } @@ -329,14 +329,14 @@ class ChangeIconStyleItem extends StatelessWidget { PreferenceUtil.instance .setString(ApConstants.prefIconStyleCode, code); onChange.call(code); - AnalyticsUtils.instance?.logEvent( + AnalyticsUtil.instance?.logEvent( 'change_icon_style', parameters: {'code': code}, ); }, ), ); - AnalyticsUtils.instance?.logEvent('icon_style_setting_click'); + AnalyticsUtil.instance?.logEvent('icon_style_setting_click'); }, ); } diff --git a/packages/ap_common_core/lib/src/utilities/analytics_utils.dart b/packages/ap_common_core/lib/src/utilities/analytics_utils.dart index 21fde358..a575eb79 100644 --- a/packages/ap_common_core/lib/src/utilities/analytics_utils.dart +++ b/packages/ap_common_core/lib/src/utilities/analytics_utils.dart @@ -1,7 +1,7 @@ import 'package:ap_common_core/src/models/user_info.dart'; -abstract class AnalyticsUtils { - static AnalyticsUtils? instance; +abstract class AnalyticsUtil { + static AnalyticsUtil? instance; Future setCurrentScreen(String screenName, String screenClassOverride); diff --git a/packages/ap_common_core/lib/src/utilities/crashlytics_utils.dart b/packages/ap_common_core/lib/src/utilities/crashlytics_utils.dart index 33c1833b..f0d2c91f 100644 --- a/packages/ap_common_core/lib/src/utilities/crashlytics_utils.dart +++ b/packages/ap_common_core/lib/src/utilities/crashlytics_utils.dart @@ -1,5 +1,5 @@ -abstract class CrashlyticsUtils { - static CrashlyticsUtils? instance; +abstract class CrashlyticsUtil { + static CrashlyticsUtil? instance; Future recordError( dynamic exception, From 7eef76580b57b66dfd78f5692cdc2a8748f575a3 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Sat, 5 Oct 2024 01:21:53 +0800 Subject: [PATCH 07/41] feat: release `ap_common_core` v0.0.2 --- packages/ap_common_core/CHANGELOG.md | 4 ++++ packages/ap_common_core/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/ap_common_core/CHANGELOG.md b/packages/ap_common_core/CHANGELOG.md index ec4a0b21..6c669796 100644 --- a/packages/ap_common_core/CHANGELOG.md +++ b/packages/ap_common_core/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.2 + +* fix `ap_common` api usage + ## 0.0.1 * initial release from `ap_common` package separate. diff --git a/packages/ap_common_core/pubspec.yaml b/packages/ap_common_core/pubspec.yaml index 3fdd95e6..c48d8b61 100644 --- a/packages/ap_common_core/pubspec.yaml +++ b/packages/ap_common_core/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_core description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" -version: 0.0.1 +version: 0.0.2 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_core From 0c0b9e510345c5482f69b4ea5fdcebdf217c565c Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Sat, 5 Oct 2024 01:26:32 +0800 Subject: [PATCH 08/41] fix: `ap_common_firebase` dependency usage --- .../lib/utils/firebase_analytics_utils.dart | 2 +- .../lib/utils/firebase_crashlytics_utils.dart | 2 +- .../lib/utils/firebase_message_utils.dart | 1 - .../lib/utils/firebase_utils.dart | 4 +- packages/ap_common_firebase/pubspec.lock | 208 +++++++----------- packages/ap_common_firebase/pubspec.yaml | 1 + .../ap_common_firebase/pubspec_overrides.yaml | 4 - 7 files changed, 81 insertions(+), 141 deletions(-) delete mode 100644 packages/ap_common_firebase/pubspec_overrides.yaml diff --git a/packages/ap_common_firebase/lib/utils/firebase_analytics_utils.dart b/packages/ap_common_firebase/lib/utils/firebase_analytics_utils.dart index f90d7688..dbfd7829 100644 --- a/packages/ap_common_firebase/lib/utils/firebase_analytics_utils.dart +++ b/packages/ap_common_firebase/lib/utils/firebase_analytics_utils.dart @@ -11,7 +11,7 @@ import 'firebase_utils.dart'; export 'package:firebase_analytics/firebase_analytics.dart'; -class FirebaseAnalyticsUtils extends AnalyticsUtils { +class FirebaseAnalyticsUtils extends AnalyticsUtil { static FirebaseAnalyticsUtils? _instance; static bool get isSupported => diff --git a/packages/ap_common_firebase/lib/utils/firebase_crashlytics_utils.dart b/packages/ap_common_firebase/lib/utils/firebase_crashlytics_utils.dart index 365cb192..88193ad2 100644 --- a/packages/ap_common_firebase/lib/utils/firebase_crashlytics_utils.dart +++ b/packages/ap_common_firebase/lib/utils/firebase_crashlytics_utils.dart @@ -8,7 +8,7 @@ import 'package:flutter/foundation.dart'; export 'package:firebase_crashlytics/firebase_crashlytics.dart'; -class FirebaseCrashlyticsUtils extends CrashlyticsUtils { +class FirebaseCrashlyticsUtils extends CrashlyticsUtil { static FirebaseCrashlyticsUtils? _instance; static FirebaseCrashlyticsUtils get instance { diff --git a/packages/ap_common_firebase/lib/utils/firebase_message_utils.dart b/packages/ap_common_firebase/lib/utils/firebase_message_utils.dart index 8c1c4ce5..e7251e2c 100644 --- a/packages/ap_common_firebase/lib/utils/firebase_message_utils.dart +++ b/packages/ap_common_firebase/lib/utils/firebase_message_utils.dart @@ -7,7 +7,6 @@ import 'package:url_launcher/url_launcher.dart'; import 'firebase_analytics_utils.dart'; -export 'package:ap_common/utils/cloud_message_utils.dart'; export 'package:firebase_messaging/firebase_messaging.dart'; const NOTIFY_ID = 9919; diff --git a/packages/ap_common_firebase/lib/utils/firebase_utils.dart b/packages/ap_common_firebase/lib/utils/firebase_utils.dart index a0486ffd..37483f5f 100644 --- a/packages/ap_common_firebase/lib/utils/firebase_utils.dart +++ b/packages/ap_common_firebase/lib/utils/firebase_utils.dart @@ -15,9 +15,9 @@ export 'package:firebase_messaging/firebase_messaging.dart'; class FirebaseUtils { static FirebaseAnalytics? init() { if (FirebaseCrashlyticsUtils.isSupported) - CrashlyticsUtils.instance = FirebaseCrashlyticsUtils.instance; + CrashlyticsUtil.instance = FirebaseCrashlyticsUtils.instance; if (FirebaseAnalyticsUtils.isSupported) { - AnalyticsUtils.instance = FirebaseAnalyticsUtils.instance; + AnalyticsUtil.instance = FirebaseAnalyticsUtils.instance; return FirebaseAnalyticsUtils.instance.analytics; } FirebasePerformancesUtils.instance.init(); diff --git a/packages/ap_common_firebase/pubspec.lock b/packages/ap_common_firebase/pubspec.lock index f84c96e0..8f8e6c28 100644 --- a/packages/ap_common_firebase/pubspec.lock +++ b/packages/ap_common_firebase/pubspec.lock @@ -18,36 +18,36 @@ packages: source: hosted version: "3.0.1" ap_common: - dependency: "direct overridden" + dependency: "direct main" description: - path: "../ap_common" - relative: true - source: path + name: ap_common + sha256: "891671edd34d4a881fc3d0abf32cfb7f53044b9b2db7a70909ec5fbbc00c8e62" + url: "https://pub.dev" + source: hosted version: "0.25.3" ap_common_core: dependency: "direct main" description: - name: ap_common_core - sha256: "7fc149e4ae7899cd60d2c35523dc83e1593e4d91906176dae29a53a6684ea36c" - url: "https://pub.dev" - source: hosted - version: "0.0.1" + path: "../ap_common_core" + relative: true + source: path + version: "0.0.2" app_tracking_transparency: dependency: transitive description: name: app_tracking_transparency - sha256: "03e0aa07ed4f5abbdd5c197ee4f9f58f1362aebf82444f043b5ddbbe45e1004a" + sha256: "64d9745931e565790abdea91b518ac8dc3cebe6d0d0aaf7119343271b983259a" url: "https://pub.dev" source: hosted - version: "2.0.2+4" + version: "2.0.6" archive: dependency: transitive description: name: archive - sha256: eb33140ede1b4039f4ad631f7bf3cfa58e24514e8bf87184bc32f17541af87fc + sha256: "80e5141fafcb3361653ce308776cfd7d45e6e9fbb429e14eec571382c0c5fecb" url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "3.3.2" args: dependency: transitive description: @@ -84,26 +84,26 @@ packages: dependency: transitive description: name: barcode - sha256: "91b143666f7bb13636f716b6d4e412e372ab15ff7969799af8c9e30a382e9385" + sha256: ab180ce22c6555d77d45f0178a523669db67f95856e3378259ef2ffeb43e6003 url: "https://pub.dev" source: hosted - version: "2.2.6" + version: "2.2.8" barcode_widget: dependency: transitive description: name: barcode_widget - sha256: e374a5afa56b1d7ed0d93dafb7bd6a417ee138ecbc7af8d917e5bd91a30d4687 + sha256: "6f2c5b08659b1a5f4d88d183e6007133ea2f96e50e7b8bb628f03266c3931427" url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.0.4" bidi: dependency: transitive description: name: bidi - sha256: "1a7d0c696324b2089f72e7671fd1f1f64fef44c980f3cebc84e803967c597b63" + sha256: "9a712c7ddf708f7c41b1923aa83648a3ed44cfd75b04f72d598c45e5be287f9d" url: "https://pub.dev" source: hosted - version: "2.0.10" + version: "2.0.12" boolean_selector: dependency: transitive description: @@ -116,26 +116,26 @@ packages: dependency: transitive description: name: cached_network_image - sha256: "28ea9690a8207179c319965c13cd8df184d5ee721ae2ce60f398ced1219cea1f" + sha256: "4a5d8d2c728b0f3d0245f69f921d7be90cae4c2fd5288f773088672c0893f819" url: "https://pub.dev" source: hosted - version: "3.3.1" + version: "3.4.0" cached_network_image_platform_interface: dependency: transitive description: name: cached_network_image_platform_interface - sha256: "9e90e78ae72caa874a323d78fa6301b3fb8fa7ea76a8f96dc5b5bf79f283bf2f" + sha256: "35814b016e37fbdc91f7ae18c8caf49ba5c88501813f73ce8a07027a395e2829" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.1.1" cached_network_image_web: dependency: transitive description: name: cached_network_image_web - sha256: "205d6a9f1862de34b93184f22b9d2d94586b2f05c581d546695e3d8f6a805cd7" + sha256: "6322dde7a5ad92202e64df659241104a43db20ed594c41ca18de1014598d7996" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" characters: dependency: transitive description: @@ -144,14 +144,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" - chopper: - dependency: transitive - description: - name: chopper - sha256: "40899b729fb6d8969d967264b189efaf2452bc3ccf6ed0782d00f1d8a6161c31" - url: "https://pub.dev" - source: hosted - version: "8.0.3" clock: dependency: transitive description: @@ -240,14 +232,6 @@ packages: url: "https://pub.dev" source: hosted version: "5.0.1" - equatable: - dependency: transitive - description: - name: equatable - sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 - url: "https://pub.dev" - source: hosted - version: "2.0.5" fake_async: dependency: transitive description: @@ -260,18 +244,18 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.3" file: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" file_saver: dependency: transitive description: @@ -284,18 +268,18 @@ packages: dependency: transitive description: name: file_selector_linux - sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" + sha256: "712ce7fab537ba532c8febdb1a8f167b32441e74acd68c3ccb2e36dcb52c4ab2" url: "https://pub.dev" source: hosted - version: "0.9.2+1" + version: "0.9.3" file_selector_macos: dependency: transitive description: name: file_selector_macos - sha256: f42eacb83b318e183b1ae24eead1373ab1334084404c8c16e0354f9a3e55d385 + sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" url: "https://pub.dev" source: hosted - version: "0.9.4" + version: "0.9.4+2" file_selector_platform_interface: dependency: transitive description: @@ -308,10 +292,10 @@ packages: dependency: transitive description: name: file_selector_windows - sha256: "2ad726953f6e8affbc4df8dc78b77c3b4a060967a291e528ef72ae846c60fb69" + sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" url: "https://pub.dev" source: hosted - version: "0.9.3+2" + version: "0.9.3+3" firebase_analytics: dependency: "direct main" description: @@ -465,10 +449,10 @@ packages: dependency: transitive description: name: flutter_cache_manager - sha256: "8207f27539deb83732fdda03e259349046a39a4c767269285f449ade355d54ba" + sha256: "400b6592f16a4409a7f2bb929a9a7e38c72cceb8ffb99ee57bbf2cb2cecf8386" url: "https://pub.dev" source: hosted - version: "3.3.1" + version: "3.4.1" flutter_keyboard_visibility: dependency: transitive description: @@ -529,10 +513,10 @@ packages: dependency: transitive description: name: flutter_local_notifications - sha256: c500d5d9e7e553f06b61877ca6b9c8b92c570a4c8db371038702e8ce57f8a50f + sha256: "49eeef364fddb71515bc78d5a8c51435a68bccd6e4d68e25a942c5e47761ae71" url: "https://pub.dev" source: hosted - version: "17.2.2" + version: "17.2.3" flutter_local_notifications_linux: dependency: transitive description: @@ -558,10 +542,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "6ffe524cd6a7d49d99b2bf979a4f6ad82304c639cea4c8d3d0f8cf1aff24e74a" + sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda" url: "https://pub.dev" source: hosted - version: "2.0.6" + version: "2.0.22" flutter_test: dependency: "direct dev" description: flutter @@ -592,10 +576,10 @@ packages: dependency: transitive description: name: google_sign_in_android - sha256: "5a47ebec9af97daf0822e800e4f101c3340b5ebc3f6898cf860c1a71b53cf077" + sha256: "1ad54110a151d3ebbfe9be5a0c2b715aeabddb079e54efd84e56c49605b5474a" url: "https://pub.dev" source: hosted - version: "6.1.28" + version: "6.1.31" google_sign_in_ios: dependency: transitive description: @@ -712,18 +696,18 @@ packages: dependency: transitive description: name: in_app_review - sha256: "6cb7a8e4a2eecfa5868b35e1e9ac9082341eeead2cefaac8282be514736e9715" + sha256: "99869244d09adc76af16bf8fd731dd13cef58ecafd5917847589c49f378cbb30" url: "https://pub.dev" source: hosted - version: "2.0.4" + version: "2.0.9" in_app_review_platform_interface: dependency: transitive description: name: in_app_review_platform_interface - sha256: "1e5f2fc7d047607bffeb7d35f32651f7d2f328e872105e4f8d323c864aeaceb9" + sha256: fed2c755f2125caa9ae10495a3c163aa7fab5af3585a9c62ef4a6920c5b45f10 url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "2.0.5" injector: dependency: transitive description: @@ -796,14 +780,6 @@ packages: url: "https://pub.dev" source: hosted version: "5.0.0" - logging: - dependency: transitive - description: - name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" - url: "https://pub.dev" - source: hosted - version: "1.2.0" matcher: dependency: transitive description: @@ -880,10 +856,10 @@ packages: dependency: transitive description: name: path_parsing - sha256: "9508ebdf1c3ac3a68ad5fb15edab8b026382999f18f77352349e56fbd74183ac" + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.1" path_provider: dependency: transitive description: @@ -944,10 +920,10 @@ packages: dependency: transitive description: name: pdf_widget_wrapper - sha256: e9d31fd7782ce28ae346b127ea7d1cd748d799bddee379f31191693610e23749 + sha256: c930860d987213a3d58c7ec3b7ecf8085c3897f773e8dc23da9cae60a5d6d0f5 url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.4" petitparser: dependency: transitive description: @@ -960,10 +936,10 @@ packages: dependency: transitive description: name: photo_manager - sha256: e29619443803c40385ee509abc7937835d9b5122f899940080d28b2dceed59c1 + sha256: "32a1ce1095aeaaa792a29f28c1f74613aa75109f21c2d4ab85be3ad9964230a4" url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "3.5.0" photo_view: dependency: transitive description: @@ -976,10 +952,10 @@ packages: dependency: transitive description: name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.5" plugin_platform_interface: dependency: transitive description: @@ -1000,50 +976,26 @@ packages: dependency: transitive description: name: printing - sha256: "1c99cab90ebcc1fff65831d264627d5b529359d563e53f33ab9b8117f2d280bc" + sha256: cc4b256a5a89d5345488e3318897b595867f5181b8c5ed6fc63bfa5f2044aec3 url: "https://pub.dev" source: hosted - version: "5.12.0" - process: - dependency: transitive - description: - name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" - url: "https://pub.dev" - source: hosted - version: "4.2.4" + version: "5.13.1" qr: dependency: transitive description: name: qr - sha256: "64957a3930367bf97cc211a5af99551d630f2f4625e38af10edd6b19131b64b3" + sha256: "5a1d2586170e172b8a8c8470bbbffd5eb0cd38a66c0d77155ea138d3af3a4445" url: "https://pub.dev" source: hosted - version: "3.0.1" - qs_dart: - dependency: transitive - description: - name: qs_dart - sha256: be73d060d29c0716ded88380ba32e87ce8105f0ba234edb3edefa0d74d47d64b - url: "https://pub.dev" - source: hosted - version: "1.2.4" - recursive_regex: - dependency: transitive - description: - name: recursive_regex - sha256: f7252e3d3dfd1665e594d9fe035eca6bc54139b1f2fee38256fa427ea41adc60 - url: "https://pub.dev" - source: hosted - version: "1.0.0" + version: "3.0.2" rxdart: dependency: transitive description: name: rxdart - sha256: bc2d2b17b87fab32e2dca53ca3066d3147de6f96c74d76cfe1a379a24239c46d + sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962" url: "https://pub.dev" source: hosted - version: "0.27.3" + version: "0.28.0" share_plus: dependency: transitive description: @@ -1120,10 +1072,10 @@ packages: dependency: transitive description: name: sign_in_with_apple - sha256: "3c9dc9dcd5c42a17c6d4b912556198e8bd8e731ab67ac30f4a655974f95e7260" + sha256: "602f1374c9c4c33889c969b53ebf7cc8417c22cc7e25ea771581330173bc6603" url: "https://pub.dev" source: hosted - version: "6.1.2" + version: "6.1.3" sign_in_with_apple_platform_interface: dependency: transitive description: @@ -1165,18 +1117,18 @@ packages: dependency: transitive description: name: sqflite - sha256: "51c09d414ca74b1cd4a5880d63763ebd2033a4fc6d921708c7c1e98c603735d4" + sha256: ff5a2436ef8ebdfda748fbfe957f9981524cb5ff11e7bafa8c42771840e8a788 url: "https://pub.dev" source: hosted - version: "2.0.2+1" + version: "2.3.3+2" sqflite_common: dependency: transitive description: name: sqflite_common - sha256: b504fc5b4576a05586a0bb99d9bcc0d37a78d9d5ed68b96c361d5d3a8e538275 + sha256: "2d8e607db72e9cb7748c9c6e739e2c9618320a5517de693d5a24609c4671b1a4" url: "https://pub.dev" source: hosted - version: "2.2.1+1" + version: "2.5.4+4" stack_trace: dependency: transitive description: @@ -1205,10 +1157,10 @@ packages: dependency: transitive description: name: synchronized - sha256: a7f0790927c0806ae0d5eb061c713748fa6070ef0037e391a2d53c3844c09dc2 + sha256: "69fe30f3a8b04a0be0c15ae6490fc859a78ef4c43ae2dd5e8a623d45bfcf9225" url: "https://pub.dev" source: hosted - version: "3.0.0+2" + version: "3.3.0+3" term_glyph: dependency: transitive description: @@ -1309,10 +1261,10 @@ packages: dependency: transitive description: name: uuid - sha256: f33d6bb662f0e4f79dcd7ada2e6170f3b3a2530c28fc41f49a411ddedd576a77 + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "4.5.0" + version: "4.5.1" vector_math: dependency: transitive description: @@ -1329,14 +1281,6 @@ packages: url: "https://pub.dev" source: hosted version: "14.2.5" - weak_map: - dependency: transitive - description: - name: weak_map - sha256: "95ca338f0cdf5f0022cc283dfa4d97f6f6b03752f67eca85ebe6d7a679ffe3ed" - url: "https://pub.dev" - source: hosted - version: "3.0.1" web: dependency: transitive description: @@ -1349,18 +1293,18 @@ packages: dependency: transitive description: name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + sha256: "4d45dc9069dba4619dc0ebd93c7cec5e66d8482cb625a370ac806dcc8165f2ec" url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.5.5" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: "060b6e1c891d956f72b5ac9463466c37cce3fa962a921532fc001e86fe93438e" + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" url: "https://pub.dev" source: hosted - version: "0.2.0+1" + version: "1.1.0" xml: dependency: transitive description: @@ -1370,5 +1314,5 @@ packages: source: hosted version: "6.5.0" sdks: - dart: ">=3.4.0 <4.0.0" + dart: ">=3.5.0 <4.0.0" flutter: ">=3.22.0" diff --git a/packages/ap_common_firebase/pubspec.yaml b/packages/ap_common_firebase/pubspec.yaml index 00c2ffb5..ca37dafd 100644 --- a/packages/ap_common_firebase/pubspec.yaml +++ b/packages/ap_common_firebase/pubspec.yaml @@ -12,6 +12,7 @@ dependencies: flutter: sdk: flutter + ap_common: '>=0.25.0 <2.0.0' ap_common_core: '>=0.0.1 <1.0.0' # path: ../../GitHub-NKUST-ITC/ap_common url_launcher: ^6.1.0 diff --git a/packages/ap_common_firebase/pubspec_overrides.yaml b/packages/ap_common_firebase/pubspec_overrides.yaml deleted file mode 100644 index 9616ccc7..00000000 --- a/packages/ap_common_firebase/pubspec_overrides.yaml +++ /dev/null @@ -1,4 +0,0 @@ -# melos_managed_dependency_overrides: ap_common -dependency_overrides: - ap_common: - path: ../ap_common From b5e63d9a5277bc341fc82f94c208b7bf697cca0d Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Sat, 5 Oct 2024 01:31:01 +0800 Subject: [PATCH 09/41] chore: package version --- packages/ap_common/pubspec.lock | 9 ++-- packages/ap_common/pubspec.yaml | 2 + packages/ap_common_firebase/pubspec.lock | 55 ++++++++++++++++++++++-- 3 files changed, 57 insertions(+), 9 deletions(-) diff --git a/packages/ap_common/pubspec.lock b/packages/ap_common/pubspec.lock index 417cd527..df298294 100644 --- a/packages/ap_common/pubspec.lock +++ b/packages/ap_common/pubspec.lock @@ -41,11 +41,10 @@ packages: ap_common_core: dependency: "direct main" description: - name: ap_common_core - sha256: "7fc149e4ae7899cd60d2c35523dc83e1593e4d91906176dae29a53a6684ea36c" - url: "https://pub.dev" - source: hosted - version: "0.0.1" + path: "../ap_common_core" + relative: true + source: path + version: "0.0.2" app_tracking_transparency: dependency: "direct main" description: diff --git a/packages/ap_common/pubspec.yaml b/packages/ap_common/pubspec.yaml index b8916f64..37beb536 100644 --- a/packages/ap_common/pubspec.yaml +++ b/packages/ap_common/pubspec.yaml @@ -55,6 +55,8 @@ dependencies: app_tracking_transparency: ^2.0.2+4 #dependency_overrides: +# ap_common_core: +# path: ../ap_common_core/ dev_dependencies: flutter_test: diff --git a/packages/ap_common_firebase/pubspec.lock b/packages/ap_common_firebase/pubspec.lock index 8f8e6c28..d67fc82b 100644 --- a/packages/ap_common_firebase/pubspec.lock +++ b/packages/ap_common_firebase/pubspec.lock @@ -20,10 +20,9 @@ packages: ap_common: dependency: "direct main" description: - name: ap_common - sha256: "891671edd34d4a881fc3d0abf32cfb7f53044b9b2db7a70909ec5fbbc00c8e62" - url: "https://pub.dev" - source: hosted + path: "../ap_common" + relative: true + source: path version: "0.25.3" ap_common_core: dependency: "direct main" @@ -144,6 +143,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" + chopper: + dependency: transitive + description: + name: chopper + sha256: "40899b729fb6d8969d967264b189efaf2452bc3ccf6ed0782d00f1d8a6161c31" + url: "https://pub.dev" + source: hosted + version: "8.0.3" clock: dependency: transitive description: @@ -232,6 +239,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.0.1" + equatable: + dependency: transitive + description: + name: equatable + sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 + url: "https://pub.dev" + source: hosted + version: "2.0.5" fake_async: dependency: transitive description: @@ -780,6 +795,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.0.0" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" matcher: dependency: transitive description: @@ -988,6 +1011,22 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.2" + qs_dart: + dependency: transitive + description: + name: qs_dart + sha256: be73d060d29c0716ded88380ba32e87ce8105f0ba234edb3edefa0d74d47d64b + url: "https://pub.dev" + source: hosted + version: "1.2.4" + recursive_regex: + dependency: transitive + description: + name: recursive_regex + sha256: f7252e3d3dfd1665e594d9fe035eca6bc54139b1f2fee38256fa427ea41adc60 + url: "https://pub.dev" + source: hosted + version: "1.0.0" rxdart: dependency: transitive description: @@ -1281,6 +1320,14 @@ packages: url: "https://pub.dev" source: hosted version: "14.2.5" + weak_map: + dependency: transitive + description: + name: weak_map + sha256: "95ca338f0cdf5f0022cc283dfa4d97f6f6b03752f67eca85ebe6d7a679ffe3ed" + url: "https://pub.dev" + source: hosted + version: "3.0.1" web: dependency: transitive description: From c2b8ad8000bb19d0d5fccdaf63f0411329e6dcfa Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Sat, 5 Oct 2024 09:02:57 +0800 Subject: [PATCH 10/41] feat: centralized package lint rule --- ...ysis_options.yaml => analysis_options.yaml | 11 ++-- packages/ap_common/pubspec.yaml | 1 - packages/ap_common_core/analysis_options.yaml | 45 ---------------- packages/ap_common_core/pubspec.yaml | 1 - .../lib/apcommonfirebase.dart | 2 - .../lib/utils/firebase_analytics_utils.dart | 28 ++++++---- .../lib/utils/firebase_crashlytics_utils.dart | 15 +++--- .../lib/utils/firebase_message_utils.dart | 53 ++++++++----------- .../lib/utils/firebase_performance_utils.dart | 15 +++--- .../utils/firebase_remote_config_utils.dart | 10 ++-- .../lib/utils/firebase_utils.dart | 8 +-- .../lib/ap_common_plugin.dart | 3 +- pubspec.lock | 8 +++ pubspec.yaml | 3 +- 14 files changed, 82 insertions(+), 121 deletions(-) rename packages/ap_common/analysis_options.yaml => analysis_options.yaml (86%) delete mode 100644 packages/ap_common_core/analysis_options.yaml diff --git a/packages/ap_common/analysis_options.yaml b/analysis_options.yaml similarity index 86% rename from packages/ap_common/analysis_options.yaml rename to analysis_options.yaml index a369171a..5ff32c2b 100644 --- a/packages/ap_common/analysis_options.yaml +++ b/analysis_options.yaml @@ -3,15 +3,14 @@ include: package:lint/strict.yaml analyzer: exclude: # l10n generated code - - lib/l10n/intl/*.dart - - lib/l10n/l10n.dart - - example/lib/l10n/intl/*.dart - - example/lib/l10n/l10n.dart + - packages/ap_common/lib/l10n/intl/*.dart + - packages/ap_common/lib/l10n/l10n.dart + - apps/example/lib/l10n/intl/*.dart + - apps/example/lib/l10n/l10n.dart # example # - example/** # other generated files - - lib/models/*.g.dart - - lib/**/*.g.dart + - '**/*.g.dart' linter: rules: diff --git a/packages/ap_common/pubspec.yaml b/packages/ap_common/pubspec.yaml index 37beb536..8223cedf 100644 --- a/packages/ap_common/pubspec.yaml +++ b/packages/ap_common/pubspec.yaml @@ -61,7 +61,6 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - lint: ^2.1.2 build_runner: ^2.0.3 json_serializable: ^6.3.0 spider: ^4.2.2 diff --git a/packages/ap_common_core/analysis_options.yaml b/packages/ap_common_core/analysis_options.yaml deleted file mode 100644 index 8a312e70..00000000 --- a/packages/ap_common_core/analysis_options.yaml +++ /dev/null @@ -1,45 +0,0 @@ -include: package:lint/strict.yaml - -analyzer: - exclude: - # generated files - - lib/src/models/*.g.dart - - lib/src/**/*.g.dart - -linter: - rules: - # ------ Disable individual rules ----- # - # --- # - # Turn off what you don't like. # - # ------------------------------------- # - - # Use parameter order as in json response - always_put_required_named_parameters_first: false - - # Util classes are awesome! - avoid_classes_with_only_static_members: false - - - # ------ Enable individual rules ------ # - # --- # - # These rules here are good but too # - # opinionated to enable them by default # - # ------------------------------------- # - - # Make constructors the first thing in every class - sort_constructors_first: true - - # The new tabs vs. spaces. Choose wisely - prefer_single_quotes: true - prefer_double_quotes: false - - # Good packages document everything - public_member_api_docs: false - - # Blindly follow the Flutter code style, which prefers types everywhere - always_specify_types: true - - # Back to the 80s - lines_longer_than_80_chars: false - - sort_pub_dependencies: false \ No newline at end of file diff --git a/packages/ap_common_core/pubspec.yaml b/packages/ap_common_core/pubspec.yaml index c48d8b61..92605d23 100644 --- a/packages/ap_common_core/pubspec.yaml +++ b/packages/ap_common_core/pubspec.yaml @@ -20,6 +20,5 @@ dependencies: injector: ^4.0.0 dev_dependencies: - lint: ^2.1.2 build_runner: ^2.0.3 json_serializable: ^6.3.0 \ No newline at end of file diff --git a/packages/ap_common_firebase/lib/apcommonfirebase.dart b/packages/ap_common_firebase/lib/apcommonfirebase.dart index 96f7c23e..298576d8 100644 --- a/packages/ap_common_firebase/lib/apcommonfirebase.dart +++ b/packages/ap_common_firebase/lib/apcommonfirebase.dart @@ -1,5 +1,3 @@ -library apcommonfirebase; - /// A Calculator. class Calculator { /// Returns [value] plus 1. diff --git a/packages/ap_common_firebase/lib/utils/firebase_analytics_utils.dart b/packages/ap_common_firebase/lib/utils/firebase_analytics_utils.dart index dbfd7829..8722c4bc 100644 --- a/packages/ap_common_firebase/lib/utils/firebase_analytics_utils.dart +++ b/packages/ap_common_firebase/lib/utils/firebase_analytics_utils.dart @@ -3,30 +3,31 @@ import 'dart:io'; import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_firebase/utils/firebase_utils.dart'; import 'package:firebase_analytics/firebase_analytics.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'firebase_utils.dart'; - export 'package:firebase_analytics/firebase_analytics.dart'; class FirebaseAnalyticsUtils extends AnalyticsUtil { + FirebaseAnalyticsUtils() { + if (isSupported) analytics = FirebaseAnalytics.instance; + } + static FirebaseAnalyticsUtils? _instance; static bool get isSupported => - (kIsWeb || Platform.isAndroid || Platform.isIOS || Platform.isMacOS); + kIsWeb || Platform.isAndroid || Platform.isIOS || Platform.isMacOS; + //ignore: prefer_constructors_over_static_methods static FirebaseAnalyticsUtils get instance { return _instance ??= FirebaseAnalyticsUtils(); } - FirebaseAnalyticsUtils() { - if (isSupported) analytics = FirebaseAnalytics.instance; - } - FirebaseAnalytics? analytics; + @override Future setCurrentScreen( String screenName, String screenClassOverride, @@ -37,11 +38,13 @@ class FirebaseAnalyticsUtils extends AnalyticsUtil { ); } + @override Future setUserId(String id) async { await analytics?.setUserId(id: id); debugPrint('setUserId succeeded'); } + @override Future setUserProperty( String name, String? value, @@ -53,6 +56,7 @@ class FirebaseAnalyticsUtils extends AnalyticsUtil { debugPrint('setUserProperty $name succeeded'); } + @override Future logEvent( String name, { Map? parameters, @@ -63,6 +67,7 @@ class FirebaseAnalyticsUtils extends AnalyticsUtil { ); } + @override Future logUserInfo(UserInfo? userInfo) async { if (userInfo == null) return; if (userInfo.department != null && userInfo.department!.isNotEmpty) { @@ -93,8 +98,12 @@ class FirebaseAnalyticsUtils extends AnalyticsUtil { debugPrint('logUserInfo succeeded'); } - Future logApiEvent(String type, int status, - {String message = ''}) async { + @override + Future logApiEvent( + String type, + int status, { + String message = '', + }) async { await analytics?.logEvent( name: 'ap_api', parameters: { @@ -116,6 +125,7 @@ class FirebaseAnalyticsUtils extends AnalyticsUtil { debugPrint('log CalculateUnits succeeded'); } + @override Future logTimeEvent(String name, double seconds) async { await analytics?.logEvent( name: name, diff --git a/packages/ap_common_firebase/lib/utils/firebase_crashlytics_utils.dart b/packages/ap_common_firebase/lib/utils/firebase_crashlytics_utils.dart index 88193ad2..aa0d6f14 100644 --- a/packages/ap_common_firebase/lib/utils/firebase_crashlytics_utils.dart +++ b/packages/ap_common_firebase/lib/utils/firebase_crashlytics_utils.dart @@ -9,8 +9,13 @@ import 'package:flutter/foundation.dart'; export 'package:firebase_crashlytics/firebase_crashlytics.dart'; class FirebaseCrashlyticsUtils extends CrashlyticsUtil { + FirebaseCrashlyticsUtils() { + if (isSupported) crashlytics = FirebaseCrashlytics.instance; + } + static FirebaseCrashlyticsUtils? _instance; + //ignore: prefer_constructors_over_static_methods static FirebaseCrashlyticsUtils get instance { return _instance ??= FirebaseCrashlyticsUtils(); } @@ -18,10 +23,6 @@ class FirebaseCrashlyticsUtils extends CrashlyticsUtil { static bool get isSupported => !kIsWeb && (Platform.isAndroid || Platform.isIOS || Platform.isMacOS); - FirebaseCrashlyticsUtils() { - if (isSupported) crashlytics = FirebaseCrashlytics.instance; - } - FirebaseCrashlytics? crashlytics; @override @@ -31,13 +32,13 @@ class FirebaseCrashlyticsUtils extends CrashlyticsUtil { @override Future recordError( - exception, + dynamic exception, StackTrace stack, { - reason, + dynamic reason, Iterable? information, bool? printDetails, }) async { - information ??= const []; + information ??= const []; await crashlytics?.recordError( exception, stack, diff --git a/packages/ap_common_firebase/lib/utils/firebase_message_utils.dart b/packages/ap_common_firebase/lib/utils/firebase_message_utils.dart index e7251e2c..bacffd7b 100644 --- a/packages/ap_common_firebase/lib/utils/firebase_message_utils.dart +++ b/packages/ap_common_firebase/lib/utils/firebase_message_utils.dart @@ -1,38 +1,39 @@ +import 'dart:developer'; import 'dart:io'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_firebase/utils/firebase_analytics_utils.dart'; import 'package:ap_common_firebase/utils/firebase_utils.dart'; import 'package:flutter/foundation.dart'; import 'package:url_launcher/url_launcher.dart'; -import 'firebase_analytics_utils.dart'; - export 'package:firebase_messaging/firebase_messaging.dart'; -const NOTIFY_ID = 9919; -const NOTIFY_ANDROID_CHANNEL_ID = '1000'; -const androidChannelDescription = 'FCM'; +const int notifyId = 9919; +const String notifyAndroidChannelId = '1000'; +const String androidChannelDescription = 'FCM'; class FirebaseMessagingUtils { + FirebaseMessagingUtils() { + if (isSupported) { + messaging = FirebaseMessaging.instance; + } + } + static FirebaseMessagingUtils? _instance; + //ignore: prefer_constructors_over_static_methods static FirebaseMessagingUtils get instance { return _instance ??= FirebaseMessagingUtils(); } static bool get isSupported => - (kIsWeb || Platform.isAndroid || Platform.isIOS || Platform.isMacOS); + kIsWeb || Platform.isAndroid || Platform.isIOS || Platform.isMacOS; Future isBrowserSupported() async { return FirebaseMessaging.instance.isSupported(); } - FirebaseMessagingUtils() { - if (isSupported) { - messaging = FirebaseMessaging.instance; - } - } - FirebaseMessaging? messaging; Future init({ @@ -45,10 +46,10 @@ class FirebaseMessagingUtils { } FirebaseMessaging.onMessage.listen((RemoteMessage message) async { if (message.notification != null) { - debugPrint("onMessage: $message"); + debugPrint('onMessage: $message'); NotificationUtil.instance.show( - id: NOTIFY_ID, - androidChannelId: NOTIFY_ANDROID_CHANNEL_ID, + id: notifyId, + androidChannelId: notifyAndroidChannelId, androidChannelDescription: androidChannelDescription, title: message.notification!.title ?? '', content: message.notification!.body ?? '', @@ -63,7 +64,7 @@ class FirebaseMessagingUtils { } }); FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) async { - debugPrint("onMessageOpenedApp: $message"); + debugPrint('onMessageOpenedApp: $message'); await navigateToItemDetail( message, onClick, @@ -71,26 +72,18 @@ class FirebaseMessagingUtils { ); }); FirebaseMessaging.onBackgroundMessage((RemoteMessage message) async { - debugPrint("onBackgroundMessage: $message"); + debugPrint('onBackgroundMessage: $message'); await navigateToItemDetail( message, onClick, customOnClickAction, ); }); - final value = await messaging?.requestPermission( - alert: true, - announcement: false, - badge: true, - carPlay: false, - criticalAlert: false, - provisional: false, - sound: true, - ); + final NotificationSettings? value = await messaging?.requestPermission(); if (value?.authorizationStatus == AuthorizationStatus.authorized) { messaging?.getToken(vapidKey: vapidKey).then((String? token) { if (token != null && kDebugMode) { - print("Push Messaging token: $token"); + log('Push Messaging token: $token', name: 'firebase'); } }); FirebaseAnalyticsUtils.instance.setUserProperty( @@ -106,12 +99,12 @@ class FirebaseMessagingUtils { Function(RemoteMessage)? onClick, bool customOnClickAction, ) async { - final data = message.data; + final Map data = message.data; if (customOnClickAction) { onClick?.call(message); - } else if (data['type'] == "1") { + } else if (data['type'] == '1') { launchUrl( - Uri.parse(data['url']), + Uri.parse(data['url'] as String), ); } else { onClick?.call(message); diff --git a/packages/ap_common_firebase/lib/utils/firebase_performance_utils.dart b/packages/ap_common_firebase/lib/utils/firebase_performance_utils.dart index 0a312ad0..be236c1e 100644 --- a/packages/ap_common_firebase/lib/utils/firebase_performance_utils.dart +++ b/packages/ap_common_firebase/lib/utils/firebase_performance_utils.dart @@ -6,20 +6,19 @@ import 'package:flutter/foundation.dart'; export 'package:firebase_performance/firebase_performance.dart'; class FirebasePerformancesUtils { + FirebasePerformancesUtils() { + if (isSupported) { + performance = FirebasePerformance.instance; + } + } static FirebasePerformancesUtils? _instance; + //ignore: prefer_constructors_over_static_methods static FirebasePerformancesUtils get instance { return _instance ??= FirebasePerformancesUtils(); } - static bool get isSupported => - kIsWeb || Platform.isAndroid || Platform.isIOS; - - FirebasePerformancesUtils() { - if (isSupported) { - performance = FirebasePerformance.instance; - } - } + static bool get isSupported => kIsWeb || Platform.isAndroid || Platform.isIOS; FirebasePerformance? performance; diff --git a/packages/ap_common_firebase/lib/utils/firebase_remote_config_utils.dart b/packages/ap_common_firebase/lib/utils/firebase_remote_config_utils.dart index 1204506d..996732c9 100644 --- a/packages/ap_common_firebase/lib/utils/firebase_remote_config_utils.dart +++ b/packages/ap_common_firebase/lib/utils/firebase_remote_config_utils.dart @@ -7,20 +7,20 @@ import 'package:flutter/foundation.dart'; export 'package:firebase_remote_config/firebase_remote_config.dart'; class FirebaseRemoteConfigUtils { + FirebaseRemoteConfigUtils() { + if (isSupported) remoteConfig = FirebaseRemoteConfig.instance; + } static FirebaseRemoteConfigUtils? _instance; + //ignore: prefer_constructors_over_static_methods static FirebaseRemoteConfigUtils get instance { return _instance ??= FirebaseRemoteConfigUtils(); } - FirebaseRemoteConfigUtils() { - if (isSupported) remoteConfig = FirebaseRemoteConfig.instance; - } - FirebaseRemoteConfig? remoteConfig; static bool get isSupported => - (kIsWeb || Platform.isAndroid || Platform.isIOS || Platform.isMacOS); + kIsWeb || Platform.isAndroid || Platform.isIOS || Platform.isMacOS; } extension RemoteConfigExtension on FirebaseRemoteConfig { diff --git a/packages/ap_common_firebase/lib/utils/firebase_utils.dart b/packages/ap_common_firebase/lib/utils/firebase_utils.dart index 37483f5f..4bf34837 100644 --- a/packages/ap_common_firebase/lib/utils/firebase_utils.dart +++ b/packages/ap_common_firebase/lib/utils/firebase_utils.dart @@ -3,10 +3,9 @@ import 'dart:io'; import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_firebase/utils/firebase_analytics_utils.dart'; import 'package:ap_common_firebase/utils/firebase_crashlytics_utils.dart'; +import 'package:ap_common_firebase/utils/firebase_performance_utils.dart'; import 'package:flutter/foundation.dart'; -import 'firebase_performance_utils.dart'; - export 'package:firebase_analytics/firebase_analytics.dart'; export 'package:firebase_core/firebase_core.dart'; export 'package:firebase_crashlytics/firebase_crashlytics.dart'; @@ -14,8 +13,9 @@ export 'package:firebase_messaging/firebase_messaging.dart'; class FirebaseUtils { static FirebaseAnalytics? init() { - if (FirebaseCrashlyticsUtils.isSupported) + if (FirebaseCrashlyticsUtils.isSupported) { CrashlyticsUtil.instance = FirebaseCrashlyticsUtils.instance; + } if (FirebaseAnalyticsUtils.isSupported) { AnalyticsUtil.instance = FirebaseAnalyticsUtils.instance; return FirebaseAnalyticsUtils.instance.analytics; @@ -25,5 +25,5 @@ class FirebaseUtils { } static bool get isSupportCore => - (kIsWeb || Platform.isAndroid || Platform.isIOS || Platform.isMacOS); + kIsWeb || Platform.isAndroid || Platform.isIOS || Platform.isMacOS; } diff --git a/packages/ap_common_plugin/lib/ap_common_plugin.dart b/packages/ap_common_plugin/lib/ap_common_plugin.dart index 5ce57925..d998c2d7 100644 --- a/packages/ap_common_plugin/lib/ap_common_plugin.dart +++ b/packages/ap_common_plugin/lib/ap_common_plugin.dart @@ -3,8 +3,7 @@ import 'dart:async'; import 'package:flutter/services.dart'; class ApCommonPlugin { - static const MethodChannel _channel = - const MethodChannel('ap_common_plugin'); + static const MethodChannel _channel = MethodChannel('ap_common_plugin'); static Future get platformVersion async { final String? version = await _channel.invokeMethod('getPlatformVersion'); diff --git a/pubspec.lock b/pubspec.lock index 0b8071b4..b5f59132 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -145,6 +145,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.9.0" + lint: + dependency: "direct dev" + description: + name: lint + sha256: d758a5211fce7fd3f5e316f804daefecdc34c7e53559716125e6da7388ae8565 + url: "https://pub.dev" + source: hosted + version: "2.3.0" matcher: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 00fd81cb..d622fa04 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,4 +5,5 @@ environment: flutter: ">=3.24.0 <4.0.0" dev_dependencies: - melos: ^6.1.0 \ No newline at end of file + melos: ^6.1.0 + lint: ^2.1.2 \ No newline at end of file From 7d0219927e3b4a7c2a924cdce86dd471f7564e19 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Sat, 5 Oct 2024 09:35:36 +0800 Subject: [PATCH 11/41] feat: improve `ap_common_firebase` package import usage --- .../lib/ap_common_firebase.dart | 6 + .../lib/apcommonfirebase.dart | 5 - .../utils/firebase_analytics_utils.dart | 2 +- .../utils/firebase_crashlytics_utils.dart | 2 +- .../utils/firebase_message_utils.dart | 4 +- .../utils/firebase_performance_utils.dart | 0 .../utils/firebase_remote_config_utils.dart | 0 .../lib/{ => src}/utils/firebase_utils.dart | 6 +- packages/ap_common_firebase/pubspec.lock | 1365 ----------------- 9 files changed, 13 insertions(+), 1377 deletions(-) create mode 100644 packages/ap_common_firebase/lib/ap_common_firebase.dart delete mode 100644 packages/ap_common_firebase/lib/apcommonfirebase.dart rename packages/ap_common_firebase/lib/{ => src}/utils/firebase_analytics_utils.dart (98%) rename packages/ap_common_firebase/lib/{ => src}/utils/firebase_crashlytics_utils.dart (95%) rename packages/ap_common_firebase/lib/{ => src}/utils/firebase_message_utils.dart (95%) rename packages/ap_common_firebase/lib/{ => src}/utils/firebase_performance_utils.dart (100%) rename packages/ap_common_firebase/lib/{ => src}/utils/firebase_remote_config_utils.dart (100%) rename packages/ap_common_firebase/lib/{ => src}/utils/firebase_utils.dart (79%) delete mode 100644 packages/ap_common_firebase/pubspec.lock diff --git a/packages/ap_common_firebase/lib/ap_common_firebase.dart b/packages/ap_common_firebase/lib/ap_common_firebase.dart new file mode 100644 index 00000000..66c6a1a3 --- /dev/null +++ b/packages/ap_common_firebase/lib/ap_common_firebase.dart @@ -0,0 +1,6 @@ +export 'src/utils/firebase_analytics_utils.dart'; +export 'src/utils/firebase_crashlytics_utils.dart'; +export 'src/utils/firebase_message_utils.dart'; +export 'src/utils/firebase_performance_utils.dart'; +export 'src/utils/firebase_remote_config_utils.dart'; +export 'src/utils/firebase_utils.dart'; diff --git a/packages/ap_common_firebase/lib/apcommonfirebase.dart b/packages/ap_common_firebase/lib/apcommonfirebase.dart deleted file mode 100644 index 298576d8..00000000 --- a/packages/ap_common_firebase/lib/apcommonfirebase.dart +++ /dev/null @@ -1,5 +0,0 @@ -/// A Calculator. -class Calculator { - /// Returns [value] plus 1. - int addOne(int value) => value + 1; -} diff --git a/packages/ap_common_firebase/lib/utils/firebase_analytics_utils.dart b/packages/ap_common_firebase/lib/src/utils/firebase_analytics_utils.dart similarity index 98% rename from packages/ap_common_firebase/lib/utils/firebase_analytics_utils.dart rename to packages/ap_common_firebase/lib/src/utils/firebase_analytics_utils.dart index 8722c4bc..f65161ad 100644 --- a/packages/ap_common_firebase/lib/utils/firebase_analytics_utils.dart +++ b/packages/ap_common_firebase/lib/src/utils/firebase_analytics_utils.dart @@ -3,7 +3,7 @@ import 'dart:io'; import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common_core/ap_common_core.dart'; -import 'package:ap_common_firebase/utils/firebase_utils.dart'; +import 'package:ap_common_firebase/src/utils/firebase_utils.dart'; import 'package:firebase_analytics/firebase_analytics.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; diff --git a/packages/ap_common_firebase/lib/utils/firebase_crashlytics_utils.dart b/packages/ap_common_firebase/lib/src/utils/firebase_crashlytics_utils.dart similarity index 95% rename from packages/ap_common_firebase/lib/utils/firebase_crashlytics_utils.dart rename to packages/ap_common_firebase/lib/src/utils/firebase_crashlytics_utils.dart index aa0d6f14..a6bc7229 100644 --- a/packages/ap_common_firebase/lib/utils/firebase_crashlytics_utils.dart +++ b/packages/ap_common_firebase/lib/src/utils/firebase_crashlytics_utils.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'dart:io'; import 'package:ap_common_core/ap_common_core.dart'; -import 'package:ap_common_firebase/utils/firebase_utils.dart'; +import 'package:ap_common_firebase/src/utils/firebase_utils.dart'; import 'package:firebase_crashlytics/firebase_crashlytics.dart'; import 'package:flutter/foundation.dart'; diff --git a/packages/ap_common_firebase/lib/utils/firebase_message_utils.dart b/packages/ap_common_firebase/lib/src/utils/firebase_message_utils.dart similarity index 95% rename from packages/ap_common_firebase/lib/utils/firebase_message_utils.dart rename to packages/ap_common_firebase/lib/src/utils/firebase_message_utils.dart index bacffd7b..6179db34 100644 --- a/packages/ap_common_firebase/lib/utils/firebase_message_utils.dart +++ b/packages/ap_common_firebase/lib/src/utils/firebase_message_utils.dart @@ -2,8 +2,8 @@ import 'dart:developer'; import 'dart:io'; import 'package:ap_common_core/ap_common_core.dart'; -import 'package:ap_common_firebase/utils/firebase_analytics_utils.dart'; -import 'package:ap_common_firebase/utils/firebase_utils.dart'; +import 'package:ap_common_firebase/src/utils/firebase_analytics_utils.dart'; +import 'package:ap_common_firebase/src/utils/firebase_utils.dart'; import 'package:flutter/foundation.dart'; import 'package:url_launcher/url_launcher.dart'; diff --git a/packages/ap_common_firebase/lib/utils/firebase_performance_utils.dart b/packages/ap_common_firebase/lib/src/utils/firebase_performance_utils.dart similarity index 100% rename from packages/ap_common_firebase/lib/utils/firebase_performance_utils.dart rename to packages/ap_common_firebase/lib/src/utils/firebase_performance_utils.dart diff --git a/packages/ap_common_firebase/lib/utils/firebase_remote_config_utils.dart b/packages/ap_common_firebase/lib/src/utils/firebase_remote_config_utils.dart similarity index 100% rename from packages/ap_common_firebase/lib/utils/firebase_remote_config_utils.dart rename to packages/ap_common_firebase/lib/src/utils/firebase_remote_config_utils.dart diff --git a/packages/ap_common_firebase/lib/utils/firebase_utils.dart b/packages/ap_common_firebase/lib/src/utils/firebase_utils.dart similarity index 79% rename from packages/ap_common_firebase/lib/utils/firebase_utils.dart rename to packages/ap_common_firebase/lib/src/utils/firebase_utils.dart index 4bf34837..cce19342 100644 --- a/packages/ap_common_firebase/lib/utils/firebase_utils.dart +++ b/packages/ap_common_firebase/lib/src/utils/firebase_utils.dart @@ -1,9 +1,9 @@ import 'dart:io'; import 'package:ap_common_core/ap_common_core.dart'; -import 'package:ap_common_firebase/utils/firebase_analytics_utils.dart'; -import 'package:ap_common_firebase/utils/firebase_crashlytics_utils.dart'; -import 'package:ap_common_firebase/utils/firebase_performance_utils.dart'; +import 'package:ap_common_firebase/src/utils/firebase_analytics_utils.dart'; +import 'package:ap_common_firebase/src/utils/firebase_crashlytics_utils.dart'; +import 'package:ap_common_firebase/src/utils/firebase_performance_utils.dart'; import 'package:flutter/foundation.dart'; export 'package:firebase_analytics/firebase_analytics.dart'; diff --git a/packages/ap_common_firebase/pubspec.lock b/packages/ap_common_firebase/pubspec.lock deleted file mode 100644 index d67fc82b..00000000 --- a/packages/ap_common_firebase/pubspec.lock +++ /dev/null @@ -1,1365 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _flutterfire_internals: - dependency: transitive - description: - name: _flutterfire_internals - sha256: "37a42d06068e2fe3deddb2da079a8c4d105f241225ba27b7122b37e9865fd8f7" - url: "https://pub.dev" - source: hosted - version: "1.3.35" - add_2_calendar: - dependency: transitive - description: - name: add_2_calendar - sha256: "8d7a82aba607d35f2a5bc913419e12f865a96a350a8ad2509a59322bc161f200" - url: "https://pub.dev" - source: hosted - version: "3.0.1" - ap_common: - dependency: "direct main" - description: - path: "../ap_common" - relative: true - source: path - version: "0.25.3" - ap_common_core: - dependency: "direct main" - description: - path: "../ap_common_core" - relative: true - source: path - version: "0.0.2" - app_tracking_transparency: - dependency: transitive - description: - name: app_tracking_transparency - sha256: "64d9745931e565790abdea91b518ac8dc3cebe6d0d0aaf7119343271b983259a" - url: "https://pub.dev" - source: hosted - version: "2.0.6" - archive: - dependency: transitive - description: - name: archive - sha256: "80e5141fafcb3361653ce308776cfd7d45e6e9fbb429e14eec571382c0c5fecb" - url: "https://pub.dev" - source: hosted - version: "3.3.2" - args: - dependency: transitive - description: - name: args - sha256: b003c3098049a51720352d219b0bb5f219b60fbfb68e7a4748139a06a5676515 - url: "https://pub.dev" - source: hosted - version: "2.3.1" - asn1lib: - dependency: transitive - description: - name: asn1lib - sha256: c273725e171cea7e69c8953181202a2850297bcc7617916d83b396cd791a2dcd - url: "https://pub.dev" - source: hosted - version: "1.1.0" - async: - dependency: transitive - description: - name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.dev" - source: hosted - version: "2.11.0" - auto_size_text_pk: - dependency: transitive - description: - name: auto_size_text_pk - sha256: ced55de5336fa7f438c1f5a9aa234e25d7a120c1d40d376a7cdc2af28cdb6995 - url: "https://pub.dev" - source: hosted - version: "3.0.0" - barcode: - dependency: transitive - description: - name: barcode - sha256: ab180ce22c6555d77d45f0178a523669db67f95856e3378259ef2ffeb43e6003 - url: "https://pub.dev" - source: hosted - version: "2.2.8" - barcode_widget: - dependency: transitive - description: - name: barcode_widget - sha256: "6f2c5b08659b1a5f4d88d183e6007133ea2f96e50e7b8bb628f03266c3931427" - url: "https://pub.dev" - source: hosted - version: "2.0.4" - bidi: - dependency: transitive - description: - name: bidi - sha256: "9a712c7ddf708f7c41b1923aa83648a3ed44cfd75b04f72d598c45e5be287f9d" - url: "https://pub.dev" - source: hosted - version: "2.0.12" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - cached_network_image: - dependency: transitive - description: - name: cached_network_image - sha256: "4a5d8d2c728b0f3d0245f69f921d7be90cae4c2fd5288f773088672c0893f819" - url: "https://pub.dev" - source: hosted - version: "3.4.0" - cached_network_image_platform_interface: - dependency: transitive - description: - name: cached_network_image_platform_interface - sha256: "35814b016e37fbdc91f7ae18c8caf49ba5c88501813f73ce8a07027a395e2829" - url: "https://pub.dev" - source: hosted - version: "4.1.1" - cached_network_image_web: - dependency: transitive - description: - name: cached_network_image_web - sha256: "6322dde7a5ad92202e64df659241104a43db20ed594c41ca18de1014598d7996" - url: "https://pub.dev" - source: hosted - version: "1.3.0" - characters: - dependency: transitive - description: - name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" - url: "https://pub.dev" - source: hosted - version: "1.3.0" - chopper: - dependency: transitive - description: - name: chopper - sha256: "40899b729fb6d8969d967264b189efaf2452bc3ccf6ed0782d00f1d8a6161c31" - url: "https://pub.dev" - source: hosted - version: "8.0.3" - clock: - dependency: transitive - description: - name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.dev" - source: hosted - version: "1.1.1" - collection: - dependency: transitive - description: - name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: "https://pub.dev" - source: hosted - version: "1.18.0" - convert: - dependency: transitive - description: - name: convert - sha256: f08428ad63615f96a27e34221c65e1a451439b5f26030f78d790f461c686d65d - url: "https://pub.dev" - source: hosted - version: "3.0.1" - cookie_jar: - dependency: transitive - description: - name: cookie_jar - sha256: "253920541bf248e4eda6eac5df6aa00c19c183e1fe333629925d8df666a27815" - url: "https://pub.dev" - source: hosted - version: "4.0.1" - cross_file: - dependency: transitive - description: - name: cross_file - sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" - url: "https://pub.dev" - source: hosted - version: "0.3.4+2" - crypto: - dependency: transitive - description: - name: crypto - sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 - url: "https://pub.dev" - source: hosted - version: "3.0.2" - cupertino_back_gesture: - dependency: transitive - description: - name: cupertino_back_gesture - sha256: "64f68f3aadb98e19d85c8c1dd9595a56b5b53b05f455e32df1c52edadad456d8" - url: "https://pub.dev" - source: hosted - version: "0.1.0" - dbus: - dependency: transitive - description: - name: dbus - sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac" - url: "https://pub.dev" - source: hosted - version: "0.7.10" - dio: - dependency: transitive - description: - name: dio - sha256: "49af28382aefc53562459104f64d16b9dfd1e8ef68c862d5af436cc8356ce5a8" - url: "https://pub.dev" - source: hosted - version: "5.4.1" - dio_cookie_manager: - dependency: transitive - description: - name: dio_cookie_manager - sha256: e79498b0f632897ff0c28d6e8178b4bc6e9087412401f618c31fa0904ace050d - url: "https://pub.dev" - source: hosted - version: "3.1.1" - encrypt: - dependency: transitive - description: - name: encrypt - sha256: "4fd4e4fdc21b9d7d4141823e1e6515cd94e7b8d84749504c232999fba25d9bbb" - url: "https://pub.dev" - source: hosted - version: "5.0.1" - equatable: - dependency: transitive - description: - name: equatable - sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 - url: "https://pub.dev" - source: hosted - version: "2.0.5" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" - url: "https://pub.dev" - source: hosted - version: "1.3.1" - ffi: - dependency: transitive - description: - name: ffi - sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" - url: "https://pub.dev" - source: hosted - version: "2.1.3" - file: - dependency: transitive - description: - name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" - url: "https://pub.dev" - source: hosted - version: "7.0.0" - file_saver: - dependency: transitive - description: - name: file_saver - sha256: bdebc720e17b3e01aba59da69b6d47020a7e5ba7d5c75bd9194f9618d5f16ef4 - url: "https://pub.dev" - source: hosted - version: "0.2.12" - file_selector_linux: - dependency: transitive - description: - name: file_selector_linux - sha256: "712ce7fab537ba532c8febdb1a8f167b32441e74acd68c3ccb2e36dcb52c4ab2" - url: "https://pub.dev" - source: hosted - version: "0.9.3" - file_selector_macos: - dependency: transitive - description: - name: file_selector_macos - sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" - url: "https://pub.dev" - source: hosted - version: "0.9.4+2" - file_selector_platform_interface: - dependency: transitive - description: - name: file_selector_platform_interface - sha256: "0aa47a725c346825a2bd396343ce63ac00bda6eff2fbc43eabe99737dede8262" - url: "https://pub.dev" - source: hosted - version: "2.6.1" - file_selector_windows: - dependency: transitive - description: - name: file_selector_windows - sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" - url: "https://pub.dev" - source: hosted - version: "0.9.3+3" - firebase_analytics: - dependency: "direct main" - description: - name: firebase_analytics - sha256: dbf1e7ab22cfb1f4a4adb103b46a26276b4edc593d4a78ef6fb942bafc92e035 - url: "https://pub.dev" - source: hosted - version: "10.10.7" - firebase_analytics_platform_interface: - dependency: transitive - description: - name: firebase_analytics_platform_interface - sha256: "3729b74f8cf1d974a27ba70332ecb55ff5ff560edc8164a6469f4a055b429c37" - url: "https://pub.dev" - source: hosted - version: "3.10.8" - firebase_analytics_web: - dependency: transitive - description: - name: firebase_analytics_web - sha256: "019cd7eee74254d33fbd2e29229367ce33063516bf6b3258a341d89e3b0f1655" - url: "https://pub.dev" - source: hosted - version: "0.5.7+7" - firebase_core: - dependency: "direct main" - description: - name: firebase_core - sha256: "26de145bb9688a90962faec6f838247377b0b0d32cc0abecd9a4e43525fc856c" - url: "https://pub.dev" - source: hosted - version: "2.32.0" - firebase_core_platform_interface: - dependency: transitive - description: - name: firebase_core_platform_interface - sha256: c437ae5d17e6b5cc7981cf6fd458a5db4d12979905f9aafd1fea930428a9fe63 - url: "https://pub.dev" - source: hosted - version: "5.0.0" - firebase_core_web: - dependency: transitive - description: - name: firebase_core_web - sha256: "22fcb352744908224fc7be3caae254836099786acfe5df6e9fe901e9c2575a41" - url: "https://pub.dev" - source: hosted - version: "2.17.1" - firebase_crashlytics: - dependency: "direct main" - description: - name: firebase_crashlytics - sha256: "9897c01efaa950d2f6da8317d12452749a74dc45f33b46390a14cfe28067f271" - url: "https://pub.dev" - source: hosted - version: "3.5.7" - firebase_crashlytics_platform_interface: - dependency: transitive - description: - name: firebase_crashlytics_platform_interface - sha256: "16a71e08fbf6e00382816e1b13397898c29a54fa0ad969c2c2a3b82a704877f0" - url: "https://pub.dev" - source: hosted - version: "3.6.35" - firebase_messaging: - dependency: "direct main" - description: - name: firebase_messaging - sha256: a1662cc95d9750a324ad9df349b873360af6f11414902021f130c68ec02267c4 - url: "https://pub.dev" - source: hosted - version: "14.9.4" - firebase_messaging_platform_interface: - dependency: transitive - description: - name: firebase_messaging_platform_interface - sha256: "87c4a922cb6f811cfb7a889bdbb3622702443c52a0271636cbc90d813ceac147" - url: "https://pub.dev" - source: hosted - version: "4.5.37" - firebase_messaging_web: - dependency: transitive - description: - name: firebase_messaging_web - sha256: "0d34dca01a7b103ed7f20138bffbb28eb0e61a677bf9e78a028a932e2c7322d5" - url: "https://pub.dev" - source: hosted - version: "3.8.7" - firebase_performance: - dependency: "direct main" - description: - name: firebase_performance - sha256: dbcfc300755c4bb866988de20a491f0b53e1a0d14c375a2c31aa53ca82174c5b - url: "https://pub.dev" - source: hosted - version: "0.9.4+7" - firebase_performance_platform_interface: - dependency: transitive - description: - name: firebase_performance_platform_interface - sha256: "191c9945c2ea4359cb57dc086463b2a25b0f9d8d42f66a0be4c1a7133e26ebc8" - url: "https://pub.dev" - source: hosted - version: "0.1.4+35" - firebase_performance_web: - dependency: transitive - description: - name: firebase_performance_web - sha256: "9f03a53f55697b206393366bf138e382cbd845d5021b5be6f7fc97b338da2cb5" - url: "https://pub.dev" - source: hosted - version: "0.1.6+7" - firebase_remote_config: - dependency: "direct main" - description: - name: firebase_remote_config - sha256: "653bd94b68e2c4e89eca10db90576101f1024151f39f2d4e7c64ae6a90a5f9c5" - url: "https://pub.dev" - source: hosted - version: "4.4.7" - firebase_remote_config_platform_interface: - dependency: transitive - description: - name: firebase_remote_config_platform_interface - sha256: "24a2c445b15de3af7e4582ebceb2aa9a1e3731d0202cb3e7a1e03012440fa07d" - url: "https://pub.dev" - source: hosted - version: "1.4.35" - firebase_remote_config_web: - dependency: transitive - description: - name: firebase_remote_config_web - sha256: "525aa3000fd27cd023841c802010a06515e564aab2f147aa964b35f54abbf449" - url: "https://pub.dev" - source: hosted - version: "1.6.7" - fixnum: - dependency: transitive - description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_cache_manager: - dependency: transitive - description: - name: flutter_cache_manager - sha256: "400b6592f16a4409a7f2bb929a9a7e38c72cceb8ffb99ee57bbf2cb2cecf8386" - url: "https://pub.dev" - source: hosted - version: "3.4.1" - flutter_keyboard_visibility: - dependency: transitive - description: - name: flutter_keyboard_visibility - sha256: "98664be7be0e3ffca00de50f7f6a287ab62c763fc8c762e0a21584584a3ff4f8" - url: "https://pub.dev" - source: hosted - version: "6.0.0" - flutter_keyboard_visibility_linux: - dependency: transitive - description: - name: flutter_keyboard_visibility_linux - sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" - url: "https://pub.dev" - source: hosted - version: "1.0.0" - flutter_keyboard_visibility_macos: - dependency: transitive - description: - name: flutter_keyboard_visibility_macos - sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 - url: "https://pub.dev" - source: hosted - version: "1.0.0" - flutter_keyboard_visibility_platform_interface: - dependency: transitive - description: - name: flutter_keyboard_visibility_platform_interface - sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 - url: "https://pub.dev" - source: hosted - version: "2.0.0" - flutter_keyboard_visibility_web: - dependency: transitive - description: - name: flutter_keyboard_visibility_web - sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 - url: "https://pub.dev" - source: hosted - version: "2.0.0" - flutter_keyboard_visibility_windows: - dependency: transitive - description: - name: flutter_keyboard_visibility_windows - sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 - url: "https://pub.dev" - source: hosted - version: "1.0.0" - flutter_linkify: - dependency: transitive - description: - name: flutter_linkify - sha256: "74669e06a8f358fee4512b4320c0b80e51cffc496607931de68d28f099254073" - url: "https://pub.dev" - source: hosted - version: "6.0.0" - flutter_local_notifications: - dependency: transitive - description: - name: flutter_local_notifications - sha256: "49eeef364fddb71515bc78d5a8c51435a68bccd6e4d68e25a942c5e47761ae71" - url: "https://pub.dev" - source: hosted - version: "17.2.3" - flutter_local_notifications_linux: - dependency: transitive - description: - name: flutter_local_notifications_linux - sha256: c49bd06165cad9beeb79090b18cd1eb0296f4bf4b23b84426e37dd7c027fc3af - url: "https://pub.dev" - source: hosted - version: "4.0.1" - flutter_local_notifications_platform_interface: - dependency: transitive - description: - name: flutter_local_notifications_platform_interface - sha256: "85f8d07fe708c1bdcf45037f2c0109753b26ae077e9d9e899d55971711a4ea66" - url: "https://pub.dev" - source: hosted - version: "7.2.0" - flutter_localizations: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - flutter_plugin_android_lifecycle: - dependency: transitive - description: - name: flutter_plugin_android_lifecycle - sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda" - url: "https://pub.dev" - source: hosted - version: "2.0.22" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - google_identity_services_web: - dependency: transitive - description: - name: google_identity_services_web - sha256: "5be191523702ba8d7a01ca97c17fca096822ccf246b0a9f11923a6ded06199b6" - url: "https://pub.dev" - source: hosted - version: "0.3.1+4" - google_sign_in: - dependency: transitive - description: - name: google_sign_in - sha256: "0b8787cb9c1a68ad398e8010e8c8766bfa33556d2ab97c439fb4137756d7308f" - url: "https://pub.dev" - source: hosted - version: "6.2.1" - google_sign_in_android: - dependency: transitive - description: - name: google_sign_in_android - sha256: "1ad54110a151d3ebbfe9be5a0c2b715aeabddb079e54efd84e56c49605b5474a" - url: "https://pub.dev" - source: hosted - version: "6.1.31" - google_sign_in_ios: - dependency: transitive - description: - name: google_sign_in_ios - sha256: "4898410f55440049e1ba8f15411612d9f89299d89c61cd9baf7e02d56ff81ac7" - url: "https://pub.dev" - source: hosted - version: "5.7.7" - google_sign_in_platform_interface: - dependency: transitive - description: - name: google_sign_in_platform_interface - sha256: df6c91e74b7bb07335c864434c2064007dafa5539a96adeca6e83811be583ec4 - url: "https://pub.dev" - source: hosted - version: "2.4.4" - google_sign_in_web: - dependency: transitive - description: - name: google_sign_in_web - sha256: "042805a21127a85b0dc46bba98a37926f17d2439720e8a459d27045d8ef68055" - url: "https://pub.dev" - source: hosted - version: "0.12.4+2" - http: - dependency: transitive - description: - name: http - sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 - url: "https://pub.dev" - source: hosted - version: "1.2.2" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: db3060f22889f3d9d55f6a217565486737037eec3609f7f3eca4d0c67ee0d8a0 - url: "https://pub.dev" - source: hosted - version: "4.0.1" - image: - dependency: transitive - description: - name: image - sha256: a72242c9a0ffb65d03de1b7113bc4e189686fc07c7147b8b41811d0dd0e0d9bf - url: "https://pub.dev" - source: hosted - version: "4.0.17" - image_picker: - dependency: transitive - description: - name: image_picker - sha256: "1f498d086203360cca099d20ffea2963f48c39ce91bdd8a3b6d4a045786b02c8" - url: "https://pub.dev" - source: hosted - version: "1.0.8" - image_picker_android: - dependency: transitive - description: - name: image_picker_android - sha256: "844c6da4e4f2829dffdab97816bca09d0e0977e8dcef7450864aba4e07967a58" - url: "https://pub.dev" - source: hosted - version: "0.8.9+6" - image_picker_for_web: - dependency: transitive - description: - name: image_picker_for_web - sha256: "65d94623e15372c5c51bebbcb820848d7bcb323836e12dfdba60b5d3a8b39e50" - url: "https://pub.dev" - source: hosted - version: "3.0.5" - image_picker_ios: - dependency: transitive - description: - name: image_picker_ios - sha256: "917a5cadd67d052554cfb258595e54217de53fac5b52939426e26319a02e6297" - url: "https://pub.dev" - source: hosted - version: "0.8.9+2" - image_picker_linux: - dependency: transitive - description: - name: image_picker_linux - sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" - url: "https://pub.dev" - source: hosted - version: "0.2.1+1" - image_picker_macos: - dependency: transitive - description: - name: image_picker_macos - sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" - url: "https://pub.dev" - source: hosted - version: "0.2.1+1" - image_picker_platform_interface: - dependency: transitive - description: - name: image_picker_platform_interface - sha256: "0e827c156e3a90edd3bbe7f6de048b39247b16e58173b08a835b7eb00aba239e" - url: "https://pub.dev" - source: hosted - version: "2.9.2" - image_picker_windows: - dependency: transitive - description: - name: image_picker_windows - sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" - url: "https://pub.dev" - source: hosted - version: "0.2.1+1" - in_app_review: - dependency: transitive - description: - name: in_app_review - sha256: "99869244d09adc76af16bf8fd731dd13cef58ecafd5917847589c49f378cbb30" - url: "https://pub.dev" - source: hosted - version: "2.0.9" - in_app_review_platform_interface: - dependency: transitive - description: - name: in_app_review_platform_interface - sha256: fed2c755f2125caa9ae10495a3c163aa7fab5af3585a9c62ef4a6920c5b45f10 - url: "https://pub.dev" - source: hosted - version: "2.0.5" - injector: - dependency: transitive - description: - name: injector - sha256: d692c37788872bfd4bd7c01b864b0712190a25ae5a346431ff69949d5728a2e1 - url: "https://pub.dev" - source: hosted - version: "4.0.0" - intl: - dependency: transitive - description: - name: intl - sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf - url: "https://pub.dev" - source: hosted - version: "0.19.0" - js: - dependency: transitive - description: - name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 - url: "https://pub.dev" - source: hosted - version: "0.6.7" - json_annotation: - dependency: transitive - description: - name: json_annotation - sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 - url: "https://pub.dev" - source: hosted - version: "4.8.1" - jwt_decoder: - dependency: transitive - description: - name: jwt_decoder - sha256: "54774aebf83f2923b99e6416b4ea915d47af3bde56884eb622de85feabbc559f" - url: "https://pub.dev" - source: hosted - version: "2.0.1" - leak_tracker: - dependency: transitive - description: - name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" - url: "https://pub.dev" - source: hosted - version: "10.0.5" - leak_tracker_flutter_testing: - dependency: transitive - description: - name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" - url: "https://pub.dev" - source: hosted - version: "3.0.5" - leak_tracker_testing: - dependency: transitive - description: - name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" - url: "https://pub.dev" - source: hosted - version: "3.0.1" - linkify: - dependency: transitive - description: - name: linkify - sha256: "4139ea77f4651ab9c315b577da2dd108d9aa0bd84b5d03d33323f1970c645832" - url: "https://pub.dev" - source: hosted - version: "5.0.0" - logging: - dependency: transitive - description: - name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - matcher: - dependency: transitive - description: - name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb - url: "https://pub.dev" - source: hosted - version: "0.12.16+1" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec - url: "https://pub.dev" - source: hosted - version: "0.11.1" - meta: - dependency: transitive - description: - name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 - url: "https://pub.dev" - source: hosted - version: "1.15.0" - mime: - dependency: transitive - description: - name: mime - sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" - url: "https://pub.dev" - source: hosted - version: "1.0.6" - multiple_localization: - dependency: transitive - description: - name: multiple_localization - sha256: "8b071f538bdf087a7bf13cd8b78a1a041994960c8e9f0a1aaaaf0cfb39845019" - url: "https://pub.dev" - source: hosted - version: "0.5.0" - octo_image: - dependency: transitive - description: - name: octo_image - sha256: "34faa6639a78c7e3cbe79be6f9f96535867e879748ade7d17c9b1ae7536293bd" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - package_info_plus: - dependency: transitive - description: - name: package_info_plus - sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 - url: "https://pub.dev" - source: hosted - version: "8.0.2" - package_info_plus_platform_interface: - dependency: transitive - description: - name: package_info_plus_platform_interface - sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 - url: "https://pub.dev" - source: hosted - version: "3.0.1" - path: - dependency: transitive - description: - name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" - url: "https://pub.dev" - source: hosted - version: "1.9.0" - path_parsing: - dependency: transitive - description: - name: path_parsing - sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf - url: "https://pub.dev" - source: hosted - version: "1.0.1" - path_provider: - dependency: transitive - description: - name: path_provider - sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 - url: "https://pub.dev" - source: hosted - version: "2.1.4" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" - url: "https://pub.dev" - source: hosted - version: "2.2.10" - path_provider_foundation: - dependency: transitive - description: - name: path_provider_foundation - sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 - url: "https://pub.dev" - source: hosted - version: "2.4.0" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 - url: "https://pub.dev" - source: hosted - version: "2.2.1" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 - url: "https://pub.dev" - source: hosted - version: "2.3.0" - pdf: - dependency: transitive - description: - name: pdf - sha256: "243f05342fc0bdf140eba5b069398985cdbdd3dbb1d776cf43d5ea29cc570ba6" - url: "https://pub.dev" - source: hosted - version: "3.10.8" - pdf_widget_wrapper: - dependency: transitive - description: - name: pdf_widget_wrapper - sha256: c930860d987213a3d58c7ec3b7ecf8085c3897f773e8dc23da9cae60a5d6d0f5 - url: "https://pub.dev" - source: hosted - version: "1.0.4" - petitparser: - dependency: transitive - description: - name: petitparser - sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 - url: "https://pub.dev" - source: hosted - version: "6.0.2" - photo_manager: - dependency: transitive - description: - name: photo_manager - sha256: "32a1ce1095aeaaa792a29f28c1f74613aa75109f21c2d4ab85be3ad9964230a4" - url: "https://pub.dev" - source: hosted - version: "3.5.0" - photo_view: - dependency: transitive - description: - name: photo_view - sha256: "1fc3d970a91295fbd1364296575f854c9863f225505c28c46e0a03e48960c75e" - url: "https://pub.dev" - source: hosted - version: "0.15.0" - platform: - dependency: transitive - description: - name: platform - sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" - url: "https://pub.dev" - source: hosted - version: "3.1.5" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - pointycastle: - dependency: transitive - description: - name: pointycastle - sha256: "0edfe20fdabaf4cd97e234f66a509f8dc7dc9c55ee2c226027be7be86de612c3" - url: "https://pub.dev" - source: hosted - version: "3.6.0" - printing: - dependency: transitive - description: - name: printing - sha256: cc4b256a5a89d5345488e3318897b595867f5181b8c5ed6fc63bfa5f2044aec3 - url: "https://pub.dev" - source: hosted - version: "5.13.1" - qr: - dependency: transitive - description: - name: qr - sha256: "5a1d2586170e172b8a8c8470bbbffd5eb0cd38a66c0d77155ea138d3af3a4445" - url: "https://pub.dev" - source: hosted - version: "3.0.2" - qs_dart: - dependency: transitive - description: - name: qs_dart - sha256: be73d060d29c0716ded88380ba32e87ce8105f0ba234edb3edefa0d74d47d64b - url: "https://pub.dev" - source: hosted - version: "1.2.4" - recursive_regex: - dependency: transitive - description: - name: recursive_regex - sha256: f7252e3d3dfd1665e594d9fe035eca6bc54139b1f2fee38256fa427ea41adc60 - url: "https://pub.dev" - source: hosted - version: "1.0.0" - rxdart: - dependency: transitive - description: - name: rxdart - sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962" - url: "https://pub.dev" - source: hosted - version: "0.28.0" - share_plus: - dependency: transitive - description: - name: share_plus - sha256: "59dfd53f497340a0c3a81909b220cfdb9b8973a91055c4e5ab9b9b9ad7c513c0" - url: "https://pub.dev" - source: hosted - version: "10.0.0" - share_plus_platform_interface: - dependency: transitive - description: - name: share_plus_platform_interface - sha256: "6ababf341050edff57da8b6990f11f4e99eaba837865e2e6defe16d039619db5" - url: "https://pub.dev" - source: hosted - version: "5.0.0" - shared_preferences: - dependency: transitive - description: - name: shared_preferences - sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180 - url: "https://pub.dev" - source: hosted - version: "2.2.3" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - sha256: "3d4571b3c5eb58ce52a419d86e655493d0bc3020672da79f72fa0c16ca3a8ec1" - url: "https://pub.dev" - source: hosted - version: "2.2.4" - shared_preferences_foundation: - dependency: transitive - description: - name: shared_preferences_foundation - sha256: "0a8a893bf4fd1152f93fec03a415d11c27c74454d96e2318a7ac38dd18683ab7" - url: "https://pub.dev" - source: hosted - version: "2.4.0" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - sha256: d4ec5fc9ebb2f2e056c617112aa75dcf92fc2e4faaf2ae999caa297473f75d8a - url: "https://pub.dev" - source: hosted - version: "2.3.1" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a" - url: "https://pub.dev" - source: hosted - version: "2.3.0" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - sign_in_with_apple: - dependency: transitive - description: - name: sign_in_with_apple - sha256: "602f1374c9c4c33889c969b53ebf7cc8417c22cc7e25ea771581330173bc6603" - url: "https://pub.dev" - source: hosted - version: "6.1.3" - sign_in_with_apple_platform_interface: - dependency: transitive - description: - name: sign_in_with_apple_platform_interface - sha256: c2ef2ce6273fce0c61acd7e9ff5be7181e33d7aa2b66508b39418b786cca2119 - url: "https://pub.dev" - source: hosted - version: "1.1.0" - sign_in_with_apple_web: - dependency: transitive - description: - name: sign_in_with_apple_web - sha256: c009e9beeb6c376e86aaa154fcc8b4e075d4bad90c56286b9668a51cdb6129ea - url: "https://pub.dev" - source: hosted - version: "2.1.0" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://pub.dev" - source: hosted - version: "1.10.0" - sprintf: - dependency: transitive - description: - name: sprintf - sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" - url: "https://pub.dev" - source: hosted - version: "7.0.0" - sqflite: - dependency: transitive - description: - name: sqflite - sha256: ff5a2436ef8ebdfda748fbfe957f9981524cb5ff11e7bafa8c42771840e8a788 - url: "https://pub.dev" - source: hosted - version: "2.3.3+2" - sqflite_common: - dependency: transitive - description: - name: sqflite_common - sha256: "2d8e607db72e9cb7748c9c6e739e2c9618320a5517de693d5a24609c4671b1a4" - url: "https://pub.dev" - source: hosted - version: "2.5.4+4" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" - url: "https://pub.dev" - source: hosted - version: "1.11.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://pub.dev" - source: hosted - version: "2.1.2" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - synchronized: - dependency: transitive - description: - name: synchronized - sha256: "69fe30f3a8b04a0be0c15ae6490fc859a78ef4c43ae2dd5e8a623d45bfcf9225" - url: "https://pub.dev" - source: hosted - version: "3.3.0+3" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" - url: "https://pub.dev" - source: hosted - version: "0.7.2" - timezone: - dependency: transitive - description: - name: timezone - sha256: "2236ec079a174ce07434e89fcd3fcda430025eb7692244139a9cf54fdcf1fc7d" - url: "https://pub.dev" - source: hosted - version: "0.9.4" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" - url: "https://pub.dev" - source: hosted - version: "1.3.1" - url_launcher: - dependency: "direct main" - description: - name: url_launcher - sha256: "6ce1e04375be4eed30548f10a315826fd933c1e493206eab82eed01f438c8d2e" - url: "https://pub.dev" - source: hosted - version: "6.2.6" - url_launcher_android: - dependency: transitive - description: - name: url_launcher_android - sha256: "507dc655b1d9cb5ebc756032eb785f114e415f91557b73bf60b7e201dfedeb2f" - url: "https://pub.dev" - source: hosted - version: "6.2.2" - url_launcher_ios: - dependency: transitive - description: - name: url_launcher_ios - sha256: e43b677296fadce447e987a2f519dcf5f6d1e527dc35d01ffab4fff5b8a7063e - url: "https://pub.dev" - source: hosted - version: "6.3.1" - url_launcher_linux: - dependency: transitive - description: - name: url_launcher_linux - sha256: e2b9622b4007f97f504cd64c0128309dfb978ae66adbe944125ed9e1750f06af - url: "https://pub.dev" - source: hosted - version: "3.2.0" - url_launcher_macos: - dependency: transitive - description: - name: url_launcher_macos - sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" - url: "https://pub.dev" - source: hosted - version: "3.2.0" - url_launcher_platform_interface: - dependency: transitive - description: - name: url_launcher_platform_interface - sha256: "4aca1e060978e19b2998ee28503f40b5ba6226819c2b5e3e4d1821e8ccd92198" - url: "https://pub.dev" - source: hosted - version: "2.3.0" - url_launcher_web: - dependency: transitive - description: - name: url_launcher_web - sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" - url: "https://pub.dev" - source: hosted - version: "2.3.3" - url_launcher_windows: - dependency: transitive - description: - name: url_launcher_windows - sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" - url: "https://pub.dev" - source: hosted - version: "3.1.2" - uuid: - dependency: transitive - description: - name: uuid - sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff - url: "https://pub.dev" - source: hosted - version: "4.5.1" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" - url: "https://pub.dev" - source: hosted - version: "14.2.5" - weak_map: - dependency: transitive - description: - name: weak_map - sha256: "95ca338f0cdf5f0022cc283dfa4d97f6f6b03752f67eca85ebe6d7a679ffe3ed" - url: "https://pub.dev" - source: hosted - version: "3.0.1" - web: - dependency: transitive - description: - name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" - url: "https://pub.dev" - source: hosted - version: "0.5.1" - win32: - dependency: transitive - description: - name: win32 - sha256: "4d45dc9069dba4619dc0ebd93c7cec5e66d8482cb625a370ac806dcc8165f2ec" - url: "https://pub.dev" - source: hosted - version: "5.5.5" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - xml: - dependency: transitive - description: - name: xml - sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 - url: "https://pub.dev" - source: hosted - version: "6.5.0" -sdks: - dart: ">=3.5.0 <4.0.0" - flutter: ">=3.22.0" From be152bac1b94f8e80baba9c098a938c44246b810 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Tue, 8 Oct 2024 13:45:50 +0800 Subject: [PATCH 12/41] feat: migrate `util` `l10n` to new `ap_common_flutter_core` --- analysis_options.yaml | 4 +- melos_ap_common.iml | 6 + .../lib/api/announcement_helper.dart | 4 +- packages/ap_common/lib/api/github_helper.dart | 2 +- packages/ap_common/lib/api/imgur_helper.dart | 4 +- .../ap_common/lib/pages/about_us_page.dart | 7 +- .../pages/announcement/black_list_page.dart | 3 +- .../lib/pages/announcement/edit_page.dart | 27 +++-- .../lib/pages/announcement/home_page.dart | 23 ++-- .../lib/pages/announcement_content_page.dart | 3 +- .../lib/scaffold/course_scaffold.dart | 17 ++- .../lib/scaffold/home_page_scaffold.dart | 3 +- .../lib/scaffold/score_scaffold.dart | 3 +- .../lib/scaffold/user_info_scaffold.dart | 2 +- .../ap_common/lib/utils/ap_media_util.dart | 89 ++++++++++++++ packages/ap_common/lib/utils/ap_ui_util.dart | 22 ++++ packages/ap_common/lib/utils/ap_utils.dart | 109 +----------------- .../lib/utils/app_tracking_utils.dart | 2 +- .../lib/utils/cloud_message_utils.dart | 8 -- .../ap_common/lib/utils/dialog_utils.dart | 2 +- .../lib/utils/notification_utils.dart | 2 +- .../lib/utils/platform_calendar_util.dart | 32 ++++- packages/ap_common/lib/utils/preferences.dart | 3 +- .../lib/views/notification_list_view.dart | 3 +- packages/ap_common/lib/views/pdf_view.dart | 3 +- .../ap_common/lib/views/phone_list_view.dart | 3 +- packages/ap_common/lib/widgets/ap_drawer.dart | 3 +- .../lib/widgets/ap_network_image.dart | 2 +- .../ap_common/lib/widgets/dialog_option.dart | 2 +- .../ap_common/lib/widgets/item_picker.dart | 2 +- .../lib/widgets/setting_page_widgets.dart | 13 +-- .../ap_common/lib/widgets/yes_no_dialog.dart | 2 +- packages/ap_common/pubspec.lock | 15 ++- packages/ap_common/pubspec.yaml | 13 +-- .../src/utilities/cloud_message_utils.dart | 8 ++ packages/ap_common_flutter_core/.gitignore | 29 +++++ packages/ap_common_flutter_core/.metadata | 10 ++ packages/ap_common_flutter_core/CHANGELOG.md | 3 + packages/ap_common_flutter_core/LICENSE | 9 ++ packages/ap_common_flutter_core/README.md | 29 +++++ .../lib/ap_common_flutter_core.dart | 6 + .../lib/src}/callback/general_callback.dart | 24 ++-- .../lib/src/l10n}/ap_localizations.dart | 10 +- .../lib/src}/l10n/intl/messages_all.dart | 0 .../lib/src}/l10n/intl/messages_en.dart | 0 .../lib/src}/l10n/intl/messages_zh_TW.dart | 0 .../lib/src}/l10n/intl_en.arb | 0 .../lib/src}/l10n/intl_zh_TW.arb | 0 .../lib/src}/l10n/l10n.dart | 0 .../lib/src/ui}/ap_icon.dart | 0 .../lib/src/utilities/media_util.dart | 20 ++++ .../src/utilities/platform_calendar_util.dart | 17 +++ .../lib/src/utilities/ui_util.dart | 12 ++ packages/ap_common_flutter_core/pubspec.yaml | 33 ++++++ 54 files changed, 421 insertions(+), 227 deletions(-) create mode 100644 packages/ap_common/lib/utils/ap_media_util.dart create mode 100644 packages/ap_common/lib/utils/ap_ui_util.dart delete mode 100644 packages/ap_common/lib/utils/cloud_message_utils.dart create mode 100644 packages/ap_common_core/lib/src/utilities/cloud_message_utils.dart create mode 100644 packages/ap_common_flutter_core/.gitignore create mode 100644 packages/ap_common_flutter_core/.metadata create mode 100644 packages/ap_common_flutter_core/CHANGELOG.md create mode 100644 packages/ap_common_flutter_core/LICENSE create mode 100644 packages/ap_common_flutter_core/README.md create mode 100644 packages/ap_common_flutter_core/lib/ap_common_flutter_core.dart rename packages/{ap_common/lib => ap_common_flutter_core/lib/src}/callback/general_callback.dart (52%) rename packages/{ap_common/lib/utils => ap_common_flutter_core/lib/src/l10n}/ap_localizations.dart (90%) rename packages/{ap_common/lib => ap_common_flutter_core/lib/src}/l10n/intl/messages_all.dart (100%) rename packages/{ap_common/lib => ap_common_flutter_core/lib/src}/l10n/intl/messages_en.dart (100%) rename packages/{ap_common/lib => ap_common_flutter_core/lib/src}/l10n/intl/messages_zh_TW.dart (100%) rename packages/{ap_common/lib => ap_common_flutter_core/lib/src}/l10n/intl_en.arb (100%) rename packages/{ap_common/lib => ap_common_flutter_core/lib/src}/l10n/intl_zh_TW.arb (100%) rename packages/{ap_common/lib => ap_common_flutter_core/lib/src}/l10n/l10n.dart (100%) rename packages/{ap_common/lib/resources => ap_common_flutter_core/lib/src/ui}/ap_icon.dart (100%) create mode 100644 packages/ap_common_flutter_core/lib/src/utilities/media_util.dart create mode 100644 packages/ap_common_flutter_core/lib/src/utilities/platform_calendar_util.dart create mode 100644 packages/ap_common_flutter_core/lib/src/utilities/ui_util.dart create mode 100644 packages/ap_common_flutter_core/pubspec.yaml diff --git a/analysis_options.yaml b/analysis_options.yaml index 5ff32c2b..28966bb8 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -3,8 +3,8 @@ include: package:lint/strict.yaml analyzer: exclude: # l10n generated code - - packages/ap_common/lib/l10n/intl/*.dart - - packages/ap_common/lib/l10n/l10n.dart + - packages/ap_common_flutter_core/lib/src/l10n/intl/*.dart + - packages/ap_common_flutter_core/lib/src/l10n/l10n.dart - apps/example/lib/l10n/intl/*.dart - apps/example/lib/l10n/l10n.dart # example diff --git a/melos_ap_common.iml b/melos_ap_common.iml index 9e536a0d..1b432d6c 100644 --- a/melos_ap_common.iml +++ b/melos_ap_common.iml @@ -1216,6 +1216,12 @@ + + + + + + diff --git a/packages/ap_common/lib/api/announcement_helper.dart b/packages/ap_common/lib/api/announcement_helper.dart index 17f1f9b8..395ba015 100644 --- a/packages/ap_common/lib/api/announcement_helper.dart +++ b/packages/ap_common/lib/api/announcement_helper.dart @@ -2,11 +2,9 @@ import 'dart:async'; import 'dart:convert'; import 'dart:ui' show Locale; -import 'package:ap_common/callback/general_callback.dart'; -import 'package:ap_common/l10n/l10n.dart'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; -export 'package:ap_common/callback/general_callback.dart'; export 'package:ap_common_core/ap_common_core.dart'; enum AnnouncementLoginType { diff --git a/packages/ap_common/lib/api/github_helper.dart b/packages/ap_common/lib/api/github_helper.dart index f4f243e1..de4ef870 100644 --- a/packages/ap_common/lib/api/github_helper.dart +++ b/packages/ap_common/lib/api/github_helper.dart @@ -1,7 +1,7 @@ import 'dart:convert'; -import 'package:ap_common/callback/general_callback.dart'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:cookie_jar/cookie_jar.dart'; import 'package:dio_cookie_manager/dio_cookie_manager.dart'; diff --git a/packages/ap_common/lib/api/imgur_helper.dart b/packages/ap_common/lib/api/imgur_helper.dart index 80db0cd0..e2a8cdf9 100644 --- a/packages/ap_common/lib/api/imgur_helper.dart +++ b/packages/ap_common/lib/api/imgur_helper.dart @@ -1,13 +1,11 @@ import 'dart:async'; import 'dart:typed_data'; -import 'package:ap_common/callback/general_callback.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:path/path.dart' as p; -export 'package:ap_common/callback/general_callback.dart'; export 'package:ap_common_core/ap_common_core.dart'; class ImgurHelper { diff --git a/packages/ap_common/lib/pages/about_us_page.dart b/packages/ap_common/lib/pages/about_us_page.dart index 5b70bd8f..376f87ae 100644 --- a/packages/ap_common/lib/pages/about_us_page.dart +++ b/packages/ap_common/lib/pages/about_us_page.dart @@ -1,9 +1,8 @@ -import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common/resources/resources.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/material.dart'; import 'package:flutter_linkify/flutter_linkify.dart'; @@ -208,7 +207,7 @@ class AboutUsPageState extends State { .catchError( (dynamic onError) { if (!context.mounted) return; - ApUtils.showToast( + UiUtil.instance.showToast( context, app.platformError, ); @@ -226,7 +225,7 @@ class AboutUsPageState extends State { .catchError( (dynamic onError) { if (!context.mounted) return; - ApUtils.showToast( + UiUtil.instance.showToast( context, app.platformError, ); diff --git a/packages/ap_common/lib/pages/announcement/black_list_page.dart b/packages/ap_common/lib/pages/announcement/black_list_page.dart index 3d5f59c0..5aa28376 100644 --- a/packages/ap_common/lib/pages/announcement/black_list_page.dart +++ b/packages/ap_common/lib/pages/announcement/black_list_page.dart @@ -1,9 +1,8 @@ import 'package:ap_common/api/announcement_helper.dart'; -import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common/widgets/hint_content.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/material.dart'; enum _State { loading, done, error } diff --git a/packages/ap_common/lib/pages/announcement/edit_page.dart b/packages/ap_common/lib/pages/announcement/edit_page.dart index f784f667..87183ccb 100644 --- a/packages/ap_common/lib/pages/announcement/edit_page.dart +++ b/packages/ap_common/lib/pages/announcement/edit_page.dart @@ -1,12 +1,11 @@ import 'package:ap_common/api/announcement_helper.dart'; import 'package:ap_common/api/imgur_helper.dart'; import 'package:ap_common/pages/announcement/home_page.dart' show TagColors; -import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common/widgets/ap_network_image.dart'; import 'package:ap_common/widgets/default_dialog.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/material.dart'; import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart'; @@ -199,7 +198,8 @@ class _AnnouncementEditPageState extends State { actionText: ApLocalizations.of(context).confirm, actionFunction: () { if (_newTag.text.isEmpty) { - ApUtils.showToast(context, app.doNotEmpty); + UiUtil.instance + .showToast(context, app.doNotEmpty); } else { final String newTag = _newTag.text; final int index = tags.indexOf(newTag); @@ -208,7 +208,8 @@ class _AnnouncementEditPageState extends State { Navigator.of(context, rootNavigator: true) .pop(); } else { - ApUtils.showToast(context, app.tagRepeatHint); + UiUtil.instance + .showToast(context, app.tagRepeatHint); } } }, @@ -289,7 +290,7 @@ class _AnnouncementEditPageState extends State { ), ), onPressed: () async { - final XFile? image = await ApUtils.pickImage(); + final XFile? image = await MediaUtil.instance.pickImage(); if (image != null) { setState( () => imgurUploadState = _ImgurUploadState.uploading, @@ -298,7 +299,10 @@ class _AnnouncementEditPageState extends State { file: image, callback: GeneralCallback( onFailure: (DioException dioException) { - ApUtils.showToast(context, dioException.message); + if (dioException.message + case final String message?) { + UiUtil.instance.showToast(context, message); + } setState( () => imgurUploadState = _imgUrl.text.isEmpty ? _ImgurUploadState.noFile @@ -306,7 +310,8 @@ class _AnnouncementEditPageState extends State { ); }, onError: (GeneralResponse generalResponse) { - ApUtils.showToast(context, generalResponse.message); + UiUtil.instance + .showToast(context, generalResponse.message); setState( () => imgurUploadState = _imgUrl.text.isEmpty ? _ImgurUploadState.noFile @@ -655,13 +660,13 @@ class _AnnouncementEditPageState extends State { (_) async { switch (widget.mode) { case Mode.add: - ApUtils.showToast(context, app.addSuccess); + UiUtil.instance.showToast(context, app.addSuccess); case Mode.edit: - ApUtils.showToast(context, app.updateSuccess); + UiUtil.instance.showToast(context, app.updateSuccess); case Mode.application: - ApUtils.showToast(context, app.applicationSubmitSuccess); + UiUtil.instance.showToast(context, app.applicationSubmitSuccess); case Mode.editApplication: - ApUtils.showToast(context, app.updateSuccess); + UiUtil.instance.showToast(context, app.updateSuccess); if (isApproval != null) { if (isApproval) { await AnnouncementHelper.instance.approveApplication( diff --git a/packages/ap_common/lib/pages/announcement/home_page.dart b/packages/ap_common/lib/pages/announcement/home_page.dart index c79bb8cf..6066c837 100644 --- a/packages/ap_common/lib/pages/announcement/home_page.dart +++ b/packages/ap_common/lib/pages/announcement/home_page.dart @@ -3,14 +3,13 @@ import 'dart:io'; import 'package:ap_common/api/announcement_helper.dart'; import 'package:ap_common/pages/announcement/black_list_page.dart'; import 'package:ap_common/pages/announcement/edit_page.dart'; -import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common/scaffold/login_scaffold.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common/widgets/hint_content.dart'; import 'package:ap_common/widgets/progress_dialog.dart'; import 'package:ap_common/widgets/yes_no_dialog.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; @@ -481,7 +480,7 @@ class _AnnouncementHomePageState extends State { callback: GeneralCallback.simple( context, (_) { - ApUtils.showToast( + UiUtil.instance.showToast( context, ap.updateSuccess, ); @@ -516,7 +515,7 @@ class _AnnouncementHomePageState extends State { callback: GeneralCallback.simple( context, (_) { - ApUtils.showToast( + UiUtil.instance.showToast( context, ap.updateSuccess, ); @@ -535,7 +534,7 @@ class _AnnouncementHomePageState extends State { callback: GeneralCallback.simple( context, (_) { - ApUtils.showToast( + UiUtil.instance.showToast( context, ap.updateSuccess, ); @@ -724,7 +723,7 @@ class _AnnouncementHomePageState extends State { Future _login(AnnouncementLoginType loginType) async { if (loginType == AnnouncementLoginType.normal && (_username.text.isEmpty || _password.text.isEmpty)) { - ApUtils.showToast(context, ap.doNotEmpty); + UiUtil.instance.showToast(context, ap.doNotEmpty); } else { final bool isNotLogin = !PreferenceUtil.instance .getBool(ApConstants.announcementIsLogin, false); @@ -752,11 +751,13 @@ class _AnnouncementHomePageState extends State { GeneralCallback( onError: (GeneralResponse response) { if (isNotLogin) Navigator.of(context, rootNavigator: true).pop(); - ApUtils.showToast(context, response.message); + UiUtil.instance.showToast(context, response.message); }, onFailure: (DioException dioException) async { if (isNotLogin) Navigator.of(context, rootNavigator: true).pop(); - ApUtils.showToast(context, dioException.i18nMessage); + if (dioException.i18nMessage case final String message?) { + UiUtil.instance.showToast(context, message); + } if (dioException.type == DioExceptionType.badResponse && dioException.response!.statusCode == 403) { if (loginType == AnnouncementLoginType.google) { @@ -780,7 +781,7 @@ class _AnnouncementHomePageState extends State { idToken!, ); } - ApUtils.showToast(context, ap.loginSuccess); + UiUtil.instance.showToast(context, ap.loginSuccess); PreferenceUtil.instance .setBool(ApConstants.announcementIsLogin, true); PreferenceUtil.instance.setInt( @@ -823,7 +824,7 @@ class _AnnouncementHomePageState extends State { } } catch (e, s) { if (!mounted) return; - ApUtils.showToast(context, ap.thirdPartyLoginFail); + UiUtil.instance.showToast(context, ap.thirdPartyLoginFail); CrashlyticsUtil.instance?.recordError(e, s); if (isNotLogin) Navigator.of(context, rootNavigator: true).pop(); if (CrashlyticsUtil.instance != null) rethrow; @@ -841,7 +842,7 @@ class _AnnouncementHomePageState extends State { .appleLogin(idToken: idToken!, callback: callback); } catch (e, s) { if (!mounted) return; - ApUtils.showToast(context, ap.thirdPartyLoginFail); + UiUtil.instance.showToast(context, ap.thirdPartyLoginFail); if (isNotLogin) Navigator.of(context, rootNavigator: true).pop(); CrashlyticsUtil.instance?.recordError(e, s); } diff --git a/packages/ap_common/lib/pages/announcement_content_page.dart b/packages/ap_common/lib/pages/announcement_content_page.dart index 22ecb2d8..2ae4af37 100644 --- a/packages/ap_common/lib/pages/announcement_content_page.dart +++ b/packages/ap_common/lib/pages/announcement_content_page.dart @@ -1,10 +1,9 @@ -import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common/widgets/ap_network_image.dart'; import 'package:ap_common/widgets/hint_content.dart'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:flutter_linkify/flutter_linkify.dart'; diff --git a/packages/ap_common/lib/scaffold/course_scaffold.dart b/packages/ap_common/lib/scaffold/course_scaffold.dart index 80f2fd89..3ca3e133 100644 --- a/packages/ap_common/lib/scaffold/course_scaffold.dart +++ b/packages/ap_common/lib/scaffold/course_scaffold.dart @@ -1,12 +1,9 @@ import 'dart:io'; import 'dart:ui' as ui; -import 'package:add_2_calendar/add_2_calendar.dart'; import 'package:ap_common/resources/ap_colors.dart'; -import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common/resources/resources.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common/utils/notification_utils.dart'; import 'package:ap_common/widgets/default_dialog.dart'; @@ -14,6 +11,7 @@ import 'package:ap_common/widgets/hint_content.dart'; import 'package:ap_common/widgets/item_picker.dart'; import 'package:ap_common/widgets/option_dialog.dart'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:auto_size_text_pk/auto_size_text_pk.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; @@ -429,7 +427,7 @@ class CourseScaffoldState extends State { _repaintBoundaryGlobalKey.currentContext!.findRenderObject() as RenderRepaintBoundary?; if (boundary == null) { - ApUtils.showToast(context, app.unknownError); + UiUtil.instance.showToast(context, app.unknownError); return; } final ui.Image image = await boundary.toImage(pixelRatio: 3.0); @@ -439,7 +437,7 @@ class CourseScaffoldState extends State { final String formattedDate = DateFormat('yyyyMMdd_hhmmss').format(now); if (byteData != null) { if (!mounted) return; - await ApUtils.saveImage( + await MediaUtil.instance.saveImage( context, byteData: byteData, fileName: 'course_table_$formattedDate', @@ -456,7 +454,7 @@ class CourseScaffoldState extends State { AnalyticsUtil.instance?.logEvent('export_course_table_image_success'); } else { if (!mounted) return; - ApUtils.showToast(context, app.unknownError); + UiUtil.instance.showToast(context, app.unknownError); } } @@ -772,14 +770,13 @@ class _CourseContentState extends State { format.parse(widget.timeCode.startTime); final DateTime endTime = format.parse(widget.timeCode.endTime); - final Event event = Event( + PlatformCalendarUtil.instance.addToApp( title: widget.course.title, location: widget.course.location?.toString() ?? '', startDate: startTime.weekTime(widget.weekday), endDate: endTime.weekTime(widget.weekday), timeZone: 'GMT+8', ); - Add2Calendar.addEvent2Cal(event); AnalyticsUtil.instance ?.logEvent('course_export_to_calendar'); }, @@ -828,7 +825,7 @@ class _CourseContentState extends State { widget.notifyData!.lastId++; widget.notifyData!.data.add(courseNotify); if (!context.mounted) return; - ApUtils.showToast( + UiUtil.instance.showToast( context, ApLocalizations.of(context).courseNotifyHint, ); @@ -843,7 +840,7 @@ class _CourseContentState extends State { return data.id == courseNotify!.id; }); if (!context.mounted) return; - ApUtils.showToast( + UiUtil.instance.showToast( context, ApLocalizations.of(context).cancelNotifySuccess, ); diff --git a/packages/ap_common/lib/scaffold/home_page_scaffold.dart b/packages/ap_common/lib/scaffold/home_page_scaffold.dart index 1ec56329..58dae05f 100644 --- a/packages/ap_common/lib/scaffold/home_page_scaffold.dart +++ b/packages/ap_common/lib/scaffold/home_page_scaffold.dart @@ -1,13 +1,12 @@ import 'dart:async'; import 'dart:io'; -import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/widgets/ap_network_image.dart'; import 'package:ap_common/widgets/hint_content.dart'; import 'package:ap_common/widgets/yes_no_dialog.dart'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; diff --git a/packages/ap_common/lib/scaffold/score_scaffold.dart b/packages/ap_common/lib/scaffold/score_scaffold.dart index 79409dde..ef554f2a 100644 --- a/packages/ap_common/lib/scaffold/score_scaffold.dart +++ b/packages/ap_common/lib/scaffold/score_scaffold.dart @@ -1,10 +1,9 @@ -import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/widgets/hint_content.dart'; import 'package:ap_common/widgets/item_picker.dart'; import 'package:ap_common/widgets/option_dialog.dart'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/material.dart'; enum ScoreState { loading, finish, error, empty, offlineEmpty, custom } diff --git a/packages/ap_common/lib/scaffold/user_info_scaffold.dart b/packages/ap_common/lib/scaffold/user_info_scaffold.dart index 9041551b..9bdfcb9d 100644 --- a/packages/ap_common/lib/scaffold/user_info_scaffold.dart +++ b/packages/ap_common/lib/scaffold/user_info_scaffold.dart @@ -1,7 +1,7 @@ import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common/resources/resources.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:barcode_widget/barcode_widget.dart'; import 'package:flutter/material.dart'; diff --git a/packages/ap_common/lib/utils/ap_media_util.dart b/packages/ap_common/lib/utils/ap_media_util.dart new file mode 100644 index 00000000..4cbec148 --- /dev/null +++ b/packages/ap_common/lib/utils/ap_media_util.dart @@ -0,0 +1,89 @@ +import 'dart:io'; + +import 'package:ap_common/api/announcement_helper.dart'; +import 'package:ap_common/utils/ap_utils.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:file_saver/file_saver.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/widgets.dart'; +import 'package:path/path.dart' as path; +import 'package:photo_manager/photo_manager.dart'; + +class ApMediaUtil extends MediaUtil { + @override + Future pickImage() { + final ImagePicker imagePicker = ImagePicker(); + return imagePicker.pickImage( + source: ImageSource.gallery, + ); + } + + @override + Future saveImage( + BuildContext context, { + required ByteData byteData, + required String fileName, + required String successMessage, + GeneralResponseCallback? onSuccess, + GeneralResponseCallback? onError, + }) async { + final ApLocalizations ap = ApLocalizations.of(context); + try { + PermissionState hasGrantPermission = PermissionState.notDetermined; + if (!kIsWeb && (Platform.isAndroid || Platform.isIOS)) { + hasGrantPermission = await PhotoManager.requestPermissionExtend(); + } else { + hasGrantPermission = PermissionState.authorized; + } + if (hasGrantPermission == PermissionState.authorized || + hasGrantPermission == PermissionState.limited) { + final Uint8List pngBytes = byteData.buffer.asUint8List(); + bool success = true; + String filePath = '$fileName.png'; + if (!kIsWeb && (Platform.isAndroid || Platform.isIOS)) { + final String tempPath = path.join( + (await getApplicationDocumentsDirectory()).path, + filePath, + ); + final File file = await File(tempPath).writeAsBytes(pngBytes); + final AssetEntity? imageEntity = + await PhotoManager.editor.saveImageWithPath( + file.path, + title: fileName, + ); + file.delete(); + if (kDebugMode) debugPrint(imageEntity?.title); + success = imageEntity != null; + } else { + filePath = await FileSaver.instance.saveFile( + name: '$fileName.png', + bytes: pngBytes, + ); + } + onSuccess?.call( + success + ? GeneralResponse( + statusCode: 200, + message: '$successMessage\n$filePath', + ) + : GeneralResponse.unknownError(), + ); + } else { + onSuccess?.call( + GeneralResponse( + statusCode: 401, + message: ap.grandPermissionFail, + ), + ); + } + } catch (e, s) { + if (!context.mounted) return; + UiUtil.instance.showToast(context, ap.unknownError); + if (CrashlyticsUtil.instance == null) { + rethrow; + } else { + CrashlyticsUtil.instance?.recordError(e, s); + } + } + } +} diff --git a/packages/ap_common/lib/utils/ap_ui_util.dart b/packages/ap_common/lib/utils/ap_ui_util.dart new file mode 100644 index 00000000..9448ce32 --- /dev/null +++ b/packages/ap_common/lib/utils/ap_ui_util.dart @@ -0,0 +1,22 @@ +import 'package:ap_common/resources/ap_theme.dart'; +import 'package:ap_common/utils/toast.dart'; +import 'package:flutter/material.dart'; + +class ApUiUtil { + void showToast( + BuildContext context, + String? message, { + int? gravity, + }) { + Toast.show( + message, + context, + duration: Toast.lengthLong, + gravity: gravity ?? Toast.bottom, + textStyle: TextStyle( + color: ApTheme.of(context).toastText, + ), + backgroundColor: ApTheme.of(context).toastBackground, + ); + } +} diff --git a/packages/ap_common/lib/utils/ap_utils.dart b/packages/ap_common/lib/utils/ap_utils.dart index 70e75f15..b27cfb5a 100644 --- a/packages/ap_common/lib/utils/ap_utils.dart +++ b/packages/ap_common/lib/utils/ap_utils.dart @@ -1,20 +1,12 @@ import 'dart:io'; -import 'package:ap_common/callback/general_callback.dart'; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; -import 'package:ap_common/utils/toast.dart'; import 'package:ap_common/widgets/yes_no_dialog.dart'; -import 'package:ap_common_core/ap_common_core.dart'; -import 'package:file_saver/file_saver.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:image_picker/image_picker.dart'; import 'package:in_app_review/in_app_review.dart'; import 'package:package_info_plus/package_info_plus.dart'; -import 'package:path/path.dart' as path; -import 'package:path_provider/path_provider.dart'; -import 'package:photo_manager/photo_manager.dart'; import 'package:share_plus/share_plus.dart'; import 'package:url_launcher/url_launcher.dart' as url_launcher; @@ -29,23 +21,6 @@ class ApUtils { static bool get isSupportCacheNetworkImage => kIsWeb || Platform.isAndroid || Platform.isIOS || Platform.isMacOS; - static void showToast( - BuildContext context, - String? message, { - int? gravity, - }) { - Toast.show( - message, - context, - duration: Toast.lengthLong, - gravity: gravity ?? Toast.bottom, - textStyle: TextStyle( - color: ApTheme.of(context).toastText, - ), - backgroundColor: ApTheme.of(context).toastBackground, - ); - } - static void pushCupertinoStyle( BuildContext context, Widget page, @@ -102,7 +77,7 @@ class ApUtils { ApUtils.launchUrl(fansPageUrl).catchError( (dynamic onError) { if (!context.mounted) return; - ApUtils.showToast( + UiUtil.instance.showToast( context, ApLocalizations.of(context).platformError, ); @@ -216,84 +191,4 @@ class ApUtils { launchUrl(defaultUrl); } } - - static Future pickImage({ - ImageSource? imageSource, - CameraDevice? preferredCameraDevice, - List? extensions, - }) async { - final ImagePicker imagePicker = ImagePicker(); - return imagePicker.pickImage( - source: imageSource ?? ImageSource.gallery, - preferredCameraDevice: preferredCameraDevice ?? CameraDevice.rear, - ); - } - - static Future saveImage( - BuildContext context, { - required ByteData byteData, - required String fileName, - required String successMessage, - GeneralResponseCallback? onSuccess, - GeneralResponseCallback? onError, - }) async { - final ApLocalizations ap = ApLocalizations.of(context); - try { - PermissionState hasGrantPermission = PermissionState.notDetermined; - if (!kIsWeb && (Platform.isAndroid || Platform.isIOS)) { - hasGrantPermission = await PhotoManager.requestPermissionExtend(); - } else { - hasGrantPermission = PermissionState.authorized; - } - if (hasGrantPermission == PermissionState.authorized || - hasGrantPermission == PermissionState.limited) { - final Uint8List pngBytes = byteData.buffer.asUint8List(); - bool success = true; - String filePath = '$fileName.png'; - if (!kIsWeb && (Platform.isAndroid || Platform.isIOS)) { - final String tempPath = path.join( - (await getApplicationDocumentsDirectory()).path, - filePath, - ); - final File file = await File(tempPath).writeAsBytes(pngBytes); - final AssetEntity? imageEntity = - await PhotoManager.editor.saveImageWithPath( - file.path, - title: fileName, - ); - file.delete(); - if (kDebugMode) debugPrint(imageEntity?.title); - success = imageEntity != null; - } else { - filePath = await FileSaver.instance.saveFile( - name: '$fileName.png', - bytes: pngBytes, - ); - } - onSuccess?.call( - success - ? GeneralResponse( - statusCode: 200, - message: '$successMessage\n$filePath', - ) - : GeneralResponse.unknownError(), - ); - } else { - onSuccess?.call( - GeneralResponse( - statusCode: 401, - message: ap.grandPermissionFail, - ), - ); - } - } catch (e, s) { - if (!context.mounted) return; - ApUtils.showToast(context, ap.unknownError); - if (CrashlyticsUtil.instance == null) { - rethrow; - } else { - CrashlyticsUtil.instance?.recordError(e, s); - } - } - } } diff --git a/packages/ap_common/lib/utils/app_tracking_utils.dart b/packages/ap_common/lib/utils/app_tracking_utils.dart index 42fb712d..3b9bba21 100644 --- a/packages/ap_common/lib/utils/app_tracking_utils.dart +++ b/packages/ap_common/lib/utils/app_tracking_utils.dart @@ -1,8 +1,8 @@ import 'dart:io'; -import 'package:ap_common/l10n/l10n.dart'; import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common/widgets/default_dialog.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:app_tracking_transparency/app_tracking_transparency.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; diff --git a/packages/ap_common/lib/utils/cloud_message_utils.dart b/packages/ap_common/lib/utils/cloud_message_utils.dart deleted file mode 100644 index 55771b2b..00000000 --- a/packages/ap_common/lib/utils/cloud_message_utils.dart +++ /dev/null @@ -1,8 +0,0 @@ -class CloudMessageUtils { - static CloudMessageUtils? _instance; - - // ignore: prefer_constructors_over_static_methods - static CloudMessageUtils get instance { - return _instance ?? CloudMessageUtils(); - } -} diff --git a/packages/ap_common/lib/utils/dialog_utils.dart b/packages/ap_common/lib/utils/dialog_utils.dart index 0b619ad4..9fdd9a42 100644 --- a/packages/ap_common/lib/utils/dialog_utils.dart +++ b/packages/ap_common/lib/utils/dialog_utils.dart @@ -2,11 +2,11 @@ import 'dart:convert'; import 'dart:io'; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common/widgets/default_dialog.dart'; import 'package:ap_common/widgets/yes_no_dialog.dart'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/material.dart'; import 'package:sprintf/sprintf.dart'; diff --git a/packages/ap_common/lib/utils/notification_utils.dart b/packages/ap_common/lib/utils/notification_utils.dart index 8de7375f..9a78fe40 100644 --- a/packages/ap_common/lib/utils/notification_utils.dart +++ b/packages/ap_common/lib/utils/notification_utils.dart @@ -1,7 +1,7 @@ import 'dart:io'; -import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; diff --git a/packages/ap_common/lib/utils/platform_calendar_util.dart b/packages/ap_common/lib/utils/platform_calendar_util.dart index 3899df08..eb843888 100644 --- a/packages/ap_common/lib/utils/platform_calendar_util.dart +++ b/packages/ap_common/lib/utils/platform_calendar_util.dart @@ -1,21 +1,41 @@ import 'dart:io'; import 'package:add_2_calendar/add_2_calendar.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/foundation.dart'; export 'package:add_2_calendar/add_2_calendar.dart'; -class PlatformCalendarUtil { +class ApPlatformCalendarUtil extends PlatformCalendarUtil { static bool isSupported = !kIsWeb && (Platform.isAndroid || Platform.isIOS); - static PlatformCalendarUtil? _instance; + static ApPlatformCalendarUtil? _instance; //ignore: prefer_constructors_over_static_methods - static PlatformCalendarUtil get instance { - return _instance ??= PlatformCalendarUtil(); + static ApPlatformCalendarUtil get instance { + return _instance ??= ApPlatformCalendarUtil(); } - Future addToApp({required Event event}) async { - return Add2Calendar.addEvent2Cal(event); + @override + Future addToApp({ + required String title, + String? description, + String? location, + String? timeZone, + required DateTime startDate, + required DateTime endDate, + bool allDay = false, + Map? extra, + }) async { + return Add2Calendar.addEvent2Cal( + Event( + title: title, + description: description, + timeZone: timeZone, + startDate: startDate, + endDate: endDate, + allDay: allDay, + ), + ); } } diff --git a/packages/ap_common/lib/utils/preferences.dart b/packages/ap_common/lib/utils/preferences.dart index b681ed71..334bc6bd 100644 --- a/packages/ap_common/lib/utils/preferences.dart +++ b/packages/ap_common/lib/utils/preferences.dart @@ -1,7 +1,7 @@ import 'dart:io'; -import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:encrypt/encrypt.dart' as encrypt; import 'package:flutter/foundation.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -28,6 +28,7 @@ class ApPreferenceUtil extends PreferenceUtil { }) async { if (isSupport) { prefs = await SharedPreferences.getInstance(); + //TODO logic move to other place ApIcon.code = getString( ApConstants.prefIconStyleCode, ApIcon.outlined, diff --git a/packages/ap_common/lib/views/notification_list_view.dart b/packages/ap_common/lib/views/notification_list_view.dart index eeff38f7..a100c28c 100644 --- a/packages/ap_common/lib/views/notification_list_view.dart +++ b/packages/ap_common/lib/views/notification_list_view.dart @@ -1,9 +1,8 @@ -import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common/widgets/hint_content.dart'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/material.dart'; enum NotificationState { loading, finish, loadingMore, error, empty, offline } diff --git a/packages/ap_common/lib/views/pdf_view.dart b/packages/ap_common/lib/views/pdf_view.dart index 7475b2db..26daa0ef 100644 --- a/packages/ap_common/lib/views/pdf_view.dart +++ b/packages/ap_common/lib/views/pdf_view.dart @@ -1,9 +1,8 @@ import 'dart:typed_data'; -import 'package:ap_common/resources/ap_icon.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/widgets/hint_content.dart'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/material.dart'; import 'package:pdf/pdf.dart'; import 'package:printing/printing.dart'; diff --git a/packages/ap_common/lib/views/phone_list_view.dart b/packages/ap_common/lib/views/phone_list_view.dart index 397d1082..8a48d5bf 100644 --- a/packages/ap_common/lib/views/phone_list_view.dart +++ b/packages/ap_common/lib/views/phone_list_view.dart @@ -1,9 +1,8 @@ -import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common/widgets/hint_content.dart'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/material.dart'; enum PhoneState { loading, finish, error } diff --git a/packages/ap_common/lib/widgets/ap_drawer.dart b/packages/ap_common/lib/widgets/ap_drawer.dart index c9cd0d83..da9fa1c4 100644 --- a/packages/ap_common/lib/widgets/ap_drawer.dart +++ b/packages/ap_common/lib/widgets/ap_drawer.dart @@ -1,9 +1,8 @@ import 'dart:typed_data'; -import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/material.dart'; class ApDrawer extends StatefulWidget { diff --git a/packages/ap_common/lib/widgets/ap_network_image.dart b/packages/ap_common/lib/widgets/ap_network_image.dart index 4c3c7d55..c5cb3319 100644 --- a/packages/ap_common/lib/widgets/ap_network_image.dart +++ b/packages/ap_common/lib/widgets/ap_network_image.dart @@ -1,5 +1,5 @@ -import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/utils/ap_utils.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; diff --git a/packages/ap_common/lib/widgets/dialog_option.dart b/packages/ap_common/lib/widgets/dialog_option.dart index 3df3bafc..46152813 100644 --- a/packages/ap_common/lib/widgets/dialog_option.dart +++ b/packages/ap_common/lib/widgets/dialog_option.dart @@ -1,5 +1,5 @@ -import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/material.dart'; class DialogOption extends StatelessWidget { diff --git a/packages/ap_common/lib/widgets/item_picker.dart b/packages/ap_common/lib/widgets/item_picker.dart index 50f9cf80..675b5967 100644 --- a/packages/ap_common/lib/widgets/item_picker.dart +++ b/packages/ap_common/lib/widgets/item_picker.dart @@ -1,7 +1,7 @@ -import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common/widgets/option_dialog.dart'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/material.dart'; class ItemPicker extends StatelessWidget { diff --git a/packages/ap_common/lib/widgets/setting_page_widgets.dart b/packages/ap_common/lib/widgets/setting_page_widgets.dart index 7b2654ce..567b4415 100644 --- a/packages/ap_common/lib/widgets/setting_page_widgets.dart +++ b/packages/ap_common/lib/widgets/setting_page_widgets.dart @@ -1,10 +1,9 @@ -import 'package:ap_common/resources/ap_icon.dart'; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common/utils/notification_utils.dart'; import 'package:ap_common/widgets/option_dialog.dart'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/material.dart'; export 'package:package_info_plus/package_info_plus.dart'; @@ -129,15 +128,15 @@ class CheckCourseNotifyItem extends StatelessWidget { ); notifyData.data.removeAt(index); notifyData.save(); - ApUtils.showToast(context, ap.cancelNotifySuccess); + UiUtil.instance.showToast(context, ap.cancelNotifySuccess); }, ), ); } else { - ApUtils.showToast(context, ap.courseNotifyEmpty); + UiUtil.instance.showToast(context, ap.courseNotifyEmpty); } } else { - ApUtils.showToast(context, ap.platformError); + UiUtil.instance.showToast(context, ap.platformError); } }, ); @@ -163,9 +162,9 @@ class ClearAllNotifyItem extends StatelessWidget { : CourseNotifyData.load(tag); notifyData.data.clear(); notifyData.save(); - ApUtils.showToast(context, ap.cancelNotifySuccess); + UiUtil.instance.showToast(context, ap.cancelNotifySuccess); } else { - ApUtils.showToast(context, ap.platformError); + UiUtil.instance.showToast(context, ap.platformError); } }, ); diff --git a/packages/ap_common/lib/widgets/yes_no_dialog.dart b/packages/ap_common/lib/widgets/yes_no_dialog.dart index 66566cbe..6093d19e 100644 --- a/packages/ap_common/lib/widgets/yes_no_dialog.dart +++ b/packages/ap_common/lib/widgets/yes_no_dialog.dart @@ -1,5 +1,5 @@ -import 'package:ap_common/l10n/l10n.dart'; import 'package:ap_common/resources/ap_theme.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/material.dart'; class YesNoDialog extends StatelessWidget { diff --git a/packages/ap_common/pubspec.lock b/packages/ap_common/pubspec.lock index df298294..235ea692 100644 --- a/packages/ap_common/pubspec.lock +++ b/packages/ap_common/pubspec.lock @@ -45,6 +45,13 @@ packages: relative: true source: path version: "0.0.2" + ap_common_flutter_core: + dependency: "direct main" + description: + path: "../ap_common_flutter_core" + relative: true + source: path + version: "0.0.1" app_tracking_transparency: dependency: "direct main" description: @@ -817,14 +824,6 @@ packages: url: "https://pub.dev" source: hosted version: "5.0.0" - lint: - dependency: "direct dev" - description: - name: lint - sha256: d758a5211fce7fd3f5e316f804daefecdc34c7e53559716125e6da7388ae8565 - url: "https://pub.dev" - source: hosted - version: "2.3.0" logging: dependency: transitive description: diff --git a/packages/ap_common/pubspec.yaml b/packages/ap_common/pubspec.yaml index 8223cedf..0a3a8595 100644 --- a/packages/ap_common/pubspec.yaml +++ b/packages/ap_common/pubspec.yaml @@ -14,6 +14,7 @@ dependencies: sdk: flutter ap_common_core: ^0.0.1 + ap_common_flutter_core: ^0.0.1 # Dart Packages sprintf: ^7.0.0 @@ -57,6 +58,8 @@ dependencies: #dependency_overrides: # ap_common_core: # path: ../ap_common_core/ +# ap_common_flutter_core: +# path: ../ap_common_flutter_core/ dev_dependencies: flutter_test: @@ -73,12 +76,4 @@ flutter: false_secrets: - /example/lib/main.dart - /example/web/index.html - - /website/node_modules/selfsigned/README.md - -flutter_intl: - enabled: true - class_name: ApLocalizations - main_locale: 'zh_TW' - arb_dir: lib/l10n - output_dir: lib/l10n - use_deferred_loading: true \ No newline at end of file + - /website/node_modules/selfsigned/README.md \ No newline at end of file diff --git a/packages/ap_common_core/lib/src/utilities/cloud_message_utils.dart b/packages/ap_common_core/lib/src/utilities/cloud_message_utils.dart new file mode 100644 index 00000000..56f31bec --- /dev/null +++ b/packages/ap_common_core/lib/src/utilities/cloud_message_utils.dart @@ -0,0 +1,8 @@ +class CloudMessageUtil { + static CloudMessageUtil? _instance; + + // ignore: prefer_constructors_over_static_methods + static CloudMessageUtil get instance { + return _instance ?? CloudMessageUtil(); + } +} diff --git a/packages/ap_common_flutter_core/.gitignore b/packages/ap_common_flutter_core/.gitignore new file mode 100644 index 00000000..ac5aa989 --- /dev/null +++ b/packages/ap_common_flutter_core/.gitignore @@ -0,0 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ diff --git a/packages/ap_common_flutter_core/.metadata b/packages/ap_common_flutter_core/.metadata new file mode 100644 index 00000000..24472f12 --- /dev/null +++ b/packages/ap_common_flutter_core/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "2663184aa79047d0a33a14a3b607954f8fdd8730" + channel: "stable" + +project_type: package diff --git a/packages/ap_common_flutter_core/CHANGELOG.md b/packages/ap_common_flutter_core/CHANGELOG.md new file mode 100644 index 00000000..ec4a0b21 --- /dev/null +++ b/packages/ap_common_flutter_core/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* initial release from `ap_common` package separate. diff --git a/packages/ap_common_flutter_core/LICENSE b/packages/ap_common_flutter_core/LICENSE new file mode 100644 index 00000000..d25d4a88 --- /dev/null +++ b/packages/ap_common_flutter_core/LICENSE @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2024 RainVisitor + +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: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +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. \ No newline at end of file diff --git a/packages/ap_common_flutter_core/README.md b/packages/ap_common_flutter_core/README.md new file mode 100644 index 00000000..5481ec0c --- /dev/null +++ b/packages/ap_common_flutter_core/README.md @@ -0,0 +1,29 @@ +# 校務通系列介面與函式共用 + +[![](https://img.shields.io/badge/Flutter-v3.24-blue)](https://github.com/flutter/flutter) +[![](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common/) +[![melos](https://img.shields.io/badge/maintained%20with-melos-f700ff.svg?style=flat-square)](https://github.com/invertase/melos) + +長期校務通相關系列的app,介面與相關功能都極為相似,將相關的介面與函式庫,製作此套件以方便維護。 + +[展示網頁](https://abc873693.github.io/ap_common/#/) +[文件](https://ap-common.web.app/) + +## 相關專案 + +- [高科校務通](https://github.com/NKUST-ITC/NKUST-AP-Flutter) +- [中山校務通](https://github.com/abc873693/NSYSU-AP) +- [文藻校務通](https://github.com/abc873693/WTUC-AP) +- [台科校務通(已下架)](https://github.com/abc873693/NTUST-AP) + +## 套件 + +| Name | pub.dev | 說明 | +|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|---------------------| +| `ap_common` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common/) | 函式庫與相關介面共用 | +| `ap_common_plugin` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_plugin.svg?style=flat-square)](https://pub.dev/packages/ap_common_plugin/) | 課表小工具 | +| `ap_common_firebase` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_firebase.svg?style=flat-square)](https://pub.dev/packages/ap_common_firebase/) | 服務 `Firebase` 的整合實作 | + +## 套件使用要求 + +- Flutter `v1.20` 以上 diff --git a/packages/ap_common_flutter_core/lib/ap_common_flutter_core.dart b/packages/ap_common_flutter_core/lib/ap_common_flutter_core.dart new file mode 100644 index 00000000..ab4dd79d --- /dev/null +++ b/packages/ap_common_flutter_core/lib/ap_common_flutter_core.dart @@ -0,0 +1,6 @@ +export 'src/callback/general_callback.dart'; +export 'src/l10n/ap_localizations.dart'; +export 'src/ui/ap_icon.dart'; +export 'src/utilities/media_util.dart'; +export 'src/utilities/platform_calendar_util.dart'; +export 'src/utilities/ui_util.dart'; diff --git a/packages/ap_common/lib/callback/general_callback.dart b/packages/ap_common_flutter_core/lib/src/callback/general_callback.dart similarity index 52% rename from packages/ap_common/lib/callback/general_callback.dart rename to packages/ap_common_flutter_core/lib/src/callback/general_callback.dart index 8c9cff5f..4e9925da 100644 --- a/packages/ap_common/lib/callback/general_callback.dart +++ b/packages/ap_common_flutter_core/lib/src/callback/general_callback.dart @@ -1,6 +1,7 @@ -import 'package:ap_common/utils/ap_localizations.dart'; -import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_core/src/l10n/ap_localizations.dart'; +import 'package:ap_common_flutter_core/src/utilities/ui_util.dart'; +import 'package:dio/dio.dart'; import 'package:flutter/widgets.dart'; export 'package:dio/dio.dart'; @@ -8,6 +9,7 @@ export 'package:dio/dio.dart'; typedef DioExceptionCallback = Function(DioException); typedef GeneralResponseCallback = Function(GeneralResponse); +///TODO: 放此原因是配合 i18n 相關需要,並且此 API 未來會移除,故不放在 `ap_common_core` class GeneralCallback { GeneralCallback({ required this.onFailure, @@ -20,8 +22,13 @@ class GeneralCallback { Function(T data) onSuccess, ) { return GeneralCallback( - onFailure: (DioException e) => ApUtils.showToast(context, e.i18nMessage), - onError: (GeneralResponse e) => ApUtils.showToast(context, e.message), + onFailure: (DioException e) { + if (e.i18nMessage case final String message?) { + UiUtil.instance.showToast(context, message); + } + }, + onError: (GeneralResponse e) => + UiUtil.instance.showToast(context, e.message), onSuccess: onSuccess, ); } @@ -31,10 +38,13 @@ class GeneralCallback { final Function(T data) onSuccess; static DioExceptionCallback onFailureCallback(BuildContext context) => - (DioException dioException) => - ApUtils.showToast(context, dioException.i18nMessage); + (DioException dioException) { + if (dioException.i18nMessage case final String message?) { + UiUtil.instance.showToast(context, message); + } + }; static GeneralResponseCallback onErrorCallback(BuildContext context) => (GeneralResponse generalResponse) => - ApUtils.showToast(context, generalResponse.message); + UiUtil.instance.showToast(context, generalResponse.message); } diff --git a/packages/ap_common/lib/utils/ap_localizations.dart b/packages/ap_common_flutter_core/lib/src/l10n/ap_localizations.dart similarity index 90% rename from packages/ap_common/lib/utils/ap_localizations.dart rename to packages/ap_common_flutter_core/lib/src/l10n/ap_localizations.dart index ad9259fd..67d89a8e 100644 --- a/packages/ap_common/lib/utils/ap_localizations.dart +++ b/packages/ap_common_flutter_core/lib/src/l10n/ap_localizations.dart @@ -1,12 +1,12 @@ -import 'package:ap_common/l10n/intl/messages_all.dart'; -import 'package:ap_common/l10n/l10n.dart'; -import 'package:ap_common/resources/ap_icon.dart'; +import 'package:ap_common_flutter_core/src/l10n/intl/messages_all.dart'; +import 'package:ap_common_flutter_core/src/l10n/l10n.dart'; +import 'package:ap_common_flutter_core/src/ui/ap_icon.dart'; import 'package:dio/dio.dart'; -import 'package:flutter/widgets.dart'; +import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; import 'package:multiple_localization/multiple_localization.dart'; -export 'package:ap_common/l10n/l10n.dart'; +export 'package:ap_common_flutter_core/src/l10n/l10n.dart'; export 'package:intl/intl.dart'; extension ApExtension on ApLocalizations { diff --git a/packages/ap_common/lib/l10n/intl/messages_all.dart b/packages/ap_common_flutter_core/lib/src/l10n/intl/messages_all.dart similarity index 100% rename from packages/ap_common/lib/l10n/intl/messages_all.dart rename to packages/ap_common_flutter_core/lib/src/l10n/intl/messages_all.dart diff --git a/packages/ap_common/lib/l10n/intl/messages_en.dart b/packages/ap_common_flutter_core/lib/src/l10n/intl/messages_en.dart similarity index 100% rename from packages/ap_common/lib/l10n/intl/messages_en.dart rename to packages/ap_common_flutter_core/lib/src/l10n/intl/messages_en.dart diff --git a/packages/ap_common/lib/l10n/intl/messages_zh_TW.dart b/packages/ap_common_flutter_core/lib/src/l10n/intl/messages_zh_TW.dart similarity index 100% rename from packages/ap_common/lib/l10n/intl/messages_zh_TW.dart rename to packages/ap_common_flutter_core/lib/src/l10n/intl/messages_zh_TW.dart diff --git a/packages/ap_common/lib/l10n/intl_en.arb b/packages/ap_common_flutter_core/lib/src/l10n/intl_en.arb similarity index 100% rename from packages/ap_common/lib/l10n/intl_en.arb rename to packages/ap_common_flutter_core/lib/src/l10n/intl_en.arb diff --git a/packages/ap_common/lib/l10n/intl_zh_TW.arb b/packages/ap_common_flutter_core/lib/src/l10n/intl_zh_TW.arb similarity index 100% rename from packages/ap_common/lib/l10n/intl_zh_TW.arb rename to packages/ap_common_flutter_core/lib/src/l10n/intl_zh_TW.arb diff --git a/packages/ap_common/lib/l10n/l10n.dart b/packages/ap_common_flutter_core/lib/src/l10n/l10n.dart similarity index 100% rename from packages/ap_common/lib/l10n/l10n.dart rename to packages/ap_common_flutter_core/lib/src/l10n/l10n.dart diff --git a/packages/ap_common/lib/resources/ap_icon.dart b/packages/ap_common_flutter_core/lib/src/ui/ap_icon.dart similarity index 100% rename from packages/ap_common/lib/resources/ap_icon.dart rename to packages/ap_common_flutter_core/lib/src/ui/ap_icon.dart diff --git a/packages/ap_common_flutter_core/lib/src/utilities/media_util.dart b/packages/ap_common_flutter_core/lib/src/utilities/media_util.dart new file mode 100644 index 00000000..25a3f723 --- /dev/null +++ b/packages/ap_common_flutter_core/lib/src/utilities/media_util.dart @@ -0,0 +1,20 @@ +import 'package:ap_common_core/injector.dart'; +import 'package:ap_common_flutter_core/src/callback/general_callback.dart'; +import 'package:cross_file/cross_file.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; + +abstract class MediaUtil { + static MediaUtil get instance => injector.get(); + + Future pickImage(); + + Future saveImage( + BuildContext context, { + required ByteData byteData, + required String fileName, + required String successMessage, + GeneralResponseCallback? onSuccess, + GeneralResponseCallback? onError, + }); +} diff --git a/packages/ap_common_flutter_core/lib/src/utilities/platform_calendar_util.dart b/packages/ap_common_flutter_core/lib/src/utilities/platform_calendar_util.dart new file mode 100644 index 00000000..5418608d --- /dev/null +++ b/packages/ap_common_flutter_core/lib/src/utilities/platform_calendar_util.dart @@ -0,0 +1,17 @@ +import 'package:ap_common_core/injector.dart'; + +abstract class PlatformCalendarUtil { + static PlatformCalendarUtil get instance => + injector.get(); + + Future addToApp({ + required String title, + String? description, + String? location, + String? timeZone, + required DateTime startDate, + required DateTime endDate, + bool allDay = false, + Map? extra, + }); +} diff --git a/packages/ap_common_flutter_core/lib/src/utilities/ui_util.dart b/packages/ap_common_flutter_core/lib/src/utilities/ui_util.dart new file mode 100644 index 00000000..034a8c48 --- /dev/null +++ b/packages/ap_common_flutter_core/lib/src/utilities/ui_util.dart @@ -0,0 +1,12 @@ +import 'package:ap_common_core/injector.dart'; +import 'package:flutter/widgets.dart'; + +abstract class UiUtil { + static UiUtil get instance => injector.get(); + + void showToast( + BuildContext context, + String message, { + int? gravity, + }); +} diff --git a/packages/ap_common_flutter_core/pubspec.yaml b/packages/ap_common_flutter_core/pubspec.yaml new file mode 100644 index 00000000..059fa445 --- /dev/null +++ b/packages/ap_common_flutter_core/pubspec.yaml @@ -0,0 +1,33 @@ +name: ap_common_flutter_core +description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" +version: 0.0.1 +homepage: https://github.com/abc873693/ap_common +repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_flutter_core + + +environment: + sdk: ^3.5.3 + flutter: ">=3.22.0" + +dependencies: + flutter: + sdk: flutter + ap_common_core: '>=0.0.1 <1.0.0' + dio: ">=5.4.1 <6.0.0" + intl: ">=0.16.0 <1.0.0" + multiple_localization: ^0.5.0 + cross_file: ^0.3.4+2 + +dev_dependencies: + flutter_test: + sdk: flutter + +flutter: + +flutter_intl: + enabled: true + class_name: ApLocalizations + main_locale: 'zh_TW' + arb_dir: lib/src/l10n + output_dir: lib/src/l10n + use_deferred_loading: true From f9abb16d2e525ff8d5d4a68cd7a098e8025cd772 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Tue, 8 Oct 2024 13:55:04 +0800 Subject: [PATCH 13/41] feat: `AppStoreUtil` and `PlatformUtil` for `ap_common_flutter_core` --- packages/ap_common/lib/api/imgur_helper.dart | 1 - .../ap_common/lib/pages/about_us_page.dart | 13 ++-- .../lib/pages/announcement/edit_page.dart | 1 - .../lib/pages/announcement/home_page.dart | 4 +- .../lib/pages/announcement_content_page.dart | 5 +- .../ap_common/lib/utils/ap_media_util.dart | 3 +- .../ap_common/lib/utils/ap_platform_util.dart | 38 ++++++++++ packages/ap_common/lib/utils/ap_utils.dart | 70 ++++--------------- .../ap_common/lib/utils/app_store_util.dart | 24 +++++++ .../ap_common/lib/utils/dialog_utils.dart | 6 +- .../lib/views/notification_list_view.dart | 4 +- .../ap_common/lib/views/phone_list_view.dart | 2 +- .../lib/ap_common_flutter_core.dart | 4 ++ .../lib/src/utilities/app_store_util.dart | 9 +++ .../lib/src/utilities/platform_util.dart | 16 +++++ 15 files changed, 126 insertions(+), 74 deletions(-) create mode 100644 packages/ap_common/lib/utils/ap_platform_util.dart create mode 100644 packages/ap_common/lib/utils/app_store_util.dart create mode 100644 packages/ap_common_flutter_core/lib/src/utilities/app_store_util.dart create mode 100644 packages/ap_common_flutter_core/lib/src/utilities/platform_util.dart diff --git a/packages/ap_common/lib/api/imgur_helper.dart b/packages/ap_common/lib/api/imgur_helper.dart index e2a8cdf9..1c65ec81 100644 --- a/packages/ap_common/lib/api/imgur_helper.dart +++ b/packages/ap_common/lib/api/imgur_helper.dart @@ -1,7 +1,6 @@ import 'dart:async'; import 'dart:typed_data'; -import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:path/path.dart' as p; diff --git a/packages/ap_common/lib/pages/about_us_page.dart b/packages/ap_common/lib/pages/about_us_page.dart index 376f87ae..966f1fa8 100644 --- a/packages/ap_common/lib/pages/about_us_page.dart +++ b/packages/ap_common/lib/pages/about_us_page.dart @@ -1,6 +1,5 @@ import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common/resources/resources.dart'; -import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/material.dart'; @@ -180,7 +179,7 @@ class AboutUsPageState extends State { IconButton( icon: Image.asset(ApImageAssets.fb), onPressed: () { - ApUtils.launchUrl( + PlatformUtil.instance.launchUrl( 'https://m.me/${widget.fbFanPageId}', ); AnalyticsUtil.instance?.logEvent('fb_click'); @@ -192,7 +191,7 @@ class AboutUsPageState extends State { IconButton( icon: Image.asset(ApImageAssets.instagram), onPressed: () { - ApUtils.launchUrl( + PlatformUtil.instance.launchUrl( 'https://ig.me/m/$username', ); AnalyticsUtil.instance @@ -203,7 +202,8 @@ class AboutUsPageState extends State { IconButton( icon: Image.asset(ApImageAssets.github), onPressed: () { - ApUtils.launchUrl(widget.githubUrl) + PlatformUtil.instance + .launchUrl(widget.githubUrl) .catchError( (dynamic onError) { if (!context.mounted) return; @@ -221,7 +221,8 @@ class AboutUsPageState extends State { IconButton( icon: Image.asset(ApImageAssets.email), onPressed: () { - ApUtils.launchUrl('mailto:${widget.email}') + PlatformUtil.instance + .launchUrl('mailto:${widget.email}') .catchError( (dynamic onError) { if (!context.mounted) return; @@ -287,7 +288,7 @@ class AboutUsPageState extends State { ), options: const LinkifyOptions(humanize: false), onOpen: (LinkableElement link) async => - ApUtils.launchUrl(link.url), + PlatformUtil.instance.launchUrl(link.url), ), ], ), diff --git a/packages/ap_common/lib/pages/announcement/edit_page.dart b/packages/ap_common/lib/pages/announcement/edit_page.dart index 87183ccb..8b8d9e20 100644 --- a/packages/ap_common/lib/pages/announcement/edit_page.dart +++ b/packages/ap_common/lib/pages/announcement/edit_page.dart @@ -2,7 +2,6 @@ import 'package:ap_common/api/announcement_helper.dart'; import 'package:ap_common/api/imgur_helper.dart'; import 'package:ap_common/pages/announcement/home_page.dart' show TagColors; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common/widgets/ap_network_image.dart'; import 'package:ap_common/widgets/default_dialog.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; diff --git a/packages/ap_common/lib/pages/announcement/home_page.dart b/packages/ap_common/lib/pages/announcement/home_page.dart index 6066c837..e5f75eb1 100644 --- a/packages/ap_common/lib/pages/announcement/home_page.dart +++ b/packages/ap_common/lib/pages/announcement/home_page.dart @@ -611,7 +611,7 @@ class _AnnouncementHomePageState extends State { ), recognizer: TapGestureRecognizer() ..onTap = () { - ApUtils.launchUrl(item.imgUrl); + PlatformUtil.instance.launchUrl(item.imgUrl); }, ), TextSpan( @@ -626,7 +626,7 @@ class _AnnouncementHomePageState extends State { ), recognizer: TapGestureRecognizer() ..onTap = () { - ApUtils.launchUrl(item.url!); + PlatformUtil.instance.launchUrl(item.url!); }, ), TextSpan( diff --git a/packages/ap_common/lib/pages/announcement_content_page.dart b/packages/ap_common/lib/pages/announcement_content_page.dart index 2ae4af37..b59a717d 100644 --- a/packages/ap_common/lib/pages/announcement_content_page.dart +++ b/packages/ap_common/lib/pages/announcement_content_page.dart @@ -152,7 +152,8 @@ class AnnouncementContentPageState extends State { color: ApTheme.of(context).greyText, ), options: const LinkifyOptions(humanize: false), - onOpen: (LinkableElement link) async => ApUtils.launchUrl(link.url), + onOpen: (LinkableElement link) async => + PlatformUtil.instance.launchUrl(link.url), ), ), if (widget.announcement.url != null && @@ -172,7 +173,7 @@ class AnnouncementContentPageState extends State { ), ), onPressed: () { - ApUtils.launchUrl(widget.announcement.url!); + PlatformUtil.instance.launchUrl(widget.announcement.url!); AnalyticsUtil.instance?.logEvent('announcement_link_click'); }, child: Icon( diff --git a/packages/ap_common/lib/utils/ap_media_util.dart b/packages/ap_common/lib/utils/ap_media_util.dart index 4cbec148..d312b5c6 100644 --- a/packages/ap_common/lib/utils/ap_media_util.dart +++ b/packages/ap_common/lib/utils/ap_media_util.dart @@ -1,12 +1,13 @@ import 'dart:io'; import 'package:ap_common/api/announcement_helper.dart'; -import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:file_saver/file_saver.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/widgets.dart'; +import 'package:image_picker/image_picker.dart'; import 'package:path/path.dart' as path; +import 'package:path_provider/path_provider.dart'; import 'package:photo_manager/photo_manager.dart'; class ApMediaUtil extends MediaUtil { diff --git a/packages/ap_common/lib/utils/ap_platform_util.dart b/packages/ap_common/lib/utils/ap_platform_util.dart new file mode 100644 index 00000000..19b257a4 --- /dev/null +++ b/packages/ap_common/lib/utils/ap_platform_util.dart @@ -0,0 +1,38 @@ +import 'dart:io'; +import 'dart:ui'; + +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:package_info_plus/package_info_plus.dart'; +import 'package:share_plus/share_plus.dart'; +import 'package:url_launcher/url_launcher.dart' as url_launcher; + +class ApPlatformUtil extends PlatformUtil { + @override + Future launchUrl(String url) async { + await url_launcher.launchUrl(Uri.parse(url)); + } + + @override + Future callPhone(String url) async { + String newUrl = url.replaceAll('#', ','); + newUrl = newUrl.replaceAll('(', ''); + newUrl = newUrl.replaceAll(')', ''); + newUrl = newUrl.replaceAll('-', ''); + newUrl = newUrl.replaceAll(' ', ''); + newUrl = 'tel:$newUrl'; + await url_launcher.launchUrl(Uri.parse(newUrl)); + } + + @override + Future shareTo( + String content, { + Rect? sharePositionOrigin, + }) async { + final PackageInfo packageInfo = await PackageInfo.fromPlatform(); + Share.share( + '$content\n\n' + 'Send from ${packageInfo.appName} ${Platform.operatingSystem}', + sharePositionOrigin: sharePositionOrigin, + ); + } +} diff --git a/packages/ap_common/lib/utils/ap_utils.dart b/packages/ap_common/lib/utils/ap_utils.dart index b27cfb5a..a43a3b6d 100644 --- a/packages/ap_common/lib/utils/ap_utils.dart +++ b/packages/ap_common/lib/utils/ap_utils.dart @@ -5,15 +5,8 @@ import 'package:ap_common/widgets/yes_no_dialog.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:in_app_review/in_app_review.dart'; -import 'package:package_info_plus/package_info_plus.dart'; -import 'package:share_plus/share_plus.dart'; -import 'package:url_launcher/url_launcher.dart' as url_launcher; export 'package:dio/dio.dart'; -export 'package:image_picker/image_picker.dart'; -export 'package:package_info_plus/package_info_plus.dart'; -export 'package:path_provider/path_provider.dart'; export 'toast.dart'; @@ -34,47 +27,23 @@ class ApUtils { ); } - static Future launchUrl(String url) async { - await url_launcher.launchUrl(Uri.parse(url)); - } - - static Future callPhone(String url) async { - String newUrl = url.replaceAll('#', ','); - newUrl = newUrl.replaceAll('(', ''); - newUrl = newUrl.replaceAll(')', ''); - newUrl = newUrl.replaceAll('-', ''); - newUrl = newUrl.replaceAll(' ', ''); - newUrl = 'tel:$newUrl'; - await url_launcher.launchUrl(Uri.parse(newUrl)); - } - - static Future shareTo( - String content, { - Rect? sharePositionOrigin, - }) async { - final PackageInfo packageInfo = await PackageInfo.fromPlatform(); - Share.share( - '$content\n\n' - 'Send from ${packageInfo.appName} ${Platform.operatingSystem}', - sharePositionOrigin: sharePositionOrigin, - ); - } - static Future launchFbFansPage( BuildContext context, String fansPageId, ) async { final String fansPageUrl = 'https://www.facebook.com/$fansPageId/'; if (Platform.isAndroid) { - ApUtils.launchUrl('fb://messaging/$fansPageId').catchError( - (dynamic onError) => ApUtils.launchUrl(fansPageUrl), - ); + PlatformUtil.instance.launchUrl('fb://messaging/$fansPageId').catchError( + (dynamic onError) => PlatformUtil.instance.launchUrl(fansPageUrl), + ); } else if (Platform.isIOS) { - ApUtils.launchUrl('fb-messenger://user-thread/$fansPageId').catchError( - (dynamic onError) => ApUtils.launchUrl(fansPageUrl), - ); + PlatformUtil.instance + .launchUrl('fb-messenger://user-thread/$fansPageId') + .catchError( + (dynamic onError) => PlatformUtil.instance.launchUrl(fansPageUrl), + ); } else { - ApUtils.launchUrl(fansPageUrl).catchError( + PlatformUtil.instance.launchUrl(fansPageUrl).catchError( (dynamic onError) { if (!context.mounted) return; UiUtil.instance.showToast( @@ -108,7 +77,9 @@ class ApUtils { ), leftActionText: app.later, rightActionText: app.rateNow, - rightActionFunction: () => openAppReview(defaultUrl: defaultUrl), + rightActionFunction: () => AppStoreUtil.instance.openAppReview( + defaultUrl: defaultUrl, + ), ), ); } @@ -163,7 +134,9 @@ class ApUtils { ), ), TextButton( - onPressed: () => openAppReview(defaultUrl: defaultUrl), + onPressed: () => AppStoreUtil.instance.openAppReview( + defaultUrl: defaultUrl, + ), child: Text( app.rateNow, style: TextStyle( @@ -178,17 +151,4 @@ class ApUtils { ), ); } - - static Future openAppReview({ - String defaultUrl = '', - }) async { - final InAppReview inAppReview = InAppReview.instance; - if (!kIsWeb && - (Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && - (await inAppReview.isAvailable())) { - inAppReview.requestReview(); - } else { - launchUrl(defaultUrl); - } - } } diff --git a/packages/ap_common/lib/utils/app_store_util.dart b/packages/ap_common/lib/utils/app_store_util.dart new file mode 100644 index 00000000..01d3a90d --- /dev/null +++ b/packages/ap_common/lib/utils/app_store_util.dart @@ -0,0 +1,24 @@ +import 'dart:io'; + +import 'package:ap_common_core/injector.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:flutter/foundation.dart'; +import 'package:in_app_review/in_app_review.dart'; + +class ApAppStoreUtil extends AppStoreUtil { + static ApAppStoreUtil get instance => injector.get(); + + @override + Future openAppReview({ + String defaultUrl = '', + }) async { + final InAppReview inAppReview = InAppReview.instance; + if (!kIsWeb && + (Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + (await inAppReview.isAvailable())) { + inAppReview.requestReview(); + } else { + PlatformUtil.instance.launchUrl(defaultUrl); + } + } +} diff --git a/packages/ap_common/lib/utils/dialog_utils.dart b/packages/ap_common/lib/utils/dialog_utils.dart index 9fdd9a42..db480f5c 100644 --- a/packages/ap_common/lib/utils/dialog_utils.dart +++ b/packages/ap_common/lib/utils/dialog_utils.dart @@ -2,12 +2,12 @@ import 'dart:convert'; import 'dart:io'; import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/ap_utils.dart'; import 'package:ap_common/widgets/default_dialog.dart'; import 'package:ap_common/widgets/yes_no_dialog.dart'; import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/material.dart'; +import 'package:package_info_plus/package_info_plus.dart'; import 'package:sprintf/sprintf.dart'; class DialogUtils { @@ -176,7 +176,7 @@ class DialogUtils { title: app.updateTitle, actionText: app.update, contentWidget: contentWidget, - actionFunction: () => ApUtils.launchUrl(url), + actionFunction: () => PlatformUtil.instance.launchUrl(url), ), ), ); @@ -190,7 +190,7 @@ class DialogUtils { contentWidget: contentWidget, leftActionText: app.skip, rightActionText: app.update, - rightActionFunction: () => ApUtils.launchUrl(url), + rightActionFunction: () => PlatformUtil.instance.launchUrl(url), ), ); } diff --git a/packages/ap_common/lib/views/notification_list_view.dart b/packages/ap_common/lib/views/notification_list_view.dart index a100c28c..0ae2b50d 100644 --- a/packages/ap_common/lib/views/notification_list_view.dart +++ b/packages/ap_common/lib/views/notification_list_view.dart @@ -64,14 +64,14 @@ class NotificationListViewState extends State return InkWell( onLongPress: () { final RenderBox? box = context.findRenderObject() as RenderBox?; - ApUtils.shareTo( + PlatformUtil.instance.shareTo( '${notification.info.title}\n${notification.link}', sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size, ); AnalyticsUtil.instance?.logEvent('share_long_click'); }, onTap: () { - ApUtils.launchUrl(notification.link); + PlatformUtil.instance.launchUrl(notification.link); AnalyticsUtil.instance?.logEvent('notification_link_click'); }, child: Container( diff --git a/packages/ap_common/lib/views/phone_list_view.dart b/packages/ap_common/lib/views/phone_list_view.dart index 8a48d5bf..b6e4f851 100644 --- a/packages/ap_common/lib/views/phone_list_view.dart +++ b/packages/ap_common/lib/views/phone_list_view.dart @@ -123,7 +123,7 @@ class PhoneListViewState extends State onTap: () { AnalyticsUtil.instance?.logEvent('call_phone_click'); try { - ApUtils.callPhone(phone.number); + PlatformUtil.instance.callPhone(phone.number); AnalyticsUtil.instance?.logEvent('call_phone_success'); } catch (e) { AnalyticsUtil.instance?.logEvent('call_phone_error'); diff --git a/packages/ap_common_flutter_core/lib/ap_common_flutter_core.dart b/packages/ap_common_flutter_core/lib/ap_common_flutter_core.dart index ab4dd79d..52c04b86 100644 --- a/packages/ap_common_flutter_core/lib/ap_common_flutter_core.dart +++ b/packages/ap_common_flutter_core/lib/ap_common_flutter_core.dart @@ -1,6 +1,10 @@ +export 'package:cross_file/cross_file.dart'; + export 'src/callback/general_callback.dart'; export 'src/l10n/ap_localizations.dart'; export 'src/ui/ap_icon.dart'; +export 'src/utilities/app_store_util.dart'; export 'src/utilities/media_util.dart'; export 'src/utilities/platform_calendar_util.dart'; +export 'src/utilities/platform_util.dart'; export 'src/utilities/ui_util.dart'; diff --git a/packages/ap_common_flutter_core/lib/src/utilities/app_store_util.dart b/packages/ap_common_flutter_core/lib/src/utilities/app_store_util.dart new file mode 100644 index 00000000..e475d6b3 --- /dev/null +++ b/packages/ap_common_flutter_core/lib/src/utilities/app_store_util.dart @@ -0,0 +1,9 @@ +import 'package:ap_common_core/injector.dart'; + +abstract class AppStoreUtil { + static AppStoreUtil get instance => injector.get(); + + Future openAppReview({ + String defaultUrl = '', + }); +} diff --git a/packages/ap_common_flutter_core/lib/src/utilities/platform_util.dart b/packages/ap_common_flutter_core/lib/src/utilities/platform_util.dart new file mode 100644 index 00000000..4296cf1c --- /dev/null +++ b/packages/ap_common_flutter_core/lib/src/utilities/platform_util.dart @@ -0,0 +1,16 @@ +import 'dart:ui'; + +import 'package:ap_common_core/injector.dart'; + +abstract class PlatformUtil { + static PlatformUtil get instance => injector.get(); + + Future launchUrl(String url); + + Future callPhone(String url); + + Future shareTo( + String content, { + Rect? sharePositionOrigin, + }); +} From 55b2fa00ea5fa4dafb15fc19e19b33dd9d72ef92 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Tue, 8 Oct 2024 14:45:31 +0800 Subject: [PATCH 14/41] feat: move native platform util implement to `ap_common_flutter_platform` --- melos_ap_common.iml | 3 ++ .../lib/scaffold/course_scaffold.dart | 5 +- .../ap_common/lib/utils/app_store_util.dart | 24 --------- .../lib/utils/app_tracking_utils.dart | 27 ++-------- .../lib/widgets/setting_page_widgets.dart | 8 +-- packages/ap_common/pubspec.lock | 43 ++++++++------- packages/ap_common/pubspec.yaml | 20 +------ .../ap_common_core/lib/ap_common_core.dart | 1 - .../lib/src/models/course_notify_data.dart | 25 --------- .../lib/src/utils/firebase_message_utils.dart | 1 + packages/ap_common_firebase/pubspec.yaml | 1 + .../lib/ap_common_flutter_core.dart | 2 + .../src/models/general_permission_status.dart | 7 +++ .../lib/src/utilities/app_store_util.dart | 7 +++ .../lib/src/utilities/notification_util.dart | 40 +++++++++----- .../.flutter-plugins | 54 +++++++++++++++++++ .../.flutter-plugins-dependencies | 1 + .../ap_common_flutter_platform/.gitignore | 29 ++++++++++ packages/ap_common_flutter_platform/.metadata | 10 ++++ .../ap_common_flutter_platform/CHANGELOG.md | 3 ++ packages/ap_common_flutter_platform/LICENSE | 1 + packages/ap_common_flutter_platform/README.md | 39 ++++++++++++++ .../lib/ap_common_flutter_platform.dart | 6 +++ .../lib/src/utilities}/ap_media_util.dart | 2 +- .../lib/src/utilities}/ap_platform_util.dart | 0 .../lib/src/utilities/app_store_util.dart | 50 +++++++++++++++++ .../src/utilities}/notification_utils.dart | 7 +-- .../utilities}/platform_calendar_util.dart | 0 .../lib/src/utilities}/preferences.dart | 0 .../ap_common_flutter_platform/pubspec.yaml | 40 ++++++++++++++ 30 files changed, 318 insertions(+), 138 deletions(-) delete mode 100644 packages/ap_common/lib/utils/app_store_util.dart create mode 100644 packages/ap_common_flutter_core/lib/src/models/general_permission_status.dart rename packages/{ap_common_core => ap_common_flutter_core}/lib/src/utilities/notification_util.dart (60%) create mode 100644 packages/ap_common_flutter_platform/.flutter-plugins create mode 100644 packages/ap_common_flutter_platform/.flutter-plugins-dependencies create mode 100644 packages/ap_common_flutter_platform/.gitignore create mode 100644 packages/ap_common_flutter_platform/.metadata create mode 100644 packages/ap_common_flutter_platform/CHANGELOG.md create mode 100644 packages/ap_common_flutter_platform/LICENSE create mode 100644 packages/ap_common_flutter_platform/README.md create mode 100644 packages/ap_common_flutter_platform/lib/ap_common_flutter_platform.dart rename packages/{ap_common/lib/utils => ap_common_flutter_platform/lib/src/utilities}/ap_media_util.dart (98%) rename packages/{ap_common/lib/utils => ap_common_flutter_platform/lib/src/utilities}/ap_platform_util.dart (100%) create mode 100644 packages/ap_common_flutter_platform/lib/src/utilities/app_store_util.dart rename packages/{ap_common/lib/utils => ap_common_flutter_platform/lib/src/utilities}/notification_utils.dart (99%) rename packages/{ap_common/lib/utils => ap_common_flutter_platform/lib/src/utilities}/platform_calendar_util.dart (100%) rename packages/{ap_common/lib/utils => ap_common_flutter_platform/lib/src/utilities}/preferences.dart (100%) create mode 100644 packages/ap_common_flutter_platform/pubspec.yaml diff --git a/melos_ap_common.iml b/melos_ap_common.iml index 1b432d6c..1d6bb977 100644 --- a/melos_ap_common.iml +++ b/melos_ap_common.iml @@ -1222,6 +1222,9 @@ + + + diff --git a/packages/ap_common/lib/scaffold/course_scaffold.dart b/packages/ap_common/lib/scaffold/course_scaffold.dart index 3ca3e133..ab3dfcd0 100644 --- a/packages/ap_common/lib/scaffold/course_scaffold.dart +++ b/packages/ap_common/lib/scaffold/course_scaffold.dart @@ -5,7 +5,6 @@ import 'package:ap_common/resources/ap_colors.dart'; import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common/resources/resources.dart'; import 'package:ap_common/utils/ap_utils.dart'; -import 'package:ap_common/utils/notification_utils.dart'; import 'package:ap_common/widgets/default_dialog.dart'; import 'package:ap_common/widgets/hint_content.dart'; import 'package:ap_common/widgets/item_picker.dart'; @@ -795,7 +794,7 @@ class _CourseContentState extends State { ), if (widget.enableNotifyControl && widget.notifyData != null && - ApNotificationUtil.isSupport) + NotificationUtil.instance.isSupport) IconButton( icon: Icon( state == CourseNotifyState.schedule @@ -816,7 +815,7 @@ class _CourseContentState extends State { weekday: widget.weekday, timeCode: widget.timeCode, ); - await ApNotificationUtil.instance.scheduleCourseNotify( + await NotificationUtil.instance.scheduleCourseNotify( context: context, courseNotify: courseNotify, weekday: widget.weekday, diff --git a/packages/ap_common/lib/utils/app_store_util.dart b/packages/ap_common/lib/utils/app_store_util.dart deleted file mode 100644 index 01d3a90d..00000000 --- a/packages/ap_common/lib/utils/app_store_util.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'dart:io'; - -import 'package:ap_common_core/injector.dart'; -import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; -import 'package:flutter/foundation.dart'; -import 'package:in_app_review/in_app_review.dart'; - -class ApAppStoreUtil extends AppStoreUtil { - static ApAppStoreUtil get instance => injector.get(); - - @override - Future openAppReview({ - String defaultUrl = '', - }) async { - final InAppReview inAppReview = InAppReview.instance; - if (!kIsWeb && - (Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && - (await inAppReview.isAvailable())) { - inAppReview.requestReview(); - } else { - PlatformUtil.instance.launchUrl(defaultUrl); - } - } -} diff --git a/packages/ap_common/lib/utils/app_tracking_utils.dart b/packages/ap_common/lib/utils/app_tracking_utils.dart index 3b9bba21..dcd21e45 100644 --- a/packages/ap_common/lib/utils/app_tracking_utils.dart +++ b/packages/ap_common/lib/utils/app_tracking_utils.dart @@ -1,29 +1,10 @@ -import 'dart:io'; - import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common/widgets/default_dialog.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; -import 'package:app_tracking_transparency/app_tracking_transparency.dart'; -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -export 'package:app_tracking_transparency/app_tracking_transparency.dart'; - class AppTrackingUtils { - static Future get isSupportAppTrackingApi async { - if (!kIsWeb && Platform.isIOS) { - return await AppTrackingTransparency.trackingAuthorizationStatus == - TrackingStatus.notSupported; - } else { - return false; - } - } - - static Future get trackingAuthorizationStatus async { - return AppTrackingTransparency.trackingAuthorizationStatus; - } - static void show({ required BuildContext context, VoidCallback? onTap, @@ -91,11 +72,9 @@ class AppTrackingUtils { actionFunction: onTap ?? () async { try { - if (await AppTrackingTransparency - .trackingAuthorizationStatus == - TrackingStatus.notDetermined) { - await AppTrackingTransparency - .requestTrackingAuthorization(); + if (await AppStoreUtil.instance.trackingAuthorizationStatus == + GeneralPermissionStatus.notDetermined) { + await AppStoreUtil.instance.requestTrackingAuthorization(); } //ignore: use_build_context_synchronously Navigator.of(context).pop(); diff --git a/packages/ap_common/lib/widgets/setting_page_widgets.dart b/packages/ap_common/lib/widgets/setting_page_widgets.dart index 567b4415..50240589 100644 --- a/packages/ap_common/lib/widgets/setting_page_widgets.dart +++ b/packages/ap_common/lib/widgets/setting_page_widgets.dart @@ -1,13 +1,9 @@ import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/ap_utils.dart'; -import 'package:ap_common/utils/notification_utils.dart'; import 'package:ap_common/widgets/option_dialog.dart'; import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/material.dart'; -export 'package:package_info_plus/package_info_plus.dart'; - class SettingTitle extends StatelessWidget { const SettingTitle({ super.key, @@ -110,7 +106,7 @@ class CheckCourseNotifyItem extends StatelessWidget { final CourseNotifyData notifyData = tag == null ? CourseNotifyData.loadCurrent() : CourseNotifyData.load(tag); - if (ApNotificationUtil.isSupport) { + if (NotificationUtil.instance.isSupport) { if (notifyData.data.isNotEmpty) { showDialog( context: context, @@ -155,7 +151,7 @@ class ClearAllNotifyItem extends StatelessWidget { text: ap.cancelAllNotify, subText: ap.cancelAllNotifySubTitle, onTap: () { - if (ApNotificationUtil.isSupport) { + if (NotificationUtil.instance.isSupport) { NotificationUtil.instance.cancelAll(); final CourseNotifyData notifyData = tag == null ? CourseNotifyData.loadCurrent() diff --git a/packages/ap_common/pubspec.lock b/packages/ap_common/pubspec.lock index 235ea692..04cd2501 100644 --- a/packages/ap_common/pubspec.lock +++ b/packages/ap_common/pubspec.lock @@ -15,7 +15,7 @@ packages: source: sdk version: "0.3.2" add_2_calendar: - dependency: "direct main" + dependency: transitive description: name: add_2_calendar sha256: "8d7a82aba607d35f2a5bc913419e12f865a96a350a8ad2509a59322bc161f200" @@ -52,8 +52,15 @@ packages: relative: true source: path version: "0.0.1" - app_tracking_transparency: + ap_common_flutter_platform: dependency: "direct main" + description: + path: "../ap_common_flutter_platform" + relative: true + source: path + version: "0.0.1" + app_tracking_transparency: + dependency: transitive description: name: app_tracking_transparency sha256: "64d9745931e565790abdea91b518ac8dc3cebe6d0d0aaf7119343271b983259a" @@ -197,7 +204,7 @@ packages: source: hosted version: "8.9.2" cached_network_image: - dependency: "direct main" + dependency: transitive description: name: cached_network_image sha256: "4a5d8d2c728b0f3d0245f69f921d7be90cae4c2fd5288f773088672c0893f819" @@ -381,7 +388,7 @@ packages: source: hosted version: "7.0.0" file_saver: - dependency: "direct main" + dependency: transitive description: name: file_saver sha256: d375b351e3331663abbaf99747abd72f159260c58fbbdbca9f926f02c01bdc48 @@ -442,7 +449,7 @@ packages: source: hosted version: "3.4.1" flutter_keyboard_visibility: - dependency: "direct main" + dependency: transitive description: name: flutter_keyboard_visibility sha256: "98664be7be0e3ffca00de50f7f6a287ab62c763fc8c762e0a21584584a3ff4f8" @@ -498,7 +505,7 @@ packages: source: hosted version: "6.0.0" flutter_local_notifications: - dependency: "direct main" + dependency: transitive description: name: flutter_local_notifications sha256: c500d5d9e7e553f06b61877ca6b9c8b92c570a4c8db371038702e8ce57f8a50f @@ -569,7 +576,7 @@ packages: source: hosted version: "0.3.1+4" google_sign_in: - dependency: "direct main" + dependency: transitive description: name: google_sign_in sha256: "0b8787cb9c1a68ad398e8010e8c8766bfa33556d2ab97c439fb4137756d7308f" @@ -657,7 +664,7 @@ packages: source: hosted version: "4.2.0" image_picker: - dependency: "direct main" + dependency: transitive description: name: image_picker sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" @@ -721,7 +728,7 @@ packages: source: hosted version: "0.2.1+1" in_app_review: - dependency: "direct main" + dependency: transitive description: name: in_app_review sha256: "99869244d09adc76af16bf8fd731dd13cef58ecafd5917847589c49f378cbb30" @@ -897,7 +904,7 @@ packages: source: hosted version: "2.1.0" package_info_plus: - dependency: "direct main" + dependency: transitive description: name: package_info_plus sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 @@ -913,7 +920,7 @@ packages: source: hosted version: "3.0.1" path: - dependency: "direct main" + dependency: transitive description: name: path sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" @@ -929,7 +936,7 @@ packages: source: hosted version: "1.0.1" path_provider: - dependency: "direct main" + dependency: transitive description: name: path_provider sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 @@ -1001,7 +1008,7 @@ packages: source: hosted version: "6.0.2" photo_manager: - dependency: "direct main" + dependency: transitive description: name: photo_manager sha256: "1e8bbe46a6858870e34c976aafd85378bed221ce31c1201961eba9ad3d94df9f" @@ -1049,7 +1056,7 @@ packages: source: hosted version: "1.5.1" printing: - dependency: "direct main" + dependency: transitive description: name: printing sha256: cc4b256a5a89d5345488e3318897b595867f5181b8c5ed6fc63bfa5f2044aec3 @@ -1089,7 +1096,7 @@ packages: source: hosted version: "0.28.0" share_plus: - dependency: "direct main" + dependency: transitive description: name: share_plus sha256: "59dfd53f497340a0c3a81909b220cfdb9b8973a91055c4e5ab9b9b9ad7c513c0" @@ -1105,7 +1112,7 @@ packages: source: hosted version: "5.0.0" shared_preferences: - dependency: "direct main" + dependency: transitive description: name: shared_preferences sha256: "746e5369a43170c25816cc472ee016d3a66bc13fcf430c0bc41ad7b4b2922051" @@ -1177,7 +1184,7 @@ packages: source: hosted version: "2.0.0" sign_in_with_apple: - dependency: "direct main" + dependency: transitive description: name: sign_in_with_apple sha256: "5c34c601d6910d7db0077063001ccd9d9329ee58b9038ee07153ffcdd76e91bd" @@ -1350,7 +1357,7 @@ packages: source: hosted version: "2.2.2" url_launcher: - dependency: "direct main" + dependency: transitive description: name: url_launcher sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" diff --git a/packages/ap_common/pubspec.yaml b/packages/ap_common/pubspec.yaml index 0a3a8595..19a6d7fd 100644 --- a/packages/ap_common/pubspec.yaml +++ b/packages/ap_common/pubspec.yaml @@ -15,6 +15,7 @@ dependencies: ap_common_core: ^0.0.1 ap_common_flutter_core: ^0.0.1 + ap_common_flutter_platform: ^0.0.1 # Dart Packages sprintf: ^7.0.0 @@ -24,7 +25,6 @@ dependencies: dio: ">=5.4.1 <6.0.0" dio_cookie_manager: ^3.1.1 cookie_jar: ^4.0.0 - flutter_local_notifications: ^17.2.2 timezone: ^0.9.4 jwt_decoder: ^2.0.1 json_annotation: ^4.6.0 @@ -36,24 +36,6 @@ dependencies: auto_size_text_pk: ^3.0.0 flutter_linkify: ^6.0.0 cupertino_back_gesture: ^0.1.0 - # Native UI Plugin - shared_preferences: ^2.2.2 - url_launcher: ^6.2.5 - share_plus: ">=9.0.0 <=10.0.0" - package_info_plus: ^8.0.2 - cached_network_image: ^3.3.1 - flutter_keyboard_visibility: ^6.0.0 - add_2_calendar: ^3.0.1 - in_app_review: ^2.0.3 - printing: ^5.10.4 - path: ^1.7.0 - path_provider: ^2.1.2 - google_sign_in: ^6.2.1 - sign_in_with_apple: ^6.1.1 - image_picker: ^1.0.7 - photo_manager: ^3.0.0 - file_saver: ^0.2.12 - app_tracking_transparency: ^2.0.2+4 #dependency_overrides: # ap_common_core: diff --git a/packages/ap_common_core/lib/ap_common_core.dart b/packages/ap_common_core/lib/ap_common_core.dart index 3494a5ce..283bbdd3 100644 --- a/packages/ap_common_core/lib/ap_common_core.dart +++ b/packages/ap_common_core/lib/ap_common_core.dart @@ -17,5 +17,4 @@ export 'src/models/user_info.dart'; export 'src/models/version_info.dart'; export 'src/utilities/analytics_utils.dart'; export 'src/utilities/crashlytics_utils.dart'; -export 'src/utilities/notification_util.dart'; export 'src/utilities/preference_util.dart'; diff --git a/packages/ap_common_core/lib/src/models/course_notify_data.dart b/packages/ap_common_core/lib/src/models/course_notify_data.dart index edbcbdb7..46ed16b0 100644 --- a/packages/ap_common_core/lib/src/models/course_notify_data.dart +++ b/packages/ap_common_core/lib/src/models/course_notify_data.dart @@ -3,7 +3,6 @@ import 'dart:developer'; import 'package:ap_common_core/src/config/ap_constants.dart'; import 'package:ap_common_core/src/models/course_data.dart'; -import 'package:ap_common_core/src/utilities/notification_util.dart'; import 'package:ap_common_core/src/utilities/preference_util.dart'; import 'package:json_annotation/json_annotation.dart'; @@ -109,30 +108,6 @@ class CourseNotifyData { // toRawJson(), // ); // } - - static void clearOldVersionNotification({ - required String tag, - required String newTag, - }) { - final String rawString = PreferenceUtil.instance.getString( - '${ApConstants.packageName}.' - 'course_notify_data_$tag', - '', - ); - log('clearOldVersionNotification $rawString', name: 'ap_common'); - if (rawString.isNotEmpty) { - final CourseNotifyData courseNotifyData = - CourseNotifyData.fromRawJson(rawString); - for (final CourseNotify element in courseNotifyData.data) { - NotificationUtil.instance.cancelNotify(id: element.id); - } - courseNotifyData.data.clear(); - courseNotifyData.tag = newTag; - courseNotifyData.save(); - } - PreferenceUtil.instance - .remove('${ApConstants.packageName}.course_notify_data_$tag'); - } } @JsonSerializable() diff --git a/packages/ap_common_firebase/lib/src/utils/firebase_message_utils.dart b/packages/ap_common_firebase/lib/src/utils/firebase_message_utils.dart index 6179db34..e437eb11 100644 --- a/packages/ap_common_firebase/lib/src/utils/firebase_message_utils.dart +++ b/packages/ap_common_firebase/lib/src/utils/firebase_message_utils.dart @@ -4,6 +4,7 @@ import 'dart:io'; import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_firebase/src/utils/firebase_analytics_utils.dart'; import 'package:ap_common_firebase/src/utils/firebase_utils.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/foundation.dart'; import 'package:url_launcher/url_launcher.dart'; diff --git a/packages/ap_common_firebase/pubspec.yaml b/packages/ap_common_firebase/pubspec.yaml index ca37dafd..c7eeac50 100644 --- a/packages/ap_common_firebase/pubspec.yaml +++ b/packages/ap_common_firebase/pubspec.yaml @@ -14,6 +14,7 @@ dependencies: ap_common: '>=0.25.0 <2.0.0' ap_common_core: '>=0.0.1 <1.0.0' + ap_common_flutter_core: '>=0.0.1 <1.0.0' # path: ../../GitHub-NKUST-ITC/ap_common url_launcher: ^6.1.0 #firebase must use particular version diff --git a/packages/ap_common_flutter_core/lib/ap_common_flutter_core.dart b/packages/ap_common_flutter_core/lib/ap_common_flutter_core.dart index 52c04b86..a080f1a9 100644 --- a/packages/ap_common_flutter_core/lib/ap_common_flutter_core.dart +++ b/packages/ap_common_flutter_core/lib/ap_common_flutter_core.dart @@ -2,9 +2,11 @@ export 'package:cross_file/cross_file.dart'; export 'src/callback/general_callback.dart'; export 'src/l10n/ap_localizations.dart'; +export 'src/models/general_permission_status.dart'; export 'src/ui/ap_icon.dart'; export 'src/utilities/app_store_util.dart'; export 'src/utilities/media_util.dart'; +export 'src/utilities/notification_util.dart'; export 'src/utilities/platform_calendar_util.dart'; export 'src/utilities/platform_util.dart'; export 'src/utilities/ui_util.dart'; diff --git a/packages/ap_common_flutter_core/lib/src/models/general_permission_status.dart b/packages/ap_common_flutter_core/lib/src/models/general_permission_status.dart new file mode 100644 index 00000000..c3a7ed3d --- /dev/null +++ b/packages/ap_common_flutter_core/lib/src/models/general_permission_status.dart @@ -0,0 +1,7 @@ +enum GeneralPermissionStatus { + notDetermined, + restricted, + denied, + authorized, + notSupported, +} diff --git a/packages/ap_common_flutter_core/lib/src/utilities/app_store_util.dart b/packages/ap_common_flutter_core/lib/src/utilities/app_store_util.dart index e475d6b3..ccad6993 100644 --- a/packages/ap_common_flutter_core/lib/src/utilities/app_store_util.dart +++ b/packages/ap_common_flutter_core/lib/src/utilities/app_store_util.dart @@ -1,9 +1,16 @@ import 'package:ap_common_core/injector.dart'; +import 'package:ap_common_flutter_core/src/models/general_permission_status.dart'; abstract class AppStoreUtil { static AppStoreUtil get instance => injector.get(); + Future get isAppTrackingApiSupported; + + Future get trackingAuthorizationStatus; + Future openAppReview({ String defaultUrl = '', }); + + Future requestTrackingAuthorization(); } diff --git a/packages/ap_common_core/lib/src/utilities/notification_util.dart b/packages/ap_common_flutter_core/lib/src/utilities/notification_util.dart similarity index 60% rename from packages/ap_common_core/lib/src/utilities/notification_util.dart rename to packages/ap_common_flutter_core/lib/src/utilities/notification_util.dart index 2f8c4271..15f14e19 100644 --- a/packages/ap_common_core/lib/src/utilities/notification_util.dart +++ b/packages/ap_common_flutter_core/lib/src/utilities/notification_util.dart @@ -1,9 +1,11 @@ +import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_core/injector.dart'; +import 'package:flutter/material.dart'; abstract class NotificationUtil { static NotificationUtil get instance => injector.get(); - static bool get isSupport => true; + bool get isSupport; static const String androidResourceName = '@drawable/ic_stat_name'; @@ -23,19 +25,17 @@ abstract class NotificationUtil { void Function()? onSelectNotification, }) async {} - // Future scheduleWeeklyNotify({ - // required int id, - // required String androidChannelId, - // required String androidChannelDescription, - // required int weekday, - // required TimeOfDay time, - // required String title, - // required String content, - // String androidResourceIcon = androidResourceName, - // void Function()? onSelectNotification, - // }) async { - // - // } + Future scheduleWeeklyNotify({ + required int id, + required String androidChannelId, + required String androidChannelDescription, + required int weekday, + required TimeOfDay time, + required String title, + required String content, + String androidResourceIcon = androidResourceName, + void Function()? onSelectNotification, + }); Future schedule({ required int id, @@ -59,4 +59,16 @@ abstract class NotificationUtil { }); Future cancelAll(); + + ///Additional for ap_common + + Future scheduleCourseNotify({ + required BuildContext context, + required CourseNotify courseNotify, + required int weekday, + bool enableVibration = true, + int beforeMinutes = 10, + String? androidResourceIcon = androidResourceName, + VoidCallback? onSelectNotification, + }); } diff --git a/packages/ap_common_flutter_platform/.flutter-plugins b/packages/ap_common_flutter_platform/.flutter-plugins new file mode 100644 index 00000000..1392b849 --- /dev/null +++ b/packages/ap_common_flutter_platform/.flutter-plugins @@ -0,0 +1,54 @@ +# This is a generated file; do not edit or check into version control. +add_2_calendar=/Users/rainvisitor/.pub-cache/hosted/pub.dev/add_2_calendar-3.0.1/ +app_tracking_transparency=/Users/rainvisitor/.pub-cache/hosted/pub.dev/app_tracking_transparency-2.0.6/ +file_saver=/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/ +file_selector_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.3/ +file_selector_macos=/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.4+2/ +file_selector_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+3/ +flutter_keyboard_visibility=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/ +flutter_keyboard_visibility_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_linux-1.0.0/ +flutter_keyboard_visibility_macos=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_macos-1.0.0/ +flutter_keyboard_visibility_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_web-2.0.0/ +flutter_keyboard_visibility_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_windows-1.0.0/ +flutter_local_notifications=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications-17.2.3/ +flutter_local_notifications_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications_linux-4.0.1/ +flutter_plugin_android_lifecycle=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.23/ +google_sign_in=/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in-6.2.1/ +google_sign_in_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_android-6.1.33/ +google_sign_in_ios=/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.8/ +google_sign_in_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_web-0.12.4+2/ +image_picker=/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker-1.1.2/ +image_picker_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+15/ +image_picker_for_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_for_web-3.0.5/ +image_picker_ios=/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12/ +image_picker_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+1/ +image_picker_macos=/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1+1/ +image_picker_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1+1/ +in_app_review=/Users/rainvisitor/.pub-cache/hosted/pub.dev/in_app_review-2.0.9/ +package_info_plus=/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/ +path_provider=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider-2.1.4/ +path_provider_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_android-2.2.12/ +path_provider_foundation=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/ +path_provider_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/ +path_provider_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/ +photo_manager=/Users/rainvisitor/.pub-cache/hosted/pub.dev/photo_manager-3.5.0/ +printing=/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.1/ +share_plus=/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/ +shared_preferences=/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences-2.3.2/ +shared_preferences_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.3/ +shared_preferences_foundation=/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/ +shared_preferences_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/ +shared_preferences_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/ +shared_preferences_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/ +sign_in_with_apple=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple-6.1.3/ +sign_in_with_apple_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple_web-2.1.0/ +sqflite=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite-2.4.0/ +sqflite_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_android-2.4.0-1/ +sqflite_darwin=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.1-0/ +url_launcher=/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher-6.3.0/ +url_launcher_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.12/ +url_launcher_ios=/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.1/ +url_launcher_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.0/ +url_launcher_macos=/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.1/ +url_launcher_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.3/ +url_launcher_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.2/ diff --git a/packages/ap_common_flutter_platform/.flutter-plugins-dependencies b/packages/ap_common_flutter_platform/.flutter-plugins-dependencies new file mode 100644 index 00000000..99d6b30a --- /dev/null +++ b/packages/ap_common_flutter_platform/.flutter-plugins-dependencies @@ -0,0 +1 @@ +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"add_2_calendar","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/add_2_calendar-3.0.1/","native_build":true,"dependencies":[]},{"name":"app_tracking_transparency","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/app_tracking_transparency-2.0.6/","native_build":true,"dependencies":[]},{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","native_build":true,"dependencies":[]},{"name":"flutter_keyboard_visibility","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/","native_build":true,"dependencies":[]},{"name":"flutter_local_notifications","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications-17.2.3/","native_build":true,"dependencies":[]},{"name":"google_sign_in_ios","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.8/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"image_picker_ios","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12/","native_build":true,"dependencies":[]},{"name":"in_app_review","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/in_app_review-2.0.9/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"photo_manager","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/photo_manager-3.5.0/","native_build":true,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.1/","native_build":true,"dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"sign_in_with_apple","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple-6.1.3/","native_build":true,"dependencies":[]},{"name":"sqflite_darwin","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.1-0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"url_launcher_ios","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.1/","native_build":true,"dependencies":[]}],"android":[{"name":"add_2_calendar","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/add_2_calendar-3.0.1/","native_build":true,"dependencies":[]},{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","native_build":true,"dependencies":[]},{"name":"flutter_keyboard_visibility","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/","native_build":true,"dependencies":[]},{"name":"flutter_local_notifications","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications-17.2.3/","native_build":true,"dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.23/","native_build":true,"dependencies":[]},{"name":"google_sign_in_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_android-6.1.33/","native_build":true,"dependencies":[]},{"name":"image_picker_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+15/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"]},{"name":"in_app_review","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/in_app_review-2.0.9/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_android-2.2.12/","native_build":true,"dependencies":[]},{"name":"photo_manager","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/photo_manager-3.5.0/","native_build":true,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.1/","native_build":true,"dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.3/","native_build":true,"dependencies":[]},{"name":"sign_in_with_apple","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple-6.1.3/","native_build":true,"dependencies":[]},{"name":"sqflite_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_android-2.4.0-1/","native_build":true,"dependencies":[]},{"name":"url_launcher_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.12/","native_build":true,"dependencies":[]}],"macos":[{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","native_build":true,"dependencies":[]},{"name":"file_selector_macos","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.4+2/","native_build":true,"dependencies":[]},{"name":"flutter_keyboard_visibility_macos","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_macos-1.0.0/","native_build":false,"dependencies":[]},{"name":"flutter_local_notifications","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications-17.2.3/","native_build":true,"dependencies":[]},{"name":"google_sign_in_ios","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.8/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"image_picker_macos","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1+1/","native_build":false,"dependencies":["file_selector_macos"]},{"name":"in_app_review","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/in_app_review-2.0.9/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"photo_manager","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/photo_manager-3.5.0/","native_build":true,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.1/","native_build":true,"dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"sign_in_with_apple","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple-6.1.3/","native_build":true,"dependencies":[]},{"name":"sqflite_darwin","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.1-0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"url_launcher_macos","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.1/","native_build":true,"dependencies":[]}],"linux":[{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","native_build":true,"dependencies":["path_provider_linux"]},{"name":"file_selector_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.3/","native_build":true,"dependencies":[]},{"name":"flutter_keyboard_visibility_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_linux-1.0.0/","native_build":false,"dependencies":[]},{"name":"flutter_local_notifications_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications_linux-4.0.1/","native_build":false,"dependencies":[]},{"name":"image_picker_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+1/","native_build":false,"dependencies":["file_selector_linux"]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":false,"dependencies":[]},{"name":"path_provider_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.1/","native_build":true,"dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","native_build":false,"dependencies":["url_launcher_linux"]},{"name":"shared_preferences_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]},{"name":"url_launcher_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.0/","native_build":true,"dependencies":[]}],"windows":[{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","native_build":true,"dependencies":["path_provider_windows"]},{"name":"file_selector_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+3/","native_build":true,"dependencies":[]},{"name":"flutter_keyboard_visibility_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_windows-1.0.0/","native_build":false,"dependencies":[]},{"name":"image_picker_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1+1/","native_build":false,"dependencies":["file_selector_windows"]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":false,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.1/","native_build":true,"dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","native_build":true,"dependencies":["url_launcher_windows"]},{"name":"shared_preferences_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]},{"name":"url_launcher_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.2/","native_build":true,"dependencies":[]}],"web":[{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","dependencies":[]},{"name":"flutter_keyboard_visibility_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_web-2.0.0/","dependencies":[]},{"name":"google_sign_in_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_web-0.12.4+2/","dependencies":[]},{"name":"image_picker_for_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_for_web-3.0.5/","dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.1/","dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","dependencies":["url_launcher_web"]},{"name":"shared_preferences_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]},{"name":"sign_in_with_apple_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple_web-2.1.0/","dependencies":[]},{"name":"url_launcher_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.3/","dependencies":[]}]},"dependencyGraph":[{"name":"add_2_calendar","dependencies":[]},{"name":"app_tracking_transparency","dependencies":[]},{"name":"file_saver","dependencies":["path_provider","path_provider_windows","path_provider_linux"]},{"name":"file_selector_linux","dependencies":[]},{"name":"file_selector_macos","dependencies":[]},{"name":"file_selector_windows","dependencies":[]},{"name":"flutter_keyboard_visibility","dependencies":["flutter_keyboard_visibility_linux","flutter_keyboard_visibility_macos","flutter_keyboard_visibility_web","flutter_keyboard_visibility_windows"]},{"name":"flutter_keyboard_visibility_linux","dependencies":[]},{"name":"flutter_keyboard_visibility_macos","dependencies":[]},{"name":"flutter_keyboard_visibility_web","dependencies":[]},{"name":"flutter_keyboard_visibility_windows","dependencies":[]},{"name":"flutter_local_notifications","dependencies":["flutter_local_notifications_linux"]},{"name":"flutter_local_notifications_linux","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"google_sign_in","dependencies":["google_sign_in_android","google_sign_in_ios","google_sign_in_web"]},{"name":"google_sign_in_android","dependencies":[]},{"name":"google_sign_in_ios","dependencies":[]},{"name":"google_sign_in_web","dependencies":[]},{"name":"image_picker","dependencies":["image_picker_android","image_picker_for_web","image_picker_ios","image_picker_linux","image_picker_macos","image_picker_windows"]},{"name":"image_picker_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"image_picker_ios","dependencies":[]},{"name":"image_picker_linux","dependencies":["file_selector_linux"]},{"name":"image_picker_macos","dependencies":["file_selector_macos"]},{"name":"image_picker_windows","dependencies":["file_selector_windows"]},{"name":"in_app_review","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"photo_manager","dependencies":[]},{"name":"printing","dependencies":[]},{"name":"share_plus","dependencies":["url_launcher_web","url_launcher_windows","url_launcher_linux"]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"sign_in_with_apple","dependencies":["sign_in_with_apple_web"]},{"name":"sign_in_with_apple_web","dependencies":[]},{"name":"sqflite","dependencies":["sqflite_android","sqflite_darwin"]},{"name":"sqflite_android","dependencies":[]},{"name":"sqflite_darwin","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2024-10-08 14:30:41.254330","version":"3.24.3","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/packages/ap_common_flutter_platform/.gitignore b/packages/ap_common_flutter_platform/.gitignore new file mode 100644 index 00000000..ac5aa989 --- /dev/null +++ b/packages/ap_common_flutter_platform/.gitignore @@ -0,0 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ diff --git a/packages/ap_common_flutter_platform/.metadata b/packages/ap_common_flutter_platform/.metadata new file mode 100644 index 00000000..24472f12 --- /dev/null +++ b/packages/ap_common_flutter_platform/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "2663184aa79047d0a33a14a3b607954f8fdd8730" + channel: "stable" + +project_type: package diff --git a/packages/ap_common_flutter_platform/CHANGELOG.md b/packages/ap_common_flutter_platform/CHANGELOG.md new file mode 100644 index 00000000..41cc7d81 --- /dev/null +++ b/packages/ap_common_flutter_platform/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* TODO: Describe initial release. diff --git a/packages/ap_common_flutter_platform/LICENSE b/packages/ap_common_flutter_platform/LICENSE new file mode 100644 index 00000000..ba75c69f --- /dev/null +++ b/packages/ap_common_flutter_platform/LICENSE @@ -0,0 +1 @@ +TODO: Add your license here. diff --git a/packages/ap_common_flutter_platform/README.md b/packages/ap_common_flutter_platform/README.md new file mode 100644 index 00000000..4a260d8d --- /dev/null +++ b/packages/ap_common_flutter_platform/README.md @@ -0,0 +1,39 @@ + + +TODO: Put a short description of the package here that helps potential users +know whether this package might be useful for them. + +## Features + +TODO: List what your package can do. Maybe include images, gifs, or videos. + +## Getting started + +TODO: List prerequisites and provide or point to information on how to +start using the package. + +## Usage + +TODO: Include short and useful examples for package users. Add longer examples +to `/example` folder. + +```dart +const like = 'sample'; +``` + +## Additional information + +TODO: Tell users more about the package: where to find more information, how to +contribute to the package, how to file issues, what response they can expect +from the package authors, and more. diff --git a/packages/ap_common_flutter_platform/lib/ap_common_flutter_platform.dart b/packages/ap_common_flutter_platform/lib/ap_common_flutter_platform.dart new file mode 100644 index 00000000..60fdb3e9 --- /dev/null +++ b/packages/ap_common_flutter_platform/lib/ap_common_flutter_platform.dart @@ -0,0 +1,6 @@ +export 'src/utilities/ap_media_util.dart'; +export 'src/utilities/ap_platform_util.dart'; +export 'src/utilities/app_store_util.dart'; +export 'src/utilities/notification_utils.dart'; +export 'src/utilities/platform_calendar_util.dart'; +export 'src/utilities/preferences.dart'; diff --git a/packages/ap_common/lib/utils/ap_media_util.dart b/packages/ap_common_flutter_platform/lib/src/utilities/ap_media_util.dart similarity index 98% rename from packages/ap_common/lib/utils/ap_media_util.dart rename to packages/ap_common_flutter_platform/lib/src/utilities/ap_media_util.dart index d312b5c6..6ed5d9e9 100644 --- a/packages/ap_common/lib/utils/ap_media_util.dart +++ b/packages/ap_common_flutter_platform/lib/src/utilities/ap_media_util.dart @@ -1,6 +1,6 @@ import 'dart:io'; -import 'package:ap_common/api/announcement_helper.dart'; +import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:file_saver/file_saver.dart'; import 'package:flutter/foundation.dart'; diff --git a/packages/ap_common/lib/utils/ap_platform_util.dart b/packages/ap_common_flutter_platform/lib/src/utilities/ap_platform_util.dart similarity index 100% rename from packages/ap_common/lib/utils/ap_platform_util.dart rename to packages/ap_common_flutter_platform/lib/src/utilities/ap_platform_util.dart diff --git a/packages/ap_common_flutter_platform/lib/src/utilities/app_store_util.dart b/packages/ap_common_flutter_platform/lib/src/utilities/app_store_util.dart new file mode 100644 index 00000000..42faafb3 --- /dev/null +++ b/packages/ap_common_flutter_platform/lib/src/utilities/app_store_util.dart @@ -0,0 +1,50 @@ +import 'dart:io'; + +import 'package:ap_common_core/injector.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:app_tracking_transparency/app_tracking_transparency.dart'; +import 'package:flutter/foundation.dart'; +import 'package:in_app_review/in_app_review.dart'; + +class ApAppStoreUtil extends AppStoreUtil { + static ApAppStoreUtil get instance => injector.get(); + + @override + Future openAppReview({ + String defaultUrl = '', + }) async { + final InAppReview inAppReview = InAppReview.instance; + if (!kIsWeb && + (Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + (await inAppReview.isAvailable())) { + inAppReview.requestReview(); + } else { + PlatformUtil.instance.launchUrl(defaultUrl); + } + } + + @override + Future get isAppTrackingApiSupported async { + if (!kIsWeb && Platform.isIOS) { + return await AppTrackingTransparency.trackingAuthorizationStatus == + TrackingStatus.notSupported; + } else { + return false; + } + } + + @override + Future get trackingAuthorizationStatus async => + switch (await AppTrackingTransparency.trackingAuthorizationStatus) { + TrackingStatus.notDetermined => GeneralPermissionStatus.notDetermined, + TrackingStatus.restricted => GeneralPermissionStatus.restricted, + TrackingStatus.denied => GeneralPermissionStatus.denied, + TrackingStatus.authorized => GeneralPermissionStatus.authorized, + TrackingStatus.notSupported => GeneralPermissionStatus.notSupported, + }; + + @override + Future requestTrackingAuthorization() { + return AppTrackingTransparency.requestTrackingAuthorization(); + } +} diff --git a/packages/ap_common/lib/utils/notification_utils.dart b/packages/ap_common_flutter_platform/lib/src/utilities/notification_utils.dart similarity index 99% rename from packages/ap_common/lib/utils/notification_utils.dart rename to packages/ap_common_flutter_platform/lib/src/utilities/notification_utils.dart index 9a78fe40..d8ff1abc 100644 --- a/packages/ap_common/lib/utils/notification_utils.dart +++ b/packages/ap_common_flutter_platform/lib/src/utilities/notification_utils.dart @@ -19,7 +19,8 @@ class ApNotificationUtil extends NotificationUtil { static const int course = 101; static const int fcm = 200; - static bool get isSupport => + @override + bool get isSupport => !kIsWeb && (Platform.isAndroid || Platform.isIOS || Platform.isMacOS); static ApNotificationUtil get instance => @@ -120,6 +121,7 @@ class ApNotificationUtil extends NotificationUtil { ); } + @override Future scheduleCourseNotify({ required BuildContext context, required CourseNotify courseNotify, @@ -127,7 +129,6 @@ class ApNotificationUtil extends NotificationUtil { bool enableVibration = true, int beforeMinutes = 10, String? androidResourceIcon = androidResourceName, - InitializationSettings? settings, VoidCallback? onSelectNotification, }) async { final ApLocalizations ap = ApLocalizations.of(context); @@ -156,7 +157,7 @@ class ApNotificationUtil extends NotificationUtil { ); } - //TODO: use interface + @override Future scheduleWeeklyNotify({ required int id, required String androidChannelId, diff --git a/packages/ap_common/lib/utils/platform_calendar_util.dart b/packages/ap_common_flutter_platform/lib/src/utilities/platform_calendar_util.dart similarity index 100% rename from packages/ap_common/lib/utils/platform_calendar_util.dart rename to packages/ap_common_flutter_platform/lib/src/utilities/platform_calendar_util.dart diff --git a/packages/ap_common/lib/utils/preferences.dart b/packages/ap_common_flutter_platform/lib/src/utilities/preferences.dart similarity index 100% rename from packages/ap_common/lib/utils/preferences.dart rename to packages/ap_common_flutter_platform/lib/src/utilities/preferences.dart diff --git a/packages/ap_common_flutter_platform/pubspec.yaml b/packages/ap_common_flutter_platform/pubspec.yaml new file mode 100644 index 00000000..91c427fe --- /dev/null +++ b/packages/ap_common_flutter_platform/pubspec.yaml @@ -0,0 +1,40 @@ +name: ap_common_flutter_platform +description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" +version: 0.0.1 +homepage: https://github.com/abc873693/ap_common +repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_flutter_platform + +environment: + sdk: ^3.5.3 + flutter: ">=1.17.0" + +dependencies: + flutter: + sdk: flutter + ap_common_core: ^0.0.1 + ap_common_flutter_core: ^0.0.1 + + app_tracking_transparency: ^2.0.2+4 + flutter_local_notifications: ^17.2.2 + shared_preferences: ^2.2.2 + url_launcher: ^6.2.5 + share_plus: ">=9.0.0 <=10.0.0" + package_info_plus: ^8.0.2 + cached_network_image: ^3.3.1 + flutter_keyboard_visibility: ^6.0.0 + add_2_calendar: ^3.0.1 + in_app_review: ^2.0.3 + printing: ^5.10.4 + path: ^1.7.0 + path_provider: ^2.1.2 + google_sign_in: ^6.2.1 + sign_in_with_apple: ^6.1.1 + image_picker: ^1.0.7 + photo_manager: ^3.0.0 + file_saver: ^0.2.12 + +dev_dependencies: + flutter_test: + sdk: flutter + +flutter: From 803b2dcbb37d970de803670c7a76404356c4a651 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Tue, 8 Oct 2024 19:10:53 +0800 Subject: [PATCH 15/41] feat: move UI implement to `ap_common_flutter_ui` --- README.md | 17 +- apps/example/ios/Podfile.lock | 10 +- apps/example/lib/app.dart | 12 +- apps/example/lib/main.dart | 16 +- apps/example/lib/pages/diolog_utils_page.dart | 7 +- apps/example/lib/pages/home_page.dart | 37 +- apps/example/lib/pages/login_page.dart | 53 +- .../lib/pages/notification_utils_page.dart | 92 +- apps/example/lib/pages/setting_page.dart | 32 +- apps/example/lib/pages/shcool_info_page.dart | 16 +- apps/example/lib/pages/study/course_page.dart | 11 +- apps/example/lib/pages/study/score_page.dart | 5 +- apps/example/lib/pages/user_info_page.dart | 3 +- .../Flutter/GeneratedPluginRegistrant.swift | 2 +- apps/example/pubspec.lock | 77 +- apps/example/pubspec_overrides.yaml | 12 +- packages/ap_common/.gitignore | 48 +- packages/ap_common/CHANGELOG.md | 5 + packages/ap_common/LICENSE | 2 +- packages/ap_common/README.md | 42 +- packages/ap_common/lib/ap_common.dart | 23 +- .../lib/resources/ap_image_assets.dart | 25 - .../lib/resources/ap_image_icons.dart | 10 - packages/ap_common/pubspec.lock | 1513 ----------------- packages/ap_common/pubspec.yaml | 34 +- packages/ap_common/test/ap_common_test.dart | 11 - packages/ap_common/test/model_test.dart | 2 +- .../.flutter-plugins | 22 + .../.flutter-plugins-dependencies | 1 + packages/ap_common_announcement_ui/.gitignore | 29 + packages/ap_common_announcement_ui/.metadata | 10 + .../ap_common_announcement_ui/CHANGELOG.md | 3 + packages/ap_common_announcement_ui/LICENSE | 9 + packages/ap_common_announcement_ui/README.md | 34 + .../lib/ap_common_announcement_ui.dart | 5 + .../lib/src}/api/announcement_helper.dart | 0 .../lib/src}/api/github_helper.dart | 0 .../lib/src}/api/imgur_helper.dart | 0 .../src/ui}/announcement_content_page.dart | 7 +- .../lib/src/ui}/black_list_page.dart | 7 +- .../lib/src/ui}/edit_page.dart | 12 +- .../lib/src/ui}/home_page.dart | 14 +- .../ap_common_announcement_ui/pubspec.yaml | 35 + packages/ap_common_core/README.md | 17 +- .../ap_common_core/lib/ap_common_core.dart | 18 + packages/ap_common_core/lib/injector.dart | 2 + packages/ap_common_core/pubspec.yaml | 2 - .../src/utils/firebase_analytics_utils.dart | 3 +- packages/ap_common_flutter_core/README.md | 17 +- .../lib/ap_common_flutter_core.dart | 20 + packages/ap_common_flutter_core/pubspec.yaml | 2 +- .../.flutter-plugins | 15 - .../.flutter-plugins-dependencies | 2 +- .../ap_common_flutter_platform/CHANGELOG.md | 2 +- packages/ap_common_flutter_platform/LICENSE | 10 +- packages/ap_common_flutter_platform/README.md | 55 +- .../ap_common_flutter_platform/pubspec.yaml | 16 +- .../ap_common_flutter_ui/.flutter-plugins | 16 + .../.flutter-plugins-dependencies | 1 + packages/ap_common_flutter_ui/.gitignore | 29 + packages/ap_common_flutter_ui/.metadata | 10 + packages/ap_common_flutter_ui/CHANGELOG.md | 3 + packages/ap_common_flutter_ui/LICENSE | 9 + packages/ap_common_flutter_ui/README.md | 34 + .../assets/icons/barcode.png | Bin .../assets/icons/calendar_import.png | Bin .../assets/icons/qrcode.png | Bin .../assets/images/dash_line_dark.webp | Bin .../assets/images/dash_line_light.webp | Bin .../assets/images/drawer_background_dark.webp | Bin .../images/drawer_background_light.webp | Bin .../assets/images/email.webp | Bin .../assets/images/fb.webp | Bin .../assets/images/gdg_on_campus_nkust_itc.jpg | Bin .../assets/images/github.webp | Bin .../assets/images/instagram.png | Bin .../assets/images/nkutst_itc.webp | Bin .../assets/images/nsysu_gdsc.png | Bin .../lib/ap_common_flutter_ui.dart | 31 + .../lib/src}/pages/about_us_page.dart | 5 +- .../lib/src}/resources/ap_colors.dart | 0 .../lib/src/resources/ap_image_assets.dart | 28 + .../lib/src/resources/ap_image_icons.dart | 12 + .../lib/src}/resources/ap_theme.dart | 4 +- .../lib/src}/resources/resources.dart | 0 .../lib/src}/scaffold/course_scaffold.dart | 11 +- .../lib/src}/scaffold/home_page_scaffold.dart | 7 +- .../src}/scaffold/image_viewer_scaffold.dart | 2 +- .../lib/src}/scaffold/login_scaffold.dart | 4 +- .../lib/src}/scaffold/score_scaffold.dart | 7 +- .../lib/src}/scaffold/user_info_scaffold.dart | 5 +- .../lib/src}/utils/ap_ui_util.dart | 8 +- .../lib/src}/utils/ap_utils.dart | 6 +- .../lib/src}/utils/app_tracking_utils.dart | 4 +- .../lib/src}/utils/dialog_utils.dart | 6 +- .../lib/src}/utils/toast.dart | 0 .../src}/views/notification_list_view.dart | 6 +- .../lib/src}/views/pdf_view.dart | 4 +- .../lib/src}/views/phone_list_view.dart | 6 +- .../lib/src}/widgets/ap_drawer.dart | 2 +- .../lib/src}/widgets/ap_network_image.dart | 3 +- .../lib/src}/widgets/default_dialog.dart | 2 +- .../lib/src}/widgets/dialog_option.dart | 3 +- .../lib/src}/widgets/hint_content.dart | 2 +- .../lib/src}/widgets/item_picker.dart | 5 +- .../lib/src}/widgets/option_dialog.dart | 2 +- .../lib/src}/widgets/progress_dialog.dart | 2 +- .../src}/widgets/setting_page_widgets.dart | 5 +- .../lib/src}/widgets/yes_no_dialog.dart | 3 +- packages/ap_common_flutter_ui/pubspec.yaml | 40 + 110 files changed, 801 insertions(+), 2012 deletions(-) delete mode 100644 packages/ap_common/lib/resources/ap_image_assets.dart delete mode 100644 packages/ap_common/lib/resources/ap_image_icons.dart delete mode 100644 packages/ap_common/pubspec.lock delete mode 100644 packages/ap_common/test/ap_common_test.dart create mode 100644 packages/ap_common_announcement_ui/.flutter-plugins create mode 100644 packages/ap_common_announcement_ui/.flutter-plugins-dependencies create mode 100644 packages/ap_common_announcement_ui/.gitignore create mode 100644 packages/ap_common_announcement_ui/.metadata create mode 100644 packages/ap_common_announcement_ui/CHANGELOG.md create mode 100644 packages/ap_common_announcement_ui/LICENSE create mode 100644 packages/ap_common_announcement_ui/README.md create mode 100644 packages/ap_common_announcement_ui/lib/ap_common_announcement_ui.dart rename packages/{ap_common/lib => ap_common_announcement_ui/lib/src}/api/announcement_helper.dart (100%) rename packages/{ap_common/lib => ap_common_announcement_ui/lib/src}/api/github_helper.dart (100%) rename packages/{ap_common/lib => ap_common_announcement_ui/lib/src}/api/imgur_helper.dart (100%) rename packages/{ap_common/lib/pages => ap_common_announcement_ui/lib/src/ui}/announcement_content_page.dart (94%) rename packages/{ap_common/lib/pages/announcement => ap_common_announcement_ui/lib/src/ui}/black_list_page.dart (92%) rename packages/{ap_common/lib/pages/announcement => ap_common_announcement_ui/lib/src/ui}/edit_page.dart (98%) rename packages/{ap_common/lib/pages/announcement => ap_common_announcement_ui/lib/src/ui}/home_page.dart (98%) create mode 100644 packages/ap_common_announcement_ui/pubspec.yaml create mode 100644 packages/ap_common_flutter_ui/.flutter-plugins create mode 100644 packages/ap_common_flutter_ui/.flutter-plugins-dependencies create mode 100644 packages/ap_common_flutter_ui/.gitignore create mode 100644 packages/ap_common_flutter_ui/.metadata create mode 100644 packages/ap_common_flutter_ui/CHANGELOG.md create mode 100644 packages/ap_common_flutter_ui/LICENSE create mode 100644 packages/ap_common_flutter_ui/README.md rename packages/{ap_common => ap_common_flutter_ui}/assets/icons/barcode.png (100%) rename packages/{ap_common => ap_common_flutter_ui}/assets/icons/calendar_import.png (100%) rename packages/{ap_common => ap_common_flutter_ui}/assets/icons/qrcode.png (100%) rename packages/{ap_common => ap_common_flutter_ui}/assets/images/dash_line_dark.webp (100%) rename packages/{ap_common => ap_common_flutter_ui}/assets/images/dash_line_light.webp (100%) rename packages/{ap_common => ap_common_flutter_ui}/assets/images/drawer_background_dark.webp (100%) rename packages/{ap_common => ap_common_flutter_ui}/assets/images/drawer_background_light.webp (100%) rename packages/{ap_common => ap_common_flutter_ui}/assets/images/email.webp (100%) rename packages/{ap_common => ap_common_flutter_ui}/assets/images/fb.webp (100%) rename packages/{ap_common => ap_common_flutter_ui}/assets/images/gdg_on_campus_nkust_itc.jpg (100%) rename packages/{ap_common => ap_common_flutter_ui}/assets/images/github.webp (100%) rename packages/{ap_common => ap_common_flutter_ui}/assets/images/instagram.png (100%) rename packages/{ap_common => ap_common_flutter_ui}/assets/images/nkutst_itc.webp (100%) rename packages/{ap_common => ap_common_flutter_ui}/assets/images/nsysu_gdsc.png (100%) create mode 100644 packages/ap_common_flutter_ui/lib/ap_common_flutter_ui.dart rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/pages/about_us_page.dart (97%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/resources/ap_colors.dart (100%) create mode 100644 packages/ap_common_flutter_ui/lib/src/resources/ap_image_assets.dart create mode 100644 packages/ap_common_flutter_ui/lib/src/resources/ap_image_icons.dart rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/resources/ap_theme.dart (98%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/resources/resources.dart (100%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/scaffold/course_scaffold.dart (98%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/scaffold/home_page_scaffold.dart (96%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/scaffold/image_viewer_scaffold.dart (96%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/scaffold/login_scaffold.dart (98%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/scaffold/score_scaffold.dart (97%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/scaffold/user_info_scaffold.dart (96%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/utils/ap_ui_util.dart (63%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/utils/ap_utils.dart (96%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/utils/app_tracking_utils.dart (94%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/utils/dialog_utils.dart (95%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/utils/toast.dart (100%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/views/notification_list_view.dart (94%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/views/pdf_view.dart (93%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/views/phone_list_view.dart (95%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/widgets/ap_drawer.dart (98%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/widgets/ap_network_image.dart (87%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/widgets/default_dialog.dart (97%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/widgets/dialog_option.dart (89%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/widgets/hint_content.dart (93%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/widgets/item_picker.dart (87%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/widgets/option_dialog.dart (96%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/widgets/progress_dialog.dart (93%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/widgets/setting_page_widgets.dart (97%) rename packages/{ap_common/lib => ap_common_flutter_ui/lib/src}/widgets/yes_no_dialog.dart (97%) create mode 100644 packages/ap_common_flutter_ui/pubspec.yaml diff --git a/README.md b/README.md index 5481ec0c..eb8f6101 100644 --- a/README.md +++ b/README.md @@ -18,12 +18,17 @@ ## 套件 -| Name | pub.dev | 說明 | -|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|---------------------| -| `ap_common` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common/) | 函式庫與相關介面共用 | -| `ap_common_plugin` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_plugin.svg?style=flat-square)](https://pub.dev/packages/ap_common_plugin/) | 課表小工具 | -| `ap_common_firebase` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_firebase.svg?style=flat-square)](https://pub.dev/packages/ap_common_firebase/) | 服務 `Firebase` 的整合實作 | +| Name | pub.dev | 說明 | +|-------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------| +| `ap_common` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common/) | 函式庫與相關介面共用 | +| `ap_common_core` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common_core/) | 純 Dart 的基本類別 | +| `ap_common_flutter_core` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_core.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_core/) | 基於 Flutter 框架的核心基本類別 | +| `ap_common_flutter_platform` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_platform.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_platform/) | 原生功能實作 | +| `ap_common_flutter_ui` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_ui.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_ui/) | UI 實作但不包含原生功能整合 | +| `ap_common_flutter_announcement_ui` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_announcement_ui.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_announcement_ui/) | 最新消息服務相關的介面實作 | +| `ap_common_plugin` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_plugin.svg?style=flat-square)](https://pub.dev/packages/ap_common_plugin/) | 課表小工具 | +| `ap_common_firebase` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_firebase.svg?style=flat-square)](https://pub.dev/packages/ap_common_firebase/) | 服務 `Firebase` 的整合實作 | ## 套件使用要求 -- Flutter `v1.20` 以上 +- Flutter `v3.22` 以上 diff --git a/apps/example/ios/Podfile.lock b/apps/example/ios/Podfile.lock index a86b503b..03f1e83d 100644 --- a/apps/example/ios/Podfile.lock +++ b/apps/example/ios/Podfile.lock @@ -57,7 +57,7 @@ PODS: - FlutterMacOS - sign_in_with_apple (0.0.1): - Flutter - - sqflite (0.0.3): + - sqflite_darwin (0.0.4): - Flutter - FlutterMacOS - url_launcher_ios (0.0.1): @@ -81,7 +81,7 @@ DEPENDENCIES: - share_plus (from `.symlinks/plugins/share_plus/ios`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - sign_in_with_apple (from `.symlinks/plugins/sign_in_with_apple/ios`) - - sqflite (from `.symlinks/plugins/sqflite/darwin`) + - sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) SPEC REPOS: @@ -126,8 +126,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/shared_preferences_foundation/darwin" sign_in_with_apple: :path: ".symlinks/plugins/sign_in_with_apple/ios" - sqflite: - :path: ".symlinks/plugins/sqflite/darwin" + sqflite_darwin: + :path: ".symlinks/plugins/sqflite_darwin/darwin" url_launcher_ios: :path: ".symlinks/plugins/url_launcher_ios/ios" @@ -153,7 +153,7 @@ SPEC CHECKSUMS: share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 sign_in_with_apple: f3bf75217ea4c2c8b91823f225d70230119b8440 - sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec + sqflite_darwin: a553b1fd6fe66f53bbb0fe5b4f5bab93f08d7a13 url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe PODFILE CHECKSUM: c9ef12c3fd571f251c0b25e8bb818e50ec70ffe1 diff --git a/apps/example/lib/app.dart b/apps/example/lib/app.dart index b30352ab..a8d333e5 100644 --- a/apps/example/lib/app.dart +++ b/apps/example/lib/app.dart @@ -1,8 +1,4 @@ -import 'package:ap_common/pages/about_us_page.dart'; -import 'package:ap_common/pages/announcement/home_page.dart'; -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; -import 'package:ap_common/utils/preferences.dart'; +import 'package:ap_common/ap_common.dart'; import 'package:ap_common_example/config/constants.dart'; import 'package:ap_common_example/pages/home_page.dart'; import 'package:ap_common_example/utils/app_localizations.dart'; @@ -36,8 +32,8 @@ class MyAppState extends State with WidgetsBindingObserver { @override void initState() { - themeMode = ThemeMode - .values[Preferences.getInt(Constants.PREF_THEME_MODE_INDEX, 0)]; + themeMode = ThemeMode.values[ + PreferenceUtil.instance.getInt(Constants.PREF_THEME_MODE_INDEX, 0)]; WidgetsBinding.instance.addObserver(this); Future.microtask(() async { SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge); @@ -72,7 +68,7 @@ class MyAppState extends State with WidgetsBindingObserver { child: MaterialApp( localeResolutionCallback: (Locale? locale, Iterable supportedLocales) { - final String languageCode = Preferences.getString( + final String languageCode = PreferenceUtil.instance.getString( Constants.PREF_LANGUAGE_CODE, ApSupportLanguageConstants.system, ); diff --git a/apps/example/lib/main.dart b/apps/example/lib/main.dart index 108ed880..2a12889e 100644 --- a/apps/example/lib/main.dart +++ b/apps/example/lib/main.dart @@ -1,7 +1,6 @@ import 'dart:io'; -import 'package:ap_common/resources/ap_icon.dart'; -import 'package:ap_common/utils/preferences.dart'; +import 'package:ap_common/ap_common.dart'; import 'package:ap_common_example/app.dart'; import 'package:ap_common_example/config/constants.dart'; import 'package:flutter/cupertino.dart'; @@ -12,13 +11,16 @@ import 'package:google_sign_in_dartio/google_sign_in_dartio.dart'; // ignore_for_file: lines_longer_than_80_chars Future main() async { WidgetsFlutterBinding.ensureInitialized(); - await Preferences.init(key: Constants.key, iv: Constants.iv); + registerOneForAll(); + await (PreferenceUtil.instance as ApPreferenceUtil) + .init(key: Constants.key, iv: Constants.iv); if (!kIsWeb && (Platform.isMacOS || Platform.isWindows || Platform.isLinux)) { GoogleSignInDart.register( - clientId: - '141403473068-9gii2blqbggijifq0ijoqkqv8oj2i2ff.apps.googleusercontent.com',); + clientId: + '141403473068-9gii2blqbggijifq0ijoqkqv8oj2i2ff.apps.googleusercontent.com', + ); } - ApIcon.code = - Preferences.getString(Constants.PREF_ICON_STYLE_CODE, ApIcon.outlined); + ApIcon.code = PreferenceUtil.instance + .getString(Constants.PREF_ICON_STYLE_CODE, ApIcon.outlined); runApp(const MyApp()); } diff --git a/apps/example/lib/pages/diolog_utils_page.dart b/apps/example/lib/pages/diolog_utils_page.dart index da8698e5..3f04124c 100644 --- a/apps/example/lib/pages/diolog_utils_page.dart +++ b/apps/example/lib/pages/diolog_utils_page.dart @@ -1,8 +1,4 @@ -import 'package:ap_common/models/version_info.dart'; -import 'package:ap_common/utils/ap_utils.dart'; -import 'package:ap_common/utils/app_tracking_utils.dart'; -import 'package:ap_common/utils/dialog_utils.dart'; -import 'package:ap_common/utils/notification_utils.dart'; +import 'package:ap_common/ap_common.dart'; import 'package:ap_common_example/config/constants.dart'; import 'package:ap_common_example/utils/app_localizations.dart'; import 'package:flutter/material.dart'; @@ -15,7 +11,6 @@ class DialogUtilsTestPage extends StatefulWidget { class _DialogUtilsTestPageState extends State { late AppLocalizations app; - Day day = NotificationUtils.getDay(DateTime.now().weekday); TimeOfDay time = TimeOfDay.now(); @override diff --git a/apps/example/lib/pages/home_page.dart b/apps/example/lib/pages/home_page.dart index 7c57f0a9..df2f8f52 100644 --- a/apps/example/lib/pages/home_page.dart +++ b/apps/example/lib/pages/home_page.dart @@ -1,16 +1,4 @@ -import 'package:ap_common/api/announcement_helper.dart'; -import 'package:ap_common/models/user_info.dart'; -import 'package:ap_common/pages/about_us_page.dart'; -import 'package:ap_common/pages/announcement/home_page.dart'; -import 'package:ap_common/pages/announcement_content_page.dart'; -import 'package:ap_common/resources/ap_icon.dart'; -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/scaffold/home_page_scaffold.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; -import 'package:ap_common/utils/ap_utils.dart'; -import 'package:ap_common/utils/notification_utils.dart'; -import 'package:ap_common/utils/preferences.dart'; -import 'package:ap_common/widgets/ap_drawer.dart'; +import 'package:ap_common/ap_common.dart'; import 'package:ap_common_example/config/constants.dart'; import 'package:ap_common_example/pages/diolog_utils_page.dart'; import 'package:ap_common_example/pages/login_page.dart'; @@ -88,7 +76,7 @@ class HomePageState extends State { @override void initState() { _getAnnouncements(); - if (Preferences.getBool(Constants.PREF_AUTO_LOGIN, false)) { + if (PreferenceUtil.instance.getBool(Constants.PREF_AUTO_LOGIN, false)) { _login(); } else { checkLogin(); @@ -126,8 +114,8 @@ class HomePageState extends State { content: content, drawer: ApDrawer( userInfo: userInfo, - displayPicture: - Preferences.getBool(Constants.PREF_DISPLAY_PICTURE, true), + displayPicture: PreferenceUtil.instance + .getBool(Constants.PREF_DISPLAY_PICTURE, true), imageAsset: drawerIcon, onTapHeader: () { if (isLogin) { @@ -194,7 +182,7 @@ class HomePageState extends State { SchoolInfoPage(), ), ), - if (NotificationUtils.isSupport) + if (NotificationUtil.instance.isSupport) DrawerItem( icon: ApIcon.dateRange, title: app.localNotificationTest, @@ -228,7 +216,8 @@ class HomePageState extends State { icon: ApIcon.powerSettingsNew, title: ap.logout, onTap: () async { - await Preferences.setBool(Constants.PREF_AUTO_LOGIN, false); + await PreferenceUtil.instance + .setBool(Constants.PREF_AUTO_LOGIN, false); isLogin = false; userInfo = null; content = null; @@ -283,7 +272,7 @@ class HomePageState extends State { break; } } else { - ApUtils.showToast(context, ap.notLogin); + UiUtil.instance.showToast(context, ap.notLogin); } } @@ -337,7 +326,7 @@ class HomePageState extends State { setState(() { this.userInfo = userInfo; }); - if (Preferences.getBool(Constants.PREF_DISPLAY_PICTURE, true)) { + if (PreferenceUtil.instance.getBool(Constants.PREF_DISPLAY_PICTURE, true)) { _getUserPicture(); } } @@ -362,12 +351,12 @@ class HomePageState extends State { Future _login() async { await Future.delayed(const Duration(microseconds: 30)); - // var username = Preferences.getString(Constants.PREF_USERNAME, ''); + // var username = PreferenceUtil.instance.getString(Constants.PREF_USERNAME, ''); // ignore: lines_longer_than_80_chars - // var password = Preferences.getStringSecurity(Constants.PREF_PASSWORD, ''); + // var password = PreferenceUtil.instance.getStringSecurity(Constants.PREF_PASSWORD, ''); //to login isLogin = true; - Preferences.setBool(Constants.PREF_IS_OFFLINE_LOGIN, false); + PreferenceUtil.instance.setBool(Constants.PREF_IS_OFFLINE_LOGIN, false); _getUserInfo(); if (state != HomeState.finish) { _getAnnouncements(); @@ -418,7 +407,7 @@ class HomePageState extends State { void _openPage(Widget page, {bool needLogin = false}) { if (!isTablet) Navigator.of(context).pop(); if (needLogin && !isLogin) { - ApUtils.showToast( + UiUtil.instance.showToast( context, ApLocalizations.of(context).notLoginHint, ); diff --git a/apps/example/lib/pages/login_page.dart b/apps/example/lib/pages/login_page.dart index 89750ecf..fb526afc 100644 --- a/apps/example/lib/pages/login_page.dart +++ b/apps/example/lib/pages/login_page.dart @@ -1,8 +1,4 @@ -import 'package:ap_common/scaffold/login_scaffold.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; -import 'package:ap_common/utils/ap_utils.dart'; -import 'package:ap_common/utils/preferences.dart'; -import 'package:ap_common/widgets/progress_dialog.dart'; +import 'package:ap_common/ap_common.dart'; import 'package:ap_common_example/config/constants.dart'; import 'package:ap_common_example/res/assets.dart'; import 'package:flutter/material.dart'; @@ -107,7 +103,7 @@ class LoginPageState extends State { // setState(() { // _username.text = username; // }); -// ApUtils.showToast(context, ap.firstLoginHint); +// UiUtil.instance.showToast(context, ap.firstLoginHint); // } // }, // ) @@ -119,8 +115,8 @@ class LoginPageState extends State { setState(() { isRememberPassword = value; if (!isRememberPassword!) isAutoLogin = false; - Preferences.setBool(Constants.PREF_AUTO_LOGIN, isAutoLogin!); - Preferences.setBool( + PreferenceUtil.instance.setBool(Constants.PREF_AUTO_LOGIN, isAutoLogin!); + PreferenceUtil.instance.setBool( Constants.PREF_REMEMBER_PASSWORD, isRememberPassword!, ); @@ -131,8 +127,8 @@ class LoginPageState extends State { setState(() { isAutoLogin = value; isRememberPassword = isAutoLogin; - Preferences.setBool(Constants.PREF_AUTO_LOGIN, isAutoLogin!); - Preferences.setBool( + PreferenceUtil.instance.setBool(Constants.PREF_AUTO_LOGIN, isAutoLogin!); + PreferenceUtil.instance.setBool( Constants.PREF_REMEMBER_PASSWORD, isRememberPassword!, ); @@ -141,19 +137,22 @@ class LoginPageState extends State { Future _getPreference() async { isRememberPassword = - Preferences.getBool(Constants.PREF_REMEMBER_PASSWORD, true); - isAutoLogin = Preferences.getBool(Constants.PREF_AUTO_LOGIN, false); + PreferenceUtil.instance.getBool(Constants.PREF_REMEMBER_PASSWORD, true); + isAutoLogin = + PreferenceUtil.instance.getBool(Constants.PREF_AUTO_LOGIN, false); setState(() { - _username.text = Preferences.getString(Constants.PREF_USERNAME, ''); + _username.text = + PreferenceUtil.instance.getString(Constants.PREF_USERNAME, ''); _password.text = isRememberPassword! - ? Preferences.getStringSecurity(Constants.PREF_PASSWORD, '') + ? PreferenceUtil.instance + .getStringSecurity(Constants.PREF_PASSWORD, '') : ''; }); } Future _login() async { if (_username.text.isEmpty || _password.text.isEmpty) { - ApUtils.showToast(context, ap.doNotEmpty, gravity: gravity); + UiUtil.instance.showToast(context, ap.doNotEmpty, gravity: gravity); } else { asyncLogin(); } @@ -168,36 +167,38 @@ class LoginPageState extends State { ), barrierDismissible: false, ); - Preferences.setString(Constants.PREF_USERNAME, _username.text); + PreferenceUtil.instance.setString(Constants.PREF_USERNAME, _username.text); Navigator.of(context, rootNavigator: true).pop(); - Preferences.setString(Constants.PREF_USERNAME, _username.text); + PreferenceUtil.instance.setString(Constants.PREF_USERNAME, _username.text); if (isRememberPassword!) { - Preferences.setStringSecurity(Constants.PREF_PASSWORD, _password.text); + PreferenceUtil.instance + .setStringSecurity(Constants.PREF_PASSWORD, _password.text); } - Preferences.setBool(Constants.PREF_IS_OFFLINE_LOGIN, false); + PreferenceUtil.instance.setBool(Constants.PREF_IS_OFFLINE_LOGIN, false); TextInput.finishAutofillContext(); Navigator.of(context).pop(true); } Future _offlineLogin() async { - final String username = Preferences.getString(Constants.PREF_USERNAME, ''); + final String username = + PreferenceUtil.instance.getString(Constants.PREF_USERNAME, ''); final String password = - Preferences.getStringSecurity(Constants.PREF_PASSWORD, ''); + PreferenceUtil.instance.getStringSecurity(Constants.PREF_PASSWORD, ''); if (username.isEmpty || password.isEmpty) { - ApUtils.showToast(context, ap.noOfflineLoginData); + UiUtil.instance.showToast(context, ap.noOfflineLoginData); } else { if (username != _username.text || password != _password.text) { - ApUtils.showToast(context, ap.offlineLoginPasswordError); + UiUtil.instance.showToast(context, ap.offlineLoginPasswordError); } else { - Preferences.setBool(Constants.PREF_IS_OFFLINE_LOGIN, true); - ApUtils.showToast(context, ap.loadOfflineData); + PreferenceUtil.instance.setBool(Constants.PREF_IS_OFFLINE_LOGIN, true); + UiUtil.instance.showToast(context, ap.loadOfflineData); Navigator.of(context).pop(true); } } } Future clearSetting() async { - Preferences.setBool(Constants.PREF_AUTO_LOGIN, false); + PreferenceUtil.instance.setBool(Constants.PREF_AUTO_LOGIN, false); setState(() { isAutoLogin = false; }); diff --git a/apps/example/lib/pages/notification_utils_page.dart b/apps/example/lib/pages/notification_utils_page.dart index 74515cc7..af3c78e2 100644 --- a/apps/example/lib/pages/notification_utils_page.dart +++ b/apps/example/lib/pages/notification_utils_page.dart @@ -1,9 +1,6 @@ import 'dart:math'; -import 'package:ap_common/utils/ap_localizations.dart'; -import 'package:ap_common/utils/dialog_utils.dart'; -import 'package:ap_common/utils/notification_utils.dart'; -import 'package:ap_common/widgets/option_dialog.dart'; +import 'package:ap_common/ap_common.dart'; import 'package:ap_common_example/utils/app_localizations.dart'; import 'package:flutter/material.dart'; import 'package:sprintf/sprintf.dart'; @@ -17,7 +14,7 @@ class NotificationUtilsTestPage extends StatefulWidget { class _NotificationUtilsTestPageState extends State { late AppLocalizations app; - Day day = NotificationUtils.getDay(DateTime.now().weekday); + int weekday = DateTime.now().weekday; TimeOfDay time = TimeOfDay.now(); @override @@ -39,7 +36,7 @@ class _NotificationUtilsTestPageState extends State { const Divider(height: 0.0), ListTile( onTap: () { - NotificationUtils.show( + NotificationUtil.instance.show( id: 1, androidChannelId: '1', androidChannelDescription: 'Test', @@ -48,7 +45,7 @@ class _NotificationUtilsTestPageState extends State { ); }, title: Text(app.showNow), - subtitle: const Text('NotificationUtils.show'), + subtitle: const Text('NotificationUtil.instance.show'), ), const Divider(height: 0.0), const Padding( @@ -60,7 +57,7 @@ class _NotificationUtilsTestPageState extends State { ), ListTile( onTap: () { - NotificationUtils.schedule( + NotificationUtil.instance.schedule( id: 2, androidChannelId: '1', androidChannelDescription: 'Test', @@ -72,7 +69,7 @@ class _NotificationUtilsTestPageState extends State { ); }, title: Text(app.showInFiveSeconds), - subtitle: const Text('NotificationUtils.schedule'), + subtitle: const Text('NotificationUtil.instance.schedule'), ), const Divider(height: 0.0), const Padding( @@ -89,9 +86,9 @@ class _NotificationUtilsTestPageState extends State { builder: (_) => SimpleOptionDialog( title: app.setWeekDay, items: ApLocalizations.of(context).weekdays, - index: day.value - 1, + index: weekday - 1, onSelected: (int index) { - setState(() => day = Day.values[index]); + setState(() => weekday = index + 1); }, ), ); @@ -116,7 +113,7 @@ class _NotificationUtilsTestPageState extends State { ListTile( onTap: () { final int id = Random().nextInt(10000); - NotificationUtils.scheduleWeeklyNotify( + NotificationUtil.instance.scheduleWeeklyNotify( id: id, androidChannelId: '1', androidChannelDescription: 'Schedule Weekly Notify', @@ -124,11 +121,11 @@ class _NotificationUtilsTestPageState extends State { content: sprintf( app.scheduleWeeklyNotifyContent, [ - ApLocalizations.of(context).weekdays[day.value - 1], + ApLocalizations.of(context).weekdaysCourse[weekday - 1], time.format(context), ], ), - day: day, + weekday: weekday, time: TimeOfDay( hour: time.hour, minute: time.minute, @@ -139,12 +136,13 @@ class _NotificationUtilsTestPageState extends State { sprintf( app.scheduleWeeklyNotifyContent, [ - ApLocalizations.of(context).weekdays[day.value - 1], + ApLocalizations.of(context).weekdaysCourse[weekday - 1], time.format(context), ], ), ), - subtitle: const Text('NotificationUtils.scheduleWeeklyNotify'), + subtitle: + const Text('NotificationUtil.instance.scheduleWeeklyNotify'), ), const Divider(height: 0.0), const Padding( @@ -156,7 +154,8 @@ class _NotificationUtilsTestPageState extends State { ), ListTile( onTap: () async { - final bool? result = await NotificationUtils.requestPermissions(); + final bool? result = + await NotificationUtil.instance.requestPermissions(); if (result != null) { //ignore: use_build_context_synchronously if (!context.mounted) return; @@ -171,42 +170,43 @@ class _NotificationUtilsTestPageState extends State { }, title: Text(app.requestPermission), subtitle: const Text( - 'NotificationUtils.requestPermissions (iOS & macOS limit)', + 'NotificationUtil.instance.requestPermissions (iOS & macOS limit)', ), ), - ListTile( - onTap: () async { - final List list = - await NotificationUtils.getPendingNotificationList(); - //ignore: use_build_context_synchronously - if (!context.mounted) return; - showDialog( - context: context, - builder: (_) => SimpleOptionDialog( - title: app.getPendingNotificationList, - items: [ - for (final PendingNotificationRequest item in list) - 'id = ${item.id}, ' + - 'title = ${item.title}\n body = ${item.body}', - ], - index: -1, - onSelected: (int index) { - NotificationUtils.cancelCourseNotify(id: list[index].id); - }, - ), - ); - }, - title: Text(app.getPendingNotificationList), - subtitle: - const Text('NotificationUtils.getPendingNotificationList'), - ), + // ListTile( + // onTap: () async { + // final List list = + // await NotificationUtil.instance.getPendingNotificationList(); + // //ignore: use_build_context_synchronously + // if (!context.mounted) return; + // showDialog( + // context: context, + // builder: (_) => SimpleOptionDialog( + // title: app.getPendingNotificationList, + // items: [ + // for (final PendingNotificationRequest item in list) + // 'id = ${item.id}, ' + + // 'title = ${item.title}\n body = ${item.body}', + // ], + // index: -1, + // onSelected: (int index) { + // NotificationUtil.instance + // .cancelCourseNotify(id: list[index].id); + // }, + // ), + // ); + // }, + // title: Text(app.getPendingNotificationList), + // subtitle: const Text( + // 'NotificationUtil.instance.getPendingNotificationList'), + // ), const Divider(height: 0.0), ListTile( onTap: () { - NotificationUtils.cancelAll(); + NotificationUtil.instance.cancelAll(); }, title: Text(app.cancelAll), - subtitle: const Text('NotificationUtils.cancelAll'), + subtitle: const Text('NotificationUtil.instance.cancelAll'), ), ], ), diff --git a/apps/example/lib/pages/setting_page.dart b/apps/example/lib/pages/setting_page.dart index c16075b7..f2b428ff 100644 --- a/apps/example/lib/pages/setting_page.dart +++ b/apps/example/lib/pages/setting_page.dart @@ -1,13 +1,6 @@ -import 'dart:io'; - -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; -import 'package:ap_common/utils/ap_utils.dart'; -import 'package:ap_common/utils/preferences.dart'; -import 'package:ap_common/widgets/setting_page_widgets.dart'; +import 'package:ap_common/ap_common.dart'; import 'package:ap_common_example/config/constants.dart'; import 'package:ap_common_example/widgets/share_data_widget.dart'; -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; class SettingPage extends StatefulWidget { @@ -73,7 +66,7 @@ class SettingPageState extends State { setState(() { displayPicture = !displayPicture; }); - Preferences.setBool( + PreferenceUtil.instance.setBool( Constants.PREF_DISPLAY_PICTURE, displayPicture, ); @@ -118,17 +111,20 @@ class SettingPageState extends State { } Future _getPreference() async { - PackageInfo? packageInfo; - if (!kIsWeb && (Platform.isAndroid || Platform.isIOS || Platform.isMacOS)) { - packageInfo = await PackageInfo.fromPlatform(); - } + // PackageInfo? packageInfo; + // if (!kIsWeb && (Platform.isAndroid || Platform.isIOS || Platform.isMacOS)) { + // packageInfo = await PackageInfo.fromPlatform(); + // } setState(() { - isOffline = Preferences.getBool(Constants.PREF_IS_OFFLINE_LOGIN, false); - appVersion = packageInfo?.version ?? '3.4.2'; - courseNotify = Preferences.getBool(Constants.PREF_COURSE_NOTIFY, false); + isOffline = PreferenceUtil.instance + .getBool(Constants.PREF_IS_OFFLINE_LOGIN, false); + appVersion = '3.4.2'; + courseNotify = + PreferenceUtil.instance.getBool(Constants.PREF_COURSE_NOTIFY, false); displayPicture = - Preferences.getBool(Constants.PREF_DISPLAY_PICTURE, true); - busNotify = Preferences.getBool(Constants.PREF_BUS_NOTIFY, false); + PreferenceUtil.instance.getBool(Constants.PREF_DISPLAY_PICTURE, true); + busNotify = + PreferenceUtil.instance.getBool(Constants.PREF_BUS_NOTIFY, false); }); } } diff --git a/apps/example/lib/pages/shcool_info_page.dart b/apps/example/lib/pages/shcool_info_page.dart index ab70046b..8ea9e85a 100644 --- a/apps/example/lib/pages/shcool_info_page.dart +++ b/apps/example/lib/pages/shcool_info_page.dart @@ -1,13 +1,4 @@ -import 'package:ap_common/callback/general_callback.dart'; -import 'package:ap_common/models/notification_data.dart'; -import 'package:ap_common/models/phone_model.dart'; -import 'package:ap_common/resources/ap_icon.dart'; -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/analytics_utils.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; -import 'package:ap_common/views/notification_list_view.dart'; -import 'package:ap_common/views/pdf_view.dart'; -import 'package:ap_common/views/phone_list_view.dart'; +import 'package:ap_common/ap_common.dart'; import 'package:ap_common_example/res/assets.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -73,7 +64,7 @@ class SchoolInfoPageState extends State @override void initState() { - AnalyticsUtils.instance?.setCurrentScreen( + AnalyticsUtil.instance?.setCurrentScreen( 'SchoolInfoPage', 'school_info_page.dart', ); @@ -167,7 +158,8 @@ class SchoolInfoPageState extends State Future _getSchedules() async { downloadFdf( - 'https://raw.githubusercontent.com/NKUST-ITC/NKUST-AP-Flutter/master/school_schedule.pdf',); + 'https://raw.githubusercontent.com/NKUST-ITC/NKUST-AP-Flutter/master/school_schedule.pdf', + ); } Future downloadFdf(String url) async { diff --git a/apps/example/lib/pages/study/course_page.dart b/apps/example/lib/pages/study/course_page.dart index 3e555624..ff825905 100644 --- a/apps/example/lib/pages/study/course_page.dart +++ b/apps/example/lib/pages/study/course_page.dart @@ -1,9 +1,4 @@ -import 'package:ap_common/config/ap_constants.dart'; -import 'package:ap_common/models/course_notify_data.dart'; -import 'package:ap_common/models/semester_data.dart'; -import 'package:ap_common/scaffold/course_scaffold.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; -import 'package:ap_common/utils/preferences.dart'; +import 'package:ap_common/ap_common.dart'; import 'package:ap_common_example/config/constants.dart'; import 'package:ap_common_example/res/assets.dart'; import 'package:flutter/material.dart'; @@ -31,7 +26,7 @@ class CoursePageState extends State { String customStateHint = ''; - String get courseNotifyCacheKey => Preferences.getString( + String get courseNotifyCacheKey => PreferenceUtil.instance.getString( ApConstants.currentSemesterCode, ApConstants.semesterLatest, ); @@ -87,7 +82,7 @@ class CoursePageState extends State { Future _getCourseTables() async { final String rawString = await rootBundle.loadString(FileAssets.courses); courseData = CourseData.fromRawJson(rawString); - Preferences.setString( + PreferenceUtil.instance.setString( ApConstants.currentSemesterCode, ApConstants.semesterLatest, ); diff --git a/apps/example/lib/pages/study/score_page.dart b/apps/example/lib/pages/study/score_page.dart index ab68b60e..ea608023 100644 --- a/apps/example/lib/pages/study/score_page.dart +++ b/apps/example/lib/pages/study/score_page.dart @@ -1,7 +1,4 @@ -import 'package:ap_common/models/score_data.dart'; -import 'package:ap_common/models/semester_data.dart'; -import 'package:ap_common/scaffold/score_scaffold.dart'; -import 'package:ap_common/utils/ap_localizations.dart'; +import 'package:ap_common/ap_common.dart'; import 'package:ap_common_example/res/assets.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; diff --git a/apps/example/lib/pages/user_info_page.dart b/apps/example/lib/pages/user_info_page.dart index 6070c3d4..6cb5e16c 100644 --- a/apps/example/lib/pages/user_info_page.dart +++ b/apps/example/lib/pages/user_info_page.dart @@ -1,5 +1,4 @@ -import 'package:ap_common/models/user_info.dart'; -import 'package:ap_common/scaffold/user_info_scaffold.dart'; +import 'package:ap_common/ap_common.dart'; import 'package:ap_common_example/res/assets.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; diff --git a/apps/example/macos/Flutter/GeneratedPluginRegistrant.swift b/apps/example/macos/Flutter/GeneratedPluginRegistrant.swift index 8c3d7feb..c06c46fe 100644 --- a/apps/example/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/apps/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -17,7 +17,7 @@ import printing import share_plus import shared_preferences_foundation import sign_in_with_apple -import sqflite +import sqflite_darwin import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { diff --git a/apps/example/pubspec.lock b/apps/example/pubspec.lock index 5f6bfd03..d2e10af4 100644 --- a/apps/example/pubspec.lock +++ b/apps/example/pubspec.lock @@ -15,7 +15,42 @@ packages: path: "../../packages/ap_common" relative: true source: path - version: "0.25.3" + version: "0.26.0-dev.0" + ap_common_announcement_ui: + dependency: "direct overridden" + description: + path: "../../packages/ap_common_announcement_ui" + relative: true + source: path + version: "0.0.1" + ap_common_core: + dependency: "direct overridden" + description: + path: "../../packages/ap_common_core" + relative: true + source: path + version: "0.0.2" + ap_common_flutter_core: + dependency: "direct overridden" + description: + path: "../../packages/ap_common_flutter_core" + relative: true + source: path + version: "0.0.1" + ap_common_flutter_platform: + dependency: "direct overridden" + description: + path: "../../packages/ap_common_flutter_platform" + relative: true + source: path + version: "0.0.1" + ap_common_flutter_ui: + dependency: "direct overridden" + description: + path: "../../packages/ap_common_flutter_ui" + relative: true + source: path + version: "0.0.1" ap_common_plugin: dependency: "direct main" description: @@ -587,6 +622,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.5" + injector: + dependency: transitive + description: + name: injector + sha256: d692c37788872bfd4bd7c01b864b0712190a25ae5a346431ff69949d5728a2e1 + url: "https://pub.dev" + source: hosted + version: "4.0.0" intl: dependency: "direct overridden" description: @@ -996,18 +1039,42 @@ packages: dependency: transitive description: name: sqflite - sha256: ff5a2436ef8ebdfda748fbfe957f9981524cb5ff11e7bafa8c42771840e8a788 + sha256: "79a297dc3cc137e758c6a4baf83342b039e5a6d2436fcdf3f96a00adaaf2ad62" + url: "https://pub.dev" + source: hosted + version: "2.4.0" + sqflite_android: + dependency: transitive + description: + name: sqflite_android + sha256: "78f489aab276260cdd26676d2169446c7ecd3484bbd5fead4ca14f3ed4dd9ee3" url: "https://pub.dev" source: hosted - version: "2.3.3+2" + version: "2.4.0" sqflite_common: dependency: transitive description: name: sqflite_common - sha256: "2d8e607db72e9cb7748c9c6e739e2c9618320a5517de693d5a24609c4671b1a4" + sha256: "4468b24876d673418a7b7147e5a08a715b4998a7ae69227acafaab762e0e5490" + url: "https://pub.dev" + source: hosted + version: "2.5.4+5" + sqflite_darwin: + dependency: transitive + description: + name: sqflite_darwin + sha256: "769733dddf94622d5541c73e4ddc6aa7b252d865285914b6fcd54a63c4b4f027" + url: "https://pub.dev" + source: hosted + version: "2.4.1-1" + sqflite_platform_interface: + dependency: transitive + description: + name: sqflite_platform_interface + sha256: b62ab81e1284341783222aefbbb44f984ebf4663d672ae10408c9a8ddab4bfb6 url: "https://pub.dev" source: hosted - version: "2.5.4+4" + version: "2.4.0-0" stack_trace: dependency: transitive description: diff --git a/apps/example/pubspec_overrides.yaml b/apps/example/pubspec_overrides.yaml index fcbe03e3..f6d91941 100644 --- a/apps/example/pubspec_overrides.yaml +++ b/apps/example/pubspec_overrides.yaml @@ -1,7 +1,17 @@ -# melos_managed_dependency_overrides: ap_common,ap_common_plugin,intl +# melos_managed_dependency_overrides: ap_common,ap_common_plugin,intl,ap_common_core,ap_common_flutter_core,ap_common_flutter_platform,ap_common_announcement_ui,ap_common_flutter_ui dependency_overrides: ap_common: path: ../../packages/ap_common + ap_common_announcement_ui: + path: ../../packages/ap_common_announcement_ui + ap_common_core: + path: ../../packages/ap_common_core + ap_common_flutter_core: + path: ../../packages/ap_common_flutter_core + ap_common_flutter_platform: + path: ../../packages/ap_common_flutter_platform + ap_common_flutter_ui: + path: ../../packages/ap_common_flutter_ui ap_common_plugin: path: ../../packages/ap_common_plugin intl: 0.18.0 diff --git a/packages/ap_common/.gitignore b/packages/ap_common/.gitignore index a5b4dbbf..eb70f8bf 100644 --- a/packages/ap_common/.gitignore +++ b/packages/ap_common/.gitignore @@ -22,56 +22,24 @@ # Flutter/Dart/Pub related **/doc/api/ +**/ios/Flutter/.last_build_id .dart_tool/ .flutter-plugins .flutter-plugins-dependencies .packages .pub-cache/ .pub/ -build/ +/build/ -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java +# Web related -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Flutter.podspec -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json # Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages # FVM Version Cache diff --git a/packages/ap_common/CHANGELOG.md b/packages/ap_common/CHANGELOG.md index 7fb847e3..5ceca56f 100644 --- a/packages/ap_common/CHANGELOG.md +++ b/packages/ap_common/CHANGELOG.md @@ -1,3 +1,8 @@ +## [0.26.0-dev.0] - 2024/10/09 +### 基於 Flutter v3.24 開發 + +* 套件拆分第一個版本 + ## [0.25.3] - 2024/09/25 ### 基於 Flutter v3.24 開發 diff --git a/packages/ap_common/LICENSE b/packages/ap_common/LICENSE index 3198f648..d25d4a88 100644 --- a/packages/ap_common/LICENSE +++ b/packages/ap_common/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 RainVisitor +Copyright (c) 2024 RainVisitor 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: diff --git a/packages/ap_common/README.md b/packages/ap_common/README.md index b0c36825..eb8f6101 100644 --- a/packages/ap_common/README.md +++ b/packages/ap_common/README.md @@ -1,16 +1,34 @@ -## Getting Started +# 校務通系列介面與函式共用 -在 `pubspec.yaml` 中加入 package +[![](https://img.shields.io/badge/Flutter-v3.24-blue)](https://github.com/flutter/flutter) +[![](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common/) +[![melos](https://img.shields.io/badge/maintained%20with-melos-f700ff.svg?style=flat-square)](https://github.com/invertase/melos) -```yaml - # 官方多國語套件 - flutter_localizations: - sdk: flutter - ap_common: ^0.21.0 -``` +長期校務通相關系列的app,介面與相關功能都極為相似,將相關的介面與函式庫,製作此套件以方便維護。 -執行加入套件 +[展示網頁](https://abc873693.github.io/ap_common/#/) +[文件](https://ap-common.web.app/) -```bash - $ flutter package get -``` +## 相關專案 + +- [高科校務通](https://github.com/NKUST-ITC/NKUST-AP-Flutter) +- [中山校務通](https://github.com/abc873693/NSYSU-AP) +- [文藻校務通](https://github.com/abc873693/WTUC-AP) +- [台科校務通(已下架)](https://github.com/abc873693/NTUST-AP) + +## 套件 + +| Name | pub.dev | 說明 | +|-------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------| +| `ap_common` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common/) | 函式庫與相關介面共用 | +| `ap_common_core` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common_core/) | 純 Dart 的基本類別 | +| `ap_common_flutter_core` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_core.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_core/) | 基於 Flutter 框架的核心基本類別 | +| `ap_common_flutter_platform` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_platform.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_platform/) | 原生功能實作 | +| `ap_common_flutter_ui` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_ui.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_ui/) | UI 實作但不包含原生功能整合 | +| `ap_common_flutter_announcement_ui` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_announcement_ui.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_announcement_ui/) | 最新消息服務相關的介面實作 | +| `ap_common_plugin` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_plugin.svg?style=flat-square)](https://pub.dev/packages/ap_common_plugin/) | 課表小工具 | +| `ap_common_firebase` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_firebase.svg?style=flat-square)](https://pub.dev/packages/ap_common_firebase/) | 服務 `Firebase` 的整合實作 | + +## 套件使用要求 + +- Flutter `v3.22` 以上 diff --git a/packages/ap_common/lib/ap_common.dart b/packages/ap_common/lib/ap_common.dart index 298576d8..4f8d150d 100644 --- a/packages/ap_common/lib/ap_common.dart +++ b/packages/ap_common/lib/ap_common.dart @@ -1,5 +1,20 @@ -/// A Calculator. -class Calculator { - /// Returns [value] plus 1. - int addOne(int value) => value + 1; +import 'package:ap_common_flutter_platform/ap_common_flutter_platform.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; + +export 'package:ap_common_announcement_ui/ap_common_announcement_ui.dart'; +export 'package:ap_common_flutter_platform/ap_common_flutter_platform.dart'; +export 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; + +void registerOneForAll() { + registerApCommonFlutter( + ui: ApUiUtil(), + platform: ApPlatformUtil(), + media: ApMediaUtil(), + platformCalendar: ApPlatformCalendarUtil(), + notification: ApNotificationUtil(), + appStore: ApAppStoreUtil(), + ); + registerApCommonCore( + preference: ApPreferenceUtil(), + ); } diff --git a/packages/ap_common/lib/resources/ap_image_assets.dart b/packages/ap_common/lib/resources/ap_image_assets.dart deleted file mode 100644 index f17d3095..00000000 --- a/packages/ap_common/lib/resources/ap_image_assets.dart +++ /dev/null @@ -1,25 +0,0 @@ -part of 'resources.dart'; - -class ApImageAssets { - ApImageAssets._(); - - static const String email = 'packages/ap_common/assets/images/email.webp'; - static const String github = 'packages/ap_common/assets/images/github.webp'; - static const String drawerBackgroundLight = - 'packages/ap_common/assets/images/drawer_background_light.webp'; - static const String drawerBackgroundDark = - 'packages/ap_common/assets/images/drawer_background_dark.webp'; - static const String nkutstItc = - 'packages/ap_common/assets/images/nkutst_itc.webp'; - static const String gdgOnCampusNkustItc = - 'packages/ap_common/assets/images/gdg_on_campus_nkust_itc.jpg'; - static const String nsysuGdsc = - 'packages/ap_common/assets/images/nsysu_gdsc.png'; - static const String fb = 'packages/ap_common/assets/images/fb.webp'; - static const String instagram = - 'packages/ap_common/assets/images/instagram.png'; - static const String dashLineDark = - 'packages/ap_common/assets/images/dash_line_dark.webp'; - static const String dashLineLight = - 'packages/ap_common/assets/images/dash_line_light.webp'; -} diff --git a/packages/ap_common/lib/resources/ap_image_icons.dart b/packages/ap_common/lib/resources/ap_image_icons.dart deleted file mode 100644 index a1a840f1..00000000 --- a/packages/ap_common/lib/resources/ap_image_icons.dart +++ /dev/null @@ -1,10 +0,0 @@ -part of 'resources.dart'; - -class ApImageIcons { - ApImageIcons._(); - - static const String calendarImport = - 'packages/ap_common/assets/icons/calendar_import.png'; - static const String qrcode = 'packages/ap_common/assets/icons/qrcode.png'; - static const String barcode = 'packages/ap_common/assets/icons/barcode.png'; -} diff --git a/packages/ap_common/pubspec.lock b/packages/ap_common/pubspec.lock deleted file mode 100644 index 04cd2501..00000000 --- a/packages/ap_common/pubspec.lock +++ /dev/null @@ -1,1513 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834 - url: "https://pub.dev" - source: hosted - version: "72.0.0" - _macros: - dependency: transitive - description: dart - source: sdk - version: "0.3.2" - add_2_calendar: - dependency: transitive - description: - name: add_2_calendar - sha256: "8d7a82aba607d35f2a5bc913419e12f865a96a350a8ad2509a59322bc161f200" - url: "https://pub.dev" - source: hosted - version: "3.0.1" - analyzer: - dependency: transitive - description: - name: analyzer - sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139 - url: "https://pub.dev" - source: hosted - version: "6.7.0" - ansicolor: - dependency: transitive - description: - name: ansicolor - sha256: "50e982d500bc863e1d703448afdbf9e5a72eb48840a4f766fa361ffd6877055f" - url: "https://pub.dev" - source: hosted - version: "2.0.3" - ap_common_core: - dependency: "direct main" - description: - path: "../ap_common_core" - relative: true - source: path - version: "0.0.2" - ap_common_flutter_core: - dependency: "direct main" - description: - path: "../ap_common_flutter_core" - relative: true - source: path - version: "0.0.1" - ap_common_flutter_platform: - dependency: "direct main" - description: - path: "../ap_common_flutter_platform" - relative: true - source: path - version: "0.0.1" - app_tracking_transparency: - dependency: transitive - description: - name: app_tracking_transparency - sha256: "64d9745931e565790abdea91b518ac8dc3cebe6d0d0aaf7119343271b983259a" - url: "https://pub.dev" - source: hosted - version: "2.0.6" - archive: - dependency: transitive - description: - name: archive - sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d - url: "https://pub.dev" - source: hosted - version: "3.6.1" - args: - dependency: transitive - description: - name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" - url: "https://pub.dev" - source: hosted - version: "2.5.0" - asn1lib: - dependency: transitive - description: - name: asn1lib - sha256: "58082b3f0dca697204dbab0ef9ff208bfaea7767ea771076af9a343488428dda" - url: "https://pub.dev" - source: hosted - version: "1.5.3" - async: - dependency: transitive - description: - name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.dev" - source: hosted - version: "2.11.0" - auto_size_text_pk: - dependency: "direct main" - description: - name: auto_size_text_pk - sha256: ced55de5336fa7f438c1f5a9aa234e25d7a120c1d40d376a7cdc2af28cdb6995 - url: "https://pub.dev" - source: hosted - version: "3.0.0" - barcode: - dependency: "direct main" - description: - name: barcode - sha256: ab180ce22c6555d77d45f0178a523669db67f95856e3378259ef2ffeb43e6003 - url: "https://pub.dev" - source: hosted - version: "2.2.8" - barcode_widget: - dependency: "direct main" - description: - name: barcode_widget - sha256: "6f2c5b08659b1a5f4d88d183e6007133ea2f96e50e7b8bb628f03266c3931427" - url: "https://pub.dev" - source: hosted - version: "2.0.4" - bidi: - dependency: transitive - description: - name: bidi - sha256: "1a7d0c696324b2089f72e7671fd1f1f64fef44c980f3cebc84e803967c597b63" - url: "https://pub.dev" - source: hosted - version: "2.0.10" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - build: - dependency: transitive - description: - name: build - sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - build_config: - dependency: transitive - description: - name: build_config - sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 - url: "https://pub.dev" - source: hosted - version: "1.1.1" - build_daemon: - dependency: transitive - description: - name: build_daemon - sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" - url: "https://pub.dev" - source: hosted - version: "4.0.2" - build_resolvers: - dependency: transitive - description: - name: build_resolvers - sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" - url: "https://pub.dev" - source: hosted - version: "2.4.2" - build_runner: - dependency: "direct dev" - description: - name: build_runner - sha256: dd09dd4e2b078992f42aac7f1a622f01882a8492fef08486b27ddde929c19f04 - url: "https://pub.dev" - source: hosted - version: "2.4.12" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0 - url: "https://pub.dev" - source: hosted - version: "7.3.2" - built_collection: - dependency: transitive - description: - name: built_collection - sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" - url: "https://pub.dev" - source: hosted - version: "5.1.1" - built_value: - dependency: transitive - description: - name: built_value - sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb - url: "https://pub.dev" - source: hosted - version: "8.9.2" - cached_network_image: - dependency: transitive - description: - name: cached_network_image - sha256: "4a5d8d2c728b0f3d0245f69f921d7be90cae4c2fd5288f773088672c0893f819" - url: "https://pub.dev" - source: hosted - version: "3.4.0" - cached_network_image_platform_interface: - dependency: transitive - description: - name: cached_network_image_platform_interface - sha256: "35814b016e37fbdc91f7ae18c8caf49ba5c88501813f73ce8a07027a395e2829" - url: "https://pub.dev" - source: hosted - version: "4.1.1" - cached_network_image_web: - dependency: transitive - description: - name: cached_network_image_web - sha256: "6322dde7a5ad92202e64df659241104a43db20ed594c41ca18de1014598d7996" - url: "https://pub.dev" - source: hosted - version: "1.3.0" - characters: - dependency: transitive - description: - name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" - url: "https://pub.dev" - source: hosted - version: "1.3.0" - checked_yaml: - dependency: transitive - description: - name: checked_yaml - sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff - url: "https://pub.dev" - source: hosted - version: "2.0.3" - clock: - dependency: transitive - description: - name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.dev" - source: hosted - version: "1.1.1" - code_builder: - dependency: transitive - description: - name: code_builder - sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 - url: "https://pub.dev" - source: hosted - version: "4.10.0" - collection: - dependency: transitive - description: - name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: "https://pub.dev" - source: hosted - version: "1.18.0" - convert: - dependency: transitive - description: - name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" - url: "https://pub.dev" - source: hosted - version: "3.1.1" - cookie_jar: - dependency: "direct main" - description: - name: cookie_jar - sha256: a6ac027d3ed6ed756bfce8f3ff60cb479e266f3b0fdabd6242b804b6765e52de - url: "https://pub.dev" - source: hosted - version: "4.0.8" - cross_file: - dependency: transitive - description: - name: cross_file - sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" - url: "https://pub.dev" - source: hosted - version: "0.3.4+2" - crypto: - dependency: transitive - description: - name: crypto - sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 - url: "https://pub.dev" - source: hosted - version: "3.0.5" - csslib: - dependency: transitive - description: - name: csslib - sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" - url: "https://pub.dev" - source: hosted - version: "1.0.0" - cupertino_back_gesture: - dependency: "direct main" - description: - name: cupertino_back_gesture - sha256: "64f68f3aadb98e19d85c8c1dd9595a56b5b53b05f455e32df1c52edadad456d8" - url: "https://pub.dev" - source: hosted - version: "0.1.0" - dart_style: - dependency: transitive - description: - name: dart_style - sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" - url: "https://pub.dev" - source: hosted - version: "2.3.6" - dbus: - dependency: transitive - description: - name: dbus - sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac" - url: "https://pub.dev" - source: hosted - version: "0.7.10" - dio: - dependency: "direct main" - description: - name: dio - sha256: "0dfb6b6a1979dac1c1245e17cef824d7b452ea29bd33d3467269f9bef3715fb0" - url: "https://pub.dev" - source: hosted - version: "5.6.0" - dio_cookie_manager: - dependency: "direct main" - description: - name: dio_cookie_manager - sha256: e79498b0f632897ff0c28d6e8178b4bc6e9087412401f618c31fa0904ace050d - url: "https://pub.dev" - source: hosted - version: "3.1.1" - dio_web_adapter: - dependency: transitive - description: - name: dio_web_adapter - sha256: "33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8" - url: "https://pub.dev" - source: hosted - version: "2.0.0" - encrypt: - dependency: "direct main" - description: - name: encrypt - sha256: "62d9aa4670cc2a8798bab89b39fc71b6dfbacf615de6cf5001fb39f7e4a996a2" - url: "https://pub.dev" - source: hosted - version: "5.0.3" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" - url: "https://pub.dev" - source: hosted - version: "1.3.1" - ffi: - dependency: transitive - description: - name: ffi - sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" - url: "https://pub.dev" - source: hosted - version: "2.1.3" - file: - dependency: transitive - description: - name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" - url: "https://pub.dev" - source: hosted - version: "7.0.0" - file_saver: - dependency: transitive - description: - name: file_saver - sha256: d375b351e3331663abbaf99747abd72f159260c58fbbdbca9f926f02c01bdc48 - url: "https://pub.dev" - source: hosted - version: "0.2.13" - file_selector_linux: - dependency: transitive - description: - name: file_selector_linux - sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" - url: "https://pub.dev" - source: hosted - version: "0.9.2+1" - file_selector_macos: - dependency: transitive - description: - name: file_selector_macos - sha256: f42eacb83b318e183b1ae24eead1373ab1334084404c8c16e0354f9a3e55d385 - url: "https://pub.dev" - source: hosted - version: "0.9.4" - file_selector_platform_interface: - dependency: transitive - description: - name: file_selector_platform_interface - sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b - url: "https://pub.dev" - source: hosted - version: "2.6.2" - file_selector_windows: - dependency: transitive - description: - name: file_selector_windows - sha256: "2ad726953f6e8affbc4df8dc78b77c3b4a060967a291e528ef72ae846c60fb69" - url: "https://pub.dev" - source: hosted - version: "0.9.3+2" - fixnum: - dependency: transitive - description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_cache_manager: - dependency: transitive - description: - name: flutter_cache_manager - sha256: "400b6592f16a4409a7f2bb929a9a7e38c72cceb8ffb99ee57bbf2cb2cecf8386" - url: "https://pub.dev" - source: hosted - version: "3.4.1" - flutter_keyboard_visibility: - dependency: transitive - description: - name: flutter_keyboard_visibility - sha256: "98664be7be0e3ffca00de50f7f6a287ab62c763fc8c762e0a21584584a3ff4f8" - url: "https://pub.dev" - source: hosted - version: "6.0.0" - flutter_keyboard_visibility_linux: - dependency: transitive - description: - name: flutter_keyboard_visibility_linux - sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" - url: "https://pub.dev" - source: hosted - version: "1.0.0" - flutter_keyboard_visibility_macos: - dependency: transitive - description: - name: flutter_keyboard_visibility_macos - sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 - url: "https://pub.dev" - source: hosted - version: "1.0.0" - flutter_keyboard_visibility_platform_interface: - dependency: transitive - description: - name: flutter_keyboard_visibility_platform_interface - sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 - url: "https://pub.dev" - source: hosted - version: "2.0.0" - flutter_keyboard_visibility_web: - dependency: transitive - description: - name: flutter_keyboard_visibility_web - sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 - url: "https://pub.dev" - source: hosted - version: "2.0.0" - flutter_keyboard_visibility_windows: - dependency: transitive - description: - name: flutter_keyboard_visibility_windows - sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 - url: "https://pub.dev" - source: hosted - version: "1.0.0" - flutter_linkify: - dependency: "direct main" - description: - name: flutter_linkify - sha256: "74669e06a8f358fee4512b4320c0b80e51cffc496607931de68d28f099254073" - url: "https://pub.dev" - source: hosted - version: "6.0.0" - flutter_local_notifications: - dependency: transitive - description: - name: flutter_local_notifications - sha256: c500d5d9e7e553f06b61877ca6b9c8b92c570a4c8db371038702e8ce57f8a50f - url: "https://pub.dev" - source: hosted - version: "17.2.2" - flutter_local_notifications_linux: - dependency: transitive - description: - name: flutter_local_notifications_linux - sha256: c49bd06165cad9beeb79090b18cd1eb0296f4bf4b23b84426e37dd7c027fc3af - url: "https://pub.dev" - source: hosted - version: "4.0.1" - flutter_local_notifications_platform_interface: - dependency: transitive - description: - name: flutter_local_notifications_platform_interface - sha256: "85f8d07fe708c1bdcf45037f2c0109753b26ae077e9d9e899d55971711a4ea66" - url: "https://pub.dev" - source: hosted - version: "7.2.0" - flutter_localizations: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_plugin_android_lifecycle: - dependency: transitive - description: - name: flutter_plugin_android_lifecycle - sha256: "9d98bd47ef9d34e803d438f17fd32b116d31009f534a6fa5ce3a1167f189a6de" - url: "https://pub.dev" - source: hosted - version: "2.0.21" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 - url: "https://pub.dev" - source: hosted - version: "4.0.0" - glob: - dependency: transitive - description: - name: glob - sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - google_identity_services_web: - dependency: transitive - description: - name: google_identity_services_web - sha256: "5be191523702ba8d7a01ca97c17fca096822ccf246b0a9f11923a6ded06199b6" - url: "https://pub.dev" - source: hosted - version: "0.3.1+4" - google_sign_in: - dependency: transitive - description: - name: google_sign_in - sha256: "0b8787cb9c1a68ad398e8010e8c8766bfa33556d2ab97c439fb4137756d7308f" - url: "https://pub.dev" - source: hosted - version: "6.2.1" - google_sign_in_android: - dependency: transitive - description: - name: google_sign_in_android - sha256: "5a47ebec9af97daf0822e800e4f101c3340b5ebc3f6898cf860c1a71b53cf077" - url: "https://pub.dev" - source: hosted - version: "6.1.28" - google_sign_in_ios: - dependency: transitive - description: - name: google_sign_in_ios - sha256: a058c9880be456f21e2e8571c1126eaacd570bdc5b6c6d9d15aea4bdf22ca9fe - url: "https://pub.dev" - source: hosted - version: "5.7.6" - google_sign_in_platform_interface: - dependency: transitive - description: - name: google_sign_in_platform_interface - sha256: "1f6e5787d7a120cc0359ddf315c92309069171306242e181c09472d1b00a2971" - url: "https://pub.dev" - source: hosted - version: "2.4.5" - google_sign_in_web: - dependency: transitive - description: - name: google_sign_in_web - sha256: "042805a21127a85b0dc46bba98a37926f17d2439720e8a459d27045d8ef68055" - url: "https://pub.dev" - source: hosted - version: "0.12.4+2" - graphs: - dependency: transitive - description: - name: graphs - sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - html: - dependency: transitive - description: - name: html - sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" - url: "https://pub.dev" - source: hosted - version: "0.15.4" - http: - dependency: transitive - description: - name: http - sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 - url: "https://pub.dev" - source: hosted - version: "1.2.2" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" - url: "https://pub.dev" - source: hosted - version: "3.2.1" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" - url: "https://pub.dev" - source: hosted - version: "4.0.2" - image: - dependency: transitive - description: - name: image - sha256: "2237616a36c0d69aef7549ab439b833fb7f9fb9fc861af2cc9ac3eedddd69ca8" - url: "https://pub.dev" - source: hosted - version: "4.2.0" - image_picker: - dependency: transitive - description: - name: image_picker - sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" - url: "https://pub.dev" - source: hosted - version: "1.1.2" - image_picker_android: - dependency: transitive - description: - name: image_picker_android - sha256: "8c5abf0dcc24fe6e8e0b4a5c0b51a5cf30cefdf6407a3213dae61edc75a70f56" - url: "https://pub.dev" - source: hosted - version: "0.8.12+12" - image_picker_for_web: - dependency: transitive - description: - name: image_picker_for_web - sha256: "65d94623e15372c5c51bebbcb820848d7bcb323836e12dfdba60b5d3a8b39e50" - url: "https://pub.dev" - source: hosted - version: "3.0.5" - image_picker_ios: - dependency: transitive - description: - name: image_picker_ios - sha256: "6703696ad49f5c3c8356d576d7ace84d1faf459afb07accbb0fae780753ff447" - url: "https://pub.dev" - source: hosted - version: "0.8.12" - image_picker_linux: - dependency: transitive - description: - name: image_picker_linux - sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" - url: "https://pub.dev" - source: hosted - version: "0.2.1+1" - image_picker_macos: - dependency: transitive - description: - name: image_picker_macos - sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" - url: "https://pub.dev" - source: hosted - version: "0.2.1+1" - image_picker_platform_interface: - dependency: transitive - description: - name: image_picker_platform_interface - sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" - url: "https://pub.dev" - source: hosted - version: "2.10.0" - image_picker_windows: - dependency: transitive - description: - name: image_picker_windows - sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" - url: "https://pub.dev" - source: hosted - version: "0.2.1+1" - in_app_review: - dependency: transitive - description: - name: in_app_review - sha256: "99869244d09adc76af16bf8fd731dd13cef58ecafd5917847589c49f378cbb30" - url: "https://pub.dev" - source: hosted - version: "2.0.9" - in_app_review_platform_interface: - dependency: transitive - description: - name: in_app_review_platform_interface - sha256: fed2c755f2125caa9ae10495a3c163aa7fab5af3585a9c62ef4a6920c5b45f10 - url: "https://pub.dev" - source: hosted - version: "2.0.5" - injector: - dependency: transitive - description: - name: injector - sha256: d692c37788872bfd4bd7c01b864b0712190a25ae5a346431ff69949d5728a2e1 - url: "https://pub.dev" - source: hosted - version: "4.0.0" - intl: - dependency: "direct main" - description: - name: intl - sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf - url: "https://pub.dev" - source: hosted - version: "0.19.0" - io: - dependency: transitive - description: - name: io - sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" - url: "https://pub.dev" - source: hosted - version: "1.0.4" - js: - dependency: transitive - description: - name: js - sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf - url: "https://pub.dev" - source: hosted - version: "0.7.1" - json_annotation: - dependency: "direct main" - description: - name: json_annotation - sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" - url: "https://pub.dev" - source: hosted - version: "4.9.0" - json_serializable: - dependency: "direct dev" - description: - name: json_serializable - sha256: ea1432d167339ea9b5bb153f0571d0039607a873d6e04e0117af043f14a1fd4b - url: "https://pub.dev" - source: hosted - version: "6.8.0" - jwt_decoder: - dependency: "direct main" - description: - name: jwt_decoder - sha256: "54774aebf83f2923b99e6416b4ea915d47af3bde56884eb622de85feabbc559f" - url: "https://pub.dev" - source: hosted - version: "2.0.1" - leak_tracker: - dependency: transitive - description: - name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" - url: "https://pub.dev" - source: hosted - version: "10.0.5" - leak_tracker_flutter_testing: - dependency: transitive - description: - name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" - url: "https://pub.dev" - source: hosted - version: "3.0.5" - leak_tracker_testing: - dependency: transitive - description: - name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" - url: "https://pub.dev" - source: hosted - version: "3.0.1" - linkify: - dependency: transitive - description: - name: linkify - sha256: "4139ea77f4651ab9c315b577da2dd108d9aa0bd84b5d03d33323f1970c645832" - url: "https://pub.dev" - source: hosted - version: "5.0.0" - logging: - dependency: transitive - description: - name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - macros: - dependency: transitive - description: - name: macros - sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" - url: "https://pub.dev" - source: hosted - version: "0.1.2-main.4" - matcher: - dependency: transitive - description: - name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb - url: "https://pub.dev" - source: hosted - version: "0.12.16+1" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec - url: "https://pub.dev" - source: hosted - version: "0.11.1" - meta: - dependency: transitive - description: - name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 - url: "https://pub.dev" - source: hosted - version: "1.15.0" - mime: - dependency: transitive - description: - name: mime - sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" - url: "https://pub.dev" - source: hosted - version: "1.0.5" - multiple_localization: - dependency: "direct main" - description: - name: multiple_localization - sha256: "8b071f538bdf087a7bf13cd8b78a1a041994960c8e9f0a1aaaaf0cfb39845019" - url: "https://pub.dev" - source: hosted - version: "0.5.0" - octo_image: - dependency: transitive - description: - name: octo_image - sha256: "34faa6639a78c7e3cbe79be6f9f96535867e879748ade7d17c9b1ae7536293bd" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - package_config: - dependency: transitive - description: - name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - package_info_plus: - dependency: transitive - description: - name: package_info_plus - sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 - url: "https://pub.dev" - source: hosted - version: "8.0.2" - package_info_plus_platform_interface: - dependency: transitive - description: - name: package_info_plus_platform_interface - sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 - url: "https://pub.dev" - source: hosted - version: "3.0.1" - path: - dependency: transitive - description: - name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" - url: "https://pub.dev" - source: hosted - version: "1.9.0" - path_parsing: - dependency: transitive - description: - name: path_parsing - sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf - url: "https://pub.dev" - source: hosted - version: "1.0.1" - path_provider: - dependency: transitive - description: - name: path_provider - sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 - url: "https://pub.dev" - source: hosted - version: "2.1.4" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" - url: "https://pub.dev" - source: hosted - version: "2.2.10" - path_provider_foundation: - dependency: transitive - description: - name: path_provider_foundation - sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 - url: "https://pub.dev" - source: hosted - version: "2.4.0" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 - url: "https://pub.dev" - source: hosted - version: "2.2.1" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 - url: "https://pub.dev" - source: hosted - version: "2.3.0" - pdf: - dependency: "direct main" - description: - name: pdf - sha256: "05df53f8791587402493ac97b9869d3824eccbc77d97855f4545cf72df3cae07" - url: "https://pub.dev" - source: hosted - version: "3.11.1" - pdf_widget_wrapper: - dependency: transitive - description: - name: pdf_widget_wrapper - sha256: c930860d987213a3d58c7ec3b7ecf8085c3897f773e8dc23da9cae60a5d6d0f5 - url: "https://pub.dev" - source: hosted - version: "1.0.4" - petitparser: - dependency: transitive - description: - name: petitparser - sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 - url: "https://pub.dev" - source: hosted - version: "6.0.2" - photo_manager: - dependency: transitive - description: - name: photo_manager - sha256: "1e8bbe46a6858870e34c976aafd85378bed221ce31c1201961eba9ad3d94df9f" - url: "https://pub.dev" - source: hosted - version: "3.2.3" - photo_view: - dependency: "direct main" - description: - name: photo_view - sha256: "1fc3d970a91295fbd1364296575f854c9863f225505c28c46e0a03e48960c75e" - url: "https://pub.dev" - source: hosted - version: "0.15.0" - platform: - dependency: transitive - description: - name: platform - sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" - url: "https://pub.dev" - source: hosted - version: "3.1.5" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" - url: "https://pub.dev" - source: hosted - version: "2.1.8" - pointycastle: - dependency: transitive - description: - name: pointycastle - sha256: "4be0097fcf3fd3e8449e53730c631200ebc7b88016acecab2b0da2f0149222fe" - url: "https://pub.dev" - source: hosted - version: "3.9.1" - pool: - dependency: transitive - description: - name: pool - sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" - url: "https://pub.dev" - source: hosted - version: "1.5.1" - printing: - dependency: transitive - description: - name: printing - sha256: cc4b256a5a89d5345488e3318897b595867f5181b8c5ed6fc63bfa5f2044aec3 - url: "https://pub.dev" - source: hosted - version: "5.13.1" - pub_semver: - dependency: transitive - description: - name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - pubspec_parse: - dependency: transitive - description: - name: pubspec_parse - sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 - url: "https://pub.dev" - source: hosted - version: "1.3.0" - qr: - dependency: transitive - description: - name: qr - sha256: "5a1d2586170e172b8a8c8470bbbffd5eb0cd38a66c0d77155ea138d3af3a4445" - url: "https://pub.dev" - source: hosted - version: "3.0.2" - rxdart: - dependency: transitive - description: - name: rxdart - sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962" - url: "https://pub.dev" - source: hosted - version: "0.28.0" - share_plus: - dependency: transitive - description: - name: share_plus - sha256: "59dfd53f497340a0c3a81909b220cfdb9b8973a91055c4e5ab9b9b9ad7c513c0" - url: "https://pub.dev" - source: hosted - version: "10.0.0" - share_plus_platform_interface: - dependency: transitive - description: - name: share_plus_platform_interface - sha256: "6ababf341050edff57da8b6990f11f4e99eaba837865e2e6defe16d039619db5" - url: "https://pub.dev" - source: hosted - version: "5.0.0" - shared_preferences: - dependency: transitive - description: - name: shared_preferences - sha256: "746e5369a43170c25816cc472ee016d3a66bc13fcf430c0bc41ad7b4b2922051" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - sha256: a7e8467e9181cef109f601e3f65765685786c1a738a83d7fbbde377589c0d974 - url: "https://pub.dev" - source: hosted - version: "2.3.1" - shared_preferences_foundation: - dependency: transitive - description: - name: shared_preferences_foundation - sha256: c4b35f6cb8f63c147312c054ce7c2254c8066745125264f0c88739c417fc9d9f - url: "https://pub.dev" - source: hosted - version: "2.5.2" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - sha256: d2ca4132d3946fec2184261726b355836a82c33d7d5b67af32692aff18a4684e - url: "https://pub.dev" - source: hosted - version: "2.4.2" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - shelf: - dependency: transitive - description: - name: shelf - sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 - url: "https://pub.dev" - source: hosted - version: "1.4.1" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" - url: "https://pub.dev" - source: hosted - version: "2.0.0" - sign_in_with_apple: - dependency: transitive - description: - name: sign_in_with_apple - sha256: "5c34c601d6910d7db0077063001ccd9d9329ee58b9038ee07153ffcdd76e91bd" - url: "https://pub.dev" - source: hosted - version: "6.1.1" - sign_in_with_apple_platform_interface: - dependency: transitive - description: - name: sign_in_with_apple_platform_interface - sha256: c2ef2ce6273fce0c61acd7e9ff5be7181e33d7aa2b66508b39418b786cca2119 - url: "https://pub.dev" - source: hosted - version: "1.1.0" - sign_in_with_apple_web: - dependency: transitive - description: - name: sign_in_with_apple_web - sha256: c009e9beeb6c376e86aaa154fcc8b4e075d4bad90c56286b9668a51cdb6129ea - url: "https://pub.dev" - source: hosted - version: "2.1.0" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_gen: - dependency: transitive - description: - name: source_gen - sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" - url: "https://pub.dev" - source: hosted - version: "1.5.0" - source_helper: - dependency: transitive - description: - name: source_helper - sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd" - url: "https://pub.dev" - source: hosted - version: "1.3.4" - source_span: - dependency: transitive - description: - name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://pub.dev" - source: hosted - version: "1.10.0" - spider: - dependency: "direct dev" - description: - name: spider - sha256: c2ea0d56c98ec7c9a50f180ddfff841b7fe6231e128db616ea726aef38e5f4df - url: "https://pub.dev" - source: hosted - version: "4.2.2" - sprintf: - dependency: "direct main" - description: - name: sprintf - sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" - url: "https://pub.dev" - source: hosted - version: "7.0.0" - sqflite: - dependency: transitive - description: - name: sqflite - sha256: a43e5a27235518c03ca238e7b4732cf35eabe863a369ceba6cbefa537a66f16d - url: "https://pub.dev" - source: hosted - version: "2.3.3+1" - sqflite_common: - dependency: transitive - description: - name: sqflite_common - sha256: "7b41b6c3507854a159e24ae90a8e3e9cc01eb26a477c118d6dca065b5f55453e" - url: "https://pub.dev" - source: hosted - version: "2.5.4+2" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" - url: "https://pub.dev" - source: hosted - version: "1.11.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://pub.dev" - source: hosted - version: "2.1.2" - stream_transform: - dependency: transitive - description: - name: stream_transform - sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - synchronized: - dependency: transitive - description: - name: synchronized - sha256: a824e842b8a054f91a728b783c177c1e4731f6b124f9192468457a8913371255 - url: "https://pub.dev" - source: hosted - version: "3.2.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" - url: "https://pub.dev" - source: hosted - version: "0.7.2" - timezone: - dependency: "direct main" - description: - name: timezone - sha256: "2236ec079a174ce07434e89fcd3fcda430025eb7692244139a9cf54fdcf1fc7d" - url: "https://pub.dev" - source: hosted - version: "0.9.4" - timing: - dependency: transitive - description: - name: timing - sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" - url: "https://pub.dev" - source: hosted - version: "1.0.1" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c - url: "https://pub.dev" - source: hosted - version: "1.3.2" - universal_io: - dependency: transitive - description: - name: universal_io - sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" - url: "https://pub.dev" - source: hosted - version: "2.2.2" - url_launcher: - dependency: transitive - description: - name: url_launcher - sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" - url: "https://pub.dev" - source: hosted - version: "6.3.0" - url_launcher_android: - dependency: transitive - description: - name: url_launcher_android - sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 - url: "https://pub.dev" - source: hosted - version: "6.3.9" - url_launcher_ios: - dependency: transitive - description: - name: url_launcher_ios - sha256: e43b677296fadce447e987a2f519dcf5f6d1e527dc35d01ffab4fff5b8a7063e - url: "https://pub.dev" - source: hosted - version: "6.3.1" - url_launcher_linux: - dependency: transitive - description: - name: url_launcher_linux - sha256: e2b9622b4007f97f504cd64c0128309dfb978ae66adbe944125ed9e1750f06af - url: "https://pub.dev" - source: hosted - version: "3.2.0" - url_launcher_macos: - dependency: transitive - description: - name: url_launcher_macos - sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" - url: "https://pub.dev" - source: hosted - version: "3.2.0" - url_launcher_platform_interface: - dependency: transitive - description: - name: url_launcher_platform_interface - sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - url_launcher_web: - dependency: transitive - description: - name: url_launcher_web - sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" - url: "https://pub.dev" - source: hosted - version: "2.3.3" - url_launcher_windows: - dependency: transitive - description: - name: url_launcher_windows - sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" - url: "https://pub.dev" - source: hosted - version: "3.1.2" - uuid: - dependency: transitive - description: - name: uuid - sha256: "83d37c7ad7aaf9aa8e275490669535c8080377cfa7a7004c24dfac53afffaa90" - url: "https://pub.dev" - source: hosted - version: "4.4.2" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" - url: "https://pub.dev" - source: hosted - version: "14.2.5" - watcher: - dependency: transitive - description: - name: watcher - sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - web: - dependency: transitive - description: - name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" - url: "https://pub.dev" - source: hosted - version: "0.5.1" - web_socket: - dependency: transitive - description: - name: web_socket - sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" - url: "https://pub.dev" - source: hosted - version: "0.1.6" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" - url: "https://pub.dev" - source: hosted - version: "3.0.1" - win32: - dependency: transitive - description: - name: win32 - sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" - url: "https://pub.dev" - source: hosted - version: "5.5.4" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d - url: "https://pub.dev" - source: hosted - version: "1.0.4" - xml: - dependency: transitive - description: - name: xml - sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 - url: "https://pub.dev" - source: hosted - version: "6.5.0" - yaml: - dependency: transitive - description: - name: yaml - sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" - url: "https://pub.dev" - source: hosted - version: "3.1.2" -sdks: - dart: ">=3.5.0 <4.0.0" - flutter: ">=3.22.0" diff --git a/packages/ap_common/pubspec.yaml b/packages/ap_common/pubspec.yaml index 19a6d7fd..de962ab5 100644 --- a/packages/ap_common/pubspec.yaml +++ b/packages/ap_common/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common description: The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app -version: 0.25.3 +version: 0.26.0-dev.0 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common @@ -13,29 +13,9 @@ dependencies: flutter_localizations: sdk: flutter - ap_common_core: ^0.0.1 - ap_common_flutter_core: ^0.0.1 + ap_common_flutter_ui: ^0.0.1 ap_common_flutter_platform: ^0.0.1 - - # Dart Packages - sprintf: ^7.0.0 - intl: ">=0.16.0 <1.0.0" - multiple_localization: ^0.5.0 - encrypt: ^5.0.1 - dio: ">=5.4.1 <6.0.0" - dio_cookie_manager: ^3.1.1 - cookie_jar: ^4.0.0 - timezone: ^0.9.4 - jwt_decoder: ^2.0.1 - json_annotation: ^4.6.0 - # Flutter UI Package - photo_view: ^0.15.0 - barcode_widget: ^2.0.1 - barcode: ^2.2.1 - pdf: ^3.8.1 - auto_size_text_pk: ^3.0.0 - flutter_linkify: ^6.0.0 - cupertino_back_gesture: ^0.1.0 + ap_common_announcement_ui: ^0.0.1 #dependency_overrides: # ap_common_core: @@ -46,14 +26,6 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - build_runner: ^2.0.3 - json_serializable: ^6.3.0 - spider: ^4.2.2 - -flutter: - assets: - - assets/images/ - - assets/icons/ false_secrets: - /example/lib/main.dart diff --git a/packages/ap_common/test/ap_common_test.dart b/packages/ap_common/test/ap_common_test.dart deleted file mode 100644 index a34bdb2d..00000000 --- a/packages/ap_common/test/ap_common_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:ap_common/ap_common.dart'; -import 'package:flutter_test/flutter_test.dart'; - -void main() { - test('adds one to input values', () { - final Calculator calculator = Calculator(); - expect(calculator.addOne(2), 3); - expect(calculator.addOne(-7), -6); - expect(calculator.addOne(0), 1); - }); -} diff --git a/packages/ap_common/test/model_test.dart b/packages/ap_common/test/model_test.dart index 48ba4139..73bf9758 100644 --- a/packages/ap_common/test/model_test.dart +++ b/packages/ap_common/test/model_test.dart @@ -1,4 +1,4 @@ -import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:flutter_test/flutter_test.dart'; //ignore_for_file: lines_longer_than_80_chars diff --git a/packages/ap_common_announcement_ui/.flutter-plugins b/packages/ap_common_announcement_ui/.flutter-plugins new file mode 100644 index 00000000..195583e0 --- /dev/null +++ b/packages/ap_common_announcement_ui/.flutter-plugins @@ -0,0 +1,22 @@ +# This is a generated file; do not edit or check into version control. +flutter_keyboard_visibility=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/ +flutter_keyboard_visibility_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_linux-1.0.0/ +flutter_keyboard_visibility_macos=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_macos-1.0.0/ +flutter_keyboard_visibility_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_web-2.0.0/ +flutter_keyboard_visibility_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_windows-1.0.0/ +google_sign_in=/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in-6.2.1/ +google_sign_in_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_android-6.1.33/ +google_sign_in_ios=/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.8/ +google_sign_in_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_web-0.12.4+2/ +package_info_plus=/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/ +path_provider=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider-2.1.4/ +path_provider_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_android-2.2.12/ +path_provider_foundation=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/ +path_provider_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/ +path_provider_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/ +printing=/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/ +sign_in_with_apple=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple-6.1.3/ +sign_in_with_apple_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple_web-2.1.0/ +sqflite=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite-2.4.0/ +sqflite_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_android-2.4.0-1/ +sqflite_darwin=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.1-0/ diff --git a/packages/ap_common_announcement_ui/.flutter-plugins-dependencies b/packages/ap_common_announcement_ui/.flutter-plugins-dependencies new file mode 100644 index 00000000..01e20b83 --- /dev/null +++ b/packages/ap_common_announcement_ui/.flutter-plugins-dependencies @@ -0,0 +1 @@ +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_keyboard_visibility","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/","native_build":true,"dependencies":[]},{"name":"google_sign_in_ios","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.8/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","native_build":true,"dependencies":[]},{"name":"sign_in_with_apple","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple-6.1.3/","native_build":true,"dependencies":[]},{"name":"sqflite_darwin","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.1-0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"flutter_keyboard_visibility","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/","native_build":true,"dependencies":[]},{"name":"google_sign_in_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_android-6.1.33/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_android-2.2.12/","native_build":true,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","native_build":true,"dependencies":[]},{"name":"sign_in_with_apple","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple-6.1.3/","native_build":true,"dependencies":[]},{"name":"sqflite_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_android-2.4.0-1/","native_build":true,"dependencies":[]}],"macos":[{"name":"flutter_keyboard_visibility_macos","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_macos-1.0.0/","native_build":false,"dependencies":[]},{"name":"google_sign_in_ios","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.8/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","native_build":true,"dependencies":[]},{"name":"sign_in_with_apple","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple-6.1.3/","native_build":true,"dependencies":[]},{"name":"sqflite_darwin","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.1-0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"flutter_keyboard_visibility_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_linux-1.0.0/","native_build":false,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":false,"dependencies":[]},{"name":"path_provider_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","native_build":true,"dependencies":[]}],"windows":[{"name":"flutter_keyboard_visibility_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_windows-1.0.0/","native_build":false,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":false,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","native_build":true,"dependencies":[]}],"web":[{"name":"flutter_keyboard_visibility_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_web-2.0.0/","dependencies":[]},{"name":"google_sign_in_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_web-0.12.4+2/","dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","dependencies":[]},{"name":"sign_in_with_apple_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple_web-2.1.0/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_keyboard_visibility","dependencies":["flutter_keyboard_visibility_linux","flutter_keyboard_visibility_macos","flutter_keyboard_visibility_web","flutter_keyboard_visibility_windows"]},{"name":"flutter_keyboard_visibility_linux","dependencies":[]},{"name":"flutter_keyboard_visibility_macos","dependencies":[]},{"name":"flutter_keyboard_visibility_web","dependencies":[]},{"name":"flutter_keyboard_visibility_windows","dependencies":[]},{"name":"google_sign_in","dependencies":["google_sign_in_android","google_sign_in_ios","google_sign_in_web"]},{"name":"google_sign_in_android","dependencies":[]},{"name":"google_sign_in_ios","dependencies":[]},{"name":"google_sign_in_web","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"printing","dependencies":[]},{"name":"sign_in_with_apple","dependencies":["sign_in_with_apple_web"]},{"name":"sign_in_with_apple_web","dependencies":[]},{"name":"sqflite","dependencies":["sqflite_android","sqflite_darwin"]},{"name":"sqflite_android","dependencies":[]},{"name":"sqflite_darwin","dependencies":[]}],"date_created":"2024-10-08 19:09:24.277488","version":"3.24.3","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/packages/ap_common_announcement_ui/.gitignore b/packages/ap_common_announcement_ui/.gitignore new file mode 100644 index 00000000..ac5aa989 --- /dev/null +++ b/packages/ap_common_announcement_ui/.gitignore @@ -0,0 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ diff --git a/packages/ap_common_announcement_ui/.metadata b/packages/ap_common_announcement_ui/.metadata new file mode 100644 index 00000000..24472f12 --- /dev/null +++ b/packages/ap_common_announcement_ui/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "2663184aa79047d0a33a14a3b607954f8fdd8730" + channel: "stable" + +project_type: package diff --git a/packages/ap_common_announcement_ui/CHANGELOG.md b/packages/ap_common_announcement_ui/CHANGELOG.md new file mode 100644 index 00000000..a2c5ec04 --- /dev/null +++ b/packages/ap_common_announcement_ui/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* initial release from `ap_common` package separate. \ No newline at end of file diff --git a/packages/ap_common_announcement_ui/LICENSE b/packages/ap_common_announcement_ui/LICENSE new file mode 100644 index 00000000..d25d4a88 --- /dev/null +++ b/packages/ap_common_announcement_ui/LICENSE @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2024 RainVisitor + +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: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +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. \ No newline at end of file diff --git a/packages/ap_common_announcement_ui/README.md b/packages/ap_common_announcement_ui/README.md new file mode 100644 index 00000000..eb8f6101 --- /dev/null +++ b/packages/ap_common_announcement_ui/README.md @@ -0,0 +1,34 @@ +# 校務通系列介面與函式共用 + +[![](https://img.shields.io/badge/Flutter-v3.24-blue)](https://github.com/flutter/flutter) +[![](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common/) +[![melos](https://img.shields.io/badge/maintained%20with-melos-f700ff.svg?style=flat-square)](https://github.com/invertase/melos) + +長期校務通相關系列的app,介面與相關功能都極為相似,將相關的介面與函式庫,製作此套件以方便維護。 + +[展示網頁](https://abc873693.github.io/ap_common/#/) +[文件](https://ap-common.web.app/) + +## 相關專案 + +- [高科校務通](https://github.com/NKUST-ITC/NKUST-AP-Flutter) +- [中山校務通](https://github.com/abc873693/NSYSU-AP) +- [文藻校務通](https://github.com/abc873693/WTUC-AP) +- [台科校務通(已下架)](https://github.com/abc873693/NTUST-AP) + +## 套件 + +| Name | pub.dev | 說明 | +|-------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------| +| `ap_common` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common/) | 函式庫與相關介面共用 | +| `ap_common_core` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common_core/) | 純 Dart 的基本類別 | +| `ap_common_flutter_core` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_core.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_core/) | 基於 Flutter 框架的核心基本類別 | +| `ap_common_flutter_platform` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_platform.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_platform/) | 原生功能實作 | +| `ap_common_flutter_ui` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_ui.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_ui/) | UI 實作但不包含原生功能整合 | +| `ap_common_flutter_announcement_ui` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_announcement_ui.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_announcement_ui/) | 最新消息服務相關的介面實作 | +| `ap_common_plugin` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_plugin.svg?style=flat-square)](https://pub.dev/packages/ap_common_plugin/) | 課表小工具 | +| `ap_common_firebase` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_firebase.svg?style=flat-square)](https://pub.dev/packages/ap_common_firebase/) | 服務 `Firebase` 的整合實作 | + +## 套件使用要求 + +- Flutter `v3.22` 以上 diff --git a/packages/ap_common_announcement_ui/lib/ap_common_announcement_ui.dart b/packages/ap_common_announcement_ui/lib/ap_common_announcement_ui.dart new file mode 100644 index 00000000..396e21b6 --- /dev/null +++ b/packages/ap_common_announcement_ui/lib/ap_common_announcement_ui.dart @@ -0,0 +1,5 @@ +export 'src/api/announcement_helper.dart'; +export 'src/ui/announcement_content_page.dart'; +export 'src/ui/black_list_page.dart'; +export 'src/ui/edit_page.dart'; +export 'src/ui/home_page.dart'; diff --git a/packages/ap_common/lib/api/announcement_helper.dart b/packages/ap_common_announcement_ui/lib/src/api/announcement_helper.dart similarity index 100% rename from packages/ap_common/lib/api/announcement_helper.dart rename to packages/ap_common_announcement_ui/lib/src/api/announcement_helper.dart diff --git a/packages/ap_common/lib/api/github_helper.dart b/packages/ap_common_announcement_ui/lib/src/api/github_helper.dart similarity index 100% rename from packages/ap_common/lib/api/github_helper.dart rename to packages/ap_common_announcement_ui/lib/src/api/github_helper.dart diff --git a/packages/ap_common/lib/api/imgur_helper.dart b/packages/ap_common_announcement_ui/lib/src/api/imgur_helper.dart similarity index 100% rename from packages/ap_common/lib/api/imgur_helper.dart rename to packages/ap_common_announcement_ui/lib/src/api/imgur_helper.dart diff --git a/packages/ap_common/lib/pages/announcement_content_page.dart b/packages/ap_common_announcement_ui/lib/src/ui/announcement_content_page.dart similarity index 94% rename from packages/ap_common/lib/pages/announcement_content_page.dart rename to packages/ap_common_announcement_ui/lib/src/ui/announcement_content_page.dart index b59a717d..864965de 100644 --- a/packages/ap_common/lib/pages/announcement_content_page.dart +++ b/packages/ap_common_announcement_ui/lib/src/ui/announcement_content_page.dart @@ -1,9 +1,4 @@ -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/ap_utils.dart'; -import 'package:ap_common/widgets/ap_network_image.dart'; -import 'package:ap_common/widgets/hint_content.dart'; -import 'package:ap_common_core/ap_common_core.dart'; -import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:flutter_linkify/flutter_linkify.dart'; diff --git a/packages/ap_common/lib/pages/announcement/black_list_page.dart b/packages/ap_common_announcement_ui/lib/src/ui/black_list_page.dart similarity index 92% rename from packages/ap_common/lib/pages/announcement/black_list_page.dart rename to packages/ap_common_announcement_ui/lib/src/ui/black_list_page.dart index 5aa28376..f3731aef 100644 --- a/packages/ap_common/lib/pages/announcement/black_list_page.dart +++ b/packages/ap_common_announcement_ui/lib/src/ui/black_list_page.dart @@ -1,8 +1,5 @@ -import 'package:ap_common/api/announcement_helper.dart'; -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/ap_utils.dart'; -import 'package:ap_common/widgets/hint_content.dart'; -import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_announcement_ui/src/api/announcement_helper.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:flutter/material.dart'; enum _State { loading, done, error } diff --git a/packages/ap_common/lib/pages/announcement/edit_page.dart b/packages/ap_common_announcement_ui/lib/src/ui/edit_page.dart similarity index 98% rename from packages/ap_common/lib/pages/announcement/edit_page.dart rename to packages/ap_common_announcement_ui/lib/src/ui/edit_page.dart index 8b8d9e20..1d626b06 100644 --- a/packages/ap_common/lib/pages/announcement/edit_page.dart +++ b/packages/ap_common_announcement_ui/lib/src/ui/edit_page.dart @@ -1,12 +1,8 @@ -import 'package:ap_common/api/announcement_helper.dart'; -import 'package:ap_common/api/imgur_helper.dart'; -import 'package:ap_common/pages/announcement/home_page.dart' show TagColors; -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/widgets/ap_network_image.dart'; -import 'package:ap_common/widgets/default_dialog.dart'; -import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_announcement_ui/src/api/announcement_helper.dart'; +import 'package:ap_common_announcement_ui/src/api/imgur_helper.dart'; +import 'package:ap_common_announcement_ui/src/ui/home_page.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart'; enum _ImgurUploadState { noFile, uploading, done } diff --git a/packages/ap_common/lib/pages/announcement/home_page.dart b/packages/ap_common_announcement_ui/lib/src/ui/home_page.dart similarity index 98% rename from packages/ap_common/lib/pages/announcement/home_page.dart rename to packages/ap_common_announcement_ui/lib/src/ui/home_page.dart index e5f75eb1..dd52124d 100644 --- a/packages/ap_common/lib/pages/announcement/home_page.dart +++ b/packages/ap_common_announcement_ui/lib/src/ui/home_page.dart @@ -1,15 +1,9 @@ import 'dart:io'; -import 'package:ap_common/api/announcement_helper.dart'; -import 'package:ap_common/pages/announcement/black_list_page.dart'; -import 'package:ap_common/pages/announcement/edit_page.dart'; -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/scaffold/login_scaffold.dart'; -import 'package:ap_common/utils/ap_utils.dart'; -import 'package:ap_common/widgets/hint_content.dart'; -import 'package:ap_common/widgets/progress_dialog.dart'; -import 'package:ap_common/widgets/yes_no_dialog.dart'; -import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_announcement_ui/src/api/announcement_helper.dart'; +import 'package:ap_common_announcement_ui/src/ui/black_list_page.dart'; +import 'package:ap_common_announcement_ui/src/ui/edit_page.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; diff --git a/packages/ap_common_announcement_ui/pubspec.yaml b/packages/ap_common_announcement_ui/pubspec.yaml new file mode 100644 index 00000000..78f4d891 --- /dev/null +++ b/packages/ap_common_announcement_ui/pubspec.yaml @@ -0,0 +1,35 @@ +name: ap_common_announcement_ui +description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" +version: 0.0.1 +homepage: https://github.com/abc873693/ap_common +repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_announcement_ui + + +environment: + sdk: ^3.4.0 + flutter: ">=3.22.0" + +dependencies: + flutter: + sdk: flutter + ap_common_core: '>=0.0.1 <1.0.0' + ap_common_flutter_core: '>=0.0.1 <1.0.0' + ap_common_flutter_ui: '>=0.0.1 <1.0.0' + # Dart Packages + path: ^1.9.0 + dio_cookie_manager: ^3.1.1 + cookie_jar: ^4.0.0 + sprintf: ^7.0.0 + # UI Package + photo_view: ^0.15.0 + cached_network_image: ^3.3.1 + flutter_linkify: ^6.0.0 + # Third-party Login Package + google_sign_in: ^6.2.1 + sign_in_with_apple: ^6.1.1 + +dev_dependencies: + flutter_test: + sdk: flutter + +flutter: diff --git a/packages/ap_common_core/README.md b/packages/ap_common_core/README.md index 5481ec0c..eb8f6101 100644 --- a/packages/ap_common_core/README.md +++ b/packages/ap_common_core/README.md @@ -18,12 +18,17 @@ ## 套件 -| Name | pub.dev | 說明 | -|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|---------------------| -| `ap_common` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common/) | 函式庫與相關介面共用 | -| `ap_common_plugin` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_plugin.svg?style=flat-square)](https://pub.dev/packages/ap_common_plugin/) | 課表小工具 | -| `ap_common_firebase` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_firebase.svg?style=flat-square)](https://pub.dev/packages/ap_common_firebase/) | 服務 `Firebase` 的整合實作 | +| Name | pub.dev | 說明 | +|-------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------| +| `ap_common` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common/) | 函式庫與相關介面共用 | +| `ap_common_core` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common_core/) | 純 Dart 的基本類別 | +| `ap_common_flutter_core` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_core.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_core/) | 基於 Flutter 框架的核心基本類別 | +| `ap_common_flutter_platform` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_platform.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_platform/) | 原生功能實作 | +| `ap_common_flutter_ui` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_ui.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_ui/) | UI 實作但不包含原生功能整合 | +| `ap_common_flutter_announcement_ui` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_announcement_ui.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_announcement_ui/) | 最新消息服務相關的介面實作 | +| `ap_common_plugin` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_plugin.svg?style=flat-square)](https://pub.dev/packages/ap_common_plugin/) | 課表小工具 | +| `ap_common_firebase` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_firebase.svg?style=flat-square)](https://pub.dev/packages/ap_common_firebase/) | 服務 `Firebase` 的整合實作 | ## 套件使用要求 -- Flutter `v1.20` 以上 +- Flutter `v3.22` 以上 diff --git a/packages/ap_common_core/lib/ap_common_core.dart b/packages/ap_common_core/lib/ap_common_core.dart index 283bbdd3..f7a291e0 100644 --- a/packages/ap_common_core/lib/ap_common_core.dart +++ b/packages/ap_common_core/lib/ap_common_core.dart @@ -1,3 +1,6 @@ +import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_core/injector.dart'; + export 'src/config/analytics_constants.dart'; export 'src/config/ap_constants.dart'; export 'src/models/announcement_data.dart'; @@ -18,3 +21,18 @@ export 'src/models/version_info.dart'; export 'src/utilities/analytics_utils.dart'; export 'src/utilities/crashlytics_utils.dart'; export 'src/utilities/preference_util.dart'; + +void registerApCommonService({ + required AnalyticsUtil analytics, + required CrashlyticsUtil crashlytics, +}) { + injector + ..registerSingleton(() => analytics) + ..registerSingleton(() => crashlytics); +} + +void registerApCommonCore({ + required PreferenceUtil preference, +}) { + injector.registerSingleton(() => preference); +} diff --git a/packages/ap_common_core/lib/injector.dart b/packages/ap_common_core/lib/injector.dart index 49c13f81..3410c7fd 100644 --- a/packages/ap_common_core/lib/injector.dart +++ b/packages/ap_common_core/lib/injector.dart @@ -1,4 +1,6 @@ // Use this static instance import 'package:injector/injector.dart'; +export 'package:injector/injector.dart'; + final Injector injector = Injector.appInstance; diff --git a/packages/ap_common_core/pubspec.yaml b/packages/ap_common_core/pubspec.yaml index 92605d23..3fac8004 100644 --- a/packages/ap_common_core/pubspec.yaml +++ b/packages/ap_common_core/pubspec.yaml @@ -10,11 +10,9 @@ environment: dependencies: sprintf: ^7.0.0 intl: ">=0.16.0 <1.0.0" - encrypt: ^5.0.1 dio: ">=5.4.1 <6.0.0" dio_cookie_manager: ^3.1.1 cookie_jar: ^4.0.0 - timezone: ^0.9.4 jwt_decoder: ^2.0.1 json_annotation: ^4.6.0 injector: ^4.0.0 diff --git a/packages/ap_common_firebase/lib/src/utils/firebase_analytics_utils.dart b/packages/ap_common_firebase/lib/src/utils/firebase_analytics_utils.dart index f65161ad..44a77ca2 100644 --- a/packages/ap_common_firebase/lib/src/utils/firebase_analytics_utils.dart +++ b/packages/ap_common_firebase/lib/src/utils/firebase_analytics_utils.dart @@ -1,7 +1,6 @@ import 'dart:async'; import 'dart:io'; -import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_firebase/src/utils/firebase_utils.dart'; import 'package:firebase_analytics/firebase_analytics.dart'; @@ -182,7 +181,7 @@ class FirebaseAnalyticsUtils extends AnalyticsUtil { } setUserProperty( AnalyticsConstants.theme, - brightness == Brightness.light ? ApTheme.LIGHT : ApTheme.DARK, + brightness == Brightness.light ? 'light' : 'dart', ); } } diff --git a/packages/ap_common_flutter_core/README.md b/packages/ap_common_flutter_core/README.md index 5481ec0c..eb8f6101 100644 --- a/packages/ap_common_flutter_core/README.md +++ b/packages/ap_common_flutter_core/README.md @@ -18,12 +18,17 @@ ## 套件 -| Name | pub.dev | 說明 | -|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|---------------------| -| `ap_common` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common/) | 函式庫與相關介面共用 | -| `ap_common_plugin` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_plugin.svg?style=flat-square)](https://pub.dev/packages/ap_common_plugin/) | 課表小工具 | -| `ap_common_firebase` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_firebase.svg?style=flat-square)](https://pub.dev/packages/ap_common_firebase/) | 服務 `Firebase` 的整合實作 | +| Name | pub.dev | 說明 | +|-------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------| +| `ap_common` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common/) | 函式庫與相關介面共用 | +| `ap_common_core` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common_core/) | 純 Dart 的基本類別 | +| `ap_common_flutter_core` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_core.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_core/) | 基於 Flutter 框架的核心基本類別 | +| `ap_common_flutter_platform` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_platform.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_platform/) | 原生功能實作 | +| `ap_common_flutter_ui` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_ui.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_ui/) | UI 實作但不包含原生功能整合 | +| `ap_common_flutter_announcement_ui` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_announcement_ui.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_announcement_ui/) | 最新消息服務相關的介面實作 | +| `ap_common_plugin` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_plugin.svg?style=flat-square)](https://pub.dev/packages/ap_common_plugin/) | 課表小工具 | +| `ap_common_firebase` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_firebase.svg?style=flat-square)](https://pub.dev/packages/ap_common_firebase/) | 服務 `Firebase` 的整合實作 | ## 套件使用要求 -- Flutter `v1.20` 以上 +- Flutter `v3.22` 以上 diff --git a/packages/ap_common_flutter_core/lib/ap_common_flutter_core.dart b/packages/ap_common_flutter_core/lib/ap_common_flutter_core.dart index a080f1a9..b52f06ef 100644 --- a/packages/ap_common_flutter_core/lib/ap_common_flutter_core.dart +++ b/packages/ap_common_flutter_core/lib/ap_common_flutter_core.dart @@ -1,3 +1,6 @@ +import 'package:ap_common_core/injector.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; + export 'package:cross_file/cross_file.dart'; export 'src/callback/general_callback.dart'; @@ -10,3 +13,20 @@ export 'src/utilities/notification_util.dart'; export 'src/utilities/platform_calendar_util.dart'; export 'src/utilities/platform_util.dart'; export 'src/utilities/ui_util.dart'; + +void registerApCommonFlutter({ + required UiUtil ui, + required PlatformUtil platform, + required MediaUtil media, + required PlatformCalendarUtil platformCalendar, + required NotificationUtil notification, + required AppStoreUtil appStore, +}) { + injector + ..registerSingleton(() => ui) + ..registerSingleton(() => platform) + ..registerSingleton(() => media) + ..registerSingleton(() => platformCalendar) + ..registerSingleton(() => notification) + ..registerSingleton(() => appStore); +} diff --git a/packages/ap_common_flutter_core/pubspec.yaml b/packages/ap_common_flutter_core/pubspec.yaml index 059fa445..954ce9dc 100644 --- a/packages/ap_common_flutter_core/pubspec.yaml +++ b/packages/ap_common_flutter_core/pubspec.yaml @@ -6,7 +6,7 @@ repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_commo environment: - sdk: ^3.5.3 + sdk: ^3.4.0 flutter: ">=3.22.0" dependencies: diff --git a/packages/ap_common_flutter_platform/.flutter-plugins b/packages/ap_common_flutter_platform/.flutter-plugins index 1392b849..850b7555 100644 --- a/packages/ap_common_flutter_platform/.flutter-plugins +++ b/packages/ap_common_flutter_platform/.flutter-plugins @@ -5,18 +5,9 @@ file_saver=/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/ file_selector_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.3/ file_selector_macos=/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.4+2/ file_selector_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+3/ -flutter_keyboard_visibility=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/ -flutter_keyboard_visibility_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_linux-1.0.0/ -flutter_keyboard_visibility_macos=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_macos-1.0.0/ -flutter_keyboard_visibility_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_web-2.0.0/ -flutter_keyboard_visibility_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_windows-1.0.0/ flutter_local_notifications=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications-17.2.3/ flutter_local_notifications_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications_linux-4.0.1/ flutter_plugin_android_lifecycle=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.23/ -google_sign_in=/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in-6.2.1/ -google_sign_in_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_android-6.1.33/ -google_sign_in_ios=/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.8/ -google_sign_in_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_web-0.12.4+2/ image_picker=/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker-1.1.2/ image_picker_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+15/ image_picker_for_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_for_web-3.0.5/ @@ -32,7 +23,6 @@ path_provider_foundation=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provi path_provider_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/ path_provider_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/ photo_manager=/Users/rainvisitor/.pub-cache/hosted/pub.dev/photo_manager-3.5.0/ -printing=/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.1/ share_plus=/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/ shared_preferences=/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences-2.3.2/ shared_preferences_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.3/ @@ -40,11 +30,6 @@ shared_preferences_foundation=/Users/rainvisitor/.pub-cache/hosted/pub.dev/share shared_preferences_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/ shared_preferences_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/ shared_preferences_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/ -sign_in_with_apple=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple-6.1.3/ -sign_in_with_apple_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple_web-2.1.0/ -sqflite=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite-2.4.0/ -sqflite_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_android-2.4.0-1/ -sqflite_darwin=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.1-0/ url_launcher=/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher-6.3.0/ url_launcher_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.12/ url_launcher_ios=/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.1/ diff --git a/packages/ap_common_flutter_platform/.flutter-plugins-dependencies b/packages/ap_common_flutter_platform/.flutter-plugins-dependencies index 99d6b30a..51baf631 100644 --- a/packages/ap_common_flutter_platform/.flutter-plugins-dependencies +++ b/packages/ap_common_flutter_platform/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"add_2_calendar","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/add_2_calendar-3.0.1/","native_build":true,"dependencies":[]},{"name":"app_tracking_transparency","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/app_tracking_transparency-2.0.6/","native_build":true,"dependencies":[]},{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","native_build":true,"dependencies":[]},{"name":"flutter_keyboard_visibility","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/","native_build":true,"dependencies":[]},{"name":"flutter_local_notifications","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications-17.2.3/","native_build":true,"dependencies":[]},{"name":"google_sign_in_ios","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.8/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"image_picker_ios","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12/","native_build":true,"dependencies":[]},{"name":"in_app_review","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/in_app_review-2.0.9/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"photo_manager","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/photo_manager-3.5.0/","native_build":true,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.1/","native_build":true,"dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"sign_in_with_apple","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple-6.1.3/","native_build":true,"dependencies":[]},{"name":"sqflite_darwin","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.1-0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"url_launcher_ios","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.1/","native_build":true,"dependencies":[]}],"android":[{"name":"add_2_calendar","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/add_2_calendar-3.0.1/","native_build":true,"dependencies":[]},{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","native_build":true,"dependencies":[]},{"name":"flutter_keyboard_visibility","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/","native_build":true,"dependencies":[]},{"name":"flutter_local_notifications","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications-17.2.3/","native_build":true,"dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.23/","native_build":true,"dependencies":[]},{"name":"google_sign_in_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_android-6.1.33/","native_build":true,"dependencies":[]},{"name":"image_picker_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+15/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"]},{"name":"in_app_review","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/in_app_review-2.0.9/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_android-2.2.12/","native_build":true,"dependencies":[]},{"name":"photo_manager","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/photo_manager-3.5.0/","native_build":true,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.1/","native_build":true,"dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.3/","native_build":true,"dependencies":[]},{"name":"sign_in_with_apple","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple-6.1.3/","native_build":true,"dependencies":[]},{"name":"sqflite_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_android-2.4.0-1/","native_build":true,"dependencies":[]},{"name":"url_launcher_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.12/","native_build":true,"dependencies":[]}],"macos":[{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","native_build":true,"dependencies":[]},{"name":"file_selector_macos","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.4+2/","native_build":true,"dependencies":[]},{"name":"flutter_keyboard_visibility_macos","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_macos-1.0.0/","native_build":false,"dependencies":[]},{"name":"flutter_local_notifications","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications-17.2.3/","native_build":true,"dependencies":[]},{"name":"google_sign_in_ios","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.8/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"image_picker_macos","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1+1/","native_build":false,"dependencies":["file_selector_macos"]},{"name":"in_app_review","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/in_app_review-2.0.9/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"photo_manager","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/photo_manager-3.5.0/","native_build":true,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.1/","native_build":true,"dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"sign_in_with_apple","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple-6.1.3/","native_build":true,"dependencies":[]},{"name":"sqflite_darwin","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.1-0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"url_launcher_macos","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.1/","native_build":true,"dependencies":[]}],"linux":[{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","native_build":true,"dependencies":["path_provider_linux"]},{"name":"file_selector_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.3/","native_build":true,"dependencies":[]},{"name":"flutter_keyboard_visibility_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_linux-1.0.0/","native_build":false,"dependencies":[]},{"name":"flutter_local_notifications_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications_linux-4.0.1/","native_build":false,"dependencies":[]},{"name":"image_picker_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+1/","native_build":false,"dependencies":["file_selector_linux"]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":false,"dependencies":[]},{"name":"path_provider_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.1/","native_build":true,"dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","native_build":false,"dependencies":["url_launcher_linux"]},{"name":"shared_preferences_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]},{"name":"url_launcher_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.0/","native_build":true,"dependencies":[]}],"windows":[{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","native_build":true,"dependencies":["path_provider_windows"]},{"name":"file_selector_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+3/","native_build":true,"dependencies":[]},{"name":"flutter_keyboard_visibility_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_windows-1.0.0/","native_build":false,"dependencies":[]},{"name":"image_picker_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1+1/","native_build":false,"dependencies":["file_selector_windows"]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":false,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.1/","native_build":true,"dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","native_build":true,"dependencies":["url_launcher_windows"]},{"name":"shared_preferences_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]},{"name":"url_launcher_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.2/","native_build":true,"dependencies":[]}],"web":[{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","dependencies":[]},{"name":"flutter_keyboard_visibility_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_web-2.0.0/","dependencies":[]},{"name":"google_sign_in_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_web-0.12.4+2/","dependencies":[]},{"name":"image_picker_for_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_for_web-3.0.5/","dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.1/","dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","dependencies":["url_launcher_web"]},{"name":"shared_preferences_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]},{"name":"sign_in_with_apple_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple_web-2.1.0/","dependencies":[]},{"name":"url_launcher_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.3/","dependencies":[]}]},"dependencyGraph":[{"name":"add_2_calendar","dependencies":[]},{"name":"app_tracking_transparency","dependencies":[]},{"name":"file_saver","dependencies":["path_provider","path_provider_windows","path_provider_linux"]},{"name":"file_selector_linux","dependencies":[]},{"name":"file_selector_macos","dependencies":[]},{"name":"file_selector_windows","dependencies":[]},{"name":"flutter_keyboard_visibility","dependencies":["flutter_keyboard_visibility_linux","flutter_keyboard_visibility_macos","flutter_keyboard_visibility_web","flutter_keyboard_visibility_windows"]},{"name":"flutter_keyboard_visibility_linux","dependencies":[]},{"name":"flutter_keyboard_visibility_macos","dependencies":[]},{"name":"flutter_keyboard_visibility_web","dependencies":[]},{"name":"flutter_keyboard_visibility_windows","dependencies":[]},{"name":"flutter_local_notifications","dependencies":["flutter_local_notifications_linux"]},{"name":"flutter_local_notifications_linux","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"google_sign_in","dependencies":["google_sign_in_android","google_sign_in_ios","google_sign_in_web"]},{"name":"google_sign_in_android","dependencies":[]},{"name":"google_sign_in_ios","dependencies":[]},{"name":"google_sign_in_web","dependencies":[]},{"name":"image_picker","dependencies":["image_picker_android","image_picker_for_web","image_picker_ios","image_picker_linux","image_picker_macos","image_picker_windows"]},{"name":"image_picker_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"image_picker_ios","dependencies":[]},{"name":"image_picker_linux","dependencies":["file_selector_linux"]},{"name":"image_picker_macos","dependencies":["file_selector_macos"]},{"name":"image_picker_windows","dependencies":["file_selector_windows"]},{"name":"in_app_review","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"photo_manager","dependencies":[]},{"name":"printing","dependencies":[]},{"name":"share_plus","dependencies":["url_launcher_web","url_launcher_windows","url_launcher_linux"]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"sign_in_with_apple","dependencies":["sign_in_with_apple_web"]},{"name":"sign_in_with_apple_web","dependencies":[]},{"name":"sqflite","dependencies":["sqflite_android","sqflite_darwin"]},{"name":"sqflite_android","dependencies":[]},{"name":"sqflite_darwin","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2024-10-08 14:30:41.254330","version":"3.24.3","swift_package_manager_enabled":false} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"add_2_calendar","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/add_2_calendar-3.0.1/","native_build":true,"dependencies":[]},{"name":"app_tracking_transparency","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/app_tracking_transparency-2.0.6/","native_build":true,"dependencies":[]},{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","native_build":true,"dependencies":[]},{"name":"flutter_local_notifications","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications-17.2.3/","native_build":true,"dependencies":[]},{"name":"image_picker_ios","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12/","native_build":true,"dependencies":[]},{"name":"in_app_review","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/in_app_review-2.0.9/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"photo_manager","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/photo_manager-3.5.0/","native_build":true,"dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"url_launcher_ios","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.1/","native_build":true,"dependencies":[]}],"android":[{"name":"add_2_calendar","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/add_2_calendar-3.0.1/","native_build":true,"dependencies":[]},{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","native_build":true,"dependencies":[]},{"name":"flutter_local_notifications","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications-17.2.3/","native_build":true,"dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.23/","native_build":true,"dependencies":[]},{"name":"image_picker_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+15/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"]},{"name":"in_app_review","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/in_app_review-2.0.9/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_android-2.2.12/","native_build":true,"dependencies":[]},{"name":"photo_manager","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/photo_manager-3.5.0/","native_build":true,"dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.3/","native_build":true,"dependencies":[]},{"name":"url_launcher_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.12/","native_build":true,"dependencies":[]}],"macos":[{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","native_build":true,"dependencies":[]},{"name":"file_selector_macos","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.4+2/","native_build":true,"dependencies":[]},{"name":"flutter_local_notifications","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications-17.2.3/","native_build":true,"dependencies":[]},{"name":"image_picker_macos","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1+1/","native_build":false,"dependencies":["file_selector_macos"]},{"name":"in_app_review","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/in_app_review-2.0.9/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"photo_manager","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/photo_manager-3.5.0/","native_build":true,"dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"url_launcher_macos","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.1/","native_build":true,"dependencies":[]}],"linux":[{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","native_build":true,"dependencies":["path_provider_linux"]},{"name":"file_selector_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.3/","native_build":true,"dependencies":[]},{"name":"flutter_local_notifications_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications_linux-4.0.1/","native_build":false,"dependencies":[]},{"name":"image_picker_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+1/","native_build":false,"dependencies":["file_selector_linux"]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":false,"dependencies":[]},{"name":"path_provider_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","native_build":false,"dependencies":["url_launcher_linux"]},{"name":"shared_preferences_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]},{"name":"url_launcher_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.0/","native_build":true,"dependencies":[]}],"windows":[{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","native_build":true,"dependencies":["path_provider_windows"]},{"name":"file_selector_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+3/","native_build":true,"dependencies":[]},{"name":"image_picker_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1+1/","native_build":false,"dependencies":["file_selector_windows"]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":false,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","native_build":true,"dependencies":["url_launcher_windows"]},{"name":"shared_preferences_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]},{"name":"url_launcher_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.2/","native_build":true,"dependencies":[]}],"web":[{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","dependencies":[]},{"name":"image_picker_for_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_for_web-3.0.5/","dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","dependencies":["url_launcher_web"]},{"name":"shared_preferences_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]},{"name":"url_launcher_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.3/","dependencies":[]}]},"dependencyGraph":[{"name":"add_2_calendar","dependencies":[]},{"name":"app_tracking_transparency","dependencies":[]},{"name":"file_saver","dependencies":["path_provider","path_provider_windows","path_provider_linux"]},{"name":"file_selector_linux","dependencies":[]},{"name":"file_selector_macos","dependencies":[]},{"name":"file_selector_windows","dependencies":[]},{"name":"flutter_local_notifications","dependencies":["flutter_local_notifications_linux"]},{"name":"flutter_local_notifications_linux","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"image_picker","dependencies":["image_picker_android","image_picker_for_web","image_picker_ios","image_picker_linux","image_picker_macos","image_picker_windows"]},{"name":"image_picker_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"image_picker_ios","dependencies":[]},{"name":"image_picker_linux","dependencies":["file_selector_linux"]},{"name":"image_picker_macos","dependencies":["file_selector_macos"]},{"name":"image_picker_windows","dependencies":["file_selector_windows"]},{"name":"in_app_review","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"photo_manager","dependencies":[]},{"name":"share_plus","dependencies":["url_launcher_web","url_launcher_windows","url_launcher_linux"]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2024-10-08 19:09:31.110602","version":"3.24.3","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/packages/ap_common_flutter_platform/CHANGELOG.md b/packages/ap_common_flutter_platform/CHANGELOG.md index 41cc7d81..a2c5ec04 100644 --- a/packages/ap_common_flutter_platform/CHANGELOG.md +++ b/packages/ap_common_flutter_platform/CHANGELOG.md @@ -1,3 +1,3 @@ ## 0.0.1 -* TODO: Describe initial release. +* initial release from `ap_common` package separate. \ No newline at end of file diff --git a/packages/ap_common_flutter_platform/LICENSE b/packages/ap_common_flutter_platform/LICENSE index ba75c69f..d25d4a88 100644 --- a/packages/ap_common_flutter_platform/LICENSE +++ b/packages/ap_common_flutter_platform/LICENSE @@ -1 +1,9 @@ -TODO: Add your license here. +The MIT License (MIT) + +Copyright (c) 2024 RainVisitor + +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: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +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. \ No newline at end of file diff --git a/packages/ap_common_flutter_platform/README.md b/packages/ap_common_flutter_platform/README.md index 4a260d8d..eb8f6101 100644 --- a/packages/ap_common_flutter_platform/README.md +++ b/packages/ap_common_flutter_platform/README.md @@ -1,39 +1,34 @@ - +長期校務通相關系列的app,介面與相關功能都極為相似,將相關的介面與函式庫,製作此套件以方便維護。 -TODO: Put a short description of the package here that helps potential users -know whether this package might be useful for them. +[展示網頁](https://abc873693.github.io/ap_common/#/) +[文件](https://ap-common.web.app/) -## Features +## 相關專案 -TODO: List what your package can do. Maybe include images, gifs, or videos. +- [高科校務通](https://github.com/NKUST-ITC/NKUST-AP-Flutter) +- [中山校務通](https://github.com/abc873693/NSYSU-AP) +- [文藻校務通](https://github.com/abc873693/WTUC-AP) +- [台科校務通(已下架)](https://github.com/abc873693/NTUST-AP) -## Getting started +## 套件 -TODO: List prerequisites and provide or point to information on how to -start using the package. +| Name | pub.dev | 說明 | +|-------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------| +| `ap_common` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common/) | 函式庫與相關介面共用 | +| `ap_common_core` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common_core/) | 純 Dart 的基本類別 | +| `ap_common_flutter_core` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_core.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_core/) | 基於 Flutter 框架的核心基本類別 | +| `ap_common_flutter_platform` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_platform.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_platform/) | 原生功能實作 | +| `ap_common_flutter_ui` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_ui.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_ui/) | UI 實作但不包含原生功能整合 | +| `ap_common_flutter_announcement_ui` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_announcement_ui.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_announcement_ui/) | 最新消息服務相關的介面實作 | +| `ap_common_plugin` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_plugin.svg?style=flat-square)](https://pub.dev/packages/ap_common_plugin/) | 課表小工具 | +| `ap_common_firebase` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_firebase.svg?style=flat-square)](https://pub.dev/packages/ap_common_firebase/) | 服務 `Firebase` 的整合實作 | -## Usage +## 套件使用要求 -TODO: Include short and useful examples for package users. Add longer examples -to `/example` folder. - -```dart -const like = 'sample'; -``` - -## Additional information - -TODO: Tell users more about the package: where to find more information, how to -contribute to the package, how to file issues, what response they can expect -from the package authors, and more. +- Flutter `v3.22` 以上 diff --git a/packages/ap_common_flutter_platform/pubspec.yaml b/packages/ap_common_flutter_platform/pubspec.yaml index 91c427fe..049cb714 100644 --- a/packages/ap_common_flutter_platform/pubspec.yaml +++ b/packages/ap_common_flutter_platform/pubspec.yaml @@ -11,24 +11,24 @@ environment: dependencies: flutter: sdk: flutter - ap_common_core: ^0.0.1 - ap_common_flutter_core: ^0.0.1 + ap_common_core: '>=0.0.1 <1.0.0' + ap_common_flutter_core: '>=0.0.1 <1.0.0' + # Dart Package + encrypt: ^5.0.1 + timezone: ^0.9.4 + sprintf: ^7.0.0 + # Flutter Native Plugin app_tracking_transparency: ^2.0.2+4 flutter_local_notifications: ^17.2.2 shared_preferences: ^2.2.2 url_launcher: ^6.2.5 share_plus: ">=9.0.0 <=10.0.0" package_info_plus: ^8.0.2 - cached_network_image: ^3.3.1 - flutter_keyboard_visibility: ^6.0.0 add_2_calendar: ^3.0.1 in_app_review: ^2.0.3 - printing: ^5.10.4 path: ^1.7.0 path_provider: ^2.1.2 - google_sign_in: ^6.2.1 - sign_in_with_apple: ^6.1.1 image_picker: ^1.0.7 photo_manager: ^3.0.0 file_saver: ^0.2.12 @@ -36,5 +36,3 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - -flutter: diff --git a/packages/ap_common_flutter_ui/.flutter-plugins b/packages/ap_common_flutter_ui/.flutter-plugins new file mode 100644 index 00000000..81d3e322 --- /dev/null +++ b/packages/ap_common_flutter_ui/.flutter-plugins @@ -0,0 +1,16 @@ +# This is a generated file; do not edit or check into version control. +flutter_keyboard_visibility=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/ +flutter_keyboard_visibility_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_linux-1.0.0/ +flutter_keyboard_visibility_macos=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_macos-1.0.0/ +flutter_keyboard_visibility_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_web-2.0.0/ +flutter_keyboard_visibility_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_windows-1.0.0/ +package_info_plus=/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/ +path_provider=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider-2.1.4/ +path_provider_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_android-2.2.12/ +path_provider_foundation=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/ +path_provider_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/ +path_provider_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/ +printing=/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/ +sqflite=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite-2.4.0/ +sqflite_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_android-2.4.0-1/ +sqflite_darwin=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.1-0/ diff --git a/packages/ap_common_flutter_ui/.flutter-plugins-dependencies b/packages/ap_common_flutter_ui/.flutter-plugins-dependencies new file mode 100644 index 00000000..11f41873 --- /dev/null +++ b/packages/ap_common_flutter_ui/.flutter-plugins-dependencies @@ -0,0 +1 @@ +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_keyboard_visibility","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","native_build":true,"dependencies":[]},{"name":"sqflite_darwin","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.1-0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"flutter_keyboard_visibility","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_android-2.2.12/","native_build":true,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","native_build":true,"dependencies":[]},{"name":"sqflite_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_android-2.4.0-1/","native_build":true,"dependencies":[]}],"macos":[{"name":"flutter_keyboard_visibility_macos","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_macos-1.0.0/","native_build":false,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","native_build":true,"dependencies":[]},{"name":"sqflite_darwin","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.1-0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"flutter_keyboard_visibility_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_linux-1.0.0/","native_build":false,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":false,"dependencies":[]},{"name":"path_provider_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","native_build":true,"dependencies":[]}],"windows":[{"name":"flutter_keyboard_visibility_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_windows-1.0.0/","native_build":false,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":false,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","native_build":true,"dependencies":[]}],"web":[{"name":"flutter_keyboard_visibility_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_web-2.0.0/","dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_keyboard_visibility","dependencies":["flutter_keyboard_visibility_linux","flutter_keyboard_visibility_macos","flutter_keyboard_visibility_web","flutter_keyboard_visibility_windows"]},{"name":"flutter_keyboard_visibility_linux","dependencies":[]},{"name":"flutter_keyboard_visibility_macos","dependencies":[]},{"name":"flutter_keyboard_visibility_web","dependencies":[]},{"name":"flutter_keyboard_visibility_windows","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"printing","dependencies":[]},{"name":"sqflite","dependencies":["sqflite_android","sqflite_darwin"]},{"name":"sqflite_android","dependencies":[]},{"name":"sqflite_darwin","dependencies":[]}],"date_created":"2024-10-08 19:09:32.401288","version":"3.24.3","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/packages/ap_common_flutter_ui/.gitignore b/packages/ap_common_flutter_ui/.gitignore new file mode 100644 index 00000000..ac5aa989 --- /dev/null +++ b/packages/ap_common_flutter_ui/.gitignore @@ -0,0 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ diff --git a/packages/ap_common_flutter_ui/.metadata b/packages/ap_common_flutter_ui/.metadata new file mode 100644 index 00000000..24472f12 --- /dev/null +++ b/packages/ap_common_flutter_ui/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "2663184aa79047d0a33a14a3b607954f8fdd8730" + channel: "stable" + +project_type: package diff --git a/packages/ap_common_flutter_ui/CHANGELOG.md b/packages/ap_common_flutter_ui/CHANGELOG.md new file mode 100644 index 00000000..a2c5ec04 --- /dev/null +++ b/packages/ap_common_flutter_ui/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* initial release from `ap_common` package separate. \ No newline at end of file diff --git a/packages/ap_common_flutter_ui/LICENSE b/packages/ap_common_flutter_ui/LICENSE new file mode 100644 index 00000000..d25d4a88 --- /dev/null +++ b/packages/ap_common_flutter_ui/LICENSE @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2024 RainVisitor + +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: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +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. \ No newline at end of file diff --git a/packages/ap_common_flutter_ui/README.md b/packages/ap_common_flutter_ui/README.md new file mode 100644 index 00000000..eb8f6101 --- /dev/null +++ b/packages/ap_common_flutter_ui/README.md @@ -0,0 +1,34 @@ +# 校務通系列介面與函式共用 + +[![](https://img.shields.io/badge/Flutter-v3.24-blue)](https://github.com/flutter/flutter) +[![](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common/) +[![melos](https://img.shields.io/badge/maintained%20with-melos-f700ff.svg?style=flat-square)](https://github.com/invertase/melos) + +長期校務通相關系列的app,介面與相關功能都極為相似,將相關的介面與函式庫,製作此套件以方便維護。 + +[展示網頁](https://abc873693.github.io/ap_common/#/) +[文件](https://ap-common.web.app/) + +## 相關專案 + +- [高科校務通](https://github.com/NKUST-ITC/NKUST-AP-Flutter) +- [中山校務通](https://github.com/abc873693/NSYSU-AP) +- [文藻校務通](https://github.com/abc873693/WTUC-AP) +- [台科校務通(已下架)](https://github.com/abc873693/NTUST-AP) + +## 套件 + +| Name | pub.dev | 說明 | +|-------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------| +| `ap_common` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common/) | 函式庫與相關介面共用 | +| `ap_common_core` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common_core/) | 純 Dart 的基本類別 | +| `ap_common_flutter_core` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_core.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_core/) | 基於 Flutter 框架的核心基本類別 | +| `ap_common_flutter_platform` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_platform.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_platform/) | 原生功能實作 | +| `ap_common_flutter_ui` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_ui.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_ui/) | UI 實作但不包含原生功能整合 | +| `ap_common_flutter_announcement_ui` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_announcement_ui.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_announcement_ui/) | 最新消息服務相關的介面實作 | +| `ap_common_plugin` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_plugin.svg?style=flat-square)](https://pub.dev/packages/ap_common_plugin/) | 課表小工具 | +| `ap_common_firebase` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_firebase.svg?style=flat-square)](https://pub.dev/packages/ap_common_firebase/) | 服務 `Firebase` 的整合實作 | + +## 套件使用要求 + +- Flutter `v3.22` 以上 diff --git a/packages/ap_common/assets/icons/barcode.png b/packages/ap_common_flutter_ui/assets/icons/barcode.png similarity index 100% rename from packages/ap_common/assets/icons/barcode.png rename to packages/ap_common_flutter_ui/assets/icons/barcode.png diff --git a/packages/ap_common/assets/icons/calendar_import.png b/packages/ap_common_flutter_ui/assets/icons/calendar_import.png similarity index 100% rename from packages/ap_common/assets/icons/calendar_import.png rename to packages/ap_common_flutter_ui/assets/icons/calendar_import.png diff --git a/packages/ap_common/assets/icons/qrcode.png b/packages/ap_common_flutter_ui/assets/icons/qrcode.png similarity index 100% rename from packages/ap_common/assets/icons/qrcode.png rename to packages/ap_common_flutter_ui/assets/icons/qrcode.png diff --git a/packages/ap_common/assets/images/dash_line_dark.webp b/packages/ap_common_flutter_ui/assets/images/dash_line_dark.webp similarity index 100% rename from packages/ap_common/assets/images/dash_line_dark.webp rename to packages/ap_common_flutter_ui/assets/images/dash_line_dark.webp diff --git a/packages/ap_common/assets/images/dash_line_light.webp b/packages/ap_common_flutter_ui/assets/images/dash_line_light.webp similarity index 100% rename from packages/ap_common/assets/images/dash_line_light.webp rename to packages/ap_common_flutter_ui/assets/images/dash_line_light.webp diff --git a/packages/ap_common/assets/images/drawer_background_dark.webp b/packages/ap_common_flutter_ui/assets/images/drawer_background_dark.webp similarity index 100% rename from packages/ap_common/assets/images/drawer_background_dark.webp rename to packages/ap_common_flutter_ui/assets/images/drawer_background_dark.webp diff --git a/packages/ap_common/assets/images/drawer_background_light.webp b/packages/ap_common_flutter_ui/assets/images/drawer_background_light.webp similarity index 100% rename from packages/ap_common/assets/images/drawer_background_light.webp rename to packages/ap_common_flutter_ui/assets/images/drawer_background_light.webp diff --git a/packages/ap_common/assets/images/email.webp b/packages/ap_common_flutter_ui/assets/images/email.webp similarity index 100% rename from packages/ap_common/assets/images/email.webp rename to packages/ap_common_flutter_ui/assets/images/email.webp diff --git a/packages/ap_common/assets/images/fb.webp b/packages/ap_common_flutter_ui/assets/images/fb.webp similarity index 100% rename from packages/ap_common/assets/images/fb.webp rename to packages/ap_common_flutter_ui/assets/images/fb.webp diff --git a/packages/ap_common/assets/images/gdg_on_campus_nkust_itc.jpg b/packages/ap_common_flutter_ui/assets/images/gdg_on_campus_nkust_itc.jpg similarity index 100% rename from packages/ap_common/assets/images/gdg_on_campus_nkust_itc.jpg rename to packages/ap_common_flutter_ui/assets/images/gdg_on_campus_nkust_itc.jpg diff --git a/packages/ap_common/assets/images/github.webp b/packages/ap_common_flutter_ui/assets/images/github.webp similarity index 100% rename from packages/ap_common/assets/images/github.webp rename to packages/ap_common_flutter_ui/assets/images/github.webp diff --git a/packages/ap_common/assets/images/instagram.png b/packages/ap_common_flutter_ui/assets/images/instagram.png similarity index 100% rename from packages/ap_common/assets/images/instagram.png rename to packages/ap_common_flutter_ui/assets/images/instagram.png diff --git a/packages/ap_common/assets/images/nkutst_itc.webp b/packages/ap_common_flutter_ui/assets/images/nkutst_itc.webp similarity index 100% rename from packages/ap_common/assets/images/nkutst_itc.webp rename to packages/ap_common_flutter_ui/assets/images/nkutst_itc.webp diff --git a/packages/ap_common/assets/images/nsysu_gdsc.png b/packages/ap_common_flutter_ui/assets/images/nsysu_gdsc.png similarity index 100% rename from packages/ap_common/assets/images/nsysu_gdsc.png rename to packages/ap_common_flutter_ui/assets/images/nsysu_gdsc.png diff --git a/packages/ap_common_flutter_ui/lib/ap_common_flutter_ui.dart b/packages/ap_common_flutter_ui/lib/ap_common_flutter_ui.dart new file mode 100644 index 00000000..71bd401a --- /dev/null +++ b/packages/ap_common_flutter_ui/lib/ap_common_flutter_ui.dart @@ -0,0 +1,31 @@ +export 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +export 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; + +export 'src/pages/about_us_page.dart'; +export 'src/resources/ap_colors.dart'; +export 'src/resources/ap_theme.dart'; +export 'src/resources/resources.dart'; +export 'src/scaffold/course_scaffold.dart'; +export 'src/scaffold/home_page_scaffold.dart'; +export 'src/scaffold/image_viewer_scaffold.dart'; +export 'src/scaffold/login_scaffold.dart'; +export 'src/scaffold/score_scaffold.dart'; +export 'src/scaffold/user_info_scaffold.dart'; +export 'src/utils/ap_ui_util.dart'; +export 'src/utils/ap_utils.dart'; +export 'src/utils/app_tracking_utils.dart'; +export 'src/utils/dialog_utils.dart'; +export 'src/utils/toast.dart'; +export 'src/views/notification_list_view.dart'; +export 'src/views/pdf_view.dart'; +export 'src/views/phone_list_view.dart'; +export 'src/widgets/ap_drawer.dart'; +export 'src/widgets/ap_network_image.dart'; +export 'src/widgets/default_dialog.dart'; +export 'src/widgets/dialog_option.dart'; +export 'src/widgets/hint_content.dart'; +export 'src/widgets/item_picker.dart'; +export 'src/widgets/option_dialog.dart'; +export 'src/widgets/progress_dialog.dart'; +export 'src/widgets/setting_page_widgets.dart'; +export 'src/widgets/yes_no_dialog.dart'; diff --git a/packages/ap_common/lib/pages/about_us_page.dart b/packages/ap_common_flutter_ui/lib/src/pages/about_us_page.dart similarity index 97% rename from packages/ap_common/lib/pages/about_us_page.dart rename to packages/ap_common_flutter_ui/lib/src/pages/about_us_page.dart index 966f1fa8..60ee0c68 100644 --- a/packages/ap_common/lib/pages/about_us_page.dart +++ b/packages/ap_common_flutter_ui/lib/src/pages/about_us_page.dart @@ -1,7 +1,4 @@ -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/resources/resources.dart'; -import 'package:ap_common_core/ap_common_core.dart'; -import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:flutter/material.dart'; import 'package:flutter_linkify/flutter_linkify.dart'; diff --git a/packages/ap_common/lib/resources/ap_colors.dart b/packages/ap_common_flutter_ui/lib/src/resources/ap_colors.dart similarity index 100% rename from packages/ap_common/lib/resources/ap_colors.dart rename to packages/ap_common_flutter_ui/lib/src/resources/ap_colors.dart diff --git a/packages/ap_common_flutter_ui/lib/src/resources/ap_image_assets.dart b/packages/ap_common_flutter_ui/lib/src/resources/ap_image_assets.dart new file mode 100644 index 00000000..d0a5d94e --- /dev/null +++ b/packages/ap_common_flutter_ui/lib/src/resources/ap_image_assets.dart @@ -0,0 +1,28 @@ +part of 'resources.dart'; + +class ApImageAssets { + ApImageAssets._(); + + static const String email = + 'packages/ap_common_flutter_ui/src/assets/images/email.webp'; + static const String github = + 'packages/ap_common_flutter_ui/src/assets/images/github.webp'; + static const String drawerBackgroundLight = + 'packages/ap_common_flutter_ui/src/assets/images/drawer_background_light.webp'; + static const String drawerBackgroundDark = + 'packages/ap_common_flutter_ui/src/assets/images/drawer_background_dark.webp'; + static const String nkutstItc = + 'packages/ap_common_flutter_ui/src/assets/images/nkutst_itc.webp'; + static const String gdgOnCampusNkustItc = + 'packages/ap_common_flutter_ui/src/assets/images/gdg_on_campus_nkust_itc.jpg'; + static const String nsysuGdsc = + 'packages/ap_common_flutter_ui/src/assets/images/nsysu_gdsc.png'; + static const String fb = + 'packages/ap_common_flutter_ui/src/assets/images/fb.webp'; + static const String instagram = + 'packages/ap_common_flutter_ui/src/assets/images/instagram.png'; + static const String dashLineDark = + 'packages/ap_common_flutter_ui/src/assets/images/dash_line_dark.webp'; + static const String dashLineLight = + 'packages/ap_common_flutter_ui/src/assets/images/dash_line_light.webp'; +} diff --git a/packages/ap_common_flutter_ui/lib/src/resources/ap_image_icons.dart b/packages/ap_common_flutter_ui/lib/src/resources/ap_image_icons.dart new file mode 100644 index 00000000..5448c660 --- /dev/null +++ b/packages/ap_common_flutter_ui/lib/src/resources/ap_image_icons.dart @@ -0,0 +1,12 @@ +part of 'resources.dart'; + +class ApImageIcons { + ApImageIcons._(); + + static const String calendarImport = + 'packages/ap_common_flutter_ui/src/assets/icons/calendar_import.png'; + static const String qrcode = + 'packages/ap_common_flutter_ui/src/assets/icons/qrcode.png'; + static const String barcode = + 'packages/ap_common_flutter_ui/src/assets/icons/barcode.png'; +} diff --git a/packages/ap_common/lib/resources/ap_theme.dart b/packages/ap_common_flutter_ui/lib/src/resources/ap_theme.dart similarity index 98% rename from packages/ap_common/lib/resources/ap_theme.dart rename to packages/ap_common_flutter_ui/lib/src/resources/ap_theme.dart index 724183fe..3cc6ec86 100644 --- a/packages/ap_common/lib/resources/ap_theme.dart +++ b/packages/ap_common_flutter_ui/lib/src/resources/ap_theme.dart @@ -1,5 +1,5 @@ -import 'package:ap_common/resources/ap_colors.dart'; -import 'package:ap_common/resources/resources.dart'; +import 'package:ap_common_flutter_ui/src/resources/ap_colors.dart'; +import 'package:ap_common_flutter_ui/src/resources/resources.dart'; import 'package:cupertino_back_gesture/cupertino_back_gesture.dart'; import 'package:flutter/material.dart'; diff --git a/packages/ap_common/lib/resources/resources.dart b/packages/ap_common_flutter_ui/lib/src/resources/resources.dart similarity index 100% rename from packages/ap_common/lib/resources/resources.dart rename to packages/ap_common_flutter_ui/lib/src/resources/resources.dart diff --git a/packages/ap_common/lib/scaffold/course_scaffold.dart b/packages/ap_common_flutter_ui/lib/src/scaffold/course_scaffold.dart similarity index 98% rename from packages/ap_common/lib/scaffold/course_scaffold.dart rename to packages/ap_common_flutter_ui/lib/src/scaffold/course_scaffold.dart index ab3dfcd0..1440fbb4 100644 --- a/packages/ap_common/lib/scaffold/course_scaffold.dart +++ b/packages/ap_common_flutter_ui/lib/src/scaffold/course_scaffold.dart @@ -1,16 +1,7 @@ import 'dart:io'; import 'dart:ui' as ui; -import 'package:ap_common/resources/ap_colors.dart'; -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/resources/resources.dart'; -import 'package:ap_common/utils/ap_utils.dart'; -import 'package:ap_common/widgets/default_dialog.dart'; -import 'package:ap_common/widgets/hint_content.dart'; -import 'package:ap_common/widgets/item_picker.dart'; -import 'package:ap_common/widgets/option_dialog.dart'; -import 'package:ap_common_core/ap_common_core.dart'; -import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:auto_size_text_pk/auto_size_text_pk.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; diff --git a/packages/ap_common/lib/scaffold/home_page_scaffold.dart b/packages/ap_common_flutter_ui/lib/src/scaffold/home_page_scaffold.dart similarity index 96% rename from packages/ap_common/lib/scaffold/home_page_scaffold.dart rename to packages/ap_common_flutter_ui/lib/src/scaffold/home_page_scaffold.dart index 58dae05f..62111564 100644 --- a/packages/ap_common/lib/scaffold/home_page_scaffold.dart +++ b/packages/ap_common_flutter_ui/lib/src/scaffold/home_page_scaffold.dart @@ -1,12 +1,7 @@ import 'dart:async'; import 'dart:io'; -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/widgets/ap_network_image.dart'; -import 'package:ap_common/widgets/hint_content.dart'; -import 'package:ap_common/widgets/yes_no_dialog.dart'; -import 'package:ap_common_core/ap_common_core.dart'; -import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; diff --git a/packages/ap_common/lib/scaffold/image_viewer_scaffold.dart b/packages/ap_common_flutter_ui/lib/src/scaffold/image_viewer_scaffold.dart similarity index 96% rename from packages/ap_common/lib/scaffold/image_viewer_scaffold.dart rename to packages/ap_common_flutter_ui/lib/src/scaffold/image_viewer_scaffold.dart index df6c7a23..666d2c69 100644 --- a/packages/ap_common/lib/scaffold/image_viewer_scaffold.dart +++ b/packages/ap_common_flutter_ui/lib/src/scaffold/image_viewer_scaffold.dart @@ -1,4 +1,4 @@ -import 'package:ap_common/resources/ap_theme.dart'; +import 'package:ap_common_flutter_ui/src/resources/ap_theme.dart'; import 'package:flutter/material.dart'; import 'package:photo_view/photo_view.dart'; diff --git a/packages/ap_common/lib/scaffold/login_scaffold.dart b/packages/ap_common_flutter_ui/lib/src/scaffold/login_scaffold.dart similarity index 98% rename from packages/ap_common/lib/scaffold/login_scaffold.dart rename to packages/ap_common_flutter_ui/lib/src/scaffold/login_scaffold.dart index acc84417..760343fe 100644 --- a/packages/ap_common/lib/scaffold/login_scaffold.dart +++ b/packages/ap_common_flutter_ui/lib/src/scaffold/login_scaffold.dart @@ -1,5 +1,5 @@ -import 'package:ap_common/resources/ap_colors.dart'; -import 'package:ap_common/resources/ap_theme.dart'; +import 'package:ap_common_flutter_ui/src/resources/ap_colors.dart'; +import 'package:ap_common_flutter_ui/src/resources/ap_theme.dart'; import 'package:flutter/material.dart'; import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart'; diff --git a/packages/ap_common/lib/scaffold/score_scaffold.dart b/packages/ap_common_flutter_ui/lib/src/scaffold/score_scaffold.dart similarity index 97% rename from packages/ap_common/lib/scaffold/score_scaffold.dart rename to packages/ap_common_flutter_ui/lib/src/scaffold/score_scaffold.dart index ef554f2a..233693c4 100644 --- a/packages/ap_common/lib/scaffold/score_scaffold.dart +++ b/packages/ap_common_flutter_ui/lib/src/scaffold/score_scaffold.dart @@ -1,9 +1,4 @@ -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/widgets/hint_content.dart'; -import 'package:ap_common/widgets/item_picker.dart'; -import 'package:ap_common/widgets/option_dialog.dart'; -import 'package:ap_common_core/ap_common_core.dart'; -import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:flutter/material.dart'; enum ScoreState { loading, finish, error, empty, offlineEmpty, custom } diff --git a/packages/ap_common/lib/scaffold/user_info_scaffold.dart b/packages/ap_common_flutter_ui/lib/src/scaffold/user_info_scaffold.dart similarity index 96% rename from packages/ap_common/lib/scaffold/user_info_scaffold.dart rename to packages/ap_common_flutter_ui/lib/src/scaffold/user_info_scaffold.dart index 9bdfcb9d..db6dfed2 100644 --- a/packages/ap_common/lib/scaffold/user_info_scaffold.dart +++ b/packages/ap_common_flutter_ui/lib/src/scaffold/user_info_scaffold.dart @@ -1,7 +1,4 @@ -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/resources/resources.dart'; -import 'package:ap_common_core/ap_common_core.dart'; -import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:barcode_widget/barcode_widget.dart'; import 'package:flutter/material.dart'; diff --git a/packages/ap_common/lib/utils/ap_ui_util.dart b/packages/ap_common_flutter_ui/lib/src/utils/ap_ui_util.dart similarity index 63% rename from packages/ap_common/lib/utils/ap_ui_util.dart rename to packages/ap_common_flutter_ui/lib/src/utils/ap_ui_util.dart index 9448ce32..66e4b4bb 100644 --- a/packages/ap_common/lib/utils/ap_ui_util.dart +++ b/packages/ap_common_flutter_ui/lib/src/utils/ap_ui_util.dart @@ -1,8 +1,10 @@ -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/toast.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_flutter_ui/src/resources/ap_theme.dart'; +import 'package:ap_common_flutter_ui/src/utils/toast.dart'; import 'package:flutter/material.dart'; -class ApUiUtil { +class ApUiUtil extends UiUtil { + @override void showToast( BuildContext context, String? message, { diff --git a/packages/ap_common/lib/utils/ap_utils.dart b/packages/ap_common_flutter_ui/lib/src/utils/ap_utils.dart similarity index 96% rename from packages/ap_common/lib/utils/ap_utils.dart rename to packages/ap_common_flutter_ui/lib/src/utils/ap_utils.dart index a43a3b6d..4782980f 100644 --- a/packages/ap_common/lib/utils/ap_utils.dart +++ b/packages/ap_common_flutter_ui/lib/src/utils/ap_utils.dart @@ -1,13 +1,11 @@ import 'dart:io'; -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/widgets/yes_no_dialog.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_flutter_ui/src/resources/ap_theme.dart'; +import 'package:ap_common_flutter_ui/src/widgets/yes_no_dialog.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -export 'package:dio/dio.dart'; - export 'toast.dart'; class ApUtils { diff --git a/packages/ap_common/lib/utils/app_tracking_utils.dart b/packages/ap_common_flutter_ui/lib/src/utils/app_tracking_utils.dart similarity index 94% rename from packages/ap_common/lib/utils/app_tracking_utils.dart rename to packages/ap_common_flutter_ui/lib/src/utils/app_tracking_utils.dart index dcd21e45..4fb0f4ec 100644 --- a/packages/ap_common/lib/utils/app_tracking_utils.dart +++ b/packages/ap_common_flutter_ui/lib/src/utils/app_tracking_utils.dart @@ -1,6 +1,4 @@ -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/widgets/default_dialog.dart'; -import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; diff --git a/packages/ap_common/lib/utils/dialog_utils.dart b/packages/ap_common_flutter_ui/lib/src/utils/dialog_utils.dart similarity index 95% rename from packages/ap_common/lib/utils/dialog_utils.dart rename to packages/ap_common_flutter_ui/lib/src/utils/dialog_utils.dart index db480f5c..4d8b6872 100644 --- a/packages/ap_common/lib/utils/dialog_utils.dart +++ b/packages/ap_common_flutter_ui/lib/src/utils/dialog_utils.dart @@ -1,11 +1,7 @@ import 'dart:convert'; import 'dart:io'; -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/widgets/default_dialog.dart'; -import 'package:ap_common/widgets/yes_no_dialog.dart'; -import 'package:ap_common_core/ap_common_core.dart'; -import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:flutter/material.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:sprintf/sprintf.dart'; diff --git a/packages/ap_common/lib/utils/toast.dart b/packages/ap_common_flutter_ui/lib/src/utils/toast.dart similarity index 100% rename from packages/ap_common/lib/utils/toast.dart rename to packages/ap_common_flutter_ui/lib/src/utils/toast.dart diff --git a/packages/ap_common/lib/views/notification_list_view.dart b/packages/ap_common_flutter_ui/lib/src/views/notification_list_view.dart similarity index 94% rename from packages/ap_common/lib/views/notification_list_view.dart rename to packages/ap_common_flutter_ui/lib/src/views/notification_list_view.dart index 0ae2b50d..6779520a 100644 --- a/packages/ap_common/lib/views/notification_list_view.dart +++ b/packages/ap_common_flutter_ui/lib/src/views/notification_list_view.dart @@ -1,8 +1,4 @@ -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/ap_utils.dart'; -import 'package:ap_common/widgets/hint_content.dart'; -import 'package:ap_common_core/ap_common_core.dart'; -import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:flutter/material.dart'; enum NotificationState { loading, finish, loadingMore, error, empty, offline } diff --git a/packages/ap_common/lib/views/pdf_view.dart b/packages/ap_common_flutter_ui/lib/src/views/pdf_view.dart similarity index 93% rename from packages/ap_common/lib/views/pdf_view.dart rename to packages/ap_common_flutter_ui/lib/src/views/pdf_view.dart index 26daa0ef..4f149be0 100644 --- a/packages/ap_common/lib/views/pdf_view.dart +++ b/packages/ap_common_flutter_ui/lib/src/views/pdf_view.dart @@ -1,8 +1,6 @@ import 'dart:typed_data'; -import 'package:ap_common/widgets/hint_content.dart'; -import 'package:ap_common_core/ap_common_core.dart'; -import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:flutter/material.dart'; import 'package:pdf/pdf.dart'; import 'package:printing/printing.dart'; diff --git a/packages/ap_common/lib/views/phone_list_view.dart b/packages/ap_common_flutter_ui/lib/src/views/phone_list_view.dart similarity index 95% rename from packages/ap_common/lib/views/phone_list_view.dart rename to packages/ap_common_flutter_ui/lib/src/views/phone_list_view.dart index b6e4f851..0106d94c 100644 --- a/packages/ap_common/lib/views/phone_list_view.dart +++ b/packages/ap_common_flutter_ui/lib/src/views/phone_list_view.dart @@ -1,8 +1,4 @@ -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/utils/ap_utils.dart'; -import 'package:ap_common/widgets/hint_content.dart'; -import 'package:ap_common_core/ap_common_core.dart'; -import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:flutter/material.dart'; enum PhoneState { loading, finish, error } diff --git a/packages/ap_common/lib/widgets/ap_drawer.dart b/packages/ap_common_flutter_ui/lib/src/widgets/ap_drawer.dart similarity index 98% rename from packages/ap_common/lib/widgets/ap_drawer.dart rename to packages/ap_common_flutter_ui/lib/src/widgets/ap_drawer.dart index da9fa1c4..587ba75e 100644 --- a/packages/ap_common/lib/widgets/ap_drawer.dart +++ b/packages/ap_common_flutter_ui/lib/src/widgets/ap_drawer.dart @@ -1,8 +1,8 @@ import 'dart:typed_data'; -import 'package:ap_common/resources/ap_theme.dart'; import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_flutter_ui/src/resources/ap_theme.dart'; import 'package:flutter/material.dart'; class ApDrawer extends StatefulWidget { diff --git a/packages/ap_common/lib/widgets/ap_network_image.dart b/packages/ap_common_flutter_ui/lib/src/widgets/ap_network_image.dart similarity index 87% rename from packages/ap_common/lib/widgets/ap_network_image.dart rename to packages/ap_common_flutter_ui/lib/src/widgets/ap_network_image.dart index c5cb3319..4b1c04f6 100644 --- a/packages/ap_common/lib/widgets/ap_network_image.dart +++ b/packages/ap_common_flutter_ui/lib/src/widgets/ap_network_image.dart @@ -1,5 +1,4 @@ -import 'package:ap_common/utils/ap_utils.dart'; -import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; diff --git a/packages/ap_common/lib/widgets/default_dialog.dart b/packages/ap_common_flutter_ui/lib/src/widgets/default_dialog.dart similarity index 97% rename from packages/ap_common/lib/widgets/default_dialog.dart rename to packages/ap_common_flutter_ui/lib/src/widgets/default_dialog.dart index 12a1550d..f572aaf1 100644 --- a/packages/ap_common/lib/widgets/default_dialog.dart +++ b/packages/ap_common_flutter_ui/lib/src/widgets/default_dialog.dart @@ -1,4 +1,4 @@ -import 'package:ap_common/resources/ap_theme.dart'; +import 'package:ap_common_flutter_ui/src/resources/ap_theme.dart'; import 'package:flutter/material.dart'; class DefaultDialog extends StatelessWidget { diff --git a/packages/ap_common/lib/widgets/dialog_option.dart b/packages/ap_common_flutter_ui/lib/src/widgets/dialog_option.dart similarity index 89% rename from packages/ap_common/lib/widgets/dialog_option.dart rename to packages/ap_common_flutter_ui/lib/src/widgets/dialog_option.dart index 46152813..8f52a7f5 100644 --- a/packages/ap_common/lib/widgets/dialog_option.dart +++ b/packages/ap_common_flutter_ui/lib/src/widgets/dialog_option.dart @@ -1,5 +1,4 @@ -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:flutter/material.dart'; class DialogOption extends StatelessWidget { diff --git a/packages/ap_common/lib/widgets/hint_content.dart b/packages/ap_common_flutter_ui/lib/src/widgets/hint_content.dart similarity index 93% rename from packages/ap_common/lib/widgets/hint_content.dart rename to packages/ap_common_flutter_ui/lib/src/widgets/hint_content.dart index 777661b5..9d0d0344 100644 --- a/packages/ap_common/lib/widgets/hint_content.dart +++ b/packages/ap_common_flutter_ui/lib/src/widgets/hint_content.dart @@ -1,4 +1,4 @@ -import 'package:ap_common/resources/ap_theme.dart'; +import 'package:ap_common_flutter_ui/src/resources/ap_theme.dart'; import 'package:flutter/material.dart'; class HintContent extends StatelessWidget { diff --git a/packages/ap_common/lib/widgets/item_picker.dart b/packages/ap_common_flutter_ui/lib/src/widgets/item_picker.dart similarity index 87% rename from packages/ap_common/lib/widgets/item_picker.dart rename to packages/ap_common_flutter_ui/lib/src/widgets/item_picker.dart index 675b5967..3532f59c 100644 --- a/packages/ap_common/lib/widgets/item_picker.dart +++ b/packages/ap_common_flutter_ui/lib/src/widgets/item_picker.dart @@ -1,7 +1,4 @@ -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/widgets/option_dialog.dart'; -import 'package:ap_common_core/ap_common_core.dart'; -import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:flutter/material.dart'; class ItemPicker extends StatelessWidget { diff --git a/packages/ap_common/lib/widgets/option_dialog.dart b/packages/ap_common_flutter_ui/lib/src/widgets/option_dialog.dart similarity index 96% rename from packages/ap_common/lib/widgets/option_dialog.dart rename to packages/ap_common_flutter_ui/lib/src/widgets/option_dialog.dart index 4ae66809..e0db06ba 100644 --- a/packages/ap_common/lib/widgets/option_dialog.dart +++ b/packages/ap_common_flutter_ui/lib/src/widgets/option_dialog.dart @@ -1,4 +1,4 @@ -import 'package:ap_common/widgets/dialog_option.dart'; +import 'package:ap_common_flutter_ui/src/widgets/dialog_option.dart'; import 'package:flutter/material.dart'; class SimpleOptionDialog extends StatelessWidget { diff --git a/packages/ap_common/lib/widgets/progress_dialog.dart b/packages/ap_common_flutter_ui/lib/src/widgets/progress_dialog.dart similarity index 93% rename from packages/ap_common/lib/widgets/progress_dialog.dart rename to packages/ap_common_flutter_ui/lib/src/widgets/progress_dialog.dart index 65d64d01..5ad565c2 100644 --- a/packages/ap_common/lib/widgets/progress_dialog.dart +++ b/packages/ap_common_flutter_ui/lib/src/widgets/progress_dialog.dart @@ -1,4 +1,4 @@ -import 'package:ap_common/resources/ap_theme.dart'; +import 'package:ap_common_flutter_ui/src/resources/ap_theme.dart'; import 'package:flutter/material.dart'; class ProgressDialog extends StatelessWidget { diff --git a/packages/ap_common/lib/widgets/setting_page_widgets.dart b/packages/ap_common_flutter_ui/lib/src/widgets/setting_page_widgets.dart similarity index 97% rename from packages/ap_common/lib/widgets/setting_page_widgets.dart rename to packages/ap_common_flutter_ui/lib/src/widgets/setting_page_widgets.dart index 50240589..0cf915d5 100644 --- a/packages/ap_common/lib/widgets/setting_page_widgets.dart +++ b/packages/ap_common_flutter_ui/lib/src/widgets/setting_page_widgets.dart @@ -1,7 +1,4 @@ -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common/widgets/option_dialog.dart'; -import 'package:ap_common_core/ap_common_core.dart'; -import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:flutter/material.dart'; class SettingTitle extends StatelessWidget { diff --git a/packages/ap_common/lib/widgets/yes_no_dialog.dart b/packages/ap_common_flutter_ui/lib/src/widgets/yes_no_dialog.dart similarity index 97% rename from packages/ap_common/lib/widgets/yes_no_dialog.dart rename to packages/ap_common_flutter_ui/lib/src/widgets/yes_no_dialog.dart index 6093d19e..c171ec10 100644 --- a/packages/ap_common/lib/widgets/yes_no_dialog.dart +++ b/packages/ap_common_flutter_ui/lib/src/widgets/yes_no_dialog.dart @@ -1,5 +1,4 @@ -import 'package:ap_common/resources/ap_theme.dart'; -import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:flutter/material.dart'; class YesNoDialog extends StatelessWidget { diff --git a/packages/ap_common_flutter_ui/pubspec.yaml b/packages/ap_common_flutter_ui/pubspec.yaml new file mode 100644 index 00000000..14a61181 --- /dev/null +++ b/packages/ap_common_flutter_ui/pubspec.yaml @@ -0,0 +1,40 @@ +name: ap_common_flutter_ui +description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" +version: 0.0.1 +homepage: https://github.com/abc873693/ap_common +repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_flutter_ui + +environment: + sdk: ^3.4.0 + flutter: ">=3.22.0" + +dependencies: + flutter: + sdk: flutter + ap_common_core: '>=0.0.1 <1.0.0' + ap_common_flutter_core: '>=0.0.1 <1.0.0' + # Dart Package + sprintf: ^7.0.0 + # Flutter UI Package + photo_view: ^0.15.0 + barcode_widget: ^2.0.1 + barcode: ^2.2.1 + pdf: ^3.8.1 + auto_size_text_pk: ^3.0.0 + flutter_linkify: ^6.0.0 + cupertino_back_gesture: ^0.1.0 + # Flutter Native Plugin + package_info_plus: ^8.0.2 + flutter_keyboard_visibility: ^6.0.0 + printing: ^5.10.4 + cached_network_image: ^3.3.1 + +dev_dependencies: + flutter_test: + sdk: flutter + spider: ^4.2.2 + +flutter: + assets: + - assets/images/ + - assets/icons/ \ No newline at end of file From f9bf1f11dcae58fc962f4a17817958ba964a21a4 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Tue, 8 Oct 2024 19:16:42 +0800 Subject: [PATCH 16/41] fix: pub link error --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index eb8f6101..ca5f5876 100644 --- a/README.md +++ b/README.md @@ -18,16 +18,16 @@ ## 套件 -| Name | pub.dev | 說明 | -|-------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------| -| `ap_common` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common/) | 函式庫與相關介面共用 | -| `ap_common_core` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common_core/) | 純 Dart 的基本類別 | -| `ap_common_flutter_core` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_core.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_core/) | 基於 Flutter 框架的核心基本類別 | -| `ap_common_flutter_platform` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_platform.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_platform/) | 原生功能實作 | -| `ap_common_flutter_ui` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_ui.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_ui/) | UI 實作但不包含原生功能整合 | -| `ap_common_flutter_announcement_ui` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_announcement_ui.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_announcement_ui/) | 最新消息服務相關的介面實作 | -| `ap_common_plugin` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_plugin.svg?style=flat-square)](https://pub.dev/packages/ap_common_plugin/) | 課表小工具 | -| `ap_common_firebase` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_firebase.svg?style=flat-square)](https://pub.dev/packages/ap_common_firebase/) | 服務 `Firebase` 的整合實作 | +| Name | pub.dev | 說明 | +|-------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------| +| `ap_common` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common/) | 函式庫與相關介面共用 | +| `ap_common_core` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common.svg?style=flat-square)](https://pub.dev/packages/ap_common_core/) | 純 Dart 的基本類別 | +| `ap_common_flutter_core` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_core.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_core/) | 基於 Flutter 框架的核心基本類別 | +| `ap_common_flutter_platform` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_platform.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_platform/) | 原生功能實作 | +| `ap_common_flutter_ui` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_flutter_ui.svg?style=flat-square)](https://pub.dev/packages/ap_common_flutter_ui/) | UI 實作但不包含原生功能整合 | +| `ap_common_flutter_announcement_ui` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_announcement_ui.svg?style=flat-square)](https://pub.dev/packages/ap_common_announcement_ui/) | 最新消息服務相關的介面實作 | +| `ap_common_plugin` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_plugin.svg?style=flat-square)](https://pub.dev/packages/ap_common_plugin/) | 課表小工具 | +| `ap_common_firebase` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_firebase.svg?style=flat-square)](https://pub.dev/packages/ap_common_firebase/) | 服務 `Firebase` 的整合實作 | ## 套件使用要求 From 572d6879c31744f0530670224ab7223131170e3a Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Tue, 8 Oct 2024 20:37:47 +0800 Subject: [PATCH 17/41] doc: plugin structure --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index ca5f5876..cc858ba0 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,37 @@ | `ap_common_plugin` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_plugin.svg?style=flat-square)](https://pub.dev/packages/ap_common_plugin/) | 課表小工具 | | `ap_common_firebase` | [![ap_common pub.dev badge](https://img.shields.io/pub/v/ap_common_firebase.svg?style=flat-square)](https://pub.dev/packages/ap_common_firebase/) | 服務 `Firebase` 的整合實作 | +## 套件架構 + +### v0.26 以後 + +```mermaid +flowchart TD + ap_common[ap_common] --- ap_common_flutter_ui[ap_common_flutter_ui] --- ap_common_flutter_core + + ap_common --- ap_common_flutter_platform[ap_common_flutter_platform] --- ap_common_flutter_core + + ap_common --- ap_common_announcement_ui[ap_common_announcement_ui] --- ap_common_flutter_core + + ap_common_firebase --- ap_common_flutter_core + + ap_common_plugin --- ap_common_flutter_core + + ap_common_flutter_core -- Dart Level --> ap_common_core + +``` + +### v0.25 前 + +```mermaid +flowchart TD + + ap_common_firebase --- ap_common + + ap_common_plugin --- ap_common + +``` + ## 套件使用要求 - Flutter `v3.22` 以上 From 8710aded26cf54e10e222253de01dc92ea546a63 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Wed, 9 Oct 2024 20:27:04 +0800 Subject: [PATCH 18/41] chore: improve packages dependent requirement --- apps/example/pubspec.lock | 4 ++-- apps/example/pubspec_overrides.yaml | 2 +- .../lib/src/api/announcement_helper.dart | 3 --- packages/ap_common_announcement_ui/pubspec.yaml | 1 - .../lib/src/utils/firebase_analytics_utils.dart | 2 +- packages/ap_common_firebase/pubspec.yaml | 2 -- .../ap_common_flutter_core/lib/ap_common_flutter_core.dart | 1 + packages/ap_common_flutter_platform/pubspec.yaml | 1 - packages/ap_common_flutter_ui/pubspec.yaml | 1 - 9 files changed, 5 insertions(+), 12 deletions(-) diff --git a/apps/example/pubspec.lock b/apps/example/pubspec.lock index d2e10af4..85298f53 100644 --- a/apps/example/pubspec.lock +++ b/apps/example/pubspec.lock @@ -238,10 +238,10 @@ packages: dependency: transitive description: name: dio - sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" + sha256: "0dfb6b6a1979dac1c1245e17cef824d7b452ea29bd33d3467269f9bef3715fb0" url: "https://pub.dev" source: hosted - version: "5.7.0" + version: "5.6.0" dio_cookie_manager: dependency: transitive description: diff --git a/apps/example/pubspec_overrides.yaml b/apps/example/pubspec_overrides.yaml index f6d91941..d9cabce0 100644 --- a/apps/example/pubspec_overrides.yaml +++ b/apps/example/pubspec_overrides.yaml @@ -1,4 +1,4 @@ -# melos_managed_dependency_overrides: ap_common,ap_common_plugin,intl,ap_common_core,ap_common_flutter_core,ap_common_flutter_platform,ap_common_announcement_ui,ap_common_flutter_ui +# 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 dependency_overrides: ap_common: path: ../../packages/ap_common diff --git a/packages/ap_common_announcement_ui/lib/src/api/announcement_helper.dart b/packages/ap_common_announcement_ui/lib/src/api/announcement_helper.dart index 395ba015..9713c9d2 100644 --- a/packages/ap_common_announcement_ui/lib/src/api/announcement_helper.dart +++ b/packages/ap_common_announcement_ui/lib/src/api/announcement_helper.dart @@ -2,11 +2,8 @@ import 'dart:async'; import 'dart:convert'; import 'dart:ui' show Locale; -import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; -export 'package:ap_common_core/ap_common_core.dart'; - enum AnnouncementLoginType { normal, google, diff --git a/packages/ap_common_announcement_ui/pubspec.yaml b/packages/ap_common_announcement_ui/pubspec.yaml index 78f4d891..fcb2020e 100644 --- a/packages/ap_common_announcement_ui/pubspec.yaml +++ b/packages/ap_common_announcement_ui/pubspec.yaml @@ -12,7 +12,6 @@ environment: dependencies: flutter: sdk: flutter - ap_common_core: '>=0.0.1 <1.0.0' ap_common_flutter_core: '>=0.0.1 <1.0.0' ap_common_flutter_ui: '>=0.0.1 <1.0.0' # Dart Packages diff --git a/packages/ap_common_firebase/lib/src/utils/firebase_analytics_utils.dart b/packages/ap_common_firebase/lib/src/utils/firebase_analytics_utils.dart index 44a77ca2..6a42195d 100644 --- a/packages/ap_common_firebase/lib/src/utils/firebase_analytics_utils.dart +++ b/packages/ap_common_firebase/lib/src/utils/firebase_analytics_utils.dart @@ -1,8 +1,8 @@ import 'dart:async'; import 'dart:io'; -import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_firebase/src/utils/firebase_utils.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:firebase_analytics/firebase_analytics.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; diff --git a/packages/ap_common_firebase/pubspec.yaml b/packages/ap_common_firebase/pubspec.yaml index c7eeac50..8bc62039 100644 --- a/packages/ap_common_firebase/pubspec.yaml +++ b/packages/ap_common_firebase/pubspec.yaml @@ -12,8 +12,6 @@ dependencies: flutter: sdk: flutter - ap_common: '>=0.25.0 <2.0.0' - ap_common_core: '>=0.0.1 <1.0.0' ap_common_flutter_core: '>=0.0.1 <1.0.0' # path: ../../GitHub-NKUST-ITC/ap_common url_launcher: ^6.1.0 diff --git a/packages/ap_common_flutter_core/lib/ap_common_flutter_core.dart b/packages/ap_common_flutter_core/lib/ap_common_flutter_core.dart index b52f06ef..c81668d7 100644 --- a/packages/ap_common_flutter_core/lib/ap_common_flutter_core.dart +++ b/packages/ap_common_flutter_core/lib/ap_common_flutter_core.dart @@ -1,6 +1,7 @@ import 'package:ap_common_core/injector.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; +export 'package:ap_common_core/ap_common_core.dart'; export 'package:cross_file/cross_file.dart'; export 'src/callback/general_callback.dart'; diff --git a/packages/ap_common_flutter_platform/pubspec.yaml b/packages/ap_common_flutter_platform/pubspec.yaml index 049cb714..cc3d5762 100644 --- a/packages/ap_common_flutter_platform/pubspec.yaml +++ b/packages/ap_common_flutter_platform/pubspec.yaml @@ -11,7 +11,6 @@ environment: dependencies: flutter: sdk: flutter - ap_common_core: '>=0.0.1 <1.0.0' ap_common_flutter_core: '>=0.0.1 <1.0.0' # Dart Package diff --git a/packages/ap_common_flutter_ui/pubspec.yaml b/packages/ap_common_flutter_ui/pubspec.yaml index 14a61181..acb6317f 100644 --- a/packages/ap_common_flutter_ui/pubspec.yaml +++ b/packages/ap_common_flutter_ui/pubspec.yaml @@ -11,7 +11,6 @@ environment: dependencies: flutter: sdk: flutter - ap_common_core: '>=0.0.1 <1.0.0' ap_common_flutter_core: '>=0.0.1 <1.0.0' # Dart Package sprintf: ^7.0.0 From 7e73fee26d728d47bff79c1f13fd22a949378124 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Wed, 9 Oct 2024 20:27:42 +0800 Subject: [PATCH 19/41] chore: update gitignore for package not usage --- .gitignore | 68 +++++++++++-------- .../.flutter-plugins | 22 ------ .../.flutter-plugins-dependencies | 1 - .../.flutter-plugins-dependencies | 1 - .../.flutter-plugins-dependencies | 1 - 5 files changed, 40 insertions(+), 53 deletions(-) delete mode 100644 packages/ap_common_announcement_ui/.flutter-plugins delete mode 100644 packages/ap_common_announcement_ui/.flutter-plugins-dependencies delete mode 100644 packages/ap_common_flutter_platform/.flutter-plugins-dependencies delete mode 100644 packages/ap_common_flutter_ui/.flutter-plugins-dependencies diff --git a/.gitignore b/.gitignore index 8b5e71ba..afa8c0ab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,9 @@ .DS_Store .atom/ .idea/ -.vscode/* -.melos_tool/* -!.vscode/tasks.json -!.vscode/settings.json - +.vscode/ +**/lcov.info +coverage .packages .pub/ .dart_tool/ @@ -16,26 +14,40 @@ flutter_export_environment.sh # Dependencies /node_modules -# Production -/build - -# Generated files -.docusaurus -.cache-loader - -# Misc -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* -firebase-debug.log* - -# Firebase cache -.firebase/ - -# FVM Version Cache -.fvm/ \ No newline at end of file +Podfile +Podfile.lock +Pods/ +.symlinks/ +**/Flutter/App.framework/ +**/Flutter/ephemeral/ +**/Flutter/Flutter.framework/ +**/Flutter/Generated.xcconfig +**/Flutter/flutter_assets/ + +ServiceDefinitions.json +xcuserdata/ +**/DerivedData/ + +local.properties +keystore.properties +.gradle/ +gradlew +gradlew.bat +gradle-wrapper.jar +.flutter-plugins-dependencies +*.iml + +generated_plugin_registrant.dart +GeneratedPluginRegistrant.h +GeneratedPluginRegistrant.m +GeneratedPluginRegistrant.java +GeneratedPluginRegistrant.swift +build/ +.flutter-plugins + +.project +.classpath +.settings +**/.fvm + +.melos_tool/ \ No newline at end of file diff --git a/packages/ap_common_announcement_ui/.flutter-plugins b/packages/ap_common_announcement_ui/.flutter-plugins deleted file mode 100644 index 195583e0..00000000 --- a/packages/ap_common_announcement_ui/.flutter-plugins +++ /dev/null @@ -1,22 +0,0 @@ -# This is a generated file; do not edit or check into version control. -flutter_keyboard_visibility=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/ -flutter_keyboard_visibility_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_linux-1.0.0/ -flutter_keyboard_visibility_macos=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_macos-1.0.0/ -flutter_keyboard_visibility_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_web-2.0.0/ -flutter_keyboard_visibility_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_windows-1.0.0/ -google_sign_in=/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in-6.2.1/ -google_sign_in_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_android-6.1.33/ -google_sign_in_ios=/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.8/ -google_sign_in_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_web-0.12.4+2/ -package_info_plus=/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/ -path_provider=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider-2.1.4/ -path_provider_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_android-2.2.12/ -path_provider_foundation=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/ -path_provider_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/ -path_provider_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/ -printing=/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/ -sign_in_with_apple=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple-6.1.3/ -sign_in_with_apple_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple_web-2.1.0/ -sqflite=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite-2.4.0/ -sqflite_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_android-2.4.0-1/ -sqflite_darwin=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.1-0/ diff --git a/packages/ap_common_announcement_ui/.flutter-plugins-dependencies b/packages/ap_common_announcement_ui/.flutter-plugins-dependencies deleted file mode 100644 index 01e20b83..00000000 --- a/packages/ap_common_announcement_ui/.flutter-plugins-dependencies +++ /dev/null @@ -1 +0,0 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_keyboard_visibility","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/","native_build":true,"dependencies":[]},{"name":"google_sign_in_ios","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.8/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","native_build":true,"dependencies":[]},{"name":"sign_in_with_apple","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple-6.1.3/","native_build":true,"dependencies":[]},{"name":"sqflite_darwin","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.1-0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"flutter_keyboard_visibility","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/","native_build":true,"dependencies":[]},{"name":"google_sign_in_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_android-6.1.33/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_android-2.2.12/","native_build":true,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","native_build":true,"dependencies":[]},{"name":"sign_in_with_apple","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple-6.1.3/","native_build":true,"dependencies":[]},{"name":"sqflite_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_android-2.4.0-1/","native_build":true,"dependencies":[]}],"macos":[{"name":"flutter_keyboard_visibility_macos","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_macos-1.0.0/","native_build":false,"dependencies":[]},{"name":"google_sign_in_ios","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.8/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","native_build":true,"dependencies":[]},{"name":"sign_in_with_apple","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple-6.1.3/","native_build":true,"dependencies":[]},{"name":"sqflite_darwin","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.1-0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"flutter_keyboard_visibility_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_linux-1.0.0/","native_build":false,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":false,"dependencies":[]},{"name":"path_provider_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","native_build":true,"dependencies":[]}],"windows":[{"name":"flutter_keyboard_visibility_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_windows-1.0.0/","native_build":false,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":false,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","native_build":true,"dependencies":[]}],"web":[{"name":"flutter_keyboard_visibility_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_web-2.0.0/","dependencies":[]},{"name":"google_sign_in_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/google_sign_in_web-0.12.4+2/","dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","dependencies":[]},{"name":"sign_in_with_apple_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sign_in_with_apple_web-2.1.0/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_keyboard_visibility","dependencies":["flutter_keyboard_visibility_linux","flutter_keyboard_visibility_macos","flutter_keyboard_visibility_web","flutter_keyboard_visibility_windows"]},{"name":"flutter_keyboard_visibility_linux","dependencies":[]},{"name":"flutter_keyboard_visibility_macos","dependencies":[]},{"name":"flutter_keyboard_visibility_web","dependencies":[]},{"name":"flutter_keyboard_visibility_windows","dependencies":[]},{"name":"google_sign_in","dependencies":["google_sign_in_android","google_sign_in_ios","google_sign_in_web"]},{"name":"google_sign_in_android","dependencies":[]},{"name":"google_sign_in_ios","dependencies":[]},{"name":"google_sign_in_web","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"printing","dependencies":[]},{"name":"sign_in_with_apple","dependencies":["sign_in_with_apple_web"]},{"name":"sign_in_with_apple_web","dependencies":[]},{"name":"sqflite","dependencies":["sqflite_android","sqflite_darwin"]},{"name":"sqflite_android","dependencies":[]},{"name":"sqflite_darwin","dependencies":[]}],"date_created":"2024-10-08 19:09:24.277488","version":"3.24.3","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/packages/ap_common_flutter_platform/.flutter-plugins-dependencies b/packages/ap_common_flutter_platform/.flutter-plugins-dependencies deleted file mode 100644 index 51baf631..00000000 --- a/packages/ap_common_flutter_platform/.flutter-plugins-dependencies +++ /dev/null @@ -1 +0,0 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"add_2_calendar","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/add_2_calendar-3.0.1/","native_build":true,"dependencies":[]},{"name":"app_tracking_transparency","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/app_tracking_transparency-2.0.6/","native_build":true,"dependencies":[]},{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","native_build":true,"dependencies":[]},{"name":"flutter_local_notifications","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications-17.2.3/","native_build":true,"dependencies":[]},{"name":"image_picker_ios","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12/","native_build":true,"dependencies":[]},{"name":"in_app_review","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/in_app_review-2.0.9/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"photo_manager","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/photo_manager-3.5.0/","native_build":true,"dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"url_launcher_ios","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.1/","native_build":true,"dependencies":[]}],"android":[{"name":"add_2_calendar","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/add_2_calendar-3.0.1/","native_build":true,"dependencies":[]},{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","native_build":true,"dependencies":[]},{"name":"flutter_local_notifications","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications-17.2.3/","native_build":true,"dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.23/","native_build":true,"dependencies":[]},{"name":"image_picker_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+15/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"]},{"name":"in_app_review","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/in_app_review-2.0.9/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_android-2.2.12/","native_build":true,"dependencies":[]},{"name":"photo_manager","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/photo_manager-3.5.0/","native_build":true,"dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.3/","native_build":true,"dependencies":[]},{"name":"url_launcher_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.12/","native_build":true,"dependencies":[]}],"macos":[{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","native_build":true,"dependencies":[]},{"name":"file_selector_macos","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.4+2/","native_build":true,"dependencies":[]},{"name":"flutter_local_notifications","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications-17.2.3/","native_build":true,"dependencies":[]},{"name":"image_picker_macos","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1+1/","native_build":false,"dependencies":["file_selector_macos"]},{"name":"in_app_review","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/in_app_review-2.0.9/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"photo_manager","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/photo_manager-3.5.0/","native_build":true,"dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"url_launcher_macos","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.1/","native_build":true,"dependencies":[]}],"linux":[{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","native_build":true,"dependencies":["path_provider_linux"]},{"name":"file_selector_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.3/","native_build":true,"dependencies":[]},{"name":"flutter_local_notifications_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications_linux-4.0.1/","native_build":false,"dependencies":[]},{"name":"image_picker_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+1/","native_build":false,"dependencies":["file_selector_linux"]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":false,"dependencies":[]},{"name":"path_provider_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","native_build":false,"dependencies":["url_launcher_linux"]},{"name":"shared_preferences_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]},{"name":"url_launcher_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.0/","native_build":true,"dependencies":[]}],"windows":[{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","native_build":true,"dependencies":["path_provider_windows"]},{"name":"file_selector_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+3/","native_build":true,"dependencies":[]},{"name":"image_picker_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1+1/","native_build":false,"dependencies":["file_selector_windows"]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":false,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","native_build":true,"dependencies":["url_launcher_windows"]},{"name":"shared_preferences_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]},{"name":"url_launcher_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.2/","native_build":true,"dependencies":[]}],"web":[{"name":"file_saver","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/","dependencies":[]},{"name":"image_picker_for_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_for_web-3.0.5/","dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","dependencies":[]},{"name":"share_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/","dependencies":["url_launcher_web"]},{"name":"shared_preferences_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]},{"name":"url_launcher_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.3/","dependencies":[]}]},"dependencyGraph":[{"name":"add_2_calendar","dependencies":[]},{"name":"app_tracking_transparency","dependencies":[]},{"name":"file_saver","dependencies":["path_provider","path_provider_windows","path_provider_linux"]},{"name":"file_selector_linux","dependencies":[]},{"name":"file_selector_macos","dependencies":[]},{"name":"file_selector_windows","dependencies":[]},{"name":"flutter_local_notifications","dependencies":["flutter_local_notifications_linux"]},{"name":"flutter_local_notifications_linux","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"image_picker","dependencies":["image_picker_android","image_picker_for_web","image_picker_ios","image_picker_linux","image_picker_macos","image_picker_windows"]},{"name":"image_picker_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"image_picker_ios","dependencies":[]},{"name":"image_picker_linux","dependencies":["file_selector_linux"]},{"name":"image_picker_macos","dependencies":["file_selector_macos"]},{"name":"image_picker_windows","dependencies":["file_selector_windows"]},{"name":"in_app_review","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"photo_manager","dependencies":[]},{"name":"share_plus","dependencies":["url_launcher_web","url_launcher_windows","url_launcher_linux"]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2024-10-08 19:09:31.110602","version":"3.24.3","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/packages/ap_common_flutter_ui/.flutter-plugins-dependencies b/packages/ap_common_flutter_ui/.flutter-plugins-dependencies deleted file mode 100644 index 11f41873..00000000 --- a/packages/ap_common_flutter_ui/.flutter-plugins-dependencies +++ /dev/null @@ -1 +0,0 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_keyboard_visibility","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","native_build":true,"dependencies":[]},{"name":"sqflite_darwin","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.1-0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"flutter_keyboard_visibility","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_android-2.2.12/","native_build":true,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","native_build":true,"dependencies":[]},{"name":"sqflite_android","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_android-2.4.0-1/","native_build":true,"dependencies":[]}],"macos":[{"name":"flutter_keyboard_visibility_macos","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_macos-1.0.0/","native_build":false,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","native_build":true,"dependencies":[]},{"name":"sqflite_darwin","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.1-0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"flutter_keyboard_visibility_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_linux-1.0.0/","native_build":false,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":false,"dependencies":[]},{"name":"path_provider_linux","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","native_build":true,"dependencies":[]}],"windows":[{"name":"flutter_keyboard_visibility_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_windows-1.0.0/","native_build":false,"dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","native_build":false,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","native_build":true,"dependencies":[]}],"web":[{"name":"flutter_keyboard_visibility_web","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_web-2.0.0/","dependencies":[]},{"name":"package_info_plus","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/","dependencies":[]},{"name":"printing","path":"/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_keyboard_visibility","dependencies":["flutter_keyboard_visibility_linux","flutter_keyboard_visibility_macos","flutter_keyboard_visibility_web","flutter_keyboard_visibility_windows"]},{"name":"flutter_keyboard_visibility_linux","dependencies":[]},{"name":"flutter_keyboard_visibility_macos","dependencies":[]},{"name":"flutter_keyboard_visibility_web","dependencies":[]},{"name":"flutter_keyboard_visibility_windows","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"printing","dependencies":[]},{"name":"sqflite","dependencies":["sqflite_android","sqflite_darwin"]},{"name":"sqflite_android","dependencies":[]},{"name":"sqflite_darwin","dependencies":[]}],"date_created":"2024-10-08 19:09:32.401288","version":"3.24.3","swift_package_manager_enabled":false} \ No newline at end of file From d33c78cc0350631210cfccc77d33e752a8956804 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Wed, 9 Oct 2024 22:56:15 +0800 Subject: [PATCH 20/41] chore: package import and export usage --- .../ap_common_announcement_ui/lib/src/api/github_helper.dart | 1 - .../ap_common_announcement_ui/lib/src/api/imgur_helper.dart | 3 --- .../lib/src/utils/firebase_crashlytics_utils.dart | 2 +- .../lib/src/utils/firebase_message_utils.dart | 1 - .../lib/src/utils/firebase_remote_config_utils.dart | 2 +- packages/ap_common_firebase/lib/src/utils/firebase_utils.dart | 2 +- packages/ap_common_flutter_core/pubspec.yaml | 2 +- .../lib/src/utilities/ap_media_util.dart | 1 - .../lib/src/utilities/app_store_util.dart | 3 --- .../lib/src/utilities/notification_utils.dart | 1 - .../lib/src/utilities/preferences.dart | 1 - .../ap_common_flutter_ui/lib/src/scaffold/course_scaffold.dart | 2 -- .../lib/src/scaffold/home_page_scaffold.dart | 2 -- packages/ap_common_flutter_ui/lib/src/widgets/ap_drawer.dart | 1 - 14 files changed, 4 insertions(+), 20 deletions(-) diff --git a/packages/ap_common_announcement_ui/lib/src/api/github_helper.dart b/packages/ap_common_announcement_ui/lib/src/api/github_helper.dart index de4ef870..200ff1ab 100644 --- a/packages/ap_common_announcement_ui/lib/src/api/github_helper.dart +++ b/packages/ap_common_announcement_ui/lib/src/api/github_helper.dart @@ -1,6 +1,5 @@ import 'dart:convert'; -import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:cookie_jar/cookie_jar.dart'; import 'package:dio_cookie_manager/dio_cookie_manager.dart'; diff --git a/packages/ap_common_announcement_ui/lib/src/api/imgur_helper.dart b/packages/ap_common_announcement_ui/lib/src/api/imgur_helper.dart index 1c65ec81..ea12b71a 100644 --- a/packages/ap_common_announcement_ui/lib/src/api/imgur_helper.dart +++ b/packages/ap_common_announcement_ui/lib/src/api/imgur_helper.dart @@ -1,12 +1,9 @@ import 'dart:async'; import 'dart:typed_data'; -import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:path/path.dart' as p; -export 'package:ap_common_core/ap_common_core.dart'; - class ImgurHelper { ImgurHelper() { dio = Dio( diff --git a/packages/ap_common_firebase/lib/src/utils/firebase_crashlytics_utils.dart b/packages/ap_common_firebase/lib/src/utils/firebase_crashlytics_utils.dart index a6bc7229..880415ca 100644 --- a/packages/ap_common_firebase/lib/src/utils/firebase_crashlytics_utils.dart +++ b/packages/ap_common_firebase/lib/src/utils/firebase_crashlytics_utils.dart @@ -1,8 +1,8 @@ import 'dart:async'; import 'dart:io'; -import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_firebase/src/utils/firebase_utils.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:firebase_crashlytics/firebase_crashlytics.dart'; import 'package:flutter/foundation.dart'; diff --git a/packages/ap_common_firebase/lib/src/utils/firebase_message_utils.dart b/packages/ap_common_firebase/lib/src/utils/firebase_message_utils.dart index e437eb11..c71c050b 100644 --- a/packages/ap_common_firebase/lib/src/utils/firebase_message_utils.dart +++ b/packages/ap_common_firebase/lib/src/utils/firebase_message_utils.dart @@ -1,7 +1,6 @@ import 'dart:developer'; import 'dart:io'; -import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_firebase/src/utils/firebase_analytics_utils.dart'; import 'package:ap_common_firebase/src/utils/firebase_utils.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; diff --git a/packages/ap_common_firebase/lib/src/utils/firebase_remote_config_utils.dart b/packages/ap_common_firebase/lib/src/utils/firebase_remote_config_utils.dart index 996732c9..47b43b64 100644 --- a/packages/ap_common_firebase/lib/src/utils/firebase_remote_config_utils.dart +++ b/packages/ap_common_firebase/lib/src/utils/firebase_remote_config_utils.dart @@ -1,6 +1,6 @@ import 'dart:io'; -import 'package:ap_common_core/ap_common_core.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:firebase_remote_config/firebase_remote_config.dart'; import 'package:flutter/foundation.dart'; diff --git a/packages/ap_common_firebase/lib/src/utils/firebase_utils.dart b/packages/ap_common_firebase/lib/src/utils/firebase_utils.dart index cce19342..04418d2e 100644 --- a/packages/ap_common_firebase/lib/src/utils/firebase_utils.dart +++ b/packages/ap_common_firebase/lib/src/utils/firebase_utils.dart @@ -1,9 +1,9 @@ import 'dart:io'; -import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_firebase/src/utils/firebase_analytics_utils.dart'; import 'package:ap_common_firebase/src/utils/firebase_crashlytics_utils.dart'; import 'package:ap_common_firebase/src/utils/firebase_performance_utils.dart'; +import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/foundation.dart'; export 'package:firebase_analytics/firebase_analytics.dart'; diff --git a/packages/ap_common_flutter_core/pubspec.yaml b/packages/ap_common_flutter_core/pubspec.yaml index 954ce9dc..06a7e932 100644 --- a/packages/ap_common_flutter_core/pubspec.yaml +++ b/packages/ap_common_flutter_core/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: flutter: sdk: flutter ap_common_core: '>=0.0.1 <1.0.0' - dio: ">=5.4.1 <6.0.0" + dio: 5.6.0 intl: ">=0.16.0 <1.0.0" multiple_localization: ^0.5.0 cross_file: ^0.3.4+2 diff --git a/packages/ap_common_flutter_platform/lib/src/utilities/ap_media_util.dart b/packages/ap_common_flutter_platform/lib/src/utilities/ap_media_util.dart index 6ed5d9e9..a442bb11 100644 --- a/packages/ap_common_flutter_platform/lib/src/utilities/ap_media_util.dart +++ b/packages/ap_common_flutter_platform/lib/src/utilities/ap_media_util.dart @@ -1,6 +1,5 @@ import 'dart:io'; -import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:file_saver/file_saver.dart'; import 'package:flutter/foundation.dart'; diff --git a/packages/ap_common_flutter_platform/lib/src/utilities/app_store_util.dart b/packages/ap_common_flutter_platform/lib/src/utilities/app_store_util.dart index 42faafb3..49cd84c5 100644 --- a/packages/ap_common_flutter_platform/lib/src/utilities/app_store_util.dart +++ b/packages/ap_common_flutter_platform/lib/src/utilities/app_store_util.dart @@ -1,14 +1,11 @@ import 'dart:io'; -import 'package:ap_common_core/injector.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:app_tracking_transparency/app_tracking_transparency.dart'; import 'package:flutter/foundation.dart'; import 'package:in_app_review/in_app_review.dart'; class ApAppStoreUtil extends AppStoreUtil { - static ApAppStoreUtil get instance => injector.get(); - @override Future openAppReview({ String defaultUrl = '', diff --git a/packages/ap_common_flutter_platform/lib/src/utilities/notification_utils.dart b/packages/ap_common_flutter_platform/lib/src/utilities/notification_utils.dart index d8ff1abc..3a53316e 100644 --- a/packages/ap_common_flutter_platform/lib/src/utilities/notification_utils.dart +++ b/packages/ap_common_flutter_platform/lib/src/utilities/notification_utils.dart @@ -1,6 +1,5 @@ import 'dart:io'; -import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; diff --git a/packages/ap_common_flutter_platform/lib/src/utilities/preferences.dart b/packages/ap_common_flutter_platform/lib/src/utilities/preferences.dart index 334bc6bd..692aa232 100644 --- a/packages/ap_common_flutter_platform/lib/src/utilities/preferences.dart +++ b/packages/ap_common_flutter_platform/lib/src/utilities/preferences.dart @@ -1,6 +1,5 @@ import 'dart:io'; -import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:encrypt/encrypt.dart' as encrypt; import 'package:flutter/foundation.dart'; diff --git a/packages/ap_common_flutter_ui/lib/src/scaffold/course_scaffold.dart b/packages/ap_common_flutter_ui/lib/src/scaffold/course_scaffold.dart index 1440fbb4..40d06d2e 100644 --- a/packages/ap_common_flutter_ui/lib/src/scaffold/course_scaffold.dart +++ b/packages/ap_common_flutter_ui/lib/src/scaffold/course_scaffold.dart @@ -7,8 +7,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; -export 'package:ap_common_core/ap_common_core.dart'; - typedef CourseNotifyCallback = Function( CourseNotify? courseNotify, CourseNotifyState state, diff --git a/packages/ap_common_flutter_ui/lib/src/scaffold/home_page_scaffold.dart b/packages/ap_common_flutter_ui/lib/src/scaffold/home_page_scaffold.dart index 62111564..8067213a 100644 --- a/packages/ap_common_flutter_ui/lib/src/scaffold/home_page_scaffold.dart +++ b/packages/ap_common_flutter_ui/lib/src/scaffold/home_page_scaffold.dart @@ -5,8 +5,6 @@ import 'package:ap_common_flutter_ui/ap_common_flutter_ui.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -export 'package:ap_common_core/ap_common_core.dart'; - enum HomeState { loading, finish, error, empty, offline } class HomePageScaffold extends StatefulWidget { diff --git a/packages/ap_common_flutter_ui/lib/src/widgets/ap_drawer.dart b/packages/ap_common_flutter_ui/lib/src/widgets/ap_drawer.dart index 587ba75e..feba7034 100644 --- a/packages/ap_common_flutter_ui/lib/src/widgets/ap_drawer.dart +++ b/packages/ap_common_flutter_ui/lib/src/widgets/ap_drawer.dart @@ -1,6 +1,5 @@ import 'dart:typed_data'; -import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:ap_common_flutter_ui/src/resources/ap_theme.dart'; import 'package:flutter/material.dart'; From 3bbeb7e9c9228c30dcd78bed301a1308b78cdc10 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Wed, 9 Oct 2024 22:56:53 +0800 Subject: [PATCH 21/41] feat: melos pub publish check --- melos.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/melos.yaml b/melos.yaml index df4251b4..65748600 100644 --- a/melos.yaml +++ b/melos.yaml @@ -38,4 +38,8 @@ scripts: description: Run `flutter test` for a specific package. packageFilters: dirExists: - - test \ No newline at end of file + - test + pub-check: + run: | + melos exec -c 1 --no-private --ignore="*example*" -- \ + dart pub publish --dry-run \ No newline at end of file From 4cbbde28c5a25eeaaa1dfe2110300b6f63403a79 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Wed, 9 Oct 2024 22:57:42 +0800 Subject: [PATCH 22/41] feat: enable melos bootstrap `usePubspecOverrides` --- melos.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/melos.yaml b/melos.yaml index 65748600..58ddd1fd 100644 --- a/melos.yaml +++ b/melos.yaml @@ -11,6 +11,7 @@ command: # https://github.com/dart-lang/pub/issues/3404). Disabling this feature # makes the CI much more stable. runPubGetInParallel: false + usePubspecOverrides: true scripts: analyze: From dbeaaa0d156ae8775891a53d4af3b85f4e4218ed Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Fri, 11 Oct 2024 10:31:12 +0800 Subject: [PATCH 23/41] chore(release): publish packages - ap_common_firebase@0.17.0-dev.0 --- CHANGELOG.md | 64 ++++++++++++++++++++++++ packages/ap_common_firebase/CHANGELOG.md | 26 ++++++++++ packages/ap_common_firebase/pubspec.yaml | 2 +- 3 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..c6b6720f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,64 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## 2024-10-11 + +### Changes + +--- + +Packages with breaking changes: + + - There are no breaking changes in this release. + +Packages with other changes: + + - [`ap_common_firebase` - `v0.17.0-dev.0`](#ap_common_firebase---v0170-dev0) + +--- + +#### `ap_common_firebase` - `v0.17.0-dev.0` + + - **FIX**: `ap_common_firebase` dependency usage. ([d5098b42](https://github.com/abc873693/ap_common/commit/d5098b426c00de39c0736a8ca535a76be0722331)) + - **FIX**: `ap_common_firebase` separate static error. ([1c8da8ea](https://github.com/abc873693/ap_common/commit/1c8da8ea57c7e3e48d3e53a824e76968d56a97b5)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + - **FEAT**: improve `ap_common_firebase` package import usage. ([aa6462c4](https://github.com/abc873693/ap_common/commit/aa6462c407b074b6fa95969765e28c85dc187de5)) + - **FEAT**: centralized package lint rule. ([08db9e1f](https://github.com/abc873693/ap_common/commit/08db9e1f00118f11ef389b194585626d7c51c3ab)) + - **FEAT**: update example path. ([4d7390c9](https://github.com/abc873693/ap_common/commit/4d7390c9212631e1233c37c901a4454610783926)) + - **FEAT**: melos generation setup. ([90497edd](https://github.com/abc873693/ap_common/commit/90497edd12d449e66991d654a03175edebf1e816)) + - **FEAT**: melos basic setting. ([f2d4fafd](https://github.com/abc873693/ap_common/commit/f2d4fafd48c812901f5394fb83f6f5e5ff67401c)) + + +## 2024-10-11 + +### Changes + +--- + +Packages with breaking changes: + + - There are no breaking changes in this release. + +Packages with other changes: + + - [`ap_common_firebase` - `v0.17.0-dev.0`](#ap_common_firebase---v0170-dev0) + +--- + +#### `ap_common_firebase` - `v0.17.0-dev.0` + + - test + + - **FIX**: `ap_common_firebase` dependency usage. ([d5098b42](https://github.com/abc873693/ap_common/commit/d5098b426c00de39c0736a8ca535a76be0722331)) + - **FIX**: `ap_common_firebase` separate static error. ([1c8da8ea](https://github.com/abc873693/ap_common/commit/1c8da8ea57c7e3e48d3e53a824e76968d56a97b5)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + - **FEAT**: improve `ap_common_firebase` package import usage. ([aa6462c4](https://github.com/abc873693/ap_common/commit/aa6462c407b074b6fa95969765e28c85dc187de5)) + - **FEAT**: centralized package lint rule. ([08db9e1f](https://github.com/abc873693/ap_common/commit/08db9e1f00118f11ef389b194585626d7c51c3ab)) + - **FEAT**: update example path. ([4d7390c9](https://github.com/abc873693/ap_common/commit/4d7390c9212631e1233c37c901a4454610783926)) + - **FEAT**: melos generation setup. ([90497edd](https://github.com/abc873693/ap_common/commit/90497edd12d449e66991d654a03175edebf1e816)) + - **FEAT**: melos basic setting. ([f2d4fafd](https://github.com/abc873693/ap_common/commit/f2d4fafd48c812901f5394fb83f6f5e5ff67401c)) + diff --git a/packages/ap_common_firebase/CHANGELOG.md b/packages/ap_common_firebase/CHANGELOG.md index 2f9b7856..016a54f5 100644 --- a/packages/ap_common_firebase/CHANGELOG.md +++ b/packages/ap_common_firebase/CHANGELOG.md @@ -1,3 +1,29 @@ +## 0.17.0-dev.0 + + - **FIX**: `ap_common_firebase` dependency usage. ([d5098b42](https://github.com/abc873693/ap_common/commit/d5098b426c00de39c0736a8ca535a76be0722331)) + - **FIX**: `ap_common_firebase` separate static error. ([1c8da8ea](https://github.com/abc873693/ap_common/commit/1c8da8ea57c7e3e48d3e53a824e76968d56a97b5)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + - **FEAT**: improve `ap_common_firebase` package import usage. ([aa6462c4](https://github.com/abc873693/ap_common/commit/aa6462c407b074b6fa95969765e28c85dc187de5)) + - **FEAT**: centralized package lint rule. ([08db9e1f](https://github.com/abc873693/ap_common/commit/08db9e1f00118f11ef389b194585626d7c51c3ab)) + - **FEAT**: update example path. ([4d7390c9](https://github.com/abc873693/ap_common/commit/4d7390c9212631e1233c37c901a4454610783926)) + - **FEAT**: melos generation setup. ([90497edd](https://github.com/abc873693/ap_common/commit/90497edd12d449e66991d654a03175edebf1e816)) + - **FEAT**: melos basic setting. ([f2d4fafd](https://github.com/abc873693/ap_common/commit/f2d4fafd48c812901f5394fb83f6f5e5ff67401c)) + +## 0.17.0-dev.0 + + - test + + - **FIX**: `ap_common_firebase` dependency usage. ([d5098b42](https://github.com/abc873693/ap_common/commit/d5098b426c00de39c0736a8ca535a76be0722331)) + - **FIX**: `ap_common_firebase` separate static error. ([1c8da8ea](https://github.com/abc873693/ap_common/commit/1c8da8ea57c7e3e48d3e53a824e76968d56a97b5)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + - **FEAT**: improve `ap_common_firebase` package import usage. ([aa6462c4](https://github.com/abc873693/ap_common/commit/aa6462c407b074b6fa95969765e28c85dc187de5)) + - **FEAT**: centralized package lint rule. ([08db9e1f](https://github.com/abc873693/ap_common/commit/08db9e1f00118f11ef389b194585626d7c51c3ab)) + - **FEAT**: update example path. ([4d7390c9](https://github.com/abc873693/ap_common/commit/4d7390c9212631e1233c37c901a4454610783926)) + - **FEAT**: melos generation setup. ([90497edd](https://github.com/abc873693/ap_common/commit/90497edd12d449e66991d654a03175edebf1e816)) + - **FEAT**: melos basic setting. ([f2d4fafd](https://github.com/abc873693/ap_common/commit/f2d4fafd48c812901f5394fb83f6f5e5ff67401c)) + ## [0.16.0] - 2024/09/06 ### 基於 Flutter v3.24.2 開發 diff --git a/packages/ap_common_firebase/pubspec.yaml b/packages/ap_common_firebase/pubspec.yaml index 8bc62039..72915308 100644 --- a/packages/ap_common_firebase/pubspec.yaml +++ b/packages/ap_common_firebase/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_firebase description: ap_common for firebase instructure -version: 0.16.0 +version: 0.17.0-dev.0 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_firebase From e2014430975893b89e577acb3c6a8a7ce6bfc37e Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Fri, 11 Oct 2024 10:35:20 +0800 Subject: [PATCH 24/41] chore(release): publish packages - ap_common_plugin@0.5.0-dev.0 --- CHANGELOG.md | 25 +++++++++++++++++++++++++ apps/example/pubspec.yaml | 2 +- packages/ap_common_plugin/CHANGELOG.md | 8 ++++++++ packages/ap_common_plugin/pubspec.yaml | 2 +- 4 files changed, 35 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6b6720f..d3527b14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,31 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## 2024-10-11 + +### Changes + +--- + +Packages with breaking changes: + + - There are no breaking changes in this release. + +Packages with other changes: + + - [`ap_common_plugin` - `v0.5.0-dev.0`](#ap_common_plugin---v050-dev0) + +--- + +#### `ap_common_plugin` - `v0.5.0-dev.0` + + - **FEAT**: centralized package lint rule. ([08db9e1f](https://github.com/abc873693/ap_common/commit/08db9e1f00118f11ef389b194585626d7c51c3ab)) + - **FEAT**: update example path. ([4d7390c9](https://github.com/abc873693/ap_common/commit/4d7390c9212631e1233c37c901a4454610783926)) + - **FEAT**: CI setting for mono-repo. ([d22f6d15](https://github.com/abc873693/ap_common/commit/d22f6d15f64879dbf9711574aba4bba6e227f128)) + - **FEAT**: melos generation setup. ([90497edd](https://github.com/abc873693/ap_common/commit/90497edd12d449e66991d654a03175edebf1e816)) + - **FEAT**: melos basic setting. ([fa8e1946](https://github.com/abc873693/ap_common/commit/fa8e1946fd478c1a0cf1635eaeb0fb60cc264750)) + + ## 2024-10-11 ### Changes diff --git a/apps/example/pubspec.yaml b/apps/example/pubspec.yaml index 6fc0539e..c4f9e649 100644 --- a/apps/example/pubspec.yaml +++ b/apps/example/pubspec.yaml @@ -23,7 +23,7 @@ dependencies: sprintf: any multiple_localization: any - ap_common_plugin: 0.4.1 + ap_common_plugin: 0.5.0-dev.0 # path: ../../../GitHub/ap_common_plugin dependency_overrides: diff --git a/packages/ap_common_plugin/CHANGELOG.md b/packages/ap_common_plugin/CHANGELOG.md index cd0fe893..cb98eb50 100644 --- a/packages/ap_common_plugin/CHANGELOG.md +++ b/packages/ap_common_plugin/CHANGELOG.md @@ -1,3 +1,11 @@ +## 0.5.0-dev.0 + + - **FEAT**: centralized package lint rule. ([08db9e1f](https://github.com/abc873693/ap_common/commit/08db9e1f00118f11ef389b194585626d7c51c3ab)) + - **FEAT**: update example path. ([4d7390c9](https://github.com/abc873693/ap_common/commit/4d7390c9212631e1233c37c901a4454610783926)) + - **FEAT**: CI setting for mono-repo. ([d22f6d15](https://github.com/abc873693/ap_common/commit/d22f6d15f64879dbf9711574aba4bba6e227f128)) + - **FEAT**: melos generation setup. ([90497edd](https://github.com/abc873693/ap_common/commit/90497edd12d449e66991d654a03175edebf1e816)) + - **FEAT**: melos basic setting. ([fa8e1946](https://github.com/abc873693/ap_common/commit/fa8e1946fd478c1a0cf1635eaeb0fb60cc264750)) + ## [0.4.1] - 2024/03/17 * 修正相容 Android 14 gradle 版本 diff --git a/packages/ap_common_plugin/pubspec.yaml b/packages/ap_common_plugin/pubspec.yaml index 9225520e..4b5c8df0 100644 --- a/packages/ap_common_plugin/pubspec.yaml +++ b/packages/ap_common_plugin/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_plugin description: ap_common Native Plugin -version: 0.4.1 +version: 0.5.0-dev.0 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_plugin From bea5e7004248d4ea34aea93ffdafecfc6895da20 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Fri, 11 Oct 2024 10:36:00 +0800 Subject: [PATCH 25/41] chore(release): publish packages - ap_common@0.26.0-dev.1 - ap_common_announcement_ui@0.0.2 - ap_common_core@0.0.3 - ap_common_flutter_core@0.0.2 - ap_common_flutter_platform@0.0.2 - ap_common_flutter_ui@0.0.2 - ap_common_firebase@0.17.0-dev.1 --- CHANGELOG.md | 74 +++++++++++++++++++ packages/ap_common/CHANGELOG.md | 13 ++++ packages/ap_common/pubspec.yaml | 8 +- .../ap_common_announcement_ui/CHANGELOG.md | 4 + .../ap_common_announcement_ui/pubspec.yaml | 6 +- packages/ap_common_core/CHANGELOG.md | 12 +++ packages/ap_common_core/pubspec.yaml | 2 +- packages/ap_common_firebase/CHANGELOG.md | 4 + packages/ap_common_firebase/pubspec.yaml | 4 +- packages/ap_common_flutter_core/CHANGELOG.md | 7 ++ packages/ap_common_flutter_core/pubspec.yaml | 4 +- .../ap_common_flutter_platform/CHANGELOG.md | 5 ++ .../ap_common_flutter_platform/pubspec.yaml | 4 +- packages/ap_common_flutter_ui/CHANGELOG.md | 4 + packages/ap_common_flutter_ui/pubspec.yaml | 4 +- 15 files changed, 139 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3527b14..47df1c7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,80 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## 2024-10-11 + +### Changes + +--- + +Packages with breaking changes: + + - There are no breaking changes in this release. + +Packages with other changes: + + - [`ap_common` - `v0.26.0-dev.1`](#ap_common---v0260-dev1) + - [`ap_common_announcement_ui` - `v0.0.2`](#ap_common_announcement_ui---v002) + - [`ap_common_core` - `v0.0.3`](#ap_common_core---v003) + - [`ap_common_flutter_core` - `v0.0.2`](#ap_common_flutter_core---v002) + - [`ap_common_flutter_platform` - `v0.0.2`](#ap_common_flutter_platform---v002) + - [`ap_common_flutter_ui` - `v0.0.2`](#ap_common_flutter_ui---v002) + - [`ap_common_firebase` - `v0.17.0-dev.1`](#ap_common_firebase---v0170-dev1) + +Packages with dependency updates only: + +> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project. + + - `ap_common_firebase` - `v0.17.0-dev.1` + +--- + +#### `ap_common` - `v0.26.0-dev.1` + + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + - **FEAT**: `AppStoreUtil` and `PlatformUtil` for `ap_common_flutter_core`. ([d87dc711](https://github.com/abc873693/ap_common/commit/d87dc7117a040b31b42abd2d1122a891fd04988e)) + - **FEAT**: migrate `util` `l10n` to new `ap_common_flutter_core`. ([e91e9b4c](https://github.com/abc873693/ap_common/commit/e91e9b4cdf3cb7d4e2dde1dd8ec5f66556d38461)) + - **FEAT**: centralized package lint rule. ([08db9e1f](https://github.com/abc873693/ap_common/commit/08db9e1f00118f11ef389b194585626d7c51c3ab)) + - **FEAT**: migrate `NotificationUtil` and `Preference` to injection version. ([ac50e177](https://github.com/abc873693/ap_common/commit/ac50e177cb276937b2411397959a845f98fa297a)) + - **FEAT**: `ap_common` import `ap_common_core`. ([a6aa801f](https://github.com/abc873693/ap_common/commit/a6aa801f2165281be61afbe33f4072827e5979bc)) + - **FEAT**: migrate `model` `util` `config` to new `ap_common_core`. ([90f16bc9](https://github.com/abc873693/ap_common/commit/90f16bc9e38eb10f2d8f3b633f4c46a0a9e2ff95)) + - **FEAT**: update example path. ([4d7390c9](https://github.com/abc873693/ap_common/commit/4d7390c9212631e1233c37c901a4454610783926)) + - **FEAT**: move main package to directory `packages` for melos prepare. ([8af51340](https://github.com/abc873693/ap_common/commit/8af51340576e8236b261a21188cc8feaa0776785)) + +#### `ap_common_announcement_ui` - `v0.0.2` + + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + +#### `ap_common_core` - `v0.0.3` + + - **FIX**: `ap_common_core` separate static error. ([629ba29d](https://github.com/abc873693/ap_common/commit/629ba29d7d0aa59270eec1da45e49daebe3bf8b5)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + - **FEAT**: migrate `util` `l10n` to new `ap_common_flutter_core`. ([e91e9b4c](https://github.com/abc873693/ap_common/commit/e91e9b4cdf3cb7d4e2dde1dd8ec5f66556d38461)) + - **FEAT**: centralized package lint rule. ([08db9e1f](https://github.com/abc873693/ap_common/commit/08db9e1f00118f11ef389b194585626d7c51c3ab)) + - **FEAT**: release `ap_common_core` v0.0.2. ([630bcec0](https://github.com/abc873693/ap_common/commit/630bcec0b9158ddd91c5fab9de1f630447547490)) + - **FEAT**: migrate `NotificationUtil` and `Preference` to injection version. ([ac50e177](https://github.com/abc873693/ap_common/commit/ac50e177cb276937b2411397959a845f98fa297a)) + - **FEAT**: `ap_common` import `ap_common_core`. ([a6aa801f](https://github.com/abc873693/ap_common/commit/a6aa801f2165281be61afbe33f4072827e5979bc)) + - **FEAT**: migrate `model` `util` `config` to new `ap_common_core`. ([90f16bc9](https://github.com/abc873693/ap_common/commit/90f16bc9e38eb10f2d8f3b633f4c46a0a9e2ff95)) + +#### `ap_common_flutter_core` - `v0.0.2` + + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + - **FEAT**: `AppStoreUtil` and `PlatformUtil` for `ap_common_flutter_core`. ([d87dc711](https://github.com/abc873693/ap_common/commit/d87dc7117a040b31b42abd2d1122a891fd04988e)) + - **FEAT**: migrate `util` `l10n` to new `ap_common_flutter_core`. ([e91e9b4c](https://github.com/abc873693/ap_common/commit/e91e9b4cdf3cb7d4e2dde1dd8ec5f66556d38461)) + +#### `ap_common_flutter_platform` - `v0.0.2` + + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + +#### `ap_common_flutter_ui` - `v0.0.2` + + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + + ## 2024-10-11 ### Changes diff --git a/packages/ap_common/CHANGELOG.md b/packages/ap_common/CHANGELOG.md index 5ceca56f..a9de4a0b 100644 --- a/packages/ap_common/CHANGELOG.md +++ b/packages/ap_common/CHANGELOG.md @@ -1,3 +1,16 @@ +## 0.26.0-dev.1 + + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + - **FEAT**: `AppStoreUtil` and `PlatformUtil` for `ap_common_flutter_core`. ([d87dc711](https://github.com/abc873693/ap_common/commit/d87dc7117a040b31b42abd2d1122a891fd04988e)) + - **FEAT**: migrate `util` `l10n` to new `ap_common_flutter_core`. ([e91e9b4c](https://github.com/abc873693/ap_common/commit/e91e9b4cdf3cb7d4e2dde1dd8ec5f66556d38461)) + - **FEAT**: centralized package lint rule. ([08db9e1f](https://github.com/abc873693/ap_common/commit/08db9e1f00118f11ef389b194585626d7c51c3ab)) + - **FEAT**: migrate `NotificationUtil` and `Preference` to injection version. ([ac50e177](https://github.com/abc873693/ap_common/commit/ac50e177cb276937b2411397959a845f98fa297a)) + - **FEAT**: `ap_common` import `ap_common_core`. ([a6aa801f](https://github.com/abc873693/ap_common/commit/a6aa801f2165281be61afbe33f4072827e5979bc)) + - **FEAT**: migrate `model` `util` `config` to new `ap_common_core`. ([90f16bc9](https://github.com/abc873693/ap_common/commit/90f16bc9e38eb10f2d8f3b633f4c46a0a9e2ff95)) + - **FEAT**: update example path. ([4d7390c9](https://github.com/abc873693/ap_common/commit/4d7390c9212631e1233c37c901a4454610783926)) + - **FEAT**: move main package to directory `packages` for melos prepare. ([8af51340](https://github.com/abc873693/ap_common/commit/8af51340576e8236b261a21188cc8feaa0776785)) + ## [0.26.0-dev.0] - 2024/10/09 ### 基於 Flutter v3.24 開發 diff --git a/packages/ap_common/pubspec.yaml b/packages/ap_common/pubspec.yaml index de962ab5..9dec4305 100644 --- a/packages/ap_common/pubspec.yaml +++ b/packages/ap_common/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common description: The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app -version: 0.26.0-dev.0 +version: 0.26.0-dev.1 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common @@ -13,9 +13,9 @@ dependencies: flutter_localizations: sdk: flutter - ap_common_flutter_ui: ^0.0.1 - ap_common_flutter_platform: ^0.0.1 - ap_common_announcement_ui: ^0.0.1 + ap_common_flutter_ui: ^0.0.2 + ap_common_flutter_platform: ^0.0.2 + ap_common_announcement_ui: ^0.0.2 #dependency_overrides: # ap_common_core: diff --git a/packages/ap_common_announcement_ui/CHANGELOG.md b/packages/ap_common_announcement_ui/CHANGELOG.md index a2c5ec04..b0941522 100644 --- a/packages/ap_common_announcement_ui/CHANGELOG.md +++ b/packages/ap_common_announcement_ui/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.2 + + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + ## 0.0.1 * initial release from `ap_common` package separate. \ No newline at end of file diff --git a/packages/ap_common_announcement_ui/pubspec.yaml b/packages/ap_common_announcement_ui/pubspec.yaml index fcb2020e..b154654d 100644 --- a/packages/ap_common_announcement_ui/pubspec.yaml +++ b/packages/ap_common_announcement_ui/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_announcement_ui description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" -version: 0.0.1 +version: 0.0.2 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_announcement_ui @@ -12,8 +12,8 @@ environment: dependencies: flutter: sdk: flutter - ap_common_flutter_core: '>=0.0.1 <1.0.0' - ap_common_flutter_ui: '>=0.0.1 <1.0.0' + ap_common_flutter_core: ^0.0.2 <1.0.0' + ap_common_flutter_ui: ^0.0.2 <1.0.0' # Dart Packages path: ^1.9.0 dio_cookie_manager: ^3.1.1 diff --git a/packages/ap_common_core/CHANGELOG.md b/packages/ap_common_core/CHANGELOG.md index 6c669796..e578e9ec 100644 --- a/packages/ap_common_core/CHANGELOG.md +++ b/packages/ap_common_core/CHANGELOG.md @@ -1,3 +1,15 @@ +## 0.0.3 + + - **FIX**: `ap_common_core` separate static error. ([629ba29d](https://github.com/abc873693/ap_common/commit/629ba29d7d0aa59270eec1da45e49daebe3bf8b5)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + - **FEAT**: migrate `util` `l10n` to new `ap_common_flutter_core`. ([e91e9b4c](https://github.com/abc873693/ap_common/commit/e91e9b4cdf3cb7d4e2dde1dd8ec5f66556d38461)) + - **FEAT**: centralized package lint rule. ([08db9e1f](https://github.com/abc873693/ap_common/commit/08db9e1f00118f11ef389b194585626d7c51c3ab)) + - **FEAT**: release `ap_common_core` v0.0.2. ([630bcec0](https://github.com/abc873693/ap_common/commit/630bcec0b9158ddd91c5fab9de1f630447547490)) + - **FEAT**: migrate `NotificationUtil` and `Preference` to injection version. ([ac50e177](https://github.com/abc873693/ap_common/commit/ac50e177cb276937b2411397959a845f98fa297a)) + - **FEAT**: `ap_common` import `ap_common_core`. ([a6aa801f](https://github.com/abc873693/ap_common/commit/a6aa801f2165281be61afbe33f4072827e5979bc)) + - **FEAT**: migrate `model` `util` `config` to new `ap_common_core`. ([90f16bc9](https://github.com/abc873693/ap_common/commit/90f16bc9e38eb10f2d8f3b633f4c46a0a9e2ff95)) + ## 0.0.2 * fix `ap_common` api usage diff --git a/packages/ap_common_core/pubspec.yaml b/packages/ap_common_core/pubspec.yaml index 3fac8004..78dd63ce 100644 --- a/packages/ap_common_core/pubspec.yaml +++ b/packages/ap_common_core/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_core description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" -version: 0.0.2 +version: 0.0.3 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_core diff --git a/packages/ap_common_firebase/CHANGELOG.md b/packages/ap_common_firebase/CHANGELOG.md index 016a54f5..7995d117 100644 --- a/packages/ap_common_firebase/CHANGELOG.md +++ b/packages/ap_common_firebase/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.17.0-dev.1 + + - Update a dependency to the latest release. + ## 0.17.0-dev.0 - **FIX**: `ap_common_firebase` dependency usage. ([d5098b42](https://github.com/abc873693/ap_common/commit/d5098b426c00de39c0736a8ca535a76be0722331)) diff --git a/packages/ap_common_firebase/pubspec.yaml b/packages/ap_common_firebase/pubspec.yaml index 72915308..dabe6e04 100644 --- a/packages/ap_common_firebase/pubspec.yaml +++ b/packages/ap_common_firebase/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_firebase description: ap_common for firebase instructure -version: 0.17.0-dev.0 +version: 0.17.0-dev.1 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_firebase @@ -12,7 +12,7 @@ dependencies: flutter: sdk: flutter - ap_common_flutter_core: '>=0.0.1 <1.0.0' + ap_common_flutter_core: ^0.0.2 <1.0.0' # path: ../../GitHub-NKUST-ITC/ap_common url_launcher: ^6.1.0 #firebase must use particular version diff --git a/packages/ap_common_flutter_core/CHANGELOG.md b/packages/ap_common_flutter_core/CHANGELOG.md index ec4a0b21..d6d428fd 100644 --- a/packages/ap_common_flutter_core/CHANGELOG.md +++ b/packages/ap_common_flutter_core/CHANGELOG.md @@ -1,3 +1,10 @@ +## 0.0.2 + + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + - **FEAT**: `AppStoreUtil` and `PlatformUtil` for `ap_common_flutter_core`. ([d87dc711](https://github.com/abc873693/ap_common/commit/d87dc7117a040b31b42abd2d1122a891fd04988e)) + - **FEAT**: migrate `util` `l10n` to new `ap_common_flutter_core`. ([e91e9b4c](https://github.com/abc873693/ap_common/commit/e91e9b4cdf3cb7d4e2dde1dd8ec5f66556d38461)) + ## 0.0.1 * initial release from `ap_common` package separate. diff --git a/packages/ap_common_flutter_core/pubspec.yaml b/packages/ap_common_flutter_core/pubspec.yaml index 06a7e932..46be9789 100644 --- a/packages/ap_common_flutter_core/pubspec.yaml +++ b/packages/ap_common_flutter_core/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_flutter_core description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" -version: 0.0.1 +version: 0.0.2 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_flutter_core @@ -12,7 +12,7 @@ environment: dependencies: flutter: sdk: flutter - ap_common_core: '>=0.0.1 <1.0.0' + ap_common_core: ^0.0.3 <1.0.0' dio: 5.6.0 intl: ">=0.16.0 <1.0.0" multiple_localization: ^0.5.0 diff --git a/packages/ap_common_flutter_platform/CHANGELOG.md b/packages/ap_common_flutter_platform/CHANGELOG.md index a2c5ec04..6566400a 100644 --- a/packages/ap_common_flutter_platform/CHANGELOG.md +++ b/packages/ap_common_flutter_platform/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.0.2 + + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + ## 0.0.1 * initial release from `ap_common` package separate. \ No newline at end of file diff --git a/packages/ap_common_flutter_platform/pubspec.yaml b/packages/ap_common_flutter_platform/pubspec.yaml index cc3d5762..775d9040 100644 --- a/packages/ap_common_flutter_platform/pubspec.yaml +++ b/packages/ap_common_flutter_platform/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_flutter_platform description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" -version: 0.0.1 +version: 0.0.2 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_flutter_platform @@ -11,7 +11,7 @@ environment: dependencies: flutter: sdk: flutter - ap_common_flutter_core: '>=0.0.1 <1.0.0' + ap_common_flutter_core: ^0.0.2 <1.0.0' # Dart Package encrypt: ^5.0.1 diff --git a/packages/ap_common_flutter_ui/CHANGELOG.md b/packages/ap_common_flutter_ui/CHANGELOG.md index a2c5ec04..b0941522 100644 --- a/packages/ap_common_flutter_ui/CHANGELOG.md +++ b/packages/ap_common_flutter_ui/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.2 + + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + ## 0.0.1 * initial release from `ap_common` package separate. \ No newline at end of file diff --git a/packages/ap_common_flutter_ui/pubspec.yaml b/packages/ap_common_flutter_ui/pubspec.yaml index acb6317f..adc54714 100644 --- a/packages/ap_common_flutter_ui/pubspec.yaml +++ b/packages/ap_common_flutter_ui/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_flutter_ui description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" -version: 0.0.1 +version: 0.0.2 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_flutter_ui @@ -11,7 +11,7 @@ environment: dependencies: flutter: sdk: flutter - ap_common_flutter_core: '>=0.0.1 <1.0.0' + ap_common_flutter_core: ^0.0.2 <1.0.0' # Dart Package sprintf: ^7.0.0 # Flutter UI Package From 8231a423b237d6f38b3531ec4fc2b06e713a6c51 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Fri, 11 Oct 2024 10:43:03 +0800 Subject: [PATCH 26/41] fix: packages version constraint --- .../ap_common_announcement_ui/pubspec.yaml | 4 +-- packages/ap_common_firebase/pubspec.yaml | 2 +- packages/ap_common_flutter_core/pubspec.yaml | 2 +- .../ap_common_flutter_platform/pubspec.yaml | 2 +- packages/ap_common_flutter_ui/pubspec.yaml | 2 +- packages/ap_common_plugin/.gitignore | 30 +++++++++++++++---- 6 files changed, 31 insertions(+), 11 deletions(-) diff --git a/packages/ap_common_announcement_ui/pubspec.yaml b/packages/ap_common_announcement_ui/pubspec.yaml index b154654d..e737e895 100644 --- a/packages/ap_common_announcement_ui/pubspec.yaml +++ b/packages/ap_common_announcement_ui/pubspec.yaml @@ -12,8 +12,8 @@ environment: dependencies: flutter: sdk: flutter - ap_common_flutter_core: ^0.0.2 <1.0.0' - ap_common_flutter_ui: ^0.0.2 <1.0.0' + ap_common_flutter_core: ^0.0.2 + ap_common_flutter_ui: ^0.0.2 # Dart Packages path: ^1.9.0 dio_cookie_manager: ^3.1.1 diff --git a/packages/ap_common_firebase/pubspec.yaml b/packages/ap_common_firebase/pubspec.yaml index dabe6e04..82259ad6 100644 --- a/packages/ap_common_firebase/pubspec.yaml +++ b/packages/ap_common_firebase/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: flutter: sdk: flutter - ap_common_flutter_core: ^0.0.2 <1.0.0' + ap_common_flutter_core: ^0.0.2 # path: ../../GitHub-NKUST-ITC/ap_common url_launcher: ^6.1.0 #firebase must use particular version diff --git a/packages/ap_common_flutter_core/pubspec.yaml b/packages/ap_common_flutter_core/pubspec.yaml index 46be9789..585eb5ac 100644 --- a/packages/ap_common_flutter_core/pubspec.yaml +++ b/packages/ap_common_flutter_core/pubspec.yaml @@ -12,7 +12,7 @@ environment: dependencies: flutter: sdk: flutter - ap_common_core: ^0.0.3 <1.0.0' + ap_common_core: ^0.0.3 dio: 5.6.0 intl: ">=0.16.0 <1.0.0" multiple_localization: ^0.5.0 diff --git a/packages/ap_common_flutter_platform/pubspec.yaml b/packages/ap_common_flutter_platform/pubspec.yaml index 775d9040..d73e4a74 100644 --- a/packages/ap_common_flutter_platform/pubspec.yaml +++ b/packages/ap_common_flutter_platform/pubspec.yaml @@ -11,7 +11,7 @@ environment: dependencies: flutter: sdk: flutter - ap_common_flutter_core: ^0.0.2 <1.0.0' + ap_common_flutter_core: ^0.0.2 # Dart Package encrypt: ^5.0.1 diff --git a/packages/ap_common_flutter_ui/pubspec.yaml b/packages/ap_common_flutter_ui/pubspec.yaml index adc54714..7fc9d25b 100644 --- a/packages/ap_common_flutter_ui/pubspec.yaml +++ b/packages/ap_common_flutter_ui/pubspec.yaml @@ -11,7 +11,7 @@ environment: dependencies: flutter: sdk: flutter - ap_common_flutter_core: ^0.0.2 <1.0.0' + ap_common_flutter_core: ^0.0.2 # Dart Package sprintf: ^7.0.0 # Flutter UI Package diff --git a/packages/ap_common_plugin/.gitignore b/packages/ap_common_plugin/.gitignore index 0a516185..ac5aa989 100644 --- a/packages/ap_common_plugin/.gitignore +++ b/packages/ap_common_plugin/.gitignore @@ -1,9 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp .DS_Store -.dart_tool/ +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ -.packages -.pub/ +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ -build/ +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ -android/.idea/ +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ From 8914a4dd859cb1452d662388dd01ff2382b24193 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Fri, 11 Oct 2024 10:43:22 +0800 Subject: [PATCH 27/41] feat: melos version command support --- melos.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/melos.yaml b/melos.yaml index 58ddd1fd..f6f4b92e 100644 --- a/melos.yaml +++ b/melos.yaml @@ -6,6 +6,14 @@ packages: - packages/** command: + version: + # Generate commit links in package changelogs. + linkToCommits: true + # # Only allow versioning to happen on main branch. + # branch: main + # Additionally build a changelog at the root of the workspace. + workspaceChangelog: true + bootstrap: # It seems so that running "pub get" in parallel has some issues (like # https://github.com/dart-lang/pub/issues/3404). Disabling this feature From 1dc81f7dcf5a1445aa14b66b6d2004b7d94ad6b2 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Fri, 11 Oct 2024 11:16:23 +0800 Subject: [PATCH 28/41] fix: pub publish requirement --- packages/ap_common_announcement_ui/.gitignore | 1 + packages/ap_common_core/.gitignore | 1 + packages/ap_common_firebase/.pubignore | 3 +- packages/ap_common_flutter_core/.gitignore | 1 + packages/ap_common_flutter_core/pubspec.yaml | 2 +- .../.flutter-plugins | 39 ------------------- .../ap_common_flutter_platform/.gitignore | 1 + .../ap_common_flutter_ui/.flutter-plugins | 16 -------- packages/ap_common_flutter_ui/.gitignore | 1 + packages/ap_common_plugin/.gitignore | 5 +++ packages/ap_common_plugin/.pubignore | 7 +++- 11 files changed, 19 insertions(+), 58 deletions(-) delete mode 100644 packages/ap_common_flutter_platform/.flutter-plugins delete mode 100644 packages/ap_common_flutter_ui/.flutter-plugins diff --git a/packages/ap_common_announcement_ui/.gitignore b/packages/ap_common_announcement_ui/.gitignore index ac5aa989..4135fcd5 100644 --- a/packages/ap_common_announcement_ui/.gitignore +++ b/packages/ap_common_announcement_ui/.gitignore @@ -27,3 +27,4 @@ migrate_working_dir/ **/doc/api/ .dart_tool/ build/ +.flutter-plugins diff --git a/packages/ap_common_core/.gitignore b/packages/ap_common_core/.gitignore index ac5aa989..4135fcd5 100644 --- a/packages/ap_common_core/.gitignore +++ b/packages/ap_common_core/.gitignore @@ -27,3 +27,4 @@ migrate_working_dir/ **/doc/api/ .dart_tool/ build/ +.flutter-plugins diff --git a/packages/ap_common_firebase/.pubignore b/packages/ap_common_firebase/.pubignore index 51e5420f..d2c48817 100644 --- a/packages/ap_common_firebase/.pubignore +++ b/packages/ap_common_firebase/.pubignore @@ -1,2 +1,3 @@ example/ -build/ \ No newline at end of file +build/ +pubspec_overrides.yaml \ No newline at end of file diff --git a/packages/ap_common_flutter_core/.gitignore b/packages/ap_common_flutter_core/.gitignore index ac5aa989..4135fcd5 100644 --- a/packages/ap_common_flutter_core/.gitignore +++ b/packages/ap_common_flutter_core/.gitignore @@ -27,3 +27,4 @@ migrate_working_dir/ **/doc/api/ .dart_tool/ build/ +.flutter-plugins diff --git a/packages/ap_common_flutter_core/pubspec.yaml b/packages/ap_common_flutter_core/pubspec.yaml index 585eb5ac..4e6511b4 100644 --- a/packages/ap_common_flutter_core/pubspec.yaml +++ b/packages/ap_common_flutter_core/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: flutter: sdk: flutter ap_common_core: ^0.0.3 - dio: 5.6.0 + dio: ^5.7.0 intl: ">=0.16.0 <1.0.0" multiple_localization: ^0.5.0 cross_file: ^0.3.4+2 diff --git a/packages/ap_common_flutter_platform/.flutter-plugins b/packages/ap_common_flutter_platform/.flutter-plugins deleted file mode 100644 index 850b7555..00000000 --- a/packages/ap_common_flutter_platform/.flutter-plugins +++ /dev/null @@ -1,39 +0,0 @@ -# This is a generated file; do not edit or check into version control. -add_2_calendar=/Users/rainvisitor/.pub-cache/hosted/pub.dev/add_2_calendar-3.0.1/ -app_tracking_transparency=/Users/rainvisitor/.pub-cache/hosted/pub.dev/app_tracking_transparency-2.0.6/ -file_saver=/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_saver-0.2.13/ -file_selector_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.3/ -file_selector_macos=/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.4+2/ -file_selector_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+3/ -flutter_local_notifications=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications-17.2.3/ -flutter_local_notifications_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_local_notifications_linux-4.0.1/ -flutter_plugin_android_lifecycle=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.23/ -image_picker=/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker-1.1.2/ -image_picker_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+15/ -image_picker_for_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_for_web-3.0.5/ -image_picker_ios=/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12/ -image_picker_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+1/ -image_picker_macos=/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1+1/ -image_picker_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1+1/ -in_app_review=/Users/rainvisitor/.pub-cache/hosted/pub.dev/in_app_review-2.0.9/ -package_info_plus=/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/ -path_provider=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider-2.1.4/ -path_provider_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_android-2.2.12/ -path_provider_foundation=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/ -path_provider_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/ -path_provider_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/ -photo_manager=/Users/rainvisitor/.pub-cache/hosted/pub.dev/photo_manager-3.5.0/ -share_plus=/Users/rainvisitor/.pub-cache/hosted/pub.dev/share_plus-10.0.0/ -shared_preferences=/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences-2.3.2/ -shared_preferences_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.3/ -shared_preferences_foundation=/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/ -shared_preferences_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/ -shared_preferences_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/ -shared_preferences_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/ -url_launcher=/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher-6.3.0/ -url_launcher_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.12/ -url_launcher_ios=/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.1/ -url_launcher_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.0/ -url_launcher_macos=/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.1/ -url_launcher_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.3/ -url_launcher_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.2/ diff --git a/packages/ap_common_flutter_platform/.gitignore b/packages/ap_common_flutter_platform/.gitignore index ac5aa989..55b1df69 100644 --- a/packages/ap_common_flutter_platform/.gitignore +++ b/packages/ap_common_flutter_platform/.gitignore @@ -27,3 +27,4 @@ migrate_working_dir/ **/doc/api/ .dart_tool/ build/ +.flutter-plugins \ No newline at end of file diff --git a/packages/ap_common_flutter_ui/.flutter-plugins b/packages/ap_common_flutter_ui/.flutter-plugins deleted file mode 100644 index 81d3e322..00000000 --- a/packages/ap_common_flutter_ui/.flutter-plugins +++ /dev/null @@ -1,16 +0,0 @@ -# This is a generated file; do not edit or check into version control. -flutter_keyboard_visibility=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/ -flutter_keyboard_visibility_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_linux-1.0.0/ -flutter_keyboard_visibility_macos=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_macos-1.0.0/ -flutter_keyboard_visibility_web=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_web-2.0.0/ -flutter_keyboard_visibility_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility_windows-1.0.0/ -package_info_plus=/Users/rainvisitor/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/ -path_provider=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider-2.1.4/ -path_provider_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_android-2.2.12/ -path_provider_foundation=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/ -path_provider_linux=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/ -path_provider_windows=/Users/rainvisitor/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/ -printing=/Users/rainvisitor/.pub-cache/hosted/pub.dev/printing-5.13.3/ -sqflite=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite-2.4.0/ -sqflite_android=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_android-2.4.0-1/ -sqflite_darwin=/Users/rainvisitor/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.1-0/ diff --git a/packages/ap_common_flutter_ui/.gitignore b/packages/ap_common_flutter_ui/.gitignore index ac5aa989..4135fcd5 100644 --- a/packages/ap_common_flutter_ui/.gitignore +++ b/packages/ap_common_flutter_ui/.gitignore @@ -27,3 +27,4 @@ migrate_working_dir/ **/doc/api/ .dart_tool/ build/ +.flutter-plugins diff --git a/packages/ap_common_plugin/.gitignore b/packages/ap_common_plugin/.gitignore index ac5aa989..40eb0154 100644 --- a/packages/ap_common_plugin/.gitignore +++ b/packages/ap_common_plugin/.gitignore @@ -27,3 +27,8 @@ migrate_working_dir/ **/doc/api/ .dart_tool/ build/ + +android/gradlew +android/gradlew.bat +melos_ap_common_plugin.iml +pubspec.lock \ No newline at end of file diff --git a/packages/ap_common_plugin/.pubignore b/packages/ap_common_plugin/.pubignore index 4949f098..f92c364a 100644 --- a/packages/ap_common_plugin/.pubignore +++ b/packages/ap_common_plugin/.pubignore @@ -1 +1,6 @@ -example/ \ No newline at end of file +example/ +android/gradlew +android/gradlew.bat +melos_ap_common_plugin.iml +pubspec.lock +pubspec_overrides.yaml \ No newline at end of file From 558e54451ed7ae1d1d0a9de2e74a8c2172845b9b Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Sat, 12 Oct 2024 15:11:35 +0800 Subject: [PATCH 29/41] fix: `ApAssets` path error --- .../lib/src/resources/ap_image_assets.dart | 22 +++++++++---------- .../lib/src/resources/ap_image_icons.dart | 6 ++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/ap_common_flutter_ui/lib/src/resources/ap_image_assets.dart b/packages/ap_common_flutter_ui/lib/src/resources/ap_image_assets.dart index d0a5d94e..d8ef65ad 100644 --- a/packages/ap_common_flutter_ui/lib/src/resources/ap_image_assets.dart +++ b/packages/ap_common_flutter_ui/lib/src/resources/ap_image_assets.dart @@ -4,25 +4,25 @@ class ApImageAssets { ApImageAssets._(); static const String email = - 'packages/ap_common_flutter_ui/src/assets/images/email.webp'; + 'packages/ap_common_flutter_ui/assets/images/email.webp'; static const String github = - 'packages/ap_common_flutter_ui/src/assets/images/github.webp'; + 'packages/ap_common_flutter_ui/assets/images/github.webp'; static const String drawerBackgroundLight = - 'packages/ap_common_flutter_ui/src/assets/images/drawer_background_light.webp'; + 'packages/ap_common_flutter_ui/assets/images/drawer_background_light.webp'; static const String drawerBackgroundDark = - 'packages/ap_common_flutter_ui/src/assets/images/drawer_background_dark.webp'; + 'packages/ap_common_flutter_ui/assets/images/drawer_background_dark.webp'; static const String nkutstItc = - 'packages/ap_common_flutter_ui/src/assets/images/nkutst_itc.webp'; + 'packages/ap_common_flutter_ui/assets/images/nkutst_itc.webp'; static const String gdgOnCampusNkustItc = - 'packages/ap_common_flutter_ui/src/assets/images/gdg_on_campus_nkust_itc.jpg'; + 'packages/ap_common_flutter_ui/assets/images/gdg_on_campus_nkust_itc.jpg'; static const String nsysuGdsc = - 'packages/ap_common_flutter_ui/src/assets/images/nsysu_gdsc.png'; + 'packages/ap_common_flutter_ui/assets/images/nsysu_gdsc.png'; static const String fb = - 'packages/ap_common_flutter_ui/src/assets/images/fb.webp'; + 'packages/ap_common_flutter_ui/assets/images/fb.webp'; static const String instagram = - 'packages/ap_common_flutter_ui/src/assets/images/instagram.png'; + 'packages/ap_common_flutter_ui/assets/images/instagram.png'; static const String dashLineDark = - 'packages/ap_common_flutter_ui/src/assets/images/dash_line_dark.webp'; + 'packages/ap_common_flutter_ui/assets/images/dash_line_dark.webp'; static const String dashLineLight = - 'packages/ap_common_flutter_ui/src/assets/images/dash_line_light.webp'; + 'packages/ap_common_flutter_ui/assets/images/dash_line_light.webp'; } diff --git a/packages/ap_common_flutter_ui/lib/src/resources/ap_image_icons.dart b/packages/ap_common_flutter_ui/lib/src/resources/ap_image_icons.dart index 5448c660..7781f06f 100644 --- a/packages/ap_common_flutter_ui/lib/src/resources/ap_image_icons.dart +++ b/packages/ap_common_flutter_ui/lib/src/resources/ap_image_icons.dart @@ -4,9 +4,9 @@ class ApImageIcons { ApImageIcons._(); static const String calendarImport = - 'packages/ap_common_flutter_ui/src/assets/icons/calendar_import.png'; + 'packages/ap_common_flutter_ui/assets/icons/calendar_import.png'; static const String qrcode = - 'packages/ap_common_flutter_ui/src/assets/icons/qrcode.png'; + 'packages/ap_common_flutter_ui/assets/icons/qrcode.png'; static const String barcode = - 'packages/ap_common_flutter_ui/src/assets/icons/barcode.png'; + 'packages/ap_common_flutter_ui/assets/icons/barcode.png'; } From 0e8a9aab76b2a6994dbcfdf4814e6f7104e4b312 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Sat, 12 Oct 2024 15:17:27 +0800 Subject: [PATCH 30/41] feat: `AnalyticsUtil` and `CrashlyticsUtil` migrate to injection version --- apps/example/lib/main.dart | 1 + apps/example/pubspec.lock | 18 +++--- .../ap_common_core/lib/ap_common_core.dart | 5 +- .../ap_common_core/lib/src/mock_util.dart | 58 +++++++++++++++++++ .../lib/src/utilities/analytics_utils.dart | 5 +- .../lib/src/utilities/crashlytics_utils.dart | 6 +- .../lib/src/utilities/preference_util.dart | 2 +- .../lib/src/utils/firebase_utils.dart | 11 ++-- 8 files changed, 85 insertions(+), 21 deletions(-) create mode 100644 packages/ap_common_core/lib/src/mock_util.dart diff --git a/apps/example/lib/main.dart b/apps/example/lib/main.dart index 2a12889e..77e895b1 100644 --- a/apps/example/lib/main.dart +++ b/apps/example/lib/main.dart @@ -12,6 +12,7 @@ import 'package:google_sign_in_dartio/google_sign_in_dartio.dart'; Future main() async { WidgetsFlutterBinding.ensureInitialized(); registerOneForAll(); + registerApCommonService(); await (PreferenceUtil.instance as ApPreferenceUtil) .init(key: Constants.key, iv: Constants.iv); if (!kIsWeb && (Platform.isMacOS || Platform.isWindows || Platform.isLinux)) { diff --git a/apps/example/pubspec.lock b/apps/example/pubspec.lock index 85298f53..daf138c4 100644 --- a/apps/example/pubspec.lock +++ b/apps/example/pubspec.lock @@ -15,49 +15,49 @@ packages: path: "../../packages/ap_common" relative: true source: path - version: "0.26.0-dev.0" + version: "0.26.0-dev.1" ap_common_announcement_ui: dependency: "direct overridden" description: path: "../../packages/ap_common_announcement_ui" relative: true source: path - version: "0.0.1" + version: "0.0.2" ap_common_core: dependency: "direct overridden" description: path: "../../packages/ap_common_core" relative: true source: path - version: "0.0.2" + version: "0.0.3" ap_common_flutter_core: dependency: "direct overridden" description: path: "../../packages/ap_common_flutter_core" relative: true source: path - version: "0.0.1" + version: "0.0.2" ap_common_flutter_platform: dependency: "direct overridden" description: path: "../../packages/ap_common_flutter_platform" relative: true source: path - version: "0.0.1" + version: "0.0.2" ap_common_flutter_ui: dependency: "direct overridden" description: path: "../../packages/ap_common_flutter_ui" relative: true source: path - version: "0.0.1" + version: "0.0.2" ap_common_plugin: dependency: "direct main" description: path: "../../packages/ap_common_plugin" relative: true source: path - version: "0.4.1" + version: "0.5.0-dev.0" app_tracking_transparency: dependency: transitive description: @@ -238,10 +238,10 @@ packages: dependency: transitive description: name: dio - sha256: "0dfb6b6a1979dac1c1245e17cef824d7b452ea29bd33d3467269f9bef3715fb0" + sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" url: "https://pub.dev" source: hosted - version: "5.6.0" + version: "5.7.0" dio_cookie_manager: dependency: transitive description: diff --git a/packages/ap_common_core/lib/ap_common_core.dart b/packages/ap_common_core/lib/ap_common_core.dart index f7a291e0..2768edb5 100644 --- a/packages/ap_common_core/lib/ap_common_core.dart +++ b/packages/ap_common_core/lib/ap_common_core.dart @@ -1,5 +1,6 @@ import 'package:ap_common_core/ap_common_core.dart'; import 'package:ap_common_core/injector.dart'; +import 'package:ap_common_core/src/mock_util.dart'; export 'src/config/analytics_constants.dart'; export 'src/config/ap_constants.dart'; @@ -23,8 +24,8 @@ export 'src/utilities/crashlytics_utils.dart'; export 'src/utilities/preference_util.dart'; void registerApCommonService({ - required AnalyticsUtil analytics, - required CrashlyticsUtil crashlytics, + AnalyticsUtil analytics = const MockAnalyticsUtil(), + CrashlyticsUtil crashlytics = const MockCrashlyticsUtil(), }) { injector ..registerSingleton(() => analytics) diff --git a/packages/ap_common_core/lib/src/mock_util.dart b/packages/ap_common_core/lib/src/mock_util.dart new file mode 100644 index 00000000..28438496 --- /dev/null +++ b/packages/ap_common_core/lib/src/mock_util.dart @@ -0,0 +1,58 @@ +import 'package:ap_common_core/ap_common_core.dart'; + +class MockAnalyticsUtil extends AnalyticsUtil { + const MockAnalyticsUtil(); + + @override + Future logApiEvent( + String type, + int status, { + String message = '', + }) async {} + + @override + Future logEvent( + String name, { + Map? parameters, + }) async {} + + @override + Future logTimeEvent(String name, double seconds) async {} + + @override + Future logUserInfo(UserInfo userInfo) async {} + + @override + Future setCurrentScreen( + String screenName, + String screenClassOverride, + ) async {} + + @override + Future setUserId(String id) async {} + + @override + Future setUserProperty(String name, String value) async {} +} + +class MockCrashlyticsUtil extends CrashlyticsUtil { + const MockCrashlyticsUtil(); + + @override + Future log(String message) async {} + + @override + Future recordError( + dynamic exception, + StackTrace stack, { + dynamic reason, + Iterable? information, + bool? printDetails, + }) async {} + + @override + Future setCrashlyticsCollectionEnabled(bool enabled) async {} + + @override + Future setCustomKey(String key, Object value) async {} +} diff --git a/packages/ap_common_core/lib/src/utilities/analytics_utils.dart b/packages/ap_common_core/lib/src/utilities/analytics_utils.dart index a575eb79..44d4e2d1 100644 --- a/packages/ap_common_core/lib/src/utilities/analytics_utils.dart +++ b/packages/ap_common_core/lib/src/utilities/analytics_utils.dart @@ -1,7 +1,10 @@ +import 'package:ap_common_core/injector.dart'; import 'package:ap_common_core/src/models/user_info.dart'; abstract class AnalyticsUtil { - static AnalyticsUtil? instance; + const AnalyticsUtil(); + + static AnalyticsUtil get instance => injector.get(); Future setCurrentScreen(String screenName, String screenClassOverride); diff --git a/packages/ap_common_core/lib/src/utilities/crashlytics_utils.dart b/packages/ap_common_core/lib/src/utilities/crashlytics_utils.dart index f0d2c91f..00dc6b2d 100644 --- a/packages/ap_common_core/lib/src/utilities/crashlytics_utils.dart +++ b/packages/ap_common_core/lib/src/utilities/crashlytics_utils.dart @@ -1,5 +1,9 @@ +import 'package:ap_common_core/injector.dart'; + abstract class CrashlyticsUtil { - static CrashlyticsUtil? instance; + const CrashlyticsUtil(); + + static CrashlyticsUtil get instance => injector.get(); Future recordError( dynamic exception, diff --git a/packages/ap_common_core/lib/src/utilities/preference_util.dart b/packages/ap_common_core/lib/src/utilities/preference_util.dart index b2292980..2713f86f 100644 --- a/packages/ap_common_core/lib/src/utilities/preference_util.dart +++ b/packages/ap_common_core/lib/src/utilities/preference_util.dart @@ -3,7 +3,7 @@ import 'package:ap_common_core/injector.dart'; abstract class PreferenceUtil { static PreferenceUtil get instance => injector.get(); - static bool get isSupport => true; + bool get isSupport => true; Future setString(String key, String data); diff --git a/packages/ap_common_firebase/lib/src/utils/firebase_utils.dart b/packages/ap_common_firebase/lib/src/utils/firebase_utils.dart index 04418d2e..5466ac6e 100644 --- a/packages/ap_common_firebase/lib/src/utils/firebase_utils.dart +++ b/packages/ap_common_firebase/lib/src/utils/firebase_utils.dart @@ -13,13 +13,10 @@ export 'package:firebase_messaging/firebase_messaging.dart'; class FirebaseUtils { static FirebaseAnalytics? init() { - if (FirebaseCrashlyticsUtils.isSupported) { - CrashlyticsUtil.instance = FirebaseCrashlyticsUtils.instance; - } - if (FirebaseAnalyticsUtils.isSupported) { - AnalyticsUtil.instance = FirebaseAnalyticsUtils.instance; - return FirebaseAnalyticsUtils.instance.analytics; - } + registerApCommonService( + analytics: FirebaseAnalyticsUtils(), + crashlytics: FirebaseCrashlyticsUtils(), + ); FirebasePerformancesUtils.instance.init(); return null; } From 9d0adcbc1918b8068240df206052c9ac1aa6dc68 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Sat, 12 Oct 2024 15:19:05 +0800 Subject: [PATCH 31/41] chore: `PreferenceUtil.isSupport` to class getter --- .../lib/src/utilities/preferences.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/ap_common_flutter_platform/lib/src/utilities/preferences.dart b/packages/ap_common_flutter_platform/lib/src/utilities/preferences.dart index 692aa232..63caac8d 100644 --- a/packages/ap_common_flutter_platform/lib/src/utilities/preferences.dart +++ b/packages/ap_common_flutter_platform/lib/src/utilities/preferences.dart @@ -12,7 +12,8 @@ class ApPreferenceUtil extends PreferenceUtil { static encrypt.IV? iv; - static bool get isSupport => + @override + bool get isSupport => kIsWeb || Platform.isIOS || Platform.isAndroid || From 562aede546e0c91e0bdc4d87fc13f54aac6ddbeb Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Sat, 12 Oct 2024 15:25:24 +0800 Subject: [PATCH 32/41] chore(release): publish packages - ap_common_announcement_ui@0.0.2+1 - ap_common_core@0.0.4 - ap_common_firebase@0.17.0-dev.2 - ap_common_flutter_core@0.0.2+1 - ap_common_flutter_platform@0.0.2+1 - ap_common_flutter_ui@0.0.2+1 - ap_common_plugin@0.5.0-dev.1 - ap_common@0.26.0-dev.2 --- CHANGELOG.md | 67 +++++++++++++++++++ apps/example/pubspec.yaml | 2 +- packages/ap_common/CHANGELOG.md | 4 ++ packages/ap_common/pubspec.yaml | 8 +-- .../ap_common_announcement_ui/CHANGELOG.md | 5 ++ .../ap_common_announcement_ui/pubspec.yaml | 6 +- packages/ap_common_core/CHANGELOG.md | 5 ++ packages/ap_common_core/pubspec.yaml | 2 +- packages/ap_common_firebase/CHANGELOG.md | 6 ++ packages/ap_common_firebase/pubspec.yaml | 4 +- packages/ap_common_flutter_core/CHANGELOG.md | 5 ++ packages/ap_common_flutter_core/pubspec.yaml | 4 +- .../ap_common_flutter_platform/CHANGELOG.md | 5 ++ .../ap_common_flutter_platform/pubspec.yaml | 4 +- packages/ap_common_flutter_ui/CHANGELOG.md | 6 ++ packages/ap_common_flutter_ui/pubspec.yaml | 4 +- packages/ap_common_plugin/CHANGELOG.md | 5 ++ packages/ap_common_plugin/pubspec.yaml | 2 +- 18 files changed, 126 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47df1c7d..070d4bde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,73 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## 2024-10-12 + +### Changes + +--- + +Packages with breaking changes: + + - There are no breaking changes in this release. + +Packages with other changes: + + - [`ap_common_announcement_ui` - `v0.0.2+1`](#ap_common_announcement_ui---v0021) + - [`ap_common_core` - `v0.0.4`](#ap_common_core---v004) + - [`ap_common_firebase` - `v0.17.0-dev.2`](#ap_common_firebase---v0170-dev2) + - [`ap_common_flutter_core` - `v0.0.2+1`](#ap_common_flutter_core---v0021) + - [`ap_common_flutter_platform` - `v0.0.2+1`](#ap_common_flutter_platform---v0021) + - [`ap_common_flutter_ui` - `v0.0.2+1`](#ap_common_flutter_ui---v0021) + - [`ap_common_plugin` - `v0.5.0-dev.1`](#ap_common_plugin---v050-dev1) + - [`ap_common` - `v0.26.0-dev.2`](#ap_common---v0260-dev2) + +Packages with dependency updates only: + +> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project. + + - `ap_common` - `v0.26.0-dev.2` + +--- + +#### `ap_common_announcement_ui` - `v0.0.2+1` + + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + +#### `ap_common_core` - `v0.0.4` + + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FEAT**: `AnalyticsUtil` and `CrashlyticsUtil` migrate to injection version. ([f633fae8](https://github.com/abc873693/ap_common/commit/f633fae8d102d32624e23acad2c00c06c27b4dde)) + +#### `ap_common_firebase` - `v0.17.0-dev.2` + + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + - **FEAT**: `AnalyticsUtil` and `CrashlyticsUtil` migrate to injection version. ([f633fae8](https://github.com/abc873693/ap_common/commit/f633fae8d102d32624e23acad2c00c06c27b4dde)) + +#### `ap_common_flutter_core` - `v0.0.2+1` + + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + +#### `ap_common_flutter_platform` - `v0.0.2+1` + + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + +#### `ap_common_flutter_ui` - `v0.0.2+1` + + - **FIX**: `ApAssets` path error. ([c70fdd2d](https://github.com/abc873693/ap_common/commit/c70fdd2dd9b470215f3d28d79197fc1b427397ef)) + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + +#### `ap_common_plugin` - `v0.5.0-dev.1` + + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + + ## 2024-10-11 ### Changes diff --git a/apps/example/pubspec.yaml b/apps/example/pubspec.yaml index c4f9e649..63fba60d 100644 --- a/apps/example/pubspec.yaml +++ b/apps/example/pubspec.yaml @@ -23,7 +23,7 @@ dependencies: sprintf: any multiple_localization: any - ap_common_plugin: 0.5.0-dev.0 + ap_common_plugin: 0.5.0-dev.1 # path: ../../../GitHub/ap_common_plugin dependency_overrides: diff --git a/packages/ap_common/CHANGELOG.md b/packages/ap_common/CHANGELOG.md index a9de4a0b..8cab33da 100644 --- a/packages/ap_common/CHANGELOG.md +++ b/packages/ap_common/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.26.0-dev.2 + + - Update a dependency to the latest release. + ## 0.26.0-dev.1 - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) diff --git a/packages/ap_common/pubspec.yaml b/packages/ap_common/pubspec.yaml index 9dec4305..5552f392 100644 --- a/packages/ap_common/pubspec.yaml +++ b/packages/ap_common/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common description: The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app -version: 0.26.0-dev.1 +version: 0.26.0-dev.2 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common @@ -13,9 +13,9 @@ dependencies: flutter_localizations: sdk: flutter - ap_common_flutter_ui: ^0.0.2 - ap_common_flutter_platform: ^0.0.2 - ap_common_announcement_ui: ^0.0.2 + ap_common_flutter_ui: ^0.0.2+1 + ap_common_flutter_platform: ^0.0.2+1 + ap_common_announcement_ui: ^0.0.2+1 #dependency_overrides: # ap_common_core: diff --git a/packages/ap_common_announcement_ui/CHANGELOG.md b/packages/ap_common_announcement_ui/CHANGELOG.md index b0941522..9f5f36a0 100644 --- a/packages/ap_common_announcement_ui/CHANGELOG.md +++ b/packages/ap_common_announcement_ui/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.0.2+1 + + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + ## 0.0.2 - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) diff --git a/packages/ap_common_announcement_ui/pubspec.yaml b/packages/ap_common_announcement_ui/pubspec.yaml index e737e895..2c243539 100644 --- a/packages/ap_common_announcement_ui/pubspec.yaml +++ b/packages/ap_common_announcement_ui/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_announcement_ui description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" -version: 0.0.2 +version: 0.0.2+1 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_announcement_ui @@ -12,8 +12,8 @@ environment: dependencies: flutter: sdk: flutter - ap_common_flutter_core: ^0.0.2 - ap_common_flutter_ui: ^0.0.2 + ap_common_flutter_core: ^0.0.2+1 + ap_common_flutter_ui: ^0.0.2+1 # Dart Packages path: ^1.9.0 dio_cookie_manager: ^3.1.1 diff --git a/packages/ap_common_core/CHANGELOG.md b/packages/ap_common_core/CHANGELOG.md index e578e9ec..d6bf9a59 100644 --- a/packages/ap_common_core/CHANGELOG.md +++ b/packages/ap_common_core/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.0.4 + + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FEAT**: `AnalyticsUtil` and `CrashlyticsUtil` migrate to injection version. ([f633fae8](https://github.com/abc873693/ap_common/commit/f633fae8d102d32624e23acad2c00c06c27b4dde)) + ## 0.0.3 - **FIX**: `ap_common_core` separate static error. ([629ba29d](https://github.com/abc873693/ap_common/commit/629ba29d7d0aa59270eec1da45e49daebe3bf8b5)) diff --git a/packages/ap_common_core/pubspec.yaml b/packages/ap_common_core/pubspec.yaml index 78dd63ce..cbac639e 100644 --- a/packages/ap_common_core/pubspec.yaml +++ b/packages/ap_common_core/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_core description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" -version: 0.0.3 +version: 0.0.4 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_core diff --git a/packages/ap_common_firebase/CHANGELOG.md b/packages/ap_common_firebase/CHANGELOG.md index 7995d117..cd262fd8 100644 --- a/packages/ap_common_firebase/CHANGELOG.md +++ b/packages/ap_common_firebase/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.17.0-dev.2 + + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + - **FEAT**: `AnalyticsUtil` and `CrashlyticsUtil` migrate to injection version. ([f633fae8](https://github.com/abc873693/ap_common/commit/f633fae8d102d32624e23acad2c00c06c27b4dde)) + ## 0.17.0-dev.1 - Update a dependency to the latest release. diff --git a/packages/ap_common_firebase/pubspec.yaml b/packages/ap_common_firebase/pubspec.yaml index 82259ad6..f0f47e3c 100644 --- a/packages/ap_common_firebase/pubspec.yaml +++ b/packages/ap_common_firebase/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_firebase description: ap_common for firebase instructure -version: 0.17.0-dev.1 +version: 0.17.0-dev.2 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_firebase @@ -12,7 +12,7 @@ dependencies: flutter: sdk: flutter - ap_common_flutter_core: ^0.0.2 + ap_common_flutter_core: ^0.0.2+1 # path: ../../GitHub-NKUST-ITC/ap_common url_launcher: ^6.1.0 #firebase must use particular version diff --git a/packages/ap_common_flutter_core/CHANGELOG.md b/packages/ap_common_flutter_core/CHANGELOG.md index d6d428fd..e0fa3454 100644 --- a/packages/ap_common_flutter_core/CHANGELOG.md +++ b/packages/ap_common_flutter_core/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.0.2+1 + + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + ## 0.0.2 - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) diff --git a/packages/ap_common_flutter_core/pubspec.yaml b/packages/ap_common_flutter_core/pubspec.yaml index 4e6511b4..1b621b1b 100644 --- a/packages/ap_common_flutter_core/pubspec.yaml +++ b/packages/ap_common_flutter_core/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_flutter_core description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" -version: 0.0.2 +version: 0.0.2+1 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_flutter_core @@ -12,7 +12,7 @@ environment: dependencies: flutter: sdk: flutter - ap_common_core: ^0.0.3 + ap_common_core: ^0.0.4 dio: ^5.7.0 intl: ">=0.16.0 <1.0.0" multiple_localization: ^0.5.0 diff --git a/packages/ap_common_flutter_platform/CHANGELOG.md b/packages/ap_common_flutter_platform/CHANGELOG.md index 6566400a..a861a0bd 100644 --- a/packages/ap_common_flutter_platform/CHANGELOG.md +++ b/packages/ap_common_flutter_platform/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.0.2+1 + + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + ## 0.0.2 - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) diff --git a/packages/ap_common_flutter_platform/pubspec.yaml b/packages/ap_common_flutter_platform/pubspec.yaml index d73e4a74..9cb3e84b 100644 --- a/packages/ap_common_flutter_platform/pubspec.yaml +++ b/packages/ap_common_flutter_platform/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_flutter_platform description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" -version: 0.0.2 +version: 0.0.2+1 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_flutter_platform @@ -11,7 +11,7 @@ environment: dependencies: flutter: sdk: flutter - ap_common_flutter_core: ^0.0.2 + ap_common_flutter_core: ^0.0.2+1 # Dart Package encrypt: ^5.0.1 diff --git a/packages/ap_common_flutter_ui/CHANGELOG.md b/packages/ap_common_flutter_ui/CHANGELOG.md index b0941522..a7899caf 100644 --- a/packages/ap_common_flutter_ui/CHANGELOG.md +++ b/packages/ap_common_flutter_ui/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.0.2+1 + + - **FIX**: `ApAssets` path error. ([c70fdd2d](https://github.com/abc873693/ap_common/commit/c70fdd2dd9b470215f3d28d79197fc1b427397ef)) + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + ## 0.0.2 - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) diff --git a/packages/ap_common_flutter_ui/pubspec.yaml b/packages/ap_common_flutter_ui/pubspec.yaml index 7fc9d25b..689614f3 100644 --- a/packages/ap_common_flutter_ui/pubspec.yaml +++ b/packages/ap_common_flutter_ui/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_flutter_ui description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" -version: 0.0.2 +version: 0.0.2+1 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_flutter_ui @@ -11,7 +11,7 @@ environment: dependencies: flutter: sdk: flutter - ap_common_flutter_core: ^0.0.2 + ap_common_flutter_core: ^0.0.2+1 # Dart Package sprintf: ^7.0.0 # Flutter UI Package diff --git a/packages/ap_common_plugin/CHANGELOG.md b/packages/ap_common_plugin/CHANGELOG.md index cb98eb50..6a4f92ab 100644 --- a/packages/ap_common_plugin/CHANGELOG.md +++ b/packages/ap_common_plugin/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.5.0-dev.1 + + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + ## 0.5.0-dev.0 - **FEAT**: centralized package lint rule. ([08db9e1f](https://github.com/abc873693/ap_common/commit/08db9e1f00118f11ef389b194585626d7c51c3ab)) diff --git a/packages/ap_common_plugin/pubspec.yaml b/packages/ap_common_plugin/pubspec.yaml index 4b5c8df0..e6172be2 100644 --- a/packages/ap_common_plugin/pubspec.yaml +++ b/packages/ap_common_plugin/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_plugin description: ap_common Native Plugin -version: 0.5.0-dev.0 +version: 0.5.0-dev.1 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_plugin From a7ffaeb07914c1d1fbe32919cce95c5708843230 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Sat, 12 Oct 2024 15:50:28 +0800 Subject: [PATCH 33/41] fix: remove useless implement instance --- .../lib/src/utils/firebase_analytics_utils.dart | 17 +++++------------ .../src/utils/firebase_crashlytics_utils.dart | 7 ------- .../lib/src/utils/firebase_message_utils.dart | 3 +-- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/packages/ap_common_firebase/lib/src/utils/firebase_analytics_utils.dart b/packages/ap_common_firebase/lib/src/utils/firebase_analytics_utils.dart index 6a42195d..b5dd4c5f 100644 --- a/packages/ap_common_firebase/lib/src/utils/firebase_analytics_utils.dart +++ b/packages/ap_common_firebase/lib/src/utils/firebase_analytics_utils.dart @@ -14,16 +14,9 @@ class FirebaseAnalyticsUtils extends AnalyticsUtil { if (isSupported) analytics = FirebaseAnalytics.instance; } - static FirebaseAnalyticsUtils? _instance; - static bool get isSupported => kIsWeb || Platform.isAndroid || Platform.isIOS || Platform.isMacOS; - //ignore: prefer_constructors_over_static_methods - static FirebaseAnalyticsUtils get instance { - return _instance ??= FirebaseAnalyticsUtils(); - } - FirebaseAnalytics? analytics; @override @@ -76,20 +69,20 @@ class FirebaseAnalyticsUtils extends AnalyticsUtil { AnalyticsConstants.department: userInfo.department, }, ); - FirebaseAnalyticsUtils.instance.setUserProperty( + AnalyticsUtil.instance.setUserProperty( AnalyticsConstants.department, - userInfo.department, + userInfo.department!, ); } if (userInfo.className != null && userInfo.className!.isNotEmpty) { - FirebaseAnalyticsUtils.instance.setUserProperty( + AnalyticsUtil.instance.setUserProperty( AnalyticsConstants.className, - userInfo.className, + userInfo.className!, ); } if (userInfo.id.isNotEmpty) { await analytics?.setUserId(id: userInfo.id); - FirebaseAnalyticsUtils.instance.setUserProperty( + AnalyticsUtil.instance.setUserProperty( AnalyticsConstants.studentId, userInfo.id, ); diff --git a/packages/ap_common_firebase/lib/src/utils/firebase_crashlytics_utils.dart b/packages/ap_common_firebase/lib/src/utils/firebase_crashlytics_utils.dart index 880415ca..9f18063d 100644 --- a/packages/ap_common_firebase/lib/src/utils/firebase_crashlytics_utils.dart +++ b/packages/ap_common_firebase/lib/src/utils/firebase_crashlytics_utils.dart @@ -13,13 +13,6 @@ class FirebaseCrashlyticsUtils extends CrashlyticsUtil { if (isSupported) crashlytics = FirebaseCrashlytics.instance; } - static FirebaseCrashlyticsUtils? _instance; - - //ignore: prefer_constructors_over_static_methods - static FirebaseCrashlyticsUtils get instance { - return _instance ??= FirebaseCrashlyticsUtils(); - } - static bool get isSupported => !kIsWeb && (Platform.isAndroid || Platform.isIOS || Platform.isMacOS); diff --git a/packages/ap_common_firebase/lib/src/utils/firebase_message_utils.dart b/packages/ap_common_firebase/lib/src/utils/firebase_message_utils.dart index c71c050b..313eb1df 100644 --- a/packages/ap_common_firebase/lib/src/utils/firebase_message_utils.dart +++ b/packages/ap_common_firebase/lib/src/utils/firebase_message_utils.dart @@ -1,7 +1,6 @@ import 'dart:developer'; import 'dart:io'; -import 'package:ap_common_firebase/src/utils/firebase_analytics_utils.dart'; import 'package:ap_common_firebase/src/utils/firebase_utils.dart'; import 'package:ap_common_flutter_core/ap_common_flutter_core.dart'; import 'package:flutter/foundation.dart'; @@ -86,7 +85,7 @@ class FirebaseMessagingUtils { log('Push Messaging token: $token', name: 'firebase'); } }); - FirebaseAnalyticsUtils.instance.setUserProperty( + AnalyticsUtil.instance.setUserProperty( AnalyticsConstants.hasEnableNotification, (value?.authorizationStatus == AuthorizationStatus.authorized) .toString(), From a8a60fb4135cb5236ccb2004680a7c8b410f8b73 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Sat, 12 Oct 2024 15:53:55 +0800 Subject: [PATCH 34/41] chore(release): publish packages - ap_common_firebase@0.17.0-dev.3 --- CHANGELOG.md | 21 +++++++++++++++++++++ packages/ap_common_firebase/CHANGELOG.md | 4 ++++ packages/ap_common_firebase/pubspec.yaml | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 070d4bde..7d9266d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,27 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## 2024-10-12 + +### Changes + +--- + +Packages with breaking changes: + + - There are no breaking changes in this release. + +Packages with other changes: + + - [`ap_common_firebase` - `v0.17.0-dev.3`](#ap_common_firebase---v0170-dev3) + +--- + +#### `ap_common_firebase` - `v0.17.0-dev.3` + + - **FIX**: remove useless implement instance. ([3ec164dd](https://github.com/abc873693/ap_common/commit/3ec164dd62590e684855128da1052cae34705bbb)) + + ## 2024-10-12 ### Changes diff --git a/packages/ap_common_firebase/CHANGELOG.md b/packages/ap_common_firebase/CHANGELOG.md index cd262fd8..4aef0491 100644 --- a/packages/ap_common_firebase/CHANGELOG.md +++ b/packages/ap_common_firebase/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.17.0-dev.3 + + - **FIX**: remove useless implement instance. ([3ec164dd](https://github.com/abc873693/ap_common/commit/3ec164dd62590e684855128da1052cae34705bbb)) + ## 0.17.0-dev.2 - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) diff --git a/packages/ap_common_firebase/pubspec.yaml b/packages/ap_common_firebase/pubspec.yaml index f0f47e3c..8677bb62 100644 --- a/packages/ap_common_firebase/pubspec.yaml +++ b/packages/ap_common_firebase/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_firebase description: ap_common for firebase instructure -version: 0.17.0-dev.2 +version: 0.17.0-dev.3 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_firebase From 4ecabc12137907f5c61e3e2c9ace5a6927c7c609 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Sat, 12 Oct 2024 15:55:12 +0800 Subject: [PATCH 35/41] chore: melos version ignore fetch tags --- melos.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/melos.yaml b/melos.yaml index f6f4b92e..4f1d1c29 100644 --- a/melos.yaml +++ b/melos.yaml @@ -7,6 +7,7 @@ packages: command: version: + fetchTags: false # Generate commit links in package changelogs. linkToCommits: true # # Only allow versioning to happen on main branch. From b0780c83aaaa999b82c6c3e0ed2190374958ed71 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Sun, 13 Oct 2024 13:31:20 +0800 Subject: [PATCH 36/41] docs: v0.26 get started document --- website/docs/installation/overview.mdx | 94 +++++++++++++++++++++++--- 1 file changed, 83 insertions(+), 11 deletions(-) diff --git a/website/docs/installation/overview.mdx b/website/docs/installation/overview.mdx index 9026e2a6..1c583bd9 100644 --- a/website/docs/installation/overview.mdx +++ b/website/docs/installation/overview.mdx @@ -8,20 +8,92 @@ sidebar_position: 1 ## 事前準備 - - [Flutter v3.13 以後](https://flutter.dev/docs/get-started/install) 並建立專案 + - [Flutter v3.22 以後](https://flutter.dev/docs/get-started/install) 並建立專案 -## 安裝流程 +## 安裝流程 -在 `pubspec.yaml` 中加入 package +### 確認你需要的範圍 -```yaml title="pubspec.yaml" - # 官方多國語套件 -dependencies: - flutter_localizations: - sdk: flutter - ap_common: ^0.25.0 +在 `v0.26` 以後套件依據程式語言 Dart、框架 Flutter 及作業系統原生套件整合將套件拆成以下圖 + +```mermaid +flowchart TD + ap_common[ap_common] --- ap_common_flutter_ui[ap_common_flutter_ui] --- ap_common_flutter_core + + ap_common --- ap_common_flutter_platform[ap_common_flutter_platform] --- ap_common_flutter_core + + ap_common --- ap_common_announcement_ui[ap_common_announcement_ui] --- ap_common_flutter_core + + ap_common_firebase --- ap_common_flutter_core + + ap_common_plugin --- ap_common_flutter_core + + ap_common_flutter_core -- Dart Level --> ap_common_core + ``` +可能會有哪些使用情境 + +1. 使用套件所有功能 + + 可直接使用 `ap_common`,在 `pubspec.yaml` 中加入 package + + ```yaml title="pubspec.yaml" + # 官方多國語套件 + dependencies: + flutter_localizations: + sdk: flutter + ap_common: ^0.26.0 + ``` + + 在檔案中加入 main.dart `registerOneForAll();` + + ```dart title="main.dart" + void main() async { + WidgetsFlutterBinding.ensureInitialized(); + /// Register all ap_common injection util + registerOneForAll(); + + runApp(MyApp()); + } + ``` + +2. 如果你只需要此只需要 UI,不希望整合過多原生作業系統套件,則 + + 在 `pubspec.yaml` 中加入 package + + ```yaml title="pubspec.yaml" + # 官方多國語套件 + dependencies: + flutter_localizations: + sdk: flutter + ap_common_flutter_core: ^0.1.0 + ap_common_flutter_ui: ^0.1.0 + ``` + + 因沒使用套件 `ap_common_flutter_platorm`,每個此用到的介面會有特定 Util 類別需要實作,以 `CourseScaffold` 來說,就需要實作 `NotificationUtil` 及 `PlatformCalendarUtil`,並在 `main.dart` 註冊你使用的實作: + + ```dart title="main.dart" + void main() async { + WidgetsFlutterBinding.ensureInitialized(); + + registerApCommonFlutter({ + ui: YourUiUtil(), + platform: YourPlatformUtil(), + media: YourMediaUtil(), + platformCalendar: YourPlatformCalendarUtil(), + notification: YourNotificationUtil(), + appStore: YourAppStoreUtil(), + }); + + registerApCommonCore( + preference: YourPreferenceUtil(), + ); + + runApp(MyApp()); + } + ``` + 執行取得套件 ```bash @@ -39,10 +111,10 @@ dependencies: git clone https://github.com/abc873693/ap_common/ ``` -切換目錄至 [`exmaple`](https://github.com/abc873693/ap_common/example) +切換目錄至 [`exmaple`](https://github.com/abc873693/ap_common/apps/example) ```bash - cd example + cd apps/example/ ``` 並執行 From 0acaa295bcb9637268066137b2735854c530d520 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Sun, 13 Oct 2024 21:46:26 +0800 Subject: [PATCH 37/41] docs: package separate description --- website/docs/api-utils/analytics-utils.mdx | 77 +++++------ website/docs/api-utils/app-store-util.mdx | 39 ++++++ website/docs/api-utils/app-tracking-utils.mdx | 30 ---- website/docs/api-utils/crashlytics-utils.mdx | 43 +++--- website/docs/api-utils/media-util.mdx | 40 ++++++ website/docs/api-utils/notification-utils.mdx | 113 +++++++-------- website/docs/api-utils/platform-util.mdx | 62 +++++++++ website/docs/api-utils/preference-utils.mdx | 28 ++-- website/docs/api-utils/ui-util.mdx | 24 ++++ website/docs/api-utils/utils.mdx | 130 +++--------------- website/docs/api-views/phone-list-view.mdx | 2 +- .../app-tracking-transparency.mdx | 2 +- .../export-course-table-image.mdx | 2 +- .../docs/installation/local-notification.mdx | 2 +- website/docs/installation/overview.mdx | 82 +++++------ .../docs/installation/shared-preferences.mdx | 26 +++- website/static/img/package-architecture.png | Bin 0 -> 62344 bytes 17 files changed, 361 insertions(+), 341 deletions(-) create mode 100644 website/docs/api-utils/app-store-util.mdx delete mode 100644 website/docs/api-utils/app-tracking-utils.mdx create mode 100644 website/docs/api-utils/media-util.mdx create mode 100644 website/docs/api-utils/platform-util.mdx create mode 100644 website/docs/api-utils/ui-util.mdx create mode 100644 website/static/img/package-architecture.png diff --git a/website/docs/api-utils/analytics-utils.mdx b/website/docs/api-utils/analytics-utils.mdx index 3779019c..48ddd08a 100644 --- a/website/docs/api-utils/analytics-utils.mdx +++ b/website/docs/api-utils/analytics-utils.mdx @@ -2,94 +2,85 @@ sidebar_position: 6 --- -# AnalyticsUtils +# AnalyticsUtil -部份元件會使用此紀錄一些事件 +:::info 實作類別 +目前可使用的實作類別有 `FirebaseAnalyticsUtil` -抽象類別,由套件實現功能實作,必須繼承此類別將類別的單例(single instance)設定給 `AnalyticsUtils.instance` +必需透過套件 [`ap_common_firebase`](https://github.com/abc873693/ap_common_firebase/blob/master/lib/utils/firebase_analytics_utils.dart) +使用 +::: -可參考套件 [`ap_common_firebase`](https://github.com/abc873693/ap_common_firebase/blob/master/lib/utils/firebase_analytics_utils.dart) 實作 +需透過 `registerApCommonService()` 指定成實例 -```dart title='firebase_analytics_utils.dart' -class FirebaseAnalyticsUtils extends AnalyticsUtils { - static FirebaseAnalyticsUtils? _instance; - - static FirebaseAnalyticsUtils get instance { - return _instance ??= FirebaseAnalyticsUtils(); - } - - FirebaseAnalyticsUtils() { - AnalyticsUtils.instance = _instance; - } -} -``` +部份 `ap_common_flutter_ui` 元件會透過此自動紀錄一些事件,並透過 `AnalyticsUtil.instance` 使用 ## setCurrentScreen -設定目前畫面 +紀錄目前畫面 -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| screenName | `String` | 畫面名稱 | +| 參數名稱 | 型態 | 描述 | +|---------------------|----------|--------| +| screenName | `String` | 畫面名稱 | | screenClassOverride | `String` | 畫面所屬類別 | ## setUserId 設定使用者編號 -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| id | `String` | 使用者唯一編號 | +| 參數名稱 | 型態 | 描述 | +|------|----------|---------| +| id | `String` | 使用者唯一編號 | ## setUserProperty 設定使用者的屬性 -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| name | `String` | 屬性名稱 | +| 參數名稱 | 型態 | 描述 | +|-------|----------|------| +| name | `String` | 屬性名稱 | | value | `String` | 屬性內容 | ## logUserInfo 紀錄使用者資訊 -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | +| 參數名稱 | 型態 | 描述 | +|----------|---------------------------------------|-------| | UserInfo | [`UserInfo`](../api-models/user-info) | 使用者資訊 | ## logEvent 紀錄事件 -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| name | `String` | 事件名稱 | +| 參數名稱 | 型態 | 描述 | +|------------|------------------------|------| +| name | `String` | 事件名稱 | | parameters | `Map` | 相關參數 | ## logApiEvent 紀錄 API 事件 -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| type | `String` | 類型 | -| status | `int` | 狀態碼,一般為 HTTP Status Code | -| message | `String` | 訊息 | +| 參數名稱 | 型態 | 描述 | +|---------|----------|--------------------------| +| type | `String` | 類型 | +| status | `int` | 狀態碼,一般為 HTTP Status Code | +| message | `String` | 訊息 | ## logTimeEvent 紀錄時間事件 -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| name | `String` | 事件名稱 | -| seconds | `double` | 秒數 | +| 參數名稱 | 型態 | 描述 | +|---------|----------|------| +| name | `String` | 事件名稱 | +| seconds | `double` | 秒數 | ## logThemeEvent 紀錄事件 -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | +| 參數名稱 | 型態 | 描述 | +|-----------|-------------|----------------------------| | themeMode | `ThemeMode` | 主題使用 Flutter 的 `ThemeMode` | \ No newline at end of file diff --git a/website/docs/api-utils/app-store-util.mdx b/website/docs/api-utils/app-store-util.mdx new file mode 100644 index 00000000..785941bb --- /dev/null +++ b/website/docs/api-utils/app-store-util.mdx @@ -0,0 +1,39 @@ +--- +sidebar_position: 9 +--- + +# ApAppStoreUtil + +:::info 實作類別 +此為 `AppStoreUtil` 的實作類別 +::: + +:::caution 注意 +使用時必須先完成 [相關設定](../installation/app-tracking-transparency) +::: + +提供顯示 App 與平台商店(Play Store / App Store)相關權限或功能的 API + +## isAppTrackingApiSupported + +目前實作有關的只有 Apple 平台的 `App Tracking API`,只僅於 iOS 14 以上會回傳 `true` +,其餘平台皆為 `false` + +## trackingAuthorizationStatus + +封裝套件 [`app_tracking_transparency`](https://developer.apple.com/documentation/apptrackingtransparency) +的變數`trackingAuthorizationStatus` 會轉換成通用的 `GeneralPermissionStatus` + +## openAppReview + +開啟原生評分功能,若無原生API則開啟 `defaultUrl` +,以 [in_app_review](https://pub.dev/packages/in_app_review) 呼叫原生評分 API,支援 `Android`、`iOS` +及 `macOS`,其他平台會透過 `PlatformUtil.instance.launchUrl(url)` 開啟連結 + +| 參數名稱 | 型態 | 描述 | +|------------|----------|-------------| +| defaultUrl | `String` | 無原生API則開啟網址 | + +## requestTrackingAuthorization + +目前實作有關的只有 Apple 平台的 `App Tracking API`,開啟原生授權隱私權追蹤的授權 diff --git a/website/docs/api-utils/app-tracking-utils.mdx b/website/docs/api-utils/app-tracking-utils.mdx deleted file mode 100644 index f969cfb4..00000000 --- a/website/docs/api-utils/app-tracking-utils.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -sidebar_position: 9 ---- - -# AppTrackingUtils - -:::caution 注意 -使用時必須先完成 [相關設定](../installation/app-tracking-transparency) -::: - -提供顯示 App 透明度追蹤的對話框說明 - -## isSupportAppTrackingApi - -是否支援 `App Tracking API`,目前只僅於 iOS 14 以上會回傳 `true`,其餘平台皆為 `false` - -## trackingAuthorizationStatus - -封裝套件 [`App_tracking_transparency`](https://developer.apple.com/documentation/apptrackingtransparency) 的變數`trackingAuthorizationStatus` - -## show - -## show - -立即顯示通知 - -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| context | `BuildContext` | Flutter Widget context | -| onTap | `VoidCallback` | 當為 `null` 時會使用已實作的 `AppTrackingTransparency`,若不為 `null` 則需要自行實作 | \ No newline at end of file diff --git a/website/docs/api-utils/crashlytics-utils.mdx b/website/docs/api-utils/crashlytics-utils.mdx index 0735f4ad..a86c317c 100644 --- a/website/docs/api-utils/crashlytics-utils.mdx +++ b/website/docs/api-utils/crashlytics-utils.mdx @@ -2,44 +2,35 @@ sidebar_position: 7 --- -# CrashlyticsUtils +# CrashlyticsUtil -部分元件的崩潰或是發生錯誤會透過此類別紀錄 - -抽象類別,由套件實現功能實作,必須繼承此類別將類別的單例(single instance)設定給 `CrashlyticsUtils.instance` +:::info 實作類別 +目前可使用的實作類別有 `FirebaseCrashlyticsUtil` -可參考套件 [`ap_common_firebase`](https://github.com/abc873693/ap_common_firebase/blob/master/lib/utils/firebase_crashlytics_utils.dart) 實作 +必需透過套件 [`ap_common_firebase`](https://github.com/abc873693/ap_common_firebase/blob/master/lib/utils/firebase_analytics_utils.dart) +使用 +::: -```dart title='firebase_analytics_utils.dart' -class FirebaseCrashlyticsUtils extends CrashlyticsUtils { - static FirebaseCrashlyticsUtils? _instance; - - static FirebaseCrashlyticsUtils get instance { - return _instance ??= FirebaseCrashlyticsUtils(); - } +部分元件的崩潰或是發生錯誤會透過此類別紀錄 - FirebaseCrashlyticsUtils() { - CrashlyticsUtils.instance = _instance; - } -} -``` +需透過 `registerApCommonService()` 指定成實例 ## recordError 紀錄錯誤 -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| exception | `dynamic` | 例外事件物件 | -| stack | `StackTrace` | 函式堆疊紀錄 | -| reason | `dynamic` | 原因 | -| information | `Iterable` | 資訊 | -| printDetails | `bool` | 是否列印細節 | +| 參數名稱 | 型態 | 描述 | +|--------------|-----------------------------|--------| +| exception | `dynamic` | 例外事件物件 | +| stack | `StackTrace` | 函式堆疊紀錄 | +| reason | `dynamic` | 原因 | +| information | `Iterable` | 資訊 | +| printDetails | `bool` | 是否列印細節 | ## log 事件紀錄 -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | +| 參數名稱 | 型態 | 描述 | +|------|----------|----| | name | `String` | 名稱 | \ No newline at end of file diff --git a/website/docs/api-utils/media-util.mdx b/website/docs/api-utils/media-util.mdx new file mode 100644 index 00000000..86fdc367 --- /dev/null +++ b/website/docs/api-utils/media-util.mdx @@ -0,0 +1,40 @@ +--- +sidebar_position: 9 +--- + +# MediaUtil + +:::info 實作類別 +目前可使用的實作類別有 `ApMediaUtil` + +必需透過套件 [`ap_common_flutter_platform`](https://pub.dev/packages/ap_common_flutter_platform) +使用 +::: + +需透過 `registerApCommonFlutter()` 指定成實例,並透過 `MediaUtil.instance` 使用 + +## pickImage + +挑選照片/圖片,`Android`/`iOS`/`Web` 使用 [image_picker](https://pub.dev/packages/image_picker) +實作,`macOS`/`Windows`/`Linux` 使用 [file_selector](https://pub.dev/packages/file_selector) 實作, + +| 參數名稱 | 型態 | 描述 | +|-----------------------|-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------| +| imageSource | `ImageSource` | 圖片來源,平台為 `Android`/`iOS`/`Web` 有效,`ImageSource.gallery` 代表使用相簿取得,`ImageSource.camera` 代表使用鏡頭拍攝 | +| preferredCameraDevice | `CameraDevice` | 鏡頭來源,需 `imageSource` 設定 `ImageSource.camera`才有效,平台為 `Android`/`iOS`/`Web` 有效,`CameraDevice.front` 代表前鏡頭,`CameraDevice.rear` 代表後鏡頭,預設值為 `CameraDevice.front` | +| extensions | `List?` | 限制副檔名,平台為 `macOS`/`Windows`/`Linux` 有效,預設值為 `['jpg', 'jpeg']` | + +## saveImage + +`Android` 與 `iOS` 使用 [`photo_manager`](https://pub.dev/packages/photo_manager) 實作 + +`macOS`/`Windows`/`Linux` 使用 [`path_provider`](https://pub.dev/packages/photo_manager) + +實作細節可參考原專案 + +| 參數名稱 | 型態 | 描述 | +|----------------|----------------|------------------------| +| context | `BuildContext` | Flutter Widget context | +| byteData | `ByteData` | 影像的位元組資料 | +| fileName | `String` | 檔案名稱 | +| successMessage | `String` | 儲存成功訊息 | \ No newline at end of file diff --git a/website/docs/api-utils/notification-utils.mdx b/website/docs/api-utils/notification-utils.mdx index 558aac8c..a185ddfa 100644 --- a/website/docs/api-utils/notification-utils.mdx +++ b/website/docs/api-utils/notification-utils.mdx @@ -2,93 +2,98 @@ sidebar_position: 3 --- -# Notification 工具 +# NotificationUtil -封裝 [`flutter_local_notification`](https://pub.dev/packages/flutter_local_notifications) 細節可參考原專案 +:::info 實作類別 +目前可使用的實作類別有 `ApNotificationUtil` + +必需透過套件 [`ap_common_flutter_platform`](https://pub.dev/packages/ap_common_flutter_platform),為套件 [`flutter_local_notification`](https://pub.dev/packages/flutter_local_notifications) 的封裝細節可參考原專案, -:::caution 注意 使用時必須先完成 [相關設定](../installation/local-notification) ::: -## show +本地通知顯示,通常是作業系統的彈跳視窗或通知 + +需透過 `registerApCommonFlutter()` 指定成實例 + + +## show 立即顯示通知 -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| id | `int` | 區分通知的編號 | -| androidChannelId | `String` | Android 通知頻道 Id,可參考 [文件](https://developer.android.com/training/notify-user/channels) | -| androidChannelDescription | `String` | Android 通知頻道名稱,可參考 [文件](https://developer.android.com/training/notify-user/channels) | -| title | `String` | 通知標題 | -| content | `String` | 通知內容 | -| enableVibration | `bool` | 是否開啟震動,預設為 `true` | -| androidResourceIcon | `String` | Android 通知圖示,使用原生資源檔路徑,預設為讀取 `@drawable/ic_stat_name` | -| settings | `InitializationSettings` | 通知初始設定 | -| onSelectNotification | `VoidCallback` | 當點擊通知的事件 | +| 參數名稱 | 型態 | 描述 | +|---------------------------|--------------------------|---------------------------------------------------------------------------------------| +| id | `int` | 區分通知的編號 | +| androidChannelId | `String` | Android 通知頻道 Id,可參考 [文件](https://developer.android.com/training/notify-user/channels) | +| androidChannelDescription | `String` | Android 通知頻道名稱,可參考 [文件](https://developer.android.com/training/notify-user/channels) | +| title | `String` | 通知標題 | +| content | `String` | 通知內容 | +| enableVibration | `bool` | 是否開啟震動,預設為 `true` | +| androidResourceIcon | `String` | Android 通知圖示,使用原生資源檔路徑,預設為讀取 `@drawable/ic_stat_name` | +| settings | `InitializationSettings` | 通知初始設定 | +| onSelectNotification | `VoidCallback` | 當點擊通知的事件 | -## scheduleWeeklyNotify +## scheduleWeeklyNotify 於每週固定時間通知 -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| id | `int` | 區分通知的編號 | -| androidChannelId | `String` | Android 通知頻道 Id,可參考 [文件](https://developer.android.com/training/notify-user/channels) | -| androidChannelDescription | `String` | Android 通知頻道名稱,可參考 [文件](https://developer.android.com/training/notify-user/channels) | -| day | `Day` | 每週的星期幾 | -| time | `Time` | 時間 | -| title | `String` | 通知標題 | -| content | `String` | 通知內容 | - -| androidResourceIcon | `String` | Android 通知圖示,使用原生資源檔路徑,預設為讀取 `@drawable/ic_stat_name` | -| settings | `InitializationSettings` | 通知初始設定 | -| onSelectNotification | `VoidCallback` | 當點擊通知的事件 | - -## schedule +| 參數名稱 | 型態 | 描述 | +|---------------------------|--------------------------|---------------------------------------------------------------------------------------| +| id | `int` | 區分通知的編號 | +| androidChannelId | `String` | Android 通知頻道 Id,可參考 [文件](https://developer.android.com/training/notify-user/channels) | +| androidChannelDescription | `String` | Android 通知頻道名稱,可參考 [文件](https://developer.android.com/training/notify-user/channels) | +| day | `Day` | 每週的星期幾 | +| time | `Time` | 時間 | +| title | `String` | 通知標題 | +| content | `String` | 通知內容 | +| androidResourceIcon | `String` | Android 通知圖示,使用原生資源檔路徑,預設為讀取 `@drawable/ic_stat_name` | +| settings | `InitializationSettings` | 通知初始設定 | +| onSelectNotification | `VoidCallback` | 當點擊通知的事件 | + +## schedule 於特定的時間通知 -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| id | `int` | 區分通知的編號 | -| androidChannelId | `String` | Android 通知頻道 Id,可參考 [文件](https://developer.android.com/training/notify-user/channels) | -| androidChannelDescription | `String` | Android 通知頻道名稱,可參考 [文件](https://developer.android.com/training/notify-user/channels) | -| dateTime | `DateTime` | 日期與時間 | -| title | `String` | 通知標題 | -| content | `String` | 通知內容 | - -| androidResourceIcon | `String` | Android 通知圖示,使用原生資源檔路徑,預設為讀取 `@drawable/ic_stat_name` | -| settings | `InitializationSettings` | 通知初始設定 | -| onSelectNotification | `VoidCallback` | 當點擊通知的事件 | +| 參數名稱 | 型態 | 描述 | +|---------------------------|--------------------------|---------------------------------------------------------------------------------------| +| id | `int` | 區分通知的編號 | +| androidChannelId | `String` | Android 通知頻道 Id,可參考 [文件](https://developer.android.com/training/notify-user/channels) | +| androidChannelDescription | `String` | Android 通知頻道名稱,可參考 [文件](https://developer.android.com/training/notify-user/channels) | +| dateTime | `DateTime` | 日期與時間 | +| title | `String` | 通知標題 | +| content | `String` | 通知內容 | +| androidResourceIcon | `String` | Android 通知圖示,使用原生資源檔路徑,預設為讀取 `@drawable/ic_stat_name` | +| settings | `InitializationSettings` | 通知初始設定 | +| onSelectNotification | `VoidCallback` | 當點擊通知的事件 | ## requestPermissions 要求系統權限,若成功取得權限則回傳 `true`,若該系統無相關權限回傳 `null` -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| sound | `bool` | 是否要求開啟聲音,預設為 `true`,僅限 `iOS`、`macOS` 有效 | -| alert | `bool` | 是否要求彈出,預設為 `true`,僅限 `iOS`、`macOS` 有效 | +| 參數名稱 | 型態 | 描述 | +|-------|--------|------------------------------------------------| +| sound | `bool` | 是否要求開啟聲音,預設為 `true`,僅限 `iOS`、`macOS` 有效 | +| alert | `bool` | 是否要求彈出,預設為 `true`,僅限 `iOS`、`macOS` 有效 | | badge | `bool` | 是否要求顯示在 app 圖案上,預設為 `true`,僅限 `iOS`、`macOS` 有效 | ## getPendingNotificationList 取得正在等待發出的通知列表,回傳值為 `List` -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | +| 參數名稱 | 型態 | 描述 | +|------|----|----| ## cancel 取消/關閉通知 -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| id | `int` | 通知 id | +| 參數名稱 | 型態 | 描述 | +|------|-------|-------| +| id | `int` | 通知 id | ## cancelAll 關閉所有通知 -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | \ No newline at end of file +| 參數名稱 | 型態 | 描述 | +|------|----|----| \ No newline at end of file diff --git a/website/docs/api-utils/platform-util.mdx b/website/docs/api-utils/platform-util.mdx new file mode 100644 index 00000000..5c5dcd28 --- /dev/null +++ b/website/docs/api-utils/platform-util.mdx @@ -0,0 +1,62 @@ +--- +sidebar_position: 9 +--- + +# PlatformUtil + +:::info 實作類別 +目前可使用的實作類別有 `ApPlatformUtil` + +必需透過套件 [`ap_common_flutter_platform`](https://pub.dev/packages/ap_common_flutter_platform) +使用 +::: + +需透過 `registerApCommonFlutter()` 指定成實例,並透過 `PlatformUtil.instance` 使用 + + +## launchUrl + +開啟 URL,以 [url_launcher](https://pub.dev/packages/url_launcher) 實作 + +| 參數名稱 | 型態 | 描述 | +|------|----------|-----| +| url | `String` | URL | + +## callPhone + +播打電話,會將 `#xxx(yyy)` 格式更改成 `tel:xxx,yyy` +,以 [url_launcher](https://pub.dev/packages/url_launcher) 實作 + + +| 參數名稱 | 型態 | 描述 | +|------|----------|-----| +| url | `String` | URL | + +## shareTo + +呼叫原生分享功能,以 [share_plus](https://pub.dev/packages/share_plus) 實作 + +分享格式 + +```s +${分享內容}\n\nSend from ${App名稱} ${作業系統名稱} +``` + +| 參數名稱 | 型態 | 描述 | +|---------|----------|------| +| content | `String` | 分享內容 | + +:::caution 注意 +因為在 iPad +使用者會有圖層錯誤,需要另外加上此程式碼,詳細[可參考](https://github.com/fluttercommunity/plus_plugins/tree/main/packages/share_plus/share_plus#ipad) +::: + +```dart + +final box = context.findRenderObject() as RenderBox?; + +PlatformUtil.instance.shareTo( + 'Sharing Content', + sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size, +); +``` \ No newline at end of file diff --git a/website/docs/api-utils/preference-utils.mdx b/website/docs/api-utils/preference-utils.mdx index 4a5932c3..87a63b5e 100644 --- a/website/docs/api-utils/preference-utils.mdx +++ b/website/docs/api-utils/preference-utils.mdx @@ -2,28 +2,18 @@ sidebar_position: 4 --- -# Preferences 工具 +# PreferenceUtil -封裝 Flutter 官方維護的 [shared_preferences](https://pub.dev/packages/shared_preferences),支援所有平台,另外支援使用 [encrypt](https://pub.dev/packages/encrypt) 加密字串(AES cbc 模式)的功能 +:::info 實作類別 +目前可使用的實作類別有 `ApPreferenceUtil` + +必需透過套件 [`ap_common_flutter_platform`](https://pub.dev/packages/ap_common_flutter_platform),為套件 +封裝 Flutter 官方維護的 [shared_preferences](https://pub.dev/packages/shared_preferences) +,支援所有平台,另外支援使用 [encrypt](https://pub.dev/packages/encrypt) 加密字串(AES cbc 模式)的功能。 -:::caution 注意 使用時必須先完成 [相關設定](../installation/shared-preferences) ::: -支援 - - - `String` - - 加密 `String` - - `int` - - `double` - - `String List` - -## init - -初始化,`ApIcon` 目前的也透過此階段設定 +本地偏好設定儲存,以 key-value 一對的類型為主 -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| key | `Key` | AES 加密演算法中的 key | -| iv | `IV` | AES 加密演算法中的 iv key | -| initialApIcon | `bool` | 是否此階段初始化 ApIcons | \ No newline at end of file +需透過 `registerApCommonCore()` 指定成實例 diff --git a/website/docs/api-utils/ui-util.mdx b/website/docs/api-utils/ui-util.mdx new file mode 100644 index 00000000..32c1b2cd --- /dev/null +++ b/website/docs/api-utils/ui-util.mdx @@ -0,0 +1,24 @@ +--- +sidebar_position: 9 +--- + +# UiUtil + +:::info 實作類別 +目前可使用的實作類別有 `ApUiUtil` + +必需透過套件 [`ap_common_flutter_ui`](https://pub.dev/packages/ap_common_flutter_ui) +使用 +::: + +需透過 `registerApCommonFlutter()` 指定成實例,並透過 `ApUiUtil.instance` 使用 + +## showToast + +顯示 Android 風格的 toast 提示字 + +| 參數名稱 | 型態 | 描述 | +|---------|----------------|-------------------------| +| context | `BuildContext` | Flutter Widget context | +| message | `String` | 想要顯示的文字 | +| gravity | `int` | 顯示位置,預設為 `Toast.bottom` | \ No newline at end of file diff --git a/website/docs/api-utils/utils.mdx b/website/docs/api-utils/utils.mdx index b7c0a130..6a9b35b1 100644 --- a/website/docs/api-utils/utils.mdx +++ b/website/docs/api-utils/utils.mdx @@ -4,15 +4,9 @@ sidebar_position: 1 # 共用函式 -## showToast - -顯示 Android 風格的 toast 提示字 - -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| context | `BuildContext` | Flutter Widget context | -| message | `String` | 想要顯示的文字 | -| gravity | `int` | 顯示位置,預設為 `Toast.bottom` | +:::note +注意此區塊 API 正在遷移至其他抽象版本,部分功能可能無法使用 +::: ## pushCupertinoStyle @@ -22,120 +16,36 @@ sidebar_position: 1 目前已在 `ApTheme` 加入全域的設定,實作採用 `MaterialPageRoute`,未來可能棄用 ::: -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | +| 參數名稱 | 型態 | 描述 | +|---------|----------------|------------------------| | context | `BuildContext` | Flutter Widget context | -| page | `Widget` | 開啟頁面 | - - -## launchUrl - -開啟 URL,以 [url_launcher](https://pub.dev/packages/url_launcher) 實作 - -:::caution 注意 -Android 11 以後已不支援 `canLaunch` 故不會進行例外處理 -::: - -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| url | `String` | URL | - -## callPhone - -播打電話,會將 `#xxx(yyy)` 格式更改成 `tel:xxx,yyy`,以 [url_launcher](https://pub.dev/packages/url_launcher) 實作 - -:::caution 注意 -Android 11 以後已不支援 `canLaunch` 故不會進行例外處理 -::: - -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| url | `String` | URL | - -## shareTo - -呼叫原生分享功能,以 [share_plus](https://pub.dev/packages/share_plus) 實作 - -分享格式 - -```s -${分享內容}\n\nSend from ${App名稱} ${作業系統名稱} -``` - -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| content | `String` | 分享內容 | - -:::caution 注意 -因為在 iPad 使用者會有圖層錯誤,需要另外加上此程式碼,詳細[可參考](https://github.com/fluttercommunity/plus_plugins/tree/main/packages/share_plus/share_plus#ipad) -```dart -final box = context.findRenderObject() as RenderBox?; - -final box = context.findRenderObject() as RenderBox?; -ApUtils.shareTo( -'Sharing Content', -sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size, -); -``` -::: +| page | `Widget` | 開啟頁面 | ## launchFbFansPage -開啟 Facebook 粉絲專頁,會先以 app link 方式開啟,失敗才會以瀏覽器開啟,以 [url_launcher](https://pub.dev/packages/url_launcher) 實作 +開啟 Facebook 粉絲專頁,會先以 app link +方式開啟,失敗才會以瀏覽器開啟,以 [url_launcher](https://pub.dev/packages/url_launcher) 實作 -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| context | `BuildContext` | Flutter Widget context | -| fansPageId | `String` | 粉絲專頁 id | +| 參數名稱 | 型態 | 描述 | +|------------|----------------|------------------------| +| context | `BuildContext` | Flutter Widget context | +| fansPageId | `String` | 粉絲專頁 id | ## showAppReviewDialog 以 `Dialog` 樣式是否為App評分,同意並呼叫 [`openAppReview`](#openappreview) -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| context | `BuildContext` | Flutter Widget context | -| defaultUrl | `String` | 無原生API則開啟網址 | +| 參數名稱 | 型態 | 描述 | +|------------|----------------|------------------------| +| context | `BuildContext` | Flutter Widget context | +| defaultUrl | `String` | 無原生API則開啟網址 | ## showAppReviewSheet 以 `BottomSheet` 樣式是否為App評分,同意並呼叫 [`openAppReview`](#openappreview) -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| context | `BuildContext` | Flutter Widget context | -| defaultUrl | `String` | 無原生API則開啟網址 | - -## openAppReview - -開啟原生評分功能,若無原生API則開啟 `defaultUrl`,以 [in_app_review](https://pub.dev/packages/in_app_review) 呼叫原生評分 API,支援 `Android`、`iOS` 及 `macOS`,其他平台以 [url_launcher](https://pub.dev/packages/url_launcher) 開啟連結 - -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| defaultUrl | `String` | 無原生API則開啟網址 | - -## pickImage - -挑選照片/圖片,`Android`/`iOS`/`Web` 使用 [image_picker](https://pub.dev/packages/image_picker) 實作,`macOS`/`Windows`/`Linux` 使用 [file_selector](https://pub.dev/packages/file_selector) 實作, - -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| imageSource | `ImageSource` | 圖片來源,平台為 `Android`/`iOS`/`Web` 有效,`ImageSource.gallery` 代表使用相簿取得,`ImageSource.camera` 代表使用鏡頭拍攝 | -| preferredCameraDevice | `CameraDevice` | 鏡頭來源,需 `imageSource` 設定 `ImageSource.camera`才有效,平台為 `Android`/`iOS`/`Web` 有效,`CameraDevice.front` 代表前鏡頭,`CameraDevice.rear` 代表後鏡頭,預設值為 `CameraDevice.front` | -| extensions | `List?` | 限制副檔名,平台為 `macOS`/`Windows`/`Linux` 有效,預設值為 `['jpg', 'jpeg']` | - -## saveImage - -`Android` 與 `iOS` 使用 [`photo_manager`](https://pub.dev/packages/photo_manager) 實作 - -`macOS`/`Windows`/`Linux` 使用 [`path_provider`](https://pub.dev/packages/photo_manager) - -實作細節可參考原專案 - -| 參數名稱 | 型態 | 描述 | -| ------------------------------- | ------------------------------- | ------------------------------- | -| context | `BuildContext` | Flutter Widget context | -| byteData | `ByteData` | 影像的位元資料 | -| fileName | `String` | 檔案名稱 | -| successMessage | `String` | 儲存成功訊息 | \ No newline at end of file +| 參數名稱 | 型態 | 描述 | +|------------|----------------|------------------------| +| context | `BuildContext` | Flutter Widget context | +| defaultUrl | `String` | 無原生API則開啟網址 | diff --git a/website/docs/api-views/phone-list-view.mdx b/website/docs/api-views/phone-list-view.mdx index d10cf7f1..1aa82f9e 100644 --- a/website/docs/api-views/phone-list-view.mdx +++ b/website/docs/api-views/phone-list-view.mdx @@ -8,7 +8,7 @@ sidebar_position: 2 - 點擊會撥打`PhoneModel` 中的 `number` - `PhoneModel` 中的 `number` 為 `null` 時則作為標題區隔 -撥打功能使用 [ApUtils.callPhone](../api-utils/utils#callphone) +撥打功能使用 [PlatformUtil.instance.callPhone](../api-utils/utils#callphone) 手機介面,不包含 `AppBar` 及 `BottomNavigationBar` 的區塊 diff --git a/website/docs/installation/app-tracking-transparency.mdx b/website/docs/installation/app-tracking-transparency.mdx index dcf7be88..2fa0c6f9 100644 --- a/website/docs/installation/app-tracking-transparency.mdx +++ b/website/docs/installation/app-tracking-transparency.mdx @@ -9,7 +9,7 @@ sidebar_position: 8 `iOS` 使用 [`app_tracking_transparency`](https://pub.dev/packages/app_tracking_transparency) 實作,細節可參考原專案 :::caution 注意 -需根據上架需求,通常為審查委員會要求加入 +需根據上架需求,通常為審查會要求加入 ::: ## 限制 diff --git a/website/docs/installation/export-course-table-image.mdx b/website/docs/installation/export-course-table-image.mdx index 492b3bf2..3bf30ad5 100644 --- a/website/docs/installation/export-course-table-image.mdx +++ b/website/docs/installation/export-course-table-image.mdx @@ -4,7 +4,7 @@ sidebar_position: 6 # 匯出課表圖片 -實作可參考 [`ApUtils.saveImage`](../api-utils/utils#saveimage) 中 +實作可參考 [`MediaUtil.instance.saveImage`](../api-utils/utils#saveimage) 中 :::caution 注意 若未設定此頁面會影響以下功能 diff --git a/website/docs/installation/local-notification.mdx b/website/docs/installation/local-notification.mdx index 9c0e7488..13f68f7b 100644 --- a/website/docs/installation/local-notification.mdx +++ b/website/docs/installation/local-notification.mdx @@ -9,7 +9,7 @@ sidebar_position: 4 :::caution 注意 若未設定此頁面會影響以下功能 -- 使用到 [NotifcationUtils](../api-utils/notification-utils) 的功能 +- 使用到 [NotifcationUtil](../api-utils/notification-utils) 的功能 - [課表骨架](../api-scaffolds/course-scaffold) 中的上課提醒 ::: diff --git a/website/docs/installation/overview.mdx b/website/docs/installation/overview.mdx index 1c583bd9..4c8c38c4 100644 --- a/website/docs/installation/overview.mdx +++ b/website/docs/installation/overview.mdx @@ -16,21 +16,7 @@ sidebar_position: 1 在 `v0.26` 以後套件依據程式語言 Dart、框架 Flutter 及作業系統原生套件整合將套件拆成以下圖 -```mermaid -flowchart TD - ap_common[ap_common] --- ap_common_flutter_ui[ap_common_flutter_ui] --- ap_common_flutter_core - - ap_common --- ap_common_flutter_platform[ap_common_flutter_platform] --- ap_common_flutter_core - - ap_common --- ap_common_announcement_ui[ap_common_announcement_ui] --- ap_common_flutter_core - - ap_common_firebase --- ap_common_flutter_core - - ap_common_plugin --- ap_common_flutter_core - - ap_common_flutter_core -- Dart Level --> ap_common_core - -``` + drawing 可能會有哪些使用情境 @@ -38,7 +24,7 @@ flowchart TD 可直接使用 `ap_common`,在 `pubspec.yaml` 中加入 package - ```yaml title="pubspec.yaml" + ```yml title="pubspec.yaml" # 官方多國語套件 dependencies: flutter_localizations: @@ -49,7 +35,7 @@ flowchart TD 在檔案中加入 main.dart `registerOneForAll();` ```dart title="main.dart" - void main() async { + void main() { WidgetsFlutterBinding.ensureInitialized(); /// Register all ap_common injection util registerOneForAll(); @@ -60,44 +46,44 @@ flowchart TD 2. 如果你只需要此只需要 UI,不希望整合過多原生作業系統套件,則 - 在 `pubspec.yaml` 中加入 package + 在 `pubspec.yaml` 中加入 package - ```yaml title="pubspec.yaml" - # 官方多國語套件 - dependencies: - flutter_localizations: - sdk: flutter - ap_common_flutter_core: ^0.1.0 - ap_common_flutter_ui: ^0.1.0 - ``` + ```yaml title="pubspec.yaml" + dependencies: + # 官方多國語套件 + flutter_localizations: + sdk: flutter + ap_common_flutter_core: ^0.1.0 + ap_common_flutter_ui: ^0.1.0 + ``` - 因沒使用套件 `ap_common_flutter_platorm`,每個此用到的介面會有特定 Util 類別需要實作,以 `CourseScaffold` 來說,就需要實作 `NotificationUtil` 及 `PlatformCalendarUtil`,並在 `main.dart` 註冊你使用的實作: - - ```dart title="main.dart" - void main() async { - WidgetsFlutterBinding.ensureInitialized(); - - registerApCommonFlutter({ - ui: YourUiUtil(), - platform: YourPlatformUtil(), - media: YourMediaUtil(), - platformCalendar: YourPlatformCalendarUtil(), - notification: YourNotificationUtil(), - appStore: YourAppStoreUtil(), - }); - - registerApCommonCore( - preference: YourPreferenceUtil(), - ); + 因沒使用套件 `ap_common_flutter_platorm`,每個此用到的介面會有特定 Util 類別需要實作,以 `CourseScaffold` 來說,就需要實作 `NotificationUtil` 及 `PlatformCalendarUtil`,並在 `main.dart` 註冊你使用的實作: + + ```dart title="main.dart" + void main() { + WidgetsFlutterBinding.ensureInitialized(); - runApp(MyApp()); - } - ``` + registerApCommonFlutter({ + ui: YourUiUtil(), + platform: YourPlatformUtil(), + media: YourMediaUtil(), + platformCalendar: YourPlatformCalendarUtil(), + notification: YourNotificationUtil(), + appStore: YourAppStoreUtil(), + }); + + registerApCommonCore( + preference: YourPreferenceUtil(), + ); + + runApp(MyApp()); + } + ``` 執行取得套件 ```bash - flutter package get + flutter package get ``` ## 執行範例專案(可選) diff --git a/website/docs/installation/shared-preferences.mdx b/website/docs/installation/shared-preferences.mdx index ca394186..74dfd95c 100644 --- a/website/docs/installation/shared-preferences.mdx +++ b/website/docs/installation/shared-preferences.mdx @@ -4,29 +4,41 @@ sidebar_position: 7 # SharedPreference -使用 [API 說明](../api-utils/preference-utils) +使用官方套件 `shared_preference` 實作,整合的功能可查看 [API 說明](../api-utils/preference-utils) :::caution 注意 若未設定此頁面會影響以下功能 -- [Preference](../api-utils/preference-utils) 的功能 +- [PreferenceUtil](../api-utils/preference-utils) 的功能 - [課表骨架](../api-scaffolds/course-scaffold) 中的上課提醒 - 課表小工具 ::: ## 設定 -在 `main()` 執行 `runApp` 前執行 `Preferences.init()` 一定要加 `await` +使用前需要先初始化加密設定,在 `main()` 執行 `runApp` 前執行 `(PreferenceUtil.instance as ApPreferenceUtil).init()` 一定要加 `await` -```dart title='main.dart' -import 'package:ap_common/utils/preferences.dart'; +```dart Future main() async { WidgetsFlutterBinding.ensureInitialized(); - await Preferences.init(key: Constants.key, iv: Constants.iv); + registerOneForAll(); + await (PreferenceUtil.instance as ApPreferenceUtil).init( + key: Constants.key, + iv: Constants.iv, + ); runApp(const MyApp()); } -`` + + +``` + +參數說明可見 + +| 參數名稱 | 型態 | 描述 | +|---------------|--------|--------------------| +| key | `Key` | AES 加密演算法中的 key | +| iv | `IV` | AES 加密演算法中的 iv key | 金鑰的部分可以另外使用獨立靜態變數儲存 diff --git a/website/static/img/package-architecture.png b/website/static/img/package-architecture.png new file mode 100644 index 0000000000000000000000000000000000000000..0c3790c2a4e64a5aab721199a0f5b6c931290ff4 GIT binary patch literal 62344 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

fS4 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 literal 0 HcmV?d00001 From d713c85f970b37f35acd3e28470583732dfac15c Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Sun, 13 Oct 2024 21:46:58 +0800 Subject: [PATCH 38/41] docs: document theme change --- website/docusaurus.config.js | 28 +- website/package.json | 9 +- website/yarn.lock | 1166 +++++++++++++++++++++++++++------- 3 files changed, 954 insertions(+), 249 deletions(-) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index fac525a5..a68ecb67 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -1,5 +1,5 @@ /** @type {import('@docusaurus/types').DocusaurusConfig} */ -module.exports = { +export default { title: '校務通系列共用工程', tagline: '史上最強大校務系統 App', url: 'https://ap-common.web.app', @@ -9,7 +9,28 @@ module.exports = { favicon: 'img/favicon.ico', organizationName: 'AP-Common', // Usually your GitHub org/user name. projectName: 'AP-Common', // Usually your repo name. + markdown: { + format: 'mdx', + mermaid: true, + preprocessor: ({filePath, fileContent}) => { + return fileContent.replaceAll('{{MY_VAR}}', 'MY_VALUE'); + }, + mdx1Compat: { + comments: true, + admonitions: true, + headingIds: true, + }, + anchors: { + maintainCase: true, + }, + }, + themes: ['@docusaurus/theme-mermaid'], themeConfig: { + colorMode: { + defaultMode: 'light', + disableSwitch: false, + respectPrefersColorScheme: false, + }, prism: { additionalLanguages: [ 'dart', @@ -107,10 +128,7 @@ module.exports = { editUrl: 'https://github.com/abc873693/ap_common/edit/master/website/blog/', }, - theme: { - customCss: require.resolve('./src/css/custom.css'), - }, }, ], ], -}; +}; \ No newline at end of file diff --git a/website/package.json b/website/package.json index 3128407d..40e96316 100644 --- a/website/package.json +++ b/website/package.json @@ -14,8 +14,11 @@ "write-heading-ids": "docusaurus write-heading-ids" }, "dependencies": { - "@docusaurus/core": "3.5.0", - "@docusaurus/preset-classic": "3.5.0", + "@docusaurus/core": "3.5.2", + "@docusaurus/preset-classic": "3.5.2", + "@docusaurus/theme-classic": "^3.5.2", + "@docusaurus/theme-common": "^3.5.2", + "@docusaurus/theme-mermaid": "^3.5.2", "@mdx-js/react": "^3.0.0", "prism-react-renderer": "^2.1.0", "react": "^18.2.0", @@ -28,4 +31,4 @@ "engines": { "node": ">=18.0" } -} \ No newline at end of file +} diff --git a/website/yarn.lock b/website/yarn.lock index 4f49882e..88e5019a 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -1111,6 +1111,11 @@ "@babel/helper-validator-identifier" "^7.14.0" to-fast-properties "^2.0.0" +"@braintree/sanitize-url@^6.0.1": + version "6.0.4" + resolved "https://registry.yarnpkg.com/@braintree/sanitize-url/-/sanitize-url-6.0.4.tgz#923ca57e173c6b232bbbb07347b1be982f03e783" + integrity sha512-s3jaWicZd0pkP0jf5ysyHUI/RE7MHos6qlToFcGWXVp+ykHOy77OUMrfbgJ9it2C5bow7OIQwYYaHjk9XlBQ2A== + "@colors/colors@1.5.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" @@ -1136,10 +1141,10 @@ "@docsearch/css" "3.6.2" algoliasearch "^4.19.1" -"@docusaurus/core@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/core/-/core-3.5.0.tgz#667d2475d7330a26efe5d5db3767963fe3c9e48d" - integrity sha512-B3xQMwHc+NwLWuHfwdpXTpu3iZoEYNMhSzE6IsxIjCUAjQO01nwLp99M3aiaVkL4xXoZlc1Hhlc6eB8a3SsRtw== +"@docusaurus/core@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/core/-/core-3.5.2.tgz#3adedb90e7b6104592f1231043bd6bf91680c39c" + integrity sha512-4Z1WkhCSkX4KO0Fw5m/Vuc7Q3NxBG53NE5u59Rs96fWkMPZVSrzEPP16/Nk6cWb/shK7xXPndTmalJtw7twL/w== dependencies: "@babel/core" "^7.23.3" "@babel/generator" "^7.23.3" @@ -1151,12 +1156,12 @@ "@babel/runtime" "^7.22.6" "@babel/runtime-corejs3" "^7.22.6" "@babel/traverse" "^7.22.8" - "@docusaurus/cssnano-preset" "3.5.0" - "@docusaurus/logger" "3.5.0" - "@docusaurus/mdx-loader" "3.5.0" - "@docusaurus/utils" "3.5.0" - "@docusaurus/utils-common" "3.5.0" - "@docusaurus/utils-validation" "3.5.0" + "@docusaurus/cssnano-preset" "3.5.2" + "@docusaurus/logger" "3.5.2" + "@docusaurus/mdx-loader" "3.5.2" + "@docusaurus/utils" "3.5.2" + "@docusaurus/utils-common" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" autoprefixer "^10.4.14" babel-loader "^9.1.3" babel-plugin-dynamic-import-node "^2.3.3" @@ -1210,32 +1215,32 @@ webpack-merge "^5.9.0" webpackbar "^5.0.2" -"@docusaurus/cssnano-preset@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/cssnano-preset/-/cssnano-preset-3.5.0.tgz#6b6a0763fc19be55e7aade1a1b7c0b0f303e0e82" - integrity sha512-BMurr8nS73M777HInIfbSmG2EogfEKZKw13s/bH1MArFoHTA+mdwIUIkGxwDP5orhsrDTpzbyPjXkHZtYyNWEg== +"@docusaurus/cssnano-preset@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/cssnano-preset/-/cssnano-preset-3.5.2.tgz#6c1f2b2f9656f978c4694c84ab24592b04dcfab3" + integrity sha512-D3KiQXOMA8+O0tqORBrTOEQyQxNIfPm9jEaJoALjjSjc2M/ZAWcUfPQEnwr2JB2TadHw2gqWgpZckQmrVWkytA== dependencies: cssnano-preset-advanced "^6.1.2" postcss "^8.4.38" postcss-sort-media-queries "^5.2.0" tslib "^2.6.0" -"@docusaurus/logger@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/logger/-/logger-3.5.0.tgz#b9a320d2871e3fd9c63445b0edf3724598f85b46" - integrity sha512-7ITYJjnogAEdNeB4ixQEdS1AdMBmD2IcPPLZuOs1sGtStBPBjl+yi/uLLGnqXO3x4atGNONrPSBNnfxynGUxMw== +"@docusaurus/logger@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/logger/-/logger-3.5.2.tgz#1150339ad56844b30734115c19c580f3b25cf5ed" + integrity sha512-LHC540SGkeLfyT3RHK3gAMK6aS5TRqOD4R72BEU/DE2M/TY8WwEUAMY576UUc/oNJXv8pGhBmQB6N9p3pt8LQw== dependencies: chalk "^4.1.2" tslib "^2.6.0" -"@docusaurus/mdx-loader@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/mdx-loader/-/mdx-loader-3.5.0.tgz#0ae612b8401604a9fe26a59b3e5a4832661aaeea" - integrity sha512-9XWVtF+eCzvVBqyRqBqP2GhnNET/1Y/tLCVsyacr/nKl5DBXZTHYkGw7t1wAF8tfZsiICa+xdru5FJvD+GfcDg== +"@docusaurus/mdx-loader@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/mdx-loader/-/mdx-loader-3.5.2.tgz#99781641372c5037bcbe09bb8ade93a0e0ada57d" + integrity sha512-ku3xO9vZdwpiMIVd8BzWV0DCqGEbCP5zs1iHfKX50vw6jX8vQo0ylYo1YJMZyz6e+JFJ17HYHT5FzVidz2IflA== dependencies: - "@docusaurus/logger" "3.5.0" - "@docusaurus/utils" "3.5.0" - "@docusaurus/utils-validation" "3.5.0" + "@docusaurus/logger" "3.5.2" + "@docusaurus/utils" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" "@mdx-js/mdx" "^3.0.0" "@slorber/remark-comment" "^1.0.0" escape-html "^1.0.3" @@ -1271,20 +1276,33 @@ react-helmet-async "*" react-loadable "npm:@docusaurus/react-loadable@6.0.0" -"@docusaurus/plugin-content-blog@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.5.0.tgz#3535ef2b75b1e9465700438a49386c5fe376eb42" - integrity sha512-jxB/m5EZHXQP4INqnxCN2GKFxzGt0pOvEcr+tF015gLhzQXBbB6UACqYFqtwiGg7cGC1sJUf2/7bzcv4JYoIMw== +"@docusaurus/module-type-aliases@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/module-type-aliases/-/module-type-aliases-3.5.2.tgz#4e8f9c0703e23b2e07ebfce96598ec83e4dd2a9e" + integrity sha512-Z+Xu3+2rvKef/YKTMxZHsEXp1y92ac0ngjDiExRdqGTmEKtCUpkbNYH8v5eXo5Ls+dnW88n6WTa+Q54kLOkwPg== dependencies: - "@docusaurus/core" "3.5.0" - "@docusaurus/logger" "3.5.0" - "@docusaurus/mdx-loader" "3.5.0" - "@docusaurus/theme-common" "3.5.0" - "@docusaurus/types" "3.5.0" - "@docusaurus/utils" "3.5.0" - "@docusaurus/utils-common" "3.5.0" - "@docusaurus/utils-validation" "3.5.0" - cheerio "^1.0.0-rc.12" + "@docusaurus/types" "3.5.2" + "@types/history" "^4.7.11" + "@types/react" "*" + "@types/react-router-config" "*" + "@types/react-router-dom" "*" + react-helmet-async "*" + react-loadable "npm:@docusaurus/react-loadable@6.0.0" + +"@docusaurus/plugin-content-blog@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.5.2.tgz#649c07c34da7603645f152bcebdf75285baed16b" + integrity sha512-R7ghWnMvjSf+aeNDH0K4fjyQnt5L0KzUEnUhmf1e3jZrv3wogeytZNN6n7X8yHcMsuZHPOrctQhXWnmxu+IRRg== + dependencies: + "@docusaurus/core" "3.5.2" + "@docusaurus/logger" "3.5.2" + "@docusaurus/mdx-loader" "3.5.2" + "@docusaurus/theme-common" "3.5.2" + "@docusaurus/types" "3.5.2" + "@docusaurus/utils" "3.5.2" + "@docusaurus/utils-common" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" + cheerio "1.0.0-rc.12" feed "^4.2.2" fs-extra "^11.1.1" lodash "^4.17.21" @@ -1295,20 +1313,20 @@ utility-types "^3.10.0" webpack "^5.88.1" -"@docusaurus/plugin-content-docs@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.5.0.tgz#847e27d2a2f35074f673318817572c240d571271" - integrity sha512-ZClDTvihZn+Tes9qpe04y53b4xChO6WS8aWOxDpbHV/9wDJ6Rw3bMUIXfcT4cSThSSaIFkwN7FLMpz2U08bq+Q== - dependencies: - "@docusaurus/core" "3.5.0" - "@docusaurus/logger" "3.5.0" - "@docusaurus/mdx-loader" "3.5.0" - "@docusaurus/module-type-aliases" "3.5.0" - "@docusaurus/theme-common" "3.5.0" - "@docusaurus/types" "3.5.0" - "@docusaurus/utils" "3.5.0" - "@docusaurus/utils-common" "3.5.0" - "@docusaurus/utils-validation" "3.5.0" +"@docusaurus/plugin-content-docs@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.5.2.tgz#adcf6c0bd9a9818eb192ab831e0069ee62d31505" + integrity sha512-Bt+OXn/CPtVqM3Di44vHjE7rPCEsRCB/DMo2qoOuozB9f7+lsdrHvD0QCHdBs0uhz6deYJDppAr2VgqybKPlVQ== + dependencies: + "@docusaurus/core" "3.5.2" + "@docusaurus/logger" "3.5.2" + "@docusaurus/mdx-loader" "3.5.2" + "@docusaurus/module-type-aliases" "3.5.2" + "@docusaurus/theme-common" "3.5.2" + "@docusaurus/types" "3.5.2" + "@docusaurus/utils" "3.5.2" + "@docusaurus/utils-common" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" "@types/react-router-config" "^5.0.7" combine-promises "^1.1.0" fs-extra "^11.1.1" @@ -1318,114 +1336,114 @@ utility-types "^3.10.0" webpack "^5.88.1" -"@docusaurus/plugin-content-pages@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-pages/-/plugin-content-pages-3.5.0.tgz#cfb61454f0bec63bc5c6f12935469926a4ce8c0d" - integrity sha512-4ONFUs9WEpjELl1rN9LIIH+gm7Mxs4H++DI5a2et/Aa/p6Njo1t3mMFBn3PK9Z7YEdcUne72pIW2v2R2rHtJUA== - dependencies: - "@docusaurus/core" "3.5.0" - "@docusaurus/mdx-loader" "3.5.0" - "@docusaurus/types" "3.5.0" - "@docusaurus/utils" "3.5.0" - "@docusaurus/utils-validation" "3.5.0" +"@docusaurus/plugin-content-pages@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-pages/-/plugin-content-pages-3.5.2.tgz#2b59e43f5bc5b5176ff01835de706f1c65c2e68b" + integrity sha512-WzhHjNpoQAUz/ueO10cnundRz+VUtkjFhhaQ9jApyv1a46FPURO4cef89pyNIOMny1fjDz/NUN2z6Yi+5WUrCw== + dependencies: + "@docusaurus/core" "3.5.2" + "@docusaurus/mdx-loader" "3.5.2" + "@docusaurus/types" "3.5.2" + "@docusaurus/utils" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" fs-extra "^11.1.1" tslib "^2.6.0" webpack "^5.88.1" -"@docusaurus/plugin-debug@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-debug/-/plugin-debug-3.5.0.tgz#df9e855f8d8650adb15159ef3b8c689c730a698c" - integrity sha512-748XrTC/wb9ffzU60pZmTl1fcEixdLsotMYka0R+Vl8tbvaRyF/sPOGbiX1D6tM9m/7db6+EecO5wSCcoNR/0Q== +"@docusaurus/plugin-debug@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-debug/-/plugin-debug-3.5.2.tgz#c25ca6a59e62a17c797b367173fe80c06fdf2f65" + integrity sha512-kBK6GlN0itCkrmHuCS6aX1wmoWc5wpd5KJlqQ1FyrF0cLDnvsYSnh7+ftdwzt7G6lGBho8lrVwkkL9/iQvaSOA== dependencies: - "@docusaurus/core" "3.5.0" - "@docusaurus/types" "3.5.0" - "@docusaurus/utils" "3.5.0" + "@docusaurus/core" "3.5.2" + "@docusaurus/types" "3.5.2" + "@docusaurus/utils" "3.5.2" fs-extra "^11.1.1" react-json-view-lite "^1.2.0" tslib "^2.6.0" -"@docusaurus/plugin-google-analytics@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-3.5.0.tgz#995ff3a4f6614abb8eac409df7434076cf8ca132" - integrity sha512-5x2lh+mq/HH6+xstmdpO9RoUBN+aJKVoiJvN6OCx85Kxupgv+cH5VbeNqzZSNQcJBXuBVqwt3Y8WJVXcCpbpYw== +"@docusaurus/plugin-google-analytics@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-3.5.2.tgz#1143e78d1461d3c74a2746f036d25b18d4a2608d" + integrity sha512-rjEkJH/tJ8OXRE9bwhV2mb/WP93V441rD6XnM6MIluu7rk8qg38iSxS43ga2V2Q/2ib53PcqbDEJDG/yWQRJhQ== dependencies: - "@docusaurus/core" "3.5.0" - "@docusaurus/types" "3.5.0" - "@docusaurus/utils-validation" "3.5.0" + "@docusaurus/core" "3.5.2" + "@docusaurus/types" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" tslib "^2.6.0" -"@docusaurus/plugin-google-gtag@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-3.5.0.tgz#e1f3604c8fe77d42c95f0968008e5dadd4f2a725" - integrity sha512-a8ABEXLtG27Mm4u9F4nvh/f6oEONRISzvikORPToobSogsf1E6AGVkRrWwEnMr4M8uqj+jTtrB2NbNMdvAOGMQ== +"@docusaurus/plugin-google-gtag@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-3.5.2.tgz#60b5a9e1888c4fa16933f7c5cb5f2f2c31caad3a" + integrity sha512-lm8XL3xLkTPHFKKjLjEEAHUrW0SZBSHBE1I+i/tmYMBsjCcUB5UJ52geS5PSiOCFVR74tbPGcPHEV/gaaxFeSA== dependencies: - "@docusaurus/core" "3.5.0" - "@docusaurus/types" "3.5.0" - "@docusaurus/utils-validation" "3.5.0" + "@docusaurus/core" "3.5.2" + "@docusaurus/types" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" "@types/gtag.js" "^0.0.12" tslib "^2.6.0" -"@docusaurus/plugin-google-tag-manager@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-3.5.0.tgz#5c16c2870bbfca0ee088ab11f48ace8f3e987edd" - integrity sha512-ePJ10SnD/v2m9zgcdaLSENf+59MGTFFq/K7R2sneEWYxRXuzaoFqC8xwBW2khNnalcGOBHwtwcSydl3ynRvoQQ== +"@docusaurus/plugin-google-tag-manager@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-3.5.2.tgz#7a37334d2e7f00914d61ad05bc09391c4db3bfda" + integrity sha512-QkpX68PMOMu10Mvgvr5CfZAzZQFx8WLlOiUQ/Qmmcl6mjGK6H21WLT5x7xDmcpCoKA/3CegsqIqBR+nA137lQg== dependencies: - "@docusaurus/core" "3.5.0" - "@docusaurus/types" "3.5.0" - "@docusaurus/utils-validation" "3.5.0" + "@docusaurus/core" "3.5.2" + "@docusaurus/types" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" tslib "^2.6.0" -"@docusaurus/plugin-sitemap@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-sitemap/-/plugin-sitemap-3.5.0.tgz#4c6e5a036d89490d60d829ec4f28844870ad9cdf" - integrity sha512-nsmkz3RWadpSGrLdi+WtLfn7aoL8lv7Rv+6CoeJ6XcMGgqq8eCrqmU+7sdOW2pNXGFOhsDRii45XK5YY82VODw== - dependencies: - "@docusaurus/core" "3.5.0" - "@docusaurus/logger" "3.5.0" - "@docusaurus/types" "3.5.0" - "@docusaurus/utils" "3.5.0" - "@docusaurus/utils-common" "3.5.0" - "@docusaurus/utils-validation" "3.5.0" +"@docusaurus/plugin-sitemap@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-sitemap/-/plugin-sitemap-3.5.2.tgz#9c940b27f3461c54d65295cf4c52cb20538bd360" + integrity sha512-DnlqYyRAdQ4NHY28TfHuVk414ft2uruP4QWCH//jzpHjqvKyXjj2fmDtI8RPUBh9K8iZKFMHRnLtzJKySPWvFA== + dependencies: + "@docusaurus/core" "3.5.2" + "@docusaurus/logger" "3.5.2" + "@docusaurus/types" "3.5.2" + "@docusaurus/utils" "3.5.2" + "@docusaurus/utils-common" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" fs-extra "^11.1.1" sitemap "^7.1.1" tslib "^2.6.0" -"@docusaurus/preset-classic@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/preset-classic/-/preset-classic-3.5.0.tgz#f5a718fc734afff08d771d03eb4d2e216ccd3556" - integrity sha512-8zgxqeO0nx14xBQWi3uFRXSP2wawPpNN0RbmVq/afYk0qH8LYBaGYdno6eWZbd0HxMJB0WCt3XUxvLEYGbyGiQ== - dependencies: - "@docusaurus/core" "3.5.0" - "@docusaurus/plugin-content-blog" "3.5.0" - "@docusaurus/plugin-content-docs" "3.5.0" - "@docusaurus/plugin-content-pages" "3.5.0" - "@docusaurus/plugin-debug" "3.5.0" - "@docusaurus/plugin-google-analytics" "3.5.0" - "@docusaurus/plugin-google-gtag" "3.5.0" - "@docusaurus/plugin-google-tag-manager" "3.5.0" - "@docusaurus/plugin-sitemap" "3.5.0" - "@docusaurus/theme-classic" "3.5.0" - "@docusaurus/theme-common" "3.5.0" - "@docusaurus/theme-search-algolia" "3.5.0" - "@docusaurus/types" "3.5.0" - -"@docusaurus/theme-classic@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-classic/-/theme-classic-3.5.0.tgz#6e74238e9d4ee58e99cea8d9bf14da6bb6ec19ca" - integrity sha512-VLI+PJrDP8eRW1ClZB8NAbtE0LYlVJEn/xtlYLFtURoGl8ajA19GmSG4aee7QdQnQbkb1bXUy3u48vcVpKclAQ== - dependencies: - "@docusaurus/core" "3.5.0" - "@docusaurus/mdx-loader" "3.5.0" - "@docusaurus/module-type-aliases" "3.5.0" - "@docusaurus/plugin-content-blog" "3.5.0" - "@docusaurus/plugin-content-docs" "3.5.0" - "@docusaurus/plugin-content-pages" "3.5.0" - "@docusaurus/theme-common" "3.5.0" - "@docusaurus/theme-translations" "3.5.0" - "@docusaurus/types" "3.5.0" - "@docusaurus/utils" "3.5.0" - "@docusaurus/utils-common" "3.5.0" - "@docusaurus/utils-validation" "3.5.0" +"@docusaurus/preset-classic@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/preset-classic/-/preset-classic-3.5.2.tgz#977f78510bbc556aa0539149eef960bb7ab52bd9" + integrity sha512-3ihfXQ95aOHiLB5uCu+9PRy2gZCeSZoDcqpnDvf3B+sTrMvMTr8qRUzBvWkoIqc82yG5prCboRjk1SVILKx6sg== + dependencies: + "@docusaurus/core" "3.5.2" + "@docusaurus/plugin-content-blog" "3.5.2" + "@docusaurus/plugin-content-docs" "3.5.2" + "@docusaurus/plugin-content-pages" "3.5.2" + "@docusaurus/plugin-debug" "3.5.2" + "@docusaurus/plugin-google-analytics" "3.5.2" + "@docusaurus/plugin-google-gtag" "3.5.2" + "@docusaurus/plugin-google-tag-manager" "3.5.2" + "@docusaurus/plugin-sitemap" "3.5.2" + "@docusaurus/theme-classic" "3.5.2" + "@docusaurus/theme-common" "3.5.2" + "@docusaurus/theme-search-algolia" "3.5.2" + "@docusaurus/types" "3.5.2" + +"@docusaurus/theme-classic@3.5.2", "@docusaurus/theme-classic@^3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-classic/-/theme-classic-3.5.2.tgz#602ddb63d987ab1f939e3760c67bc1880f01c000" + integrity sha512-XRpinSix3NBv95Rk7xeMF9k4safMkwnpSgThn0UNQNumKvmcIYjfkwfh2BhwYh/BxMXQHJ/PdmNh22TQFpIaYg== + dependencies: + "@docusaurus/core" "3.5.2" + "@docusaurus/mdx-loader" "3.5.2" + "@docusaurus/module-type-aliases" "3.5.2" + "@docusaurus/plugin-content-blog" "3.5.2" + "@docusaurus/plugin-content-docs" "3.5.2" + "@docusaurus/plugin-content-pages" "3.5.2" + "@docusaurus/theme-common" "3.5.2" + "@docusaurus/theme-translations" "3.5.2" + "@docusaurus/types" "3.5.2" + "@docusaurus/utils" "3.5.2" + "@docusaurus/utils-common" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" "@mdx-js/react" "^3.0.0" clsx "^2.0.0" copy-text-to-clipboard "^3.2.0" @@ -1440,15 +1458,15 @@ tslib "^2.6.0" utility-types "^3.10.0" -"@docusaurus/theme-common@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-common/-/theme-common-3.5.0.tgz#ec73a951384a4accbd5eb065f98f3ec821cab16a" - integrity sha512-JPzL5GBNqJES7sYzCU004BbXi4XXVFVviaVdaQLRHQv8soHsl4iiGfbUdcDMOD+soLlz7bTxQxclpkhNjIhmfw== +"@docusaurus/theme-common@3.5.2", "@docusaurus/theme-common@^3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-common/-/theme-common-3.5.2.tgz#b507ab869a1fba0be9c3c9d74f2f3d74c3ac78b2" + integrity sha512-QXqlm9S6x9Ibwjs7I2yEDgsCocp708DrCrgHgKwg2n2AY0YQ6IjU0gAK35lHRLOvAoJUfCKpQAwUykB0R7+Eew== dependencies: - "@docusaurus/mdx-loader" "3.5.0" - "@docusaurus/module-type-aliases" "3.5.0" - "@docusaurus/utils" "3.5.0" - "@docusaurus/utils-common" "3.5.0" + "@docusaurus/mdx-loader" "3.5.2" + "@docusaurus/module-type-aliases" "3.5.2" + "@docusaurus/utils" "3.5.2" + "@docusaurus/utils-common" "3.5.2" "@types/history" "^4.7.11" "@types/react" "*" "@types/react-router-config" "*" @@ -1458,19 +1476,32 @@ tslib "^2.6.0" utility-types "^3.10.0" -"@docusaurus/theme-search-algolia@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-search-algolia/-/theme-search-algolia-3.5.0.tgz#4cf1e5be7052d9f7ecd2e5207696b3dacbe35962" - integrity sha512-DTMa9nDRfQTFlXJHUS9/a6s6faZBblfGiuzOi6ZSvV66AOWLBb25Gx1sVurZ3k41ZqmI5hiMKwMvZ0dfSpx6Ow== +"@docusaurus/theme-mermaid@^3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-mermaid/-/theme-mermaid-3.5.2.tgz#7d64289e6f2493b9fc0d5f2e8f66da4c9d884db8" + integrity sha512-7vWCnIe/KoyTN1Dc55FIyqO5hJ3YaV08Mr63Zej0L0mX1iGzt+qKSmeVUAJ9/aOalUhF0typV0RmNUSy5FAmCg== + dependencies: + "@docusaurus/core" "3.5.2" + "@docusaurus/module-type-aliases" "3.5.2" + "@docusaurus/theme-common" "3.5.2" + "@docusaurus/types" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" + mermaid "^10.4.0" + tslib "^2.6.0" + +"@docusaurus/theme-search-algolia@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-search-algolia/-/theme-search-algolia-3.5.2.tgz#466c83ca7e8017d95ae6889ccddc5ef8bf6b61c6" + integrity sha512-qW53kp3VzMnEqZGjakaV90sst3iN1o32PH+nawv1uepROO8aEGxptcq2R5rsv7aBShSRbZwIobdvSYKsZ5pqvA== dependencies: "@docsearch/react" "^3.5.2" - "@docusaurus/core" "3.5.0" - "@docusaurus/logger" "3.5.0" - "@docusaurus/plugin-content-docs" "3.5.0" - "@docusaurus/theme-common" "3.5.0" - "@docusaurus/theme-translations" "3.5.0" - "@docusaurus/utils" "3.5.0" - "@docusaurus/utils-validation" "3.5.0" + "@docusaurus/core" "3.5.2" + "@docusaurus/logger" "3.5.2" + "@docusaurus/plugin-content-docs" "3.5.2" + "@docusaurus/theme-common" "3.5.2" + "@docusaurus/theme-translations" "3.5.2" + "@docusaurus/utils" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" algoliasearch "^4.18.0" algoliasearch-helper "^3.13.3" clsx "^2.0.0" @@ -1480,10 +1511,10 @@ tslib "^2.6.0" utility-types "^3.10.0" -"@docusaurus/theme-translations@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-translations/-/theme-translations-3.5.0.tgz#89792b64d234baffce74378aacecf8c53274d04c" - integrity sha512-rF3Ldj78OU2c6bGOyWZJfJ+vOz1CmDODbz+Vnkl2dqeViUS2BTDE3QT5xsZGKfH6yRB/CSzk3P7ss78qCeDKRw== +"@docusaurus/theme-translations@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-translations/-/theme-translations-3.5.2.tgz#38f9ebf2a5d860397022206a05fef66c08863c89" + integrity sha512-GPZLcu4aT1EmqSTmbdpVrDENGR2yObFEX8ssEFYTCiAIVc0EihNSdOIBTazUvgNqwvnoU1A8vIs1xyzc3LITTw== dependencies: fs-extra "^11.1.1" tslib "^2.6.0" @@ -1503,34 +1534,49 @@ webpack "^5.88.1" webpack-merge "^5.9.0" -"@docusaurus/utils-common@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/utils-common/-/utils-common-3.5.0.tgz#cd420e454184c1bff094f816f6468791eb6b397e" - integrity sha512-RyeqPhOfocQkh+ldDiwJBi0h9zZAhccqtzl+aECbgP1a7kdGFLUS0SgVjF1iYUk5RBW03DH+fevT6s4brCWspA== +"@docusaurus/types@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/types/-/types-3.5.2.tgz#058019dbeffbee2d412c3f72569e412a727f9608" + integrity sha512-N6GntLXoLVUwkZw7zCxwy9QiuEXIcTVzA9AkmNw16oc0AP3SXLrMmDMMBIfgqwuKWa6Ox6epHol9kMtJqekACw== + dependencies: + "@mdx-js/mdx" "^3.0.0" + "@types/history" "^4.7.11" + "@types/react" "*" + commander "^5.1.0" + joi "^17.9.2" + react-helmet-async "^1.3.0" + utility-types "^3.10.0" + webpack "^5.88.1" + webpack-merge "^5.9.0" + +"@docusaurus/utils-common@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/utils-common/-/utils-common-3.5.2.tgz#4d7f5e962fbca3e2239d80457aa0e4bd3d8f7e0a" + integrity sha512-i0AZjHiRgJU6d7faQngIhuHKNrszpL/SHQPgF1zH4H+Ij6E9NBYGy6pkcGWToIv7IVPbs+pQLh1P3whn0gWXVg== dependencies: tslib "^2.6.0" -"@docusaurus/utils-validation@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/utils-validation/-/utils-validation-3.5.0.tgz#7fe7c5cd2bb13fb6a8d9edb11d4ce230db4b22e8" - integrity sha512-ZWo75T0nv1oX1zx7Nv+woS0ReeONdaK+WddKyYy7M7DnnAe9M5uhRaEPlyDWl9KpXrRZ1piTWBBye79MCTFyTA== +"@docusaurus/utils-validation@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/utils-validation/-/utils-validation-3.5.2.tgz#1b2b2f02082781cc8ce713d4c85e88d6d2fc4eb3" + integrity sha512-m+Foq7augzXqB6HufdS139PFxDC5d5q2QKZy8q0qYYvGdI6nnlNsGH4cIGsgBnV7smz+mopl3g4asbSDvMV0jA== dependencies: - "@docusaurus/logger" "3.5.0" - "@docusaurus/utils" "3.5.0" - "@docusaurus/utils-common" "3.5.0" + "@docusaurus/logger" "3.5.2" + "@docusaurus/utils" "3.5.2" + "@docusaurus/utils-common" "3.5.2" fs-extra "^11.2.0" joi "^17.9.2" js-yaml "^4.1.0" lodash "^4.17.21" tslib "^2.6.0" -"@docusaurus/utils@3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/utils/-/utils-3.5.0.tgz#7525f495591fd882987bcc93fea7130290213adc" - integrity sha512-RknfD/Tztd3wYWHTdCIlzH4mZcwfeGA4F4qaHZei3XpXocvvsqNlr7fjWZU83Uad2ty4sgQL7cwYSDHQuCBCig== +"@docusaurus/utils@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/utils/-/utils-3.5.2.tgz#17763130215f18d7269025903588ef7fb373e2cb" + integrity sha512-33QvcNFh+Gv+C2dP9Y9xWEzMgf3JzrpL2nW9PopidiohS1nDcyknKRx2DWaFvyVTTYIkkABVSr073VTj/NITNA== dependencies: - "@docusaurus/logger" "3.5.0" - "@docusaurus/utils-common" "3.5.0" + "@docusaurus/logger" "3.5.2" + "@docusaurus/utils-common" "3.5.2" "@svgr/webpack" "^8.1.0" escape-string-regexp "^4.0.0" file-loader "^6.2.0" @@ -1915,6 +1961,23 @@ dependencies: "@types/node" "*" +"@types/d3-scale-chromatic@^3.0.0": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.0.3.tgz#fc0db9c10e789c351f4c42d96f31f2e4df8f5644" + integrity sha512-laXM4+1o5ImZv3RpFAsTRn3TEkzqkytiOY0Dz0sq5cnd1dtNlk6sHLon4OvqaiJb28T0S/TdsBI3Sjsy+keJrw== + +"@types/d3-scale@^4.0.3": + version "4.0.8" + resolved "https://registry.yarnpkg.com/@types/d3-scale/-/d3-scale-4.0.8.tgz#d409b5f9dcf63074464bf8ddfb8ee5a1f95945bb" + integrity sha512-gkK1VVTr5iNiYJ7vWDI+yUFFlszhNMtVeneJ6lUTKPjprsvLLI9/tgEGiXJOnlINJA8FyA88gfnQsHbybVZrYQ== + dependencies: + "@types/d3-time" "*" + +"@types/d3-time@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/d3-time/-/d3-time-3.0.3.tgz#3c186bbd9d12b9d84253b6be6487ca56b54f88be" + integrity sha512-2p6olUZ4w3s+07q3Tm2dbiMZy5pCDfYwtLXXHUnVzXgQlZ/OyPtUz6OL382BkOuGlLXqfT+wqv8Fw2v8/0geBw== + "@types/debug@^4.0.0": version "4.1.12" resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.12.tgz#a155f21690871953410df4b6b6f53187f0500917" @@ -2047,6 +2110,13 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== +"@types/mdast@^3.0.0": + version "3.0.15" + resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.15.tgz#49c524a263f30ffa28b71ae282f813ed000ab9f5" + integrity sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ== + dependencies: + "@types/unist" "^2" + "@types/mdast@^4.0.0", "@types/mdast@^4.0.2": version "4.0.4" resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-4.0.4.tgz#7ccf72edd2f1aa7dd3437e180c64373585804dd6" @@ -2151,9 +2221,9 @@ integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== "@types/sax@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@types/sax/-/sax-1.2.1.tgz#e0248be936ece791a82db1a57f3fb5f7c87e8172" - integrity sha512-dqYdvN7Sbw8QT/0Ci5rhjE4/iCMJEM0Y9rHpCu+gGXD9Lwbz28t6HI2yegsB6BoV1sShRMU6lAmAcgRjmFy7LA== + version "1.2.7" + resolved "https://registry.yarnpkg.com/@types/sax/-/sax-1.2.7.tgz#ba5fe7df9aa9c89b6dff7688a19023dd2963091d" + integrity sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A== dependencies: "@types/node" "*" @@ -2193,6 +2263,11 @@ resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.3.tgz#9c088679876f374eb5983f150d4787aa6fb32d7e" integrity sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ== +"@types/unist@^2": + version "2.0.11" + resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.11.tgz#11af57b127e32487774841f7a4e54eab166d03c4" + integrity sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA== + "@types/unist@^3.0.0": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/unist/-/unist-3.0.3.tgz#acaab0f919ce69cce629c2d4ed2eb4adc1b6c20c" @@ -2531,9 +2606,9 @@ anymatch@~3.1.2: picomatch "^2.0.4" arg@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.0.tgz#a20e2bb5710e82950a516b3f933fee5ed478be90" - integrity sha512-4P8Zm2H+BRS+c/xX1LrHw0qKpEhdlZjLCgWy+d78T9vqa2Z2SiD2wMrYuWIAFy5IZUD7nnNXroRttz+0RzlrzQ== + version "5.0.2" + resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.2.tgz#c81433cc427c92c4dcf4865142dbca6f15acd59c" + integrity sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg== argparse@^1.0.7: version "1.0.10" @@ -2912,22 +2987,18 @@ cheerio-select@^2.1.0: domhandler "^5.0.3" domutils "^3.0.1" -cheerio@^1.0.0-rc.12: - version "1.0.0" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0.tgz#1ede4895a82f26e8af71009f961a9b8cb60d6a81" - integrity sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww== +cheerio@1.0.0-rc.12: + version "1.0.0-rc.12" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.12.tgz#788bf7466506b1c6bf5fae51d24a2c4d62e47683" + integrity sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q== dependencies: cheerio-select "^2.1.0" dom-serializer "^2.0.0" domhandler "^5.0.3" - domutils "^3.1.0" - encoding-sniffer "^0.2.0" - htmlparser2 "^9.1.0" - parse5 "^7.1.2" + domutils "^3.0.1" + htmlparser2 "^8.0.1" + parse5 "^7.0.0" parse5-htmlparser2-tree-adapter "^7.0.0" - parse5-parser-stream "^7.1.2" - undici "^6.19.5" - whatwg-mimetype "^4.0.0" chokidar@^3.4.2, chokidar@^3.5.3: version "3.6.0" @@ -3048,6 +3119,11 @@ comma-separated-tokens@^2.0.0: resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz#4e89c9458acb61bc8fef19f4529973b2392839ee" integrity sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg== +commander@7, commander@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== + commander@^10.0.0: version "10.0.1" resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" @@ -3063,11 +3139,6 @@ commander@^5.1.0: resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== -commander@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" - integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== - commander@^8.3.0: version "8.3.0" resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" @@ -3208,6 +3279,13 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= +cose-base@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/cose-base/-/cose-base-1.0.3.tgz#650334b41b869578a543358b80cda7e0abe0a60a" + integrity sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg== + dependencies: + layout-base "^1.0.0" + cosmiconfig@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" @@ -3398,6 +3476,302 @@ csstype@^3.0.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81" integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== +cytoscape-cose-bilkent@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cytoscape-cose-bilkent/-/cytoscape-cose-bilkent-4.1.0.tgz#762fa121df9930ffeb51a495d87917c570ac209b" + integrity sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ== + dependencies: + cose-base "^1.0.0" + +cytoscape@^3.28.1: + version "3.30.2" + resolved "https://registry.yarnpkg.com/cytoscape/-/cytoscape-3.30.2.tgz#94149707fb6547a55e3b44f03ffe232706212161" + integrity sha512-oICxQsjW8uSaRmn4UK/jkczKOqTrVqt5/1WL0POiJUT2EKNc9STM4hYFHv917yu55aTBMFNRzymlJhVAiWPCxw== + +"d3-array@1 - 2": + version "2.12.1" + resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-2.12.1.tgz#e20b41aafcdffdf5d50928004ececf815a465e81" + integrity sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ== + dependencies: + internmap "^1.0.0" + +"d3-array@2 - 3", "d3-array@2.10.0 - 3", "d3-array@2.5.0 - 3", d3-array@3, d3-array@^3.2.0: + version "3.2.4" + resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-3.2.4.tgz#15fec33b237f97ac5d7c986dc77da273a8ed0bb5" + integrity sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg== + dependencies: + internmap "1 - 2" + +d3-axis@3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-axis/-/d3-axis-3.0.0.tgz#c42a4a13e8131d637b745fc2973824cfeaf93322" + integrity sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw== + +d3-brush@3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-brush/-/d3-brush-3.0.0.tgz#6f767c4ed8dcb79de7ede3e1c0f89e63ef64d31c" + integrity sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ== + dependencies: + d3-dispatch "1 - 3" + d3-drag "2 - 3" + d3-interpolate "1 - 3" + d3-selection "3" + d3-transition "3" + +d3-chord@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-chord/-/d3-chord-3.0.1.tgz#d156d61f485fce8327e6abf339cb41d8cbba6966" + integrity sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g== + dependencies: + d3-path "1 - 3" + +"d3-color@1 - 3", d3-color@3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-3.1.0.tgz#395b2833dfac71507f12ac2f7af23bf819de24e2" + integrity sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA== + +d3-contour@4: + version "4.0.2" + resolved "https://registry.yarnpkg.com/d3-contour/-/d3-contour-4.0.2.tgz#bb92063bc8c5663acb2422f99c73cbb6c6ae3bcc" + integrity sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA== + dependencies: + d3-array "^3.2.0" + +d3-delaunay@6: + version "6.0.4" + resolved "https://registry.yarnpkg.com/d3-delaunay/-/d3-delaunay-6.0.4.tgz#98169038733a0a5babbeda55054f795bb9e4a58b" + integrity sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A== + dependencies: + delaunator "5" + +"d3-dispatch@1 - 3", d3-dispatch@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-dispatch/-/d3-dispatch-3.0.1.tgz#5fc75284e9c2375c36c839411a0cf550cbfc4d5e" + integrity sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg== + +"d3-drag@2 - 3", d3-drag@3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-drag/-/d3-drag-3.0.0.tgz#994aae9cd23c719f53b5e10e3a0a6108c69607ba" + integrity sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg== + dependencies: + d3-dispatch "1 - 3" + d3-selection "3" + +"d3-dsv@1 - 3", d3-dsv@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-dsv/-/d3-dsv-3.0.1.tgz#c63af978f4d6a0d084a52a673922be2160789b73" + integrity sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q== + dependencies: + commander "7" + iconv-lite "0.6" + rw "1" + +"d3-ease@1 - 3", d3-ease@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-3.0.1.tgz#9658ac38a2140d59d346160f1f6c30fda0bd12f4" + integrity sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w== + +d3-fetch@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-fetch/-/d3-fetch-3.0.1.tgz#83141bff9856a0edb5e38de89cdcfe63d0a60a22" + integrity sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw== + dependencies: + d3-dsv "1 - 3" + +d3-force@3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-force/-/d3-force-3.0.0.tgz#3e2ba1a61e70888fe3d9194e30d6d14eece155c4" + integrity sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg== + dependencies: + d3-dispatch "1 - 3" + d3-quadtree "1 - 3" + d3-timer "1 - 3" + +"d3-format@1 - 3", d3-format@3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-3.1.0.tgz#9260e23a28ea5cb109e93b21a06e24e2ebd55641" + integrity sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA== + +d3-geo@3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-3.1.1.tgz#6027cf51246f9b2ebd64f99e01dc7c3364033a4d" + integrity sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q== + dependencies: + d3-array "2.5.0 - 3" + +d3-hierarchy@3: + version "3.1.2" + resolved "https://registry.yarnpkg.com/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz#b01cd42c1eed3d46db77a5966cf726f8c09160c6" + integrity sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA== + +"d3-interpolate@1 - 3", "d3-interpolate@1.2.0 - 3", d3-interpolate@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-3.0.1.tgz#3c47aa5b32c5b3dfb56ef3fd4342078a632b400d" + integrity sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g== + dependencies: + d3-color "1 - 3" + +d3-path@1: + version "1.0.9" + resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-1.0.9.tgz#48c050bb1fe8c262493a8caf5524e3e9591701cf" + integrity sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg== + +"d3-path@1 - 3", d3-path@3, d3-path@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-3.1.0.tgz#22df939032fb5a71ae8b1800d61ddb7851c42526" + integrity sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ== + +d3-polygon@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-polygon/-/d3-polygon-3.0.1.tgz#0b45d3dd1c48a29c8e057e6135693ec80bf16398" + integrity sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg== + +"d3-quadtree@1 - 3", d3-quadtree@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-quadtree/-/d3-quadtree-3.0.1.tgz#6dca3e8be2b393c9a9d514dabbd80a92deef1a4f" + integrity sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw== + +d3-random@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-random/-/d3-random-3.0.1.tgz#d4926378d333d9c0bfd1e6fa0194d30aebaa20f4" + integrity sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ== + +d3-sankey@^0.12.3: + version "0.12.3" + resolved "https://registry.yarnpkg.com/d3-sankey/-/d3-sankey-0.12.3.tgz#b3c268627bd72e5d80336e8de6acbfec9d15d01d" + integrity sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ== + dependencies: + d3-array "1 - 2" + d3-shape "^1.2.0" + +d3-scale-chromatic@3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz#34c39da298b23c20e02f1a4b239bd0f22e7f1314" + integrity sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ== + dependencies: + d3-color "1 - 3" + d3-interpolate "1 - 3" + +d3-scale@4: + version "4.0.2" + resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-4.0.2.tgz#82b38e8e8ff7080764f8dcec77bd4be393689396" + integrity sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ== + dependencies: + d3-array "2.10.0 - 3" + d3-format "1 - 3" + d3-interpolate "1.2.0 - 3" + d3-time "2.1.1 - 3" + d3-time-format "2 - 4" + +"d3-selection@2 - 3", d3-selection@3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-3.0.0.tgz#c25338207efa72cc5b9bd1458a1a41901f1e1b31" + integrity sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ== + +d3-shape@3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-3.2.0.tgz#a1a839cbd9ba45f28674c69d7f855bcf91dfc6a5" + integrity sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA== + dependencies: + d3-path "^3.1.0" + +d3-shape@^1.2.0: + version "1.3.7" + resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-1.3.7.tgz#df63801be07bc986bc54f63789b4fe502992b5d7" + integrity sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw== + dependencies: + d3-path "1" + +"d3-time-format@2 - 4", d3-time-format@4: + version "4.1.0" + resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-4.1.0.tgz#7ab5257a5041d11ecb4fe70a5c7d16a195bb408a" + integrity sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg== + dependencies: + d3-time "1 - 3" + +"d3-time@1 - 3", "d3-time@2.1.1 - 3", d3-time@3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-3.1.0.tgz#9310db56e992e3c0175e1ef385e545e48a9bb5c7" + integrity sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q== + dependencies: + d3-array "2 - 3" + +"d3-timer@1 - 3", d3-timer@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-timer/-/d3-timer-3.0.1.tgz#6284d2a2708285b1abb7e201eda4380af35e63b0" + integrity sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA== + +"d3-transition@2 - 3", d3-transition@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-transition/-/d3-transition-3.0.1.tgz#6869fdde1448868077fdd5989200cb61b2a1645f" + integrity sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w== + dependencies: + d3-color "1 - 3" + d3-dispatch "1 - 3" + d3-ease "1 - 3" + d3-interpolate "1 - 3" + d3-timer "1 - 3" + +d3-zoom@3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-zoom/-/d3-zoom-3.0.0.tgz#d13f4165c73217ffeaa54295cd6969b3e7aee8f3" + integrity sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw== + dependencies: + d3-dispatch "1 - 3" + d3-drag "2 - 3" + d3-interpolate "1 - 3" + d3-selection "2 - 3" + d3-transition "2 - 3" + +d3@^7.4.0, d3@^7.8.2: + version "7.9.0" + resolved "https://registry.yarnpkg.com/d3/-/d3-7.9.0.tgz#579e7acb3d749caf8860bd1741ae8d371070cd5d" + integrity sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA== + dependencies: + d3-array "3" + d3-axis "3" + d3-brush "3" + d3-chord "3" + d3-color "3" + d3-contour "4" + d3-delaunay "6" + d3-dispatch "3" + d3-drag "3" + d3-dsv "3" + d3-ease "3" + d3-fetch "3" + d3-force "3" + d3-format "3" + d3-geo "3" + d3-hierarchy "3" + d3-interpolate "3" + d3-path "3" + d3-polygon "3" + d3-quadtree "3" + d3-random "3" + d3-scale "4" + d3-scale-chromatic "3" + d3-selection "3" + d3-shape "3" + d3-time "3" + d3-time-format "4" + d3-timer "3" + d3-transition "3" + d3-zoom "3" + +dagre-d3-es@7.0.10: + version "7.0.10" + resolved "https://registry.yarnpkg.com/dagre-d3-es/-/dagre-d3-es-7.0.10.tgz#19800d4be674379a3cd8c86a8216a2ac6827cadc" + integrity sha512-qTCQmEhcynucuaZgY5/+ti3X/rnszKZhEQH/ZdWdtP1tA/y3VoHJzcVrO9pjjJCNpigfscAtoUB5ONcd2wNn0A== + dependencies: + d3 "^7.8.2" + lodash-es "^4.17.21" + +dayjs@^1.11.7: + version "1.11.13" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.13.tgz#92430b0139055c3ebb60150aa13e860a4b5a366c" + integrity sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg== + debounce@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5" @@ -3500,6 +3874,13 @@ del@^6.1.1: rimraf "^3.0.2" slash "^3.0.0" +delaunator@5: + version "5.0.1" + resolved "https://registry.yarnpkg.com/delaunator/-/delaunator-5.0.1.tgz#39032b08053923e924d6094fe2cde1a99cc51278" + integrity sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw== + dependencies: + robust-predicates "^3.0.2" + depd@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" @@ -3548,6 +3929,11 @@ devlop@^1.0.0, devlop@^1.1.0: dependencies: dequal "^2.0.0" +diff@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531" + integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== + dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -3618,6 +4004,11 @@ domhandler@^5.0.2, domhandler@^5.0.3: dependencies: domelementtype "^2.3.0" +"dompurify@^3.0.5 <3.1.7": + version "3.1.6" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.1.6.tgz#43c714a94c6a7b8801850f82e756685300a027e2" + integrity sha512-cTOAhc36AalkjtBpfG6O8JimdTMWNXjiePT2xQH/ppBGi/4uIpmj8eKyIkMJErXWARyINV/sB38yf8JCLF5pbQ== + domutils@^2.5.2, domutils@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" @@ -3627,7 +4018,7 @@ domutils@^2.5.2, domutils@^2.8.0: domelementtype "^2.2.0" domhandler "^4.2.0" -domutils@^3.0.1, domutils@^3.1.0: +domutils@^3.0.1: version "3.1.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-3.1.0.tgz#c47f551278d3dc4b0b1ab8cbb42d751a6f0d824e" integrity sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA== @@ -3676,6 +4067,11 @@ electron-to-chromium@^1.5.28: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.36.tgz#ec41047f0e1446ec5dce78ed5970116533139b88" integrity sha512-HYTX8tKge/VNp6FGO+f/uVDmUkq+cEfcxYhKf15Akc4M5yxt5YmorwlAitKWjWhWQnKcDRBAQKXkhqqXMqcrjw== +elkjs@^0.9.0: + version "0.9.3" + resolved "https://registry.yarnpkg.com/elkjs/-/elkjs-0.9.3.tgz#16711f8ceb09f1b12b99e971b138a8384a529161" + integrity sha512-f/ZeWvW/BCXbhGEf1Ujp29EASo/lk1FDnETgNKwJrsVvGZhUWCZyg3xLJjAsxfOmt8KjswHmI5EwCQcPMpOYhQ== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -3711,14 +4107,6 @@ encodeurl@~2.0.0: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58" integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg== -encoding-sniffer@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/encoding-sniffer/-/encoding-sniffer-0.2.0.tgz#799569d66d443babe82af18c9f403498365ef1d5" - integrity sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg== - dependencies: - iconv-lite "^0.6.3" - whatwg-encoding "^3.1.1" - enhanced-resolve@^5.17.1: version "5.17.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" @@ -4691,15 +5079,15 @@ htmlparser2@^6.1.0: domutils "^2.5.2" entities "^2.0.0" -htmlparser2@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-9.1.0.tgz#cdb498d8a75a51f739b61d3f718136c369bc8c23" - integrity sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ== +htmlparser2@^8.0.1: + version "8.0.2" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-8.0.2.tgz#f002151705b383e62433b5cf466f5b716edaec21" + integrity sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA== dependencies: domelementtype "^2.3.0" domhandler "^5.0.3" - domutils "^3.1.0" - entities "^4.5.0" + domutils "^3.0.1" + entities "^4.4.0" http-cache-semantics@^4.1.1: version "4.1.1" @@ -4777,7 +5165,7 @@ iconv-lite@0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -iconv-lite@0.6.3, iconv-lite@^0.6.3: +iconv-lite@0.6: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== @@ -4877,6 +5265,16 @@ inline-style-parser@0.2.4: resolved "https://registry.yarnpkg.com/inline-style-parser/-/inline-style-parser-0.2.4.tgz#f4af5fe72e612839fcd453d989a586566d695f22" integrity sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q== +"internmap@1 - 2": + version "2.0.3" + resolved "https://registry.yarnpkg.com/internmap/-/internmap-2.0.3.tgz#6685f23755e43c524e251d29cbc97248e3061009" + integrity sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg== + +internmap@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/internmap/-/internmap-1.0.1.tgz#0017cc8a3b99605f0302f2b198d272e015e5df95" + integrity sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw== + interpret@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" @@ -5216,6 +5614,13 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" +katex@^0.16.9: + version "0.16.11" + resolved "https://registry.yarnpkg.com/katex/-/katex-0.16.11.tgz#4bc84d5584f996abece5f01c6ad11304276a33f5" + integrity sha512-RQrI8rlHY92OLf3rho/Ts8i/XvjgguEjOkO1BEXcU3N8BqPpSzBNwV/G0Ukr+P/l3ivvJUE/Fa/CwbS6HesGNQ== + dependencies: + commander "^8.3.0" + keyv@^4.5.3: version "4.5.4" resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" @@ -5223,6 +5628,11 @@ keyv@^4.5.3: dependencies: json-buffer "3.0.1" +khroma@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/khroma/-/khroma-2.1.0.tgz#45f2ce94ce231a437cf5b63c2e886e6eb42bbbb1" + integrity sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw== + kind-of@^6.0.0, kind-of@^6.0.2: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" @@ -5233,6 +5643,11 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== +kleur@^4.0.3: + version "4.1.5" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780" + integrity sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ== + latest-version@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-7.0.0.tgz#843201591ea81a4d404932eeb61240fe04e9e5da" @@ -5248,6 +5663,11 @@ launch-editor@^2.6.0: picocolors "^1.0.0" shell-quote "^1.8.1" +layout-base@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/layout-base/-/layout-base-1.0.2.tgz#1291e296883c322a9dd4c5dd82063721b53e26e2" + integrity sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg== + leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -5304,6 +5724,11 @@ locate-path@^7.1.0: dependencies: p-locate "^6.0.0" +lodash-es@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee" + integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== + lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" @@ -5389,6 +5814,24 @@ mdast-util-find-and-replace@^3.0.0, mdast-util-find-and-replace@^3.0.1: unist-util-is "^6.0.0" unist-util-visit-parents "^6.0.0" +mdast-util-from-markdown@^1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.1.tgz#9421a5a247f10d31d2faed2a30df5ec89ceafcf0" + integrity sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww== + dependencies: + "@types/mdast" "^3.0.0" + "@types/unist" "^2.0.0" + decode-named-character-reference "^1.0.0" + mdast-util-to-string "^3.1.0" + micromark "^3.0.0" + micromark-util-decode-numeric-character-reference "^1.0.0" + micromark-util-decode-string "^1.0.0" + micromark-util-normalize-identifier "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-types "^1.0.0" + unist-util-stringify-position "^3.0.0" + uvu "^0.5.0" + mdast-util-from-markdown@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.1.tgz#32a6e8f512b416e1f51eb817fc64bd867ebcd9cc" @@ -5574,6 +6017,13 @@ mdast-util-to-markdown@^2.0.0: unist-util-visit "^5.0.0" zwitch "^2.0.0" +mdast-util-to-string@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-3.2.0.tgz#66f7bb6324756741c5f47a53557f0cbf16b6f789" + integrity sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg== + dependencies: + "@types/mdast" "^3.0.0" + mdast-util-to-string@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz#7a5121475556a04e7eddeb67b264aae79d312814" @@ -5618,11 +6068,59 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== +mermaid@^10.4.0: + version "10.9.2" + resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-10.9.2.tgz#108fe98060e6fba6bc826e5b454674aa2d32b817" + integrity sha512-UkZyMSuIYcI1Q0H+2pv/5CiY84sOwQ2XlKoDZMl9Y/MtrLEtxQtyA6LWGkMxnZxj0dJqI+7nw51bYjNnrbdFsQ== + dependencies: + "@braintree/sanitize-url" "^6.0.1" + "@types/d3-scale" "^4.0.3" + "@types/d3-scale-chromatic" "^3.0.0" + cytoscape "^3.28.1" + cytoscape-cose-bilkent "^4.1.0" + d3 "^7.4.0" + d3-sankey "^0.12.3" + dagre-d3-es "7.0.10" + dayjs "^1.11.7" + dompurify "^3.0.5 <3.1.7" + elkjs "^0.9.0" + katex "^0.16.9" + khroma "^2.0.0" + lodash-es "^4.17.21" + mdast-util-from-markdown "^1.3.0" + non-layered-tidy-tree-layout "^2.0.2" + stylis "^4.1.3" + ts-dedent "^2.2.0" + uuid "^9.0.0" + web-worker "^1.2.0" + methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== +micromark-core-commonmark@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/micromark-core-commonmark/-/micromark-core-commonmark-1.1.0.tgz#1386628df59946b2d39fb2edfd10f3e8e0a75bb8" + integrity sha512-BgHO1aRbolh2hcrzL2d1La37V0Aoz73ymF8rAcKnohLy93titmv62E0gP8Hrx9PKcKrqCZ1BbLGbP3bEhoXYlw== + dependencies: + decode-named-character-reference "^1.0.0" + micromark-factory-destination "^1.0.0" + micromark-factory-label "^1.0.0" + micromark-factory-space "^1.0.0" + micromark-factory-title "^1.0.0" + micromark-factory-whitespace "^1.0.0" + micromark-util-character "^1.0.0" + micromark-util-chunked "^1.0.0" + micromark-util-classify-character "^1.0.0" + micromark-util-html-tag-name "^1.0.0" + micromark-util-normalize-identifier "^1.0.0" + micromark-util-resolve-all "^1.0.0" + micromark-util-subtokenize "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-types "^1.0.1" + uvu "^0.5.0" + micromark-core-commonmark@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/micromark-core-commonmark/-/micromark-core-commonmark-2.0.1.tgz#9a45510557d068605c6e9a80f282b2bb8581e43d" @@ -5814,6 +6312,15 @@ micromark-extension-mdxjs@^3.0.0: micromark-util-combine-extensions "^2.0.0" micromark-util-types "^2.0.0" +micromark-factory-destination@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/micromark-factory-destination/-/micromark-factory-destination-1.1.0.tgz#eb815957d83e6d44479b3df640f010edad667b9f" + integrity sha512-XaNDROBgx9SgSChd69pjiGKbV+nfHGDPVYFs5dOoDd7ZnMAE+Cuu91BCpsY8RT2NP9vo/B8pds2VQNCLiu0zhg== + dependencies: + micromark-util-character "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-types "^1.0.0" + micromark-factory-destination@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/micromark-factory-destination/-/micromark-factory-destination-2.0.0.tgz#857c94debd2c873cba34e0445ab26b74f6a6ec07" @@ -5823,6 +6330,16 @@ micromark-factory-destination@^2.0.0: micromark-util-symbol "^2.0.0" micromark-util-types "^2.0.0" +micromark-factory-label@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/micromark-factory-label/-/micromark-factory-label-1.1.0.tgz#cc95d5478269085cfa2a7282b3de26eb2e2dec68" + integrity sha512-OLtyez4vZo/1NjxGhcpDSbHQ+m0IIGnT8BoPamh+7jVlzLJBH98zzuCoUeMxvM6WsNeh8wx8cKvqLiPHEACn0w== + dependencies: + micromark-util-character "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-types "^1.0.0" + uvu "^0.5.0" + micromark-factory-label@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/micromark-factory-label/-/micromark-factory-label-2.0.0.tgz#17c5c2e66ce39ad6f4fc4cbf40d972f9096f726a" @@ -5864,6 +6381,16 @@ micromark-factory-space@^2.0.0: micromark-util-character "^2.0.0" micromark-util-types "^2.0.0" +micromark-factory-title@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/micromark-factory-title/-/micromark-factory-title-1.1.0.tgz#dd0fe951d7a0ac71bdc5ee13e5d1465ad7f50ea1" + integrity sha512-J7n9R3vMmgjDOCY8NPw55jiyaQnH5kBdV2/UXCtZIpnHH3P6nHUKaH7XXEYuWwx/xUJcawa8plLBEjMPU24HzQ== + dependencies: + micromark-factory-space "^1.0.0" + micromark-util-character "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-types "^1.0.0" + micromark-factory-title@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/micromark-factory-title/-/micromark-factory-title-2.0.0.tgz#726140fc77892af524705d689e1cf06c8a83ea95" @@ -5874,6 +6401,16 @@ micromark-factory-title@^2.0.0: micromark-util-symbol "^2.0.0" micromark-util-types "^2.0.0" +micromark-factory-whitespace@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/micromark-factory-whitespace/-/micromark-factory-whitespace-1.1.0.tgz#798fb7489f4c8abafa7ca77eed6b5745853c9705" + integrity sha512-v2WlmiymVSp5oMg+1Q0N1Lxmt6pMhIHD457whWM7/GUlEks1hI9xj5w3zbc4uuMKXGisksZk8DzP2UyGbGqNsQ== + dependencies: + micromark-factory-space "^1.0.0" + micromark-util-character "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-types "^1.0.0" + micromark-factory-whitespace@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.0.tgz#9e92eb0f5468083381f923d9653632b3cfb5f763" @@ -5900,6 +6437,13 @@ micromark-util-character@^2.0.0: micromark-util-symbol "^2.0.0" micromark-util-types "^2.0.0" +micromark-util-chunked@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/micromark-util-chunked/-/micromark-util-chunked-1.1.0.tgz#37a24d33333c8c69a74ba12a14651fd9ea8a368b" + integrity sha512-Ye01HXpkZPNcV6FiyoW2fGZDUw4Yc7vT0E9Sad83+bEDiCJ1uXu0S3mr8WLpsz3HaG3x2q0HM6CTuPdcZcluFQ== + dependencies: + micromark-util-symbol "^1.0.0" + micromark-util-chunked@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/micromark-util-chunked/-/micromark-util-chunked-2.0.0.tgz#e51f4db85fb203a79dbfef23fd41b2f03dc2ef89" @@ -5907,6 +6451,15 @@ micromark-util-chunked@^2.0.0: dependencies: micromark-util-symbol "^2.0.0" +micromark-util-classify-character@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/micromark-util-classify-character/-/micromark-util-classify-character-1.1.0.tgz#6a7f8c8838e8a120c8e3c4f2ae97a2bff9190e9d" + integrity sha512-SL0wLxtKSnklKSUplok1WQFoGhUdWYKggKUiqhX+Swala+BtptGCu5iPRc+xvzJ4PXE/hwM3FNXsfEVgoZsWbw== + dependencies: + micromark-util-character "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-types "^1.0.0" + micromark-util-classify-character@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/micromark-util-classify-character/-/micromark-util-classify-character-2.0.0.tgz#8c7537c20d0750b12df31f86e976d1d951165f34" @@ -5916,6 +6469,14 @@ micromark-util-classify-character@^2.0.0: micromark-util-symbol "^2.0.0" micromark-util-types "^2.0.0" +micromark-util-combine-extensions@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.1.0.tgz#192e2b3d6567660a85f735e54d8ea6e3952dbe84" + integrity sha512-Q20sp4mfNf9yEqDL50WwuWZHUrCO4fEyeDCnMGmG5Pr0Cz15Uo7KBs6jq+dq0EgX4DPwwrh9m0X+zPV1ypFvUA== + dependencies: + micromark-util-chunked "^1.0.0" + micromark-util-types "^1.0.0" + micromark-util-combine-extensions@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.0.tgz#75d6ab65c58b7403616db8d6b31315013bfb7ee5" @@ -5924,6 +6485,13 @@ micromark-util-combine-extensions@^2.0.0: micromark-util-chunked "^2.0.0" micromark-util-types "^2.0.0" +micromark-util-decode-numeric-character-reference@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.1.0.tgz#b1e6e17009b1f20bc652a521309c5f22c85eb1c6" + integrity sha512-m9V0ExGv0jB1OT21mrWcuf4QhP46pH1KkfWy9ZEezqHKAxkj4mPCy3nIH1rkbdMlChLHX531eOrymlwyZIf2iw== + dependencies: + micromark-util-symbol "^1.0.0" + micromark-util-decode-numeric-character-reference@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.1.tgz#2698bbb38f2a9ba6310e359f99fcb2b35a0d2bd5" @@ -5931,6 +6499,16 @@ micromark-util-decode-numeric-character-reference@^2.0.0: dependencies: micromark-util-symbol "^2.0.0" +micromark-util-decode-string@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/micromark-util-decode-string/-/micromark-util-decode-string-1.1.0.tgz#dc12b078cba7a3ff690d0203f95b5d5537f2809c" + integrity sha512-YphLGCK8gM1tG1bd54azwyrQRjCFcmgj2S2GoJDNnh4vYtnL38JS8M4gpxzOPNyHdNEpheyWXCTnnTDY3N+NVQ== + dependencies: + decode-named-character-reference "^1.0.0" + micromark-util-character "^1.0.0" + micromark-util-decode-numeric-character-reference "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-decode-string@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/micromark-util-decode-string/-/micromark-util-decode-string-2.0.0.tgz#7dfa3a63c45aecaa17824e656bcdb01f9737154a" @@ -5941,6 +6519,11 @@ micromark-util-decode-string@^2.0.0: micromark-util-decode-numeric-character-reference "^2.0.0" micromark-util-symbol "^2.0.0" +micromark-util-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/micromark-util-encode/-/micromark-util-encode-1.1.0.tgz#92e4f565fd4ccb19e0dcae1afab9a173bbeb19a5" + integrity sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw== + micromark-util-encode@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/micromark-util-encode/-/micromark-util-encode-2.0.0.tgz#0921ac7953dc3f1fd281e3d1932decfdb9382ab1" @@ -5960,11 +6543,23 @@ micromark-util-events-to-acorn@^2.0.0: micromark-util-types "^2.0.0" vfile-message "^4.0.0" +micromark-util-html-tag-name@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.2.0.tgz#48fd7a25826f29d2f71479d3b4e83e94829b3588" + integrity sha512-VTQzcuQgFUD7yYztuQFKXT49KghjtETQ+Wv/zUjGSGBioZnkA4P1XXZPT1FHeJA6RwRXSF47yvJ1tsJdoxwO+Q== + micromark-util-html-tag-name@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.0.tgz#ae34b01cbe063363847670284c6255bb12138ec4" integrity sha512-xNn4Pqkj2puRhKdKTm8t1YHC/BAjx6CEwRFXntTaRf/x16aqka6ouVoutm+QdkISTlT7e2zU7U4ZdlDLJd2Mcw== +micromark-util-normalize-identifier@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.1.0.tgz#7a73f824eb9f10d442b4d7f120fecb9b38ebf8b7" + integrity sha512-N+w5vhqrBihhjdpM8+5Xsxy71QWqGn7HYNUvch71iV2PM7+E3uWGox1Qp90loa1ephtCxG2ftRV/Conitc6P2Q== + dependencies: + micromark-util-symbol "^1.0.0" + micromark-util-normalize-identifier@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.0.tgz#91f9a4e65fe66cc80c53b35b0254ad67aa431d8b" @@ -5972,6 +6567,13 @@ micromark-util-normalize-identifier@^2.0.0: dependencies: micromark-util-symbol "^2.0.0" +micromark-util-resolve-all@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/micromark-util-resolve-all/-/micromark-util-resolve-all-1.1.0.tgz#4652a591ee8c8fa06714c9b54cd6c8e693671188" + integrity sha512-b/G6BTMSg+bX+xVCshPTPyAu2tmA0E4X98NSR7eIbeC6ycCqCeE7wjfDIgzEbkzdEVJXRtOG4FbEm/uGbCRouA== + dependencies: + micromark-util-types "^1.0.0" + micromark-util-resolve-all@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.0.tgz#189656e7e1a53d0c86a38a652b284a252389f364" @@ -5979,6 +6581,15 @@ micromark-util-resolve-all@^2.0.0: dependencies: micromark-util-types "^2.0.0" +micromark-util-sanitize-uri@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.2.0.tgz#613f738e4400c6eedbc53590c67b197e30d7f90d" + integrity sha512-QO4GXv0XZfWey4pYFndLUKEAktKkG5kZTdUNaTAkzbuJxn2tNBOr+QtxR2XpWaMhbImT2dPzyLrPXLlPhph34A== + dependencies: + micromark-util-character "^1.0.0" + micromark-util-encode "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-sanitize-uri@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.0.tgz#ec8fbf0258e9e6d8f13d9e4770f9be64342673de" @@ -5988,6 +6599,16 @@ micromark-util-sanitize-uri@^2.0.0: micromark-util-encode "^2.0.0" micromark-util-symbol "^2.0.0" +micromark-util-subtokenize@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/micromark-util-subtokenize/-/micromark-util-subtokenize-1.1.0.tgz#941c74f93a93eaf687b9054aeb94642b0e92edb1" + integrity sha512-kUQHyzRoxvZO2PuLzMt2P/dwVsTiivCK8icYTeR+3WgbuPqfHgPPy7nFKbeqRivBvn/3N3GBiNC+JRTMSxEC7A== + dependencies: + micromark-util-chunked "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-types "^1.0.0" + uvu "^0.5.0" + micromark-util-subtokenize@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/micromark-util-subtokenize/-/micromark-util-subtokenize-2.0.1.tgz#76129c49ac65da6e479c09d0ec4b5f29ec6eace5" @@ -6008,7 +6629,7 @@ micromark-util-symbol@^2.0.0: resolved "https://registry.yarnpkg.com/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz#12225c8f95edf8b17254e47080ce0862d5db8044" integrity sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw== -micromark-util-types@^1.0.0: +micromark-util-types@^1.0.0, micromark-util-types@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/micromark-util-types/-/micromark-util-types-1.1.0.tgz#e6676a8cae0bb86a2171c498167971886cb7e283" integrity sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg== @@ -6018,6 +6639,29 @@ micromark-util-types@^2.0.0: resolved "https://registry.yarnpkg.com/micromark-util-types/-/micromark-util-types-2.0.0.tgz#63b4b7ffeb35d3ecf50d1ca20e68fc7caa36d95e" integrity sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w== +micromark@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/micromark/-/micromark-3.2.0.tgz#1af9fef3f995ea1ea4ac9c7e2f19c48fd5c006e9" + integrity sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA== + dependencies: + "@types/debug" "^4.0.0" + debug "^4.0.0" + decode-named-character-reference "^1.0.0" + micromark-core-commonmark "^1.0.1" + micromark-factory-space "^1.0.0" + micromark-util-character "^1.0.0" + micromark-util-chunked "^1.0.0" + micromark-util-combine-extensions "^1.0.0" + micromark-util-decode-numeric-character-reference "^1.0.0" + micromark-util-encode "^1.0.0" + micromark-util-normalize-identifier "^1.0.0" + micromark-util-resolve-all "^1.0.0" + micromark-util-sanitize-uri "^1.0.0" + micromark-util-subtokenize "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-types "^1.0.1" + uvu "^0.5.0" + micromark@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/micromark/-/micromark-4.0.0.tgz#84746a249ebd904d9658cfabc1e8e5f32cbc6249" @@ -6145,6 +6789,11 @@ minimist@^1.2.0, minimist@^1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== +mri@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" + integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== + mrmime@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-2.0.0.tgz#151082a6e06e59a9a39b46b3e14d5cfe92b3abb4" @@ -6221,6 +6870,11 @@ node-releases@^2.0.18: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== +non-layered-tidy-tree-layout@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/non-layered-tidy-tree-layout/-/non-layered-tidy-tree-layout-2.0.2.tgz#57d35d13c356643fc296a55fb11ac15e74da7804" + integrity sha512-gkXMxRzUH+PB0ax9dUN0yYF0S25BqeAYqhgMaLUFmpXLEk7Fcu8f4emJuOAY0V8kjDICxROIKsTAKsV/v355xw== + normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" @@ -6454,14 +7108,7 @@ parse5-htmlparser2-tree-adapter@^7.0.0: domhandler "^5.0.3" parse5 "^7.0.0" -parse5-parser-stream@^7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz#d7c20eadc37968d272e2c02660fff92dd27e60e1" - integrity sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow== - dependencies: - parse5 "^7.0.0" - -parse5@^7.0.0, parse5@^7.1.2: +parse5@^7.0.0: version "7.2.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.2.0.tgz#8a0591ce9b7c5e2027173ab737d4d3fc3d826fab" integrity sha512-ZkDsAOcxsUMZ4Lz5fVciOehNcJ+Gb8gTzcA4yl3wnc273BAybYWrQ+Ks/OjCjSEpjvQkDSeZbybK9qj2VHHdGA== @@ -7453,6 +8100,11 @@ rimraf@^3.0.2: dependencies: glob "^7.1.3" +robust-predicates@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/robust-predicates/-/robust-predicates-3.0.2.tgz#d5b28528c4824d20fc48df1928d41d9efa1ad771" + integrity sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg== + rtl-detect@^1.0.4: version "1.1.2" resolved "https://registry.yarnpkg.com/rtl-detect/-/rtl-detect-1.1.2.tgz#ca7f0330af5c6bb626c15675c642ba85ad6273c6" @@ -7475,6 +8127,18 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" +rw@1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4" + integrity sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ== + +sade@^1.7.3: + version "1.8.1" + resolved "https://registry.yarnpkg.com/sade/-/sade-1.8.1.tgz#0a78e81d658d394887be57d2a409bf703a3b2701" + integrity sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A== + dependencies: + mri "^1.1.0" + safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -7982,6 +8646,11 @@ stylehacks@^6.1.1: browserslist "^4.23.0" postcss-selector-parser "^6.0.16" +stylis@^4.1.3: + version "4.3.4" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.3.4.tgz#ca5c6c4a35c4784e4e93a2a24dc4e9fa075250a4" + integrity sha512-osIBl6BGUmSfDkyH2mB7EFvCJntXDrLhKjHTRj/rK6xLH0yuPrHULDRQzKokSOD4VoorhtKpfcfW1GAntu8now== + supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -8114,6 +8783,11 @@ trough@^2.0.0: resolved "https://registry.yarnpkg.com/trough/-/trough-2.2.0.tgz#94a60bd6bd375c152c1df911a4b11d5b0256f50f" integrity sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw== +ts-dedent@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ts-dedent/-/ts-dedent-2.2.0.tgz#39e4bd297cd036292ae2394eb3412be63f563bb5" + integrity sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ== + tslib@^2.0.3: version "2.2.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c" @@ -8149,11 +8823,6 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -undici@^6.19.5: - version "6.20.0" - resolved "https://registry.yarnpkg.com/undici/-/undici-6.20.0.tgz#3b94d967693759ea625a3b78b2097213f30405a1" - integrity sha512-AITZfPuxubm31Sx0vr8bteSalEbs9wQb/BOBi9FPlD9Qpd6HxZ4Q0+hI742jBhkPb4RT2v5MQzaW5VhRVyj+9A== - unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz#cb3173fe47ca743e228216e4a3ddc4c84d628cc2" @@ -8223,6 +8892,13 @@ unist-util-position@^5.0.0: dependencies: "@types/unist" "^3.0.0" +unist-util-stringify-position@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz#03ad3348210c2d930772d64b489580c13a7db39d" + integrity sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg== + dependencies: + "@types/unist" "^2.0.0" + unist-util-stringify-position@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz#449c6e21a880e0855bf5aabadeb3a740314abac2" @@ -8326,6 +9002,21 @@ uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== +uuid@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" + integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== + +uvu@^0.5.0: + version "0.5.6" + resolved "https://registry.yarnpkg.com/uvu/-/uvu-0.5.6.tgz#2754ca20bcb0bb59b64e9985e84d2e81058502df" + integrity sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA== + dependencies: + dequal "^2.0.0" + diff "^5.0.0" + kleur "^4.0.3" + sade "^1.7.3" + value-equal@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-1.0.1.tgz#1e0b794c734c5c0cade179c437d356d931a34d6c" @@ -8380,6 +9071,11 @@ web-namespaces@^2.0.0: resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-2.0.1.tgz#1010ff7c650eccb2592cebeeaf9a1b253fd40692" integrity sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ== +web-worker@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web-worker/-/web-worker-1.3.0.tgz#e5f2df5c7fe356755a5fb8f8410d4312627e6776" + integrity sha512-BSR9wyRsy/KOValMgd5kMyr3JzpdeoR9KVId8u5GVlTTAtNChlsE4yTxeY7zMdNSyOmoKBv8NH2qeRY9Tg+IaA== + webpack-bundle-analyzer@^4.9.0: version "4.10.2" resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.2.tgz#633af2862c213730be3dbdf40456db171b60d5bd" @@ -8512,18 +9208,6 @@ websocket-extensions@>=0.1.1: resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== -whatwg-encoding@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz#d0f4ef769905d426e1688f3e34381a99b60b76e5" - integrity sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ== - dependencies: - iconv-lite "0.6.3" - -whatwg-mimetype@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz#bc1bf94a985dc50388d54a9258ac405c3ca2fc0a" - integrity sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg== - which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" From 158e6f7904fe633554309617321c65de49b74419 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Sun, 13 Oct 2024 21:56:35 +0800 Subject: [PATCH 39/41] chore: remove all `util` single instance null check --- apps/example/lib/pages/shcool_info_page.dart | 2 +- apps/example/pubspec.lock | 14 +++++++------- .../lib/src/ui/announcement_content_page.dart | 6 +++--- .../lib/src/ui/home_page.dart | 5 ++--- .../lib/src/utilities/ap_media_util.dart | 6 +----- .../lib/src/pages/about_us_page.dart | 12 ++++++------ .../lib/src/scaffold/course_scaffold.dart | 16 ++++++++-------- .../lib/src/scaffold/home_page_scaffold.dart | 6 +++--- .../lib/src/scaffold/score_scaffold.dart | 6 +++--- .../lib/src/scaffold/user_info_scaffold.dart | 4 ++-- .../lib/src/views/notification_list_view.dart | 10 +++++----- .../lib/src/views/pdf_view.dart | 6 +++--- .../lib/src/views/phone_list_view.dart | 8 ++++---- .../lib/src/widgets/item_picker.dart | 2 +- .../lib/src/widgets/setting_page_widgets.dart | 14 +++++++------- 15 files changed, 56 insertions(+), 61 deletions(-) diff --git a/apps/example/lib/pages/shcool_info_page.dart b/apps/example/lib/pages/shcool_info_page.dart index 8ea9e85a..7877f3cc 100644 --- a/apps/example/lib/pages/shcool_info_page.dart +++ b/apps/example/lib/pages/shcool_info_page.dart @@ -64,7 +64,7 @@ class SchoolInfoPageState extends State @override void initState() { - AnalyticsUtil.instance?.setCurrentScreen( + AnalyticsUtil.instance.setCurrentScreen( 'SchoolInfoPage', 'school_info_page.dart', ); diff --git a/apps/example/pubspec.lock b/apps/example/pubspec.lock index daf138c4..397baff6 100644 --- a/apps/example/pubspec.lock +++ b/apps/example/pubspec.lock @@ -15,49 +15,49 @@ packages: path: "../../packages/ap_common" relative: true source: path - version: "0.26.0-dev.1" + version: "0.26.0-dev.2" ap_common_announcement_ui: dependency: "direct overridden" description: path: "../../packages/ap_common_announcement_ui" relative: true source: path - version: "0.0.2" + version: "0.0.2+1" ap_common_core: dependency: "direct overridden" description: path: "../../packages/ap_common_core" relative: true source: path - version: "0.0.3" + version: "0.0.4" ap_common_flutter_core: dependency: "direct overridden" description: path: "../../packages/ap_common_flutter_core" relative: true source: path - version: "0.0.2" + version: "0.0.2+1" ap_common_flutter_platform: dependency: "direct overridden" description: path: "../../packages/ap_common_flutter_platform" relative: true source: path - version: "0.0.2" + version: "0.0.2+1" ap_common_flutter_ui: dependency: "direct overridden" description: path: "../../packages/ap_common_flutter_ui" relative: true source: path - version: "0.0.2" + version: "0.0.2+1" ap_common_plugin: dependency: "direct main" description: path: "../../packages/ap_common_plugin" relative: true source: path - version: "0.5.0-dev.0" + version: "0.5.0-dev.1" app_tracking_transparency: dependency: transitive description: diff --git a/packages/ap_common_announcement_ui/lib/src/ui/announcement_content_page.dart b/packages/ap_common_announcement_ui/lib/src/ui/announcement_content_page.dart index 864965de..a36ced16 100644 --- a/packages/ap_common_announcement_ui/lib/src/ui/announcement_content_page.dart +++ b/packages/ap_common_announcement_ui/lib/src/ui/announcement_content_page.dart @@ -25,7 +25,7 @@ class AnnouncementContentPageState extends State { @override void initState() { - AnalyticsUtil.instance?.setCurrentScreen( + AnalyticsUtil.instance.setCurrentScreen( 'AnnouncementContentPage', 'announcement_content_page.dart', ); @@ -103,7 +103,7 @@ class AnnouncementContentPageState extends State { ), ), ); - AnalyticsUtil.instance?.logEvent('announcement_content_image_click'); + AnalyticsUtil.instance.logEvent('announcement_content_image_click'); }, child: AspectRatio( aspectRatio: orientation == Orientation.portrait ? 4 / 3 : 9 / 16, @@ -169,7 +169,7 @@ class AnnouncementContentPageState extends State { ), onPressed: () { PlatformUtil.instance.launchUrl(widget.announcement.url!); - AnalyticsUtil.instance?.logEvent('announcement_link_click'); + AnalyticsUtil.instance.logEvent('announcement_link_click'); }, child: Icon( ApIcon.exitToApp, diff --git a/packages/ap_common_announcement_ui/lib/src/ui/home_page.dart b/packages/ap_common_announcement_ui/lib/src/ui/home_page.dart index dd52124d..338093f4 100644 --- a/packages/ap_common_announcement_ui/lib/src/ui/home_page.dart +++ b/packages/ap_common_announcement_ui/lib/src/ui/home_page.dart @@ -819,9 +819,8 @@ class _AnnouncementHomePageState extends State { } catch (e, s) { if (!mounted) return; UiUtil.instance.showToast(context, ap.thirdPartyLoginFail); - CrashlyticsUtil.instance?.recordError(e, s); + CrashlyticsUtil.instance.recordError(e, s); if (isNotLogin) Navigator.of(context, rootNavigator: true).pop(); - if (CrashlyticsUtil.instance != null) rethrow; } case AnnouncementLoginType.apple: try { @@ -838,7 +837,7 @@ class _AnnouncementHomePageState extends State { if (!mounted) return; UiUtil.instance.showToast(context, ap.thirdPartyLoginFail); if (isNotLogin) Navigator.of(context, rootNavigator: true).pop(); - CrashlyticsUtil.instance?.recordError(e, s); + CrashlyticsUtil.instance.recordError(e, s); } } } diff --git a/packages/ap_common_flutter_platform/lib/src/utilities/ap_media_util.dart b/packages/ap_common_flutter_platform/lib/src/utilities/ap_media_util.dart index a442bb11..784c5969 100644 --- a/packages/ap_common_flutter_platform/lib/src/utilities/ap_media_util.dart +++ b/packages/ap_common_flutter_platform/lib/src/utilities/ap_media_util.dart @@ -79,11 +79,7 @@ class ApMediaUtil extends MediaUtil { } catch (e, s) { if (!context.mounted) return; UiUtil.instance.showToast(context, ap.unknownError); - if (CrashlyticsUtil.instance == null) { - rethrow; - } else { - CrashlyticsUtil.instance?.recordError(e, s); - } + CrashlyticsUtil.instance.recordError(e, s); } } } diff --git a/packages/ap_common_flutter_ui/lib/src/pages/about_us_page.dart b/packages/ap_common_flutter_ui/lib/src/pages/about_us_page.dart index 60ee0c68..ebb457f9 100644 --- a/packages/ap_common_flutter_ui/lib/src/pages/about_us_page.dart +++ b/packages/ap_common_flutter_ui/lib/src/pages/about_us_page.dart @@ -45,7 +45,7 @@ class AboutUsPageState extends State { @override void initState() { - AnalyticsUtil.instance?.setCurrentScreen( + AnalyticsUtil.instance.setCurrentScreen( 'AboutUsPage', 'about_us_page.dart', ); @@ -82,7 +82,7 @@ class AboutUsPageState extends State { ), ), ); - AnalyticsUtil.instance?.logEvent('license_page_click'); + AnalyticsUtil.instance.logEvent('license_page_click'); }, ), ], @@ -179,7 +179,7 @@ class AboutUsPageState extends State { PlatformUtil.instance.launchUrl( 'https://m.me/${widget.fbFanPageId}', ); - AnalyticsUtil.instance?.logEvent('fb_click'); + AnalyticsUtil.instance.logEvent('fb_click'); }, iconSize: 48.0, ), @@ -192,7 +192,7 @@ class AboutUsPageState extends State { 'https://ig.me/m/$username', ); AnalyticsUtil.instance - ?.logEvent('instagram_click'); + .logEvent('instagram_click'); }, iconSize: 48.0, ), @@ -211,7 +211,7 @@ class AboutUsPageState extends State { }, ); AnalyticsUtil.instance - ?.logEvent('github_click'); + .logEvent('github_click'); }, iconSize: 48.0, ), @@ -230,7 +230,7 @@ class AboutUsPageState extends State { }, ); AnalyticsUtil.instance - ?.logEvent('email_click'); + .logEvent('email_click'); }, iconSize: 48.0, ), diff --git a/packages/ap_common_flutter_ui/lib/src/scaffold/course_scaffold.dart b/packages/ap_common_flutter_ui/lib/src/scaffold/course_scaffold.dart index 40d06d2e..170600b2 100644 --- a/packages/ap_common_flutter_ui/lib/src/scaffold/course_scaffold.dart +++ b/packages/ap_common_flutter_ui/lib/src/scaffold/course_scaffold.dart @@ -206,7 +206,7 @@ class CourseScaffoldState extends State { }, ), ); - AnalyticsUtil.instance?.logEvent('course_setting_click'); + AnalyticsUtil.instance.logEvent('course_setting_click'); }, tooltip: ApLocalizations.of(context).courseScaffoldSetting, ), @@ -255,7 +255,7 @@ class CourseScaffoldState extends State { child: RefreshIndicator( onRefresh: () async { await widget.onRefresh!(); - AnalyticsUtil.instance?.logEvent('course_refresh'); + AnalyticsUtil.instance.logEvent('course_refresh'); return; }, child: _body(), @@ -296,7 +296,7 @@ class CourseScaffoldState extends State { ? FloatingActionButton( onPressed: () { AnalyticsUtil.instance - ?.logEvent('course_search_button_click'); + .logEvent('course_search_button_click'); _pickSemester(); }, child: const Icon(Icons.search), @@ -439,7 +439,7 @@ class CourseScaffoldState extends State { context, ), ); - AnalyticsUtil.instance?.logEvent('export_course_table_image_success'); + AnalyticsUtil.instance.logEvent('export_course_table_image_success'); } else { if (!mounted) return; UiUtil.instance.showToast(context, app.unknownError); @@ -766,7 +766,7 @@ class _CourseContentState extends State { timeZone: 'GMT+8', ); AnalyticsUtil.instance - ?.logEvent('course_export_to_calendar'); + .logEvent('course_export_to_calendar'); }, ), IconButton( @@ -818,7 +818,7 @@ class _CourseContentState extends State { ApLocalizations.of(context).courseNotifyHint, ); AnalyticsUtil.instance - ?.logEvent('course_notify_schedule'); + .logEvent('course_notify_schedule'); } else { await NotificationUtil.instance.cancelNotify( id: courseNotify.id, @@ -835,7 +835,7 @@ class _CourseContentState extends State { } widget.notifyData!.save(); setState(() {}); - AnalyticsUtil.instance?.logEvent('course_notify_cancel'); + AnalyticsUtil.instance.logEvent('course_notify_cancel'); } if (widget.onNotifyClick != null) { if (!mounted) return; @@ -1163,7 +1163,7 @@ class CourseBorder extends StatelessWidget { : InkWell( onTap: () { onPressed?.call(sectionTime!.weekday, timeCode!, course!); - AnalyticsUtil.instance?.logEvent('course_border_click'); + AnalyticsUtil.instance.logEvent('course_border_click'); }, radius: 6.0, child: Padding( diff --git a/packages/ap_common_flutter_ui/lib/src/scaffold/home_page_scaffold.dart b/packages/ap_common_flutter_ui/lib/src/scaffold/home_page_scaffold.dart index 8067213a..f6a275f9 100644 --- a/packages/ap_common_flutter_ui/lib/src/scaffold/home_page_scaffold.dart +++ b/packages/ap_common_flutter_ui/lib/src/scaffold/home_page_scaffold.dart @@ -169,7 +169,7 @@ class HomePageScaffoldState extends State { return GestureDetector( onTap: () { widget.onImageTapped?.call(announcement); - AnalyticsUtil.instance?.logEvent('announcement_image_click'); + AnalyticsUtil.instance.logEvent('announcement_image_click'); }, onTapDown: (TapDownDetails detail) { _timer?.cancel(); @@ -308,12 +308,12 @@ class HomePageScaffoldState extends State { leftActionText: app.cancel, rightActionText: app.confirm, rightActionFunction: () { - AnalyticsUtil.instance?.logEvent('logout_dialog_confirm'); + AnalyticsUtil.instance.logEvent('logout_dialog_confirm'); SystemNavigator.pop(); }, ), ); - AnalyticsUtil.instance?.logEvent('logout_dialog_open'); + AnalyticsUtil.instance.logEvent('logout_dialog_open'); } void hideSnackBar() { diff --git a/packages/ap_common_flutter_ui/lib/src/scaffold/score_scaffold.dart b/packages/ap_common_flutter_ui/lib/src/scaffold/score_scaffold.dart index 233693c4..f4b336a6 100644 --- a/packages/ap_common_flutter_ui/lib/src/scaffold/score_scaffold.dart +++ b/packages/ap_common_flutter_ui/lib/src/scaffold/score_scaffold.dart @@ -78,7 +78,7 @@ class ScoreScaffoldState extends State { ? FloatingActionButton( onPressed: () { _pickSemester(); - AnalyticsUtil.instance?.logEvent('score_search_button_click'); + AnalyticsUtil.instance.logEvent('score_search_button_click'); }, child: const Icon(Icons.search), ) @@ -108,7 +108,7 @@ class ScoreScaffoldState extends State { child: RefreshIndicator( onRefresh: () async { await widget.onRefresh?.call(); - AnalyticsUtil.instance?.logEvent('score_refresh'); + AnalyticsUtil.instance.logEvent('score_refresh'); return; }, child: _body(), @@ -290,7 +290,7 @@ class _ScoreContentState extends State { ? () { widget.onScoreSelect!(i); AnalyticsUtil.instance - ?.logEvent('score_title_click'); + .logEvent('score_title_click'); } : null, ), diff --git a/packages/ap_common_flutter_ui/lib/src/scaffold/user_info_scaffold.dart b/packages/ap_common_flutter_ui/lib/src/scaffold/user_info_scaffold.dart index db6dfed2..a814a6bd 100644 --- a/packages/ap_common_flutter_ui/lib/src/scaffold/user_info_scaffold.dart +++ b/packages/ap_common_flutter_ui/lib/src/scaffold/user_info_scaffold.dart @@ -69,7 +69,7 @@ class UserInfoScaffoldState extends State { () => codeMode = BarCodeMode .values[(codeMode.index + 1) % BarCodeMode.values.length], ); - AnalyticsUtil.instance?.logEvent('user_info_barcode_switch'); + AnalyticsUtil.instance.logEvent('user_info_barcode_switch'); }, ), ], @@ -77,7 +77,7 @@ class UserInfoScaffoldState extends State { body: RefreshIndicator( onRefresh: () async { if (widget.onRefresh != null) await widget.onRefresh!(); - AnalyticsUtil.instance?.logEvent('user_info_refresh'); + AnalyticsUtil.instance.logEvent('user_info_refresh'); return; }, child: ListView( diff --git a/packages/ap_common_flutter_ui/lib/src/views/notification_list_view.dart b/packages/ap_common_flutter_ui/lib/src/views/notification_list_view.dart index 6779520a..f33cc9cb 100644 --- a/packages/ap_common_flutter_ui/lib/src/views/notification_list_view.dart +++ b/packages/ap_common_flutter_ui/lib/src/views/notification_list_view.dart @@ -42,7 +42,7 @@ class NotificationListViewState extends State @override void initState() { - AnalyticsUtil.instance?.setCurrentScreen( + AnalyticsUtil.instance.setCurrentScreen( 'NotificationListView', 'notification_list_view.dart', ); @@ -64,11 +64,11 @@ class NotificationListViewState extends State '${notification.info.title}\n${notification.link}', sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size, ); - AnalyticsUtil.instance?.logEvent('share_long_click'); + AnalyticsUtil.instance.logEvent('share_long_click'); }, onTap: () { PlatformUtil.instance.launchUrl(notification.link); - AnalyticsUtil.instance?.logEvent('notification_link_click'); + AnalyticsUtil.instance.logEvent('notification_link_click'); }, child: Container( width: double.infinity, @@ -129,7 +129,7 @@ class NotificationListViewState extends State return InkWell( onTap: () { widget.onRefresh.call(); - AnalyticsUtil.instance?.logEvent(AnalyticsConstants.refresh); + AnalyticsUtil.instance.logEvent(AnalyticsConstants.refresh); }, child: HintContent( icon: ApIcon.assignment, @@ -161,7 +161,7 @@ class NotificationListViewState extends State if (controller!.position.extentAfter < 500) { if (widget.state == NotificationState.finish) { widget.onLoadingMore?.call(); - AnalyticsUtil.instance?.logEvent('notification_load_more'); + AnalyticsUtil.instance.logEvent('notification_load_more'); } } } diff --git a/packages/ap_common_flutter_ui/lib/src/views/pdf_view.dart b/packages/ap_common_flutter_ui/lib/src/views/pdf_view.dart index 4f149be0..e1735193 100644 --- a/packages/ap_common_flutter_ui/lib/src/views/pdf_view.dart +++ b/packages/ap_common_flutter_ui/lib/src/views/pdf_view.dart @@ -28,7 +28,7 @@ class PdfView extends StatefulWidget { class _PdfViewState extends State { @override void initState() { - AnalyticsUtil.instance?.setCurrentScreen( + AnalyticsUtil.instance.setCurrentScreen( 'PdfView', 'pdf_view.dart', ); @@ -57,7 +57,7 @@ class _PdfViewState extends State { children: [ FloatingActionButton( onPressed: () async { - AnalyticsUtil.instance?.logEvent('export_by_share'); + AnalyticsUtil.instance.logEvent('export_by_share'); await Printing.sharePdf( bytes: widget.data!, filename: '${widget.fileName ?? 'export'}.pdf', @@ -68,7 +68,7 @@ class _PdfViewState extends State { const SizedBox(height: 16.0), FloatingActionButton( onPressed: () async { - AnalyticsUtil.instance?.logEvent('export_by_printing'); + AnalyticsUtil.instance.logEvent('export_by_printing'); await Printing.layoutPdf( name: widget.fileName ?? 'export', onLayout: (PdfPageFormat format) => widget.data!, diff --git a/packages/ap_common_flutter_ui/lib/src/views/phone_list_view.dart b/packages/ap_common_flutter_ui/lib/src/views/phone_list_view.dart index 0106d94c..229c0598 100644 --- a/packages/ap_common_flutter_ui/lib/src/views/phone_list_view.dart +++ b/packages/ap_common_flutter_ui/lib/src/views/phone_list_view.dart @@ -38,7 +38,7 @@ class PhoneListViewState extends State @override void initState() { - AnalyticsUtil.instance?.setCurrentScreen( + AnalyticsUtil.instance.setCurrentScreen( 'PhoneListView', 'phone_list_view.dart', ); @@ -117,12 +117,12 @@ class PhoneListViewState extends State Widget _phoneItem(PhoneModel phone) { return InkWell( onTap: () { - AnalyticsUtil.instance?.logEvent('call_phone_click'); + AnalyticsUtil.instance.logEvent('call_phone_click'); try { PlatformUtil.instance.callPhone(phone.number); - AnalyticsUtil.instance?.logEvent('call_phone_success'); + AnalyticsUtil.instance.logEvent('call_phone_success'); } catch (e) { - AnalyticsUtil.instance?.logEvent('call_phone_error'); + AnalyticsUtil.instance.logEvent('call_phone_error'); } }, child: Container( diff --git a/packages/ap_common_flutter_ui/lib/src/widgets/item_picker.dart b/packages/ap_common_flutter_ui/lib/src/widgets/item_picker.dart index 3532f59c..3e9b98eb 100644 --- a/packages/ap_common_flutter_ui/lib/src/widgets/item_picker.dart +++ b/packages/ap_common_flutter_ui/lib/src/widgets/item_picker.dart @@ -31,7 +31,7 @@ class ItemPicker extends StatelessWidget { ), ); if (featureTag != null) { - AnalyticsUtil.instance?.logEvent('${featureTag}_item_picker_click'); + AnalyticsUtil.instance.logEvent('${featureTag}_item_picker_click'); } }, child: Padding( diff --git a/packages/ap_common_flutter_ui/lib/src/widgets/setting_page_widgets.dart b/packages/ap_common_flutter_ui/lib/src/widgets/setting_page_widgets.dart index 0cf915d5..595ea40a 100644 --- a/packages/ap_common_flutter_ui/lib/src/widgets/setting_page_widgets.dart +++ b/packages/ap_common_flutter_ui/lib/src/widgets/setting_page_widgets.dart @@ -223,18 +223,18 @@ class ChangeLanguageItem extends StatelessWidget { onChange.call(locale); PreferenceUtil.instance .setString(ApConstants.prefLanguageCode, code); - AnalyticsUtil.instance?.logEvent( + AnalyticsUtil.instance.logEvent( 'change_language', parameters: {'code': code}, ); - AnalyticsUtil.instance?.setUserProperty( + AnalyticsUtil.instance.setUserProperty( AnalyticsConstants.language, locale.toLanguageTag(), ); }, ), ); - AnalyticsUtil.instance?.logEvent('language_setting_click'); + AnalyticsUtil.instance.logEvent('language_setting_click'); }, ); } @@ -274,7 +274,7 @@ class ChangeThemeModeItem extends StatelessWidget { onChange.call(mode); PreferenceUtil.instance .setInt(ApConstants.prefThemeModeIndex, index); - AnalyticsUtil.instance?.logEvent( + AnalyticsUtil.instance.logEvent( 'change_theme', parameters: { 'code': mode.toString(), @@ -284,7 +284,7 @@ class ChangeThemeModeItem extends StatelessWidget { }, ), ); - AnalyticsUtil.instance?.logEvent('theme_mode_setting_click'); + AnalyticsUtil.instance.logEvent('theme_mode_setting_click'); }, ); } @@ -321,14 +321,14 @@ class ChangeIconStyleItem extends StatelessWidget { PreferenceUtil.instance .setString(ApConstants.prefIconStyleCode, code); onChange.call(code); - AnalyticsUtil.instance?.logEvent( + AnalyticsUtil.instance.logEvent( 'change_icon_style', parameters: {'code': code}, ); }, ), ); - AnalyticsUtil.instance?.logEvent('icon_style_setting_click'); + AnalyticsUtil.instance.logEvent('icon_style_setting_click'); }, ); } From 7cd8aa05fa52bdafc8b91ce9c5e9d4d59ffb41ae Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Sun, 13 Oct 2024 21:57:44 +0800 Subject: [PATCH 40/41] chore(release): publish packages - ap_common@0.26.0-dev.3 - ap_common_announcement_ui@0.0.3 - ap_common_core@0.0.5 - ap_common_firebase@0.17.0-dev.4 - ap_common_flutter_core@0.0.3 - ap_common_flutter_platform@0.0.3 - ap_common_flutter_ui@0.0.3 - ap_common_plugin@0.5.0-dev.2 --- CHANGELOG.md | 146 ++++++++++++++++++ apps/example/pubspec.yaml | 2 +- packages/ap_common/CHANGELOG.md | 19 +++ packages/ap_common/pubspec.yaml | 8 +- .../ap_common_announcement_ui/CHANGELOG.md | 9 ++ .../ap_common_announcement_ui/pubspec.yaml | 6 +- packages/ap_common_core/CHANGELOG.md | 25 +++ packages/ap_common_core/pubspec.yaml | 2 +- packages/ap_common_firebase/CHANGELOG.md | 23 +++ packages/ap_common_firebase/pubspec.yaml | 4 +- packages/ap_common_flutter_core/CHANGELOG.md | 15 ++ packages/ap_common_flutter_core/pubspec.yaml | 4 +- .../ap_common_flutter_platform/CHANGELOG.md | 11 ++ .../ap_common_flutter_platform/pubspec.yaml | 4 +- packages/ap_common_flutter_ui/CHANGELOG.md | 11 ++ packages/ap_common_flutter_ui/pubspec.yaml | 4 +- packages/ap_common_plugin/CHANGELOG.md | 9 ++ packages/ap_common_plugin/pubspec.yaml | 2 +- 18 files changed, 286 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d9266d1..ebc111fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,152 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## 2024-10-13 + +### Changes + +--- + +Packages with breaking changes: + + - There are no breaking changes in this release. + +Packages with other changes: + + - [`ap_common` - `v0.26.0-dev.3`](#ap_common---v0260-dev3) + - [`ap_common_announcement_ui` - `v0.0.3`](#ap_common_announcement_ui---v003) + - [`ap_common_core` - `v0.0.5`](#ap_common_core---v005) + - [`ap_common_firebase` - `v0.17.0-dev.4`](#ap_common_firebase---v0170-dev4) + - [`ap_common_flutter_core` - `v0.0.3`](#ap_common_flutter_core---v003) + - [`ap_common_flutter_platform` - `v0.0.3`](#ap_common_flutter_platform---v003) + - [`ap_common_flutter_ui` - `v0.0.3`](#ap_common_flutter_ui---v003) + - [`ap_common_plugin` - `v0.5.0-dev.2`](#ap_common_plugin---v050-dev2) + +--- + +#### `ap_common` - `v0.26.0-dev.3` + + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([803b2dcb](https://github.com/abc873693/ap_common/commit/803b2dcbb37d970de803670c7a76404356c4a651)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([55b2fa00](https://github.com/abc873693/ap_common/commit/55b2fa00ea5fa4dafb15fc19e19b33dd9d72ef92)) + - **FEAT**: `AppStoreUtil` and `PlatformUtil` for `ap_common_flutter_core`. ([f9abb16d](https://github.com/abc873693/ap_common/commit/f9abb16d2e525ff8d5d4a68cd7a098e8025cd772)) + - **FEAT**: migrate `util` `l10n` to new `ap_common_flutter_core`. ([be152bac](https://github.com/abc873693/ap_common/commit/be152bac1b94f8e80baba9c098a938c44246b810)) + - **FEAT**: centralized package lint rule. ([c2b8ad80](https://github.com/abc873693/ap_common/commit/c2b8ad8000bb19d0d5fccdaf63f0411329e6dcfa)) + - **FEAT**: migrate `NotificationUtil` and `Preference` to injection version. ([4326c12e](https://github.com/abc873693/ap_common/commit/4326c12e28732d86a1b5a0fff2fdd6d3a3c6e5e6)) + - **FEAT**: `ap_common` import `ap_common_core`. ([d463f7c7](https://github.com/abc873693/ap_common/commit/d463f7c7b5cd78c171b90eea0210f81649fc5626)) + - **FEAT**: migrate `model` `util` `config` to new `ap_common_core`. ([3887bc05](https://github.com/abc873693/ap_common/commit/3887bc05ebf8612f2b2a1cc607ec3c3fdf3135e1)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + - **FEAT**: `AppStoreUtil` and `PlatformUtil` for `ap_common_flutter_core`. ([d87dc711](https://github.com/abc873693/ap_common/commit/d87dc7117a040b31b42abd2d1122a891fd04988e)) + - **FEAT**: migrate `util` `l10n` to new `ap_common_flutter_core`. ([e91e9b4c](https://github.com/abc873693/ap_common/commit/e91e9b4cdf3cb7d4e2dde1dd8ec5f66556d38461)) + - **FEAT**: centralized package lint rule. ([08db9e1f](https://github.com/abc873693/ap_common/commit/08db9e1f00118f11ef389b194585626d7c51c3ab)) + - **FEAT**: migrate `NotificationUtil` and `Preference` to injection version. ([ac50e177](https://github.com/abc873693/ap_common/commit/ac50e177cb276937b2411397959a845f98fa297a)) + - **FEAT**: `ap_common` import `ap_common_core`. ([a6aa801f](https://github.com/abc873693/ap_common/commit/a6aa801f2165281be61afbe33f4072827e5979bc)) + - **FEAT**: migrate `model` `util` `config` to new `ap_common_core`. ([90f16bc9](https://github.com/abc873693/ap_common/commit/90f16bc9e38eb10f2d8f3b633f4c46a0a9e2ff95)) + +#### `ap_common_announcement_ui` - `v0.0.3` + + - **FIX**: pub publish requirement. ([1dc81f7d](https://github.com/abc873693/ap_common/commit/1dc81f7dcf5a1445aa14b66b6d2004b7d94ad6b2)) + - **FIX**: packages version constraint. ([8231a423](https://github.com/abc873693/ap_common/commit/8231a423b237d6f38b3531ec4fc2b06e713a6c51)) + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([803b2dcb](https://github.com/abc873693/ap_common/commit/803b2dcbb37d970de803670c7a76404356c4a651)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + +#### `ap_common_core` - `v0.0.5` + + - **FIX**: pub publish requirement. ([1dc81f7d](https://github.com/abc873693/ap_common/commit/1dc81f7dcf5a1445aa14b66b6d2004b7d94ad6b2)) + - **FIX**: `ap_common_core` separate static error. ([177a00fd](https://github.com/abc873693/ap_common/commit/177a00fd613c7d869643f8d2c7ab02bc102fc064)) + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: `ap_common_core` separate static error. ([629ba29d](https://github.com/abc873693/ap_common/commit/629ba29d7d0aa59270eec1da45e49daebe3bf8b5)) + - **FEAT**: `AnalyticsUtil` and `CrashlyticsUtil` migrate to injection version. ([0e8a9aab](https://github.com/abc873693/ap_common/commit/0e8a9aab76b2a6994dbcfdf4814e6f7104e4b312)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([803b2dcb](https://github.com/abc873693/ap_common/commit/803b2dcbb37d970de803670c7a76404356c4a651)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([55b2fa00](https://github.com/abc873693/ap_common/commit/55b2fa00ea5fa4dafb15fc19e19b33dd9d72ef92)) + - **FEAT**: migrate `util` `l10n` to new `ap_common_flutter_core`. ([be152bac](https://github.com/abc873693/ap_common/commit/be152bac1b94f8e80baba9c098a938c44246b810)) + - **FEAT**: centralized package lint rule. ([c2b8ad80](https://github.com/abc873693/ap_common/commit/c2b8ad8000bb19d0d5fccdaf63f0411329e6dcfa)) + - **FEAT**: release `ap_common_core` v0.0.2. ([7eef7658](https://github.com/abc873693/ap_common/commit/7eef76580b57b66dfd78f5692cdc2a8748f575a3)) + - **FEAT**: migrate `NotificationUtil` and `Preference` to injection version. ([4326c12e](https://github.com/abc873693/ap_common/commit/4326c12e28732d86a1b5a0fff2fdd6d3a3c6e5e6)) + - **FEAT**: `ap_common` import `ap_common_core`. ([d463f7c7](https://github.com/abc873693/ap_common/commit/d463f7c7b5cd78c171b90eea0210f81649fc5626)) + - **FEAT**: migrate `model` `util` `config` to new `ap_common_core`. ([3887bc05](https://github.com/abc873693/ap_common/commit/3887bc05ebf8612f2b2a1cc607ec3c3fdf3135e1)) + - **FEAT**: `AnalyticsUtil` and `CrashlyticsUtil` migrate to injection version. ([f633fae8](https://github.com/abc873693/ap_common/commit/f633fae8d102d32624e23acad2c00c06c27b4dde)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + - **FEAT**: migrate `util` `l10n` to new `ap_common_flutter_core`. ([e91e9b4c](https://github.com/abc873693/ap_common/commit/e91e9b4cdf3cb7d4e2dde1dd8ec5f66556d38461)) + - **FEAT**: centralized package lint rule. ([08db9e1f](https://github.com/abc873693/ap_common/commit/08db9e1f00118f11ef389b194585626d7c51c3ab)) + - **FEAT**: release `ap_common_core` v0.0.2. ([630bcec0](https://github.com/abc873693/ap_common/commit/630bcec0b9158ddd91c5fab9de1f630447547490)) + - **FEAT**: migrate `NotificationUtil` and `Preference` to injection version. ([ac50e177](https://github.com/abc873693/ap_common/commit/ac50e177cb276937b2411397959a845f98fa297a)) + - **FEAT**: `ap_common` import `ap_common_core`. ([a6aa801f](https://github.com/abc873693/ap_common/commit/a6aa801f2165281be61afbe33f4072827e5979bc)) + - **FEAT**: migrate `model` `util` `config` to new `ap_common_core`. ([90f16bc9](https://github.com/abc873693/ap_common/commit/90f16bc9e38eb10f2d8f3b633f4c46a0a9e2ff95)) + +#### `ap_common_firebase` - `v0.17.0-dev.4` + + - **FIX**: remove useless implement instance. ([a7ffaeb0](https://github.com/abc873693/ap_common/commit/a7ffaeb07914c1d1fbe32919cce95c5708843230)) + - **FIX**: pub publish requirement. ([1dc81f7d](https://github.com/abc873693/ap_common/commit/1dc81f7dcf5a1445aa14b66b6d2004b7d94ad6b2)) + - **FIX**: packages version constraint. ([8231a423](https://github.com/abc873693/ap_common/commit/8231a423b237d6f38b3531ec4fc2b06e713a6c51)) + - **FIX**: `ap_common_firebase` dependency usage. ([0c0b9e51](https://github.com/abc873693/ap_common/commit/0c0b9e510345c5482f69b4ea5fdcebdf217c565c)) + - **FIX**: `ap_common_firebase` separate static error. ([65b8a273](https://github.com/abc873693/ap_common/commit/65b8a2738092e0e261cd4088c778d54784e44b05)) + - **FIX**: remove useless implement instance. ([3ec164dd](https://github.com/abc873693/ap_common/commit/3ec164dd62590e684855128da1052cae34705bbb)) + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + - **FIX**: `ap_common_firebase` dependency usage. ([d5098b42](https://github.com/abc873693/ap_common/commit/d5098b426c00de39c0736a8ca535a76be0722331)) + - **FIX**: `ap_common_firebase` separate static error. ([1c8da8ea](https://github.com/abc873693/ap_common/commit/1c8da8ea57c7e3e48d3e53a824e76968d56a97b5)) + - **FEAT**: `AnalyticsUtil` and `CrashlyticsUtil` migrate to injection version. ([0e8a9aab](https://github.com/abc873693/ap_common/commit/0e8a9aab76b2a6994dbcfdf4814e6f7104e4b312)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([803b2dcb](https://github.com/abc873693/ap_common/commit/803b2dcbb37d970de803670c7a76404356c4a651)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([55b2fa00](https://github.com/abc873693/ap_common/commit/55b2fa00ea5fa4dafb15fc19e19b33dd9d72ef92)) + - **FEAT**: improve `ap_common_firebase` package import usage. ([7d021992](https://github.com/abc873693/ap_common/commit/7d0219927e3b4a7c2a924cdce86dd471f7564e19)) + - **FEAT**: centralized package lint rule. ([c2b8ad80](https://github.com/abc873693/ap_common/commit/c2b8ad8000bb19d0d5fccdaf63f0411329e6dcfa)) + - **FEAT**: `AnalyticsUtil` and `CrashlyticsUtil` migrate to injection version. ([f633fae8](https://github.com/abc873693/ap_common/commit/f633fae8d102d32624e23acad2c00c06c27b4dde)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + - **FEAT**: improve `ap_common_firebase` package import usage. ([aa6462c4](https://github.com/abc873693/ap_common/commit/aa6462c407b074b6fa95969765e28c85dc187de5)) + - **FEAT**: centralized package lint rule. ([08db9e1f](https://github.com/abc873693/ap_common/commit/08db9e1f00118f11ef389b194585626d7c51c3ab)) + +#### `ap_common_flutter_core` - `v0.0.3` + + - **FIX**: pub publish requirement. ([1dc81f7d](https://github.com/abc873693/ap_common/commit/1dc81f7dcf5a1445aa14b66b6d2004b7d94ad6b2)) + - **FIX**: packages version constraint. ([8231a423](https://github.com/abc873693/ap_common/commit/8231a423b237d6f38b3531ec4fc2b06e713a6c51)) + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([803b2dcb](https://github.com/abc873693/ap_common/commit/803b2dcbb37d970de803670c7a76404356c4a651)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([55b2fa00](https://github.com/abc873693/ap_common/commit/55b2fa00ea5fa4dafb15fc19e19b33dd9d72ef92)) + - **FEAT**: `AppStoreUtil` and `PlatformUtil` for `ap_common_flutter_core`. ([f9abb16d](https://github.com/abc873693/ap_common/commit/f9abb16d2e525ff8d5d4a68cd7a098e8025cd772)) + - **FEAT**: migrate `util` `l10n` to new `ap_common_flutter_core`. ([be152bac](https://github.com/abc873693/ap_common/commit/be152bac1b94f8e80baba9c098a938c44246b810)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + - **FEAT**: `AppStoreUtil` and `PlatformUtil` for `ap_common_flutter_core`. ([d87dc711](https://github.com/abc873693/ap_common/commit/d87dc7117a040b31b42abd2d1122a891fd04988e)) + - **FEAT**: migrate `util` `l10n` to new `ap_common_flutter_core`. ([e91e9b4c](https://github.com/abc873693/ap_common/commit/e91e9b4cdf3cb7d4e2dde1dd8ec5f66556d38461)) + +#### `ap_common_flutter_platform` - `v0.0.3` + + - **FIX**: pub publish requirement. ([1dc81f7d](https://github.com/abc873693/ap_common/commit/1dc81f7dcf5a1445aa14b66b6d2004b7d94ad6b2)) + - **FIX**: packages version constraint. ([8231a423](https://github.com/abc873693/ap_common/commit/8231a423b237d6f38b3531ec4fc2b06e713a6c51)) + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([803b2dcb](https://github.com/abc873693/ap_common/commit/803b2dcbb37d970de803670c7a76404356c4a651)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([55b2fa00](https://github.com/abc873693/ap_common/commit/55b2fa00ea5fa4dafb15fc19e19b33dd9d72ef92)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + +#### `ap_common_flutter_ui` - `v0.0.3` + + - **FIX**: `ApAssets` path error. ([558e5445](https://github.com/abc873693/ap_common/commit/558e54451ed7ae1d1d0a9de2e74a8c2172845b9b)) + - **FIX**: pub publish requirement. ([1dc81f7d](https://github.com/abc873693/ap_common/commit/1dc81f7dcf5a1445aa14b66b6d2004b7d94ad6b2)) + - **FIX**: packages version constraint. ([8231a423](https://github.com/abc873693/ap_common/commit/8231a423b237d6f38b3531ec4fc2b06e713a6c51)) + - **FIX**: `ApAssets` path error. ([c70fdd2d](https://github.com/abc873693/ap_common/commit/c70fdd2dd9b470215f3d28d79197fc1b427397ef)) + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([803b2dcb](https://github.com/abc873693/ap_common/commit/803b2dcbb37d970de803670c7a76404356c4a651)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + +#### `ap_common_plugin` - `v0.5.0-dev.2` + + - **FIX**: pub publish requirement. ([1dc81f7d](https://github.com/abc873693/ap_common/commit/1dc81f7dcf5a1445aa14b66b6d2004b7d94ad6b2)) + - **FIX**: packages version constraint. ([8231a423](https://github.com/abc873693/ap_common/commit/8231a423b237d6f38b3531ec4fc2b06e713a6c51)) + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + - **FEAT**: centralized package lint rule. ([c2b8ad80](https://github.com/abc873693/ap_common/commit/c2b8ad8000bb19d0d5fccdaf63f0411329e6dcfa)) + - **FEAT**: centralized package lint rule. ([08db9e1f](https://github.com/abc873693/ap_common/commit/08db9e1f00118f11ef389b194585626d7c51c3ab)) + + ## 2024-10-12 ### Changes diff --git a/apps/example/pubspec.yaml b/apps/example/pubspec.yaml index 63fba60d..2f444328 100644 --- a/apps/example/pubspec.yaml +++ b/apps/example/pubspec.yaml @@ -23,7 +23,7 @@ dependencies: sprintf: any multiple_localization: any - ap_common_plugin: 0.5.0-dev.1 + ap_common_plugin: 0.5.0-dev.2 # path: ../../../GitHub/ap_common_plugin dependency_overrides: diff --git a/packages/ap_common/CHANGELOG.md b/packages/ap_common/CHANGELOG.md index 8cab33da..a3d32176 100644 --- a/packages/ap_common/CHANGELOG.md +++ b/packages/ap_common/CHANGELOG.md @@ -1,3 +1,22 @@ +## 0.26.0-dev.3 + + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([803b2dcb](https://github.com/abc873693/ap_common/commit/803b2dcbb37d970de803670c7a76404356c4a651)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([55b2fa00](https://github.com/abc873693/ap_common/commit/55b2fa00ea5fa4dafb15fc19e19b33dd9d72ef92)) + - **FEAT**: `AppStoreUtil` and `PlatformUtil` for `ap_common_flutter_core`. ([f9abb16d](https://github.com/abc873693/ap_common/commit/f9abb16d2e525ff8d5d4a68cd7a098e8025cd772)) + - **FEAT**: migrate `util` `l10n` to new `ap_common_flutter_core`. ([be152bac](https://github.com/abc873693/ap_common/commit/be152bac1b94f8e80baba9c098a938c44246b810)) + - **FEAT**: centralized package lint rule. ([c2b8ad80](https://github.com/abc873693/ap_common/commit/c2b8ad8000bb19d0d5fccdaf63f0411329e6dcfa)) + - **FEAT**: migrate `NotificationUtil` and `Preference` to injection version. ([4326c12e](https://github.com/abc873693/ap_common/commit/4326c12e28732d86a1b5a0fff2fdd6d3a3c6e5e6)) + - **FEAT**: `ap_common` import `ap_common_core`. ([d463f7c7](https://github.com/abc873693/ap_common/commit/d463f7c7b5cd78c171b90eea0210f81649fc5626)) + - **FEAT**: migrate `model` `util` `config` to new `ap_common_core`. ([3887bc05](https://github.com/abc873693/ap_common/commit/3887bc05ebf8612f2b2a1cc607ec3c3fdf3135e1)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + - **FEAT**: `AppStoreUtil` and `PlatformUtil` for `ap_common_flutter_core`. ([d87dc711](https://github.com/abc873693/ap_common/commit/d87dc7117a040b31b42abd2d1122a891fd04988e)) + - **FEAT**: migrate `util` `l10n` to new `ap_common_flutter_core`. ([e91e9b4c](https://github.com/abc873693/ap_common/commit/e91e9b4cdf3cb7d4e2dde1dd8ec5f66556d38461)) + - **FEAT**: centralized package lint rule. ([08db9e1f](https://github.com/abc873693/ap_common/commit/08db9e1f00118f11ef389b194585626d7c51c3ab)) + - **FEAT**: migrate `NotificationUtil` and `Preference` to injection version. ([ac50e177](https://github.com/abc873693/ap_common/commit/ac50e177cb276937b2411397959a845f98fa297a)) + - **FEAT**: `ap_common` import `ap_common_core`. ([a6aa801f](https://github.com/abc873693/ap_common/commit/a6aa801f2165281be61afbe33f4072827e5979bc)) + - **FEAT**: migrate `model` `util` `config` to new `ap_common_core`. ([90f16bc9](https://github.com/abc873693/ap_common/commit/90f16bc9e38eb10f2d8f3b633f4c46a0a9e2ff95)) + ## 0.26.0-dev.2 - Update a dependency to the latest release. diff --git a/packages/ap_common/pubspec.yaml b/packages/ap_common/pubspec.yaml index 5552f392..46c19d5a 100644 --- a/packages/ap_common/pubspec.yaml +++ b/packages/ap_common/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common description: The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app -version: 0.26.0-dev.2 +version: 0.26.0-dev.3 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common @@ -13,9 +13,9 @@ dependencies: flutter_localizations: sdk: flutter - ap_common_flutter_ui: ^0.0.2+1 - ap_common_flutter_platform: ^0.0.2+1 - ap_common_announcement_ui: ^0.0.2+1 + ap_common_flutter_ui: ^0.0.3 + ap_common_flutter_platform: ^0.0.3 + ap_common_announcement_ui: ^0.0.3 #dependency_overrides: # ap_common_core: diff --git a/packages/ap_common_announcement_ui/CHANGELOG.md b/packages/ap_common_announcement_ui/CHANGELOG.md index 9f5f36a0..ceaac6c9 100644 --- a/packages/ap_common_announcement_ui/CHANGELOG.md +++ b/packages/ap_common_announcement_ui/CHANGELOG.md @@ -1,3 +1,12 @@ +## 0.0.3 + + - **FIX**: pub publish requirement. ([1dc81f7d](https://github.com/abc873693/ap_common/commit/1dc81f7dcf5a1445aa14b66b6d2004b7d94ad6b2)) + - **FIX**: packages version constraint. ([8231a423](https://github.com/abc873693/ap_common/commit/8231a423b237d6f38b3531ec4fc2b06e713a6c51)) + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([803b2dcb](https://github.com/abc873693/ap_common/commit/803b2dcbb37d970de803670c7a76404356c4a651)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + ## 0.0.2+1 - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) diff --git a/packages/ap_common_announcement_ui/pubspec.yaml b/packages/ap_common_announcement_ui/pubspec.yaml index 2c243539..17101ead 100644 --- a/packages/ap_common_announcement_ui/pubspec.yaml +++ b/packages/ap_common_announcement_ui/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_announcement_ui description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" -version: 0.0.2+1 +version: 0.0.3 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_announcement_ui @@ -12,8 +12,8 @@ environment: dependencies: flutter: sdk: flutter - ap_common_flutter_core: ^0.0.2+1 - ap_common_flutter_ui: ^0.0.2+1 + ap_common_flutter_core: ^0.0.3 + ap_common_flutter_ui: ^0.0.3 # Dart Packages path: ^1.9.0 dio_cookie_manager: ^3.1.1 diff --git a/packages/ap_common_core/CHANGELOG.md b/packages/ap_common_core/CHANGELOG.md index d6bf9a59..db9b3ebf 100644 --- a/packages/ap_common_core/CHANGELOG.md +++ b/packages/ap_common_core/CHANGELOG.md @@ -1,3 +1,28 @@ +## 0.0.5 + + - **FIX**: pub publish requirement. ([1dc81f7d](https://github.com/abc873693/ap_common/commit/1dc81f7dcf5a1445aa14b66b6d2004b7d94ad6b2)) + - **FIX**: `ap_common_core` separate static error. ([177a00fd](https://github.com/abc873693/ap_common/commit/177a00fd613c7d869643f8d2c7ab02bc102fc064)) + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: `ap_common_core` separate static error. ([629ba29d](https://github.com/abc873693/ap_common/commit/629ba29d7d0aa59270eec1da45e49daebe3bf8b5)) + - **FEAT**: `AnalyticsUtil` and `CrashlyticsUtil` migrate to injection version. ([0e8a9aab](https://github.com/abc873693/ap_common/commit/0e8a9aab76b2a6994dbcfdf4814e6f7104e4b312)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([803b2dcb](https://github.com/abc873693/ap_common/commit/803b2dcbb37d970de803670c7a76404356c4a651)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([55b2fa00](https://github.com/abc873693/ap_common/commit/55b2fa00ea5fa4dafb15fc19e19b33dd9d72ef92)) + - **FEAT**: migrate `util` `l10n` to new `ap_common_flutter_core`. ([be152bac](https://github.com/abc873693/ap_common/commit/be152bac1b94f8e80baba9c098a938c44246b810)) + - **FEAT**: centralized package lint rule. ([c2b8ad80](https://github.com/abc873693/ap_common/commit/c2b8ad8000bb19d0d5fccdaf63f0411329e6dcfa)) + - **FEAT**: release `ap_common_core` v0.0.2. ([7eef7658](https://github.com/abc873693/ap_common/commit/7eef76580b57b66dfd78f5692cdc2a8748f575a3)) + - **FEAT**: migrate `NotificationUtil` and `Preference` to injection version. ([4326c12e](https://github.com/abc873693/ap_common/commit/4326c12e28732d86a1b5a0fff2fdd6d3a3c6e5e6)) + - **FEAT**: `ap_common` import `ap_common_core`. ([d463f7c7](https://github.com/abc873693/ap_common/commit/d463f7c7b5cd78c171b90eea0210f81649fc5626)) + - **FEAT**: migrate `model` `util` `config` to new `ap_common_core`. ([3887bc05](https://github.com/abc873693/ap_common/commit/3887bc05ebf8612f2b2a1cc607ec3c3fdf3135e1)) + - **FEAT**: `AnalyticsUtil` and `CrashlyticsUtil` migrate to injection version. ([f633fae8](https://github.com/abc873693/ap_common/commit/f633fae8d102d32624e23acad2c00c06c27b4dde)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + - **FEAT**: migrate `util` `l10n` to new `ap_common_flutter_core`. ([e91e9b4c](https://github.com/abc873693/ap_common/commit/e91e9b4cdf3cb7d4e2dde1dd8ec5f66556d38461)) + - **FEAT**: centralized package lint rule. ([08db9e1f](https://github.com/abc873693/ap_common/commit/08db9e1f00118f11ef389b194585626d7c51c3ab)) + - **FEAT**: release `ap_common_core` v0.0.2. ([630bcec0](https://github.com/abc873693/ap_common/commit/630bcec0b9158ddd91c5fab9de1f630447547490)) + - **FEAT**: migrate `NotificationUtil` and `Preference` to injection version. ([ac50e177](https://github.com/abc873693/ap_common/commit/ac50e177cb276937b2411397959a845f98fa297a)) + - **FEAT**: `ap_common` import `ap_common_core`. ([a6aa801f](https://github.com/abc873693/ap_common/commit/a6aa801f2165281be61afbe33f4072827e5979bc)) + - **FEAT**: migrate `model` `util` `config` to new `ap_common_core`. ([90f16bc9](https://github.com/abc873693/ap_common/commit/90f16bc9e38eb10f2d8f3b633f4c46a0a9e2ff95)) + ## 0.0.4 - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) diff --git a/packages/ap_common_core/pubspec.yaml b/packages/ap_common_core/pubspec.yaml index cbac639e..0922ef3e 100644 --- a/packages/ap_common_core/pubspec.yaml +++ b/packages/ap_common_core/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_core description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" -version: 0.0.4 +version: 0.0.5 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_core diff --git a/packages/ap_common_firebase/CHANGELOG.md b/packages/ap_common_firebase/CHANGELOG.md index 4aef0491..15b49781 100644 --- a/packages/ap_common_firebase/CHANGELOG.md +++ b/packages/ap_common_firebase/CHANGELOG.md @@ -1,3 +1,26 @@ +## 0.17.0-dev.4 + + - **FIX**: remove useless implement instance. ([a7ffaeb0](https://github.com/abc873693/ap_common/commit/a7ffaeb07914c1d1fbe32919cce95c5708843230)) + - **FIX**: pub publish requirement. ([1dc81f7d](https://github.com/abc873693/ap_common/commit/1dc81f7dcf5a1445aa14b66b6d2004b7d94ad6b2)) + - **FIX**: packages version constraint. ([8231a423](https://github.com/abc873693/ap_common/commit/8231a423b237d6f38b3531ec4fc2b06e713a6c51)) + - **FIX**: `ap_common_firebase` dependency usage. ([0c0b9e51](https://github.com/abc873693/ap_common/commit/0c0b9e510345c5482f69b4ea5fdcebdf217c565c)) + - **FIX**: `ap_common_firebase` separate static error. ([65b8a273](https://github.com/abc873693/ap_common/commit/65b8a2738092e0e261cd4088c778d54784e44b05)) + - **FIX**: remove useless implement instance. ([3ec164dd](https://github.com/abc873693/ap_common/commit/3ec164dd62590e684855128da1052cae34705bbb)) + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + - **FIX**: `ap_common_firebase` dependency usage. ([d5098b42](https://github.com/abc873693/ap_common/commit/d5098b426c00de39c0736a8ca535a76be0722331)) + - **FIX**: `ap_common_firebase` separate static error. ([1c8da8ea](https://github.com/abc873693/ap_common/commit/1c8da8ea57c7e3e48d3e53a824e76968d56a97b5)) + - **FEAT**: `AnalyticsUtil` and `CrashlyticsUtil` migrate to injection version. ([0e8a9aab](https://github.com/abc873693/ap_common/commit/0e8a9aab76b2a6994dbcfdf4814e6f7104e4b312)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([803b2dcb](https://github.com/abc873693/ap_common/commit/803b2dcbb37d970de803670c7a76404356c4a651)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([55b2fa00](https://github.com/abc873693/ap_common/commit/55b2fa00ea5fa4dafb15fc19e19b33dd9d72ef92)) + - **FEAT**: improve `ap_common_firebase` package import usage. ([7d021992](https://github.com/abc873693/ap_common/commit/7d0219927e3b4a7c2a924cdce86dd471f7564e19)) + - **FEAT**: centralized package lint rule. ([c2b8ad80](https://github.com/abc873693/ap_common/commit/c2b8ad8000bb19d0d5fccdaf63f0411329e6dcfa)) + - **FEAT**: `AnalyticsUtil` and `CrashlyticsUtil` migrate to injection version. ([f633fae8](https://github.com/abc873693/ap_common/commit/f633fae8d102d32624e23acad2c00c06c27b4dde)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + - **FEAT**: improve `ap_common_firebase` package import usage. ([aa6462c4](https://github.com/abc873693/ap_common/commit/aa6462c407b074b6fa95969765e28c85dc187de5)) + - **FEAT**: centralized package lint rule. ([08db9e1f](https://github.com/abc873693/ap_common/commit/08db9e1f00118f11ef389b194585626d7c51c3ab)) + ## 0.17.0-dev.3 - **FIX**: remove useless implement instance. ([3ec164dd](https://github.com/abc873693/ap_common/commit/3ec164dd62590e684855128da1052cae34705bbb)) diff --git a/packages/ap_common_firebase/pubspec.yaml b/packages/ap_common_firebase/pubspec.yaml index 8677bb62..cbf5551b 100644 --- a/packages/ap_common_firebase/pubspec.yaml +++ b/packages/ap_common_firebase/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_firebase description: ap_common for firebase instructure -version: 0.17.0-dev.3 +version: 0.17.0-dev.4 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_firebase @@ -12,7 +12,7 @@ dependencies: flutter: sdk: flutter - ap_common_flutter_core: ^0.0.2+1 + ap_common_flutter_core: ^0.0.3 # path: ../../GitHub-NKUST-ITC/ap_common url_launcher: ^6.1.0 #firebase must use particular version diff --git a/packages/ap_common_flutter_core/CHANGELOG.md b/packages/ap_common_flutter_core/CHANGELOG.md index e0fa3454..110f4804 100644 --- a/packages/ap_common_flutter_core/CHANGELOG.md +++ b/packages/ap_common_flutter_core/CHANGELOG.md @@ -1,3 +1,18 @@ +## 0.0.3 + + - **FIX**: pub publish requirement. ([1dc81f7d](https://github.com/abc873693/ap_common/commit/1dc81f7dcf5a1445aa14b66b6d2004b7d94ad6b2)) + - **FIX**: packages version constraint. ([8231a423](https://github.com/abc873693/ap_common/commit/8231a423b237d6f38b3531ec4fc2b06e713a6c51)) + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([803b2dcb](https://github.com/abc873693/ap_common/commit/803b2dcbb37d970de803670c7a76404356c4a651)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([55b2fa00](https://github.com/abc873693/ap_common/commit/55b2fa00ea5fa4dafb15fc19e19b33dd9d72ef92)) + - **FEAT**: `AppStoreUtil` and `PlatformUtil` for `ap_common_flutter_core`. ([f9abb16d](https://github.com/abc873693/ap_common/commit/f9abb16d2e525ff8d5d4a68cd7a098e8025cd772)) + - **FEAT**: migrate `util` `l10n` to new `ap_common_flutter_core`. ([be152bac](https://github.com/abc873693/ap_common/commit/be152bac1b94f8e80baba9c098a938c44246b810)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + - **FEAT**: `AppStoreUtil` and `PlatformUtil` for `ap_common_flutter_core`. ([d87dc711](https://github.com/abc873693/ap_common/commit/d87dc7117a040b31b42abd2d1122a891fd04988e)) + - **FEAT**: migrate `util` `l10n` to new `ap_common_flutter_core`. ([e91e9b4c](https://github.com/abc873693/ap_common/commit/e91e9b4cdf3cb7d4e2dde1dd8ec5f66556d38461)) + ## 0.0.2+1 - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) diff --git a/packages/ap_common_flutter_core/pubspec.yaml b/packages/ap_common_flutter_core/pubspec.yaml index 1b621b1b..dddf92d0 100644 --- a/packages/ap_common_flutter_core/pubspec.yaml +++ b/packages/ap_common_flutter_core/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_flutter_core description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" -version: 0.0.2+1 +version: 0.0.3 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_flutter_core @@ -12,7 +12,7 @@ environment: dependencies: flutter: sdk: flutter - ap_common_core: ^0.0.4 + ap_common_core: ^0.0.5 dio: ^5.7.0 intl: ">=0.16.0 <1.0.0" multiple_localization: ^0.5.0 diff --git a/packages/ap_common_flutter_platform/CHANGELOG.md b/packages/ap_common_flutter_platform/CHANGELOG.md index a861a0bd..48e0e27c 100644 --- a/packages/ap_common_flutter_platform/CHANGELOG.md +++ b/packages/ap_common_flutter_platform/CHANGELOG.md @@ -1,3 +1,14 @@ +## 0.0.3 + + - **FIX**: pub publish requirement. ([1dc81f7d](https://github.com/abc873693/ap_common/commit/1dc81f7dcf5a1445aa14b66b6d2004b7d94ad6b2)) + - **FIX**: packages version constraint. ([8231a423](https://github.com/abc873693/ap_common/commit/8231a423b237d6f38b3531ec4fc2b06e713a6c51)) + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([803b2dcb](https://github.com/abc873693/ap_common/commit/803b2dcbb37d970de803670c7a76404356c4a651)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([55b2fa00](https://github.com/abc873693/ap_common/commit/55b2fa00ea5fa4dafb15fc19e19b33dd9d72ef92)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + - **FEAT**: move native platform util implement to `ap_common_flutter_platform`. ([8cb047f1](https://github.com/abc873693/ap_common/commit/8cb047f167d6f10eaab063449a88646092faff10)) + ## 0.0.2+1 - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) diff --git a/packages/ap_common_flutter_platform/pubspec.yaml b/packages/ap_common_flutter_platform/pubspec.yaml index 9cb3e84b..a060de59 100644 --- a/packages/ap_common_flutter_platform/pubspec.yaml +++ b/packages/ap_common_flutter_platform/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_flutter_platform description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" -version: 0.0.2+1 +version: 0.0.3 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_flutter_platform @@ -11,7 +11,7 @@ environment: dependencies: flutter: sdk: flutter - ap_common_flutter_core: ^0.0.2+1 + ap_common_flutter_core: ^0.0.3 # Dart Package encrypt: ^5.0.1 diff --git a/packages/ap_common_flutter_ui/CHANGELOG.md b/packages/ap_common_flutter_ui/CHANGELOG.md index a7899caf..78969753 100644 --- a/packages/ap_common_flutter_ui/CHANGELOG.md +++ b/packages/ap_common_flutter_ui/CHANGELOG.md @@ -1,3 +1,14 @@ +## 0.0.3 + + - **FIX**: `ApAssets` path error. ([558e5445](https://github.com/abc873693/ap_common/commit/558e54451ed7ae1d1d0a9de2e74a8c2172845b9b)) + - **FIX**: pub publish requirement. ([1dc81f7d](https://github.com/abc873693/ap_common/commit/1dc81f7dcf5a1445aa14b66b6d2004b7d94ad6b2)) + - **FIX**: packages version constraint. ([8231a423](https://github.com/abc873693/ap_common/commit/8231a423b237d6f38b3531ec4fc2b06e713a6c51)) + - **FIX**: `ApAssets` path error. ([c70fdd2d](https://github.com/abc873693/ap_common/commit/c70fdd2dd9b470215f3d28d79197fc1b427397ef)) + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([803b2dcb](https://github.com/abc873693/ap_common/commit/803b2dcbb37d970de803670c7a76404356c4a651)) + - **FEAT**: move UI implement to `ap_common_flutter_ui`. ([304b60fa](https://github.com/abc873693/ap_common/commit/304b60fa245dbd0b1d4d3ae649b5468e9ee46f71)) + ## 0.0.2+1 - **FIX**: `ApAssets` path error. ([c70fdd2d](https://github.com/abc873693/ap_common/commit/c70fdd2dd9b470215f3d28d79197fc1b427397ef)) diff --git a/packages/ap_common_flutter_ui/pubspec.yaml b/packages/ap_common_flutter_ui/pubspec.yaml index 689614f3..15478a4a 100644 --- a/packages/ap_common_flutter_ui/pubspec.yaml +++ b/packages/ap_common_flutter_ui/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_flutter_ui description: "The school affairs(AP) series shares the engineering kit, rapid development of the school affairs series(AP) app" -version: 0.0.2+1 +version: 0.0.3 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_flutter_ui @@ -11,7 +11,7 @@ environment: dependencies: flutter: sdk: flutter - ap_common_flutter_core: ^0.0.2+1 + ap_common_flutter_core: ^0.0.3 # Dart Package sprintf: ^7.0.0 # Flutter UI Package diff --git a/packages/ap_common_plugin/CHANGELOG.md b/packages/ap_common_plugin/CHANGELOG.md index 6a4f92ab..9a4cbb3f 100644 --- a/packages/ap_common_plugin/CHANGELOG.md +++ b/packages/ap_common_plugin/CHANGELOG.md @@ -1,3 +1,12 @@ +## 0.5.0-dev.2 + + - **FIX**: pub publish requirement. ([1dc81f7d](https://github.com/abc873693/ap_common/commit/1dc81f7dcf5a1445aa14b66b6d2004b7d94ad6b2)) + - **FIX**: packages version constraint. ([8231a423](https://github.com/abc873693/ap_common/commit/8231a423b237d6f38b3531ec4fc2b06e713a6c51)) + - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) + - **FIX**: packages version constraint. ([783781bd](https://github.com/abc873693/ap_common/commit/783781bdb314a93b89415f8de9fb6acdcd38a222)) + - **FEAT**: centralized package lint rule. ([c2b8ad80](https://github.com/abc873693/ap_common/commit/c2b8ad8000bb19d0d5fccdaf63f0411329e6dcfa)) + - **FEAT**: centralized package lint rule. ([08db9e1f](https://github.com/abc873693/ap_common/commit/08db9e1f00118f11ef389b194585626d7c51c3ab)) + ## 0.5.0-dev.1 - **FIX**: pub publish requirement. ([839ad892](https://github.com/abc873693/ap_common/commit/839ad892cb67fb04d8c1f877129faa2847c76f77)) diff --git a/packages/ap_common_plugin/pubspec.yaml b/packages/ap_common_plugin/pubspec.yaml index e6172be2..9c6f5fa4 100644 --- a/packages/ap_common_plugin/pubspec.yaml +++ b/packages/ap_common_plugin/pubspec.yaml @@ -1,6 +1,6 @@ name: ap_common_plugin description: ap_common Native Plugin -version: 0.5.0-dev.1 +version: 0.5.0-dev.2 homepage: https://github.com/abc873693/ap_common repository: https://github.com/abc873693/ap_common/tree/master/packages/ap_common_plugin From 290db095a68f484760488b5a9a5fdc45987848d7 Mon Sep 17 00:00:00 2001 From: Rainvisitor Date: Sun, 13 Oct 2024 22:38:35 +0800 Subject: [PATCH 41/41] docs: lock document theme to `dark` --- website/docusaurus.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index a68ecb67..8eb375ba 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -27,8 +27,8 @@ export default { themes: ['@docusaurus/theme-mermaid'], themeConfig: { colorMode: { - defaultMode: 'light', - disableSwitch: false, + defaultMode: 'dark', + disableSwitch: true, respectPrefersColorScheme: false, }, prism: {