Compare commits
139 Commits
Author | SHA1 | Date | |
---|---|---|---|
133213b430 | |||
2ff142a84f | |||
e385f79df2 | |||
8d9a8b5435 | |||
c5a975b5ed | |||
1210cda998 | |||
3b56b94242 | |||
34043e722b | |||
e4a5ac9d0a | |||
c991590b27 | |||
d8b2c7f81e | |||
1fd042bcae | |||
0a04c72468 | |||
4e8f2ddef3 | |||
85f97521e5 | |||
9c451f485a | |||
f836b22c73 | |||
18fba0c9e7 | |||
c68138e516 | |||
cedd0b083a | |||
1a0721ba3a | |||
a75f42e440 | |||
e4a6ff2da4 | |||
baa6b401d3 | |||
bd1369e72d | |||
10520b4448 | |||
cab2217793 | |||
4e4e551e2f | |||
597a8a802a | |||
fff756cbe0 | |||
e38778dbf9 | |||
cc9081b011 | |||
14e8f7b775 | |||
a70e6c7118 | |||
48ca885a2c | |||
09cb340a9d | |||
b6ebd6bef6 | |||
2ec25fd1a2 | |||
bc99865ba8 | |||
f834351ce2 | |||
0f1a02f65b | |||
6ad0a34645 | |||
fdc71475fc | |||
047defebd1 | |||
6148e889aa | |||
1d7affcd84 | |||
cc1e0599aa | |||
221b97901f | |||
498bb0e5fb | |||
aa94dfcfe0 | |||
65d9253876 | |||
3ac510c4b1 | |||
253cd1ecbd | |||
c82c48dfec | |||
433beec2dd | |||
3a1e7537dd | |||
9170ae6be7 | |||
a5ee5b7f09 | |||
32e6658f3d | |||
e45d9b39d5 | |||
cf1cfecb08 | |||
95ea3e558f | |||
0006a94632 | |||
7ea18dbe12 | |||
6004b74724 | |||
4d82ae8058 | |||
7fe26d0df0 | |||
80bade0e03 | |||
b63db7fe76 | |||
49f73f5f04 | |||
98749f42c0 | |||
f0e6bd64f4 | |||
3bea3a114a | |||
454f711656 | |||
82e4c923e7 | |||
5b4d8282ae | |||
cf767a1d94 | |||
af93a8386a | |||
29ca263130 | |||
7332f68d9c | |||
e9e6f3313e | |||
85764c37c2 | |||
ef1f29f905 | |||
22026efa7d | |||
4a3e6a9e15 | |||
00092ba7b6 | |||
b5da8ece4a | |||
dfe9165bc9 | |||
3d45b54236 | |||
7f63fe7f0e | |||
bc5dbab9c5 | |||
9910fc7a92 | |||
2356eac118 | |||
0135b8d838 | |||
8ec33ccbf4 | |||
d267316a35 | |||
138da60e55 | |||
4562c2f991 | |||
8009f4ca9b | |||
54dee9702b | |||
94385564bd | |||
0b2309816f | |||
8283272a3b | |||
eb02a47e9a | |||
7c0c1ec94f | |||
272044a77e | |||
39c22b1cf6 | |||
98c3bb912d | |||
035b92d9b8 | |||
0bfc0bd61b | |||
de00a20eee | |||
73982f48d6 | |||
1d36b30361 | |||
dea743a307 | |||
c48bd3e758 | |||
56bbf73b5e | |||
4f6c5aa053 | |||
d8e79fb4f9 | |||
06e0fa465b | |||
895a257f50 | |||
d9804ba00b | |||
62ff1c2f1c | |||
a157596a2e | |||
12102bf527 | |||
c00a018380 | |||
53b3cac4ca | |||
19eabfaba1 | |||
ec2eadad6d | |||
54e176e75d | |||
0a7ccaeefa | |||
a5f093e185 | |||
a4f68dd175 | |||
8067c35c70 | |||
ebe381053e | |||
03f2470dae | |||
ea434815cf | |||
bbea4b4359 | |||
e0b485cc81 | |||
87bb37ac01 |
@ -1,6 +1,7 @@
|
||||
plugins {
|
||||
id "com.android.application"
|
||||
id 'com.google.gms.google-services'
|
||||
id 'com.google.firebase.crashlytics'
|
||||
id "kotlin-android"
|
||||
id "dev.flutter.flutter-gradle-plugin"
|
||||
}
|
||||
|
@ -22,7 +22,8 @@
|
||||
android:label="Solian"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:supportsRtl="true">
|
||||
android:supportsRtl="true"
|
||||
android:usesCleartextTraffic="true">
|
||||
<receiver android:exported="false"
|
||||
android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
|
||||
<receiver android:exported="false"
|
||||
@ -58,6 +59,13 @@
|
||||
<data android:host="sn.solsynth.dev" />
|
||||
<data android:scheme="https" />
|
||||
<data android:scheme="https" />
|
||||
</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" />
|
||||
<data android:scheme="solink" />
|
||||
</intent-filter>
|
||||
|
||||
|
BIN
android/app/src/main/res/drawable-hdpi/splash.png
Normal file
After Width: | Height: | Size: 75 KiB |
BIN
android/app/src/main/res/drawable-mdpi/splash.png
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
android/app/src/main/res/drawable-night-v21/background.png
Normal file
After Width: | Height: | Size: 69 B |
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<bitmap android:gravity="fill" android:src="@drawable/background"/>
|
||||
</item>
|
||||
<item>
|
||||
<bitmap android:gravity="center" android:src="@drawable/splash"/>
|
||||
</item>
|
||||
</layer-list>
|
BIN
android/app/src/main/res/drawable-night/background.png
Normal file
After Width: | Height: | Size: 69 B |
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<bitmap android:gravity="fill" android:src="@drawable/background"/>
|
||||
</item>
|
||||
<item>
|
||||
<bitmap android:gravity="center" android:src="@drawable/splash"/>
|
||||
</item>
|
||||
</layer-list>
|
BIN
android/app/src/main/res/drawable-v21/background.png
Normal file
After Width: | Height: | Size: 69 B |
@ -1,12 +1,9 @@
|
||||
<?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> -->
|
||||
<item>
|
||||
<bitmap android:gravity="fill" android:src="@drawable/background"/>
|
||||
</item>
|
||||
<item>
|
||||
<bitmap android:gravity="center" android:src="@drawable/splash"/>
|
||||
</item>
|
||||
</layer-list>
|
||||
|
BIN
android/app/src/main/res/drawable-xhdpi/splash.png
Normal file
After Width: | Height: | Size: 117 KiB |
BIN
android/app/src/main/res/drawable-xxhdpi/splash.png
Normal file
After Width: | Height: | Size: 233 KiB |
BIN
android/app/src/main/res/drawable-xxxhdpi/splash.png
Normal file
After Width: | Height: | Size: 355 KiB |
BIN
android/app/src/main/res/drawable/background.png
Normal file
After Width: | Height: | Size: 69 B |
@ -1,12 +1,9 @@
|
||||
<?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/launch_image" />
|
||||
</item> -->
|
||||
<item>
|
||||
<bitmap android:gravity="fill" android:src="@drawable/background"/>
|
||||
</item>
|
||||
<item>
|
||||
<bitmap android:gravity="center" android:src="@drawable/splash"/>
|
||||
</item>
|
||||
</layer-list>
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 24 KiB |
19
android/app/src/main/res/values-night-v31/styles.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?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">
|
||||
<item name="android:forceDarkAllowed">false</item>
|
||||
<item name="android:windowFullscreen">false</item>
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
|
||||
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</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>
|
@ -5,6 +5,10 @@
|
||||
<!-- 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>
|
||||
<item name="android:forceDarkAllowed">false</item>
|
||||
<item name="android:windowFullscreen">false</item>
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
|
||||
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</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
|
||||
|
19
android/app/src/main/res/values-v31/styles.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?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">
|
||||
<item name="android:forceDarkAllowed">false</item>
|
||||
<item name="android:windowFullscreen">false</item>
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
|
||||
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</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>
|
@ -5,6 +5,10 @@
|
||||
<!-- 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>
|
||||
<item name="android:forceDarkAllowed">false</item>
|
||||
<item name="android:windowFullscreen">false</item>
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
|
||||
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</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
|
||||
|
@ -12,6 +12,17 @@ subprojects {
|
||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||
}
|
||||
subprojects {
|
||||
// TO FIX LIVEKIT ISSUE BY THIS
|
||||
// https://github.com/livekit/client-sdk-flutter/issues/569#issuecomment-2275686786
|
||||
afterEvaluate { project ->
|
||||
if (project.plugins.hasPlugin("com.android.application") ||
|
||||
project.plugins.hasPlugin("com.android.library")) {
|
||||
project.android {
|
||||
compileSdkVersion 34
|
||||
buildToolsVersion "34.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
project.evaluationDependsOn(":app")
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,7 @@ plugins {
|
||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||
id "com.android.application" version '8.4.0' apply false
|
||||
id "com.google.gms.google-services" version "4.3.15" apply false
|
||||
id "com.google.firebase.crashlytics" version "2.8.1" apply false
|
||||
id "org.jetbrains.kotlin.android" version '2.0.0' apply false
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 166 KiB After Width: | Height: | Size: 406 KiB |
BIN
assets/icon.png
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 360 KiB |
BIN
assets/logo.png
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 360 KiB |
7
build.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
targets:
|
||||
$default:
|
||||
builders:
|
||||
json_serializable:
|
||||
options:
|
||||
explicit_to_json: true
|
||||
field_rename: snake
|
295
ios/Podfile.lock
@ -38,39 +38,126 @@ PODS:
|
||||
- file_picker (0.0.1):
|
||||
- DKImagePickerController/PhotoGallery
|
||||
- Flutter
|
||||
- Firebase/CoreOnly (10.29.0):
|
||||
- FirebaseCore (= 10.29.0)
|
||||
- Firebase/Messaging (10.29.0):
|
||||
- Firebase/Analytics (11.0.0):
|
||||
- Firebase/Core
|
||||
- Firebase/Core (11.0.0):
|
||||
- Firebase/CoreOnly
|
||||
- FirebaseMessaging (~> 10.29.0)
|
||||
- firebase_core (3.3.0):
|
||||
- Firebase/CoreOnly (= 10.29.0)
|
||||
- Flutter
|
||||
- firebase_messaging (15.0.4):
|
||||
- Firebase/Messaging (= 10.29.0)
|
||||
- FirebaseAnalytics (~> 11.0.0)
|
||||
- Firebase/CoreOnly (11.0.0):
|
||||
- FirebaseCore (= 11.0.0)
|
||||
- Firebase/Crashlytics (11.0.0):
|
||||
- Firebase/CoreOnly
|
||||
- FirebaseCrashlytics (~> 11.0.0)
|
||||
- Firebase/Messaging (11.0.0):
|
||||
- Firebase/CoreOnly
|
||||
- FirebaseMessaging (~> 11.0.0)
|
||||
- Firebase/Performance (11.0.0):
|
||||
- Firebase/CoreOnly
|
||||
- FirebasePerformance (~> 11.0.0)
|
||||
- firebase_analytics (11.3.0):
|
||||
- Firebase/Analytics (= 11.0.0)
|
||||
- firebase_core
|
||||
- Flutter
|
||||
- FirebaseCore (10.29.0):
|
||||
- FirebaseCoreInternal (~> 10.0)
|
||||
- GoogleUtilities/Environment (~> 7.12)
|
||||
- GoogleUtilities/Logger (~> 7.12)
|
||||
- FirebaseCoreInternal (10.29.0):
|
||||
- "GoogleUtilities/NSData+zlib (~> 7.8)"
|
||||
- FirebaseInstallations (10.29.0):
|
||||
- FirebaseCore (~> 10.0)
|
||||
- GoogleUtilities/Environment (~> 7.8)
|
||||
- GoogleUtilities/UserDefaults (~> 7.8)
|
||||
- PromisesObjC (~> 2.1)
|
||||
- FirebaseMessaging (10.29.0):
|
||||
- FirebaseCore (~> 10.0)
|
||||
- FirebaseInstallations (~> 10.0)
|
||||
- GoogleDataTransport (~> 9.3)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
|
||||
- GoogleUtilities/Environment (~> 7.8)
|
||||
- GoogleUtilities/Reachability (~> 7.8)
|
||||
- GoogleUtilities/UserDefaults (~> 7.8)
|
||||
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||
- firebase_core (3.4.0):
|
||||
- Firebase/CoreOnly (= 11.0.0)
|
||||
- Flutter
|
||||
- firebase_crashlytics (4.1.0):
|
||||
- Firebase/Crashlytics (= 11.0.0)
|
||||
- firebase_core
|
||||
- Flutter
|
||||
- firebase_messaging (15.1.0):
|
||||
- Firebase/Messaging (= 11.0.0)
|
||||
- firebase_core
|
||||
- Flutter
|
||||
- firebase_performance (0.10.0-5):
|
||||
- Firebase/Performance (= 11.0.0)
|
||||
- firebase_core
|
||||
- Flutter
|
||||
- FirebaseABTesting (11.1.0):
|
||||
- FirebaseCore (~> 11.0)
|
||||
- FirebaseAnalytics (11.0.0):
|
||||
- FirebaseAnalytics/AdIdSupport (= 11.0.0)
|
||||
- FirebaseCore (~> 11.0)
|
||||
- FirebaseInstallations (~> 11.0)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.0)
|
||||
- GoogleUtilities/MethodSwizzler (~> 8.0)
|
||||
- GoogleUtilities/Network (~> 8.0)
|
||||
- "GoogleUtilities/NSData+zlib (~> 8.0)"
|
||||
- nanopb (~> 3.30910.0)
|
||||
- FirebaseAnalytics/AdIdSupport (11.0.0):
|
||||
- FirebaseCore (~> 11.0)
|
||||
- FirebaseInstallations (~> 11.0)
|
||||
- GoogleAppMeasurement (= 11.0.0)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.0)
|
||||
- GoogleUtilities/MethodSwizzler (~> 8.0)
|
||||
- GoogleUtilities/Network (~> 8.0)
|
||||
- "GoogleUtilities/NSData+zlib (~> 8.0)"
|
||||
- nanopb (~> 3.30910.0)
|
||||
- FirebaseCore (11.0.0):
|
||||
- FirebaseCoreInternal (~> 11.0)
|
||||
- GoogleUtilities/Environment (~> 8.0)
|
||||
- GoogleUtilities/Logger (~> 8.0)
|
||||
- FirebaseCoreExtension (11.1.0):
|
||||
- FirebaseCore (~> 11.0)
|
||||
- FirebaseCoreInternal (11.1.0):
|
||||
- "GoogleUtilities/NSData+zlib (~> 8.0)"
|
||||
- FirebaseCrashlytics (11.0.0):
|
||||
- FirebaseCore (~> 11.0)
|
||||
- FirebaseInstallations (~> 11.0)
|
||||
- FirebaseRemoteConfigInterop (~> 11.0)
|
||||
- FirebaseSessions (~> 11.0)
|
||||
- GoogleDataTransport (~> 10.0)
|
||||
- GoogleUtilities/Environment (~> 8.0)
|
||||
- nanopb (~> 3.30910.0)
|
||||
- PromisesObjC (~> 2.4)
|
||||
- FirebaseInstallations (11.1.0):
|
||||
- FirebaseCore (~> 11.0)
|
||||
- GoogleUtilities/Environment (~> 8.0)
|
||||
- GoogleUtilities/UserDefaults (~> 8.0)
|
||||
- PromisesObjC (~> 2.4)
|
||||
- FirebaseMessaging (11.0.0):
|
||||
- FirebaseCore (~> 11.0)
|
||||
- FirebaseInstallations (~> 11.0)
|
||||
- GoogleDataTransport (~> 10.0)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.0)
|
||||
- GoogleUtilities/Environment (~> 8.0)
|
||||
- GoogleUtilities/Reachability (~> 8.0)
|
||||
- GoogleUtilities/UserDefaults (~> 8.0)
|
||||
- nanopb (~> 3.30910.0)
|
||||
- FirebasePerformance (11.0.0):
|
||||
- FirebaseCore (~> 11.0)
|
||||
- FirebaseInstallations (~> 11.0)
|
||||
- FirebaseRemoteConfig (~> 11.0)
|
||||
- FirebaseSessions (~> 11.0)
|
||||
- GoogleDataTransport (~> 10.0)
|
||||
- GoogleUtilities/Environment (~> 8.0)
|
||||
- GoogleUtilities/MethodSwizzler (~> 8.0)
|
||||
- GoogleUtilities/UserDefaults (~> 8.0)
|
||||
- nanopb (~> 3.30910.0)
|
||||
- FirebaseRemoteConfig (11.1.0):
|
||||
- FirebaseABTesting (~> 11.0)
|
||||
- FirebaseCore (~> 11.0)
|
||||
- FirebaseInstallations (~> 11.0)
|
||||
- FirebaseRemoteConfigInterop (~> 11.0)
|
||||
- FirebaseSharedSwift (~> 11.0)
|
||||
- GoogleUtilities/Environment (~> 8.0)
|
||||
- "GoogleUtilities/NSData+zlib (~> 8.0)"
|
||||
- FirebaseRemoteConfigInterop (11.1.0)
|
||||
- FirebaseSessions (11.1.0):
|
||||
- FirebaseCore (~> 11.0)
|
||||
- FirebaseCoreExtension (~> 11.0)
|
||||
- FirebaseInstallations (~> 11.0)
|
||||
- GoogleDataTransport (~> 10.0)
|
||||
- GoogleUtilities/Environment (~> 8.0)
|
||||
- GoogleUtilities/UserDefaults (~> 8.0)
|
||||
- nanopb (~> 3.30910.0)
|
||||
- PromisesSwift (~> 2.1)
|
||||
- FirebaseSharedSwift (11.1.0)
|
||||
- Flutter (1.0.0)
|
||||
- flutter_keyboard_visibility (0.0.1):
|
||||
- Flutter
|
||||
- flutter_native_splash (0.0.1):
|
||||
- Flutter
|
||||
- flutter_secure_storage (6.0.0):
|
||||
- Flutter
|
||||
- flutter_webrtc (0.11.3):
|
||||
@ -79,33 +166,54 @@ PODS:
|
||||
- gal (1.0.0):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- GoogleDataTransport (9.4.1):
|
||||
- GoogleUtilities/Environment (~> 7.7)
|
||||
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||
- PromisesObjC (< 3.0, >= 1.2)
|
||||
- GoogleUtilities/AppDelegateSwizzler (7.13.3):
|
||||
- GoogleAppMeasurement (11.0.0):
|
||||
- GoogleAppMeasurement/AdIdSupport (= 11.0.0)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.0)
|
||||
- GoogleUtilities/MethodSwizzler (~> 8.0)
|
||||
- GoogleUtilities/Network (~> 8.0)
|
||||
- "GoogleUtilities/NSData+zlib (~> 8.0)"
|
||||
- nanopb (~> 3.30910.0)
|
||||
- GoogleAppMeasurement/AdIdSupport (11.0.0):
|
||||
- GoogleAppMeasurement/WithoutAdIdSupport (= 11.0.0)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.0)
|
||||
- GoogleUtilities/MethodSwizzler (~> 8.0)
|
||||
- GoogleUtilities/Network (~> 8.0)
|
||||
- "GoogleUtilities/NSData+zlib (~> 8.0)"
|
||||
- nanopb (~> 3.30910.0)
|
||||
- GoogleAppMeasurement/WithoutAdIdSupport (11.0.0):
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.0)
|
||||
- GoogleUtilities/MethodSwizzler (~> 8.0)
|
||||
- GoogleUtilities/Network (~> 8.0)
|
||||
- "GoogleUtilities/NSData+zlib (~> 8.0)"
|
||||
- nanopb (~> 3.30910.0)
|
||||
- GoogleDataTransport (10.1.0):
|
||||
- nanopb (~> 3.30910.0)
|
||||
- PromisesObjC (~> 2.4)
|
||||
- GoogleUtilities/AppDelegateSwizzler (8.0.2):
|
||||
- GoogleUtilities/Environment
|
||||
- GoogleUtilities/Logger
|
||||
- GoogleUtilities/Network
|
||||
- GoogleUtilities/Privacy
|
||||
- GoogleUtilities/Environment (7.13.3):
|
||||
- GoogleUtilities/Environment (8.0.2):
|
||||
- GoogleUtilities/Privacy
|
||||
- PromisesObjC (< 3.0, >= 1.2)
|
||||
- GoogleUtilities/Logger (7.13.3):
|
||||
- GoogleUtilities/Logger (8.0.2):
|
||||
- GoogleUtilities/Environment
|
||||
- GoogleUtilities/Privacy
|
||||
- GoogleUtilities/Network (7.13.3):
|
||||
- GoogleUtilities/MethodSwizzler (8.0.2):
|
||||
- GoogleUtilities/Logger
|
||||
- GoogleUtilities/Privacy
|
||||
- GoogleUtilities/Network (8.0.2):
|
||||
- GoogleUtilities/Logger
|
||||
- "GoogleUtilities/NSData+zlib"
|
||||
- GoogleUtilities/Privacy
|
||||
- GoogleUtilities/Reachability
|
||||
- "GoogleUtilities/NSData+zlib (7.13.3)":
|
||||
- "GoogleUtilities/NSData+zlib (8.0.2)":
|
||||
- GoogleUtilities/Privacy
|
||||
- GoogleUtilities/Privacy (7.13.3)
|
||||
- GoogleUtilities/Reachability (7.13.3):
|
||||
- GoogleUtilities/Privacy (8.0.2)
|
||||
- GoogleUtilities/Reachability (8.0.2):
|
||||
- GoogleUtilities/Logger
|
||||
- GoogleUtilities/Privacy
|
||||
- GoogleUtilities/UserDefaults (7.13.3):
|
||||
- GoogleUtilities/UserDefaults (8.0.2):
|
||||
- GoogleUtilities/Logger
|
||||
- GoogleUtilities/Privacy
|
||||
- image_cropper (0.0.4):
|
||||
@ -113,7 +221,7 @@ PODS:
|
||||
- TOCropViewController (~> 2.7.4)
|
||||
- image_picker_ios (0.0.1):
|
||||
- Flutter
|
||||
- livekit_client (2.2.3):
|
||||
- livekit_client (2.2.4):
|
||||
- Flutter
|
||||
- WebRTC-SDK (= 125.6422.04)
|
||||
- media_kit_libs_ios_video (1.0.4):
|
||||
@ -122,11 +230,11 @@ PODS:
|
||||
- Flutter
|
||||
- media_kit_video (0.0.1):
|
||||
- Flutter
|
||||
- nanopb (2.30910.0):
|
||||
- nanopb/decode (= 2.30910.0)
|
||||
- nanopb/encode (= 2.30910.0)
|
||||
- nanopb/decode (2.30910.0)
|
||||
- nanopb/encode (2.30910.0)
|
||||
- nanopb (3.30910.0):
|
||||
- nanopb/decode (= 3.30910.0)
|
||||
- nanopb/encode (= 3.30910.0)
|
||||
- nanopb/decode (3.30910.0)
|
||||
- nanopb/encode (3.30910.0)
|
||||
- package_info_plus (0.4.5):
|
||||
- Flutter
|
||||
- pasteboard (0.0.1):
|
||||
@ -136,19 +244,18 @@ PODS:
|
||||
- FlutterMacOS
|
||||
- permission_handler_apple (9.3.0):
|
||||
- Flutter
|
||||
- pointer_interceptor_ios (0.0.1):
|
||||
- Flutter
|
||||
- PromisesObjC (2.4.0)
|
||||
- PromisesSwift (2.4.0):
|
||||
- PromisesObjC (= 2.4.0)
|
||||
- protocol_handler_ios (0.0.1):
|
||||
- Flutter
|
||||
- screen_brightness_ios (0.1.0):
|
||||
- Flutter
|
||||
- SDWebImage (5.19.4):
|
||||
- SDWebImage/Core (= 5.19.4)
|
||||
- SDWebImage/Core (5.19.4)
|
||||
- Sentry/HybridSDK (8.32.0)
|
||||
- sentry_flutter (8.6.0):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- Sentry/HybridSDK (= 8.32.0)
|
||||
- SDWebImage (5.19.7):
|
||||
- SDWebImage/Core (= 5.19.7)
|
||||
- SDWebImage/Core (5.19.7)
|
||||
- share_plus (0.0.1):
|
||||
- Flutter
|
||||
- shared_preferences_foundation (0.0.1):
|
||||
@ -171,9 +278,14 @@ DEPENDENCIES:
|
||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`)
|
||||
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
||||
- file_picker (from `.symlinks/plugins/file_picker/ios`)
|
||||
- firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`)
|
||||
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
|
||||
- firebase_crashlytics (from `.symlinks/plugins/firebase_crashlytics/ios`)
|
||||
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
|
||||
- firebase_performance (from `.symlinks/plugins/firebase_performance/ios`)
|
||||
- Flutter (from `Flutter`)
|
||||
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
|
||||
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
|
||||
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
|
||||
- flutter_webrtc (from `.symlinks/plugins/flutter_webrtc/ios`)
|
||||
- gal (from `.symlinks/plugins/gal/darwin`)
|
||||
@ -187,9 +299,9 @@ DEPENDENCIES:
|
||||
- pasteboard (from `.symlinks/plugins/pasteboard/ios`)
|
||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
||||
- pointer_interceptor_ios (from `.symlinks/plugins/pointer_interceptor_ios/ios`)
|
||||
- protocol_handler_ios (from `.symlinks/plugins/protocol_handler_ios/ios`)
|
||||
- screen_brightness_ios (from `.symlinks/plugins/screen_brightness_ios/ios`)
|
||||
- sentry_flutter (from `.symlinks/plugins/sentry_flutter/ios`)
|
||||
- share_plus (from `.symlinks/plugins/share_plus/ios`)
|
||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||
- sqflite (from `.symlinks/plugins/sqflite/darwin`)
|
||||
@ -202,16 +314,26 @@ SPEC REPOS:
|
||||
- DKImagePickerController
|
||||
- DKPhotoGallery
|
||||
- Firebase
|
||||
- FirebaseABTesting
|
||||
- FirebaseAnalytics
|
||||
- FirebaseCore
|
||||
- FirebaseCoreExtension
|
||||
- FirebaseCoreInternal
|
||||
- FirebaseCrashlytics
|
||||
- FirebaseInstallations
|
||||
- FirebaseMessaging
|
||||
- FirebasePerformance
|
||||
- FirebaseRemoteConfig
|
||||
- FirebaseRemoteConfigInterop
|
||||
- FirebaseSessions
|
||||
- FirebaseSharedSwift
|
||||
- GoogleAppMeasurement
|
||||
- GoogleDataTransport
|
||||
- GoogleUtilities
|
||||
- nanopb
|
||||
- PromisesObjC
|
||||
- PromisesSwift
|
||||
- SDWebImage
|
||||
- Sentry
|
||||
- SwiftyGif
|
||||
- TOCropViewController
|
||||
- WebRTC-SDK
|
||||
@ -223,12 +345,22 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/device_info_plus/ios"
|
||||
file_picker:
|
||||
:path: ".symlinks/plugins/file_picker/ios"
|
||||
firebase_analytics:
|
||||
:path: ".symlinks/plugins/firebase_analytics/ios"
|
||||
firebase_core:
|
||||
:path: ".symlinks/plugins/firebase_core/ios"
|
||||
firebase_crashlytics:
|
||||
:path: ".symlinks/plugins/firebase_crashlytics/ios"
|
||||
firebase_messaging:
|
||||
:path: ".symlinks/plugins/firebase_messaging/ios"
|
||||
firebase_performance:
|
||||
:path: ".symlinks/plugins/firebase_performance/ios"
|
||||
Flutter:
|
||||
:path: Flutter
|
||||
flutter_keyboard_visibility:
|
||||
:path: ".symlinks/plugins/flutter_keyboard_visibility/ios"
|
||||
flutter_native_splash:
|
||||
:path: ".symlinks/plugins/flutter_native_splash/ios"
|
||||
flutter_secure_storage:
|
||||
:path: ".symlinks/plugins/flutter_secure_storage/ios"
|
||||
flutter_webrtc:
|
||||
@ -255,12 +387,12 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||
permission_handler_apple:
|
||||
:path: ".symlinks/plugins/permission_handler_apple/ios"
|
||||
pointer_interceptor_ios:
|
||||
:path: ".symlinks/plugins/pointer_interceptor_ios/ios"
|
||||
protocol_handler_ios:
|
||||
:path: ".symlinks/plugins/protocol_handler_ios/ios"
|
||||
screen_brightness_ios:
|
||||
:path: ".symlinks/plugins/screen_brightness_ios/ios"
|
||||
sentry_flutter:
|
||||
:path: ".symlinks/plugins/sentry_flutter/ios"
|
||||
share_plus:
|
||||
:path: ".symlinks/plugins/share_plus/ios"
|
||||
shared_preferences_foundation:
|
||||
@ -280,36 +412,51 @@ SPEC CHECKSUMS:
|
||||
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
|
||||
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
|
||||
file_picker: 09aa5ec1ab24135ccd7a1621c46c84134bfd6655
|
||||
Firebase: cec914dab6fd7b1bd8ab56ea07ce4e03dd251c2d
|
||||
firebase_core: 57aeb91680e5d5e6df6b888064be7c785f146efb
|
||||
firebase_messaging: c862b3d2b973ecc769194dc8de09bd22c77ae757
|
||||
FirebaseCore: 30e9c1cbe3d38f5f5e75f48bfcea87d7c358ec16
|
||||
FirebaseCoreInternal: df84dd300b561c27d5571684f389bf60b0a5c934
|
||||
FirebaseInstallations: 913cf60d0400ebd5d6b63a28b290372ab44590dd
|
||||
FirebaseMessaging: 7b5d8033e183ab59eb5b852a53201559e976d366
|
||||
Firebase: 9f574c08c2396885b5e7e100ed4293d956218af9
|
||||
firebase_analytics: 1a66fe8d4375eccff44671ea37897683a78b2675
|
||||
firebase_core: ceec591a66629daaee82d3321551692c4a871493
|
||||
firebase_crashlytics: e4f04180f443d5a8b56fbc0685bdbd7d90dd26f0
|
||||
firebase_messaging: 15d8b557010f3bb7b98d0302e1c7c8fbcd244425
|
||||
firebase_performance: d373c742649e2d85d92cc223b4511c3d132887ef
|
||||
FirebaseABTesting: c2e22c3aab99afa81d0561708b2c1c356c556976
|
||||
FirebaseAnalytics: 27eb78b97880ea4a004839b9bac0b58880f5a92a
|
||||
FirebaseCore: 3cf438f431f18c12cdf2aaf64434648b63f7e383
|
||||
FirebaseCoreExtension: aa5c9779c2d0d39d83f1ceb3fdbafe80c4feecfa
|
||||
FirebaseCoreInternal: adefedc9a88dbe393c4884640a73ec9e8e790f8c
|
||||
FirebaseCrashlytics: 745d8f0221fe49c62865391d1bf56f5a12eeec0b
|
||||
FirebaseInstallations: d0a8fea5a6fa91abc661591cf57c0f0d70863e57
|
||||
FirebaseMessaging: d2d1d9c62c46dd2db49a952f7deb5b16ad2c9742
|
||||
FirebasePerformance: efdc02bacb1b4710588c9f867011605c081cdf79
|
||||
FirebaseRemoteConfig: 05521e937b72e01847a7128da5a492327364c705
|
||||
FirebaseRemoteConfigInterop: abf8b1bbc0bf1b84abd22b66746926410bf91a87
|
||||
FirebaseSessions: 78f137e68dc01ca71606169ba4ac73b98c13752a
|
||||
FirebaseSharedSwift: 260a35e08943ec810d820a70bc0359136351d0c5
|
||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
|
||||
flutter_native_splash: edf599c81f74d093a4daf8e17bd7a018854bc778
|
||||
flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12
|
||||
flutter_webrtc: 75b868e4f9e817c7a9a42ca4b6169063de4eec9f
|
||||
gal: 61e868295d28fe67ffa297fae6dacebf56fd53e1
|
||||
GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a
|
||||
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
|
||||
GoogleAppMeasurement: 6e49ffac7d3f2c3ded9cc663f912a13b67bbd0de
|
||||
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
|
||||
GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
|
||||
image_cropper: 37d40f62177c101ff4c164906d259ea2c3aa70cf
|
||||
image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1
|
||||
livekit_client: bad83a7776a41abc42e1f26d903eeac9164c8a9f
|
||||
livekit_client: d079c5f040d4bf2b80440ff0ae997725a183e4bc
|
||||
media_kit_libs_ios_video: a5fe24bc7875ccd6378a0978c13185e1344651c1
|
||||
media_kit_native_event_loop: e6b2ab20cf0746eb1c33be961fcf79667304fa2a
|
||||
media_kit_video: 5da63f157170e5bf303bf85453b7ef6971218a2e
|
||||
nanopb: 438bc412db1928dac798aa6fd75726007be04262
|
||||
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
|
||||
package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c
|
||||
pasteboard: 982969ebaa7c78af3e6cc7761e8f5e77565d9ce0
|
||||
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
||||
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
|
||||
pointer_interceptor_ios: 508241697ff0947f853c061945a8b822463947c1
|
||||
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||
PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851
|
||||
protocol_handler_ios: a5db8abc38526ee326988b808be621e5fd568990
|
||||
screen_brightness_ios: 715ca807df953bf676d339f11464e438143ee625
|
||||
SDWebImage: 066c47b573f408f18caa467d71deace7c0f8280d
|
||||
Sentry: 96ae1dcdf01a644bc3a3b1dc279cecaf48a833fb
|
||||
sentry_flutter: 090351ce1ff5f96a4b33ef9455b7e3b28185387d
|
||||
SDWebImage: 8a6b7b160b4d710e2a22b6900e25301075c34cb3
|
||||
share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad
|
||||
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
|
||||
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
|
||||
|
@ -254,6 +254,7 @@
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
B1CDA9DD5B638A2BB88053CB /* [CP] Check Pods Manifest.lock */,
|
||||
7356FAC42C72724B0051A465 /* [Crashlytics] Clear dSYM */,
|
||||
9740EEB61CF901F6004384FC /* Run Script */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
@ -263,6 +264,7 @@
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
287A33C298CA352A7E7F32A4 /* [CP] Embed Pods Frameworks */,
|
||||
0818E8E4321C0D7433E07576 /* [CP] Copy Pods Resources */,
|
||||
1A9FD6BE5DEE99CDA7399504 /* [Crashlytics] Upload dSYM */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@ -365,6 +367,24 @@
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
1A9FD6BE5DEE99CDA7399504 /* [Crashlytics] Upload dSYM */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[Crashlytics] Upload dSYM";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\n#!/bin/bash\nsleep 1 # Without this, there seems a chance that the script runs before dSYM generation is finished \n$PODS_ROOT/FirebaseCrashlytics/upload-symbols -gsp $PROJECT_DIR/Runner/GoogleService-Info.plist -p ios $DWARF_DSYM_FOLDER_PATH/$DWARF_DSYM_FILE_NAME\n";
|
||||
};
|
||||
259653AE41D478F4C6BAE9B2 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@ -420,6 +440,24 @@
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||
};
|
||||
7356FAC42C72724B0051A465 /* [Crashlytics] Clear dSYM */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[Crashlytics] Clear dSYM";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\n#!/bin/bash\nrm -rf $DWARF_DSYM_FOLDER_PATH/$DWARF_DSYM_FILE_NAME\n";
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
@ -433,7 +471,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
|
||||
};
|
||||
B1CDA9DD5B638A2BB88053CB /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import UIKit
|
||||
import Flutter
|
||||
|
||||
@UIApplicationMain
|
||||
@main
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 320 KiB |
Before Width: | Height: | Size: 541 B After Width: | Height: | Size: 822 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 815 B After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 20 KiB |
22
ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "background.png",
|
||||
"idiom" : "universal"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "darkbackground.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png
vendored
Normal file
After Width: | Height: | Size: 69 B |
BIN
ios/Runner/Assets.xcassets/LaunchBackground.imageset/darkbackground.png
vendored
Normal file
After Width: | Height: | Size: 69 B |
@ -1,23 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 233 KiB |
@ -16,13 +16,19 @@
|
||||
<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>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" image="LaunchBackground" translatesAutoresizingMaskIntoConstraints="NO" id="tWc-Dq-wcI"/>
|
||||
<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"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="3T2-ad-Qdv"/>
|
||||
<constraint firstItem="tWc-Dq-wcI" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="RPx-PI-7Xg"/>
|
||||
<constraint firstItem="tWc-Dq-wcI" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="SdS-ul-q2q"/>
|
||||
<constraint firstAttribute="trailing" secondItem="tWc-Dq-wcI" secondAttribute="trailing" id="Swv-Gf-Rwn"/>
|
||||
<constraint firstAttribute="trailing" secondItem="YRO-k0-Ey4" secondAttribute="trailing" id="TQA-XW-tRk"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="duK-uY-Gun"/>
|
||||
<constraint firstItem="tWc-Dq-wcI" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="kV7-tw-vXt"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="xPn-NY-SIU"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
@ -32,6 +38,7 @@
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="LaunchImage" width="168" height="185"/>
|
||||
<image name="LaunchImage" width="1026" height="1024"/>
|
||||
<image name="LaunchBackground" width="1" height="1"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
@ -81,5 +81,7 @@
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_animate/flutter_animate.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:package_info_plus/package_info_plus.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
@ -9,6 +9,7 @@ import 'package:solian/providers/auth.dart';
|
||||
import 'package:solian/providers/content/channel.dart';
|
||||
import 'package:solian/providers/content/realm.dart';
|
||||
import 'package:solian/providers/relation.dart';
|
||||
import 'package:solian/providers/stickers.dart';
|
||||
import 'package:solian/providers/theme_switcher.dart';
|
||||
import 'package:solian/providers/websocket.dart';
|
||||
import 'package:solian/services.dart';
|
||||
@ -112,12 +113,18 @@ class _BootstrapperShellState extends State<BootstrapperShell> {
|
||||
label: 'bsPreparingData',
|
||||
action: () async {
|
||||
final AuthProvider auth = Get.find();
|
||||
if (auth.isAuthorized.isTrue) {
|
||||
try {
|
||||
await Future.wait([
|
||||
Get.find<RealmProvider>().refreshAvailableRealms(),
|
||||
Get.find<StickerProvider>().refreshAvailableStickers(),
|
||||
if (auth.isAuthorized.isTrue)
|
||||
Get.find<ChannelProvider>().refreshAvailableChannel(),
|
||||
if (auth.isAuthorized.isTrue)
|
||||
Get.find<RelationshipProvider>().refreshRelativeList(),
|
||||
if (auth.isAuthorized.isTrue)
|
||||
Get.find<RealmProvider>().refreshAvailableRealms(),
|
||||
]);
|
||||
} catch (e) {
|
||||
context.showErrorDialog(e);
|
||||
}
|
||||
},
|
||||
),
|
||||
@ -142,7 +149,7 @@ class _BootstrapperShellState extends State<BootstrapperShell> {
|
||||
try {
|
||||
for (var idx = 0; idx < _periods.length; idx++) {
|
||||
await _periods[idx].action();
|
||||
if (_isErrored) break;
|
||||
if (_isErrored && !_isDismissable) break;
|
||||
if (_periodCursor < _periods.length - 1) {
|
||||
setState(() => _periodCursor++);
|
||||
}
|
||||
@ -161,7 +168,8 @@ class _BootstrapperShellState extends State<BootstrapperShell> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (_isBusy || _isErrored) {
|
||||
return Material(
|
||||
return GestureDetector(
|
||||
child: Material(
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
@ -171,25 +179,26 @@ class _BootstrapperShellState extends State<BootstrapperShell> {
|
||||
height: 280,
|
||||
child: Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Image.asset('assets/logo.png', width: 80, height: 80)
|
||||
.animate(onPlay: (c) => c.repeat())
|
||||
.rotate(duration: 850.ms, curve: Curves.easeInOut),
|
||||
child: ClipRRect(
|
||||
borderRadius: const BorderRadius.all(Radius.circular(16)),
|
||||
child:
|
||||
Image.asset('assets/logo.png', width: 80, height: 80),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
child: Column(
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
if (_isErrored && !_isDismissable)
|
||||
if (_isErrored && !_isDismissable && !_isBusy)
|
||||
const Icon(Icons.cancel, size: 24),
|
||||
if (_isErrored && _isDismissable)
|
||||
if (_isErrored && _isDismissable && !_isBusy)
|
||||
const Icon(Icons.warning, size: 24),
|
||||
if (!_isErrored && _isBusy)
|
||||
if ((_isErrored && _isDismissable && _isBusy) || _isBusy)
|
||||
const SizedBox(
|
||||
width: 24,
|
||||
height: 24,
|
||||
child: CircularProgressIndicator(strokeWidth: 3),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const Gap(12),
|
||||
CenteredContainer(
|
||||
maxWidth: 280,
|
||||
child: Column(
|
||||
@ -212,6 +221,15 @@ class _BootstrapperShellState extends State<BootstrapperShell> {
|
||||
color: _unFocusColor,
|
||||
),
|
||||
).paddingOnly(bottom: 4),
|
||||
if (!_isBusy && _isErrored && _isDismissable)
|
||||
Text(
|
||||
'bsDismissibleErrorHint'.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: _unFocusColor,
|
||||
),
|
||||
).paddingOnly(bottom: 5),
|
||||
Text(
|
||||
'2024 © Solsynth LLC',
|
||||
textAlign: TextAlign.center,
|
||||
@ -225,6 +243,9 @@ class _BootstrapperShellState extends State<BootstrapperShell> {
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
if (_isBusy) return;
|
||||
if (_isDismissable) {
|
||||
@ -241,9 +262,6 @@ class _BootstrapperShellState extends State<BootstrapperShell> {
|
||||
_runPeriods();
|
||||
}
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -10,12 +10,14 @@ import 'package:solian/widgets/posts/editor/post_editor_categories_tags.dart';
|
||||
import 'package:solian/widgets/posts/editor/post_editor_date.dart';
|
||||
import 'package:solian/widgets/posts/editor/post_editor_overview.dart';
|
||||
import 'package:solian/widgets/posts/editor/post_editor_publish_zone.dart';
|
||||
import 'package:solian/widgets/posts/editor/post_editor_thumbnail.dart';
|
||||
import 'package:solian/widgets/posts/editor/post_editor_visibility.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
class PostEditorController extends GetxController {
|
||||
late final SharedPreferences _prefs;
|
||||
|
||||
final aliasController = TextEditingController();
|
||||
final titleController = TextEditingController();
|
||||
final descriptionController = TextEditingController();
|
||||
final contentController = TextEditingController();
|
||||
@ -29,8 +31,9 @@ class PostEditorController extends GetxController {
|
||||
Rx<Realm?> realmZone = Rx(null);
|
||||
Rx<DateTime?> publishedAt = Rx(null);
|
||||
Rx<DateTime?> publishedUntil = Rx(null);
|
||||
RxList<int> attachments = RxList<int>.empty(growable: true);
|
||||
RxList<String> attachments = RxList<String>.empty(growable: true);
|
||||
RxList<String> tags = RxList<String>.empty(growable: true);
|
||||
Rx<String?> thumbnail = Rx(null);
|
||||
|
||||
RxList<int> visibleUsers = RxList.empty(growable: true);
|
||||
RxList<int> invisibleUsers = RxList.empty(growable: true);
|
||||
@ -113,18 +116,27 @@ class PostEditorController extends GetxController {
|
||||
return showModalBottomSheet(
|
||||
context: context,
|
||||
builder: (context) => AttachmentEditorPopup(
|
||||
usage: 'i.attachment',
|
||||
pool: 'interactive',
|
||||
initialAttachments: attachments,
|
||||
onAdd: (int value) {
|
||||
onAdd: (String value) {
|
||||
attachments.add(value);
|
||||
},
|
||||
onRemove: (int value) {
|
||||
onRemove: (String value) {
|
||||
attachments.remove(value);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> editThumbnail(BuildContext context) {
|
||||
return showDialog(
|
||||
context: context,
|
||||
builder: (context) => PostEditorThumbnailDialog(
|
||||
controller: this,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void toggleDraftMode() {
|
||||
isDraft.value = !isDraft.value;
|
||||
}
|
||||
@ -157,6 +169,7 @@ class PostEditorController extends GetxController {
|
||||
}
|
||||
|
||||
void currentClear() {
|
||||
aliasController.clear();
|
||||
titleController.clear();
|
||||
descriptionController.clear();
|
||||
contentController.clear();
|
||||
@ -165,6 +178,7 @@ class PostEditorController extends GetxController {
|
||||
visibleUsers.clear();
|
||||
invisibleUsers.clear();
|
||||
visibility.value = 0;
|
||||
thumbnail.value = null;
|
||||
publishedAt.value = null;
|
||||
publishedUntil.value = null;
|
||||
isDraft.value = false;
|
||||
@ -185,17 +199,25 @@ class PostEditorController extends GetxController {
|
||||
|
||||
type = value.type;
|
||||
editTo.value = value;
|
||||
realmZone.value = value.realm;
|
||||
isDraft.value = value.isDraft ?? false;
|
||||
aliasController.text = value.alias ?? '';
|
||||
titleController.text = value.body['title'] ?? '';
|
||||
descriptionController.text = value.body['description'] ?? '';
|
||||
contentController.text = value.body['content'] ?? '';
|
||||
publishedAt.value = value.publishedAt;
|
||||
publishedUntil.value = value.publishedUntil;
|
||||
tags.value =
|
||||
value.body['tags']?.map((x) => x['alias']).toList() ?? List.empty();
|
||||
tags.value = List.from(
|
||||
value.body['tags']?.map((x) => x['alias']).toList() ?? List.empty(),
|
||||
growable: true,
|
||||
);
|
||||
tags.refresh();
|
||||
attachments.value = value.body['attachments']?.cast<int>() ?? List.empty();
|
||||
attachments.value = List.from(
|
||||
value.body['attachments'] ?? List.empty(),
|
||||
growable: true,
|
||||
);
|
||||
attachments.refresh();
|
||||
thumbnail.value = value.body['thumbnail'];
|
||||
|
||||
contentLength.value = contentController.text.length;
|
||||
}
|
||||
@ -243,9 +265,11 @@ class PostEditorController extends GetxController {
|
||||
|
||||
Map<String, dynamic> get payload {
|
||||
return {
|
||||
'alias': aliasController.text,
|
||||
'title': title,
|
||||
'description': description,
|
||||
'content': contentController.text,
|
||||
'thumbnail': thumbnail.value,
|
||||
'tags': tags.map((x) => {'alias': x}).toList(),
|
||||
'attachments': attachments,
|
||||
'visible_users': visibleUsers,
|
||||
@ -263,19 +287,33 @@ class PostEditorController extends GetxController {
|
||||
|
||||
set payload(Map<String, dynamic> value) {
|
||||
type = value['type'];
|
||||
tags.value = value['tags'].map((x) => x['alias']).toList().cast<String>();
|
||||
tags.value = List.from(
|
||||
value['tags'].map((x) => x['alias']).toList(),
|
||||
growable: true,
|
||||
);
|
||||
aliasController.text = value['alias'] ?? '';
|
||||
titleController.text = value['title'] ?? '';
|
||||
descriptionController.text = value['description'] ?? '';
|
||||
contentController.text = value['content'] ?? '';
|
||||
attachments.value = value['attachments'].cast<int>() ?? List.empty();
|
||||
attachments.value = List.from(
|
||||
value['attachments'] ?? List.empty(),
|
||||
growable: true,
|
||||
);
|
||||
attachments.refresh();
|
||||
thumbnail.value = value['thumbnail'];
|
||||
visibility.value = value['visibility'];
|
||||
isDraft.value = value['is_draft'];
|
||||
if (value['visible_users'] != null) {
|
||||
visibleUsers.value = value['visible_users'].cast<int>();
|
||||
visibleUsers.value = List.from(
|
||||
value['visible_users'],
|
||||
growable: true,
|
||||
);
|
||||
}
|
||||
if (value['invisible_users'] != null) {
|
||||
invisibleUsers.value = value['invisible_users'].cast<int>();
|
||||
invisibleUsers.value = List.from(
|
||||
value['invisible_users'],
|
||||
growable: true,
|
||||
);
|
||||
}
|
||||
if (value['published_at'] != null) {
|
||||
publishedAt.value = DateTime.parse(value['published_at']).toLocal();
|
||||
@ -304,11 +342,13 @@ class PostEditorController extends GetxController {
|
||||
|
||||
bool get isNotEmpty {
|
||||
return [
|
||||
aliasController.text.isNotEmpty,
|
||||
titleController.text.isNotEmpty,
|
||||
descriptionController.text.isNotEmpty,
|
||||
contentController.text.isNotEmpty,
|
||||
attachments.isNotEmpty,
|
||||
tags.isNotEmpty
|
||||
tags.isNotEmpty,
|
||||
thumbnail.value != null,
|
||||
].any((x) => x);
|
||||
}
|
||||
|
||||
|
@ -1,19 +1,23 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:infinite_scroll_pagination/infinite_scroll_pagination.dart';
|
||||
import 'package:solian/models/pagination.dart';
|
||||
import 'package:solian/models/post.dart';
|
||||
import 'package:solian/providers/content/posts.dart';
|
||||
import 'package:solian/providers/last_read.dart';
|
||||
|
||||
class PostListController extends GetxController {
|
||||
String? author;
|
||||
|
||||
/// The polling source modifier.
|
||||
/// - `0`: default recommendations
|
||||
/// - `1`: shuffle mode
|
||||
/// - `1`: friend mode
|
||||
/// - `2`: shuffle mode
|
||||
RxInt mode = 0.obs;
|
||||
|
||||
/// The paging controller for infinite loading.
|
||||
/// Only available when mode is `0`.
|
||||
/// Only available when mode is `0`, `1` or `2`.
|
||||
PagingController<int, Post> pagingController =
|
||||
PagingController(firstPageKey: 0);
|
||||
|
||||
@ -95,6 +99,9 @@ class PostListController extends GetxController {
|
||||
final idx = <dynamic>{};
|
||||
postList.retainWhere((x) => idx.add(x.id));
|
||||
|
||||
var lastId = postList.map((x) => x.id).reduce(max);
|
||||
Get.find<LastReadProvider>().feedLastReadAt = lastId;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -111,10 +118,23 @@ class PostListController extends GetxController {
|
||||
author: author,
|
||||
);
|
||||
} else {
|
||||
switch (mode.value) {
|
||||
case 2:
|
||||
resp = await provider.listRecommendations(
|
||||
pageKey,
|
||||
channel: mode.value == 0 ? null : 'shuffle',
|
||||
channel: 'shuffle',
|
||||
);
|
||||
break;
|
||||
case 1:
|
||||
resp = await provider.listRecommendations(
|
||||
pageKey,
|
||||
channel: 'friends',
|
||||
);
|
||||
break;
|
||||
default:
|
||||
resp = await provider.listRecommendations(pageKey);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
|
10
lib/exceptions/request.dart
Normal file
@ -0,0 +1,10 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class RequestException implements Exception {
|
||||
final Response data;
|
||||
|
||||
const RequestException(this.data);
|
||||
|
||||
@override
|
||||
String toString() => 'Request failed ${data.statusCode}: ${data.bodyString}';
|
||||
}
|
6
lib/exceptions/unauthorized.dart
Normal file
@ -0,0 +1,6 @@
|
||||
class UnauthorizedException implements Exception {
|
||||
const UnauthorizedException();
|
||||
|
||||
@override
|
||||
String toString() => 'Unauthorized';
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:solian/exceptions/request.dart';
|
||||
import 'package:solian/exceptions/unauthorized.dart';
|
||||
|
||||
extension SolianExtenions on BuildContext {
|
||||
void showSnackbar(String content, {SnackBarAction? action}) {
|
||||
@ -48,15 +50,48 @@ extension SolianExtenions on BuildContext {
|
||||
}
|
||||
|
||||
Future<void> showErrorDialog(dynamic exception) {
|
||||
var stack = StackTrace.current;
|
||||
var stackTrace = '$stack';
|
||||
Widget content = Text(exception.toString().capitalize!);
|
||||
if (exception is UnauthorizedException) {
|
||||
content = Text('errorHappenedUnauthorized'.tr);
|
||||
}
|
||||
if (exception is RequestException) {
|
||||
String overall;
|
||||
switch (exception.data.statusCode) {
|
||||
case 400:
|
||||
overall = 'errorHappenedRequestBad'.tr;
|
||||
break;
|
||||
case 401:
|
||||
overall = 'errorHappenedUnauthorized'.tr;
|
||||
break;
|
||||
case 403:
|
||||
overall = 'errorHappenedRequestForbidden'.tr;
|
||||
break;
|
||||
case 404:
|
||||
overall = 'errorHappenedRequestNotFound'.tr;
|
||||
break;
|
||||
case null:
|
||||
overall = 'errorHappenedRequestConnection'.tr;
|
||||
break;
|
||||
default:
|
||||
overall = 'errorHappenedRequestUnknown'.tr;
|
||||
break;
|
||||
}
|
||||
|
||||
if (exception.data.statusCode != null) {
|
||||
content = Text(
|
||||
'$overall\n\n(${exception.data.statusCode}) ${exception.data.bodyString}',
|
||||
);
|
||||
} else {
|
||||
content = Text(overall);
|
||||
}
|
||||
}
|
||||
|
||||
return showDialog<void>(
|
||||
useRootNavigator: true,
|
||||
context: this,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: Text('errorHappened'.tr),
|
||||
content: Text('${exception.toString().capitalize!}\n\nStack Trace: $stackTrace'),
|
||||
content: content,
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(ctx),
|
||||
|
@ -85,4 +85,5 @@ class DefaultFirebaseOptions {
|
||||
storageBucket: 'solian-0x001.appspot.com',
|
||||
measurementId: 'G-EF9BZMKBC3',
|
||||
);
|
||||
|
||||
}
|
@ -1,16 +1,21 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_acrylic/flutter_acrylic.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:media_kit/media_kit.dart';
|
||||
import 'package:protocol_handler/protocol_handler.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:sentry_flutter/sentry_flutter.dart';
|
||||
import 'package:solian/bootstrapper.dart';
|
||||
import 'package:solian/firebase_options.dart';
|
||||
import 'package:solian/platform.dart';
|
||||
import 'package:solian/providers/attachment_uploader.dart';
|
||||
import 'package:solian/providers/daily_sign.dart';
|
||||
import 'package:solian/providers/last_read.dart';
|
||||
import 'package:solian/providers/link_expander.dart';
|
||||
import 'package:solian/providers/stickers.dart';
|
||||
import 'package:solian/providers/theme_switcher.dart';
|
||||
import 'package:solian/providers/websocket.dart';
|
||||
import 'package:solian/providers/auth.dart';
|
||||
@ -28,16 +33,7 @@ import 'package:solian/translations.dart';
|
||||
import 'package:flutter_web_plugins/url_strategy.dart' show usePathUrlStrategy;
|
||||
|
||||
void main() async {
|
||||
await SentryFlutter.init(
|
||||
(options) {
|
||||
options.dsn =
|
||||
'https://55438cdff9048aa2225df72fdc629c42@o4506965897117696.ingest.us.sentry.io/4507357676437504';
|
||||
options.tracesSampleRate = 1.0;
|
||||
options.profilesSampleRate = 1.0;
|
||||
},
|
||||
appRunner: () async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
MediaKit.ensureInitialized();
|
||||
|
||||
await Future.wait([
|
||||
_initializeFirebase(),
|
||||
@ -48,12 +44,17 @@ void main() async {
|
||||
|
||||
usePathUrlStrategy();
|
||||
runApp(const SolianApp());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _initializeFirebase() async {
|
||||
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
|
||||
FlutterError.onError = (errorDetails) {
|
||||
FirebaseCrashlytics.instance.recordFlutterFatalError(errorDetails);
|
||||
};
|
||||
PlatformDispatcher.instance.onError = (error, stack) {
|
||||
FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
Future<void> _initializePlatformComponents() async {
|
||||
@ -106,7 +107,7 @@ class SolianApp extends StatelessWidget {
|
||||
return SystemShell(
|
||||
child: ScaffoldMessenger(
|
||||
child: BootstrapperShell(
|
||||
child: child ?? const SizedBox(),
|
||||
child: child ?? const SizedBox.shrink(),
|
||||
),
|
||||
),
|
||||
);
|
||||
@ -120,6 +121,7 @@ class SolianApp extends StatelessWidget {
|
||||
Get.lazyPut(() => AuthProvider());
|
||||
Get.lazyPut(() => RelationshipProvider());
|
||||
Get.lazyPut(() => PostProvider());
|
||||
Get.lazyPut(() => StickerProvider());
|
||||
Get.lazyPut(() => AttachmentProvider());
|
||||
Get.lazyPut(() => WebSocketProvider());
|
||||
Get.lazyPut(() => StatusProvider());
|
||||
@ -127,5 +129,8 @@ class SolianApp extends StatelessWidget {
|
||||
Get.lazyPut(() => RealmProvider());
|
||||
Get.lazyPut(() => ChatCallProvider());
|
||||
Get.lazyPut(() => AttachmentUploaderController());
|
||||
Get.lazyPut(() => LinkExpandProvider());
|
||||
Get.lazyPut(() => DailySignProvider());
|
||||
Get.lazyPut(() => LastReadProvider());
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'account.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Account {
|
||||
int id;
|
||||
DateTime createdAt;
|
||||
@ -10,6 +15,7 @@ class Account {
|
||||
dynamic avatar;
|
||||
dynamic banner;
|
||||
String description;
|
||||
AccountProfile? profile;
|
||||
List<AccountBadge>? badges;
|
||||
String? emailAddress;
|
||||
int? externalId;
|
||||
@ -26,55 +32,19 @@ class Account {
|
||||
required this.avatar,
|
||||
required this.banner,
|
||||
required this.description,
|
||||
required this.profile,
|
||||
required this.badges,
|
||||
required this.emailAddress,
|
||||
this.externalId,
|
||||
});
|
||||
|
||||
factory Account.fromJson(Map<String, dynamic> json) => Account(
|
||||
id: json['id'],
|
||||
createdAt: DateTime.parse(json['created_at']),
|
||||
updatedAt: DateTime.parse(json['updated_at']),
|
||||
deletedAt: json['deleted_at'] != null
|
||||
? DateTime.parse(json['deleted_at'])
|
||||
: null,
|
||||
confirmedAt: json['confirmed_at'] != null
|
||||
? DateTime.parse(json['confirmed_at'])
|
||||
: null,
|
||||
suspendedAt: json['suspended_at'] != null
|
||||
? DateTime.parse(json['suspended_at'])
|
||||
: null,
|
||||
name: json['name'],
|
||||
nick: json['nick'],
|
||||
avatar: json['avatar'],
|
||||
banner: json['banner'],
|
||||
description: json['description'],
|
||||
emailAddress: json['email_address'],
|
||||
badges: json['badges']
|
||||
?.map((e) => AccountBadge.fromJson(e))
|
||||
.toList()
|
||||
.cast<AccountBadge>(),
|
||||
externalId: json['external_id'],
|
||||
);
|
||||
factory Account.fromJson(Map<String, dynamic> json) =>
|
||||
_$AccountFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'created_at': createdAt.toIso8601String(),
|
||||
'updated_at': updatedAt.toIso8601String(),
|
||||
'deleted_at': deletedAt?.toIso8601String(),
|
||||
'confirmed_at': confirmedAt?.toIso8601String(),
|
||||
'suspended_at': suspendedAt?.toIso8601String(),
|
||||
'name': name,
|
||||
'nick': nick,
|
||||
'avatar': avatar,
|
||||
'banner': banner,
|
||||
'description': description,
|
||||
'email_address': emailAddress,
|
||||
'badges': badges?.map((e) => e.toJson()).toList(),
|
||||
'external_id': externalId,
|
||||
};
|
||||
Map<String, dynamic> toJson() => _$AccountToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class AccountBadge {
|
||||
int id;
|
||||
DateTime createdAt;
|
||||
@ -94,25 +64,40 @@ class AccountBadge {
|
||||
required this.type,
|
||||
});
|
||||
|
||||
factory AccountBadge.fromJson(Map<String, dynamic> json) => AccountBadge(
|
||||
id: json['id'],
|
||||
accountId: json['account_id'],
|
||||
updatedAt: DateTime.parse(json['updated_at']),
|
||||
createdAt: DateTime.parse(json['created_at']),
|
||||
deletedAt: json['deleted_at'] != null
|
||||
? DateTime.parse(json['deleted_at'])
|
||||
: null,
|
||||
metadata: json['metadata'],
|
||||
type: json['type'],
|
||||
);
|
||||
factory AccountBadge.fromJson(Map<String, dynamic> json) =>
|
||||
_$AccountBadgeFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'account_id': accountId,
|
||||
'created_at': createdAt.toIso8601String(),
|
||||
'updated_at': updatedAt.toIso8601String(),
|
||||
'deleted_at': deletedAt?.toIso8601String(),
|
||||
'metadata': metadata,
|
||||
'type': type,
|
||||
};
|
||||
Map<String, dynamic> toJson() => _$AccountBadgeToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class AccountProfile {
|
||||
int id;
|
||||
DateTime createdAt;
|
||||
DateTime updatedAt;
|
||||
DateTime? deletedAt;
|
||||
String? firstName;
|
||||
String? lastName;
|
||||
int? experience;
|
||||
DateTime? lastSeenAt;
|
||||
DateTime? birthday;
|
||||
int accountId;
|
||||
|
||||
AccountProfile({
|
||||
required this.id,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.deletedAt,
|
||||
required this.firstName,
|
||||
required this.lastName,
|
||||
required this.experience,
|
||||
required this.lastSeenAt,
|
||||
required this.birthday,
|
||||
required this.accountId,
|
||||
});
|
||||
|
||||
factory AccountProfile.fromJson(Map<String, dynamic> json) =>
|
||||
_$AccountProfileFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$AccountProfileToJson(this);
|
||||
}
|
||||
|
110
lib/models/account.g.dart
Normal file
@ -0,0 +1,110 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'account.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Account _$AccountFromJson(Map<String, dynamic> json) => Account(
|
||||
id: (json['id'] as num).toInt(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
confirmedAt: json['confirmed_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['confirmed_at'] as String),
|
||||
suspendedAt: json['suspended_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['suspended_at'] as String),
|
||||
name: json['name'] as String,
|
||||
nick: json['nick'] as String,
|
||||
avatar: json['avatar'],
|
||||
banner: json['banner'],
|
||||
description: json['description'] as String,
|
||||
profile: json['profile'] == null
|
||||
? null
|
||||
: AccountProfile.fromJson(json['profile'] as Map<String, dynamic>),
|
||||
badges: (json['badges'] as List<dynamic>?)
|
||||
?.map((e) => AccountBadge.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
emailAddress: json['email_address'] as String?,
|
||||
externalId: (json['external_id'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AccountToJson(Account instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
'confirmed_at': instance.confirmedAt?.toIso8601String(),
|
||||
'suspended_at': instance.suspendedAt?.toIso8601String(),
|
||||
'name': instance.name,
|
||||
'nick': instance.nick,
|
||||
'avatar': instance.avatar,
|
||||
'banner': instance.banner,
|
||||
'description': instance.description,
|
||||
'profile': instance.profile?.toJson(),
|
||||
'badges': instance.badges?.map((e) => e.toJson()).toList(),
|
||||
'email_address': instance.emailAddress,
|
||||
'external_id': instance.externalId,
|
||||
};
|
||||
|
||||
AccountBadge _$AccountBadgeFromJson(Map<String, dynamic> json) => AccountBadge(
|
||||
id: (json['id'] as num).toInt(),
|
||||
accountId: (json['account_id'] as num).toInt(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
metadata: json['metadata'] as Map<String, dynamic>?,
|
||||
type: json['type'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AccountBadgeToJson(AccountBadge instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
'metadata': instance.metadata,
|
||||
'type': instance.type,
|
||||
'account_id': instance.accountId,
|
||||
};
|
||||
|
||||
AccountProfile _$AccountProfileFromJson(Map<String, dynamic> json) =>
|
||||
AccountProfile(
|
||||
id: (json['id'] as num).toInt(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
firstName: json['first_name'] as String?,
|
||||
lastName: json['last_name'] as String?,
|
||||
experience: (json['experience'] as num?)?.toInt(),
|
||||
lastSeenAt: json['last_seen_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['last_seen_at'] as String),
|
||||
birthday: json['birthday'] == null
|
||||
? null
|
||||
: DateTime.parse(json['birthday'] as String),
|
||||
accountId: (json['account_id'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AccountProfileToJson(AccountProfile instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
'first_name': instance.firstName,
|
||||
'last_name': instance.lastName,
|
||||
'experience': instance.experience,
|
||||
'last_seen_at': instance.lastSeenAt?.toIso8601String(),
|
||||
'birthday': instance.birthday?.toIso8601String(),
|
||||
'account_id': instance.accountId,
|
||||
};
|
@ -1,3 +1,8 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'account_status.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class AccountStatus {
|
||||
bool isDisturbable;
|
||||
bool isOnline;
|
||||
@ -11,21 +16,13 @@ class AccountStatus {
|
||||
required this.status,
|
||||
});
|
||||
|
||||
factory AccountStatus.fromJson(Map<String, dynamic> json) => AccountStatus(
|
||||
isDisturbable: json['is_disturbable'],
|
||||
isOnline: json['is_online'],
|
||||
lastSeenAt: json['last_seen_at'] != null ? DateTime.parse(json['last_seen_at']) : null,
|
||||
status: json['status'] != null ? Status.fromJson(json['status']) : null,
|
||||
);
|
||||
factory AccountStatus.fromJson(Map<String, dynamic> json) =>
|
||||
_$AccountStatusFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'is_disturbable': isDisturbable,
|
||||
'is_online': isOnline,
|
||||
'last_seen_at': lastSeenAt?.toIso8601String(),
|
||||
'status': status?.toJson(),
|
||||
};
|
||||
Map<String, dynamic> toJson() => _$AccountStatusToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class Status {
|
||||
int id;
|
||||
DateTime createdAt;
|
||||
@ -53,31 +50,7 @@ class Status {
|
||||
required this.accountId,
|
||||
});
|
||||
|
||||
factory Status.fromJson(Map<String, dynamic> json) => Status(
|
||||
id: json['id'],
|
||||
createdAt: DateTime.parse(json['created_at']),
|
||||
updatedAt: DateTime.parse(json['updated_at']),
|
||||
deletedAt: json['deleted_at'] != null ? DateTime.parse(json['deleted_at']) : null,
|
||||
type: json['type'],
|
||||
label: json['label'],
|
||||
attitude: json['attitude'],
|
||||
isNoDisturb: json['is_no_disturb'],
|
||||
isInvisible: json['is_invisible'],
|
||||
clearAt: json['clear_at'] != null ? DateTime.parse(json['clear_at']) : null,
|
||||
accountId: json['account_id'],
|
||||
);
|
||||
factory Status.fromJson(Map<String, dynamic> json) => _$StatusFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'created_at': createdAt.toIso8601String(),
|
||||
'updated_at': updatedAt.toIso8601String(),
|
||||
'deleted_at': deletedAt?.toIso8601String(),
|
||||
'type': type,
|
||||
'label': label,
|
||||
'attitude': attitude,
|
||||
'is_no_disturb': isNoDisturb,
|
||||
'is_invisible': isInvisible,
|
||||
'clear_at': clearAt?.toIso8601String(),
|
||||
'account_id': accountId,
|
||||
};
|
||||
Map<String, dynamic> toJson() => _$StatusToJson(this);
|
||||
}
|
||||
|
59
lib/models/account_status.g.dart
Normal file
@ -0,0 +1,59 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'account_status.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
AccountStatus _$AccountStatusFromJson(Map<String, dynamic> json) =>
|
||||
AccountStatus(
|
||||
isDisturbable: json['is_disturbable'] as bool,
|
||||
isOnline: json['is_online'] as bool,
|
||||
lastSeenAt: json['last_seen_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['last_seen_at'] as String),
|
||||
status: json['status'] == null
|
||||
? null
|
||||
: Status.fromJson(json['status'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AccountStatusToJson(AccountStatus instance) =>
|
||||
<String, dynamic>{
|
||||
'is_disturbable': instance.isDisturbable,
|
||||
'is_online': instance.isOnline,
|
||||
'last_seen_at': instance.lastSeenAt?.toIso8601String(),
|
||||
'status': instance.status?.toJson(),
|
||||
};
|
||||
|
||||
Status _$StatusFromJson(Map<String, dynamic> json) => Status(
|
||||
id: (json['id'] as num).toInt(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
type: json['type'] as String,
|
||||
label: json['label'] as String,
|
||||
attitude: (json['attitude'] as num).toInt(),
|
||||
isNoDisturb: json['is_no_disturb'] as bool,
|
||||
isInvisible: json['is_invisible'] as bool,
|
||||
clearAt: json['clear_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['clear_at'] as String),
|
||||
accountId: (json['account_id'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$StatusToJson(Status instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
'type': instance.type,
|
||||
'label': instance.label,
|
||||
'attitude': instance.attitude,
|
||||
'is_no_disturb': instance.isNoDisturb,
|
||||
'is_invisible': instance.isInvisible,
|
||||
'clear_at': instance.clearAt?.toIso8601String(),
|
||||
'account_id': instance.accountId,
|
||||
};
|
@ -1,20 +1,44 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:solian/models/account.dart';
|
||||
|
||||
part 'attachment.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class AttachmentPlaceholder {
|
||||
int chunkCount;
|
||||
int chunkSize;
|
||||
Attachment meta;
|
||||
|
||||
AttachmentPlaceholder({
|
||||
required this.chunkCount,
|
||||
required this.chunkSize,
|
||||
required this.meta,
|
||||
});
|
||||
|
||||
factory AttachmentPlaceholder.fromJson(Map<String, dynamic> json) =>
|
||||
_$AttachmentPlaceholderFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$AttachmentPlaceholderToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class Attachment {
|
||||
int id;
|
||||
DateTime createdAt;
|
||||
DateTime updatedAt;
|
||||
DateTime? deletedAt;
|
||||
String rid;
|
||||
String uuid;
|
||||
int size;
|
||||
String name;
|
||||
String alt;
|
||||
String usage;
|
||||
String mimetype;
|
||||
String hash;
|
||||
int destination;
|
||||
bool isAnalyzed;
|
||||
bool isUploaded;
|
||||
Map<String, dynamic>? metadata;
|
||||
Map<String, dynamic>? fileChunks;
|
||||
bool isMature;
|
||||
Account? account;
|
||||
int? accountId;
|
||||
@ -24,58 +48,25 @@ class Attachment {
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.deletedAt,
|
||||
required this.rid,
|
||||
required this.uuid,
|
||||
required this.size,
|
||||
required this.name,
|
||||
required this.alt,
|
||||
required this.usage,
|
||||
required this.mimetype,
|
||||
required this.hash,
|
||||
required this.destination,
|
||||
required this.isAnalyzed,
|
||||
required this.isUploaded,
|
||||
required this.metadata,
|
||||
required this.fileChunks,
|
||||
required this.isMature,
|
||||
required this.account,
|
||||
required this.accountId,
|
||||
});
|
||||
|
||||
factory Attachment.fromJson(Map<String, dynamic> json) => Attachment(
|
||||
id: json['id'],
|
||||
createdAt: DateTime.parse(json['created_at']),
|
||||
updatedAt: DateTime.parse(json['updated_at']),
|
||||
deletedAt: json['deleted_at'] != null ? DateTime.parse(json['deleted_at']) : null,
|
||||
uuid: json['uuid'],
|
||||
size: json['size'],
|
||||
name: json['name'],
|
||||
alt: json['alt'],
|
||||
usage: json['usage'],
|
||||
mimetype: json['mimetype'],
|
||||
hash: json['hash'],
|
||||
destination: json['destination'],
|
||||
isAnalyzed: json['is_analyzed'],
|
||||
metadata: json['metadata'],
|
||||
isMature: json['is_mature'],
|
||||
account: json['account'] != null ? Account.fromJson(json['account']) : null,
|
||||
accountId: json['account_id'],
|
||||
);
|
||||
factory Attachment.fromJson(Map<String, dynamic> json) =>
|
||||
_$AttachmentFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'created_at': createdAt.toIso8601String(),
|
||||
'updated_at': updatedAt.toIso8601String(),
|
||||
'deleted_at': deletedAt?.toIso8601String(),
|
||||
'uuid': uuid,
|
||||
'size': size,
|
||||
'name': name,
|
||||
'alt': alt,
|
||||
'usage': usage,
|
||||
'mimetype': mimetype,
|
||||
'hash': hash,
|
||||
'destination': destination,
|
||||
'is_analyzed': isAnalyzed,
|
||||
'metadata': metadata,
|
||||
'is_mature': isMature,
|
||||
'account': account?.toJson(),
|
||||
'account_id': accountId,
|
||||
};
|
||||
Map<String, dynamic> toJson() => _$AttachmentToJson(this);
|
||||
}
|
72
lib/models/attachment.g.dart
Normal file
@ -0,0 +1,72 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'attachment.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
AttachmentPlaceholder _$AttachmentPlaceholderFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
AttachmentPlaceholder(
|
||||
chunkCount: (json['chunk_count'] as num).toInt(),
|
||||
chunkSize: (json['chunk_size'] as num).toInt(),
|
||||
meta: Attachment.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AttachmentPlaceholderToJson(
|
||||
AttachmentPlaceholder instance) =>
|
||||
<String, dynamic>{
|
||||
'chunk_count': instance.chunkCount,
|
||||
'chunk_size': instance.chunkSize,
|
||||
'meta': instance.meta.toJson(),
|
||||
};
|
||||
|
||||
Attachment _$AttachmentFromJson(Map<String, dynamic> json) => Attachment(
|
||||
id: (json['id'] as num).toInt(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
rid: json['rid'] as String,
|
||||
uuid: json['uuid'] as String,
|
||||
size: (json['size'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
alt: json['alt'] as String,
|
||||
mimetype: json['mimetype'] as String,
|
||||
hash: json['hash'] as String,
|
||||
destination: (json['destination'] as num).toInt(),
|
||||
isAnalyzed: json['is_analyzed'] as bool,
|
||||
isUploaded: json['is_uploaded'] as bool,
|
||||
metadata: json['metadata'] as Map<String, dynamic>?,
|
||||
fileChunks: json['file_chunks'] as Map<String, dynamic>?,
|
||||
isMature: json['is_mature'] as bool,
|
||||
account: json['account'] == null
|
||||
? null
|
||||
: Account.fromJson(json['account'] as Map<String, dynamic>),
|
||||
accountId: (json['account_id'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AttachmentToJson(Attachment instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
'rid': instance.rid,
|
||||
'uuid': instance.uuid,
|
||||
'size': instance.size,
|
||||
'name': instance.name,
|
||||
'alt': instance.alt,
|
||||
'mimetype': instance.mimetype,
|
||||
'hash': instance.hash,
|
||||
'destination': instance.destination,
|
||||
'is_analyzed': instance.isAnalyzed,
|
||||
'is_uploaded': instance.isUploaded,
|
||||
'metadata': instance.metadata,
|
||||
'file_chunks': instance.fileChunks,
|
||||
'is_mature': instance.isMature,
|
||||
'account': instance.account?.toJson(),
|
||||
'account_id': instance.accountId,
|
||||
};
|
@ -1,6 +1,10 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:livekit_client/livekit_client.dart';
|
||||
import 'package:solian/models/channel.dart';
|
||||
|
||||
part 'call.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Call {
|
||||
int id;
|
||||
DateTime createdAt;
|
||||
@ -10,7 +14,8 @@ class Call {
|
||||
String externalId;
|
||||
int founderId;
|
||||
int channelId;
|
||||
List<dynamic> participants;
|
||||
@JsonKey(defaultValue: [])
|
||||
List<dynamic>? participants;
|
||||
Channel channel;
|
||||
|
||||
Call({
|
||||
@ -26,32 +31,9 @@ class Call {
|
||||
required this.channel,
|
||||
});
|
||||
|
||||
factory Call.fromJson(Map<String, dynamic> json) => Call(
|
||||
id: json['id'],
|
||||
createdAt: DateTime.parse(json['created_at']),
|
||||
updatedAt: DateTime.parse(json['updated_at']),
|
||||
deletedAt: json['deleted_at'],
|
||||
endedAt:
|
||||
json['ended_at'] != null ? DateTime.parse(json['ended_at']) : null,
|
||||
externalId: json['external_id'],
|
||||
founderId: json['founder_id'],
|
||||
channelId: json['channel_id'],
|
||||
participants: json['participants'] ?? List.empty(),
|
||||
channel: Channel.fromJson(json['channel']),
|
||||
);
|
||||
factory Call.fromJson(Map<String, dynamic> json) => _$CallFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'created_at': createdAt.toIso8601String(),
|
||||
'updated_at': updatedAt.toIso8601String(),
|
||||
'deleted_at': deletedAt,
|
||||
'ended_at': endedAt?.toIso8601String(),
|
||||
'external_id': externalId,
|
||||
'founder_id': founderId,
|
||||
'channel_id': channelId,
|
||||
'participants': participants,
|
||||
'channel': channel.toJson(),
|
||||
};
|
||||
Map<String, dynamic> toJson() => _$CallToJson(this);
|
||||
}
|
||||
|
||||
enum ParticipantStatsType {
|
||||
|
37
lib/models/call.g.dart
Normal file
@ -0,0 +1,37 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'call.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Call _$CallFromJson(Map<String, dynamic> json) => Call(
|
||||
id: (json['id'] as num).toInt(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
endedAt: json['ended_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['ended_at'] as String),
|
||||
externalId: json['external_id'] as String,
|
||||
founderId: (json['founder_id'] as num).toInt(),
|
||||
channelId: (json['channel_id'] as num).toInt(),
|
||||
participants: json['participants'] as List<dynamic>? ?? [],
|
||||
channel: Channel.fromJson(json['channel'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CallToJson(Call instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
'ended_at': instance.endedAt?.toIso8601String(),
|
||||
'external_id': instance.externalId,
|
||||
'founder_id': instance.founderId,
|
||||
'channel_id': instance.channelId,
|
||||
'participants': instance.participants,
|
||||
'channel': instance.channel.toJson(),
|
||||
};
|
@ -1,6 +1,10 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:solian/models/account.dart';
|
||||
import 'package:solian/models/realm.dart';
|
||||
|
||||
part 'channel.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Channel {
|
||||
int id;
|
||||
DateTime createdAt;
|
||||
@ -17,6 +21,7 @@ class Channel {
|
||||
int? realmId;
|
||||
bool isEncrypted;
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: true)
|
||||
bool isAvailable = false;
|
||||
|
||||
Channel({
|
||||
@ -36,44 +41,22 @@ class Channel {
|
||||
required this.realmId,
|
||||
});
|
||||
|
||||
factory Channel.fromJson(Map<String, dynamic> json) => Channel(
|
||||
id: json['id'],
|
||||
createdAt: DateTime.parse(json['created_at']),
|
||||
updatedAt: DateTime.parse(json['updated_at']),
|
||||
deletedAt: json['deleted_at'],
|
||||
alias: json['alias'],
|
||||
name: json['name'],
|
||||
description: json['description'],
|
||||
type: json['type'],
|
||||
members: json['members']
|
||||
?.map((e) => ChannelMember.fromJson(e))
|
||||
.toList()
|
||||
.cast<ChannelMember>(),
|
||||
account: Account.fromJson(json['account']),
|
||||
accountId: json['account_id'],
|
||||
realm: json['realm'] != null ? Realm.fromJson(json['realm']) : null,
|
||||
realmId: json['realm_id'],
|
||||
isEncrypted: json['is_encrypted'],
|
||||
);
|
||||
factory Channel.fromJson(Map<String, dynamic> json) =>
|
||||
_$ChannelFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'created_at': createdAt.toIso8601String(),
|
||||
'updated_at': updatedAt.toIso8601String(),
|
||||
'deleted_at': deletedAt,
|
||||
'alias': alias,
|
||||
'name': name,
|
||||
'description': description,
|
||||
'type': type,
|
||||
'members': members?.map((e) => e.toJson()).toList(),
|
||||
'account': account.toJson(),
|
||||
'account_id': accountId,
|
||||
'realm': realm?.toJson(),
|
||||
'realm_id': realmId,
|
||||
'is_encrypted': isEncrypted,
|
||||
};
|
||||
Map<String, dynamic> toJson() => _$ChannelToJson(this);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (other is! Channel) return false;
|
||||
return id == other.id;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => id;
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class ChannelMember {
|
||||
int id;
|
||||
DateTime createdAt;
|
||||
@ -95,25 +78,8 @@ class ChannelMember {
|
||||
required this.notify,
|
||||
});
|
||||
|
||||
factory ChannelMember.fromJson(Map<String, dynamic> json) => ChannelMember(
|
||||
id: json['id'],
|
||||
createdAt: DateTime.parse(json['created_at']),
|
||||
updatedAt: DateTime.parse(json['updated_at']),
|
||||
deletedAt: json['deleted_at'],
|
||||
channelId: json['channel_id'],
|
||||
accountId: json['account_id'],
|
||||
account: Account.fromJson(json['account']),
|
||||
notify: json['notify'],
|
||||
);
|
||||
factory ChannelMember.fromJson(Map<String, dynamic> json) =>
|
||||
_$ChannelMemberFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'created_at': createdAt.toIso8601String(),
|
||||
'updated_at': updatedAt.toIso8601String(),
|
||||
'deleted_at': deletedAt,
|
||||
'channel_id': channelId,
|
||||
'account_id': accountId,
|
||||
'account': account.toJson(),
|
||||
'notify': notify,
|
||||
};
|
||||
Map<String, dynamic> toJson() => _$ChannelMemberToJson(this);
|
||||
}
|
||||
|
74
lib/models/channel.g.dart
Normal file
@ -0,0 +1,74 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'channel.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Channel _$ChannelFromJson(Map<String, dynamic> json) => Channel(
|
||||
id: (json['id'] as num).toInt(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
alias: json['alias'] as String,
|
||||
name: json['name'] as String,
|
||||
description: json['description'] as String,
|
||||
type: (json['type'] as num).toInt(),
|
||||
members: (json['members'] as List<dynamic>?)
|
||||
?.map((e) => ChannelMember.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
account: Account.fromJson(json['account'] as Map<String, dynamic>),
|
||||
accountId: (json['account_id'] as num).toInt(),
|
||||
isEncrypted: json['is_encrypted'] as bool,
|
||||
realm: json['realm'] == null
|
||||
? null
|
||||
: Realm.fromJson(json['realm'] as Map<String, dynamic>),
|
||||
realmId: (json['realm_id'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ChannelToJson(Channel instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
'alias': instance.alias,
|
||||
'name': instance.name,
|
||||
'description': instance.description,
|
||||
'type': instance.type,
|
||||
'members': instance.members?.map((e) => e.toJson()).toList(),
|
||||
'account': instance.account.toJson(),
|
||||
'account_id': instance.accountId,
|
||||
'realm': instance.realm?.toJson(),
|
||||
'realm_id': instance.realmId,
|
||||
'is_encrypted': instance.isEncrypted,
|
||||
'is_available': instance.isAvailable,
|
||||
};
|
||||
|
||||
ChannelMember _$ChannelMemberFromJson(Map<String, dynamic> json) =>
|
||||
ChannelMember(
|
||||
id: (json['id'] as num).toInt(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
channelId: (json['channel_id'] as num).toInt(),
|
||||
accountId: (json['account_id'] as num).toInt(),
|
||||
account: Account.fromJson(json['account'] as Map<String, dynamic>),
|
||||
notify: (json['notify'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ChannelMemberToJson(ChannelMember instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
'channel_id': instance.channelId,
|
||||
'account_id': instance.accountId,
|
||||
'account': instance.account.toJson(),
|
||||
'notify': instance.notify,
|
||||
};
|
49
lib/models/daily_sign.dart
Normal file
@ -0,0 +1,49 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:solian/models/account.dart';
|
||||
|
||||
part 'daily_sign.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class DailySignRecord {
|
||||
int id;
|
||||
DateTime createdAt;
|
||||
DateTime updatedAt;
|
||||
DateTime? deletedAt;
|
||||
Account account;
|
||||
int resultTier;
|
||||
int resultExperience;
|
||||
int accountId;
|
||||
|
||||
DailySignRecord({
|
||||
required this.id,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.deletedAt,
|
||||
required this.resultTier,
|
||||
required this.resultExperience,
|
||||
required this.account,
|
||||
required this.accountId,
|
||||
});
|
||||
|
||||
factory DailySignRecord.fromJson(Map<String, dynamic> json) =>
|
||||
_$DailySignRecordFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$DailySignRecordToJson(this);
|
||||
|
||||
String get symbol => switch (resultTier) {
|
||||
0 => '大\n凶',
|
||||
1 => '凶',
|
||||
2 => '中\n平',
|
||||
3 => '吉',
|
||||
_ => '大\n吉',
|
||||
};
|
||||
|
||||
String get overviewSuggestion => switch (resultTier) {
|
||||
0 => 'dailySignTier0'.tr,
|
||||
1 => 'dailySignTier1'.tr,
|
||||
2 => 'dailySignTier2'.tr,
|
||||
3 => 'dailySignTier3'.tr,
|
||||
_ => 'dailySignTier4'.tr,
|
||||
};
|
||||
}
|
33
lib/models/daily_sign.g.dart
Normal file
@ -0,0 +1,33 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'daily_sign.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
DailySignRecord _$DailySignRecordFromJson(Map<String, dynamic> json) =>
|
||||
DailySignRecord(
|
||||
id: (json['id'] as num).toInt(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
resultTier: (json['result_tier'] as num).toInt(),
|
||||
resultExperience: (json['result_experience'] as num).toInt(),
|
||||
account: Account.fromJson(json['account'] as Map<String, dynamic>),
|
||||
accountId: (json['account_id'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$DailySignRecordToJson(DailySignRecord instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
'account': instance.account.toJson(),
|
||||
'result_tier': instance.resultTier,
|
||||
'result_experience': instance.resultExperience,
|
||||
'account_id': instance.accountId,
|
||||
};
|
@ -1,6 +1,9 @@
|
||||
import 'package:solian/models/account.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:solian/models/channel.dart';
|
||||
|
||||
part 'event.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Event {
|
||||
int id;
|
||||
String uuid;
|
||||
@ -10,10 +13,11 @@ class Event {
|
||||
Map<String, dynamic> body;
|
||||
String type;
|
||||
Channel? channel;
|
||||
Sender sender;
|
||||
ChannelMember sender;
|
||||
int channelId;
|
||||
int senderId;
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: true)
|
||||
bool isPending = false;
|
||||
|
||||
Event({
|
||||
@ -30,40 +34,18 @@ class Event {
|
||||
required this.senderId,
|
||||
});
|
||||
|
||||
factory Event.fromJson(Map<String, dynamic> json) => Event(
|
||||
id: json['id'],
|
||||
uuid: json['uuid'],
|
||||
createdAt: DateTime.parse(json['created_at']),
|
||||
updatedAt: DateTime.parse(json['updated_at']),
|
||||
deletedAt: json['deleted_at'],
|
||||
body: json['body'],
|
||||
type: json['type'],
|
||||
channel:
|
||||
json['channel'] != null ? Channel.fromJson(json['channel']) : null,
|
||||
sender: Sender.fromJson(json['sender']),
|
||||
channelId: json['channel_id'],
|
||||
senderId: json['sender_id'],
|
||||
);
|
||||
factory Event.fromJson(Map<String, dynamic> json) => _$EventFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'uuid': uuid,
|
||||
'created_at': createdAt.toIso8601String(),
|
||||
'updated_at': updatedAt.toIso8601String(),
|
||||
'deleted_at': deletedAt,
|
||||
'body': body,
|
||||
'type': type,
|
||||
'channel': channel?.toJson(),
|
||||
'sender': sender.toJson(),
|
||||
'channel_id': channelId,
|
||||
'sender_id': senderId,
|
||||
};
|
||||
Map<String, dynamic> toJson() => _$EventToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class EventMessageBody {
|
||||
@JsonKey(defaultValue: '')
|
||||
String text;
|
||||
@JsonKey(defaultValue: 'plain')
|
||||
String algorithm;
|
||||
List<int>? attachments;
|
||||
List<String>? attachments;
|
||||
int? quoteEvent;
|
||||
int? relatedEvent;
|
||||
List<int>? relatedUsers;
|
||||
@ -78,69 +60,7 @@ class EventMessageBody {
|
||||
});
|
||||
|
||||
factory EventMessageBody.fromJson(Map<String, dynamic> json) =>
|
||||
EventMessageBody(
|
||||
text: json['text'] ?? '',
|
||||
algorithm: json['algorithm'] ?? 'plain',
|
||||
attachments: json['attachments'] != null
|
||||
? List<int>.from(json['attachments'].map((x) => x))
|
||||
: null,
|
||||
quoteEvent: json['quote_event'],
|
||||
relatedEvent: json['related_event'],
|
||||
relatedUsers: json['related_users'] != null
|
||||
? List<int>.from(json['related_users'].map((x) => x))
|
||||
: null,
|
||||
);
|
||||
_$EventMessageBodyFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'text': text,
|
||||
'algorithm': algorithm,
|
||||
'attachments': attachments?.cast<dynamic>(),
|
||||
'quote_event': quoteEvent,
|
||||
'related_event': relatedEvent,
|
||||
'related_users': relatedUsers?.cast<dynamic>(),
|
||||
};
|
||||
}
|
||||
|
||||
class Sender {
|
||||
int id;
|
||||
DateTime createdAt;
|
||||
DateTime updatedAt;
|
||||
DateTime? deletedAt;
|
||||
Account account;
|
||||
int channelId;
|
||||
int accountId;
|
||||
int notify;
|
||||
|
||||
Sender({
|
||||
required this.id,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
this.deletedAt,
|
||||
required this.account,
|
||||
required this.channelId,
|
||||
required this.accountId,
|
||||
required this.notify,
|
||||
});
|
||||
|
||||
factory Sender.fromJson(Map<String, dynamic> json) => Sender(
|
||||
id: json['id'],
|
||||
createdAt: DateTime.parse(json['created_at']),
|
||||
updatedAt: DateTime.parse(json['updated_at']),
|
||||
deletedAt: json['deleted_at'],
|
||||
account: Account.fromJson(json['account']),
|
||||
channelId: json['channel_id'],
|
||||
accountId: json['account_id'],
|
||||
notify: json['notify'],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'created_at': createdAt.toIso8601String(),
|
||||
'updated_at': updatedAt.toIso8601String(),
|
||||
'deleted_at': deletedAt,
|
||||
'account': account.toJson(),
|
||||
'channel_id': channelId,
|
||||
'account_id': accountId,
|
||||
'notify': notify,
|
||||
};
|
||||
Map<String, dynamic> toJson() => _$EventMessageBodyToJson(this);
|
||||
}
|
||||
|
64
lib/models/event.g.dart
Normal file
@ -0,0 +1,64 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'event.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Event _$EventFromJson(Map<String, dynamic> json) => Event(
|
||||
id: (json['id'] as num).toInt(),
|
||||
uuid: json['uuid'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
body: json['body'] as Map<String, dynamic>,
|
||||
type: json['type'] as String,
|
||||
channel: json['channel'] == null
|
||||
? null
|
||||
: Channel.fromJson(json['channel'] as Map<String, dynamic>),
|
||||
sender: ChannelMember.fromJson(json['sender'] as Map<String, dynamic>),
|
||||
channelId: (json['channel_id'] as num).toInt(),
|
||||
senderId: (json['sender_id'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$EventToJson(Event instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'uuid': instance.uuid,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
'body': instance.body,
|
||||
'type': instance.type,
|
||||
'channel': instance.channel?.toJson(),
|
||||
'sender': instance.sender.toJson(),
|
||||
'channel_id': instance.channelId,
|
||||
'sender_id': instance.senderId,
|
||||
'is_pending': instance.isPending,
|
||||
};
|
||||
|
||||
EventMessageBody _$EventMessageBodyFromJson(Map<String, dynamic> json) =>
|
||||
EventMessageBody(
|
||||
text: json['text'] as String? ?? '',
|
||||
algorithm: json['algorithm'] as String? ?? 'plain',
|
||||
attachments: (json['attachments'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList(),
|
||||
quoteEvent: (json['quote_event'] as num?)?.toInt(),
|
||||
relatedEvent: (json['related_event'] as num?)?.toInt(),
|
||||
relatedUsers: (json['related_users'] as List<dynamic>?)
|
||||
?.map((e) => (e as num).toInt())
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$EventMessageBodyToJson(EventMessageBody instance) =>
|
||||
<String, dynamic>{
|
||||
'text': instance.text,
|
||||
'algorithm': instance.algorithm,
|
||||
'attachments': instance.attachments,
|
||||
'quote_event': instance.quoteEvent,
|
||||
'related_event': instance.relatedEvent,
|
||||
'related_users': instance.relatedUsers,
|
||||
};
|
@ -1,83 +0,0 @@
|
||||
class Tag {
|
||||
int id;
|
||||
String alias;
|
||||
String name;
|
||||
String description;
|
||||
DateTime createdAt;
|
||||
DateTime updatedAt;
|
||||
DateTime? deletedAt;
|
||||
|
||||
Tag({
|
||||
required this.id,
|
||||
required this.alias,
|
||||
required this.name,
|
||||
required this.description,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.deletedAt,
|
||||
});
|
||||
|
||||
factory Tag.fromJson(Map<String, dynamic> json) => Tag(
|
||||
id: json['id'],
|
||||
alias: json['alias'],
|
||||
name: json['name'],
|
||||
description: json['description'],
|
||||
createdAt: DateTime.parse(json['created_at']),
|
||||
updatedAt: DateTime.parse(json['updated_at']),
|
||||
deletedAt: json['deleted_at'] != null
|
||||
? DateTime.parse(json['deleted_at'])
|
||||
: null,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'alias': alias,
|
||||
'description': description,
|
||||
'name': name,
|
||||
'created_at': createdAt.toIso8601String(),
|
||||
'updated_at': updatedAt.toIso8601String(),
|
||||
'deleted_at': deletedAt?.toIso8601String(),
|
||||
};
|
||||
}
|
||||
|
||||
class Category {
|
||||
int id;
|
||||
String alias;
|
||||
String name;
|
||||
String description;
|
||||
DateTime createdAt;
|
||||
DateTime updatedAt;
|
||||
DateTime? deletedAt;
|
||||
|
||||
Category({
|
||||
required this.id,
|
||||
required this.alias,
|
||||
required this.name,
|
||||
required this.description,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.deletedAt,
|
||||
});
|
||||
|
||||
factory Category.fromJson(Map<String, dynamic> json) => Category(
|
||||
id: json['id'],
|
||||
alias: json['alias'],
|
||||
name: json['name'],
|
||||
description: json['description'],
|
||||
createdAt: DateTime.parse(json['created_at']),
|
||||
updatedAt: DateTime.parse(json['updated_at']),
|
||||
deletedAt: json['deleted_at'] != null
|
||||
? DateTime.parse(json['deleted_at'])
|
||||
: null,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'alias': alias,
|
||||
'description': description,
|
||||
'name': name,
|
||||
'created_at': createdAt.toIso8601String(),
|
||||
'updated_at': updatedAt.toIso8601String(),
|
||||
'deleted_at': deletedAt?.toIso8601String(),
|
||||
};
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
class Keypair {
|
||||
final String id;
|
||||
final String algorithm;
|
||||
final String publicKey;
|
||||
final String? privateKey;
|
||||
|
||||
final bool isOwned;
|
||||
|
||||
Keypair({
|
||||
required this.id,
|
||||
required this.algorithm,
|
||||
required this.publicKey,
|
||||
required this.privateKey,
|
||||
this.isOwned = false,
|
||||
});
|
||||
|
||||
factory Keypair.fromJson(Map<String, dynamic> json) => Keypair(
|
||||
id: json['id'],
|
||||
algorithm: json['algorithm'],
|
||||
publicKey: json['public_key'],
|
||||
privateKey: json['private_key'],
|
||||
isOwned: json['is_owned'],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'algorithm': algorithm,
|
||||
'public_key': publicKey,
|
||||
'private_key': privateKey,
|
||||
'is_owned': isOwned,
|
||||
};
|
||||
}
|
41
lib/models/link.dart
Normal file
@ -0,0 +1,41 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'link.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class LinkMeta {
|
||||
int id;
|
||||
DateTime createdAt;
|
||||
DateTime updatedAt;
|
||||
DateTime? deletedAt;
|
||||
String entryId;
|
||||
String? icon;
|
||||
String url;
|
||||
String? title;
|
||||
String? image;
|
||||
String? video;
|
||||
String? audio;
|
||||
String? description;
|
||||
String? siteName;
|
||||
|
||||
LinkMeta({
|
||||
required this.id,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.deletedAt,
|
||||
required this.entryId,
|
||||
required this.icon,
|
||||
required this.url,
|
||||
required this.title,
|
||||
required this.image,
|
||||
required this.video,
|
||||
required this.audio,
|
||||
required this.description,
|
||||
required this.siteName,
|
||||
});
|
||||
|
||||
factory LinkMeta.fromJson(Map<String, dynamic> json) =>
|
||||
_$LinkMetaFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$LinkMetaToJson(this);
|
||||
}
|
41
lib/models/link.g.dart
Normal file
@ -0,0 +1,41 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'link.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
LinkMeta _$LinkMetaFromJson(Map<String, dynamic> json) => LinkMeta(
|
||||
id: (json['id'] as num).toInt(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
entryId: json['entry_id'] as String,
|
||||
icon: json['icon'] as String?,
|
||||
url: json['url'] as String,
|
||||
title: json['title'] as String?,
|
||||
image: json['image'] as String?,
|
||||
video: json['video'] as String?,
|
||||
audio: json['audio'] as String?,
|
||||
description: json['description'] as String?,
|
||||
siteName: json['site_name'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$LinkMetaToJson(LinkMeta instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
'entry_id': instance.entryId,
|
||||
'icon': instance.icon,
|
||||
'url': instance.url,
|
||||
'title': instance.title,
|
||||
'image': instance.image,
|
||||
'video': instance.video,
|
||||
'audio': instance.audio,
|
||||
'description': instance.description,
|
||||
'site_name': instance.siteName,
|
||||
};
|
@ -1,3 +1,8 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'notification.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Notification {
|
||||
int id;
|
||||
DateTime createdAt;
|
||||
@ -25,35 +30,8 @@ class Notification {
|
||||
required this.accountId,
|
||||
});
|
||||
|
||||
factory Notification.fromJson(Map<String, dynamic> json) => Notification(
|
||||
id: json['id'] ?? 0,
|
||||
createdAt: json['created_at'] == null
|
||||
? DateTime.now()
|
||||
: DateTime.parse(json['created_at']),
|
||||
updatedAt: json['updated_at'] == null
|
||||
? DateTime.now()
|
||||
: DateTime.parse(json['updated_at']),
|
||||
deletedAt: json['deleted_at'],
|
||||
title: json['title'],
|
||||
subtitle: json['subtitle'],
|
||||
body: json['body'],
|
||||
avatar: json['avatar'],
|
||||
picture: json['picture'],
|
||||
senderId: json['sender_id'],
|
||||
accountId: json['account_id'],
|
||||
);
|
||||
factory Notification.fromJson(Map<String, dynamic> json) =>
|
||||
_$NotificationFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'created_at': createdAt.toIso8601String(),
|
||||
'updated_at': updatedAt.toIso8601String(),
|
||||
'deleted_at': deletedAt,
|
||||
'title': title,
|
||||
'subtitle': subtitle,
|
||||
'body': body,
|
||||
'avatar': avatar,
|
||||
'picture': picture,
|
||||
'sender_id': senderId,
|
||||
'account_id': accountId,
|
||||
};
|
||||
Map<String, dynamic> toJson() => _$NotificationToJson(this);
|
||||
}
|
||||
|
38
lib/models/notification.g.dart
Normal file
@ -0,0 +1,38 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'notification.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Notification _$NotificationFromJson(Map<String, dynamic> json) => Notification(
|
||||
id: (json['id'] as num).toInt(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
title: json['title'] as String,
|
||||
subtitle: json['subtitle'] as String?,
|
||||
body: json['body'] as String,
|
||||
avatar: json['avatar'] as String?,
|
||||
picture: json['picture'] as String?,
|
||||
senderId: (json['sender_id'] as num?)?.toInt(),
|
||||
accountId: (json['account_id'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$NotificationToJson(Notification instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
'title': instance.title,
|
||||
'subtitle': instance.subtitle,
|
||||
'body': instance.body,
|
||||
'avatar': instance.avatar,
|
||||
'picture': instance.picture,
|
||||
'sender_id': instance.senderId,
|
||||
'account_id': instance.accountId,
|
||||
};
|
@ -1,23 +1,27 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'packet.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class NetworkPackage {
|
||||
@JsonKey(name: 'w')
|
||||
String method;
|
||||
@JsonKey(name: 'e')
|
||||
String? endpoint;
|
||||
@JsonKey(name: 'm')
|
||||
String? message;
|
||||
@JsonKey(name: 'p')
|
||||
Map<String, dynamic>? payload;
|
||||
|
||||
NetworkPackage({
|
||||
required this.method,
|
||||
this.endpoint,
|
||||
this.message,
|
||||
this.payload,
|
||||
});
|
||||
|
||||
factory NetworkPackage.fromJson(Map<String, dynamic> json) => NetworkPackage(
|
||||
method: json['w'],
|
||||
message: json['m'],
|
||||
payload: json['p'],
|
||||
);
|
||||
factory NetworkPackage.fromJson(Map<String, dynamic> json) =>
|
||||
_$NetworkPackageFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'w': method,
|
||||
'm': message,
|
||||
'p': payload,
|
||||
};
|
||||
Map<String, dynamic> toJson() => _$NetworkPackageToJson(this);
|
||||
}
|
||||
|
23
lib/models/packet.g.dart
Normal file
@ -0,0 +1,23 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'packet.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
NetworkPackage _$NetworkPackageFromJson(Map<String, dynamic> json) =>
|
||||
NetworkPackage(
|
||||
method: json['w'] as String,
|
||||
endpoint: json['e'] as String?,
|
||||
message: json['m'] as String?,
|
||||
payload: json['p'] as Map<String, dynamic>?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$NetworkPackageToJson(NetworkPackage instance) =>
|
||||
<String, dynamic>{
|
||||
'w': instance.method,
|
||||
'e': instance.endpoint,
|
||||
'm': instance.message,
|
||||
'p': instance.payload,
|
||||
};
|
@ -1,3 +1,8 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'pagination.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class PaginationResult {
|
||||
int count;
|
||||
List<dynamic>? data;
|
||||
@ -8,10 +13,7 @@ class PaginationResult {
|
||||
});
|
||||
|
||||
factory PaginationResult.fromJson(Map<String, dynamic> json) =>
|
||||
PaginationResult(count: json['count'], data: json['data']);
|
||||
_$PaginationResultFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'count': count,
|
||||
'data': data,
|
||||
};
|
||||
Map<String, dynamic> toJson() => _$PaginationResultToJson(this);
|
||||
}
|
||||
|
19
lib/models/pagination.g.dart
Normal file
@ -0,0 +1,19 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'pagination.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
PaginationResult _$PaginationResultFromJson(Map<String, dynamic> json) =>
|
||||
PaginationResult(
|
||||
count: (json['count'] as num).toInt(),
|
||||
data: json['data'] as List<dynamic>?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PaginationResultToJson(PaginationResult instance) =>
|
||||
<String, dynamic>{
|
||||
'count': instance.count,
|
||||
'data': instance.data,
|
||||
};
|
@ -1,13 +1,19 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:solian/models/account.dart';
|
||||
import 'package:solian/models/feed.dart';
|
||||
import 'package:solian/models/post_categories.dart';
|
||||
import 'package:solian/models/realm.dart';
|
||||
|
||||
part 'post.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Post {
|
||||
int id;
|
||||
DateTime createdAt;
|
||||
DateTime updatedAt;
|
||||
DateTime? editedAt;
|
||||
DateTime? deletedAt;
|
||||
String? alias;
|
||||
String? areaAlias;
|
||||
dynamic body;
|
||||
List<Tag>? tags;
|
||||
List<Category>? categories;
|
||||
@ -33,6 +39,8 @@ class Post {
|
||||
required this.updatedAt,
|
||||
required this.editedAt,
|
||||
required this.deletedAt,
|
||||
required this.alias,
|
||||
required this.areaAlias,
|
||||
required this.type,
|
||||
required this.body,
|
||||
required this.tags,
|
||||
@ -53,77 +61,15 @@ class Post {
|
||||
required this.metric,
|
||||
});
|
||||
|
||||
factory Post.fromJson(Map<String, dynamic> json) => Post(
|
||||
id: json['id'],
|
||||
createdAt: DateTime.parse(json['created_at']),
|
||||
updatedAt: DateTime.parse(json['updated_at']),
|
||||
deletedAt: json['deleted_at'] != null
|
||||
? DateTime.parse(json['deleted_at'])
|
||||
: null,
|
||||
type: json['type'],
|
||||
body: json['body'],
|
||||
tags: json['tags']?.map((x) => Tag.fromJson(x)).toList().cast<Tag>(),
|
||||
categories: json['categories']
|
||||
?.map((x) => Category.fromJson(x))
|
||||
.toList()
|
||||
.cast<Category>(),
|
||||
replies: json['replies'],
|
||||
replyId: json['reply_id'],
|
||||
repostId: json['repost_id'],
|
||||
realmId: json['realm_id'],
|
||||
replyTo:
|
||||
json['reply_to'] != null ? Post.fromJson(json['reply_to']) : null,
|
||||
repostTo:
|
||||
json['repost_to'] != null ? Post.fromJson(json['repost_to']) : null,
|
||||
realm: json['realm'] != null ? Realm.fromJson(json['realm']) : null,
|
||||
editedAt: json['edited_at'] != null
|
||||
? DateTime.parse(json['edited_at'])
|
||||
: null,
|
||||
publishedAt: json['published_at'] != null
|
||||
? DateTime.parse(json['published_at'])
|
||||
: null,
|
||||
publishedUntil: json['published_until'] != null
|
||||
? DateTime.parse(json['published_until'])
|
||||
: null,
|
||||
pinnedAt: json['pinned_at'] != null
|
||||
? DateTime.parse(json['pinned_at'])
|
||||
: null,
|
||||
isDraft: json['is_draft'],
|
||||
authorId: json['author_id'],
|
||||
author: Account.fromJson(json['author']),
|
||||
metric:
|
||||
json['metric'] != null ? PostMetric.fromJson(json['metric']) : null,
|
||||
);
|
||||
factory Post.fromJson(Map<String, dynamic> json) => _$PostFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'created_at': createdAt.toIso8601String(),
|
||||
'updated_at': updatedAt.toIso8601String(),
|
||||
'edited_at': editedAt?.toIso8601String(),
|
||||
'deleted_at': deletedAt?.toIso8601String(),
|
||||
'type': type,
|
||||
'body': body,
|
||||
'tags': tags,
|
||||
'categories': categories,
|
||||
'replies': replies,
|
||||
'reply_id': replyId,
|
||||
'repost_id': repostId,
|
||||
'realm_id': realmId,
|
||||
'reply_to': replyTo?.toJson(),
|
||||
'repost_to': repostTo?.toJson(),
|
||||
'realm': realm?.toJson(),
|
||||
'published_at': publishedAt?.toIso8601String(),
|
||||
'published_until': publishedUntil?.toIso8601String(),
|
||||
'pinned_at': pinnedAt?.toIso8601String(),
|
||||
'is_draft': isDraft,
|
||||
'author_id': authorId,
|
||||
'author': author.toJson(),
|
||||
'metric': metric?.toJson(),
|
||||
};
|
||||
Map<String, dynamic> toJson() => _$PostToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class PostMetric {
|
||||
int reactionCount;
|
||||
@JsonKey(defaultValue: {})
|
||||
Map<String, int> reactionList;
|
||||
int replyCount;
|
||||
|
||||
@ -133,22 +79,8 @@ class PostMetric {
|
||||
required this.replyCount,
|
||||
});
|
||||
|
||||
factory PostMetric.fromJson(Map<String, dynamic> json) => PostMetric(
|
||||
reactionCount: json['reaction_count'],
|
||||
replyCount: json['reply_count'],
|
||||
reactionList: json['reaction_list'] != null
|
||||
? json['reaction_list']
|
||||
.map((key, value) => MapEntry(
|
||||
key,
|
||||
int.tryParse(value.toString()) ??
|
||||
(value is double ? value.toInt() : null)))
|
||||
.cast<String, int>()
|
||||
: {},
|
||||
);
|
||||
factory PostMetric.fromJson(Map<String, dynamic> json) =>
|
||||
_$PostMetricFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'reaction_count': reactionCount,
|
||||
'reply_count': replyCount,
|
||||
'reaction_list': reactionList,
|
||||
};
|
||||
Map<String, dynamic> toJson() => _$PostMetricToJson(this);
|
||||
}
|
||||
|
103
lib/models/post.g.dart
Normal file
@ -0,0 +1,103 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'post.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Post _$PostFromJson(Map<String, dynamic> json) => Post(
|
||||
id: (json['id'] as num).toInt(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
editedAt: json['edited_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['edited_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
alias: json['alias'] as String?,
|
||||
areaAlias: json['area_alias'] as String?,
|
||||
type: json['type'] as String,
|
||||
body: json['body'],
|
||||
tags: (json['tags'] as List<dynamic>?)
|
||||
?.map((e) => Tag.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
categories: (json['categories'] as List<dynamic>?)
|
||||
?.map((e) => Category.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
replies: (json['replies'] as List<dynamic>?)
|
||||
?.map((e) => Post.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
replyId: (json['reply_id'] as num?)?.toInt(),
|
||||
repostId: (json['repost_id'] as num?)?.toInt(),
|
||||
realmId: (json['realm_id'] as num?)?.toInt(),
|
||||
replyTo: json['reply_to'] == null
|
||||
? null
|
||||
: Post.fromJson(json['reply_to'] as Map<String, dynamic>),
|
||||
repostTo: json['repost_to'] == null
|
||||
? null
|
||||
: Post.fromJson(json['repost_to'] as Map<String, dynamic>),
|
||||
realm: json['realm'] == null
|
||||
? null
|
||||
: Realm.fromJson(json['realm'] as Map<String, dynamic>),
|
||||
publishedAt: json['published_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['published_at'] as String),
|
||||
publishedUntil: json['published_until'] == null
|
||||
? null
|
||||
: DateTime.parse(json['published_until'] as String),
|
||||
pinnedAt: json['pinned_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['pinned_at'] as String),
|
||||
isDraft: json['is_draft'] as bool?,
|
||||
authorId: (json['author_id'] as num).toInt(),
|
||||
author: Account.fromJson(json['author'] as Map<String, dynamic>),
|
||||
metric: json['metric'] == null
|
||||
? null
|
||||
: PostMetric.fromJson(json['metric'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PostToJson(Post instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'edited_at': instance.editedAt?.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
'alias': instance.alias,
|
||||
'area_alias': instance.areaAlias,
|
||||
'body': instance.body,
|
||||
'tags': instance.tags?.map((e) => e.toJson()).toList(),
|
||||
'categories': instance.categories?.map((e) => e.toJson()).toList(),
|
||||
'replies': instance.replies?.map((e) => e.toJson()).toList(),
|
||||
'type': instance.type,
|
||||
'reply_id': instance.replyId,
|
||||
'repost_id': instance.repostId,
|
||||
'realm_id': instance.realmId,
|
||||
'reply_to': instance.replyTo?.toJson(),
|
||||
'repost_to': instance.repostTo?.toJson(),
|
||||
'realm': instance.realm?.toJson(),
|
||||
'published_at': instance.publishedAt?.toIso8601String(),
|
||||
'published_until': instance.publishedUntil?.toIso8601String(),
|
||||
'pinned_at': instance.pinnedAt?.toIso8601String(),
|
||||
'is_draft': instance.isDraft,
|
||||
'author_id': instance.authorId,
|
||||
'author': instance.author.toJson(),
|
||||
'metric': instance.metric?.toJson(),
|
||||
};
|
||||
|
||||
PostMetric _$PostMetricFromJson(Map<String, dynamic> json) => PostMetric(
|
||||
reactionCount: (json['reaction_count'] as num).toInt(),
|
||||
reactionList: (json['reaction_list'] as Map<String, dynamic>?)?.map(
|
||||
(k, e) => MapEntry(k, (e as num).toInt()),
|
||||
) ??
|
||||
{},
|
||||
replyCount: (json['reply_count'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PostMetricToJson(PostMetric instance) =>
|
||||
<String, dynamic>{
|
||||
'reaction_count': instance.reactionCount,
|
||||
'reaction_list': instance.reactionList,
|
||||
'reply_count': instance.replyCount,
|
||||
};
|
54
lib/models/post_categories.dart
Normal file
@ -0,0 +1,54 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'post_categories.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Tag {
|
||||
int id;
|
||||
String alias;
|
||||
String name;
|
||||
String description;
|
||||
DateTime createdAt;
|
||||
DateTime updatedAt;
|
||||
DateTime? deletedAt;
|
||||
|
||||
Tag({
|
||||
required this.id,
|
||||
required this.alias,
|
||||
required this.name,
|
||||
required this.description,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.deletedAt,
|
||||
});
|
||||
|
||||
factory Tag.fromJson(Map<String, dynamic> json) => _$TagFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$TagToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class Category {
|
||||
int id;
|
||||
String alias;
|
||||
String name;
|
||||
String description;
|
||||
DateTime createdAt;
|
||||
DateTime updatedAt;
|
||||
DateTime? deletedAt;
|
||||
|
||||
Category({
|
||||
required this.id,
|
||||
required this.alias,
|
||||
required this.name,
|
||||
required this.description,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.deletedAt,
|
||||
});
|
||||
|
||||
factory Category.fromJson(Map<String, dynamic> json) =>
|
||||
_$CategoryFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$CategoryToJson(this);
|
||||
}
|
51
lib/models/post_categories.g.dart
Normal file
@ -0,0 +1,51 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'post_categories.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Tag _$TagFromJson(Map<String, dynamic> json) => Tag(
|
||||
id: (json['id'] as num).toInt(),
|
||||
alias: json['alias'] as String,
|
||||
name: json['name'] as String,
|
||||
description: json['description'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$TagToJson(Tag instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'alias': instance.alias,
|
||||
'name': instance.name,
|
||||
'description': instance.description,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
};
|
||||
|
||||
Category _$CategoryFromJson(Map<String, dynamic> json) => Category(
|
||||
id: (json['id'] as num).toInt(),
|
||||
alias: json['alias'] as String,
|
||||
name: json['name'] as String,
|
||||
description: json['description'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CategoryToJson(Category instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'alias': instance.alias,
|
||||
'name': instance.name,
|
||||
'description': instance.description,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
};
|