Initial commit
43
.gitignore
vendored
Normal file
@@ -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
|
||||
30
.metadata
Normal file
@@ -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'
|
||||
0
README.en.md
Normal file
84
README.md
Normal file
@@ -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 团队提供出色的框架。
|
||||
- 特别感谢开源社区的宝贵贡献。
|
||||
28
analysis_options.yaml
Normal file
@@ -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
|
||||
13
android/.gitignore
vendored
Normal file
@@ -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
|
||||
83
android/app/build.gradle
Normal file
@@ -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'
|
||||
}
|
||||
|
||||
29
android/app/proguard-rules.pro
vendored
Normal file
@@ -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.** { *; }
|
||||
7
android/app/src/debug/AndroidManifest.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
||||
98
android/app/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,98 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
||||
|
||||
<queries>
|
||||
<!-- If your app checks for SMS support -->
|
||||
<intent>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<data android:scheme="sms" />
|
||||
</intent>
|
||||
<!-- If your app checks for call support -->
|
||||
<intent>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<data android:scheme="tel" />
|
||||
</intent>
|
||||
<!-- If your application checks for inAppBrowserView launch mode support -->
|
||||
<intent>
|
||||
<action android:name="android.support.customtabs.action.CustomTabsService" />
|
||||
</intent>
|
||||
</queries>
|
||||
<application
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/appName"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:usesCleartextTraffic="true">
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:exported="true"
|
||||
android:hardwareAccelerated="true"
|
||||
android:launchMode="singleTop"
|
||||
android:taskAffinity=""
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme" />
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<!-- Add optional android:host to distinguish your app
|
||||
from others in case of conflicting scheme name -->
|
||||
<data
|
||||
android:host="cn.yooss.moodiary"
|
||||
android:pathPrefix="/open"
|
||||
android:scheme="deeplink" />
|
||||
<!-- <data android:scheme="sample" /> -->
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.EnableImpeller"
|
||||
android:value="true" />
|
||||
</application>
|
||||
<!-- Required to query activities that can process text, see:
|
||||
https://developer.android.com/training/package-visibility and
|
||||
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
|
||||
|
||||
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.PROCESS_TEXT" />
|
||||
<data android:mimeType="text/plain" />
|
||||
</intent>
|
||||
</queries>
|
||||
</manifest>
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
102
android/app/src/main/kotlin/cn/yooss/mood_diary/MainActivity.kt
Normal file
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
12
android/app/src/main/res/drawable-v21/launch_background.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="?android:colorBackground" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
||||
12
android/app/src/main/res/drawable/launch_background.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@android:color/white" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>-->
|
||||
<!-- <bitmap-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:src="@mipmap/ic_launcher_foreground" />-->
|
||||
<!-- </item>-->
|
||||
</layer-list>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@mipmap/ic_launcher_background" />
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@mipmap/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@mipmap/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher_background.webp
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
android/app/src/main/res/mipmap-mdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
android/app/src/main/res/mipmap-mdpi/ic_launcher_background.webp
Normal file
|
After Width: | Height: | Size: 1016 B |
BIN
android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
BIN
android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
BIN
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
BIN
android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 16 KiB |
BIN
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 18 KiB |
4
android/app/src/main/res/values-en/appname.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="appName">Moodiary</string>
|
||||
</resources>
|
||||
18
android/app/src/main/res/values-night/styles.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
||||
4
android/app/src/main/res/values-zh/appname.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="appName">心绪日记</string>
|
||||
</resources>
|
||||
4
android/app/src/main/res/values/appname.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="appName">心绪日记</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#FFFFFF</color>
|
||||
</resources>
|
||||
18
android/app/src/main/res/values/styles.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
||||
9
android/app/src/main/res/xml/network_security_config.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
<base-config cleartextTrafficPermitted="true">
|
||||
<trust-anchors>
|
||||
<certificates src="system" />
|
||||
<certificates src="user" />
|
||||
</trust-anchors>
|
||||
</base-config>
|
||||
</network-security-config>
|
||||
7
android/app/src/profile/AndroidManifest.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
||||
27
android/build.gradle
Normal file
@@ -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
|
||||
}
|
||||
3
android/gradle.properties
Normal file
@@ -0,0 +1,3 @@
|
||||
org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
5
android/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@@ -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
|
||||
30
android/settings.gradle
Normal file
@@ -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"
|
||||
BIN
fonts/qweather-icons.ttf
Normal file
34
ios/.gitignore
vendored
Normal file
@@ -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
|
||||
26
ios/Flutter/AppFrameworkInfo.plist
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>App</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.flutter.flutter.app</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>App</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>12.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
1
ios/Flutter/Debug.xcconfig
Normal file
@@ -0,0 +1 @@
|
||||
#include "Generated.xcconfig"
|
||||
1
ios/Flutter/Release.xcconfig
Normal file
@@ -0,0 +1 @@
|
||||
#include "Generated.xcconfig"
|
||||
616
ios/Runner.xcodeproj/project.pbxproj
Normal file
@@ -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 = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
||||
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 = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
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 = "<group>"; };
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
/* 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 = "<group>";
|
||||
};
|
||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
||||
);
|
||||
name = Flutter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146E51CF9000F007C117D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9740EEB11CF90186004384FC /* Flutter */,
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
331C8082294A63A400263BE5 /* RunnerTests */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146EF1CF9000F007C117D /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146EE1CF9000F007C117D /* Runner.app */,
|
||||
331C8081294A63A400263BE5 /* RunnerTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
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 = "<group>";
|
||||
};
|
||||
/* 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 = "<group>";
|
||||
};
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C147001CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* 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 */;
|
||||
}
|
||||
7
ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
98
ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
Normal file
@@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1510"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO"
|
||||
parallelizable = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "331C8080294A63A400263BE5"
|
||||
BuildableName = "RunnerTests.xctest"
|
||||
BlueprintName = "RunnerTests"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Profile"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
7
ios/Runner.xcworkspace/contents.xcworkspacedata
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
13
ios/Runner/AppDelegate.swift
Normal file
@@ -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)
|
||||
}
|
||||
}
|
||||
122
ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 295 B |
|
After Width: | Height: | Size: 406 B |
|
After Width: | Height: | Size: 450 B |
|
After Width: | Height: | Size: 282 B |
|
After Width: | Height: | Size: 462 B |
|
After Width: | Height: | Size: 704 B |
|
After Width: | Height: | Size: 406 B |
|
After Width: | Height: | Size: 586 B |
|
After Width: | Height: | Size: 862 B |
|
After Width: | Height: | Size: 862 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 762 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
23
ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
vendored
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
BIN
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
vendored
Normal file
|
After Width: | Height: | Size: 68 B |
BIN
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 68 B |
BIN
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 68 B |
5
ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
vendored
Normal file
@@ -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.
|
||||
37
ios/Runner/Base.lproj/LaunchScreen.storyboard
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="LaunchImage" width="168" height="185"/>
|
||||
</resources>
|
||||
</document>
|
||||
26
ios/Runner/Base.lproj/Main.storyboard
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Flutter View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
49
ios/Runner/Info.plist
Normal file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Mood Diary</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>mood_diary</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
1
ios/Runner/Runner-Bridging-Header.h
Normal file
@@ -0,0 +1 @@
|
||||
#import "GeneratedPluginRegistrant.h"
|
||||
12
ios/RunnerTests/RunnerTests.swift
Normal file
@@ -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.
|
||||
}
|
||||
|
||||
}
|
||||
3
l10n.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
arb-dir: lib/l10n
|
||||
template-arb-file: intl_zh.arb
|
||||
output-localization-file: app_localizations.dart
|
||||
77
lib/api/api.dart
Normal file
@@ -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<Stream<String>?> getHunYuan(String id, String key, List<Message> 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<Uint8List?> getImageData(String url) async {
|
||||
return (await Utils().httpUtil.get(url, type: ResponseType.bytes)).data;
|
||||
}
|
||||
|
||||
Future<List<String>?> 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<String>('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<String, dynamic>);
|
||||
return [
|
||||
weather.now!.icon!,
|
||||
weather.now!.temp!,
|
||||
weather.now!.text!,
|
||||
];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Future<List<String>?> updateHitokoto() async {
|
||||
var res = await Utils().httpUtil.get('https://v1.hitokoto.cn');
|
||||
var hitokoto = await compute(HitokotoResponse.fromJson, res.data as Map<String, dynamic>);
|
||||
return [hitokoto.hitokoto!];
|
||||
}
|
||||
|
||||
Future<List<String>?> 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<String, dynamic>);
|
||||
return ['https://cn.bing.com${bingImage.images?[0].url}'];
|
||||
}
|
||||
}
|
||||
60
lib/common/models/hitokoto.dart
Normal file
@@ -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<String, dynamic> 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<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
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;
|
||||
}
|
||||
}
|
||||
134
lib/common/models/hunyuan.dart
Normal file
@@ -0,0 +1,134 @@
|
||||
class PublicHeader {
|
||||
String? action;
|
||||
int? timestamp;
|
||||
String? version;
|
||||
String? authorization;
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'X-TC-Action': action,
|
||||
'X-TC-Timestamp': timestamp,
|
||||
'X-TC-Version': version,
|
||||
'Authorization': authorization,
|
||||
};
|
||||
}
|
||||
|
||||
PublicHeader.fromMap(Map<String, dynamic> 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<String, dynamic> toMap() {
|
||||
return {'Role': role, 'Content': content};
|
||||
}
|
||||
|
||||
Message.fromMap(Map<String, dynamic> map) {
|
||||
role = map['Role'];
|
||||
content = map['Content'];
|
||||
}
|
||||
}
|
||||
|
||||
class HunyuanResponse {
|
||||
String? note;
|
||||
List<Choices>? choices;
|
||||
int? created;
|
||||
String? id;
|
||||
Usage? usage;
|
||||
|
||||
HunyuanResponse({this.note, this.choices, this.created, this.id, this.usage});
|
||||
|
||||
HunyuanResponse.fromJson(Map<String, dynamic> 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<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
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<String, dynamic> json) {
|
||||
promptTokens = json["PromptTokens"];
|
||||
completionTokens = json["CompletionTokens"];
|
||||
totalTokens = json["TotalTokens"];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
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<String, dynamic> json) {
|
||||
finishReason = json["FinishReason"];
|
||||
delta = json["Delta"] == null ? null : Delta.fromJson(json["Delta"]);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
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<String, dynamic> json) {
|
||||
role = json["Role"];
|
||||
content = json["Content"];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data["Role"] = role;
|
||||
data["Content"] = content;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
125
lib/common/models/image.dart
Normal file
@@ -0,0 +1,125 @@
|
||||
class BingImage {
|
||||
List<Images>? images;
|
||||
Tooltips? tooltips;
|
||||
|
||||
BingImage({this.images, this.tooltips});
|
||||
|
||||
BingImage.fromJson(Map<String, dynamic> 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<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
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<String, dynamic> json) {
|
||||
loading = json["loading"];
|
||||
previous = json["previous"];
|
||||
next = json["next"];
|
||||
walle = json["walle"];
|
||||
walls = json["walls"];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
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<dynamic>? 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<String, dynamic> 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<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
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;
|
||||
}
|
||||
}
|
||||
12
lib/common/models/isar/category.dart
Normal file
@@ -0,0 +1,12 @@
|
||||
import 'package:isar/isar.dart';
|
||||
|
||||
part 'category.g.dart';
|
||||
|
||||
@collection
|
||||
class Category {
|
||||
@Id()
|
||||
late String id;
|
||||
|
||||
//分类名称
|
||||
late String categoryName;
|
||||
}
|
||||
635
lib/common/models/isar/category.g.dart
Normal file
@@ -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<String, Category> 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<String, Category>(
|
||||
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<String, Category> 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<String> id,
|
||||
String? categoryName,
|
||||
});
|
||||
}
|
||||
|
||||
class _CategoryUpdateAllImpl implements _CategoryUpdateAll {
|
||||
const _CategoryUpdateAllImpl(this.collection);
|
||||
|
||||
final IsarCollection<String, Category> collection;
|
||||
|
||||
@override
|
||||
int call({
|
||||
required List<String> id,
|
||||
Object? categoryName = ignore,
|
||||
}) {
|
||||
return collection.updateProperties(id, {
|
||||
if (categoryName != ignore) 2: categoryName as String?,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension CategoryUpdate on IsarCollection<String, Category> {
|
||||
_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<Category> 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<Category> {
|
||||
_CategoryQueryUpdate get updateFirst => _CategoryQueryUpdateImpl(this, limit: 1);
|
||||
|
||||
_CategoryQueryUpdate get updateAll => _CategoryQueryUpdateImpl(this);
|
||||
}
|
||||
|
||||
class _CategoryQueryBuilderUpdateImpl implements _CategoryQueryUpdate {
|
||||
const _CategoryQueryBuilderUpdateImpl(this.query, {this.limit});
|
||||
|
||||
final QueryBuilder<Category, Category, QOperations> 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<Category, Category, QOperations> {
|
||||
_CategoryQueryUpdate get updateFirst => _CategoryQueryBuilderUpdateImpl(this, limit: 1);
|
||||
|
||||
_CategoryQueryUpdate get updateAll => _CategoryQueryBuilderUpdateImpl(this);
|
||||
}
|
||||
|
||||
extension CategoryQueryFilter on QueryBuilder<Category, Category, QFilterCondition> {
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> idEqualTo(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
EqualCondition(
|
||||
property: 1,
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> idGreaterThan(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
GreaterCondition(
|
||||
property: 1,
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> idGreaterThanOrEqualTo(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
GreaterOrEqualCondition(
|
||||
property: 1,
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> idLessThan(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
LessCondition(
|
||||
property: 1,
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> idLessThanOrEqualTo(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
LessOrEqualCondition(
|
||||
property: 1,
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> 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<Category, Category, QAfterFilterCondition> idStartsWith(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
StartsWithCondition(
|
||||
property: 1,
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> idEndsWith(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
EndsWithCondition(
|
||||
property: 1,
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> idContains(String value, {bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
ContainsCondition(
|
||||
property: 1,
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> idMatches(String pattern, {bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
MatchesCondition(
|
||||
property: 1,
|
||||
wildcard: pattern,
|
||||
caseSensitive: caseSensitive,
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> idIsEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
const EqualCondition(
|
||||
property: 1,
|
||||
value: '',
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> idIsNotEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
const GreaterCondition(
|
||||
property: 1,
|
||||
value: '',
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> categoryNameEqualTo(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
EqualCondition(
|
||||
property: 2,
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> categoryNameGreaterThan(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
GreaterCondition(
|
||||
property: 2,
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> categoryNameGreaterThanOrEqualTo(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
GreaterOrEqualCondition(
|
||||
property: 2,
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> categoryNameLessThan(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
LessCondition(
|
||||
property: 2,
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> categoryNameLessThanOrEqualTo(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
LessOrEqualCondition(
|
||||
property: 2,
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> 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<Category, Category, QAfterFilterCondition> categoryNameStartsWith(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
StartsWithCondition(
|
||||
property: 2,
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> categoryNameEndsWith(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
EndsWithCondition(
|
||||
property: 2,
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> categoryNameContains(String value,
|
||||
{bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
ContainsCondition(
|
||||
property: 2,
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> categoryNameMatches(String pattern,
|
||||
{bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
MatchesCondition(
|
||||
property: 2,
|
||||
wildcard: pattern,
|
||||
caseSensitive: caseSensitive,
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> categoryNameIsEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
const EqualCondition(
|
||||
property: 2,
|
||||
value: '',
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterFilterCondition> categoryNameIsNotEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(
|
||||
const GreaterCondition(
|
||||
property: 2,
|
||||
value: '',
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension CategoryQueryObject on QueryBuilder<Category, Category, QFilterCondition> {}
|
||||
|
||||
extension CategoryQuerySortBy on QueryBuilder<Category, Category, QSortBy> {
|
||||
QueryBuilder<Category, Category, QAfterSortBy> sortById({bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(
|
||||
1,
|
||||
caseSensitive: caseSensitive,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterSortBy> sortByIdDesc({bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(
|
||||
1,
|
||||
sort: Sort.desc,
|
||||
caseSensitive: caseSensitive,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterSortBy> sortByCategoryName({bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(
|
||||
2,
|
||||
caseSensitive: caseSensitive,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterSortBy> sortByCategoryNameDesc({bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(
|
||||
2,
|
||||
sort: Sort.desc,
|
||||
caseSensitive: caseSensitive,
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension CategoryQuerySortThenBy on QueryBuilder<Category, Category, QSortThenBy> {
|
||||
QueryBuilder<Category, Category, QAfterSortBy> thenById({bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(1, caseSensitive: caseSensitive);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterSortBy> thenByIdDesc({bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(1, sort: Sort.desc, caseSensitive: caseSensitive);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterSortBy> thenByCategoryName({bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(2, caseSensitive: caseSensitive);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, Category, QAfterSortBy> thenByCategoryNameDesc({bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(2, sort: Sort.desc, caseSensitive: caseSensitive);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension CategoryQueryWhereDistinct on QueryBuilder<Category, Category, QDistinct> {
|
||||
QueryBuilder<Category, Category, QAfterDistinct> distinctByCategoryName({bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addDistinctBy(2, caseSensitive: caseSensitive);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension CategoryQueryProperty1 on QueryBuilder<Category, Category, QProperty> {
|
||||
QueryBuilder<Category, String, QAfterProperty> idProperty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addProperty(1);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, String, QAfterProperty> categoryNameProperty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addProperty(2);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension CategoryQueryProperty2<R> on QueryBuilder<Category, R, QAfterProperty> {
|
||||
QueryBuilder<Category, (R, String), QAfterProperty> idProperty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addProperty(1);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, (R, String), QAfterProperty> categoryNameProperty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addProperty(2);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension CategoryQueryProperty3<R1, R2> on QueryBuilder<Category, (R1, R2), QAfterProperty> {
|
||||
QueryBuilder<Category, (R1, R2, String), QOperations> idProperty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addProperty(1);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<Category, (R1, R2, String), QOperations> categoryNameProperty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addProperty(2);
|
||||
});
|
||||
}
|
||||
}
|
||||
80
lib/common/models/isar/diary.dart
Normal file
@@ -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<String> weather;
|
||||
|
||||
//图片名称
|
||||
late List<String> imageName;
|
||||
|
||||
//音频名称
|
||||
late List<String> audioName;
|
||||
|
||||
//视频名称
|
||||
late List<String> videoName;
|
||||
|
||||
//标签列表
|
||||
late List<String> 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,
|
||||
});
|
||||
}
|
||||
3960
lib/common/models/isar/diary.g.dart
Normal file
161
lib/common/models/shiply.dart
Normal file
@@ -0,0 +1,161 @@
|
||||
class ShiplyResponse {
|
||||
ApkBasicInfo? apkBasicInfo;
|
||||
ClientInfo? clientInfo;
|
||||
Extra? extra;
|
||||
int? grayType;
|
||||
String? newFeature;
|
||||
int? popInterval;
|
||||
int? popTimes;
|
||||
int? publishTime;
|
||||
int? receiveMoment;
|
||||
int? remindType;
|
||||
int? status;
|
||||
String? tacticsId;
|
||||
String? title;
|
||||
int? undisturbedDuration;
|
||||
int? updateStrategy;
|
||||
int? updateTime;
|
||||
|
||||
ShiplyResponse(
|
||||
{this.apkBasicInfo,
|
||||
this.clientInfo,
|
||||
this.extra,
|
||||
this.grayType,
|
||||
this.newFeature,
|
||||
this.popInterval,
|
||||
this.popTimes,
|
||||
this.publishTime,
|
||||
this.receiveMoment,
|
||||
this.remindType,
|
||||
this.status,
|
||||
this.tacticsId,
|
||||
this.title,
|
||||
this.undisturbedDuration,
|
||||
this.updateStrategy,
|
||||
this.updateTime});
|
||||
|
||||
ShiplyResponse.fromJson(Map<String, dynamic> json) {
|
||||
apkBasicInfo = json["apkBasicInfo"] == null ? null : ApkBasicInfo.fromJson(json["apkBasicInfo"]);
|
||||
clientInfo = json["clientInfo"] == null ? null : ClientInfo.fromJson(json["clientInfo"]);
|
||||
extra = json["extra"] == null ? null : Extra.fromJson(json["extra"]);
|
||||
grayType = json["grayType"];
|
||||
newFeature = json["newFeature"];
|
||||
popInterval = json["popInterval"];
|
||||
popTimes = json["popTimes"];
|
||||
publishTime = json["publishTime"];
|
||||
receiveMoment = json["receiveMoment"];
|
||||
remindType = json["remindType"];
|
||||
status = json["status"];
|
||||
tacticsId = json["tacticsId"];
|
||||
title = json["title"];
|
||||
undisturbedDuration = json["undisturbedDuration"];
|
||||
updateStrategy = json["updateStrategy"];
|
||||
updateTime = json["updateTime"];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
if (apkBasicInfo != null) {
|
||||
data["apkBasicInfo"] = apkBasicInfo?.toJson();
|
||||
}
|
||||
if (clientInfo != null) {
|
||||
data["clientInfo"] = clientInfo?.toJson();
|
||||
}
|
||||
if (extra != null) {
|
||||
data["extra"] = extra?.toJson();
|
||||
}
|
||||
data["grayType"] = grayType;
|
||||
data["newFeature"] = newFeature;
|
||||
data["popInterval"] = popInterval;
|
||||
data["popTimes"] = popTimes;
|
||||
data["publishTime"] = publishTime;
|
||||
data["receiveMoment"] = receiveMoment;
|
||||
data["remindType"] = remindType;
|
||||
data["status"] = status;
|
||||
data["tacticsId"] = tacticsId;
|
||||
data["title"] = title;
|
||||
data["undisturbedDuration"] = undisturbedDuration;
|
||||
data["updateStrategy"] = updateStrategy;
|
||||
data["updateTime"] = updateTime;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Extra {
|
||||
Extra();
|
||||
|
||||
Extra.fromJson(Map<String, dynamic> json);
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class ClientInfo {
|
||||
String? description;
|
||||
String? title;
|
||||
int? type;
|
||||
|
||||
ClientInfo({this.description, this.title, this.type});
|
||||
|
||||
ClientInfo.fromJson(Map<String, dynamic> json) {
|
||||
description = json["description"];
|
||||
title = json["title"];
|
||||
type = json["type"];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data["description"] = description;
|
||||
data["title"] = title;
|
||||
data["type"] = type;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class ApkBasicInfo {
|
||||
String? md5;
|
||||
int? pkgSize;
|
||||
int? buildNo;
|
||||
String? bundleId;
|
||||
String? downloadUrl;
|
||||
String? pkgName;
|
||||
int? versionCode;
|
||||
String? version;
|
||||
|
||||
ApkBasicInfo(
|
||||
{this.md5,
|
||||
this.pkgSize,
|
||||
this.buildNo,
|
||||
this.bundleId,
|
||||
this.downloadUrl,
|
||||
this.pkgName,
|
||||
this.versionCode,
|
||||
this.version});
|
||||
|
||||
ApkBasicInfo.fromJson(Map<String, dynamic> json) {
|
||||
md5 = json["md5"];
|
||||
pkgSize = json["pkgSize"];
|
||||
buildNo = json["buildNo"];
|
||||
bundleId = json["bundleId"];
|
||||
downloadUrl = json["downloadUrl"];
|
||||
pkgName = json["pkgName"];
|
||||
versionCode = json["versionCode"];
|
||||
version = json["version"];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data["md5"] = md5;
|
||||
data["pkgSize"] = pkgSize;
|
||||
data["buildNo"] = buildNo;
|
||||
data["bundleId"] = bundleId;
|
||||
data["downloadUrl"] = downloadUrl;
|
||||
data["pkgName"] = pkgName;
|
||||
data["versionCode"] = versionCode;
|
||||
data["version"] = version;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
127
lib/common/models/weather.dart
Normal file
@@ -0,0 +1,127 @@
|
||||
class WeatherResponse {
|
||||
String? code;
|
||||
String? updateTime;
|
||||
String? fxLink;
|
||||
Now? now;
|
||||
Refer? refer;
|
||||
|
||||
WeatherResponse({this.code, this.updateTime, this.fxLink, this.now, this.refer});
|
||||
|
||||
WeatherResponse.fromJson(Map<String, dynamic> json) {
|
||||
code = json["code"];
|
||||
updateTime = json["updateTime"];
|
||||
fxLink = json["fxLink"];
|
||||
now = json["now"] == null ? null : Now.fromJson(json["now"]);
|
||||
refer = json["refer"] == null ? null : Refer.fromJson(json["refer"]);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data["code"] = code;
|
||||
data["updateTime"] = updateTime;
|
||||
data["fxLink"] = fxLink;
|
||||
if (now != null) {
|
||||
data["now"] = now?.toJson();
|
||||
}
|
||||
if (refer != null) {
|
||||
data["refer"] = refer?.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Refer {
|
||||
List<String>? sources;
|
||||
List<String>? license;
|
||||
|
||||
Refer({this.sources, this.license});
|
||||
|
||||
Refer.fromJson(Map<String, dynamic> json) {
|
||||
sources = json["sources"] == null ? null : List<String>.from(json["sources"]);
|
||||
license = json["license"] == null ? null : List<String>.from(json["license"]);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
if (sources != null) {
|
||||
data["sources"] = sources;
|
||||
}
|
||||
if (license != null) {
|
||||
data["license"] = license;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Now {
|
||||
String? obsTime;
|
||||
String? temp;
|
||||
String? feelsLike;
|
||||
String? icon;
|
||||
String? text;
|
||||
String? wind360;
|
||||
String? windDir;
|
||||
String? windScale;
|
||||
String? windSpeed;
|
||||
String? humidity;
|
||||
String? precip;
|
||||
String? pressure;
|
||||
String? vis;
|
||||
String? cloud;
|
||||
String? dew;
|
||||
|
||||
Now(
|
||||
{this.obsTime,
|
||||
this.temp,
|
||||
this.feelsLike,
|
||||
this.icon,
|
||||
this.text,
|
||||
this.wind360,
|
||||
this.windDir,
|
||||
this.windScale,
|
||||
this.windSpeed,
|
||||
this.humidity,
|
||||
this.precip,
|
||||
this.pressure,
|
||||
this.vis,
|
||||
this.cloud,
|
||||
this.dew});
|
||||
|
||||
Now.fromJson(Map<String, dynamic> json) {
|
||||
obsTime = json["obsTime"];
|
||||
temp = json["temp"];
|
||||
feelsLike = json["feelsLike"];
|
||||
icon = json["icon"];
|
||||
text = json["text"];
|
||||
wind360 = json["wind360"];
|
||||
windDir = json["windDir"];
|
||||
windScale = json["windScale"];
|
||||
windSpeed = json["windSpeed"];
|
||||
humidity = json["humidity"];
|
||||
precip = json["precip"];
|
||||
pressure = json["pressure"];
|
||||
vis = json["vis"];
|
||||
cloud = json["cloud"];
|
||||
dew = json["dew"];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data["obsTime"] = obsTime;
|
||||
data["temp"] = temp;
|
||||
data["feelsLike"] = feelsLike;
|
||||
data["icon"] = icon;
|
||||
data["text"] = text;
|
||||
data["wind360"] = wind360;
|
||||
data["windDir"] = windDir;
|
||||
data["windScale"] = windScale;
|
||||
data["windSpeed"] = windSpeed;
|
||||
data["humidity"] = humidity;
|
||||
data["precip"] = precip;
|
||||
data["pressure"] = pressure;
|
||||
data["vis"] = vis;
|
||||
data["cloud"] = cloud;
|
||||
data["dew"] = dew;
|
||||
return data;
|
||||
}
|
||||
}
|
||||