commit a768c2fa73cfb642551573b53bc47ef33864e1ff
Author: 住京华 <1624109111@qq.com>
Date: Sat Aug 24 16:55:47 2024 +0800
Initial commit
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..29a3a50
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,43 @@
+# 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
+**/doc/api/
+**/ios/Flutter/.last_build_id
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.pub-cache/
+.pub/
+/build/
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release
diff --git a/.metadata b/.metadata
new file mode 100644
index 0000000..b2627e8
--- /dev/null
+++ b/.metadata
@@ -0,0 +1,30 @@
+# 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: "7c6b7e9ca485f7eaaed913c6bb50f4be6da47e30"
+ channel: "beta"
+
+project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: 7c6b7e9ca485f7eaaed913c6bb50f4be6da47e30
+ base_revision: 7c6b7e9ca485f7eaaed913c6bb50f4be6da47e30
+ - platform: windows
+ create_revision: 7c6b7e9ca485f7eaaed913c6bb50f4be6da47e30
+ base_revision: 7c6b7e9ca485f7eaaed913c6bb50f4be6da47e30
+
+ # User provided section
+
+ # List of Local paths (relative to this file) that should be
+ # ignored by the migrate tool.
+ #
+ # Files that are not part of the templates will be ignored by default.
+ unmanaged_files:
+ - 'lib/main.dart'
+ - 'ios/Runner.xcodeproj/project.pbxproj'
diff --git a/README.en.md b/README.en.md
new file mode 100644
index 0000000..e69de29
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..d114615
--- /dev/null
+++ b/README.md
@@ -0,0 +1,84 @@
+# 📔 心绪日记
+
+[简体中文](README.md) | [English](README.en.md)
+
+「心绪日记」 是一个由 Flutter 构建的跨平台日记应用,采用 Material Design 设计。它支持富文本编辑,让你可以轻松地在 Android 和 iOS 设备上创建和管理个人日记。
+
+## ✨ 功能特性
+
+- **跨平台支持**:🌍 兼容 Android、iOS、Windows(即将支持)。
+- **Material Design**:🎨 界面直观且用户友好,遵循 Material Design 设计规范。
+- **富文本编辑**:📝 支持加粗、斜体、下划线等多种格式的文本编辑。
+- **多媒体附件**:📷 可以为你的日记添加图片、音频和视频。
+- **搜索和标签**:🔍 轻松搜索和通过标签分类你的日记。
+- **可自定义主题**:🌈 支持选择浅色和深色模式,或自定义主题。
+- **数据安全**:🔒 通过密码来保障你的日记安全。
+- **云同步(即将支持)**:☁️ 支持在多个设备间同步日记。
+
+## 📸 应用截图
+
+### Andriod
+
+|  |  |
+| ------------------------------ | ------------------------------ |
+
+
+
+## 🚀 安装指南
+
+### 环境要求
+
+- Flutter SDK (>= 3.24.0)
+- Dart (>= 3.5.0)
+- 兼容的 IDE(如 Android Studio、Visual Studio Code)
+
+### 安装步骤
+
+1. **克隆仓库**:
+
+ ```bash
+
+ cd mydiaryapp
+ ```
+
+2. **安装依赖**:
+
+ ```bash
+ flutter pub get
+ ```
+
+3. **运行应用**:
+
+ ```bash
+ flutter run
+ ```
+
+4. **打包发布**:
+
+ - Android: `flutter build apk`
+ - iOS: `flutter build ios`
+
+## 📝 使用说明
+
+安装完成后,你可以通过点击“新建日记”按钮开始创建日记条目。使用富文本编辑器来格式化你的内容,添加多媒体附件,并通过标签进行组织。
+
+## 🤝 贡献指南
+
+欢迎贡献!请按照以下步骤进行贡献:
+
+1. Fork 本仓库。
+2. 创建一个新分支(`git checkout -b feature-branch-name`)。
+3. 提交你的修改(`git commit -am 'Add some feature'`)。
+4. 推送到分支(`git push origin feature-branch-name`)。
+5. 创建一个 Pull Request。
+
+请确保你的代码遵循 [Flutter 风格指南](https://flutter.dev/docs/development/tools/formatting) 并包含适当的测试。
+
+## 📄 许可证
+
+此项目基于 MIT 许可证进行许可,详情请参阅 [LICENSE](LICENSE) 文件。
+
+## 💖 鸣谢
+
+- 感谢 Flutter 团队提供出色的框架。
+- 特别感谢开源社区的宝贵贡献。
\ No newline at end of file
diff --git a/analysis_options.yaml b/analysis_options.yaml
new file mode 100644
index 0000000..0d29021
--- /dev/null
+++ b/analysis_options.yaml
@@ -0,0 +1,28 @@
+# This file configures the analyzer, which statically analyzes Dart code to
+# check for errors, warnings, and lints.
+#
+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
+# invoked from the command line by running `flutter analyze`.
+
+# The following line activates a set of recommended lints for Flutter apps,
+# packages, and plugins designed to encourage good coding practices.
+include: package:flutter_lints/flutter.yaml
+
+linter:
+ # The lint rules applied to this project can be customized in the
+ # section below to disable rules from the `package:flutter_lints/flutter.yaml`
+ # included above or to enable additional rules. A list of all available lints
+ # and their documentation is published at https://dart.dev/lints.
+ #
+ # Instead of disabling a lint rule for the entire project in the
+ # section below, it can also be suppressed for a single line of code
+ # or a specific dart file by using the `// ignore: name_of_lint` and
+ # `// ignore_for_file: name_of_lint` syntax on the line or in the file
+ # producing the lint.
+ rules:
+ # avoid_print: false # Uncomment to disable the `avoid_print` rule
+ # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
diff --git a/android/.gitignore b/android/.gitignore
new file mode 100644
index 0000000..6f56801
--- /dev/null
+++ b/android/.gitignore
@@ -0,0 +1,13 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
+key.properties
+**/*.keystore
+**/*.jks
diff --git a/android/app/build.gradle b/android/app/build.gradle
new file mode 100644
index 0000000..2d120a7
--- /dev/null
+++ b/android/app/build.gradle
@@ -0,0 +1,83 @@
+plugins {
+ id "com.android.application"
+ id "kotlin-android"
+ // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
+ id "dev.flutter.flutter-gradle-plugin"
+}
+
+def localProperties = new Properties()
+def localPropertiesFile = rootProject.file("local.properties")
+if (localPropertiesFile.exists()) {
+ localPropertiesFile.withReader("UTF-8") { reader -> localProperties.load(reader)
+ }
+}
+
+def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
+if (flutterVersionCode == null) {
+ flutterVersionCode = "1"
+}
+
+def flutterVersionName = localProperties.getProperty("flutter.versionName")
+if (flutterVersionName == null) {
+ flutterVersionName = "1.0"
+}
+
+android {
+ namespace = "cn.yooss.mood_diary"
+ compileSdk = 35
+ ndkVersion = "26.3.11579264"
+
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_17
+ targetCompatibility = JavaVersion.VERSION_17
+ }
+ signingConfigs {
+ config {
+ storeFile file('key.jks')
+ storePassword localProperties.getProperty('storePassword')
+ keyPassword localProperties.getProperty('keyPassword')
+ keyAlias 'key0'
+
+ enableV3Signing true
+ }
+ }
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId = "cn.yooss.moodiary"
+ // You can update the following values to match your application needs.
+ // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
+ minSdk = 24
+ targetSdk = 35
+ versionCode = flutterVersionCode.toInteger()
+ versionName = flutterVersionName
+ ndk {
+ abiFilters 'arm64-v8a','x86_64'
+ }
+ }
+
+ buildTypes {
+ release {
+ signingConfig = signingConfigs.config
+ }
+ debug {
+ signingConfig = signingConfigs.config
+ }
+ profile {
+ signingConfig = signingConfigs.config
+ }
+ }
+}
+
+flutter {
+ source = "../.."
+}
+dependencies {
+ implementation 'com.tencent.shiply:upgrade:2.2.0'
+ implementation 'com.tencent.shiply:upgrade-diff-pkg-patch:2.2.0'
+ implementation 'com.google.android.exoplayer:exoplayer-core:2.19.1'
+ implementation 'com.google.android.exoplayer:exoplayer-dash:2.19.1'
+ implementation 'com.google.android.exoplayer:exoplayer-hls:2.19.1'
+ implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:2.19.1'
+ implementation 'com.github.gzu-liyujiang:Android_CN_OAID:4.2.9'
+}
+
diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro
new file mode 100644
index 0000000..d9dc172
--- /dev/null
+++ b/android/app/proguard-rules.pro
@@ -0,0 +1,29 @@
+-keep class com.tencent.** { *; }
+-keep class com.google.gson.** { *; }
+-dontwarn com.tencent.**
+-keep class repeackage.com.uodis.opendevice.aidl.** { *; }
+-keep interface repeackage.com.uodis.opendevice.aidl.** { *; }
+-keep class repeackage.com.asus.msa.SupplementaryDID.** { *; }
+-keep interface repeackage.com.asus.msa.SupplementaryDID.** { *; }
+-keep class repeackage.com.bun.lib.** { *; }
+-keep interface repeackage.com.bun.lib.** { *; }
+-keep class repeackage.com.heytap.openid.** { *; }
+-keep interface repeackage.com.heytap.openid.** { *; }
+-keep class repeackage.com.samsung.android.deviceidservice.** { *; }
+-keep interface repeackage.com.samsung.android.deviceidservice.** { *; }
+-keep class repeackage.com.zui.deviceidservice.** { *; }
+-keep interface repeackage.com.zui.deviceidservice.** { *; }
+-keep class repeackage.com.coolpad.deviceidsupport.** { *; }
+-keep interface repeackage.com.coolpad.deviceidsupport.** { *; }
+-keep class repeackage.com.android.creator.** { *; }
+-keep interface repeackage.com.android.creator.** { *; }
+-keep class repeackage.com.google.android.gms.ads.identifier.internal.** { *; }
+-keep interface repeackage.com.google.android.gms.ads.identifier.internal.* { *; }
+-keep class repeackage.com.oplus.stdid.** {*; }
+-keep interface repeackage.com.oplus.stdid.** {*; }
+-keep class com.huawei.hms.ads.** {*; }
+-keep interface com.huawei.hms.ads.** {*; }
+-keep class com.hihonor.ads.** {*; }
+-keep interface com.hihonor.ads.** {*; }
+-keep class repeackage.com.qiku.id.** { *; }
+-keep interface repeackage.com.qiku.id.** { *; }
\ No newline at end of file
diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 0000000..399f698
--- /dev/null
+++ b/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..9d7c287
--- /dev/null
+++ b/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/kotlin/cn/yooss/mood_diary/HandleGetOAID.kt b/android/app/src/main/kotlin/cn/yooss/mood_diary/HandleGetOAID.kt
new file mode 100644
index 0000000..5ec4201
--- /dev/null
+++ b/android/app/src/main/kotlin/cn/yooss/mood_diary/HandleGetOAID.kt
@@ -0,0 +1,16 @@
+package cn.yooss.mood_diary
+
+import com.github.gzuliyujiang.oaid.IGetter
+import io.flutter.plugin.common.MethodChannel
+import java.lang.Exception
+
+class HandleGetOAID(private var resultCallback: MethodChannel.Result) : IGetter {
+ override fun onOAIDGetComplete(result: String?) {
+ resultCallback.success(result);
+ }
+
+ override fun onOAIDGetError(error: Exception?) {
+
+ resultCallback.error("100", "error", error);
+ }
+}
\ No newline at end of file
diff --git a/android/app/src/main/kotlin/cn/yooss/mood_diary/HandleUpgradeCallback.kt b/android/app/src/main/kotlin/cn/yooss/mood_diary/HandleUpgradeCallback.kt
new file mode 100644
index 0000000..3a9dd4b
--- /dev/null
+++ b/android/app/src/main/kotlin/cn/yooss/mood_diary/HandleUpgradeCallback.kt
@@ -0,0 +1,29 @@
+package cn.yooss.mood_diary
+
+import com.google.gson.Gson
+import com.tencent.upgrade.bean.UpgradeStrategy
+import com.tencent.upgrade.callback.UpgradeStrategyRequestCallback
+import io.flutter.plugin.common.MethodChannel
+
+/**
+ * @Description
+ * @Author 住京华 https://yooss.cn
+ * @Date 2024/6/11
+ */
+class HandleUpgradeCallback(private var result: MethodChannel.Result) :
+ UpgradeStrategyRequestCallback {
+
+ override fun onReceiveStrategy(var1: UpgradeStrategy) {
+
+ result.success(Gson().toJson(var1));
+ }
+
+ override fun onFail(var1: Int, var2: String) {
+
+ }
+
+ override fun onReceivedNoStrategy() {
+ result.success(null)
+ }
+
+}
\ No newline at end of file
diff --git a/android/app/src/main/kotlin/cn/yooss/mood_diary/MainActivity.kt b/android/app/src/main/kotlin/cn/yooss/mood_diary/MainActivity.kt
new file mode 100644
index 0000000..91bf46a
--- /dev/null
+++ b/android/app/src/main/kotlin/cn/yooss/mood_diary/MainActivity.kt
@@ -0,0 +1,102 @@
+package cn.yooss.mood_diary
+
+import android.graphics.Color
+import androidx.core.view.ViewCompat
+import androidx.core.view.WindowCompat
+import com.github.gzuliyujiang.oaid.DeviceID
+import com.tencent.shiply.processor.DiffPkgHandler
+import com.tencent.shiply.processor.OriginBasePkgFile
+import com.tencent.upgrade.bean.UpgradeConfig
+import com.tencent.upgrade.core.UpgradeManager
+import io.flutter.embedding.android.FlutterFragmentActivity
+import io.flutter.embedding.engine.FlutterEngine
+import io.flutter.plugin.common.MethodChannel
+
+
+class MainActivity : FlutterFragmentActivity() {
+
+
+ override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
+ super.configureFlutterEngine(flutterEngine)
+ MethodChannel(
+ flutterEngine.dartExecutor.binaryMessenger, "view_channel"
+ ).setMethodCallHandler { call, result ->
+ if (call.method == "setSystemUIVisibility") {
+ setSystemUIVisibility()
+ result.success(null)
+ } else {
+ result.notImplemented()
+ }
+ }
+ MethodChannel(
+ flutterEngine.dartExecutor.binaryMessenger, "shiply_channel"
+ ).setMethodCallHandler { call, result ->
+ when (call.method) {
+ "initShiply" -> {
+ initShiply()
+ result.success(null)
+ }
+
+
+ "checkUpdate" -> {
+ checkUpdate(result)
+ }
+
+ "startDownload" -> {
+ startDownload()
+ result.success(null)
+ }
+
+ else -> {
+ result.notImplemented()
+ }
+ }
+ }
+ MethodChannel(
+ flutterEngine.dartExecutor.binaryMessenger, "oaid_channel"
+ ).setMethodCallHandler { call, result ->
+ when (call.method) {
+ "getOAID" -> {
+ getOAID(result)
+ }
+
+ else -> {
+ result.notImplemented()
+ }
+ }
+ }
+
+ }
+
+
+ private fun checkUpdate(result: MethodChannel.Result) {
+ UpgradeManager.getInstance().checkUpgrade(true, null, HandleUpgradeCallback(result))
+ }
+
+ private fun startDownload() {
+ UpgradeManager.getInstance().startDownload()
+ }
+
+ private fun initShiply() {
+ val builder: UpgradeConfig.Builder = UpgradeConfig.Builder()
+ val config: UpgradeConfig =
+ builder.appId("").appKey("")
+ .diffPkgHandler(DiffPkgHandler()).basePkgFileForDiffUpgrade(OriginBasePkgFile())
+ .cacheExpireTime(1000 * 60 * 60 * 6).userId("").build()
+ UpgradeManager.getInstance().init(application, config)
+ }
+
+ private fun getOAID(resultCallback: MethodChannel.Result) {
+ if (DeviceID.supportedOAID(application)) {
+ DeviceID.getOAID(application, HandleGetOAID(resultCallback));
+ }
+ }
+
+ private fun setSystemUIVisibility() {
+ val windowInsetsController = ViewCompat.getWindowInsetsController(window.decorView)
+ WindowCompat.setDecorFitsSystemWindows(window, false)
+ //window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
+ window.navigationBarColor = Color.TRANSPARENT
+ }
+
+}
diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 0000000..f74085f
--- /dev/null
+++ b/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml
new file mode 100644
index 0000000..cd8c23c
--- /dev/null
+++ b/android/app/src/main/res/drawable/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..31af4ff
--- /dev/null
+++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..4ae7d12
--- /dev/null
+++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp
new file mode 100644
index 0000000..1773772
Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.webp b/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.webp
new file mode 100644
index 0000000..d0534d7
Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.webp differ
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
new file mode 100644
index 0000000..e1f9062
Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp differ
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..341577c
Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp
new file mode 100644
index 0000000..de0ebd9
Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.webp b/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.webp
new file mode 100644
index 0000000..60b8e35
Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.webp differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
new file mode 100644
index 0000000..295d7ed
Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..aba352f
Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
new file mode 100644
index 0000000..1bae111
Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.webp b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.webp
new file mode 100644
index 0000000..34458b2
Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.webp differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
new file mode 100644
index 0000000..eccf4b1
Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..575c497
Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
new file mode 100644
index 0000000..0060480
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.webp b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.webp
new file mode 100644
index 0000000..6c466a1
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.webp differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 0000000..4cd9188
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..08a8131
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
new file mode 100644
index 0000000..2168208
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.webp b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.webp
new file mode 100644
index 0000000..f73db9b
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.webp differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 0000000..ec51b5b
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..83e23b9
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
diff --git a/android/app/src/main/res/values-en/appname.xml b/android/app/src/main/res/values-en/appname.xml
new file mode 100644
index 0000000..9369d51
--- /dev/null
+++ b/android/app/src/main/res/values-en/appname.xml
@@ -0,0 +1,4 @@
+
+
+ Moodiary
+
\ No newline at end of file
diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 0000000..06952be
--- /dev/null
+++ b/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/values-zh/appname.xml b/android/app/src/main/res/values-zh/appname.xml
new file mode 100644
index 0000000..983a7d0
--- /dev/null
+++ b/android/app/src/main/res/values-zh/appname.xml
@@ -0,0 +1,4 @@
+
+
+ 心绪日记
+
\ No newline at end of file
diff --git a/android/app/src/main/res/values/appname.xml b/android/app/src/main/res/values/appname.xml
new file mode 100644
index 0000000..983a7d0
--- /dev/null
+++ b/android/app/src/main/res/values/appname.xml
@@ -0,0 +1,4 @@
+
+
+ 心绪日记
+
\ No newline at end of file
diff --git a/android/app/src/main/res/values/ic_launcher_background.xml b/android/app/src/main/res/values/ic_launcher_background.xml
new file mode 100644
index 0000000..c5d5899
--- /dev/null
+++ b/android/app/src/main/res/values/ic_launcher_background.xml
@@ -0,0 +1,4 @@
+
+
+ #FFFFFF
+
\ No newline at end of file
diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..cb1ef88
--- /dev/null
+++ b/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/xml/network_security_config.xml b/android/app/src/main/res/xml/network_security_config.xml
new file mode 100644
index 0000000..bb6ab93
--- /dev/null
+++ b/android/app/src/main/res/xml/network_security_config.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 0000000..399f698
--- /dev/null
+++ b/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/android/build.gradle b/android/build.gradle
new file mode 100644
index 0000000..0892f70
--- /dev/null
+++ b/android/build.gradle
@@ -0,0 +1,27 @@
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ maven { url "https://maven.aliyun.com/repository/google" }
+ maven { url "https://maven.aliyun.com/repository/jcenter" }
+ maven { url "https://maven.aliyun.com/nexus/content/groups/public" }
+ maven { url "https://tencent-tds-maven.pkg.coding.net/repository/shiply/repo" }
+ maven { url "https://storage.googleapis.com/download.flutter.io" }
+ maven { url 'https://jitpack.io' }
+ maven { url 'https://developer.hihonor.com/repo' }
+ maven { url 'https://developer.huawei.com/repo' }
+
+ }
+}
+
+rootProject.buildDir = "../build"
+subprojects {
+ project.buildDir = "${rootProject.buildDir}/${project.name}"
+}
+subprojects {
+ project.evaluationDependsOn(":app")
+}
+
+tasks.register("clean", Delete) {
+ delete rootProject.buildDir
+}
diff --git a/android/gradle.properties b/android/gradle.properties
new file mode 100644
index 0000000..3b5b324
--- /dev/null
+++ b/android/gradle.properties
@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..87c9be3
--- /dev/null
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.6-all.zip
diff --git a/android/settings.gradle b/android/settings.gradle
new file mode 100644
index 0000000..a50093a
--- /dev/null
+++ b/android/settings.gradle
@@ -0,0 +1,30 @@
+pluginManagement {
+ def flutterSdkPath = {
+ def properties = new Properties()
+ file("local.properties").withInputStream { properties.load(it) }
+ def flutterSdkPath = properties.getProperty("flutter.sdk")
+ assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
+ return flutterSdkPath
+ }()
+
+ includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
+
+ repositories {
+ google()
+ mavenCentral()
+ gradlePluginPortal()
+ maven { url "https://maven.aliyun.com/repository/google" }
+ maven { url "https://maven.aliyun.com/repository/jcenter" }
+ maven { url "https://maven.aliyun.com/nexus/content/groups/public" }
+ maven { url "https://tencent-tds-maven.pkg.coding.net/repository/shiply/repo" }
+ maven { url "https://storage.googleapis.com/download.flutter.io" }
+ }
+}
+
+plugins {
+ id "dev.flutter.flutter-plugin-loader" version "1.0.0"
+ id "com.android.application" version "8.4.0" apply false
+ id "org.jetbrains.kotlin.android" version "2.0.0" apply false
+}
+
+include ":app"
diff --git a/fonts/qweather-icons.ttf b/fonts/qweather-icons.ttf
new file mode 100644
index 0000000..2945de7
Binary files /dev/null and b/fonts/qweather-icons.ttf differ
diff --git a/ios/.gitignore b/ios/.gitignore
new file mode 100644
index 0000000..7a7f987
--- /dev/null
+++ b/ios/.gitignore
@@ -0,0 +1,34 @@
+**/dgph
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+**/*sync/
+.sconsign.dblite
+.tags*
+**/.vagrant/
+**/DerivedData/
+Icon?
+**/Pods/
+**/.symlinks/
+profile
+xcuserdata
+**/.generated/
+Flutter/App.framework
+Flutter/Flutter.framework
+Flutter/Flutter.podspec
+Flutter/Generated.xcconfig
+Flutter/ephemeral/
+Flutter/app.flx
+Flutter/app.zip
+Flutter/flutter_assets/
+Flutter/flutter_export_environment.sh
+ServiceDefinitions.json
+Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3
diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 0000000..7c56964
--- /dev/null
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ App
+ CFBundleIdentifier
+ io.flutter.flutter.app
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ App
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ MinimumOSVersion
+ 12.0
+
+
diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig
new file mode 100644
index 0000000..592ceee
--- /dev/null
+++ b/ios/Flutter/Debug.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig
new file mode 100644
index 0000000..592ceee
--- /dev/null
+++ b/ios/Flutter/Release.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..7dd2ef7
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,616 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 54;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+ 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 97C146E61CF9000F007C117D /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 97C146ED1CF9000F007C117D;
+ remoteInfo = Runner;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ );
+ name = "Embed Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
+ 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
+ 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
+ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 97C146EB1CF9000F007C117D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 331C8082294A63A400263BE5 /* RunnerTests */ = {
+ isa = PBXGroup;
+ children = (
+ 331C807B294A618700263BE5 /* RunnerTests.swift */,
+ );
+ path = RunnerTests;
+ sourceTree = "";
+ };
+ 9740EEB11CF90186004384FC /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,
+ );
+ name = Flutter;
+ sourceTree = "";
+ };
+ 97C146E51CF9000F007C117D = {
+ isa = PBXGroup;
+ children = (
+ 9740EEB11CF90186004384FC /* Flutter */,
+ 97C146F01CF9000F007C117D /* Runner */,
+ 97C146EF1CF9000F007C117D /* Products */,
+ 331C8082294A63A400263BE5 /* RunnerTests */,
+ );
+ sourceTree = "";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 97C146F01CF9000F007C117D /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146FA1CF9000F007C117D /* Main.storyboard */,
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */,
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+ 97C147021CF9000F007C117D /* Info.plist */,
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
+ );
+ path = Runner;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 331C8080294A63A400263BE5 /* RunnerTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
+ buildPhases = (
+ 331C807D294A63A400263BE5 /* Sources */,
+ 331C807F294A63A400263BE5 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 331C8086294A63A400263BE5 /* PBXTargetDependency */,
+ );
+ name = RunnerTests;
+ productName = RunnerTests;
+ productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+ 97C146ED1CF9000F007C117D /* Runner */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+ buildPhases = (
+ 9740EEB61CF901F6004384FC /* Run Script */,
+ 97C146EA1CF9000F007C117D /* Sources */,
+ 97C146EB1CF9000F007C117D /* Frameworks */,
+ 97C146EC1CF9000F007C117D /* Resources */,
+ 9705A1C41CF9048500538489 /* Embed Frameworks */,
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Runner;
+ productName = Runner;
+ productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 97C146E61CF9000F007C117D /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ BuildIndependentTargetsInParallel = YES;
+ LastUpgradeCheck = 1510;
+ ORGANIZATIONNAME = "";
+ TargetAttributes = {
+ 331C8080294A63A400263BE5 = {
+ CreatedOnToolsVersion = 14.0;
+ TestTargetID = 97C146ED1CF9000F007C117D;
+ };
+ 97C146ED1CF9000F007C117D = {
+ CreatedOnToolsVersion = 7.3.1;
+ LastSwiftMigration = 1100;
+ };
+ };
+ };
+ buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 97C146E51CF9000F007C117D;
+ productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 97C146ED1CF9000F007C117D /* Runner */,
+ 331C8080294A63A400263BE5 /* RunnerTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 331C807F294A63A400263BE5 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 97C146EC1CF9000F007C117D /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
+ );
+ name = "Thin Binary";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+ };
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Run Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 331C807D294A63A400263BE5 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 97C146EA1CF9000F007C117D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 97C146ED1CF9000F007C117D /* Runner */;
+ targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C146FB1CF9000F007C117D /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C147001CF9000F007C117D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 249021D3217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Profile;
+ };
+ 249021D4217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = cn.yooss.moodDiary;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Profile;
+ };
+ 331C8088294A63A400263BE5 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = cn.yooss.moodDiary.RunnerTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+ };
+ name = Debug;
+ };
+ 331C8089294A63A400263BE5 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = cn.yooss.moodDiary.RunnerTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 5.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+ };
+ name = Release;
+ };
+ 331C808A294A63A400263BE5 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = cn.yooss.moodDiary.RunnerTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 5.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+ };
+ name = Profile;
+ };
+ 97C147031CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 97C147041CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 97C147061CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = cn.yooss.moodDiary;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Debug;
+ };
+ 97C147071CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = cn.yooss.moodDiary;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 331C8088294A63A400263BE5 /* Debug */,
+ 331C8089294A63A400263BE5 /* Release */,
+ 331C808A294A63A400263BE5 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147031CF9000F007C117D /* Debug */,
+ 97C147041CF9000F007C117D /* Release */,
+ 249021D3217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147061CF9000F007C117D /* Debug */,
+ 97C147071CF9000F007C117D /* Release */,
+ 249021D4217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 0000000..8e3ca5d
--- /dev/null
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..1d526a1
--- /dev/null
+++ b/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift
new file mode 100644
index 0000000..9074fee
--- /dev/null
+++ b/ios/Runner/AppDelegate.swift
@@ -0,0 +1,13 @@
+import Flutter
+import UIKit
+
+@UIApplicationMain
+@objc class AppDelegate: FlutterAppDelegate {
+ override func application(
+ _ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
+ ) -> Bool {
+ GeneratedPluginRegistrant.register(with: self)
+ return super.application(application, didFinishLaunchingWithOptions: launchOptions)
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..d36b1fa
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,122 @@
+{
+ "images" : [
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "83.5x83.5",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-83.5x83.5@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "1024x1024",
+ "idiom" : "ios-marketing",
+ "filename" : "Icon-App-1024x1024@1x.png",
+ "scale" : "1x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
new file mode 100644
index 0000000..dc9ada4
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
new file mode 100644
index 0000000..7353c41
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
new file mode 100644
index 0000000..797d452
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
new file mode 100644
index 0000000..6ed2d93
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
new file mode 100644
index 0000000..4cd7b00
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
new file mode 100644
index 0000000..fe73094
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
new file mode 100644
index 0000000..321773c
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
new file mode 100644
index 0000000..797d452
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
new file mode 100644
index 0000000..502f463
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
new file mode 100644
index 0000000..0ec3034
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
new file mode 100644
index 0000000..0ec3034
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
new file mode 100644
index 0000000..e9f5fea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
new file mode 100644
index 0000000..84ac32a
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
new file mode 100644
index 0000000..8953cba
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
new file mode 100644
index 0000000..0467bf1
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
new file mode 100644
index 0000000..0bedcf2
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@3x.png",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
new file mode 100644
index 0000000..89c2725
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -0,0 +1,5 @@
+# Launch Screen Assets
+
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
+
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 0000000..f2e259c
--- /dev/null
+++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 0000000..f3c2851
--- /dev/null
+++ b/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
new file mode 100644
index 0000000..529b141
--- /dev/null
+++ b/ios/Runner/Info.plist
@@ -0,0 +1,49 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ Mood Diary
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ mood_diary
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(FLUTTER_BUILD_NAME)
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ $(FLUTTER_BUILD_NUMBER)
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ CADisableMinimumFrameDurationOnPhone
+
+ UIApplicationSupportsIndirectInputEvents
+
+
+
diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h
new file mode 100644
index 0000000..308a2a5
--- /dev/null
+++ b/ios/Runner/Runner-Bridging-Header.h
@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"
diff --git a/ios/RunnerTests/RunnerTests.swift b/ios/RunnerTests/RunnerTests.swift
new file mode 100644
index 0000000..86a7c3b
--- /dev/null
+++ b/ios/RunnerTests/RunnerTests.swift
@@ -0,0 +1,12 @@
+import Flutter
+import UIKit
+import XCTest
+
+class RunnerTests: XCTestCase {
+
+ func testExample() {
+ // If you add code to the Runner application, consider adding tests here.
+ // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
+ }
+
+}
diff --git a/l10n.yaml b/l10n.yaml
new file mode 100644
index 0000000..db88673
--- /dev/null
+++ b/l10n.yaml
@@ -0,0 +1,3 @@
+arb-dir: lib/l10n
+template-arb-file: intl_zh.arb
+output-localization-file: app_localizations.dart
\ No newline at end of file
diff --git a/lib/api/api.dart b/lib/api/api.dart
new file mode 100644
index 0000000..151e8d0
--- /dev/null
+++ b/lib/api/api.dart
@@ -0,0 +1,77 @@
+import 'package:dio/dio.dart';
+import 'package:flutter/foundation.dart';
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+import 'package:mood_diary/common/models/hitokoto.dart';
+import 'package:mood_diary/common/models/hunyuan.dart';
+import 'package:mood_diary/common/models/image.dart';
+import 'package:mood_diary/common/models/weather.dart';
+import 'package:mood_diary/utils/utils.dart';
+
+class Api {
+ Api._();
+
+ static final Api _instance = Api._();
+
+ factory Api() => _instance;
+
+ Future?> getHunYuan(String id, String key, List messages, int model) async {
+ //获取时间戳
+ var timestamp = DateTime.now().millisecondsSinceEpoch;
+ var hunyuanModel = switch (model) {
+ 0 => 'hunyuan-lite',
+ 1 => 'hunyuan-standard',
+ 2 => 'hunyuan-pro',
+ _ => 'hunyuan-lite',
+ };
+ //请求正文
+ var body = {
+ 'Model': hunyuanModel,
+ 'Messages': messages.map((value) => value.toMap()).toList(),
+ 'Stream': true,
+ };
+
+ //获取签名
+ var authorization = Utils().signatureUtil.generateSignature(id, key, timestamp, body);
+ //构造请求头
+ var header = PublicHeader('ChatCompletions', timestamp ~/ 1000, '2023-09-01', authorization);
+ //发起请求
+ return await Utils().httpUtil.postStream('https://hunyuan.tencentcloudapi.com', header: header.toMap(), data: body);
+ }
+
+ Future getImageData(String url) async {
+ return (await Utils().httpUtil.get(url, type: ResponseType.bytes)).data;
+ }
+
+ Future?> updateWeather() async {
+ var position = await Utils().permissionUtil.getLocation();
+ if (position != null) {
+ var local = Localizations.localeOf(Get.context!);
+ var parameters = {
+ 'location': '${position.longitude},${position.altitude}',
+ 'key': Utils().prefUtil.getValue('qweatherKey'),
+ 'lang': local
+ };
+ var res = await Utils().httpUtil.get('https://devapi.qweather.com/v7/weather/now', parameters: parameters);
+ var weather = await compute(WeatherResponse.fromJson, res.data as Map);
+ return [
+ weather.now!.icon!,
+ weather.now!.temp!,
+ weather.now!.text!,
+ ];
+ }
+ return null;
+ }
+
+ Future?> updateHitokoto() async {
+ var res = await Utils().httpUtil.get('https://v1.hitokoto.cn');
+ var hitokoto = await compute(HitokotoResponse.fromJson, res.data as Map);
+ return [hitokoto.hitokoto!];
+ }
+
+ Future?> updateImageUrl() async {
+ var res = await Utils().httpUtil.get('https://cn.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1');
+ BingImage bingImage = await compute(BingImage.fromJson, res.data as Map);
+ return ['https://cn.bing.com${bingImage.images?[0].url}'];
+ }
+}
diff --git a/lib/common/models/hitokoto.dart b/lib/common/models/hitokoto.dart
new file mode 100644
index 0000000..238371f
--- /dev/null
+++ b/lib/common/models/hitokoto.dart
@@ -0,0 +1,60 @@
+class HitokotoResponse {
+ int? id;
+ String? uuid;
+ String? hitokoto;
+ String? type;
+ String? from;
+ String? fromWho;
+ String? creator;
+ int? creatorUid;
+ int? reviewer;
+ String? commitFrom;
+ String? createdAt;
+ int? length;
+
+ HitokotoResponse(
+ {this.id,
+ this.uuid,
+ this.hitokoto,
+ this.type,
+ this.from,
+ this.fromWho,
+ this.creator,
+ this.creatorUid,
+ this.reviewer,
+ this.commitFrom,
+ this.createdAt,
+ this.length});
+
+ HitokotoResponse.fromJson(Map json) {
+ id = json["id"];
+ uuid = json["uuid"];
+ hitokoto = json["hitokoto"];
+ type = json["type"];
+ from = json["from"];
+ fromWho = json["from_who"];
+ creator = json["creator"];
+ creatorUid = json["creator_uid"];
+ reviewer = json["reviewer"];
+ commitFrom = json["commit_from"];
+ createdAt = json["created_at"];
+ length = json["length"];
+ }
+
+ Map toJson() {
+ final Map data = {};
+ data["id"] = id;
+ data["uuid"] = uuid;
+ data["hitokoto"] = hitokoto;
+ data["type"] = type;
+ data["from"] = from;
+ data["from_who"] = fromWho;
+ data["creator"] = creator;
+ data["creator_uid"] = creatorUid;
+ data["reviewer"] = reviewer;
+ data["commit_from"] = commitFrom;
+ data["created_at"] = createdAt;
+ data["length"] = length;
+ return data;
+ }
+}
diff --git a/lib/common/models/hunyuan.dart b/lib/common/models/hunyuan.dart
new file mode 100644
index 0000000..120c1bb
--- /dev/null
+++ b/lib/common/models/hunyuan.dart
@@ -0,0 +1,134 @@
+class PublicHeader {
+ String? action;
+ int? timestamp;
+ String? version;
+ String? authorization;
+
+ Map toMap() {
+ return {
+ 'X-TC-Action': action,
+ 'X-TC-Timestamp': timestamp,
+ 'X-TC-Version': version,
+ 'Authorization': authorization,
+ };
+ }
+
+ PublicHeader.fromMap(Map map) {
+ action = map['X-TC-Action'];
+ timestamp = map['X-TC-Timestamp'];
+ version = map['X-TC-Version'];
+ authorization = map['Authorization'];
+ }
+
+ PublicHeader(this.action, this.timestamp, this.version, this.authorization);
+}
+
+class Message {
+ late String role;
+ late String content;
+
+ Message(this.role, this.content);
+
+ Map toMap() {
+ return {'Role': role, 'Content': content};
+ }
+
+ Message.fromMap(Map map) {
+ role = map['Role'];
+ content = map['Content'];
+ }
+}
+
+class HunyuanResponse {
+ String? note;
+ List? choices;
+ int? created;
+ String? id;
+ Usage? usage;
+
+ HunyuanResponse({this.note, this.choices, this.created, this.id, this.usage});
+
+ HunyuanResponse.fromJson(Map json) {
+ note = json["Note"];
+ choices = json["Choices"] == null ? null : (json["Choices"] as List).map((e) => Choices.fromJson(e)).toList();
+ created = json["Created"];
+ id = json["Id"];
+ usage = json["Usage"] == null ? null : Usage.fromJson(json["Usage"]);
+ }
+
+ Map toJson() {
+ final Map data = {};
+ data["Note"] = note;
+ if (choices != null) {
+ data["Choices"] = choices?.map((e) => e.toJson()).toList();
+ }
+ data["Created"] = created;
+ data["Id"] = id;
+ if (usage != null) {
+ data["Usage"] = usage?.toJson();
+ }
+ return data;
+ }
+}
+
+class Usage {
+ int? promptTokens;
+ int? completionTokens;
+ int? totalTokens;
+
+ Usage({this.promptTokens, this.completionTokens, this.totalTokens});
+
+ Usage.fromJson(Map json) {
+ promptTokens = json["PromptTokens"];
+ completionTokens = json["CompletionTokens"];
+ totalTokens = json["TotalTokens"];
+ }
+
+ Map toJson() {
+ final Map data = {};
+ data["PromptTokens"] = promptTokens;
+ data["CompletionTokens"] = completionTokens;
+ data["TotalTokens"] = totalTokens;
+ return data;
+ }
+}
+
+class Choices {
+ String? finishReason;
+ Delta? delta;
+
+ Choices({this.finishReason, this.delta});
+
+ Choices.fromJson(Map json) {
+ finishReason = json["FinishReason"];
+ delta = json["Delta"] == null ? null : Delta.fromJson(json["Delta"]);
+ }
+
+ Map toJson() {
+ final Map data = {};
+ data["FinishReason"] = finishReason;
+ if (delta != null) {
+ data["Delta"] = delta?.toJson();
+ }
+ return data;
+ }
+}
+
+class Delta {
+ String? role;
+ String? content;
+
+ Delta({this.role, this.content});
+
+ Delta.fromJson(Map json) {
+ role = json["Role"];
+ content = json["Content"];
+ }
+
+ Map toJson() {
+ final Map data = {};
+ data["Role"] = role;
+ data["Content"] = content;
+ return data;
+ }
+}
diff --git a/lib/common/models/image.dart b/lib/common/models/image.dart
new file mode 100644
index 0000000..8220d26
--- /dev/null
+++ b/lib/common/models/image.dart
@@ -0,0 +1,125 @@
+class BingImage {
+ List? images;
+ Tooltips? tooltips;
+
+ BingImage({this.images, this.tooltips});
+
+ BingImage.fromJson(Map json) {
+ images = json["images"] == null ? null : (json["images"] as List).map((e) => Images.fromJson(e)).toList();
+ tooltips = json["tooltips"] == null ? null : Tooltips.fromJson(json["tooltips"]);
+ }
+
+ Map toJson() {
+ final Map data = {};
+ if (images != null) {
+ data["images"] = images?.map((e) => e.toJson()).toList();
+ }
+ if (tooltips != null) {
+ data["tooltips"] = tooltips?.toJson();
+ }
+ return data;
+ }
+}
+
+class Tooltips {
+ String? loading;
+ String? previous;
+ String? next;
+ String? walle;
+ String? walls;
+
+ Tooltips({this.loading, this.previous, this.next, this.walle, this.walls});
+
+ Tooltips.fromJson(Map json) {
+ loading = json["loading"];
+ previous = json["previous"];
+ next = json["next"];
+ walle = json["walle"];
+ walls = json["walls"];
+ }
+
+ Map toJson() {
+ final Map data = {};
+ data["loading"] = loading;
+ data["previous"] = previous;
+ data["next"] = next;
+ data["walle"] = walle;
+ data["walls"] = walls;
+ return data;
+ }
+}
+
+class Images {
+ String? startdate;
+ String? fullstartdate;
+ String? enddate;
+ String? url;
+ String? urlbase;
+ String? copyright;
+ String? copyrightlink;
+ String? title;
+ String? quiz;
+ bool? wp;
+ String? hsh;
+ int? drk;
+ int? top;
+ int? bot;
+ List? hs;
+
+ Images(
+ {this.startdate,
+ this.fullstartdate,
+ this.enddate,
+ this.url,
+ this.urlbase,
+ this.copyright,
+ this.copyrightlink,
+ this.title,
+ this.quiz,
+ this.wp,
+ this.hsh,
+ this.drk,
+ this.top,
+ this.bot,
+ this.hs});
+
+ Images.fromJson(Map json) {
+ startdate = json["startdate"];
+ fullstartdate = json["fullstartdate"];
+ enddate = json["enddate"];
+ url = json["url"];
+ urlbase = json["urlbase"];
+ copyright = json["copyright"];
+ copyrightlink = json["copyrightlink"];
+ title = json["title"];
+ quiz = json["quiz"];
+ wp = json["wp"];
+ hsh = json["hsh"];
+ drk = json["drk"];
+ top = json["top"];
+ bot = json["bot"];
+ hs = json["hs"] ?? [];
+ }
+
+ Map toJson() {
+ final Map data = {};
+ data["startdate"] = startdate;
+ data["fullstartdate"] = fullstartdate;
+ data["enddate"] = enddate;
+ data["url"] = url;
+ data["urlbase"] = urlbase;
+ data["copyright"] = copyright;
+ data["copyrightlink"] = copyrightlink;
+ data["title"] = title;
+ data["quiz"] = quiz;
+ data["wp"] = wp;
+ data["hsh"] = hsh;
+ data["drk"] = drk;
+ data["top"] = top;
+ data["bot"] = bot;
+ if (hs != null) {
+ data["hs"] = hs;
+ }
+ return data;
+ }
+}
diff --git a/lib/common/models/isar/category.dart b/lib/common/models/isar/category.dart
new file mode 100644
index 0000000..da9334c
--- /dev/null
+++ b/lib/common/models/isar/category.dart
@@ -0,0 +1,12 @@
+import 'package:isar/isar.dart';
+
+part 'category.g.dart';
+
+@collection
+class Category {
+ @Id()
+ late String id;
+
+ //分类名称
+ late String categoryName;
+}
diff --git a/lib/common/models/isar/category.g.dart b/lib/common/models/isar/category.g.dart
new file mode 100644
index 0000000..786b93c
--- /dev/null
+++ b/lib/common/models/isar/category.g.dart
@@ -0,0 +1,635 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'category.dart';
+
+// **************************************************************************
+// _IsarCollectionGenerator
+// **************************************************************************
+
+// coverage:ignore-file
+// ignore_for_file: duplicate_ignore, invalid_use_of_protected_member, lines_longer_than_80_chars, constant_identifier_names, avoid_js_rounded_ints, no_leading_underscores_for_local_identifiers, require_trailing_commas, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_in_if_null_operators, library_private_types_in_public_api, prefer_const_constructors
+// ignore_for_file: type=lint
+
+extension GetCategoryCollection on Isar {
+ IsarCollection get categorys => this.collection();
+}
+
+const CategorySchema = IsarGeneratedSchema(
+ schema: IsarSchema(
+ name: 'Category',
+ idName: 'id',
+ embedded: false,
+ properties: [
+ IsarPropertySchema(
+ name: 'id',
+ type: IsarType.string,
+ ),
+ IsarPropertySchema(
+ name: 'categoryName',
+ type: IsarType.string,
+ ),
+ ],
+ indexes: [],
+ ),
+ converter: IsarObjectConverter(
+ serialize: serializeCategory,
+ deserialize: deserializeCategory,
+ deserializeProperty: deserializeCategoryProp,
+ ),
+ embeddedSchemas: [],
+);
+
+@isarProtected
+int serializeCategory(IsarWriter writer, Category object) {
+ IsarCore.writeString(writer, 1, object.id);
+ IsarCore.writeString(writer, 2, object.categoryName);
+ return Isar.fastHash(object.id);
+}
+
+@isarProtected
+Category deserializeCategory(IsarReader reader) {
+ final object = Category();
+ object.id = IsarCore.readString(reader, 1) ?? '';
+ object.categoryName = IsarCore.readString(reader, 2) ?? '';
+ return object;
+}
+
+@isarProtected
+dynamic deserializeCategoryProp(IsarReader reader, int property) {
+ switch (property) {
+ case 1:
+ return IsarCore.readString(reader, 1) ?? '';
+ case 2:
+ return IsarCore.readString(reader, 2) ?? '';
+ default:
+ throw ArgumentError('Unknown property: $property');
+ }
+}
+
+sealed class _CategoryUpdate {
+ bool call({
+ required String id,
+ String? categoryName,
+ });
+}
+
+class _CategoryUpdateImpl implements _CategoryUpdate {
+ const _CategoryUpdateImpl(this.collection);
+
+ final IsarCollection collection;
+
+ @override
+ bool call({
+ required String id,
+ Object? categoryName = ignore,
+ }) {
+ return collection.updateProperties([
+ id
+ ], {
+ if (categoryName != ignore) 2: categoryName as String?,
+ }) >
+ 0;
+ }
+}
+
+sealed class _CategoryUpdateAll {
+ int call({
+ required List id,
+ String? categoryName,
+ });
+}
+
+class _CategoryUpdateAllImpl implements _CategoryUpdateAll {
+ const _CategoryUpdateAllImpl(this.collection);
+
+ final IsarCollection collection;
+
+ @override
+ int call({
+ required List id,
+ Object? categoryName = ignore,
+ }) {
+ return collection.updateProperties(id, {
+ if (categoryName != ignore) 2: categoryName as String?,
+ });
+ }
+}
+
+extension CategoryUpdate on IsarCollection {
+ _CategoryUpdate get update => _CategoryUpdateImpl(this);
+
+ _CategoryUpdateAll get updateAll => _CategoryUpdateAllImpl(this);
+}
+
+sealed class _CategoryQueryUpdate {
+ int call({
+ String? categoryName,
+ });
+}
+
+class _CategoryQueryUpdateImpl implements _CategoryQueryUpdate {
+ const _CategoryQueryUpdateImpl(this.query, {this.limit});
+
+ final IsarQuery query;
+ final int? limit;
+
+ @override
+ int call({
+ Object? categoryName = ignore,
+ }) {
+ return query.updateProperties(limit: limit, {
+ if (categoryName != ignore) 2: categoryName as String?,
+ });
+ }
+}
+
+extension CategoryQueryUpdate on IsarQuery {
+ _CategoryQueryUpdate get updateFirst => _CategoryQueryUpdateImpl(this, limit: 1);
+
+ _CategoryQueryUpdate get updateAll => _CategoryQueryUpdateImpl(this);
+}
+
+class _CategoryQueryBuilderUpdateImpl implements _CategoryQueryUpdate {
+ const _CategoryQueryBuilderUpdateImpl(this.query, {this.limit});
+
+ final QueryBuilder query;
+ final int? limit;
+
+ @override
+ int call({
+ Object? categoryName = ignore,
+ }) {
+ final q = query.build();
+ try {
+ return q.updateProperties(limit: limit, {
+ if (categoryName != ignore) 2: categoryName as String?,
+ });
+ } finally {
+ q.close();
+ }
+ }
+}
+
+extension CategoryQueryBuilderUpdate on QueryBuilder {
+ _CategoryQueryUpdate get updateFirst => _CategoryQueryBuilderUpdateImpl(this, limit: 1);
+
+ _CategoryQueryUpdate get updateAll => _CategoryQueryBuilderUpdateImpl(this);
+}
+
+extension CategoryQueryFilter on QueryBuilder {
+ QueryBuilder idEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ EqualCondition(
+ property: 1,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idGreaterThan(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ GreaterCondition(
+ property: 1,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idGreaterThanOrEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ GreaterOrEqualCondition(
+ property: 1,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idLessThan(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ LessCondition(
+ property: 1,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idLessThanOrEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ LessOrEqualCondition(
+ property: 1,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idBetween(
+ String lower,
+ String upper, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ BetweenCondition(
+ property: 1,
+ lower: lower,
+ upper: upper,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idStartsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ StartsWithCondition(
+ property: 1,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idEndsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ EndsWithCondition(
+ property: 1,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idContains(String value, {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ ContainsCondition(
+ property: 1,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idMatches(String pattern, {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ MatchesCondition(
+ property: 1,
+ wildcard: pattern,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idIsEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ const EqualCondition(
+ property: 1,
+ value: '',
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idIsNotEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ const GreaterCondition(
+ property: 1,
+ value: '',
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryNameEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ EqualCondition(
+ property: 2,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryNameGreaterThan(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ GreaterCondition(
+ property: 2,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryNameGreaterThanOrEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ GreaterOrEqualCondition(
+ property: 2,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryNameLessThan(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ LessCondition(
+ property: 2,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryNameLessThanOrEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ LessOrEqualCondition(
+ property: 2,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryNameBetween(
+ String lower,
+ String upper, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ BetweenCondition(
+ property: 2,
+ lower: lower,
+ upper: upper,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryNameStartsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ StartsWithCondition(
+ property: 2,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryNameEndsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ EndsWithCondition(
+ property: 2,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryNameContains(String value,
+ {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ ContainsCondition(
+ property: 2,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryNameMatches(String pattern,
+ {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ MatchesCondition(
+ property: 2,
+ wildcard: pattern,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryNameIsEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ const EqualCondition(
+ property: 2,
+ value: '',
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryNameIsNotEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ const GreaterCondition(
+ property: 2,
+ value: '',
+ ),
+ );
+ });
+ }
+}
+
+extension CategoryQueryObject on QueryBuilder {}
+
+extension CategoryQuerySortBy on QueryBuilder {
+ QueryBuilder sortById({bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(
+ 1,
+ caseSensitive: caseSensitive,
+ );
+ });
+ }
+
+ QueryBuilder sortByIdDesc({bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(
+ 1,
+ sort: Sort.desc,
+ caseSensitive: caseSensitive,
+ );
+ });
+ }
+
+ QueryBuilder sortByCategoryName({bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(
+ 2,
+ caseSensitive: caseSensitive,
+ );
+ });
+ }
+
+ QueryBuilder sortByCategoryNameDesc({bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(
+ 2,
+ sort: Sort.desc,
+ caseSensitive: caseSensitive,
+ );
+ });
+ }
+}
+
+extension CategoryQuerySortThenBy on QueryBuilder {
+ QueryBuilder thenById({bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(1, caseSensitive: caseSensitive);
+ });
+ }
+
+ QueryBuilder thenByIdDesc({bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(1, sort: Sort.desc, caseSensitive: caseSensitive);
+ });
+ }
+
+ QueryBuilder thenByCategoryName({bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(2, caseSensitive: caseSensitive);
+ });
+ }
+
+ QueryBuilder thenByCategoryNameDesc({bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(2, sort: Sort.desc, caseSensitive: caseSensitive);
+ });
+ }
+}
+
+extension CategoryQueryWhereDistinct on QueryBuilder {
+ QueryBuilder distinctByCategoryName({bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addDistinctBy(2, caseSensitive: caseSensitive);
+ });
+ }
+}
+
+extension CategoryQueryProperty1 on QueryBuilder {
+ QueryBuilder idProperty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addProperty(1);
+ });
+ }
+
+ QueryBuilder categoryNameProperty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addProperty(2);
+ });
+ }
+}
+
+extension CategoryQueryProperty2 on QueryBuilder {
+ QueryBuilder idProperty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addProperty(1);
+ });
+ }
+
+ QueryBuilder categoryNameProperty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addProperty(2);
+ });
+ }
+}
+
+extension CategoryQueryProperty3 on QueryBuilder {
+ QueryBuilder idProperty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addProperty(1);
+ });
+ }
+
+ QueryBuilder categoryNameProperty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addProperty(2);
+ });
+ }
+}
diff --git a/lib/common/models/isar/diary.dart b/lib/common/models/isar/diary.dart
new file mode 100644
index 0000000..e0fb083
--- /dev/null
+++ b/lib/common/models/isar/diary.dart
@@ -0,0 +1,80 @@
+import 'package:isar/isar.dart';
+
+part 'diary.g.dart';
+
+@collection
+class Diary {
+ @Id()
+ late String id;
+
+ //分类id
+ @Index()
+ String? categoryId;
+
+ //标题
+ String? title;
+
+ //原始Delta格式内容
+ late String content;
+
+ //纯文本的内容,用于搜索以及字数统计
+ late String contentText;
+
+ //年月索引
+ @Index()
+ String get yM => '${time.year.toString()}/${time.month.toString()}';
+
+ //年月日索引
+ @Index()
+ String get yMd => '${time.year.toString()}/${time.month.toString()}/${time.day.toString()}';
+
+ //日期
+ @Index()
+ late DateTime time;
+
+ //是否显示,用于回收站
+ @Index()
+ late bool show;
+
+ //心情指数
+ late double mood;
+
+ //天气
+ late List weather;
+
+ //图片名称
+ late List imageName;
+
+ //音频名称
+ late List audioName;
+
+ //视频名称
+ late List videoName;
+
+ //标签列表
+ late List tags;
+
+ //封面颜色,如果有的话
+ int? imageColor;
+
+ //封面比例,如果有的话
+ double? aspect;
+
+ Diary({
+ required this.id,
+ required this.categoryId,
+ required this.title,
+ required this.content,
+ required this.contentText,
+ required this.time,
+ required this.show,
+ required this.mood,
+ required this.weather,
+ required this.imageName,
+ required this.audioName,
+ required this.videoName,
+ required this.tags,
+ required this.imageColor,
+ required this.aspect,
+ });
+}
diff --git a/lib/common/models/isar/diary.g.dart b/lib/common/models/isar/diary.g.dart
new file mode 100644
index 0000000..3f991b8
--- /dev/null
+++ b/lib/common/models/isar/diary.g.dart
@@ -0,0 +1,3960 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'diary.dart';
+
+// **************************************************************************
+// _IsarCollectionGenerator
+// **************************************************************************
+
+// coverage:ignore-file
+// ignore_for_file: duplicate_ignore, invalid_use_of_protected_member, lines_longer_than_80_chars, constant_identifier_names, avoid_js_rounded_ints, no_leading_underscores_for_local_identifiers, require_trailing_commas, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_in_if_null_operators, library_private_types_in_public_api, prefer_const_constructors
+// ignore_for_file: type=lint
+
+extension GetDiaryCollection on Isar {
+ IsarCollection get diarys => this.collection();
+}
+
+const DiarySchema = IsarGeneratedSchema(
+ schema: IsarSchema(
+ name: 'Diary',
+ idName: 'id',
+ embedded: false,
+ properties: [
+ IsarPropertySchema(
+ name: 'id',
+ type: IsarType.string,
+ ),
+ IsarPropertySchema(
+ name: 'categoryId',
+ type: IsarType.string,
+ ),
+ IsarPropertySchema(
+ name: 'title',
+ type: IsarType.string,
+ ),
+ IsarPropertySchema(
+ name: 'content',
+ type: IsarType.string,
+ ),
+ IsarPropertySchema(
+ name: 'contentText',
+ type: IsarType.string,
+ ),
+ IsarPropertySchema(
+ name: 'time',
+ type: IsarType.dateTime,
+ ),
+ IsarPropertySchema(
+ name: 'show',
+ type: IsarType.bool,
+ ),
+ IsarPropertySchema(
+ name: 'mood',
+ type: IsarType.double,
+ ),
+ IsarPropertySchema(
+ name: 'weather',
+ type: IsarType.stringList,
+ ),
+ IsarPropertySchema(
+ name: 'imageName',
+ type: IsarType.stringList,
+ ),
+ IsarPropertySchema(
+ name: 'audioName',
+ type: IsarType.stringList,
+ ),
+ IsarPropertySchema(
+ name: 'videoName',
+ type: IsarType.stringList,
+ ),
+ IsarPropertySchema(
+ name: 'tags',
+ type: IsarType.stringList,
+ ),
+ IsarPropertySchema(
+ name: 'imageColor',
+ type: IsarType.long,
+ ),
+ IsarPropertySchema(
+ name: 'aspect',
+ type: IsarType.double,
+ ),
+ IsarPropertySchema(
+ name: 'yM',
+ type: IsarType.string,
+ ),
+ IsarPropertySchema(
+ name: 'yMd',
+ type: IsarType.string,
+ ),
+ ],
+ indexes: [
+ IsarIndexSchema(
+ name: 'categoryId',
+ properties: [
+ "categoryId",
+ ],
+ unique: false,
+ hash: false,
+ ),
+ IsarIndexSchema(
+ name: 'time',
+ properties: [
+ "time",
+ ],
+ unique: false,
+ hash: false,
+ ),
+ IsarIndexSchema(
+ name: 'show',
+ properties: [
+ "show",
+ ],
+ unique: false,
+ hash: false,
+ ),
+ IsarIndexSchema(
+ name: 'yM',
+ properties: [
+ "yM",
+ ],
+ unique: false,
+ hash: false,
+ ),
+ IsarIndexSchema(
+ name: 'yMd',
+ properties: [
+ "yMd",
+ ],
+ unique: false,
+ hash: false,
+ ),
+ ],
+ ),
+ converter: IsarObjectConverter(
+ serialize: serializeDiary,
+ deserialize: deserializeDiary,
+ deserializeProperty: deserializeDiaryProp,
+ ),
+ embeddedSchemas: [],
+);
+
+@isarProtected
+int serializeDiary(IsarWriter writer, Diary object) {
+ IsarCore.writeString(writer, 1, object.id);
+ {
+ final value = object.categoryId;
+ if (value == null) {
+ IsarCore.writeNull(writer, 2);
+ } else {
+ IsarCore.writeString(writer, 2, value);
+ }
+ }
+ {
+ final value = object.title;
+ if (value == null) {
+ IsarCore.writeNull(writer, 3);
+ } else {
+ IsarCore.writeString(writer, 3, value);
+ }
+ }
+ IsarCore.writeString(writer, 4, object.content);
+ IsarCore.writeString(writer, 5, object.contentText);
+ IsarCore.writeLong(writer, 6, object.time.toUtc().microsecondsSinceEpoch);
+ IsarCore.writeBool(writer, 7, object.show);
+ IsarCore.writeDouble(writer, 8, object.mood);
+ {
+ final list = object.weather;
+ final listWriter = IsarCore.beginList(writer, 9, list.length);
+ for (var i = 0; i < list.length; i++) {
+ IsarCore.writeString(listWriter, i, list[i]);
+ }
+ IsarCore.endList(writer, listWriter);
+ }
+ {
+ final list = object.imageName;
+ final listWriter = IsarCore.beginList(writer, 10, list.length);
+ for (var i = 0; i < list.length; i++) {
+ IsarCore.writeString(listWriter, i, list[i]);
+ }
+ IsarCore.endList(writer, listWriter);
+ }
+ {
+ final list = object.audioName;
+ final listWriter = IsarCore.beginList(writer, 11, list.length);
+ for (var i = 0; i < list.length; i++) {
+ IsarCore.writeString(listWriter, i, list[i]);
+ }
+ IsarCore.endList(writer, listWriter);
+ }
+ {
+ final list = object.videoName;
+ final listWriter = IsarCore.beginList(writer, 12, list.length);
+ for (var i = 0; i < list.length; i++) {
+ IsarCore.writeString(listWriter, i, list[i]);
+ }
+ IsarCore.endList(writer, listWriter);
+ }
+ {
+ final list = object.tags;
+ final listWriter = IsarCore.beginList(writer, 13, list.length);
+ for (var i = 0; i < list.length; i++) {
+ IsarCore.writeString(listWriter, i, list[i]);
+ }
+ IsarCore.endList(writer, listWriter);
+ }
+ IsarCore.writeLong(writer, 14, object.imageColor ?? -9223372036854775808);
+ IsarCore.writeDouble(writer, 15, object.aspect ?? double.nan);
+ IsarCore.writeString(writer, 16, object.yM);
+ IsarCore.writeString(writer, 17, object.yMd);
+ return Isar.fastHash(object.id);
+}
+
+@isarProtected
+Diary deserializeDiary(IsarReader reader) {
+ final String _id;
+ _id = IsarCore.readString(reader, 1) ?? '';
+ final String? _categoryId;
+ _categoryId = IsarCore.readString(reader, 2);
+ final String? _title;
+ _title = IsarCore.readString(reader, 3);
+ final String _content;
+ _content = IsarCore.readString(reader, 4) ?? '';
+ final String _contentText;
+ _contentText = IsarCore.readString(reader, 5) ?? '';
+ final DateTime _time;
+ {
+ final value = IsarCore.readLong(reader, 6);
+ if (value == -9223372036854775808) {
+ _time = DateTime.fromMillisecondsSinceEpoch(0, isUtc: true).toLocal();
+ } else {
+ _time = DateTime.fromMicrosecondsSinceEpoch(value, isUtc: true).toLocal();
+ }
+ }
+ final bool _show;
+ _show = IsarCore.readBool(reader, 7);
+ final double _mood;
+ _mood = IsarCore.readDouble(reader, 8);
+ final List _weather;
+ {
+ final length = IsarCore.readList(reader, 9, IsarCore.readerPtrPtr);
+ {
+ final reader = IsarCore.readerPtr;
+ if (reader.isNull) {
+ _weather = const [];
+ } else {
+ final list = List.filled(length, '', growable: true);
+ for (var i = 0; i < length; i++) {
+ list[i] = IsarCore.readString(reader, i) ?? '';
+ }
+ IsarCore.freeReader(reader);
+ _weather = list;
+ }
+ }
+ }
+ final List _imageName;
+ {
+ final length = IsarCore.readList(reader, 10, IsarCore.readerPtrPtr);
+ {
+ final reader = IsarCore.readerPtr;
+ if (reader.isNull) {
+ _imageName = const [];
+ } else {
+ final list = List.filled(length, '', growable: true);
+ for (var i = 0; i < length; i++) {
+ list[i] = IsarCore.readString(reader, i) ?? '';
+ }
+ IsarCore.freeReader(reader);
+ _imageName = list;
+ }
+ }
+ }
+ final List _audioName;
+ {
+ final length = IsarCore.readList(reader, 11, IsarCore.readerPtrPtr);
+ {
+ final reader = IsarCore.readerPtr;
+ if (reader.isNull) {
+ _audioName = const [];
+ } else {
+ final list = List.filled(length, '', growable: true);
+ for (var i = 0; i < length; i++) {
+ list[i] = IsarCore.readString(reader, i) ?? '';
+ }
+ IsarCore.freeReader(reader);
+ _audioName = list;
+ }
+ }
+ }
+ final List _videoName;
+ {
+ final length = IsarCore.readList(reader, 12, IsarCore.readerPtrPtr);
+ {
+ final reader = IsarCore.readerPtr;
+ if (reader.isNull) {
+ _videoName = const [];
+ } else {
+ final list = List.filled(length, '', growable: true);
+ for (var i = 0; i < length; i++) {
+ list[i] = IsarCore.readString(reader, i) ?? '';
+ }
+ IsarCore.freeReader(reader);
+ _videoName = list;
+ }
+ }
+ }
+ final List _tags;
+ {
+ final length = IsarCore.readList(reader, 13, IsarCore.readerPtrPtr);
+ {
+ final reader = IsarCore.readerPtr;
+ if (reader.isNull) {
+ _tags = const [];
+ } else {
+ final list = List.filled(length, '', growable: true);
+ for (var i = 0; i < length; i++) {
+ list[i] = IsarCore.readString(reader, i) ?? '';
+ }
+ IsarCore.freeReader(reader);
+ _tags = list;
+ }
+ }
+ }
+ final int? _imageColor;
+ {
+ final value = IsarCore.readLong(reader, 14);
+ if (value == -9223372036854775808) {
+ _imageColor = null;
+ } else {
+ _imageColor = value;
+ }
+ }
+ final double? _aspect;
+ {
+ final value = IsarCore.readDouble(reader, 15);
+ if (value.isNaN) {
+ _aspect = null;
+ } else {
+ _aspect = value;
+ }
+ }
+ final object = Diary(
+ id: _id,
+ categoryId: _categoryId,
+ title: _title,
+ content: _content,
+ contentText: _contentText,
+ time: _time,
+ show: _show,
+ mood: _mood,
+ weather: _weather,
+ imageName: _imageName,
+ audioName: _audioName,
+ videoName: _videoName,
+ tags: _tags,
+ imageColor: _imageColor,
+ aspect: _aspect,
+ );
+ return object;
+}
+
+@isarProtected
+dynamic deserializeDiaryProp(IsarReader reader, int property) {
+ switch (property) {
+ case 1:
+ return IsarCore.readString(reader, 1) ?? '';
+ case 2:
+ return IsarCore.readString(reader, 2);
+ case 3:
+ return IsarCore.readString(reader, 3);
+ case 4:
+ return IsarCore.readString(reader, 4) ?? '';
+ case 5:
+ return IsarCore.readString(reader, 5) ?? '';
+ case 6:
+ {
+ final value = IsarCore.readLong(reader, 6);
+ if (value == -9223372036854775808) {
+ return DateTime.fromMillisecondsSinceEpoch(0, isUtc: true).toLocal();
+ } else {
+ return DateTime.fromMicrosecondsSinceEpoch(value, isUtc: true).toLocal();
+ }
+ }
+ case 7:
+ return IsarCore.readBool(reader, 7);
+ case 8:
+ return IsarCore.readDouble(reader, 8);
+ case 9:
+ {
+ final length = IsarCore.readList(reader, 9, IsarCore.readerPtrPtr);
+ {
+ final reader = IsarCore.readerPtr;
+ if (reader.isNull) {
+ return const [];
+ } else {
+ final list = List.filled(length, '', growable: true);
+ for (var i = 0; i < length; i++) {
+ list[i] = IsarCore.readString(reader, i) ?? '';
+ }
+ IsarCore.freeReader(reader);
+ return list;
+ }
+ }
+ }
+ case 10:
+ {
+ final length = IsarCore.readList(reader, 10, IsarCore.readerPtrPtr);
+ {
+ final reader = IsarCore.readerPtr;
+ if (reader.isNull) {
+ return const [];
+ } else {
+ final list = List.filled(length, '', growable: true);
+ for (var i = 0; i < length; i++) {
+ list[i] = IsarCore.readString(reader, i) ?? '';
+ }
+ IsarCore.freeReader(reader);
+ return list;
+ }
+ }
+ }
+ case 11:
+ {
+ final length = IsarCore.readList(reader, 11, IsarCore.readerPtrPtr);
+ {
+ final reader = IsarCore.readerPtr;
+ if (reader.isNull) {
+ return const [];
+ } else {
+ final list = List.filled(length, '', growable: true);
+ for (var i = 0; i < length; i++) {
+ list[i] = IsarCore.readString(reader, i) ?? '';
+ }
+ IsarCore.freeReader(reader);
+ return list;
+ }
+ }
+ }
+ case 12:
+ {
+ final length = IsarCore.readList(reader, 12, IsarCore.readerPtrPtr);
+ {
+ final reader = IsarCore.readerPtr;
+ if (reader.isNull) {
+ return const [];
+ } else {
+ final list = List.filled(length, '', growable: true);
+ for (var i = 0; i < length; i++) {
+ list[i] = IsarCore.readString(reader, i) ?? '';
+ }
+ IsarCore.freeReader(reader);
+ return list;
+ }
+ }
+ }
+ case 13:
+ {
+ final length = IsarCore.readList(reader, 13, IsarCore.readerPtrPtr);
+ {
+ final reader = IsarCore.readerPtr;
+ if (reader.isNull) {
+ return const [];
+ } else {
+ final list = List.filled(length, '', growable: true);
+ for (var i = 0; i < length; i++) {
+ list[i] = IsarCore.readString(reader, i) ?? '';
+ }
+ IsarCore.freeReader(reader);
+ return list;
+ }
+ }
+ }
+ case 14:
+ {
+ final value = IsarCore.readLong(reader, 14);
+ if (value == -9223372036854775808) {
+ return null;
+ } else {
+ return value;
+ }
+ }
+ case 15:
+ {
+ final value = IsarCore.readDouble(reader, 15);
+ if (value.isNaN) {
+ return null;
+ } else {
+ return value;
+ }
+ }
+ case 16:
+ return IsarCore.readString(reader, 16) ?? '';
+ case 17:
+ return IsarCore.readString(reader, 17) ?? '';
+ default:
+ throw ArgumentError('Unknown property: $property');
+ }
+}
+
+sealed class _DiaryUpdate {
+ bool call({
+ required String id,
+ String? categoryId,
+ String? title,
+ String? content,
+ String? contentText,
+ DateTime? time,
+ bool? show,
+ double? mood,
+ int? imageColor,
+ double? aspect,
+ String? yM,
+ String? yMd,
+ });
+}
+
+class _DiaryUpdateImpl implements _DiaryUpdate {
+ const _DiaryUpdateImpl(this.collection);
+
+ final IsarCollection collection;
+
+ @override
+ bool call({
+ required String id,
+ Object? categoryId = ignore,
+ Object? title = ignore,
+ Object? content = ignore,
+ Object? contentText = ignore,
+ Object? time = ignore,
+ Object? show = ignore,
+ Object? mood = ignore,
+ Object? imageColor = ignore,
+ Object? aspect = ignore,
+ Object? yM = ignore,
+ Object? yMd = ignore,
+ }) {
+ return collection.updateProperties([
+ id
+ ], {
+ if (categoryId != ignore) 2: categoryId as String?,
+ if (title != ignore) 3: title as String?,
+ if (content != ignore) 4: content as String?,
+ if (contentText != ignore) 5: contentText as String?,
+ if (time != ignore) 6: time as DateTime?,
+ if (show != ignore) 7: show as bool?,
+ if (mood != ignore) 8: mood as double?,
+ if (imageColor != ignore) 14: imageColor as int?,
+ if (aspect != ignore) 15: aspect as double?,
+ if (yM != ignore) 16: yM as String?,
+ if (yMd != ignore) 17: yMd as String?,
+ }) >
+ 0;
+ }
+}
+
+sealed class _DiaryUpdateAll {
+ int call({
+ required List id,
+ String? categoryId,
+ String? title,
+ String? content,
+ String? contentText,
+ DateTime? time,
+ bool? show,
+ double? mood,
+ int? imageColor,
+ double? aspect,
+ String? yM,
+ String? yMd,
+ });
+}
+
+class _DiaryUpdateAllImpl implements _DiaryUpdateAll {
+ const _DiaryUpdateAllImpl(this.collection);
+
+ final IsarCollection collection;
+
+ @override
+ int call({
+ required List id,
+ Object? categoryId = ignore,
+ Object? title = ignore,
+ Object? content = ignore,
+ Object? contentText = ignore,
+ Object? time = ignore,
+ Object? show = ignore,
+ Object? mood = ignore,
+ Object? imageColor = ignore,
+ Object? aspect = ignore,
+ Object? yM = ignore,
+ Object? yMd = ignore,
+ }) {
+ return collection.updateProperties(id, {
+ if (categoryId != ignore) 2: categoryId as String?,
+ if (title != ignore) 3: title as String?,
+ if (content != ignore) 4: content as String?,
+ if (contentText != ignore) 5: contentText as String?,
+ if (time != ignore) 6: time as DateTime?,
+ if (show != ignore) 7: show as bool?,
+ if (mood != ignore) 8: mood as double?,
+ if (imageColor != ignore) 14: imageColor as int?,
+ if (aspect != ignore) 15: aspect as double?,
+ if (yM != ignore) 16: yM as String?,
+ if (yMd != ignore) 17: yMd as String?,
+ });
+ }
+}
+
+extension DiaryUpdate on IsarCollection {
+ _DiaryUpdate get update => _DiaryUpdateImpl(this);
+
+ _DiaryUpdateAll get updateAll => _DiaryUpdateAllImpl(this);
+}
+
+sealed class _DiaryQueryUpdate {
+ int call({
+ String? categoryId,
+ String? title,
+ String? content,
+ String? contentText,
+ DateTime? time,
+ bool? show,
+ double? mood,
+ int? imageColor,
+ double? aspect,
+ String? yM,
+ String? yMd,
+ });
+}
+
+class _DiaryQueryUpdateImpl implements _DiaryQueryUpdate {
+ const _DiaryQueryUpdateImpl(this.query, {this.limit});
+
+ final IsarQuery query;
+ final int? limit;
+
+ @override
+ int call({
+ Object? categoryId = ignore,
+ Object? title = ignore,
+ Object? content = ignore,
+ Object? contentText = ignore,
+ Object? time = ignore,
+ Object? show = ignore,
+ Object? mood = ignore,
+ Object? imageColor = ignore,
+ Object? aspect = ignore,
+ Object? yM = ignore,
+ Object? yMd = ignore,
+ }) {
+ return query.updateProperties(limit: limit, {
+ if (categoryId != ignore) 2: categoryId as String?,
+ if (title != ignore) 3: title as String?,
+ if (content != ignore) 4: content as String?,
+ if (contentText != ignore) 5: contentText as String?,
+ if (time != ignore) 6: time as DateTime?,
+ if (show != ignore) 7: show as bool?,
+ if (mood != ignore) 8: mood as double?,
+ if (imageColor != ignore) 14: imageColor as int?,
+ if (aspect != ignore) 15: aspect as double?,
+ if (yM != ignore) 16: yM as String?,
+ if (yMd != ignore) 17: yMd as String?,
+ });
+ }
+}
+
+extension DiaryQueryUpdate on IsarQuery {
+ _DiaryQueryUpdate get updateFirst => _DiaryQueryUpdateImpl(this, limit: 1);
+
+ _DiaryQueryUpdate get updateAll => _DiaryQueryUpdateImpl(this);
+}
+
+class _DiaryQueryBuilderUpdateImpl implements _DiaryQueryUpdate {
+ const _DiaryQueryBuilderUpdateImpl(this.query, {this.limit});
+
+ final QueryBuilder query;
+ final int? limit;
+
+ @override
+ int call({
+ Object? categoryId = ignore,
+ Object? title = ignore,
+ Object? content = ignore,
+ Object? contentText = ignore,
+ Object? time = ignore,
+ Object? show = ignore,
+ Object? mood = ignore,
+ Object? imageColor = ignore,
+ Object? aspect = ignore,
+ Object? yM = ignore,
+ Object? yMd = ignore,
+ }) {
+ final q = query.build();
+ try {
+ return q.updateProperties(limit: limit, {
+ if (categoryId != ignore) 2: categoryId as String?,
+ if (title != ignore) 3: title as String?,
+ if (content != ignore) 4: content as String?,
+ if (contentText != ignore) 5: contentText as String?,
+ if (time != ignore) 6: time as DateTime?,
+ if (show != ignore) 7: show as bool?,
+ if (mood != ignore) 8: mood as double?,
+ if (imageColor != ignore) 14: imageColor as int?,
+ if (aspect != ignore) 15: aspect as double?,
+ if (yM != ignore) 16: yM as String?,
+ if (yMd != ignore) 17: yMd as String?,
+ });
+ } finally {
+ q.close();
+ }
+ }
+}
+
+extension DiaryQueryBuilderUpdate on QueryBuilder {
+ _DiaryQueryUpdate get updateFirst => _DiaryQueryBuilderUpdateImpl(this, limit: 1);
+
+ _DiaryQueryUpdate get updateAll => _DiaryQueryBuilderUpdateImpl(this);
+}
+
+extension DiaryQueryFilter on QueryBuilder {
+ QueryBuilder idEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ EqualCondition(
+ property: 1,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idGreaterThan(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ GreaterCondition(
+ property: 1,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idGreaterThanOrEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ GreaterOrEqualCondition(
+ property: 1,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idLessThan(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ LessCondition(
+ property: 1,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idLessThanOrEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ LessOrEqualCondition(
+ property: 1,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idBetween(
+ String lower,
+ String upper, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ BetweenCondition(
+ property: 1,
+ lower: lower,
+ upper: upper,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idStartsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ StartsWithCondition(
+ property: 1,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idEndsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ EndsWithCondition(
+ property: 1,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idContains(String value, {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ ContainsCondition(
+ property: 1,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idMatches(String pattern, {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ MatchesCondition(
+ property: 1,
+ wildcard: pattern,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idIsEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ const EqualCondition(
+ property: 1,
+ value: '',
+ ),
+ );
+ });
+ }
+
+ QueryBuilder idIsNotEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ const GreaterCondition(
+ property: 1,
+ value: '',
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryIdIsNull() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(const IsNullCondition(property: 2));
+ });
+ }
+
+ QueryBuilder categoryIdIsNotNull() {
+ return QueryBuilder.apply(not(), (query) {
+ return query.addFilterCondition(const IsNullCondition(property: 2));
+ });
+ }
+
+ QueryBuilder categoryIdEqualTo(
+ String? value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ EqualCondition(
+ property: 2,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryIdGreaterThan(
+ String? value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ GreaterCondition(
+ property: 2,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryIdGreaterThanOrEqualTo(
+ String? value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ GreaterOrEqualCondition(
+ property: 2,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryIdLessThan(
+ String? value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ LessCondition(
+ property: 2,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryIdLessThanOrEqualTo(
+ String? value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ LessOrEqualCondition(
+ property: 2,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryIdBetween(
+ String? lower,
+ String? upper, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ BetweenCondition(
+ property: 2,
+ lower: lower,
+ upper: upper,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryIdStartsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ StartsWithCondition(
+ property: 2,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryIdEndsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ EndsWithCondition(
+ property: 2,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryIdContains(String value, {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ ContainsCondition(
+ property: 2,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryIdMatches(String pattern, {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ MatchesCondition(
+ property: 2,
+ wildcard: pattern,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryIdIsEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ const EqualCondition(
+ property: 2,
+ value: '',
+ ),
+ );
+ });
+ }
+
+ QueryBuilder categoryIdIsNotEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ const GreaterCondition(
+ property: 2,
+ value: '',
+ ),
+ );
+ });
+ }
+
+ QueryBuilder titleIsNull() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(const IsNullCondition(property: 3));
+ });
+ }
+
+ QueryBuilder titleIsNotNull() {
+ return QueryBuilder.apply(not(), (query) {
+ return query.addFilterCondition(const IsNullCondition(property: 3));
+ });
+ }
+
+ QueryBuilder titleEqualTo(
+ String? value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ EqualCondition(
+ property: 3,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder titleGreaterThan(
+ String? value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ GreaterCondition(
+ property: 3,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder titleGreaterThanOrEqualTo(
+ String? value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ GreaterOrEqualCondition(
+ property: 3,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder titleLessThan(
+ String? value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ LessCondition(
+ property: 3,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder titleLessThanOrEqualTo(
+ String? value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ LessOrEqualCondition(
+ property: 3,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder titleBetween(
+ String? lower,
+ String? upper, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ BetweenCondition(
+ property: 3,
+ lower: lower,
+ upper: upper,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder titleStartsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ StartsWithCondition(
+ property: 3,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder titleEndsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ EndsWithCondition(
+ property: 3,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder titleContains(String value, {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ ContainsCondition(
+ property: 3,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder titleMatches(String pattern, {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ MatchesCondition(
+ property: 3,
+ wildcard: pattern,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder titleIsEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ const EqualCondition(
+ property: 3,
+ value: '',
+ ),
+ );
+ });
+ }
+
+ QueryBuilder titleIsNotEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ const GreaterCondition(
+ property: 3,
+ value: '',
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ EqualCondition(
+ property: 4,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentGreaterThan(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ GreaterCondition(
+ property: 4,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentGreaterThanOrEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ GreaterOrEqualCondition(
+ property: 4,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentLessThan(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ LessCondition(
+ property: 4,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentLessThanOrEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ LessOrEqualCondition(
+ property: 4,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentBetween(
+ String lower,
+ String upper, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ BetweenCondition(
+ property: 4,
+ lower: lower,
+ upper: upper,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentStartsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ StartsWithCondition(
+ property: 4,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentEndsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ EndsWithCondition(
+ property: 4,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentContains(String value, {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ ContainsCondition(
+ property: 4,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentMatches(String pattern, {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ MatchesCondition(
+ property: 4,
+ wildcard: pattern,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentIsEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ const EqualCondition(
+ property: 4,
+ value: '',
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentIsNotEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ const GreaterCondition(
+ property: 4,
+ value: '',
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentTextEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ EqualCondition(
+ property: 5,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentTextGreaterThan(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ GreaterCondition(
+ property: 5,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentTextGreaterThanOrEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ GreaterOrEqualCondition(
+ property: 5,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentTextLessThan(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ LessCondition(
+ property: 5,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentTextLessThanOrEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ LessOrEqualCondition(
+ property: 5,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentTextBetween(
+ String lower,
+ String upper, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ BetweenCondition(
+ property: 5,
+ lower: lower,
+ upper: upper,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentTextStartsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ StartsWithCondition(
+ property: 5,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentTextEndsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ EndsWithCondition(
+ property: 5,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentTextContains(String value, {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ ContainsCondition(
+ property: 5,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentTextMatches(String pattern, {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ MatchesCondition(
+ property: 5,
+ wildcard: pattern,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentTextIsEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ const EqualCondition(
+ property: 5,
+ value: '',
+ ),
+ );
+ });
+ }
+
+ QueryBuilder contentTextIsNotEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ const GreaterCondition(
+ property: 5,
+ value: '',
+ ),
+ );
+ });
+ }
+
+ QueryBuilder timeEqualTo(
+ DateTime value,
+ ) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ EqualCondition(
+ property: 6,
+ value: value,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder timeGreaterThan(
+ DateTime value,
+ ) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ GreaterCondition(
+ property: 6,
+ value: value,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder timeGreaterThanOrEqualTo(
+ DateTime value,
+ ) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ GreaterOrEqualCondition(
+ property: 6,
+ value: value,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder timeLessThan(
+ DateTime value,
+ ) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ LessCondition(
+ property: 6,
+ value: value,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder timeLessThanOrEqualTo(
+ DateTime value,
+ ) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ LessOrEqualCondition(
+ property: 6,
+ value: value,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder timeBetween(
+ DateTime lower,
+ DateTime upper,
+ ) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ BetweenCondition(
+ property: 6,
+ lower: lower,
+ upper: upper,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder showEqualTo(
+ bool value,
+ ) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ EqualCondition(
+ property: 7,
+ value: value,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder moodEqualTo(
+ double value, {
+ double epsilon = Filter.epsilon,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ EqualCondition(
+ property: 8,
+ value: value,
+ epsilon: epsilon,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder moodGreaterThan(
+ double value, {
+ double epsilon = Filter.epsilon,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ GreaterCondition(
+ property: 8,
+ value: value,
+ epsilon: epsilon,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder moodGreaterThanOrEqualTo(
+ double value, {
+ double epsilon = Filter.epsilon,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ GreaterOrEqualCondition(
+ property: 8,
+ value: value,
+ epsilon: epsilon,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder moodLessThan(
+ double value, {
+ double epsilon = Filter.epsilon,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ LessCondition(
+ property: 8,
+ value: value,
+ epsilon: epsilon,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder moodLessThanOrEqualTo(
+ double value, {
+ double epsilon = Filter.epsilon,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ LessOrEqualCondition(
+ property: 8,
+ value: value,
+ epsilon: epsilon,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder moodBetween(
+ double lower,
+ double upper, {
+ double epsilon = Filter.epsilon,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ BetweenCondition(
+ property: 8,
+ lower: lower,
+ upper: upper,
+ epsilon: epsilon,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder weatherElementEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ EqualCondition(
+ property: 9,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder weatherElementGreaterThan(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ GreaterCondition(
+ property: 9,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder weatherElementGreaterThanOrEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ GreaterOrEqualCondition(
+ property: 9,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder weatherElementLessThan(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ LessCondition(
+ property: 9,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder weatherElementLessThanOrEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ LessOrEqualCondition(
+ property: 9,
+ value: value,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder weatherElementBetween(
+ String lower,
+ String upper, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(
+ BetweenCondition(
+ property: 9,
+ lower: lower,
+ upper: upper,
+ caseSensitive: caseSensitive,
+ ),
+ );
+ });
+ }
+
+ QueryBuilder