Compare commits
70 Commits
Author | SHA1 | Date | |
---|---|---|---|
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 |
@ -1,6 +1,7 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.android.application"
|
id "com.android.application"
|
||||||
id 'com.google.gms.google-services'
|
id 'com.google.gms.google-services'
|
||||||
|
id 'com.google.firebase.crashlytics'
|
||||||
id "kotlin-android"
|
id "kotlin-android"
|
||||||
id "dev.flutter.flutter-gradle-plugin"
|
id "dev.flutter.flutter-gradle-plugin"
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,17 @@ subprojects {
|
|||||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||||
}
|
}
|
||||||
subprojects {
|
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")
|
project.evaluationDependsOn(":app")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ plugins {
|
|||||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||||
id "com.android.application" version '8.4.0' apply false
|
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.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
|
id "org.jetbrains.kotlin.android" version '2.0.0' apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
215
ios/Podfile.lock
215
ios/Podfile.lock
@ -38,24 +38,78 @@ PODS:
|
|||||||
- file_picker (0.0.1):
|
- file_picker (0.0.1):
|
||||||
- DKImagePickerController/PhotoGallery
|
- DKImagePickerController/PhotoGallery
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- Firebase/Analytics (10.29.0):
|
||||||
|
- Firebase/Core
|
||||||
|
- Firebase/Core (10.29.0):
|
||||||
|
- Firebase/CoreOnly
|
||||||
|
- FirebaseAnalytics (~> 10.29.0)
|
||||||
- Firebase/CoreOnly (10.29.0):
|
- Firebase/CoreOnly (10.29.0):
|
||||||
- FirebaseCore (= 10.29.0)
|
- FirebaseCore (= 10.29.0)
|
||||||
|
- Firebase/Crashlytics (10.29.0):
|
||||||
|
- Firebase/CoreOnly
|
||||||
|
- FirebaseCrashlytics (~> 10.29.0)
|
||||||
- Firebase/Messaging (10.29.0):
|
- Firebase/Messaging (10.29.0):
|
||||||
- Firebase/CoreOnly
|
- Firebase/CoreOnly
|
||||||
- FirebaseMessaging (~> 10.29.0)
|
- FirebaseMessaging (~> 10.29.0)
|
||||||
|
- Firebase/Performance (10.29.0):
|
||||||
|
- Firebase/CoreOnly
|
||||||
|
- FirebasePerformance (~> 10.29.0)
|
||||||
|
- firebase_analytics (11.2.1):
|
||||||
|
- Firebase/Analytics (= 10.29.0)
|
||||||
|
- firebase_core
|
||||||
|
- Flutter
|
||||||
- firebase_core (3.3.0):
|
- firebase_core (3.3.0):
|
||||||
- Firebase/CoreOnly (= 10.29.0)
|
- Firebase/CoreOnly (= 10.29.0)
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- firebase_crashlytics (4.0.4):
|
||||||
|
- Firebase/Crashlytics (= 10.29.0)
|
||||||
|
- firebase_core
|
||||||
|
- Flutter
|
||||||
- firebase_messaging (15.0.4):
|
- firebase_messaging (15.0.4):
|
||||||
- Firebase/Messaging (= 10.29.0)
|
- Firebase/Messaging (= 10.29.0)
|
||||||
- firebase_core
|
- firebase_core
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- firebase_performance (0.10.0-4):
|
||||||
|
- Firebase/Performance (= 10.29.0)
|
||||||
|
- firebase_core
|
||||||
|
- Flutter
|
||||||
|
- FirebaseABTesting (10.29.0):
|
||||||
|
- FirebaseCore (~> 10.0)
|
||||||
|
- FirebaseAnalytics (10.29.0):
|
||||||
|
- FirebaseAnalytics/AdIdSupport (= 10.29.0)
|
||||||
|
- FirebaseCore (~> 10.0)
|
||||||
|
- FirebaseInstallations (~> 10.0)
|
||||||
|
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
|
||||||
|
- GoogleUtilities/MethodSwizzler (~> 7.11)
|
||||||
|
- GoogleUtilities/Network (~> 7.11)
|
||||||
|
- "GoogleUtilities/NSData+zlib (~> 7.11)"
|
||||||
|
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||||
|
- FirebaseAnalytics/AdIdSupport (10.29.0):
|
||||||
|
- FirebaseCore (~> 10.0)
|
||||||
|
- FirebaseInstallations (~> 10.0)
|
||||||
|
- GoogleAppMeasurement (= 10.29.0)
|
||||||
|
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
|
||||||
|
- GoogleUtilities/MethodSwizzler (~> 7.11)
|
||||||
|
- GoogleUtilities/Network (~> 7.11)
|
||||||
|
- "GoogleUtilities/NSData+zlib (~> 7.11)"
|
||||||
|
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||||
- FirebaseCore (10.29.0):
|
- FirebaseCore (10.29.0):
|
||||||
- FirebaseCoreInternal (~> 10.0)
|
- FirebaseCoreInternal (~> 10.0)
|
||||||
- GoogleUtilities/Environment (~> 7.12)
|
- GoogleUtilities/Environment (~> 7.12)
|
||||||
- GoogleUtilities/Logger (~> 7.12)
|
- GoogleUtilities/Logger (~> 7.12)
|
||||||
|
- FirebaseCoreExtension (10.29.0):
|
||||||
|
- FirebaseCore (~> 10.0)
|
||||||
- FirebaseCoreInternal (10.29.0):
|
- FirebaseCoreInternal (10.29.0):
|
||||||
- "GoogleUtilities/NSData+zlib (~> 7.8)"
|
- "GoogleUtilities/NSData+zlib (~> 7.8)"
|
||||||
|
- FirebaseCrashlytics (10.29.0):
|
||||||
|
- FirebaseCore (~> 10.5)
|
||||||
|
- FirebaseInstallations (~> 10.0)
|
||||||
|
- FirebaseRemoteConfigInterop (~> 10.23)
|
||||||
|
- FirebaseSessions (~> 10.5)
|
||||||
|
- GoogleDataTransport (~> 9.2)
|
||||||
|
- GoogleUtilities/Environment (~> 7.8)
|
||||||
|
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||||
|
- PromisesObjC (~> 2.1)
|
||||||
- FirebaseInstallations (10.29.0):
|
- FirebaseInstallations (10.29.0):
|
||||||
- FirebaseCore (~> 10.0)
|
- FirebaseCore (~> 10.0)
|
||||||
- GoogleUtilities/Environment (~> 7.8)
|
- GoogleUtilities/Environment (~> 7.8)
|
||||||
@ -70,7 +124,39 @@ PODS:
|
|||||||
- GoogleUtilities/Reachability (~> 7.8)
|
- GoogleUtilities/Reachability (~> 7.8)
|
||||||
- GoogleUtilities/UserDefaults (~> 7.8)
|
- GoogleUtilities/UserDefaults (~> 7.8)
|
||||||
- nanopb (< 2.30911.0, >= 2.30908.0)
|
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||||
|
- FirebasePerformance (10.29.0):
|
||||||
|
- FirebaseCore (~> 10.5)
|
||||||
|
- FirebaseInstallations (~> 10.0)
|
||||||
|
- FirebaseRemoteConfig (~> 10.0)
|
||||||
|
- FirebaseSessions (~> 10.5)
|
||||||
|
- GoogleDataTransport (~> 9.2)
|
||||||
|
- GoogleUtilities/Environment (~> 7.13)
|
||||||
|
- GoogleUtilities/ISASwizzler (~> 7.13)
|
||||||
|
- GoogleUtilities/MethodSwizzler (~> 7.13)
|
||||||
|
- GoogleUtilities/UserDefaults (~> 7.13)
|
||||||
|
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||||
|
- FirebaseRemoteConfig (10.29.0):
|
||||||
|
- FirebaseABTesting (~> 10.0)
|
||||||
|
- FirebaseCore (~> 10.0)
|
||||||
|
- FirebaseInstallations (~> 10.0)
|
||||||
|
- FirebaseRemoteConfigInterop (~> 10.23)
|
||||||
|
- FirebaseSharedSwift (~> 10.0)
|
||||||
|
- GoogleUtilities/Environment (~> 7.8)
|
||||||
|
- "GoogleUtilities/NSData+zlib (~> 7.8)"
|
||||||
|
- FirebaseRemoteConfigInterop (10.29.0)
|
||||||
|
- FirebaseSessions (10.29.0):
|
||||||
|
- FirebaseCore (~> 10.5)
|
||||||
|
- FirebaseCoreExtension (~> 10.0)
|
||||||
|
- FirebaseInstallations (~> 10.0)
|
||||||
|
- GoogleDataTransport (~> 9.2)
|
||||||
|
- GoogleUtilities/Environment (~> 7.13)
|
||||||
|
- GoogleUtilities/UserDefaults (~> 7.13)
|
||||||
|
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||||
|
- PromisesSwift (~> 2.1)
|
||||||
|
- FirebaseSharedSwift (10.29.0)
|
||||||
- Flutter (1.0.0)
|
- Flutter (1.0.0)
|
||||||
|
- flutter_keyboard_visibility (0.0.1):
|
||||||
|
- Flutter
|
||||||
- flutter_secure_storage (6.0.0):
|
- flutter_secure_storage (6.0.0):
|
||||||
- Flutter
|
- Flutter
|
||||||
- flutter_webrtc (0.11.3):
|
- flutter_webrtc (0.11.3):
|
||||||
@ -79,6 +165,26 @@ PODS:
|
|||||||
- gal (1.0.0):
|
- gal (1.0.0):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
- GoogleAppMeasurement (10.29.0):
|
||||||
|
- GoogleAppMeasurement/AdIdSupport (= 10.29.0)
|
||||||
|
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
|
||||||
|
- GoogleUtilities/MethodSwizzler (~> 7.11)
|
||||||
|
- GoogleUtilities/Network (~> 7.11)
|
||||||
|
- "GoogleUtilities/NSData+zlib (~> 7.11)"
|
||||||
|
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||||
|
- GoogleAppMeasurement/AdIdSupport (10.29.0):
|
||||||
|
- GoogleAppMeasurement/WithoutAdIdSupport (= 10.29.0)
|
||||||
|
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
|
||||||
|
- GoogleUtilities/MethodSwizzler (~> 7.11)
|
||||||
|
- GoogleUtilities/Network (~> 7.11)
|
||||||
|
- "GoogleUtilities/NSData+zlib (~> 7.11)"
|
||||||
|
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||||
|
- GoogleAppMeasurement/WithoutAdIdSupport (10.29.0):
|
||||||
|
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
|
||||||
|
- GoogleUtilities/MethodSwizzler (~> 7.11)
|
||||||
|
- GoogleUtilities/Network (~> 7.11)
|
||||||
|
- "GoogleUtilities/NSData+zlib (~> 7.11)"
|
||||||
|
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||||
- GoogleDataTransport (9.4.1):
|
- GoogleDataTransport (9.4.1):
|
||||||
- GoogleUtilities/Environment (~> 7.7)
|
- GoogleUtilities/Environment (~> 7.7)
|
||||||
- nanopb (< 2.30911.0, >= 2.30908.0)
|
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||||
@ -91,9 +197,14 @@ PODS:
|
|||||||
- GoogleUtilities/Environment (7.13.3):
|
- GoogleUtilities/Environment (7.13.3):
|
||||||
- GoogleUtilities/Privacy
|
- GoogleUtilities/Privacy
|
||||||
- PromisesObjC (< 3.0, >= 1.2)
|
- PromisesObjC (< 3.0, >= 1.2)
|
||||||
|
- GoogleUtilities/ISASwizzler (7.13.3):
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
- GoogleUtilities/Logger (7.13.3):
|
- GoogleUtilities/Logger (7.13.3):
|
||||||
- GoogleUtilities/Environment
|
- GoogleUtilities/Environment
|
||||||
- GoogleUtilities/Privacy
|
- GoogleUtilities/Privacy
|
||||||
|
- GoogleUtilities/MethodSwizzler (7.13.3):
|
||||||
|
- GoogleUtilities/Logger
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
- GoogleUtilities/Network (7.13.3):
|
- GoogleUtilities/Network (7.13.3):
|
||||||
- GoogleUtilities/Logger
|
- GoogleUtilities/Logger
|
||||||
- "GoogleUtilities/NSData+zlib"
|
- "GoogleUtilities/NSData+zlib"
|
||||||
@ -113,15 +224,9 @@ PODS:
|
|||||||
- TOCropViewController (~> 2.7.4)
|
- TOCropViewController (~> 2.7.4)
|
||||||
- image_picker_ios (0.0.1):
|
- image_picker_ios (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- livekit_client (2.2.3):
|
- livekit_client (2.2.4):
|
||||||
- Flutter
|
- Flutter
|
||||||
- WebRTC-SDK (= 125.6422.04)
|
- WebRTC-SDK (= 125.6422.04)
|
||||||
- media_kit_libs_ios_video (1.0.4):
|
|
||||||
- Flutter
|
|
||||||
- media_kit_native_event_loop (1.0.0):
|
|
||||||
- Flutter
|
|
||||||
- media_kit_video (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- nanopb (2.30910.0):
|
- nanopb (2.30910.0):
|
||||||
- nanopb/decode (= 2.30910.0)
|
- nanopb/decode (= 2.30910.0)
|
||||||
- nanopb/encode (= 2.30910.0)
|
- nanopb/encode (= 2.30910.0)
|
||||||
@ -136,19 +241,16 @@ PODS:
|
|||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- permission_handler_apple (9.3.0):
|
- permission_handler_apple (9.3.0):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- pointer_interceptor_ios (0.0.1):
|
||||||
|
- Flutter
|
||||||
- PromisesObjC (2.4.0)
|
- PromisesObjC (2.4.0)
|
||||||
|
- PromisesSwift (2.4.0):
|
||||||
|
- PromisesObjC (= 2.4.0)
|
||||||
- protocol_handler_ios (0.0.1):
|
- protocol_handler_ios (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- screen_brightness_ios (0.1.0):
|
- SDWebImage (5.19.6):
|
||||||
- Flutter
|
- SDWebImage/Core (= 5.19.6)
|
||||||
- SDWebImage (5.19.4):
|
- SDWebImage/Core (5.19.6)
|
||||||
- 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)
|
|
||||||
- share_plus (0.0.1):
|
- share_plus (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- shared_preferences_foundation (0.0.1):
|
- shared_preferences_foundation (0.0.1):
|
||||||
@ -161,8 +263,9 @@ PODS:
|
|||||||
- TOCropViewController (2.7.4)
|
- TOCropViewController (2.7.4)
|
||||||
- url_launcher_ios (0.0.1):
|
- url_launcher_ios (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- volume_controller (0.0.1):
|
- video_player_avfoundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- FlutterMacOS
|
||||||
- wakelock_plus (0.0.1):
|
- wakelock_plus (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- WebRTC-SDK (125.6422.04)
|
- WebRTC-SDK (125.6422.04)
|
||||||
@ -171,30 +274,30 @@ DEPENDENCIES:
|
|||||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`)
|
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`)
|
||||||
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
||||||
- file_picker (from `.symlinks/plugins/file_picker/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_core (from `.symlinks/plugins/firebase_core/ios`)
|
||||||
|
- firebase_crashlytics (from `.symlinks/plugins/firebase_crashlytics/ios`)
|
||||||
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
|
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
|
||||||
|
- firebase_performance (from `.symlinks/plugins/firebase_performance/ios`)
|
||||||
- Flutter (from `Flutter`)
|
- Flutter (from `Flutter`)
|
||||||
|
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
|
||||||
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
|
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
|
||||||
- flutter_webrtc (from `.symlinks/plugins/flutter_webrtc/ios`)
|
- flutter_webrtc (from `.symlinks/plugins/flutter_webrtc/ios`)
|
||||||
- gal (from `.symlinks/plugins/gal/darwin`)
|
- gal (from `.symlinks/plugins/gal/darwin`)
|
||||||
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
|
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
|
||||||
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
||||||
- livekit_client (from `.symlinks/plugins/livekit_client/ios`)
|
- livekit_client (from `.symlinks/plugins/livekit_client/ios`)
|
||||||
- media_kit_libs_ios_video (from `.symlinks/plugins/media_kit_libs_ios_video/ios`)
|
|
||||||
- media_kit_native_event_loop (from `.symlinks/plugins/media_kit_native_event_loop/ios`)
|
|
||||||
- media_kit_video (from `.symlinks/plugins/media_kit_video/ios`)
|
|
||||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||||
- pasteboard (from `.symlinks/plugins/pasteboard/ios`)
|
- pasteboard (from `.symlinks/plugins/pasteboard/ios`)
|
||||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||||
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
- 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`)
|
- 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`)
|
- share_plus (from `.symlinks/plugins/share_plus/ios`)
|
||||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||||
- sqflite (from `.symlinks/plugins/sqflite/darwin`)
|
- sqflite (from `.symlinks/plugins/sqflite/darwin`)
|
||||||
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
||||||
- volume_controller (from `.symlinks/plugins/volume_controller/ios`)
|
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`)
|
||||||
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
|
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
|
||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
@ -202,16 +305,26 @@ SPEC REPOS:
|
|||||||
- DKImagePickerController
|
- DKImagePickerController
|
||||||
- DKPhotoGallery
|
- DKPhotoGallery
|
||||||
- Firebase
|
- Firebase
|
||||||
|
- FirebaseABTesting
|
||||||
|
- FirebaseAnalytics
|
||||||
- FirebaseCore
|
- FirebaseCore
|
||||||
|
- FirebaseCoreExtension
|
||||||
- FirebaseCoreInternal
|
- FirebaseCoreInternal
|
||||||
|
- FirebaseCrashlytics
|
||||||
- FirebaseInstallations
|
- FirebaseInstallations
|
||||||
- FirebaseMessaging
|
- FirebaseMessaging
|
||||||
|
- FirebasePerformance
|
||||||
|
- FirebaseRemoteConfig
|
||||||
|
- FirebaseRemoteConfigInterop
|
||||||
|
- FirebaseSessions
|
||||||
|
- FirebaseSharedSwift
|
||||||
|
- GoogleAppMeasurement
|
||||||
- GoogleDataTransport
|
- GoogleDataTransport
|
||||||
- GoogleUtilities
|
- GoogleUtilities
|
||||||
- nanopb
|
- nanopb
|
||||||
- PromisesObjC
|
- PromisesObjC
|
||||||
|
- PromisesSwift
|
||||||
- SDWebImage
|
- SDWebImage
|
||||||
- Sentry
|
|
||||||
- SwiftyGif
|
- SwiftyGif
|
||||||
- TOCropViewController
|
- TOCropViewController
|
||||||
- WebRTC-SDK
|
- WebRTC-SDK
|
||||||
@ -223,12 +336,20 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/device_info_plus/ios"
|
:path: ".symlinks/plugins/device_info_plus/ios"
|
||||||
file_picker:
|
file_picker:
|
||||||
:path: ".symlinks/plugins/file_picker/ios"
|
:path: ".symlinks/plugins/file_picker/ios"
|
||||||
|
firebase_analytics:
|
||||||
|
:path: ".symlinks/plugins/firebase_analytics/ios"
|
||||||
firebase_core:
|
firebase_core:
|
||||||
:path: ".symlinks/plugins/firebase_core/ios"
|
:path: ".symlinks/plugins/firebase_core/ios"
|
||||||
|
firebase_crashlytics:
|
||||||
|
:path: ".symlinks/plugins/firebase_crashlytics/ios"
|
||||||
firebase_messaging:
|
firebase_messaging:
|
||||||
:path: ".symlinks/plugins/firebase_messaging/ios"
|
:path: ".symlinks/plugins/firebase_messaging/ios"
|
||||||
|
firebase_performance:
|
||||||
|
:path: ".symlinks/plugins/firebase_performance/ios"
|
||||||
Flutter:
|
Flutter:
|
||||||
:path: Flutter
|
:path: Flutter
|
||||||
|
flutter_keyboard_visibility:
|
||||||
|
:path: ".symlinks/plugins/flutter_keyboard_visibility/ios"
|
||||||
flutter_secure_storage:
|
flutter_secure_storage:
|
||||||
:path: ".symlinks/plugins/flutter_secure_storage/ios"
|
:path: ".symlinks/plugins/flutter_secure_storage/ios"
|
||||||
flutter_webrtc:
|
flutter_webrtc:
|
||||||
@ -241,12 +362,6 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/image_picker_ios/ios"
|
:path: ".symlinks/plugins/image_picker_ios/ios"
|
||||||
livekit_client:
|
livekit_client:
|
||||||
:path: ".symlinks/plugins/livekit_client/ios"
|
:path: ".symlinks/plugins/livekit_client/ios"
|
||||||
media_kit_libs_ios_video:
|
|
||||||
:path: ".symlinks/plugins/media_kit_libs_ios_video/ios"
|
|
||||||
media_kit_native_event_loop:
|
|
||||||
:path: ".symlinks/plugins/media_kit_native_event_loop/ios"
|
|
||||||
media_kit_video:
|
|
||||||
:path: ".symlinks/plugins/media_kit_video/ios"
|
|
||||||
package_info_plus:
|
package_info_plus:
|
||||||
:path: ".symlinks/plugins/package_info_plus/ios"
|
:path: ".symlinks/plugins/package_info_plus/ios"
|
||||||
pasteboard:
|
pasteboard:
|
||||||
@ -255,12 +370,10 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||||
permission_handler_apple:
|
permission_handler_apple:
|
||||||
:path: ".symlinks/plugins/permission_handler_apple/ios"
|
:path: ".symlinks/plugins/permission_handler_apple/ios"
|
||||||
|
pointer_interceptor_ios:
|
||||||
|
:path: ".symlinks/plugins/pointer_interceptor_ios/ios"
|
||||||
protocol_handler_ios:
|
protocol_handler_ios:
|
||||||
:path: ".symlinks/plugins/protocol_handler_ios/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:
|
share_plus:
|
||||||
:path: ".symlinks/plugins/share_plus/ios"
|
:path: ".symlinks/plugins/share_plus/ios"
|
||||||
shared_preferences_foundation:
|
shared_preferences_foundation:
|
||||||
@ -269,8 +382,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/sqflite/darwin"
|
:path: ".symlinks/plugins/sqflite/darwin"
|
||||||
url_launcher_ios:
|
url_launcher_ios:
|
||||||
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
||||||
volume_controller:
|
video_player_avfoundation:
|
||||||
:path: ".symlinks/plugins/volume_controller/ios"
|
:path: ".symlinks/plugins/video_player_avfoundation/darwin"
|
||||||
wakelock_plus:
|
wakelock_plus:
|
||||||
:path: ".symlinks/plugins/wakelock_plus/ios"
|
:path: ".symlinks/plugins/wakelock_plus/ios"
|
||||||
|
|
||||||
@ -281,42 +394,52 @@ SPEC CHECKSUMS:
|
|||||||
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
|
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
|
||||||
file_picker: 09aa5ec1ab24135ccd7a1621c46c84134bfd6655
|
file_picker: 09aa5ec1ab24135ccd7a1621c46c84134bfd6655
|
||||||
Firebase: cec914dab6fd7b1bd8ab56ea07ce4e03dd251c2d
|
Firebase: cec914dab6fd7b1bd8ab56ea07ce4e03dd251c2d
|
||||||
|
firebase_analytics: 04491d1ee74c8e7c2330c96afc54188a969b06ee
|
||||||
firebase_core: 57aeb91680e5d5e6df6b888064be7c785f146efb
|
firebase_core: 57aeb91680e5d5e6df6b888064be7c785f146efb
|
||||||
|
firebase_crashlytics: e3d3e0c99bad5aaab5908385133dea8ec344693f
|
||||||
firebase_messaging: c862b3d2b973ecc769194dc8de09bd22c77ae757
|
firebase_messaging: c862b3d2b973ecc769194dc8de09bd22c77ae757
|
||||||
|
firebase_performance: 8643e815a354ee94da1192cd69335a48a7b625a4
|
||||||
|
FirebaseABTesting: d87f56707159bae64e269757a6e963d490f2eebe
|
||||||
|
FirebaseAnalytics: 23717de130b779aa506e757edb9713d24b6ffeda
|
||||||
FirebaseCore: 30e9c1cbe3d38f5f5e75f48bfcea87d7c358ec16
|
FirebaseCore: 30e9c1cbe3d38f5f5e75f48bfcea87d7c358ec16
|
||||||
|
FirebaseCoreExtension: 705ca5b14bf71d2564a0ddc677df1fc86ffa600f
|
||||||
FirebaseCoreInternal: df84dd300b561c27d5571684f389bf60b0a5c934
|
FirebaseCoreInternal: df84dd300b561c27d5571684f389bf60b0a5c934
|
||||||
|
FirebaseCrashlytics: 34647b41e18de773717fdd348a22206f2f9bc774
|
||||||
FirebaseInstallations: 913cf60d0400ebd5d6b63a28b290372ab44590dd
|
FirebaseInstallations: 913cf60d0400ebd5d6b63a28b290372ab44590dd
|
||||||
FirebaseMessaging: 7b5d8033e183ab59eb5b852a53201559e976d366
|
FirebaseMessaging: 7b5d8033e183ab59eb5b852a53201559e976d366
|
||||||
|
FirebasePerformance: d0ac4aa90f8c1aedeb8d0329a56e2d77d8d9e004
|
||||||
|
FirebaseRemoteConfig: 48ef3f243742a8d72422ccfc9f986e19d7de53fd
|
||||||
|
FirebaseRemoteConfigInterop: 6efda51fb5e2f15b16585197e26eaa09574e8a4d
|
||||||
|
FirebaseSessions: dbd14adac65ce996228652c1fc3a3f576bdf3ecc
|
||||||
|
FirebaseSharedSwift: 20530f495084b8d840f78a100d8c5ee613375f6e
|
||||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||||
|
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
|
||||||
flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12
|
flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12
|
||||||
flutter_webrtc: 75b868e4f9e817c7a9a42ca4b6169063de4eec9f
|
flutter_webrtc: 75b868e4f9e817c7a9a42ca4b6169063de4eec9f
|
||||||
gal: 61e868295d28fe67ffa297fae6dacebf56fd53e1
|
gal: 61e868295d28fe67ffa297fae6dacebf56fd53e1
|
||||||
|
GoogleAppMeasurement: f9de05ee17401e3355f68e8fc8b5064d429f5918
|
||||||
GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a
|
GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a
|
||||||
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
|
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
|
||||||
image_cropper: 37d40f62177c101ff4c164906d259ea2c3aa70cf
|
image_cropper: 37d40f62177c101ff4c164906d259ea2c3aa70cf
|
||||||
image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1
|
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: 438bc412db1928dac798aa6fd75726007be04262
|
||||||
package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c
|
package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c
|
||||||
pasteboard: 982969ebaa7c78af3e6cc7761e8f5e77565d9ce0
|
pasteboard: 982969ebaa7c78af3e6cc7761e8f5e77565d9ce0
|
||||||
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
||||||
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
|
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
|
||||||
|
pointer_interceptor_ios: 508241697ff0947f853c061945a8b822463947c1
|
||||||
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||||
|
PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851
|
||||||
protocol_handler_ios: a5db8abc38526ee326988b808be621e5fd568990
|
protocol_handler_ios: a5db8abc38526ee326988b808be621e5fd568990
|
||||||
screen_brightness_ios: 715ca807df953bf676d339f11464e438143ee625
|
SDWebImage: a79252b60f4678812d94316c91da69ec83089c9f
|
||||||
SDWebImage: 066c47b573f408f18caa467d71deace7c0f8280d
|
|
||||||
Sentry: 96ae1dcdf01a644bc3a3b1dc279cecaf48a833fb
|
|
||||||
sentry_flutter: 090351ce1ff5f96a4b33ef9455b7e3b28185387d
|
|
||||||
share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad
|
share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad
|
||||||
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
|
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
|
||||||
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
|
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
|
||||||
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
|
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
|
||||||
TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654
|
TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654
|
||||||
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
|
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
|
||||||
volume_controller: 531ddf792994285c9b17f9d8a7e4dcdd29b3eae9
|
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
|
||||||
wakelock_plus: 78ec7c5b202cab7761af8e2b2b3d0671be6c4ae1
|
wakelock_plus: 78ec7c5b202cab7761af8e2b2b3d0671be6c4ae1
|
||||||
WebRTC-SDK: c3d69a87e7185fad3568f6f3cff7c9ac5890acf3
|
WebRTC-SDK: c3d69a87e7185fad3568f6f3cff7c9ac5890acf3
|
||||||
|
|
||||||
|
@ -254,6 +254,7 @@
|
|||||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||||
buildPhases = (
|
buildPhases = (
|
||||||
B1CDA9DD5B638A2BB88053CB /* [CP] Check Pods Manifest.lock */,
|
B1CDA9DD5B638A2BB88053CB /* [CP] Check Pods Manifest.lock */,
|
||||||
|
7356FAC42C72724B0051A465 /* [Crashlytics] Clear dSYM */,
|
||||||
9740EEB61CF901F6004384FC /* Run Script */,
|
9740EEB61CF901F6004384FC /* Run Script */,
|
||||||
97C146EA1CF9000F007C117D /* Sources */,
|
97C146EA1CF9000F007C117D /* Sources */,
|
||||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||||
@ -263,6 +264,7 @@
|
|||||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||||
287A33C298CA352A7E7F32A4 /* [CP] Embed Pods Frameworks */,
|
287A33C298CA352A7E7F32A4 /* [CP] Embed Pods Frameworks */,
|
||||||
0818E8E4321C0D7433E07576 /* [CP] Copy Pods Resources */,
|
0818E8E4321C0D7433E07576 /* [CP] Copy Pods Resources */,
|
||||||
|
1A9FD6BE5DEE99CDA7399504 /* [Crashlytics] Upload dSYM */,
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
@ -365,6 +367,24 @@
|
|||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
|
||||||
showEnvVarsInLog = 0;
|
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 */ = {
|
259653AE41D478F4C6BAE9B2 /* [CP] Check Pods Manifest.lock */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
@ -420,6 +440,24 @@
|
|||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
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 */ = {
|
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
alwaysOutOfDate = 1;
|
alwaysOutOfDate = 1;
|
||||||
@ -433,7 +471,7 @@
|
|||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
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 */ = {
|
B1CDA9DD5B638A2BB88053CB /* [CP] Check Pods Manifest.lock */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import UIKit
|
import UIKit
|
||||||
import Flutter
|
import Flutter
|
||||||
|
|
||||||
@UIApplicationMain
|
@main
|
||||||
@objc class AppDelegate: FlutterAppDelegate {
|
@objc class AppDelegate: FlutterAppDelegate {
|
||||||
override func application(
|
override func application(
|
||||||
_ application: UIApplication,
|
_ application: UIApplication,
|
||||||
|
@ -112,14 +112,15 @@ class _BootstrapperShellState extends State<BootstrapperShell> {
|
|||||||
label: 'bsPreparingData',
|
label: 'bsPreparingData',
|
||||||
action: () async {
|
action: () async {
|
||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
if (auth.isAuthorized.isTrue) {
|
await Future.wait([
|
||||||
await Future.wait([
|
Get.find<StickerProvider>().refreshAvailableStickers(),
|
||||||
Get.find<RealmProvider>().refreshAvailableRealms(),
|
if (auth.isAuthorized.isTrue)
|
||||||
Get.find<ChannelProvider>().refreshAvailableChannel(),
|
Get.find<ChannelProvider>().refreshAvailableChannel(),
|
||||||
|
if (auth.isAuthorized.isTrue)
|
||||||
Get.find<RelationshipProvider>().refreshRelativeList(),
|
Get.find<RelationshipProvider>().refreshRelativeList(),
|
||||||
Get.find<StickerProvider>().refreshAvailableStickers(),
|
if (auth.isAuthorized.isTrue)
|
||||||
]);
|
Get.find<RealmProvider>().refreshAvailableRealms(),
|
||||||
}
|
]);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
@ -162,28 +163,29 @@ class _BootstrapperShellState extends State<BootstrapperShell> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (_isBusy || _isErrored) {
|
if (_isBusy || _isErrored) {
|
||||||
return Material(
|
return GestureDetector(
|
||||||
color: Theme.of(context).colorScheme.surface,
|
child: Material(
|
||||||
child: Column(
|
color: Theme.of(context).colorScheme.surface,
|
||||||
mainAxisSize: MainAxisSize.max,
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
SizedBox(
|
children: [
|
||||||
height: 280,
|
SizedBox(
|
||||||
child: Align(
|
height: 280,
|
||||||
alignment: Alignment.bottomCenter,
|
child: Align(
|
||||||
child: ClipRRect(
|
alignment: Alignment.bottomCenter,
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(16)),
|
child: ClipRRect(
|
||||||
child: Image.asset('assets/logo.png', width: 80, height: 80),
|
borderRadius: const BorderRadius.all(Radius.circular(16)),
|
||||||
|
child:
|
||||||
|
Image.asset('assets/logo.png', width: 80, height: 80),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
Column(
|
||||||
GestureDetector(
|
|
||||||
child: Column(
|
|
||||||
children: [
|
children: [
|
||||||
if (_isErrored && !_isDismissable && !_isBusy)
|
if (_isErrored && !_isDismissable && !_isBusy)
|
||||||
const Icon(Icons.cancel, size: 24),
|
const Icon(Icons.cancel, size: 24),
|
||||||
if (_isErrored && _isDismissable)
|
if (_isErrored && _isDismissable && !_isBusy)
|
||||||
const Icon(Icons.warning, size: 24),
|
const Icon(Icons.warning, size: 24),
|
||||||
if ((_isErrored && _isDismissable && _isBusy) || _isBusy)
|
if ((_isErrored && _isDismissable && _isBusy) || _isBusy)
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
@ -214,6 +216,15 @@ class _BootstrapperShellState extends State<BootstrapperShell> {
|
|||||||
color: _unFocusColor,
|
color: _unFocusColor,
|
||||||
),
|
),
|
||||||
).paddingOnly(bottom: 4),
|
).paddingOnly(bottom: 4),
|
||||||
|
if (!_isBusy && _isErrored && _isDismissable)
|
||||||
|
Text(
|
||||||
|
'bsDismissibleErrorHint'.tr,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 13,
|
||||||
|
color: _unFocusColor,
|
||||||
|
),
|
||||||
|
).paddingOnly(bottom: 5),
|
||||||
Text(
|
Text(
|
||||||
'2024 © Solsynth LLC',
|
'2024 © Solsynth LLC',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
@ -227,25 +238,25 @@ class _BootstrapperShellState extends State<BootstrapperShell> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
onTap: () {
|
],
|
||||||
if (_isBusy) return;
|
),
|
||||||
if (_isDismissable) {
|
|
||||||
setState(() {
|
|
||||||
_isBusy = false;
|
|
||||||
_isErrored = false;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
setState(() {
|
|
||||||
_isBusy = true;
|
|
||||||
_isErrored = false;
|
|
||||||
_periodCursor = 0;
|
|
||||||
});
|
|
||||||
_runPeriods();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
|
onTap: () {
|
||||||
|
if (_isBusy) return;
|
||||||
|
if (_isDismissable) {
|
||||||
|
setState(() {
|
||||||
|
_isBusy = false;
|
||||||
|
_isErrored = false;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setState(() {
|
||||||
|
_isBusy = true;
|
||||||
|
_isErrored = false;
|
||||||
|
_periodCursor = 0;
|
||||||
|
});
|
||||||
|
_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_date.dart';
|
||||||
import 'package:solian/widgets/posts/editor/post_editor_overview.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_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:solian/widgets/posts/editor/post_editor_visibility.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
class PostEditorController extends GetxController {
|
class PostEditorController extends GetxController {
|
||||||
late final SharedPreferences _prefs;
|
late final SharedPreferences _prefs;
|
||||||
|
|
||||||
|
final aliasController = TextEditingController();
|
||||||
final titleController = TextEditingController();
|
final titleController = TextEditingController();
|
||||||
final descriptionController = TextEditingController();
|
final descriptionController = TextEditingController();
|
||||||
final contentController = TextEditingController();
|
final contentController = TextEditingController();
|
||||||
@ -29,8 +31,9 @@ class PostEditorController extends GetxController {
|
|||||||
Rx<Realm?> realmZone = Rx(null);
|
Rx<Realm?> realmZone = Rx(null);
|
||||||
Rx<DateTime?> publishedAt = Rx(null);
|
Rx<DateTime?> publishedAt = Rx(null);
|
||||||
Rx<DateTime?> publishedUntil = 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);
|
RxList<String> tags = RxList<String>.empty(growable: true);
|
||||||
|
Rx<String?> thumbnail = Rx(null);
|
||||||
|
|
||||||
RxList<int> visibleUsers = RxList.empty(growable: true);
|
RxList<int> visibleUsers = RxList.empty(growable: true);
|
||||||
RxList<int> invisibleUsers = RxList.empty(growable: true);
|
RxList<int> invisibleUsers = RxList.empty(growable: true);
|
||||||
@ -113,18 +116,27 @@ class PostEditorController extends GetxController {
|
|||||||
return showModalBottomSheet(
|
return showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) => AttachmentEditorPopup(
|
builder: (context) => AttachmentEditorPopup(
|
||||||
usage: 'i.attachment',
|
pool: 'interactive',
|
||||||
initialAttachments: attachments,
|
initialAttachments: attachments,
|
||||||
onAdd: (int value) {
|
onAdd: (String value) {
|
||||||
attachments.add(value);
|
attachments.add(value);
|
||||||
},
|
},
|
||||||
onRemove: (int value) {
|
onRemove: (String value) {
|
||||||
attachments.remove(value);
|
attachments.remove(value);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> editThumbnail(BuildContext context) {
|
||||||
|
return showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) => PostEditorThumbnailDialog(
|
||||||
|
controller: this,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
void toggleDraftMode() {
|
void toggleDraftMode() {
|
||||||
isDraft.value = !isDraft.value;
|
isDraft.value = !isDraft.value;
|
||||||
}
|
}
|
||||||
@ -157,6 +169,7 @@ class PostEditorController extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void currentClear() {
|
void currentClear() {
|
||||||
|
aliasController.clear();
|
||||||
titleController.clear();
|
titleController.clear();
|
||||||
descriptionController.clear();
|
descriptionController.clear();
|
||||||
contentController.clear();
|
contentController.clear();
|
||||||
@ -165,6 +178,7 @@ class PostEditorController extends GetxController {
|
|||||||
visibleUsers.clear();
|
visibleUsers.clear();
|
||||||
invisibleUsers.clear();
|
invisibleUsers.clear();
|
||||||
visibility.value = 0;
|
visibility.value = 0;
|
||||||
|
thumbnail.value = null;
|
||||||
publishedAt.value = null;
|
publishedAt.value = null;
|
||||||
publishedUntil.value = null;
|
publishedUntil.value = null;
|
||||||
isDraft.value = false;
|
isDraft.value = false;
|
||||||
@ -185,17 +199,25 @@ class PostEditorController extends GetxController {
|
|||||||
|
|
||||||
type = value.type;
|
type = value.type;
|
||||||
editTo.value = value;
|
editTo.value = value;
|
||||||
|
realmZone.value = value.realm;
|
||||||
isDraft.value = value.isDraft ?? false;
|
isDraft.value = value.isDraft ?? false;
|
||||||
|
aliasController.text = value.alias ?? '';
|
||||||
titleController.text = value.body['title'] ?? '';
|
titleController.text = value.body['title'] ?? '';
|
||||||
descriptionController.text = value.body['description'] ?? '';
|
descriptionController.text = value.body['description'] ?? '';
|
||||||
contentController.text = value.body['content'] ?? '';
|
contentController.text = value.body['content'] ?? '';
|
||||||
publishedAt.value = value.publishedAt;
|
publishedAt.value = value.publishedAt;
|
||||||
publishedUntil.value = value.publishedUntil;
|
publishedUntil.value = value.publishedUntil;
|
||||||
tags.value =
|
tags.value = List.from(
|
||||||
value.body['tags']?.map((x) => x['alias']).toList() ?? List.empty();
|
value.body['tags']?.map((x) => x['alias']).toList() ?? List.empty(),
|
||||||
|
growable: true,
|
||||||
|
);
|
||||||
tags.refresh();
|
tags.refresh();
|
||||||
attachments.value = value.body['attachments']?.cast<int>() ?? List.empty();
|
attachments.value = List.from(
|
||||||
|
value.body['attachments'] ?? List.empty(),
|
||||||
|
growable: true,
|
||||||
|
);
|
||||||
attachments.refresh();
|
attachments.refresh();
|
||||||
|
thumbnail.value = value.body['thumbnail'];
|
||||||
|
|
||||||
contentLength.value = contentController.text.length;
|
contentLength.value = contentController.text.length;
|
||||||
}
|
}
|
||||||
@ -243,9 +265,11 @@ class PostEditorController extends GetxController {
|
|||||||
|
|
||||||
Map<String, dynamic> get payload {
|
Map<String, dynamic> get payload {
|
||||||
return {
|
return {
|
||||||
|
'alias': aliasController.text,
|
||||||
'title': title,
|
'title': title,
|
||||||
'description': description,
|
'description': description,
|
||||||
'content': contentController.text,
|
'content': contentController.text,
|
||||||
|
'thumbnail': thumbnail.value,
|
||||||
'tags': tags.map((x) => {'alias': x}).toList(),
|
'tags': tags.map((x) => {'alias': x}).toList(),
|
||||||
'attachments': attachments,
|
'attachments': attachments,
|
||||||
'visible_users': visibleUsers,
|
'visible_users': visibleUsers,
|
||||||
@ -263,19 +287,33 @@ class PostEditorController extends GetxController {
|
|||||||
|
|
||||||
set payload(Map<String, dynamic> value) {
|
set payload(Map<String, dynamic> value) {
|
||||||
type = value['type'];
|
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'] ?? '';
|
titleController.text = value['title'] ?? '';
|
||||||
descriptionController.text = value['description'] ?? '';
|
descriptionController.text = value['description'] ?? '';
|
||||||
contentController.text = value['content'] ?? '';
|
contentController.text = value['content'] ?? '';
|
||||||
attachments.value = value['attachments'].cast<int>() ?? List.empty();
|
attachments.value = List.from(
|
||||||
|
value['attachments'] ?? List.empty(),
|
||||||
|
growable: true,
|
||||||
|
);
|
||||||
attachments.refresh();
|
attachments.refresh();
|
||||||
|
thumbnail.value = value['thumbnail'];
|
||||||
visibility.value = value['visibility'];
|
visibility.value = value['visibility'];
|
||||||
isDraft.value = value['is_draft'];
|
isDraft.value = value['is_draft'];
|
||||||
if (value['visible_users'] != null) {
|
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) {
|
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) {
|
if (value['published_at'] != null) {
|
||||||
publishedAt.value = DateTime.parse(value['published_at']).toLocal();
|
publishedAt.value = DateTime.parse(value['published_at']).toLocal();
|
||||||
@ -304,11 +342,13 @@ class PostEditorController extends GetxController {
|
|||||||
|
|
||||||
bool get isNotEmpty {
|
bool get isNotEmpty {
|
||||||
return [
|
return [
|
||||||
|
aliasController.text.isNotEmpty,
|
||||||
titleController.text.isNotEmpty,
|
titleController.text.isNotEmpty,
|
||||||
descriptionController.text.isNotEmpty,
|
descriptionController.text.isNotEmpty,
|
||||||
contentController.text.isNotEmpty,
|
contentController.text.isNotEmpty,
|
||||||
attachments.isNotEmpty,
|
attachments.isNotEmpty,
|
||||||
tags.isNotEmpty
|
tags.isNotEmpty,
|
||||||
|
thumbnail.value != null,
|
||||||
].any((x) => x);
|
].any((x) => x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,11 +9,12 @@ class PostListController extends GetxController {
|
|||||||
|
|
||||||
/// The polling source modifier.
|
/// The polling source modifier.
|
||||||
/// - `0`: default recommendations
|
/// - `0`: default recommendations
|
||||||
/// - `1`: shuffle mode
|
/// - `1`: friend mode
|
||||||
|
/// - `2`: shuffle mode
|
||||||
RxInt mode = 0.obs;
|
RxInt mode = 0.obs;
|
||||||
|
|
||||||
/// The paging controller for infinite loading.
|
/// The paging controller for infinite loading.
|
||||||
/// Only available when mode is `0`.
|
/// Only available when mode is `0` or `1`.
|
||||||
PagingController<int, Post> pagingController =
|
PagingController<int, Post> pagingController =
|
||||||
PagingController(firstPageKey: 0);
|
PagingController(firstPageKey: 0);
|
||||||
|
|
||||||
@ -111,10 +112,23 @@ class PostListController extends GetxController {
|
|||||||
author: author,
|
author: author,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
resp = await provider.listRecommendations(
|
switch (mode.value) {
|
||||||
pageKey,
|
case 2:
|
||||||
channel: mode.value == 0 ? null : 'shuffle',
|
resp = await provider.listRecommendations(
|
||||||
);
|
pageKey,
|
||||||
|
channel: 'shuffle',
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
resp = await provider.listRecommendations(
|
||||||
|
pageKey,
|
||||||
|
channel: 'friends',
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
resp = await provider.listRecommendations(pageKey);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
rethrow;
|
rethrow;
|
||||||
|
@ -85,4 +85,5 @@ class DefaultFirebaseOptions {
|
|||||||
storageBucket: 'solian-0x001.appspot.com',
|
storageBucket: 'solian-0x001.appspot.com',
|
||||||
measurementId: 'G-EF9BZMKBC3',
|
measurementId: 'G-EF9BZMKBC3',
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
}
|
@ -1,12 +1,13 @@
|
|||||||
|
import 'dart:ui';
|
||||||
|
|
||||||
import 'package:firebase_core/firebase_core.dart';
|
import 'package:firebase_core/firebase_core.dart';
|
||||||
|
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_acrylic/flutter_acrylic.dart';
|
import 'package:flutter_acrylic/flutter_acrylic.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:media_kit/media_kit.dart';
|
|
||||||
import 'package:protocol_handler/protocol_handler.dart';
|
import 'package:protocol_handler/protocol_handler.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:sentry_flutter/sentry_flutter.dart';
|
|
||||||
import 'package:solian/bootstrapper.dart';
|
import 'package:solian/bootstrapper.dart';
|
||||||
import 'package:solian/firebase_options.dart';
|
import 'package:solian/firebase_options.dart';
|
||||||
import 'package:solian/platform.dart';
|
import 'package:solian/platform.dart';
|
||||||
@ -29,32 +30,28 @@ import 'package:solian/translations.dart';
|
|||||||
import 'package:flutter_web_plugins/url_strategy.dart' show usePathUrlStrategy;
|
import 'package:flutter_web_plugins/url_strategy.dart' show usePathUrlStrategy;
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
await SentryFlutter.init(
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
(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([
|
await Future.wait([
|
||||||
_initializeFirebase(),
|
_initializeFirebase(),
|
||||||
_initializePlatformComponents(),
|
_initializePlatformComponents(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
GoRouter.optionURLReflectsImperativeAPIs = true;
|
GoRouter.optionURLReflectsImperativeAPIs = true;
|
||||||
|
|
||||||
usePathUrlStrategy();
|
usePathUrlStrategy();
|
||||||
runApp(const SolianApp());
|
runApp(const SolianApp());
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _initializeFirebase() async {
|
Future<void> _initializeFirebase() async {
|
||||||
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
|
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 {
|
Future<void> _initializePlatformComponents() async {
|
||||||
|
@ -5,11 +5,11 @@ class Attachment {
|
|||||||
DateTime createdAt;
|
DateTime createdAt;
|
||||||
DateTime updatedAt;
|
DateTime updatedAt;
|
||||||
DateTime? deletedAt;
|
DateTime? deletedAt;
|
||||||
|
String rid;
|
||||||
String uuid;
|
String uuid;
|
||||||
int size;
|
int size;
|
||||||
String name;
|
String name;
|
||||||
String alt;
|
String alt;
|
||||||
String usage;
|
|
||||||
String mimetype;
|
String mimetype;
|
||||||
String hash;
|
String hash;
|
||||||
int destination;
|
int destination;
|
||||||
@ -24,11 +24,11 @@ class Attachment {
|
|||||||
required this.createdAt,
|
required this.createdAt,
|
||||||
required this.updatedAt,
|
required this.updatedAt,
|
||||||
required this.deletedAt,
|
required this.deletedAt,
|
||||||
|
required this.rid,
|
||||||
required this.uuid,
|
required this.uuid,
|
||||||
required this.size,
|
required this.size,
|
||||||
required this.name,
|
required this.name,
|
||||||
required this.alt,
|
required this.alt,
|
||||||
required this.usage,
|
|
||||||
required this.mimetype,
|
required this.mimetype,
|
||||||
required this.hash,
|
required this.hash,
|
||||||
required this.destination,
|
required this.destination,
|
||||||
@ -40,42 +40,45 @@ class Attachment {
|
|||||||
});
|
});
|
||||||
|
|
||||||
factory Attachment.fromJson(Map<String, dynamic> json) => Attachment(
|
factory Attachment.fromJson(Map<String, dynamic> json) => Attachment(
|
||||||
id: json['id'],
|
id: json['id'],
|
||||||
createdAt: DateTime.parse(json['created_at']),
|
createdAt: DateTime.parse(json['created_at']),
|
||||||
updatedAt: DateTime.parse(json['updated_at']),
|
updatedAt: DateTime.parse(json['updated_at']),
|
||||||
deletedAt: json['deleted_at'] != null ? DateTime.parse(json['deleted_at']) : null,
|
deletedAt: json['deleted_at'] != null
|
||||||
uuid: json['uuid'],
|
? DateTime.parse(json['deleted_at'])
|
||||||
size: json['size'],
|
: null,
|
||||||
name: json['name'],
|
rid: json['rid'],
|
||||||
alt: json['alt'],
|
uuid: json['uuid'],
|
||||||
usage: json['usage'],
|
size: json['size'],
|
||||||
mimetype: json['mimetype'],
|
name: json['name'],
|
||||||
hash: json['hash'],
|
alt: json['alt'],
|
||||||
destination: json['destination'],
|
mimetype: json['mimetype'],
|
||||||
isAnalyzed: json['is_analyzed'],
|
hash: json['hash'],
|
||||||
metadata: json['metadata'],
|
destination: json['destination'],
|
||||||
isMature: json['is_mature'],
|
isAnalyzed: json['is_analyzed'],
|
||||||
account: json['account'] != null ? Account.fromJson(json['account']) : null,
|
metadata: json['metadata'],
|
||||||
accountId: json['account_id'],
|
isMature: json['is_mature'],
|
||||||
);
|
account:
|
||||||
|
json['account'] != null ? Account.fromJson(json['account']) : null,
|
||||||
|
accountId: json['account_id'],
|
||||||
|
);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => {
|
Map<String, dynamic> toJson() => {
|
||||||
'id': id,
|
'id': id,
|
||||||
'created_at': createdAt.toIso8601String(),
|
'created_at': createdAt.toIso8601String(),
|
||||||
'updated_at': updatedAt.toIso8601String(),
|
'updated_at': updatedAt.toIso8601String(),
|
||||||
'deleted_at': deletedAt?.toIso8601String(),
|
'deleted_at': deletedAt?.toIso8601String(),
|
||||||
'uuid': uuid,
|
'rid': rid,
|
||||||
'size': size,
|
'uuid': uuid,
|
||||||
'name': name,
|
'size': size,
|
||||||
'alt': alt,
|
'name': name,
|
||||||
'usage': usage,
|
'alt': alt,
|
||||||
'mimetype': mimetype,
|
'mimetype': mimetype,
|
||||||
'hash': hash,
|
'hash': hash,
|
||||||
'destination': destination,
|
'destination': destination,
|
||||||
'is_analyzed': isAnalyzed,
|
'is_analyzed': isAnalyzed,
|
||||||
'metadata': metadata,
|
'metadata': metadata,
|
||||||
'is_mature': isMature,
|
'is_mature': isMature,
|
||||||
'account': account?.toJson(),
|
'account': account?.toJson(),
|
||||||
'account_id': accountId,
|
'account_id': accountId,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ class Event {
|
|||||||
class EventMessageBody {
|
class EventMessageBody {
|
||||||
String text;
|
String text;
|
||||||
String algorithm;
|
String algorithm;
|
||||||
List<int>? attachments;
|
List<String>? attachments;
|
||||||
int? quoteEvent;
|
int? quoteEvent;
|
||||||
int? relatedEvent;
|
int? relatedEvent;
|
||||||
List<int>? relatedUsers;
|
List<int>? relatedUsers;
|
||||||
@ -82,7 +82,7 @@ class EventMessageBody {
|
|||||||
text: json['text'] ?? '',
|
text: json['text'] ?? '',
|
||||||
algorithm: json['algorithm'] ?? 'plain',
|
algorithm: json['algorithm'] ?? 'plain',
|
||||||
attachments: json['attachments'] != null
|
attachments: json['attachments'] != null
|
||||||
? List<int>.from(json['attachments'].map((x) => x))
|
? List<String>.from(json['attachments']?.whereType<String>())
|
||||||
: null,
|
: null,
|
||||||
quoteEvent: json['quote_event'],
|
quoteEvent: json['quote_event'],
|
||||||
relatedEvent: json['related_event'],
|
relatedEvent: json['related_event'],
|
||||||
|
@ -8,6 +8,8 @@ class Post {
|
|||||||
DateTime updatedAt;
|
DateTime updatedAt;
|
||||||
DateTime? editedAt;
|
DateTime? editedAt;
|
||||||
DateTime? deletedAt;
|
DateTime? deletedAt;
|
||||||
|
String? alias;
|
||||||
|
String? areaAlias;
|
||||||
dynamic body;
|
dynamic body;
|
||||||
List<Tag>? tags;
|
List<Tag>? tags;
|
||||||
List<Category>? categories;
|
List<Category>? categories;
|
||||||
@ -33,6 +35,8 @@ class Post {
|
|||||||
required this.updatedAt,
|
required this.updatedAt,
|
||||||
required this.editedAt,
|
required this.editedAt,
|
||||||
required this.deletedAt,
|
required this.deletedAt,
|
||||||
|
required this.alias,
|
||||||
|
required this.areaAlias,
|
||||||
required this.type,
|
required this.type,
|
||||||
required this.body,
|
required this.body,
|
||||||
required this.tags,
|
required this.tags,
|
||||||
@ -60,6 +64,8 @@ class Post {
|
|||||||
deletedAt: json['deleted_at'] != null
|
deletedAt: json['deleted_at'] != null
|
||||||
? DateTime.parse(json['deleted_at'])
|
? DateTime.parse(json['deleted_at'])
|
||||||
: null,
|
: null,
|
||||||
|
alias: json['alias'],
|
||||||
|
areaAlias: json['area_alias'],
|
||||||
type: json['type'],
|
type: json['type'],
|
||||||
body: json['body'],
|
body: json['body'],
|
||||||
tags: json['tags']?.map((x) => Tag.fromJson(x)).toList().cast<Tag>(),
|
tags: json['tags']?.map((x) => Tag.fromJson(x)).toList().cast<Tag>(),
|
||||||
@ -101,6 +107,8 @@ class Post {
|
|||||||
'updated_at': updatedAt.toIso8601String(),
|
'updated_at': updatedAt.toIso8601String(),
|
||||||
'edited_at': editedAt?.toIso8601String(),
|
'edited_at': editedAt?.toIso8601String(),
|
||||||
'deleted_at': deletedAt?.toIso8601String(),
|
'deleted_at': deletedAt?.toIso8601String(),
|
||||||
|
'alias': alias,
|
||||||
|
'area_alias': areaAlias,
|
||||||
'type': type,
|
'type': type,
|
||||||
'body': body,
|
'body': body,
|
||||||
'tags': tags,
|
'tags': tags,
|
||||||
|
@ -52,6 +52,17 @@ class Realm {
|
|||||||
'is_community': isCommunity,
|
'is_community': isCommunity,
|
||||||
'account_id': accountId,
|
'account_id': accountId,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (other is Realm) {
|
||||||
|
return other.id == id;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => id;
|
||||||
}
|
}
|
||||||
|
|
||||||
class RealmMember {
|
class RealmMember {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import 'package:solian/models/account.dart';
|
import 'package:solian/models/account.dart';
|
||||||
import 'package:solian/models/attachment.dart';
|
import 'package:solian/models/attachment.dart';
|
||||||
|
import 'package:solian/services.dart';
|
||||||
|
|
||||||
class Sticker {
|
class Sticker {
|
||||||
int id;
|
int id;
|
||||||
@ -30,6 +31,14 @@ class Sticker {
|
|||||||
required this.account,
|
required this.account,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
String get textPlaceholder => '${pack?.prefix}$alias';
|
||||||
|
String get textWarpedPlaceholder => ':$textPlaceholder:';
|
||||||
|
|
||||||
|
String get imageUrl => ServiceFinder.buildUrl(
|
||||||
|
'files',
|
||||||
|
'/attachments/${attachment.rid}',
|
||||||
|
);
|
||||||
|
|
||||||
factory Sticker.fromJson(Map<String, dynamic> json) => Sticker(
|
factory Sticker.fromJson(Map<String, dynamic> json) => Sticker(
|
||||||
id: json['id'],
|
id: json['id'],
|
||||||
createdAt: DateTime.parse(json['created_at']),
|
createdAt: DateTime.parse(json['created_at']),
|
||||||
|
@ -138,8 +138,7 @@ class AttachmentUploaderController extends GetxController {
|
|||||||
queueOfUpload[idx].isCompleted = true;
|
queueOfUpload[idx].isCompleted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
queueOfUpload.value =
|
queueOfUpload.removeWhere((x) => x.error == null);
|
||||||
queueOfUpload.where((x) => x.error == null).toList(growable: true);
|
|
||||||
_stopProgressSyncTimer();
|
_stopProgressSyncTimer();
|
||||||
_syncProgress();
|
_syncProgress();
|
||||||
|
|
||||||
@ -149,7 +148,7 @@ class AttachmentUploaderController extends GetxController {
|
|||||||
Future<void> uploadAttachmentWithCallback(
|
Future<void> uploadAttachmentWithCallback(
|
||||||
Uint8List data,
|
Uint8List data,
|
||||||
String path,
|
String path,
|
||||||
String usage,
|
String pool,
|
||||||
Map<String, dynamic>? metadata,
|
Map<String, dynamic>? metadata,
|
||||||
Function(Attachment?) callback,
|
Function(Attachment?) callback,
|
||||||
) async {
|
) async {
|
||||||
@ -159,7 +158,7 @@ class AttachmentUploaderController extends GetxController {
|
|||||||
final result = await _rawUploadAttachment(
|
final result = await _rawUploadAttachment(
|
||||||
data,
|
data,
|
||||||
path,
|
path,
|
||||||
usage,
|
pool,
|
||||||
metadata,
|
metadata,
|
||||||
onProgress: (progress) {
|
onProgress: (progress) {
|
||||||
progressOfUpload.value = progress;
|
progressOfUpload.value = progress;
|
||||||
@ -172,7 +171,7 @@ class AttachmentUploaderController extends GetxController {
|
|||||||
Future<Attachment?> uploadAttachment(
|
Future<Attachment?> uploadAttachment(
|
||||||
Uint8List data,
|
Uint8List data,
|
||||||
String path,
|
String path,
|
||||||
String usage,
|
String pool,
|
||||||
Map<String, dynamic>? metadata,
|
Map<String, dynamic>? metadata,
|
||||||
) async {
|
) async {
|
||||||
if (isUploading.value) throw Exception('uploading blocked');
|
if (isUploading.value) throw Exception('uploading blocked');
|
||||||
@ -181,7 +180,7 @@ class AttachmentUploaderController extends GetxController {
|
|||||||
final result = await _rawUploadAttachment(
|
final result = await _rawUploadAttachment(
|
||||||
data,
|
data,
|
||||||
path,
|
path,
|
||||||
usage,
|
pool,
|
||||||
metadata,
|
metadata,
|
||||||
onProgress: (progress) {
|
onProgress: (progress) {
|
||||||
progressOfUpload.value = progress;
|
progressOfUpload.value = progress;
|
||||||
@ -192,14 +191,14 @@ class AttachmentUploaderController extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<Attachment?> _rawUploadAttachment(
|
Future<Attachment?> _rawUploadAttachment(
|
||||||
Uint8List data, String path, String usage, Map<String, dynamic>? metadata,
|
Uint8List data, String path, String pool, Map<String, dynamic>? metadata,
|
||||||
{Function(double)? onProgress, Function(dynamic err)? onError}) async {
|
{Function(double)? onProgress, Function(dynamic err)? onError}) async {
|
||||||
final AttachmentProvider provider = Get.find();
|
final AttachmentProvider provider = Get.find();
|
||||||
try {
|
try {
|
||||||
final result = await provider.createAttachment(
|
final result = await provider.createAttachment(
|
||||||
data,
|
data,
|
||||||
path,
|
path,
|
||||||
usage,
|
pool,
|
||||||
metadata,
|
metadata,
|
||||||
onProgress: onProgress,
|
onProgress: onProgress,
|
||||||
);
|
);
|
||||||
|
@ -88,7 +88,30 @@ class ChatCallProvider extends GetxController {
|
|||||||
|
|
||||||
void initRoom() {
|
void initRoom() {
|
||||||
initHardware();
|
initHardware();
|
||||||
room = Room();
|
room = Room(
|
||||||
|
roomOptions: const RoomOptions(
|
||||||
|
dynacast: true,
|
||||||
|
adaptiveStream: true,
|
||||||
|
defaultAudioPublishOptions: AudioPublishOptions(
|
||||||
|
name: 'call_voice',
|
||||||
|
stream: 'call_stream',
|
||||||
|
),
|
||||||
|
defaultVideoPublishOptions: VideoPublishOptions(
|
||||||
|
name: 'call_video',
|
||||||
|
stream: 'call_stream',
|
||||||
|
simulcast: true,
|
||||||
|
backupVideoCodec: BackupVideoCodec(enabled: true),
|
||||||
|
),
|
||||||
|
defaultScreenShareCaptureOptions: ScreenShareCaptureOptions(
|
||||||
|
useiOSBroadcastExtension: true,
|
||||||
|
params: VideoParametersPresets.screenShareH1080FPS30,
|
||||||
|
),
|
||||||
|
defaultCameraCaptureOptions: CameraCaptureOptions(
|
||||||
|
maxFrameRate: 30,
|
||||||
|
params: VideoParametersPresets.h1080_169,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
listener = room.createListener();
|
listener = room.createListener();
|
||||||
WakelockPlus.enable();
|
WakelockPlus.enable();
|
||||||
}
|
}
|
||||||
@ -104,28 +127,6 @@ class ChatCallProvider extends GetxController {
|
|||||||
await room.connect(
|
await room.connect(
|
||||||
url,
|
url,
|
||||||
token,
|
token,
|
||||||
roomOptions: const RoomOptions(
|
|
||||||
dynacast: true,
|
|
||||||
adaptiveStream: true,
|
|
||||||
defaultAudioPublishOptions: AudioPublishOptions(
|
|
||||||
name: 'call_voice',
|
|
||||||
stream: 'call_stream',
|
|
||||||
),
|
|
||||||
defaultVideoPublishOptions: VideoPublishOptions(
|
|
||||||
name: 'call_video',
|
|
||||||
stream: 'call_stream',
|
|
||||||
simulcast: true,
|
|
||||||
backupVideoCodec: BackupVideoCodec(enabled: true),
|
|
||||||
),
|
|
||||||
defaultScreenShareCaptureOptions: ScreenShareCaptureOptions(
|
|
||||||
useiOSBroadcastExtension: true,
|
|
||||||
params: VideoParametersPresets.screenShareH1080FPS30,
|
|
||||||
),
|
|
||||||
defaultCameraCaptureOptions: CameraCaptureOptions(
|
|
||||||
maxFrameRate: 30,
|
|
||||||
params: VideoParametersPresets.h1080_169,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
fastConnectOptions: FastConnectOptions(
|
fastConnectOptions: FastConnectOptions(
|
||||||
microphone: TrackOption(track: audioTrack.value),
|
microphone: TrackOption(track: audioTrack.value),
|
||||||
camera: TrackOption(track: videoTrack.value),
|
camera: TrackOption(track: videoTrack.value),
|
||||||
@ -152,7 +153,7 @@ class ChatCallProvider extends GetxController {
|
|||||||
void onRoomDidUpdate() => sortParticipants();
|
void onRoomDidUpdate() => sortParticipants();
|
||||||
|
|
||||||
void setupRoom() {
|
void setupRoom() {
|
||||||
if(isInitialized.value) return;
|
if (isInitialized.value) return;
|
||||||
|
|
||||||
sortParticipants();
|
sortParticipants();
|
||||||
room.addListener(onRoomDidUpdate);
|
room.addListener(onRoomDidUpdate);
|
||||||
|
@ -20,22 +20,22 @@ class AttachmentProvider extends GetConnect {
|
|||||||
httpClient.baseUrl = ServiceFinder.buildUrl('files', null);
|
httpClient.baseUrl = ServiceFinder.buildUrl('files', null);
|
||||||
}
|
}
|
||||||
|
|
||||||
final Map<int, Attachment> _cachedResponses = {};
|
final Map<String, Attachment> _cachedResponses = {};
|
||||||
|
|
||||||
Future<List<Attachment?>> listMetadata(
|
Future<List<Attachment?>> listMetadata(
|
||||||
List<int> id, {
|
List<String> rid, {
|
||||||
noCache = false,
|
noCache = false,
|
||||||
}) async {
|
}) async {
|
||||||
if (id.isEmpty) return List.empty();
|
if (rid.isEmpty) return List.empty();
|
||||||
|
|
||||||
List<Attachment?> result = List.filled(id.length, null);
|
List<Attachment?> result = List.filled(rid.length, null);
|
||||||
List<int> pendingQuery = List.empty(growable: true);
|
List<String> pendingQuery = List.empty(growable: true);
|
||||||
if (!noCache) {
|
if (!noCache) {
|
||||||
for (var idx = 0; idx < id.length; idx++) {
|
for (var idx = 0; idx < rid.length; idx++) {
|
||||||
if (_cachedResponses.containsKey(id[idx])) {
|
if (_cachedResponses.containsKey(rid[idx])) {
|
||||||
result[idx] = _cachedResponses[id[idx]];
|
result[idx] = _cachedResponses[rid[idx]];
|
||||||
} else {
|
} else {
|
||||||
pendingQuery.add(id[idx]);
|
pendingQuery.add(rid[idx]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -52,12 +52,12 @@ class AttachmentProvider extends GetConnect {
|
|||||||
rawOut.data!.map((x) => Attachment.fromJson(x)).toList();
|
rawOut.data!.map((x) => Attachment.fromJson(x)).toList();
|
||||||
for (final item in out) {
|
for (final item in out) {
|
||||||
if (item.destination != 0 && item.isAnalyzed) {
|
if (item.destination != 0 && item.isAnalyzed) {
|
||||||
_cachedResponses[item.id] = item;
|
_cachedResponses[item.rid] = item;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (var i = 0; i < out.length; i++) {
|
for (var i = 0; i < out.length; i++) {
|
||||||
for (var j = 0; j < id.length; j++) {
|
for (var j = 0; j < rid.length; j++) {
|
||||||
if (out[i].id == id[j]) {
|
if (out[i].rid == rid[j]) {
|
||||||
result[j] = out[i];
|
result[j] = out[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -66,16 +66,16 @@ class AttachmentProvider extends GetConnect {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Attachment?> getMetadata(int id, {noCache = false}) async {
|
Future<Attachment?> getMetadata(String rid, {noCache = false}) async {
|
||||||
if (!noCache && _cachedResponses.containsKey(id)) {
|
if (!noCache && _cachedResponses.containsKey(rid)) {
|
||||||
return _cachedResponses[id]!;
|
return _cachedResponses[rid]!;
|
||||||
}
|
}
|
||||||
|
|
||||||
final resp = await get('/attachments/$id/meta');
|
final resp = await get('/attachments/$rid/meta');
|
||||||
if (resp.statusCode == 200) {
|
if (resp.statusCode == 200) {
|
||||||
final result = Attachment.fromJson(resp.body);
|
final result = Attachment.fromJson(resp.body);
|
||||||
if (result.destination != 0 && result.isAnalyzed) {
|
if (result.destination != 0 && result.isAnalyzed) {
|
||||||
_cachedResponses[id] = result;
|
_cachedResponses[rid] = result;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -84,11 +84,13 @@ class AttachmentProvider extends GetConnect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<Attachment> createAttachment(
|
Future<Attachment> createAttachment(
|
||||||
Uint8List data, String path, String usage, Map<String, dynamic>? metadata,
|
Uint8List data, String path, String pool, Map<String, dynamic>? metadata,
|
||||||
{Function(double)? onProgress}) async {
|
{Function(double)? onProgress}) async {
|
||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
if (auth.isAuthorized.isFalse) throw Exception('unauthorized');
|
if (auth.isAuthorized.isFalse) throw Exception('unauthorized');
|
||||||
|
|
||||||
|
await auth.ensureCredentials();
|
||||||
|
|
||||||
final filePayload =
|
final filePayload =
|
||||||
dio.MultipartFile.fromBytes(data, filename: basename(path));
|
dio.MultipartFile.fromBytes(data, filename: basename(path));
|
||||||
final fileAlt = basename(path).contains('.')
|
final fileAlt = basename(path).contains('.')
|
||||||
@ -106,7 +108,7 @@ class AttachmentProvider extends GetConnect {
|
|||||||
final payload = dio.FormData.fromMap({
|
final payload = dio.FormData.fromMap({
|
||||||
'alt': fileAlt,
|
'alt': fileAlt,
|
||||||
'file': filePayload,
|
'file': filePayload,
|
||||||
'usage': usage,
|
'pool': pool,
|
||||||
if (mimetypeOverride != null) 'mimetype': mimetypeOverride,
|
if (mimetypeOverride != null) 'mimetype': mimetypeOverride,
|
||||||
'metadata': jsonEncode(metadata),
|
'metadata': jsonEncode(metadata),
|
||||||
});
|
});
|
||||||
@ -131,8 +133,7 @@ class AttachmentProvider extends GetConnect {
|
|||||||
|
|
||||||
Future<Response> updateAttachment(
|
Future<Response> updateAttachment(
|
||||||
int id,
|
int id,
|
||||||
String alt,
|
String alt, {
|
||||||
String usage, {
|
|
||||||
bool isMature = false,
|
bool isMature = false,
|
||||||
}) async {
|
}) async {
|
||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
@ -142,7 +143,6 @@ class AttachmentProvider extends GetConnect {
|
|||||||
|
|
||||||
var resp = await client.put('/attachments/$id', {
|
var resp = await client.put('/attachments/$id', {
|
||||||
'alt': alt,
|
'alt': alt,
|
||||||
'usage': usage,
|
|
||||||
'is_mature': isMature,
|
'is_mature': isMature,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ class AttachmentProvider extends GetConnect {
|
|||||||
return resp;
|
return resp;
|
||||||
}
|
}
|
||||||
|
|
||||||
void clearCache({int? id}) {
|
void clearCache({String? id}) {
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
_cachedResponses.remove(id);
|
_cachedResponses.remove(id);
|
||||||
} else {
|
} else {
|
||||||
|
@ -9,13 +9,20 @@ class PostProvider extends GetConnect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<Response> listRecommendations(int page,
|
Future<Response> listRecommendations(int page,
|
||||||
{int? realm, String? channel}) async {
|
{String? realm, String? channel}) async {
|
||||||
|
GetConnect client;
|
||||||
|
final AuthProvider auth = Get.find();
|
||||||
final queries = [
|
final queries = [
|
||||||
'take=${10}',
|
'take=${10}',
|
||||||
'offset=$page',
|
'offset=$page',
|
||||||
if (realm != null) 'realmId=$realm',
|
if (realm != null) 'realm=$realm',
|
||||||
];
|
];
|
||||||
final resp = await get(
|
if (auth.isAuthorized.value) {
|
||||||
|
client = auth.configureClient('co');
|
||||||
|
} else {
|
||||||
|
client = ServiceFinder.configureClient('co');
|
||||||
|
}
|
||||||
|
final resp = await client.get(
|
||||||
channel == null
|
channel == null
|
||||||
? '/recommendations?${queries.join('&')}'
|
? '/recommendations?${queries.join('&')}'
|
||||||
: '/recommendations/$channel?${queries.join('&')}',
|
: '/recommendations/$channel?${queries.join('&')}',
|
||||||
@ -45,14 +52,14 @@ class PostProvider extends GetConnect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<Response> listPost(int page,
|
Future<Response> listPost(int page,
|
||||||
{int? realm, String? author, tag, category}) async {
|
{String? realm, String? author, tag, category}) async {
|
||||||
final queries = [
|
final queries = [
|
||||||
'take=${10}',
|
'take=${10}',
|
||||||
'offset=$page',
|
'offset=$page',
|
||||||
if (tag != null) 'tag=$tag',
|
if (tag != null) 'tag=$tag',
|
||||||
if (category != null) 'category=$category',
|
if (category != null) 'category=$category',
|
||||||
if (author != null) 'author=$author',
|
if (author != null) 'author=$author',
|
||||||
if (realm != null) 'realmId=$realm',
|
if (realm != null) 'realm=$realm',
|
||||||
];
|
];
|
||||||
final resp = await get('/posts?${queries.join('&')}');
|
final resp = await get('/posts?${queries.join('&')}');
|
||||||
if (resp.statusCode != 200) {
|
if (resp.statusCode != 200) {
|
||||||
|
@ -5,9 +5,12 @@ import 'package:solian/services.dart';
|
|||||||
|
|
||||||
class StickerProvider extends GetxController {
|
class StickerProvider extends GetxController {
|
||||||
final RxMap<String, String> aliasImageMapping = RxMap();
|
final RxMap<String, String> aliasImageMapping = RxMap();
|
||||||
final RxMap<String, List<Sticker>> availableStickers = RxMap();
|
final RxList<Sticker> availableStickers = RxList.empty(growable: true);
|
||||||
|
|
||||||
Future<void> refreshAvailableStickers() async {
|
Future<void> refreshAvailableStickers() async {
|
||||||
|
availableStickers.clear();
|
||||||
|
aliasImageMapping.clear();
|
||||||
|
|
||||||
final client = ServiceFinder.configureClient('files');
|
final client = ServiceFinder.configureClient('files');
|
||||||
final resp = await client.get(
|
final resp = await client.get(
|
||||||
'/stickers/manifest?take=100',
|
'/stickers/manifest?take=100',
|
||||||
@ -20,16 +23,9 @@ class StickerProvider extends GetxController {
|
|||||||
for (final pack in out) {
|
for (final pack in out) {
|
||||||
for (final sticker in (pack.stickers ?? List<Sticker>.empty())) {
|
for (final sticker in (pack.stickers ?? List<Sticker>.empty())) {
|
||||||
sticker.pack = pack;
|
sticker.pack = pack;
|
||||||
final imageUrl = ServiceFinder.buildUrl(
|
aliasImageMapping[sticker.textPlaceholder.toUpperCase()] =
|
||||||
'files',
|
sticker.imageUrl;
|
||||||
'/attachments/${sticker.attachmentId}',
|
availableStickers.add(sticker);
|
||||||
);
|
|
||||||
aliasImageMapping['${pack.prefix}${sticker.alias}'.camelCase!] =
|
|
||||||
imageUrl;
|
|
||||||
if (availableStickers[pack.prefix] == null) {
|
|
||||||
availableStickers[pack.prefix] = List.empty(growable: true);
|
|
||||||
}
|
|
||||||
availableStickers[pack.prefix]!.add(sticker);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,6 @@ abstract class AppRouter {
|
|||||||
reply: arguments?.reply,
|
reply: arguments?.reply,
|
||||||
repost: arguments?.repost,
|
repost: arguments?.repost,
|
||||||
realm: arguments?.realm,
|
realm: arguments?.realm,
|
||||||
postListController: arguments?.postListController,
|
|
||||||
mode: int.tryParse(state.uri.queryParameters['mode'] ?? '0') ?? 0,
|
mode: int.tryParse(state.uri.queryParameters['mode'] ?? '0') ?? 0,
|
||||||
),
|
),
|
||||||
transitionsBuilder:
|
transitionsBuilder:
|
||||||
|
@ -116,7 +116,7 @@ class _PersonalizeScreenState extends State<PersonalizeScreen> {
|
|||||||
attachResult = await provider.createAttachment(
|
attachResult = await provider.createAttachment(
|
||||||
await file.readAsBytes(),
|
await file.readAsBytes(),
|
||||||
file.path,
|
file.path,
|
||||||
'p.$position',
|
'avatar',
|
||||||
null,
|
null,
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -300,6 +300,7 @@ class _AccountProfilePageState extends State<AccountProfilePage> {
|
|||||||
PostWarpedListWidget(
|
PostWarpedListWidget(
|
||||||
isPinned: false,
|
isPinned: false,
|
||||||
controller: _postController.pagingController,
|
controller: _postController.pagingController,
|
||||||
|
onUpdate: () => _postController.reloadAllOver(),
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
|
@ -66,11 +66,11 @@ class _StickerScreenState extends State<StickerScreen> {
|
|||||||
Widget _buildEmoteEntry(Sticker item, String prefix) {
|
Widget _buildEmoteEntry(Sticker item, String prefix) {
|
||||||
final imageUrl = ServiceFinder.buildUrl(
|
final imageUrl = ServiceFinder.buildUrl(
|
||||||
'files',
|
'files',
|
||||||
'/attachments/${item.attachmentId}',
|
'/attachments/${item.attachment.rid}',
|
||||||
);
|
);
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text(item.name),
|
title: Text(item.name),
|
||||||
subtitle: Text(':${'$prefix${item.alias}'.camelCase}:'),
|
subtitle: Text(item.textWarpedPlaceholder),
|
||||||
contentPadding: const EdgeInsets.only(left: 16, right: 14),
|
contentPadding: const EdgeInsets.only(left: 16, right: 14),
|
||||||
trailing: Row(
|
trailing: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
@ -159,15 +159,25 @@ class _StickerScreenState extends State<StickerScreen> {
|
|||||||
builderDelegate: PagedChildBuilderDelegate(
|
builderDelegate: PagedChildBuilderDelegate(
|
||||||
itemBuilder: (BuildContext context, item, int index) {
|
itemBuilder: (BuildContext context, item, int index) {
|
||||||
return ExpansionTile(
|
return ExpansionTile(
|
||||||
title: Text(item.name),
|
title: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text(item.name),
|
||||||
|
const SizedBox(width: 6),
|
||||||
|
Badge(
|
||||||
|
label: Text('#${item.id}'),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
item.description,
|
item.description,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
children: item.stickers
|
children: item.stickers?.map((x) {
|
||||||
?.map((x) => _buildEmoteEntry(x, item.prefix))
|
x.pack = item;
|
||||||
.toList() ??
|
return _buildEmoteEntry(x, item.prefix);
|
||||||
|
}).toList() ??
|
||||||
List.empty(),
|
List.empty(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -79,8 +79,8 @@ class _SignInPopupState extends State<SignInPopup> with ProtocolListener {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
const redirect = 'solink://auth?status=done';
|
const redirect = 'solink://auth?status=done';
|
||||||
launchUrlString(
|
launchUrlString(
|
||||||
ServiceFinder.buildUrl('passport',
|
ServiceFinder.buildUrl('capital',
|
||||||
'/mfa?redirect_uri=$redirect&ticketId=${e.ticketId}'),
|
'/auth/mfa?redirect_uri=$redirect&ticketId=${e.ticketId}'),
|
||||||
mode: LaunchMode.inAppWebView,
|
mode: LaunchMode.inAppWebView,
|
||||||
);
|
);
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
@ -136,8 +136,10 @@ class _SignInPopupState extends State<SignInPopup> with ProtocolListener {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Image.asset('assets/logo.png', width: 64, height: 64)
|
ClipRRect(
|
||||||
.paddingOnly(bottom: 4),
|
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
||||||
|
child: Image.asset('assets/logo.png', width: 64, height: 64),
|
||||||
|
).paddingOnly(bottom: 4),
|
||||||
Text(
|
Text(
|
||||||
'signinGreeting'.tr,
|
'signinGreeting'.tr,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
|
@ -70,8 +70,10 @@ class _SignUpPopupState extends State<SignUpPopup> {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Image.asset('assets/logo.png', width: 64, height: 64)
|
ClipRRect(
|
||||||
.paddingOnly(bottom: 4),
|
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
||||||
|
child: Image.asset('assets/logo.png', width: 64, height: 64),
|
||||||
|
).paddingOnly(bottom: 4),
|
||||||
Text(
|
Text(
|
||||||
'signupGreeting'.tr,
|
'signupGreeting'.tr,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
|
@ -9,6 +9,7 @@ import 'package:solian/theme.dart';
|
|||||||
import 'package:solian/widgets/app_bar_leading.dart';
|
import 'package:solian/widgets/app_bar_leading.dart';
|
||||||
import 'package:solian/widgets/chat/call/call_controls.dart';
|
import 'package:solian/widgets/chat/call/call_controls.dart';
|
||||||
import 'package:solian/widgets/chat/call/call_participant.dart';
|
import 'package:solian/widgets/chat/call/call_participant.dart';
|
||||||
|
import 'package:livekit_client/livekit_client.dart' as livekit;
|
||||||
|
|
||||||
class CallScreen extends StatefulWidget {
|
class CallScreen extends StatefulWidget {
|
||||||
const CallScreen({super.key});
|
const CallScreen({super.key});
|
||||||
@ -161,31 +162,30 @@ class _CallScreenState extends State<CallScreen> with TickerProviderStateMixin {
|
|||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: columns,
|
crossAxisCount: columns,
|
||||||
childAspectRatio: tileWidth / tileHeight,
|
childAspectRatio: tileWidth / tileHeight,
|
||||||
|
crossAxisSpacing: 8,
|
||||||
|
mainAxisSpacing: 8,
|
||||||
),
|
),
|
||||||
itemCount: math.max(0, call.participantTracks.length),
|
itemCount: math.max(0, call.participantTracks.length),
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
final track = call.participantTracks[index];
|
final track = call.participantTracks[index];
|
||||||
return Padding(
|
return Card(
|
||||||
padding: const EdgeInsets.all(16),
|
child: ClipRRect(
|
||||||
child: Card(
|
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
||||||
child: ClipRRect(
|
child: InteractiveParticipantWidget(
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
color: Theme.of(context).colorScheme.surfaceContainerHigh,
|
||||||
child: InteractiveParticipantWidget(
|
participant: track,
|
||||||
color: Theme.of(context).colorScheme.surfaceContainerHigh,
|
onTap: () {
|
||||||
participant: track,
|
if (track.participant.sid !=
|
||||||
onTap: () {
|
call.focusTrack.value?.participant.sid) {
|
||||||
if (track.participant.sid !=
|
call.changeFocusTrack(track);
|
||||||
call.focusTrack.value?.participant.sid) {
|
}
|
||||||
call.changeFocusTrack(track);
|
},
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
).paddingAll(8);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,8 +246,77 @@ class _CallScreenState extends State<CallScreen> with TickerProviderStateMixin {
|
|||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
height: 64,
|
height: 64,
|
||||||
child: Row(
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
const Expanded(child: SizedBox()),
|
Builder(builder: (context) {
|
||||||
|
final call = Get.find<ChatCallProvider>();
|
||||||
|
final connectionQuality =
|
||||||
|
call.room.localParticipant?.connectionQuality ??
|
||||||
|
livekit.ConnectionQuality.unknown;
|
||||||
|
return Expanded(
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text(call.room.serverRegion ?? 'unknown'),
|
||||||
|
const SizedBox(width: 6),
|
||||||
|
Text(call.room.serverVersion ?? 'unknown')
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
{
|
||||||
|
livekit.ConnectionState.disconnected:
|
||||||
|
'callStatusDisconnected'.tr,
|
||||||
|
livekit.ConnectionState.connected:
|
||||||
|
'callStatusConnected'.tr,
|
||||||
|
livekit.ConnectionState.connecting:
|
||||||
|
'callStatusConnecting'.tr,
|
||||||
|
livekit.ConnectionState.reconnecting:
|
||||||
|
'callStatusReconnecting'.tr,
|
||||||
|
}[call.room.connectionState]!,
|
||||||
|
),
|
||||||
|
const SizedBox(width: 6),
|
||||||
|
if (connectionQuality !=
|
||||||
|
livekit.ConnectionQuality.unknown)
|
||||||
|
Icon(
|
||||||
|
{
|
||||||
|
livekit.ConnectionQuality.excellent:
|
||||||
|
Icons.signal_cellular_alt,
|
||||||
|
livekit.ConnectionQuality.good:
|
||||||
|
Icons.signal_cellular_alt_2_bar,
|
||||||
|
livekit.ConnectionQuality.poor:
|
||||||
|
Icons.signal_cellular_alt_1_bar,
|
||||||
|
}[connectionQuality],
|
||||||
|
color: {
|
||||||
|
livekit.ConnectionQuality.excellent:
|
||||||
|
Colors.green,
|
||||||
|
livekit.ConnectionQuality.good:
|
||||||
|
Colors.orange,
|
||||||
|
livekit.ConnectionQuality.poor:
|
||||||
|
Colors.red,
|
||||||
|
}[connectionQuality],
|
||||||
|
size: 16,
|
||||||
|
)
|
||||||
|
else
|
||||||
|
const SizedBox(
|
||||||
|
width: 12,
|
||||||
|
height: 12,
|
||||||
|
child: CircularProgressIndicator(
|
||||||
|
color: Colors.white,
|
||||||
|
strokeWidth: 2,
|
||||||
|
),
|
||||||
|
).paddingAll(3),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}),
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: _layoutMode == 0
|
icon: _layoutMode == 0
|
||||||
? const Icon(Icons.view_list)
|
? const Icon(Icons.view_list)
|
||||||
@ -257,7 +326,7 @@ class _CallScreenState extends State<CallScreen> with TickerProviderStateMixin {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
).paddingSymmetric(horizontal: 10),
|
).paddingOnly(left: 20, right: 16),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
@ -20,7 +20,6 @@ import 'package:solian/widgets/app_bar_leading.dart';
|
|||||||
import 'package:solian/widgets/app_bar_title.dart';
|
import 'package:solian/widgets/app_bar_title.dart';
|
||||||
import 'package:solian/widgets/channel/channel_call_indicator.dart';
|
import 'package:solian/widgets/channel/channel_call_indicator.dart';
|
||||||
import 'package:solian/widgets/chat/call/chat_call_action.dart';
|
import 'package:solian/widgets/chat/call/chat_call_action.dart';
|
||||||
import 'package:solian/widgets/chat/chat_event.dart';
|
|
||||||
import 'package:solian/widgets/chat/chat_event_list.dart';
|
import 'package:solian/widgets/chat/chat_event_list.dart';
|
||||||
import 'package:solian/widgets/chat/chat_message_input.dart';
|
import 'package:solian/widgets/chat/chat_message_input.dart';
|
||||||
import 'package:solian/widgets/current_state_action.dart';
|
import 'package:solian/widgets/current_state_action.dart';
|
||||||
@ -39,7 +38,10 @@ class ChannelChatScreen extends StatefulWidget {
|
|||||||
State<ChannelChatScreen> createState() => _ChannelChatScreenState();
|
State<ChannelChatScreen> createState() => _ChannelChatScreenState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
class _ChannelChatScreenState extends State<ChannelChatScreen>
|
||||||
|
with WidgetsBindingObserver {
|
||||||
|
DateTime? _isOutOfSyncSince;
|
||||||
|
|
||||||
bool _isBusy = false;
|
bool _isBusy = false;
|
||||||
int? _accountId;
|
int? _accountId;
|
||||||
|
|
||||||
@ -123,20 +125,38 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _keepUpdateWithServer() {
|
||||||
|
_getOngoingCall();
|
||||||
|
_chatController.getEvents(_channel!, widget.realm);
|
||||||
|
setState(() => _isOutOfSyncSince = null);
|
||||||
|
}
|
||||||
|
|
||||||
Event? _messageToReplying;
|
Event? _messageToReplying;
|
||||||
Event? _messageToEditing;
|
Event? _messageToEditing;
|
||||||
|
|
||||||
Widget buildHistoryBody(Event item, {bool isMerged = false}) {
|
@override
|
||||||
return ChatEvent(
|
void didChangeAppLifecycleState(AppLifecycleState state) {
|
||||||
key: Key('m${item.uuid}'),
|
switch (state) {
|
||||||
item: item,
|
case AppLifecycleState.resumed:
|
||||||
isMerged: isMerged,
|
if (_isOutOfSyncSince == null) break;
|
||||||
chatController: _chatController,
|
if (DateTime.now().difference(_isOutOfSyncSince!).inSeconds < 60) break;
|
||||||
);
|
_keepUpdateWithServer();
|
||||||
|
break;
|
||||||
|
case AppLifecycleState.paused:
|
||||||
|
if (mounted) {
|
||||||
|
setState(() => _isOutOfSyncSince = DateTime.now());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
WidgetsBinding.instance.addObserver(this);
|
||||||
|
|
||||||
_accountId = Get.find<AuthProvider>().userProfile.value!['id'];
|
_accountId = Get.find<AuthProvider>().userProfile.value!['id'];
|
||||||
|
|
||||||
_chatController = ChatEventController();
|
_chatController = ChatEventController();
|
||||||
@ -147,21 +167,10 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
|||||||
_chatController.getEvents(_channel!, widget.realm);
|
_chatController.getEvents(_channel!, widget.realm);
|
||||||
_listenMessages();
|
_listenMessages();
|
||||||
});
|
});
|
||||||
|
|
||||||
super.initState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (_isBusy || _channel == null) {
|
|
||||||
return Material(
|
|
||||||
color: Theme.of(context).colorScheme.surface,
|
|
||||||
child: const Center(
|
|
||||||
child: CircularProgressIndicator(),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
String title = _channel?.name ?? 'loading'.tr;
|
String title = _channel?.name ?? 'loading'.tr;
|
||||||
String? placeholder;
|
String? placeholder;
|
||||||
|
|
||||||
@ -185,7 +194,8 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
|||||||
actions: [
|
actions: [
|
||||||
const BackgroundStateWidget(),
|
const BackgroundStateWidget(),
|
||||||
Builder(builder: (context) {
|
Builder(builder: (context) {
|
||||||
if (_isBusy) return const SizedBox();
|
if (_isBusy || _channel == null) return const SizedBox();
|
||||||
|
|
||||||
return ChatCallButton(
|
return ChatCallButton(
|
||||||
realm: _channel!.realm,
|
realm: _channel!.realm,
|
||||||
channel: _channel!,
|
channel: _channel!,
|
||||||
@ -195,6 +205,8 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
|||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Icons.more_vert),
|
icon: const Icon(Icons.more_vert),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
if (_channel == null) return;
|
||||||
|
|
||||||
AppRouter.instance
|
AppRouter.instance
|
||||||
.pushNamed(
|
.pushNamed(
|
||||||
'channelDetail',
|
'channelDetail',
|
||||||
@ -219,66 +231,94 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: Column(
|
body: Builder(builder: (context) {
|
||||||
children: [
|
if (_isBusy || _channel == null) {
|
||||||
if (_ongoingCall != null)
|
return const Center(
|
||||||
ChannelCallIndicator(
|
child: CircularProgressIndicator(),
|
||||||
channel: _channel!,
|
);
|
||||||
ongoingCall: _ongoingCall!,
|
}
|
||||||
|
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
if (_ongoingCall != null)
|
||||||
|
ChannelCallIndicator(
|
||||||
|
channel: _channel!,
|
||||||
|
ongoingCall: _ongoingCall!,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: ChatEventList(
|
||||||
|
scope: widget.realm,
|
||||||
|
channel: _channel!,
|
||||||
|
chatController: _chatController,
|
||||||
|
onEdit: (item) {
|
||||||
|
setState(() => _messageToEditing = item);
|
||||||
|
},
|
||||||
|
onReply: (item) {
|
||||||
|
setState(() => _messageToReplying = item);
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
if (_isOutOfSyncSince != null)
|
||||||
child: ChatEventList(
|
ListTile(
|
||||||
scope: widget.realm,
|
contentPadding: const EdgeInsets.only(left: 16, right: 8),
|
||||||
channel: _channel!,
|
tileColor: Theme.of(context).colorScheme.surfaceContainerLow,
|
||||||
chatController: _chatController,
|
leading: const Icon(Icons.history_toggle_off),
|
||||||
onEdit: (item) {
|
title: Text('messageOutOfSync'.tr),
|
||||||
setState(() => _messageToEditing = item);
|
subtitle: Text('messageOutOfSyncCaption'.tr),
|
||||||
},
|
trailing: IconButton(
|
||||||
onReply: (item) {
|
icon: const Icon(Icons.close),
|
||||||
setState(() => _messageToReplying = item);
|
onPressed: () {
|
||||||
},
|
setState(() => _isOutOfSyncSince = null);
|
||||||
),
|
|
||||||
),
|
|
||||||
Obx(() {
|
|
||||||
if (_chatController.isLoading.isTrue) {
|
|
||||||
return const LinearProgressIndicator().animate().slideY();
|
|
||||||
} else {
|
|
||||||
return const SizedBox();
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
ClipRect(
|
|
||||||
child: BackdropFilter(
|
|
||||||
filter: ImageFilter.blur(sigmaX: 50, sigmaY: 50),
|
|
||||||
child: SafeArea(
|
|
||||||
child: ChatMessageInput(
|
|
||||||
edit: _messageToEditing,
|
|
||||||
reply: _messageToReplying,
|
|
||||||
realm: widget.realm,
|
|
||||||
placeholder: placeholder,
|
|
||||||
channel: _channel!,
|
|
||||||
onSent: (Event item) {
|
|
||||||
setState(() {
|
|
||||||
_chatController.addPendingEvent(item);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
onReset: () {
|
|
||||||
setState(() {
|
|
||||||
_messageToReplying = null;
|
|
||||||
_messageToEditing = null;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
onTap: _isBusy
|
||||||
|
? null
|
||||||
|
: () {
|
||||||
|
_keepUpdateWithServer();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
Obx(() {
|
||||||
|
if (_chatController.isLoading.isTrue) {
|
||||||
|
return const LinearProgressIndicator().animate().slideY();
|
||||||
|
} else {
|
||||||
|
return const SizedBox();
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
ClipRect(
|
||||||
|
child: BackdropFilter(
|
||||||
|
filter: ImageFilter.blur(sigmaX: 50, sigmaY: 50),
|
||||||
|
child: SafeArea(
|
||||||
|
child: ChatMessageInput(
|
||||||
|
edit: _messageToEditing,
|
||||||
|
reply: _messageToReplying,
|
||||||
|
realm: widget.realm,
|
||||||
|
placeholder: placeholder,
|
||||||
|
channel: _channel!,
|
||||||
|
onSent: (Event item) {
|
||||||
|
setState(() {
|
||||||
|
_chatController.addPendingEvent(item);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onReset: () {
|
||||||
|
setState(() {
|
||||||
|
_messageToReplying = null;
|
||||||
|
_messageToEditing = null;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
);
|
||||||
),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_subscription?.cancel();
|
_subscription?.cancel();
|
||||||
|
WidgetsBinding.instance.removeObserver(this);
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ class _DraftBoxScreenState extends State<DraftBoxScreen> {
|
|||||||
final PagingController<int, Post> _pagingController =
|
final PagingController<int, Post> _pagingController =
|
||||||
PagingController(firstPageKey: 0);
|
PagingController(firstPageKey: 0);
|
||||||
|
|
||||||
getPosts(int pageKey) async {
|
_getPosts(int pageKey) async {
|
||||||
final PostProvider provider = Get.find();
|
final PostProvider provider = Get.find();
|
||||||
|
|
||||||
Response resp;
|
Response resp;
|
||||||
@ -49,7 +49,7 @@ class _DraftBoxScreenState extends State<DraftBoxScreen> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_pagingController.addPageRequestListener(getPosts);
|
_pagingController.addPageRequestListener(_getPosts);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -76,6 +76,9 @@ class _DraftBoxScreenState extends State<DraftBoxScreen> {
|
|||||||
itemBuilder: (context, item, index) {
|
itemBuilder: (context, item, index) {
|
||||||
return PostOwnedListEntry(
|
return PostOwnedListEntry(
|
||||||
item: item,
|
item: item,
|
||||||
|
isFullContent: true,
|
||||||
|
backgroundColor:
|
||||||
|
Theme.of(context).colorScheme.surfaceContainerLow,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
useRootNavigator: true,
|
useRootNavigator: true,
|
||||||
@ -85,7 +88,13 @@ class _DraftBoxScreenState extends State<DraftBoxScreen> {
|
|||||||
noReact: true,
|
noReact: true,
|
||||||
),
|
),
|
||||||
).then((value) {
|
).then((value) {
|
||||||
if (value != null) _pagingController.refresh();
|
if (value is Future) {
|
||||||
|
value.then((_) {
|
||||||
|
_pagingController.refresh();
|
||||||
|
});
|
||||||
|
} else if (value != null) {
|
||||||
|
_pagingController.refresh();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
).paddingOnly(left: 12, right: 12, bottom: 4);
|
).paddingOnly(left: 12, right: 12, bottom: 4);
|
||||||
|
@ -77,7 +77,10 @@ class _FeedSearchScreenState extends State<FeedSearchScreen> {
|
|||||||
onRefresh: () => Future.sync(() => _pagingController.refresh()),
|
onRefresh: () => Future.sync(() => _pagingController.refresh()),
|
||||||
child: CustomScrollView(
|
child: CustomScrollView(
|
||||||
slivers: [
|
slivers: [
|
||||||
PostWarpedListWidget(controller: _pagingController),
|
PostWarpedListWidget(
|
||||||
|
controller: _pagingController,
|
||||||
|
onUpdate: () => _pagingController.refresh(),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -4,8 +4,8 @@ import 'package:solian/controllers/post_list_controller.dart';
|
|||||||
import 'package:solian/providers/auth.dart';
|
import 'package:solian/providers/auth.dart';
|
||||||
import 'package:solian/router.dart';
|
import 'package:solian/router.dart';
|
||||||
import 'package:solian/screens/account/notification.dart';
|
import 'package:solian/screens/account/notification.dart';
|
||||||
import 'package:solian/screens/posts/post_editor.dart';
|
|
||||||
import 'package:solian/theme.dart';
|
import 'package:solian/theme.dart';
|
||||||
|
import 'package:solian/widgets/account/signin_required_overlay.dart';
|
||||||
import 'package:solian/widgets/app_bar_title.dart';
|
import 'package:solian/widgets/app_bar_title.dart';
|
||||||
import 'package:solian/widgets/current_state_action.dart';
|
import 'package:solian/widgets/current_state_action.dart';
|
||||||
import 'package:solian/widgets/app_bar_leading.dart';
|
import 'package:solian/widgets/app_bar_leading.dart';
|
||||||
@ -28,34 +28,37 @@ class _HomeScreenState extends State<HomeScreen>
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_postController = PostListController();
|
_postController = PostListController();
|
||||||
_tabController = TabController(length: 2, vsync: this);
|
_tabController = TabController(length: 3, vsync: this);
|
||||||
_tabController.addListener(() {
|
_tabController.addListener(() {
|
||||||
switch (_tabController.index) {
|
if (_postController.mode.value == _tabController.index) return;
|
||||||
case 0:
|
_postController.mode.value = _tabController.index;
|
||||||
case 1:
|
_postController.reloadAllOver();
|
||||||
if (_postController.mode.value == _tabController.index) return;
|
|
||||||
_postController.mode.value = _tabController.index;
|
|
||||||
_postController.reloadAllOver();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final AuthProvider auth = Get.find();
|
||||||
|
|
||||||
return Material(
|
return Material(
|
||||||
color: Theme.of(context).colorScheme.surface,
|
color: Theme.of(context).colorScheme.surface,
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
child: const Icon(Icons.add),
|
child: const Icon(Icons.add),
|
||||||
onPressed: () {
|
onPressed: () async {
|
||||||
showModalBottomSheet(
|
final value = await showModalBottomSheet(
|
||||||
useRootNavigator: true,
|
useRootNavigator: true,
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) => PostCreatePopup(
|
builder: (context) => const PostCreatePopup(),
|
||||||
controller: _postController,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
if (value is Future) {
|
||||||
|
value.then((_) {
|
||||||
|
_postController.reloadAllOver();
|
||||||
|
});
|
||||||
|
} else if (value != null) {
|
||||||
|
_postController.reloadAllOver();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
body: NestedScrollView(
|
body: NestedScrollView(
|
||||||
@ -78,6 +81,7 @@ class _HomeScreenState extends State<HomeScreen>
|
|||||||
controller: _tabController,
|
controller: _tabController,
|
||||||
tabs: [
|
tabs: [
|
||||||
Tab(text: 'postListNews'.tr),
|
Tab(text: 'postListNews'.tr),
|
||||||
|
Tab(text: 'postListFriends'.tr),
|
||||||
Tab(text: 'postListShuffle'.tr),
|
Tab(text: 'postListShuffle'.tr),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -100,9 +104,27 @@ class _HomeScreenState extends State<HomeScreen>
|
|||||||
child: CustomScrollView(slivers: [
|
child: CustomScrollView(slivers: [
|
||||||
PostWarpedListWidget(
|
PostWarpedListWidget(
|
||||||
controller: _postController.pagingController,
|
controller: _postController.pagingController,
|
||||||
|
onUpdate: () => _postController.reloadAllOver(),
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
|
Obx(() {
|
||||||
|
if (auth.isAuthorized.value) {
|
||||||
|
return RefreshIndicator(
|
||||||
|
onRefresh: () => _postController.reloadAllOver(),
|
||||||
|
child: CustomScrollView(slivers: [
|
||||||
|
PostWarpedListWidget(
|
||||||
|
controller: _postController.pagingController,
|
||||||
|
onUpdate: () => _postController.reloadAllOver(),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return SigninRequiredOverlay(
|
||||||
|
onSignedIn: () => _postController.reloadAllOver(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}),
|
||||||
PostShuffleSwiper(controller: _postController),
|
PostShuffleSwiper(controller: _postController),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@ -121,12 +143,10 @@ class _HomeScreenState extends State<HomeScreen>
|
|||||||
|
|
||||||
class PostCreatePopup extends StatelessWidget {
|
class PostCreatePopup extends StatelessWidget {
|
||||||
final bool hideDraftBox;
|
final bool hideDraftBox;
|
||||||
final PostListController controller;
|
|
||||||
|
|
||||||
const PostCreatePopup({
|
const PostCreatePopup({
|
||||||
super.key,
|
super.key,
|
||||||
this.hideDraftBox = false,
|
this.hideDraftBox = false,
|
||||||
required this.controller,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -142,13 +162,14 @@ class PostCreatePopup extends StatelessWidget {
|
|||||||
icon: const Icon(Icons.post_add),
|
icon: const Icon(Icons.post_add),
|
||||||
label: 'postEditorModeStory'.tr,
|
label: 'postEditorModeStory'.tr,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(
|
||||||
AppRouter.instance.pushNamed(
|
context,
|
||||||
'postEditor',
|
AppRouter.instance.pushNamed(
|
||||||
extra: PostPublishArguments(postListController: controller),
|
'postEditor',
|
||||||
queryParameters: {
|
queryParameters: {
|
||||||
'mode': 0.toString(),
|
'mode': 0.toString(),
|
||||||
},
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -156,13 +177,14 @@ class PostCreatePopup extends StatelessWidget {
|
|||||||
icon: const Icon(Icons.description),
|
icon: const Icon(Icons.description),
|
||||||
label: 'postEditorModeArticle'.tr,
|
label: 'postEditorModeArticle'.tr,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(
|
||||||
AppRouter.instance.pushNamed(
|
context,
|
||||||
'postEditor',
|
AppRouter.instance.pushNamed(
|
||||||
extra: PostPublishArguments(postListController: controller),
|
'postEditor',
|
||||||
queryParameters: {
|
queryParameters: {
|
||||||
'mode': 1.toString(),
|
'mode': 1.toString(),
|
||||||
},
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -170,8 +192,10 @@ class PostCreatePopup extends StatelessWidget {
|
|||||||
icon: const Icon(Icons.drafts),
|
icon: const Icon(Icons.drafts),
|
||||||
label: 'draftBoxOpen'.tr,
|
label: 'draftBoxOpen'.tr,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(
|
||||||
AppRouter.instance.pushNamed('draftBox');
|
context,
|
||||||
|
AppRouter.instance.pushNamed('draftBox'),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
@ -201,7 +225,12 @@ class PostCreatePopup extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
x.icon,
|
x.icon,
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Text(x.label),
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
x.label,
|
||||||
|
overflow: TextOverflow.fade,
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
).paddingAll(18),
|
).paddingAll(18),
|
||||||
),
|
),
|
||||||
|
@ -59,8 +59,10 @@ class _PostDetailScreenState extends State<PostDetailScreen> {
|
|||||||
SliverToBoxAdapter(
|
SliverToBoxAdapter(
|
||||||
child: PostItem(
|
child: PostItem(
|
||||||
item: item!,
|
item: item!,
|
||||||
isClickable: true,
|
isClickable: false,
|
||||||
|
isOverrideEmbedClickable: true,
|
||||||
isFullDate: true,
|
isFullDate: true,
|
||||||
|
isFullContent: true,
|
||||||
isShowReply: false,
|
isShowReply: false,
|
||||||
isContentSelectable: true,
|
isContentSelectable: true,
|
||||||
),
|
),
|
||||||
|
@ -5,7 +5,6 @@ import 'package:get/get.dart';
|
|||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:markdown_toolbar/markdown_toolbar.dart';
|
import 'package:markdown_toolbar/markdown_toolbar.dart';
|
||||||
import 'package:solian/controllers/post_editor_controller.dart';
|
import 'package:solian/controllers/post_editor_controller.dart';
|
||||||
import 'package:solian/controllers/post_list_controller.dart';
|
|
||||||
import 'package:solian/exts.dart';
|
import 'package:solian/exts.dart';
|
||||||
import 'package:solian/models/post.dart';
|
import 'package:solian/models/post.dart';
|
||||||
import 'package:solian/models/realm.dart';
|
import 'package:solian/models/realm.dart';
|
||||||
@ -15,6 +14,7 @@ import 'package:solian/router.dart';
|
|||||||
import 'package:solian/theme.dart';
|
import 'package:solian/theme.dart';
|
||||||
import 'package:solian/widgets/app_bar_leading.dart';
|
import 'package:solian/widgets/app_bar_leading.dart';
|
||||||
import 'package:solian/widgets/app_bar_title.dart';
|
import 'package:solian/widgets/app_bar_title.dart';
|
||||||
|
import 'package:solian/widgets/markdown_text_content.dart';
|
||||||
import 'package:solian/widgets/posts/post_item.dart';
|
import 'package:solian/widgets/posts/post_item.dart';
|
||||||
import 'package:badges/badges.dart' as badges;
|
import 'package:badges/badges.dart' as badges;
|
||||||
|
|
||||||
@ -23,14 +23,12 @@ class PostPublishArguments {
|
|||||||
final Post? reply;
|
final Post? reply;
|
||||||
final Post? repost;
|
final Post? repost;
|
||||||
final Realm? realm;
|
final Realm? realm;
|
||||||
final PostListController? postListController;
|
|
||||||
|
|
||||||
PostPublishArguments({
|
PostPublishArguments({
|
||||||
this.edit,
|
this.edit,
|
||||||
this.reply,
|
this.reply,
|
||||||
this.repost,
|
this.repost,
|
||||||
this.realm,
|
this.realm,
|
||||||
this.postListController,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,7 +37,6 @@ class PostPublishScreen extends StatefulWidget {
|
|||||||
final Post? reply;
|
final Post? reply;
|
||||||
final Post? repost;
|
final Post? repost;
|
||||||
final Realm? realm;
|
final Realm? realm;
|
||||||
final PostListController? postListController;
|
|
||||||
final int mode;
|
final int mode;
|
||||||
|
|
||||||
const PostPublishScreen({
|
const PostPublishScreen({
|
||||||
@ -48,7 +45,6 @@ class PostPublishScreen extends StatefulWidget {
|
|||||||
this.reply,
|
this.reply,
|
||||||
this.repost,
|
this.repost,
|
||||||
this.realm,
|
this.realm,
|
||||||
this.postListController,
|
|
||||||
required this.mode,
|
required this.mode,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -69,7 +65,7 @@ class _PostPublishScreenState extends State<PostPublishScreen> {
|
|||||||
|
|
||||||
final AttachmentUploaderController uploader = Get.find();
|
final AttachmentUploaderController uploader = Get.find();
|
||||||
if (uploader.queueOfUpload.any(
|
if (uploader.queueOfUpload.any(
|
||||||
((x) => x.usage == 'i.attachment' && x.isUploading),
|
((x) => x.isUploading),
|
||||||
)) {
|
)) {
|
||||||
context.showErrorDialog('attachmentUploadInProgress'.tr);
|
context.showErrorDialog('attachmentUploadInProgress'.tr);
|
||||||
return;
|
return;
|
||||||
@ -94,10 +90,8 @@ class _PostPublishScreenState extends State<PostPublishScreen> {
|
|||||||
if (resp.statusCode != 200) {
|
if (resp.statusCode != 200) {
|
||||||
context.showErrorDialog(resp.bodyString);
|
context.showErrorDialog(resp.bodyString);
|
||||||
} else {
|
} else {
|
||||||
|
_editorController.currentClear();
|
||||||
_editorController.localClear();
|
_editorController.localClear();
|
||||||
if (widget.postListController != null) {
|
|
||||||
widget.postListController!.reloadAllOver();
|
|
||||||
}
|
|
||||||
AppRouter.instance.pop(resp.body);
|
AppRouter.instance.pop(resp.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,7 +122,15 @@ class _PostPublishScreenState extends State<PostPublishScreen> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
if (widget.edit == null) _editorController.localRead();
|
if (widget.edit == null && widget.reply == null && widget.repost == null) {
|
||||||
|
_editorController.localRead();
|
||||||
|
}
|
||||||
|
if (widget.reply != null) {
|
||||||
|
_editorController.replyTo.value = widget.reply;
|
||||||
|
}
|
||||||
|
if (widget.repost != null) {
|
||||||
|
_editorController.repostTo.value = widget.repost;
|
||||||
|
}
|
||||||
_editorController.contentController.addListener(() => setState(() {}));
|
_editorController.contentController.addListener(() => setState(() {}));
|
||||||
_syncWidget();
|
_syncWidget();
|
||||||
}
|
}
|
||||||
@ -174,10 +176,19 @@ class _PostPublishScreenState extends State<PostPublishScreen> {
|
|||||||
children: [
|
children: [
|
||||||
ListTile(
|
ListTile(
|
||||||
tileColor: Theme.of(context).colorScheme.surfaceContainerLow,
|
tileColor: Theme.of(context).colorScheme.surfaceContainerLow,
|
||||||
title: Text(
|
title: Row(
|
||||||
_editorController.title ?? 'title'.tr,
|
children: [
|
||||||
maxLines: 1,
|
Text(
|
||||||
overflow: TextOverflow.ellipsis,
|
_editorController.title ?? 'title'.tr,
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
const SizedBox(width: 6),
|
||||||
|
if (_editorController.aliasController.text.isNotEmpty)
|
||||||
|
Badge(
|
||||||
|
label: Text('#${_editorController.aliasController.text}'),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
_editorController.description ?? 'description'.tr,
|
_editorController.description ?? 'description'.tr,
|
||||||
@ -219,10 +230,15 @@ class _PostPublishScreenState extends State<PostPublishScreen> {
|
|||||||
collapsedBackgroundColor:
|
collapsedBackgroundColor:
|
||||||
Theme.of(context).colorScheme.surfaceContainer,
|
Theme.of(context).colorScheme.surfaceContainer,
|
||||||
children: [
|
children: [
|
||||||
PostItem(
|
Container(
|
||||||
item: _replyTo!,
|
constraints: const BoxConstraints(maxHeight: 280),
|
||||||
isReactable: false,
|
child: SingleChildScrollView(
|
||||||
).paddingOnly(bottom: 8),
|
child: PostItem(
|
||||||
|
item: _replyTo!,
|
||||||
|
isReactable: false,
|
||||||
|
).paddingOnly(bottom: 8),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
if (_repostTo != null)
|
if (_repostTo != null)
|
||||||
@ -237,37 +253,127 @@ class _PostPublishScreenState extends State<PostPublishScreen> {
|
|||||||
collapsedBackgroundColor:
|
collapsedBackgroundColor:
|
||||||
Theme.of(context).colorScheme.surfaceContainer,
|
Theme.of(context).colorScheme.surfaceContainer,
|
||||||
children: [
|
children: [
|
||||||
PostItem(
|
|
||||||
item: _repostTo!,
|
|
||||||
isReactable: false,
|
|
||||||
).paddingOnly(bottom: 8),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: ListView(
|
|
||||||
children: [
|
|
||||||
if (_isBusy)
|
|
||||||
const LinearProgressIndicator().animate().scaleX(),
|
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.symmetric(
|
constraints: const BoxConstraints(maxHeight: 280),
|
||||||
horizontal: 16,
|
child: SingleChildScrollView(
|
||||||
vertical: 8,
|
child: PostItem(
|
||||||
),
|
item: _repostTo!,
|
||||||
child: TextField(
|
isReactable: false,
|
||||||
maxLines: null,
|
).paddingOnly(bottom: 8),
|
||||||
autofocus: true,
|
|
||||||
autocorrect: true,
|
|
||||||
keyboardType: TextInputType.multiline,
|
|
||||||
controller: _editorController.contentController,
|
|
||||||
focusNode: _contentFocusNode,
|
|
||||||
decoration: InputDecoration.collapsed(
|
|
||||||
hintText: 'postContentPlaceholder'.tr,
|
|
||||||
),
|
|
||||||
onTapOutside: (_) =>
|
|
||||||
FocusManager.instance.primaryFocus?.unfocus(),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 120)
|
],
|
||||||
|
),
|
||||||
|
if (_isBusy) const LinearProgressIndicator().animate().scaleX(),
|
||||||
|
Expanded(
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: ListView(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 16,
|
||||||
|
vertical: 8,
|
||||||
|
),
|
||||||
|
child: TextField(
|
||||||
|
maxLines: null,
|
||||||
|
autofocus: true,
|
||||||
|
autocorrect: true,
|
||||||
|
keyboardType: TextInputType.multiline,
|
||||||
|
controller:
|
||||||
|
_editorController.contentController,
|
||||||
|
focusNode: _contentFocusNode,
|
||||||
|
decoration: InputDecoration.collapsed(
|
||||||
|
hintText: 'postContentPlaceholder'.tr,
|
||||||
|
),
|
||||||
|
onTapOutside: (_) => FocusManager
|
||||||
|
.instance.primaryFocus
|
||||||
|
?.unfocus(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 120)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Obx(() {
|
||||||
|
final textStyle = TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.onSurface
|
||||||
|
.withOpacity(0.75),
|
||||||
|
);
|
||||||
|
final showFactors = [
|
||||||
|
_editorController.isRestoreFromLocal.value,
|
||||||
|
_editorController.lastSaveTime.value != null,
|
||||||
|
];
|
||||||
|
final doShow = showFactors.any((x) => x);
|
||||||
|
return Container(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
vertical: 4,
|
||||||
|
horizontal: 16,
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
if (showFactors[0])
|
||||||
|
Text('postRestoreFromLocal'.tr,
|
||||||
|
style: textStyle)
|
||||||
|
.paddingOnly(right: 4),
|
||||||
|
if (showFactors[0])
|
||||||
|
InkWell(
|
||||||
|
child: Text('clear'.tr, style: textStyle),
|
||||||
|
onTap: () {
|
||||||
|
_editorController.localClear();
|
||||||
|
_editorController.currentClear();
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
if (showFactors.where((x) => x).length > 1)
|
||||||
|
Text(
|
||||||
|
'·',
|
||||||
|
style: textStyle,
|
||||||
|
).paddingSymmetric(horizontal: 8),
|
||||||
|
if (showFactors[1])
|
||||||
|
Text(
|
||||||
|
'postAutoSaveAt'.trParams({
|
||||||
|
'date': DateFormat('HH:mm:ss').format(
|
||||||
|
_editorController.lastSaveTime.value ??
|
||||||
|
DateTime.now(),
|
||||||
|
)
|
||||||
|
}),
|
||||||
|
style: textStyle,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.animate(
|
||||||
|
key: const Key('post-editor-hint-animation'),
|
||||||
|
target: doShow ? 1 : 0,
|
||||||
|
)
|
||||||
|
.fade(curve: Curves.easeInOut, duration: 300.ms);
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (SolianTheme.isLargeScreen(context))
|
||||||
|
const VerticalDivider(width: 0.3, thickness: 0.3)
|
||||||
|
.paddingSymmetric(
|
||||||
|
horizontal: 16,
|
||||||
|
),
|
||||||
|
if (SolianTheme.isLargeScreen(context))
|
||||||
|
Expanded(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: MarkdownTextContent(
|
||||||
|
content: _editorController.contentController.text,
|
||||||
|
parentId: 'post-editor-preview',
|
||||||
|
).paddingOnly(top: 12, right: 16),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -276,85 +382,39 @@ class _PostPublishScreenState extends State<PostPublishScreen> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Obx(() {
|
const Divider(thickness: 0.3, height: 0.3),
|
||||||
final textStyle = TextStyle(
|
|
||||||
fontSize: 12,
|
|
||||||
color: Theme.of(context)
|
|
||||||
.colorScheme
|
|
||||||
.onSurface
|
|
||||||
.withOpacity(0.75),
|
|
||||||
);
|
|
||||||
final showFactors = [
|
|
||||||
_editorController.isRestoreFromLocal.value,
|
|
||||||
_editorController.lastSaveTime.value != null,
|
|
||||||
];
|
|
||||||
final doShow = showFactors.any((x) => x);
|
|
||||||
return Container(
|
|
||||||
padding: const EdgeInsets.symmetric(
|
|
||||||
vertical: 4,
|
|
||||||
horizontal: 16,
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
if (showFactors[0])
|
|
||||||
Text('postRestoreFromLocal'.tr, style: textStyle)
|
|
||||||
.paddingOnly(right: 4),
|
|
||||||
if (showFactors[0])
|
|
||||||
InkWell(
|
|
||||||
child: Text('clear'.tr, style: textStyle),
|
|
||||||
onTap: () {
|
|
||||||
_editorController.localClear();
|
|
||||||
_editorController.currentClear();
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
if (showFactors.where((x) => x).length > 1)
|
|
||||||
Text(
|
|
||||||
'·',
|
|
||||||
style: textStyle,
|
|
||||||
).paddingSymmetric(horizontal: 8),
|
|
||||||
if (showFactors[1])
|
|
||||||
Text(
|
|
||||||
'postAutoSaveAt'.trParams({
|
|
||||||
'date': DateFormat('HH:mm:ss').format(
|
|
||||||
_editorController.lastSaveTime.value ??
|
|
||||||
DateTime.now(),
|
|
||||||
)
|
|
||||||
}),
|
|
||||||
style: textStyle,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.animate(
|
|
||||||
key: const Key('post-editor-hint-animation'),
|
|
||||||
target: doShow ? 1 : 0,
|
|
||||||
)
|
|
||||||
.fade(curve: Curves.easeInOut, duration: 300.ms);
|
|
||||||
}),
|
|
||||||
if (_editorController.mode.value == 0)
|
|
||||||
Obx(
|
|
||||||
() => TweenAnimationBuilder<double>(
|
|
||||||
tween: Tween(
|
|
||||||
begin: 0,
|
|
||||||
end: _editorController.contentLength.value / 4096,
|
|
||||||
),
|
|
||||||
duration: const Duration(milliseconds: 300),
|
|
||||||
curve: Curves.easeInOut,
|
|
||||||
builder: (context, value, _) => LinearProgressIndicator(
|
|
||||||
minHeight: 2,
|
|
||||||
color: _editorController.contentLength.value > 4096
|
|
||||||
? Colors.red[900]
|
|
||||||
: Theme.of(context).colorScheme.primary,
|
|
||||||
value: value,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 56,
|
height: 56,
|
||||||
child: ListView(
|
child: ListView(
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
children: [
|
children: [
|
||||||
|
if (_editorController.mode.value == 0)
|
||||||
|
Obx(
|
||||||
|
() => TweenAnimationBuilder<double>(
|
||||||
|
tween: Tween(
|
||||||
|
begin: 0,
|
||||||
|
end: _editorController.contentLength.value /
|
||||||
|
4096,
|
||||||
|
),
|
||||||
|
duration: const Duration(milliseconds: 300),
|
||||||
|
curve: Curves.easeInOut,
|
||||||
|
builder: (context, value, _) => SizedBox(
|
||||||
|
width: 20,
|
||||||
|
height: 20,
|
||||||
|
child: CircularProgressIndicator(
|
||||||
|
strokeWidth: 3,
|
||||||
|
backgroundColor: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.secondaryContainer,
|
||||||
|
color: _editorController.contentLength.value >
|
||||||
|
4096
|
||||||
|
? Colors.red[900]
|
||||||
|
: Theme.of(context).colorScheme.primary,
|
||||||
|
value: value,
|
||||||
|
),
|
||||||
|
).paddingAll(10),
|
||||||
|
),
|
||||||
|
).paddingSymmetric(horizontal: 4),
|
||||||
Obx(() {
|
Obx(() {
|
||||||
final isDraft = _editorController.isDraft.value;
|
final isDraft = _editorController.isDraft.value;
|
||||||
return IconButton(
|
return IconButton(
|
||||||
@ -443,6 +503,23 @@ class _PostPublishScreenState extends State<PostPublishScreen> {
|
|||||||
_editorController.editPublishZone(context);
|
_editorController.editPublishZone(context);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
IconButton(
|
||||||
|
icon: Obx(() {
|
||||||
|
return badges.Badge(
|
||||||
|
showBadge:
|
||||||
|
_editorController.thumbnail.value != null,
|
||||||
|
position: badges.BadgePosition.topEnd(
|
||||||
|
top: -4,
|
||||||
|
end: -6,
|
||||||
|
),
|
||||||
|
child: const Icon(Icons.preview),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
onPressed: () {
|
||||||
|
_editorController.editThumbnail(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Obx(() {
|
icon: Obx(() {
|
||||||
return badges.Badge(
|
return badges.Badge(
|
||||||
@ -465,14 +542,15 @@ class _PostPublishScreenState extends State<PostPublishScreen> {
|
|||||||
MarkdownToolbar(
|
MarkdownToolbar(
|
||||||
hideImage: true,
|
hideImage: true,
|
||||||
useIncludedTextField: false,
|
useIncludedTextField: false,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor:
|
||||||
|
Theme.of(context).colorScheme.surface,
|
||||||
iconColor: Theme.of(context).colorScheme.onSurface,
|
iconColor: Theme.of(context).colorScheme.onSurface,
|
||||||
controller: _editorController.contentController,
|
controller: _editorController.contentController,
|
||||||
focusNode: _contentFocusNode,
|
focusNode: _contentFocusNode,
|
||||||
borderRadius:
|
borderRadius:
|
||||||
const BorderRadius.all(Radius.circular(20)),
|
const BorderRadius.all(Radius.circular(20)),
|
||||||
width: 40,
|
width: 40,
|
||||||
).paddingSymmetric(horizontal: 4),
|
).paddingSymmetric(horizontal: 2),
|
||||||
],
|
],
|
||||||
).paddingSymmetric(horizontal: 6, vertical: 8),
|
).paddingSymmetric(horizontal: 6, vertical: 8),
|
||||||
),
|
),
|
||||||
|
@ -171,7 +171,7 @@ class _RealmPostListWidgetState extends State<RealmPostListWidget> {
|
|||||||
|
|
||||||
Response resp;
|
Response resp;
|
||||||
try {
|
try {
|
||||||
resp = await provider.listPost(pageKey, realm: widget.realm.id);
|
resp = await provider.listPost(pageKey, realm: widget.realm.alias);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
_pagingController.error = e;
|
_pagingController.error = e;
|
||||||
return;
|
return;
|
||||||
|
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
import 'package:solian/controllers/chat_events_controller.dart';
|
||||||
import 'package:solian/exts.dart';
|
import 'package:solian/exts.dart';
|
||||||
import 'package:solian/providers/theme_switcher.dart';
|
import 'package:solian/providers/theme_switcher.dart';
|
||||||
import 'package:solian/router.dart';
|
import 'package:solian/router.dart';
|
||||||
@ -93,6 +94,18 @@ class _SettingScreenState extends State<SettingScreen> {
|
|||||||
AppRouter.instance.pushNamed('about');
|
AppRouter.instance.pushNamed('about');
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
TextButton(
|
||||||
|
style: const ButtonStyle(
|
||||||
|
visualDensity: VisualDensity(horizontal: -4, vertical: -4),
|
||||||
|
),
|
||||||
|
child: Text('messageHistoryWipe'.tr),
|
||||||
|
onPressed: () {
|
||||||
|
final chatHistory = ChatEventController();
|
||||||
|
chatHistory.initialize().then((_) async {
|
||||||
|
await chatHistory.database.localEvents.wipeLocalEvents();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
],
|
],
|
||||||
).paddingSymmetric(horizontal: 12, vertical: 8),
|
).paddingSymmetric(horizontal: 12, vertical: 8),
|
||||||
],
|
],
|
||||||
|
@ -5,15 +5,15 @@ abstract class ServiceFinder {
|
|||||||
|
|
||||||
static const String dealerUrl =
|
static const String dealerUrl =
|
||||||
devFlag ? 'http://localhost:8442' : 'https://api.sn.solsynth.dev';
|
devFlag ? 'http://localhost:8442' : 'https://api.sn.solsynth.dev';
|
||||||
static const String passportUrl =
|
static const String capitalUrl =
|
||||||
devFlag ? 'http://localhost:8444' : 'https://id.solsynth.dev';
|
devFlag ? 'http://localhost:8444' : 'https://solsynth.dev';
|
||||||
|
|
||||||
static String buildUrl(String serviceName, String? append) {
|
static String buildUrl(String serviceName, String? append) {
|
||||||
append ??= '';
|
append ??= '';
|
||||||
if (serviceName == 'dealer') {
|
if (serviceName == 'dealer') {
|
||||||
return '$dealerUrl$append';
|
return '$dealerUrl$append';
|
||||||
} else if (serviceName == 'passport') {
|
} else if (serviceName == 'capital') {
|
||||||
return '$passportUrl$append';
|
return '$capitalUrl$append';
|
||||||
}
|
}
|
||||||
return '$dealerUrl/cgi/$serviceName$append';
|
return '$dealerUrl/cgi/$serviceName$append';
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:firebase_analytics/firebase_analytics.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:solian/theme.dart';
|
import 'package:solian/theme.dart';
|
||||||
@ -29,6 +30,15 @@ class RootShell extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final routeName = state.topRoute?.name;
|
final routeName = state.topRoute?.name;
|
||||||
|
|
||||||
|
if (routeName != null) {
|
||||||
|
FirebaseAnalytics.instance.logEvent(
|
||||||
|
name: 'screen_view',
|
||||||
|
parameters: {
|
||||||
|
'firebase_screen': routeName,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
key: rootScaffoldKey,
|
key: rootScaffoldKey,
|
||||||
drawer: SolianTheme.isLargeScreen(context)
|
drawer: SolianTheme.isLargeScreen(context)
|
||||||
|
@ -12,6 +12,8 @@ const i18nEnglish = {
|
|||||||
'draftBox': 'Draft Box',
|
'draftBox': 'Draft Box',
|
||||||
'more': 'More',
|
'more': 'More',
|
||||||
'share': 'Share',
|
'share': 'Share',
|
||||||
|
'shareNoUri': 'Share text content',
|
||||||
|
'alias': 'Alias',
|
||||||
'feed': 'Feed',
|
'feed': 'Feed',
|
||||||
'unlink': 'Unlink',
|
'unlink': 'Unlink',
|
||||||
'feedSearch': 'Search Feed',
|
'feedSearch': 'Search Feed',
|
||||||
@ -118,8 +120,12 @@ const i18nEnglish = {
|
|||||||
'postVisibleUsers': 'Visible users',
|
'postVisibleUsers': 'Visible users',
|
||||||
'postInvisibleUsers': 'Invisible users',
|
'postInvisibleUsers': 'Invisible users',
|
||||||
'postOverview': 'Overview',
|
'postOverview': 'Overview',
|
||||||
|
'postThumbnail': 'Thumbnail',
|
||||||
|
'postThumbnailAttachmentNew': 'Upload thumbnail',
|
||||||
|
'postThumbnailAttachment': 'Attachment serial number',
|
||||||
'postPinned': 'Pinned',
|
'postPinned': 'Pinned',
|
||||||
'postListNews': 'News',
|
'postListNews': 'News',
|
||||||
|
'postListFriends': 'Friends',
|
||||||
'postListShuffle': 'Random',
|
'postListShuffle': 'Random',
|
||||||
'postEditorModeStory': 'Post a post',
|
'postEditorModeStory': 'Post a post',
|
||||||
'postEditorModeArticle': 'Post an article',
|
'postEditorModeArticle': 'Post an article',
|
||||||
@ -333,6 +339,7 @@ const i18nEnglish = {
|
|||||||
'bsEstablishingConn': 'Establishing Connection',
|
'bsEstablishingConn': 'Establishing Connection',
|
||||||
'bsPreparingData': 'Preparing User Data',
|
'bsPreparingData': 'Preparing User Data',
|
||||||
'bsRegisteringPushNotify': 'Enabling Push Notifications',
|
'bsRegisteringPushNotify': 'Enabling Push Notifications',
|
||||||
|
'bsDismissibleErrorHint': 'Click anywhere to ignore this error',
|
||||||
'postShareContent':
|
'postShareContent':
|
||||||
'@content\n\n@username on the Solar Network\nCheck it out: @link',
|
'@content\n\n@username on the Solar Network\nCheck it out: @link',
|
||||||
'postShareSubject': '@username posted a post on the Solar Network',
|
'postShareSubject': '@username posted a post on the Solar Network',
|
||||||
@ -349,7 +356,7 @@ const i18nEnglish = {
|
|||||||
'attachmentSaved': 'Attachment saved to your system album.',
|
'attachmentSaved': 'Attachment saved to your system album.',
|
||||||
'cropImage': 'Crop Image',
|
'cropImage': 'Crop Image',
|
||||||
'stickerUploader': 'Upload sticker',
|
'stickerUploader': 'Upload sticker',
|
||||||
'stickerUploaderAttachmentNew': 'Upload new attachment',
|
'stickerUploaderAttachmentNew': 'Upload sticker',
|
||||||
'stickerUploaderAttachment': 'Attachment serial number',
|
'stickerUploaderAttachment': 'Attachment serial number',
|
||||||
'stickerUploaderPack': 'Sticker pack serial number',
|
'stickerUploaderPack': 'Sticker pack serial number',
|
||||||
'stickerUploaderPackHint':
|
'stickerUploaderPackHint':
|
||||||
@ -360,4 +367,16 @@ const i18nEnglish = {
|
|||||||
'stickerUploaderName': 'Name',
|
'stickerUploaderName': 'Name',
|
||||||
'stickerUploaderNameHint':
|
'stickerUploaderNameHint':
|
||||||
'A human-friendly name given to the user in the sticker selection interface.',
|
'A human-friendly name given to the user in the sticker selection interface.',
|
||||||
|
'readMore': 'Read more',
|
||||||
|
'attachmentUnload': 'Not Loaded',
|
||||||
|
'attachmentUnloadCaption':
|
||||||
|
'In order to save traffic, this attachment is not loaded automatically. Click it to start loading.',
|
||||||
|
'callStatusConnected': 'Connected',
|
||||||
|
'callStatusDisconnected': 'Disconnected',
|
||||||
|
'callStatusConnecting': 'Connecting',
|
||||||
|
'callStatusReconnected': 'Reconnecting',
|
||||||
|
'messageOutOfSync': 'May Out of Sync with Server',
|
||||||
|
'messageOutOfSyncCaption':
|
||||||
|
'Since the App has entered the background, there may be a time difference between the message list and the server. Click to Refresh.',
|
||||||
|
'messageHistoryWipe': 'Wipe local message history',
|
||||||
};
|
};
|
||||||
|
@ -20,6 +20,8 @@ const i18nSimplifiedChinese = {
|
|||||||
'draftBox': '草稿箱',
|
'draftBox': '草稿箱',
|
||||||
'more': '更多',
|
'more': '更多',
|
||||||
'share': '分享',
|
'share': '分享',
|
||||||
|
'shareNoUri': '分享文字内容',
|
||||||
|
'alias': '别名',
|
||||||
'feed': '资讯',
|
'feed': '资讯',
|
||||||
'unlink': '移除链接',
|
'unlink': '移除链接',
|
||||||
'feedSearch': '搜索资讯',
|
'feedSearch': '搜索资讯',
|
||||||
@ -112,6 +114,9 @@ const i18nSimplifiedChinese = {
|
|||||||
'postVisibleUsers': '可见帖子者',
|
'postVisibleUsers': '可见帖子者',
|
||||||
'postInvisibleUsers': '隐藏帖子者',
|
'postInvisibleUsers': '隐藏帖子者',
|
||||||
'postOverview': '帖子概览',
|
'postOverview': '帖子概览',
|
||||||
|
'postThumbnail': '帖子缩略图',
|
||||||
|
'postThumbnailAttachmentNew': '上传附件作为缩略图',
|
||||||
|
'postThumbnailAttachment': '附件序列号',
|
||||||
'postPinned': '已置顶',
|
'postPinned': '已置顶',
|
||||||
'postEditorModeStory': '发个帖子',
|
'postEditorModeStory': '发个帖子',
|
||||||
'postEditorModeArticle': '撰写文章',
|
'postEditorModeArticle': '撰写文章',
|
||||||
@ -120,6 +125,7 @@ const i18nSimplifiedChinese = {
|
|||||||
'articleDetail': '文章详情',
|
'articleDetail': '文章详情',
|
||||||
'draftBoxOpen': '打开草稿箱',
|
'draftBoxOpen': '打开草稿箱',
|
||||||
'postListNews': '新鲜事',
|
'postListNews': '新鲜事',
|
||||||
|
'postListFriends': '好友圈',
|
||||||
'postListShuffle': '打乱看',
|
'postListShuffle': '打乱看',
|
||||||
'postNew': '创建新帖子',
|
'postNew': '创建新帖子',
|
||||||
'postNewInRealmHint': '在领域 @realm 里发表新帖子',
|
'postNewInRealmHint': '在领域 @realm 里发表新帖子',
|
||||||
@ -306,6 +312,7 @@ const i18nSimplifiedChinese = {
|
|||||||
'bsEstablishingConn': '部署连接中',
|
'bsEstablishingConn': '部署连接中',
|
||||||
'bsPreparingData': '正在准备用户资料',
|
'bsPreparingData': '正在准备用户资料',
|
||||||
'bsRegisteringPushNotify': '正在启用推送通知',
|
'bsRegisteringPushNotify': '正在启用推送通知',
|
||||||
|
'bsDismissibleErrorHint': '点击任意地方忽略此错误',
|
||||||
'postShareContent': '@content\n\n@username 在 Solar Network\n原帖地址:@link',
|
'postShareContent': '@content\n\n@username 在 Solar Network\n原帖地址:@link',
|
||||||
'postShareSubject': '@username 在 Solar Network 上发布了一篇帖子',
|
'postShareSubject': '@username 在 Solar Network 上发布了一篇帖子',
|
||||||
'themeColor': '全局主题色',
|
'themeColor': '全局主题色',
|
||||||
@ -320,7 +327,7 @@ const i18nSimplifiedChinese = {
|
|||||||
'attachmentSaved': '附件已保存到系统相册',
|
'attachmentSaved': '附件已保存到系统相册',
|
||||||
'cropImage': '裁剪图片',
|
'cropImage': '裁剪图片',
|
||||||
'stickerUploader': '上传贴图',
|
'stickerUploader': '上传贴图',
|
||||||
'stickerUploaderAttachmentNew': '上传附件',
|
'stickerUploaderAttachmentNew': '上传附件作为贴图',
|
||||||
'stickerUploaderAttachment': '附件序列号',
|
'stickerUploaderAttachment': '附件序列号',
|
||||||
'stickerUploaderPack': '贴图包序号',
|
'stickerUploaderPack': '贴图包序号',
|
||||||
'stickerUploaderPackHint': '没有该序号?请转到我们的创作者平台创建一个贴图包。',
|
'stickerUploaderPackHint': '没有该序号?请转到我们的创作者平台创建一个贴图包。',
|
||||||
@ -328,4 +335,14 @@ const i18nSimplifiedChinese = {
|
|||||||
'stickerUploaderAliasHint': '将会在输入时使用和贴图包前缀组成占位符。',
|
'stickerUploaderAliasHint': '将会在输入时使用和贴图包前缀组成占位符。',
|
||||||
'stickerUploaderName': '贴图名称',
|
'stickerUploaderName': '贴图名称',
|
||||||
'stickerUploaderNameHint': '在贴图选择界面提供给用户的人类友好名称。',
|
'stickerUploaderNameHint': '在贴图选择界面提供给用户的人类友好名称。',
|
||||||
|
'readMore': '阅读更多',
|
||||||
|
'attachmentUnload': '附件未加载',
|
||||||
|
'attachmentUnloadCaption': '为了节省流量,本附件未自动加载,点一下来开始加载。',
|
||||||
|
'callStatusConnected': '已连接',
|
||||||
|
'callStatusDisconnected': '已断开',
|
||||||
|
'callStatusConnecting': '连接中',
|
||||||
|
'callStatusReconnected': '重连中',
|
||||||
|
'messageOutOfSync': '消息可能与服务器脱节',
|
||||||
|
'messageOutOfSyncCaption': '由于 App 进入后台,消息列表可能与服务器存在时差,点击刷新。',
|
||||||
|
'messageHistoryWipe': '清除消息记录',
|
||||||
};
|
};
|
||||||
|
@ -24,7 +24,6 @@ class AccountAvatar extends StatelessWidget {
|
|||||||
if (content is String) {
|
if (content is String) {
|
||||||
direct = content.startsWith('http');
|
direct = content.startsWith('http');
|
||||||
if (!isEmpty) isEmpty = content.isEmpty;
|
if (!isEmpty) isEmpty = content.isEmpty;
|
||||||
if (!isEmpty) isEmpty = content.endsWith('/attachments/0');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final url = direct
|
final url = direct
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:solian/exts.dart';
|
|
||||||
import 'package:solian/models/account.dart';
|
import 'package:solian/models/account.dart';
|
||||||
import 'package:solian/providers/account_status.dart';
|
import 'package:solian/providers/account_status.dart';
|
||||||
import 'package:solian/router.dart';
|
import 'package:solian/router.dart';
|
||||||
@ -18,23 +17,38 @@ class AccountProfilePopup extends StatefulWidget {
|
|||||||
|
|
||||||
class _AccountProfilePopupState extends State<AccountProfilePopup> {
|
class _AccountProfilePopupState extends State<AccountProfilePopup> {
|
||||||
bool _isBusy = true;
|
bool _isBusy = true;
|
||||||
|
dynamic _hasError;
|
||||||
|
|
||||||
Account? _userinfo;
|
Account? _userinfo;
|
||||||
|
|
||||||
void _getUserinfo() async {
|
void _getUserinfo() async {
|
||||||
setState(() => _isBusy = true);
|
setState(() => _isBusy = true);
|
||||||
|
|
||||||
final client = ServiceFinder.configureClient('auth');
|
try {
|
||||||
final resp = await client.get('/users/${widget.name}');
|
final client = ServiceFinder.configureClient('auth');
|
||||||
if (resp.statusCode == 200) {
|
final resp = await client.get('/users/${widget.name}');
|
||||||
_userinfo = Account.fromJson(resp.body);
|
if (resp.statusCode == 200) {
|
||||||
setState(() => _isBusy = false);
|
setState(() {
|
||||||
} else {
|
_userinfo = Account.fromJson(resp.body);
|
||||||
context.showErrorDialog(resp.bodyString);
|
_isBusy = false;
|
||||||
Navigator.pop(context);
|
});
|
||||||
|
} else {
|
||||||
|
setState(() {
|
||||||
|
_hasError = resp.bodyString;
|
||||||
|
_isBusy = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
setState(() {
|
||||||
|
_hasError = e;
|
||||||
|
_isBusy = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Color get _unFocusColor =>
|
||||||
|
Theme.of(context).colorScheme.onSurface.withOpacity(0.75);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
@ -43,13 +57,35 @@ class _AccountProfilePopupState extends State<AccountProfilePopup> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (_isBusy || _userinfo == null) {
|
if (_isBusy) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: MediaQuery.of(context).size.height * 0.75,
|
height: MediaQuery.of(context).size.height * 0.75,
|
||||||
child: const Center(child: CircularProgressIndicator()),
|
child: const Center(child: CircularProgressIndicator()),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_hasError != null) {
|
||||||
|
return SizedBox(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.75,
|
||||||
|
width: double.infinity,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const Icon(Icons.cancel, size: 24),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
Text(
|
||||||
|
_hasError.toString(),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 13,
|
||||||
|
color: _unFocusColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: MediaQuery.of(context).size.height * 0.75,
|
height: MediaQuery.of(context).size.height * 0.75,
|
||||||
child: Column(
|
child: Column(
|
||||||
|
@ -16,10 +16,12 @@ class AttachmentAttrEditorDialog extends StatefulWidget {
|
|||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<AttachmentAttrEditorDialog> createState() => _AttachmentAttrEditorDialogState();
|
State<AttachmentAttrEditorDialog> createState() =>
|
||||||
|
_AttachmentAttrEditorDialogState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AttachmentAttrEditorDialogState extends State<AttachmentAttrEditorDialog> {
|
class _AttachmentAttrEditorDialogState
|
||||||
|
extends State<AttachmentAttrEditorDialog> {
|
||||||
final _altController = TextEditingController();
|
final _altController = TextEditingController();
|
||||||
|
|
||||||
bool _isBusy = false;
|
bool _isBusy = false;
|
||||||
@ -33,11 +35,10 @@ class _AttachmentAttrEditorDialogState extends State<AttachmentAttrEditorDialog>
|
|||||||
final resp = await provider.updateAttachment(
|
final resp = await provider.updateAttachment(
|
||||||
widget.item.id,
|
widget.item.id,
|
||||||
_altController.value.text,
|
_altController.value.text,
|
||||||
widget.item.usage,
|
|
||||||
isMature: _isMature,
|
isMature: _isMature,
|
||||||
);
|
);
|
||||||
|
|
||||||
Get.find<AttachmentProvider>().clearCache(id: widget.item.id);
|
Get.find<AttachmentProvider>().clearCache(id: widget.item.rid);
|
||||||
|
|
||||||
setState(() => _isBusy = false);
|
setState(() => _isBusy = false);
|
||||||
return Attachment.fromJson(resp.body);
|
return Attachment.fromJson(resp.body);
|
||||||
@ -109,7 +110,7 @@ class _AttachmentAttrEditorDialogState extends State<AttachmentAttrEditorDialog>
|
|||||||
TextButton(
|
TextButton(
|
||||||
style: TextButton.styleFrom(
|
style: TextButton.styleFrom(
|
||||||
foregroundColor:
|
foregroundColor:
|
||||||
Theme.of(context).colorScheme.onSurfaceVariant),
|
Theme.of(context).colorScheme.onSurfaceVariant),
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
child: Text('cancel'.tr),
|
child: Text('cancel'.tr),
|
||||||
),
|
),
|
||||||
|
@ -22,19 +22,19 @@ import 'package:solian/widgets/attachments/attachment_attr_editor.dart';
|
|||||||
import 'package:solian/widgets/attachments/attachment_fullscreen.dart';
|
import 'package:solian/widgets/attachments/attachment_fullscreen.dart';
|
||||||
|
|
||||||
class AttachmentEditorPopup extends StatefulWidget {
|
class AttachmentEditorPopup extends StatefulWidget {
|
||||||
final String usage;
|
final String pool;
|
||||||
final bool singleMode;
|
final bool singleMode;
|
||||||
final bool imageOnly;
|
final bool imageOnly;
|
||||||
final bool autoUpload;
|
final bool autoUpload;
|
||||||
final double? imageMaxWidth;
|
final double? imageMaxWidth;
|
||||||
final double? imageMaxHeight;
|
final double? imageMaxHeight;
|
||||||
final List<int>? initialAttachments;
|
final List<String>? initialAttachments;
|
||||||
final void Function(int) onAdd;
|
final void Function(String) onAdd;
|
||||||
final void Function(int) onRemove;
|
final void Function(String) onRemove;
|
||||||
|
|
||||||
const AttachmentEditorPopup({
|
const AttachmentEditorPopup({
|
||||||
super.key,
|
super.key,
|
||||||
required this.usage,
|
required this.pool,
|
||||||
required this.onAdd,
|
required this.onAdd,
|
||||||
required this.onRemove,
|
required this.onRemove,
|
||||||
this.singleMode = false,
|
this.singleMode = false,
|
||||||
@ -73,7 +73,7 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
|
|||||||
|
|
||||||
_enqueueTaskBatch(medias.map((x) {
|
_enqueueTaskBatch(medias.map((x) {
|
||||||
final file = File(x.path);
|
final file = File(x.path);
|
||||||
return AttachmentUploadTask(file: file, usage: widget.usage);
|
return AttachmentUploadTask(file: file, usage: widget.pool);
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
final media = await _imagePicker.pickMedia(
|
final media = await _imagePicker.pickMedia(
|
||||||
@ -83,7 +83,7 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
|
|||||||
if (media == null) return;
|
if (media == null) return;
|
||||||
|
|
||||||
_enqueueTask(
|
_enqueueTask(
|
||||||
AttachmentUploadTask(file: File(media.path), usage: widget.usage),
|
AttachmentUploadTask(file: File(media.path), usage: widget.pool),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -97,7 +97,7 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
|
|||||||
|
|
||||||
final file = File(media.path);
|
final file = File(media.path);
|
||||||
_enqueueTask(
|
_enqueueTask(
|
||||||
AttachmentUploadTask(file: file, usage: widget.usage),
|
AttachmentUploadTask(file: file, usage: widget.pool),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
|
|||||||
List<File> files = result.paths.map((path) => File(path!)).toList();
|
List<File> files = result.paths.map((path) => File(path!)).toList();
|
||||||
|
|
||||||
_enqueueTaskBatch(files.map((x) {
|
_enqueueTaskBatch(files.map((x) {
|
||||||
return AttachmentUploadTask(file: x, usage: widget.usage);
|
return AttachmentUploadTask(file: x, usage: widget.pool);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
|
|||||||
|
|
||||||
final file = File(media.path);
|
final file = File(media.path);
|
||||||
_enqueueTask(
|
_enqueueTask(
|
||||||
AttachmentUploadTask(file: file, usage: widget.usage),
|
AttachmentUploadTask(file: file, usage: widget.pool),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,13 +181,11 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
|
|||||||
WidgetsBinding.instance.addPostFrameCallback((_) => controller.dispose());
|
WidgetsBinding.instance.addPostFrameCallback((_) => controller.dispose());
|
||||||
|
|
||||||
if (input == null || input.isEmpty) return;
|
if (input == null || input.isEmpty) return;
|
||||||
final value = int.tryParse(input);
|
|
||||||
if (value == null) return;
|
|
||||||
|
|
||||||
final AttachmentProvider attach = Get.find();
|
final AttachmentProvider attach = Get.find();
|
||||||
final result = await attach.getMetadata(value);
|
final result = await attach.getMetadata(input);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
widget.onAdd(result.id);
|
widget.onAdd(result.rid);
|
||||||
setState(() => _attachments.add(result));
|
setState(() => _attachments.add(result));
|
||||||
if (widget.singleMode) Navigator.pop(context);
|
if (widget.singleMode) Navigator.pop(context);
|
||||||
}
|
}
|
||||||
@ -202,11 +200,11 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
|
|||||||
_uploadController.uploadAttachmentWithCallback(
|
_uploadController.uploadAttachmentWithCallback(
|
||||||
data,
|
data,
|
||||||
'Pasted Image',
|
'Pasted Image',
|
||||||
widget.usage,
|
widget.pool,
|
||||||
null,
|
null,
|
||||||
(item) {
|
(item) {
|
||||||
if (item == null) return;
|
if (item == null) return;
|
||||||
widget.onAdd(item.id);
|
widget.onAdd(item.rid);
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() => _attachments.add(item));
|
setState(() => _attachments.add(item));
|
||||||
if (widget.singleMode) Navigator.pop(context);
|
if (widget.singleMode) Navigator.pop(context);
|
||||||
@ -385,7 +383,9 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
|
|||||||
icon: const Icon(Icons.warning),
|
icon: const Icon(Icons.warning),
|
||||||
onPressed: () {},
|
onPressed: () {},
|
||||||
),
|
),
|
||||||
if (!element.isCompleted && element.error == null && canBeCrop)
|
if (!element.isCompleted &&
|
||||||
|
element.error == null &&
|
||||||
|
canBeCrop)
|
||||||
Obx(
|
Obx(
|
||||||
() => IconButton(
|
() => IconButton(
|
||||||
color: Colors.teal,
|
color: Colors.teal,
|
||||||
@ -398,7 +398,9 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (!element.isCompleted && !element.isUploading && element.error == null)
|
if (!element.isCompleted &&
|
||||||
|
!element.isUploading &&
|
||||||
|
element.error == null)
|
||||||
Obx(
|
Obx(
|
||||||
() => IconButton(
|
() => IconButton(
|
||||||
color: Colors.green,
|
color: Colors.green,
|
||||||
@ -409,11 +411,11 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
|
|||||||
: () {
|
: () {
|
||||||
_uploadController
|
_uploadController
|
||||||
.performSingleTask(index)
|
.performSingleTask(index)
|
||||||
.then((r) {
|
.then((out) {
|
||||||
if (r == null) return;
|
if (out == null) return;
|
||||||
widget.onAdd(r.id);
|
widget.onAdd(out.rid);
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() => _attachments.add(r));
|
setState(() => _attachments.add(out));
|
||||||
if (widget.singleMode) {
|
if (widget.singleMode) {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
}
|
}
|
||||||
@ -511,7 +513,7 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
|
|||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
_deleteAttachment(element).then((_) {
|
_deleteAttachment(element).then((_) {
|
||||||
widget.onRemove(element.id);
|
widget.onRemove(element.rid);
|
||||||
setState(() => _attachments.removeAt(index));
|
setState(() => _attachments.removeAt(index));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -525,7 +527,7 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
widget.onRemove(element.id);
|
widget.onRemove(element.rid);
|
||||||
setState(() => _attachments.removeAt(index));
|
setState(() => _attachments.removeAt(index));
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -556,7 +558,7 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
|
|||||||
|
|
||||||
void _startUploading() {
|
void _startUploading() {
|
||||||
_uploadController.performUploadQueue(onData: (r) {
|
_uploadController.performUploadQueue(onData: (r) {
|
||||||
widget.onAdd(r.id);
|
widget.onAdd(r.rid);
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() => _attachments.add(r));
|
setState(() => _attachments.add(r));
|
||||||
if (widget.singleMode) Navigator.pop(context);
|
if (widget.singleMode) Navigator.pop(context);
|
||||||
@ -580,7 +582,7 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
|
|||||||
if (_uploadController.isUploading.value) return;
|
if (_uploadController.isUploading.value) return;
|
||||||
_enqueueTaskBatch(detail.files.map((x) {
|
_enqueueTaskBatch(detail.files.map((x) {
|
||||||
final file = File(x.path);
|
final file = File(x.path);
|
||||||
return AttachmentUploadTask(file: file, usage: widget.usage);
|
return AttachmentUploadTask(file: file, usage: widget.pool);
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
child: Column(
|
child: Column(
|
||||||
@ -592,27 +594,40 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Expanded(
|
||||||
'attachmentAdd'.tr,
|
child: Row(
|
||||||
style: Theme.of(context).textTheme.headlineSmall,
|
children: [
|
||||||
),
|
Expanded(
|
||||||
const SizedBox(width: 10),
|
child: Text(
|
||||||
Obx(() {
|
'attachmentAdd'.tr,
|
||||||
if (_uploadController.isUploading.value) {
|
style:
|
||||||
return SizedBox(
|
Theme.of(context).textTheme.headlineSmall,
|
||||||
width: 18,
|
maxLines: 1,
|
||||||
height: 18,
|
overflow: TextOverflow.ellipsis,
|
||||||
child: CircularProgressIndicator(
|
),
|
||||||
strokeWidth: 2.5,
|
|
||||||
value: _uploadController.progressOfUpload.value,
|
|
||||||
),
|
),
|
||||||
);
|
const SizedBox(width: 10),
|
||||||
}
|
Obx(() {
|
||||||
return const SizedBox();
|
if (_uploadController.isUploading.value) {
|
||||||
}),
|
return SizedBox(
|
||||||
|
width: 18,
|
||||||
|
height: 18,
|
||||||
|
child: CircularProgressIndicator(
|
||||||
|
strokeWidth: 2.5,
|
||||||
|
value: _uploadController
|
||||||
|
.progressOfUpload.value,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return const SizedBox();
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(width: 20),
|
||||||
Text('attachmentAutoUpload'.tr),
|
Text('attachmentAutoUpload'.tr),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Switch(
|
Switch(
|
||||||
|
@ -67,10 +67,10 @@ class _AttachmentFullScreenState extends State<AttachmentFullScreen> {
|
|||||||
Future<void> _saveToAlbum() async {
|
Future<void> _saveToAlbum() async {
|
||||||
final url = ServiceFinder.buildUrl(
|
final url = ServiceFinder.buildUrl(
|
||||||
'files',
|
'files',
|
||||||
'/attachments/${widget.item.id}',
|
'/attachments/${widget.item.rid}',
|
||||||
);
|
);
|
||||||
|
|
||||||
if (PlatformInfo.isWeb) {
|
if (PlatformInfo.isWeb || PlatformInfo.isDesktop) {
|
||||||
await launchUrlString(url);
|
await launchUrlString(url);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -258,7 +258,7 @@ class _AttachmentFullScreenState extends State<AttachmentFullScreen> {
|
|||||||
spacing: 6,
|
spacing: 6,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'#${widget.item.id}',
|
'#${widget.item.rid}',
|
||||||
style: metaTextStyle,
|
style: metaTextStyle,
|
||||||
),
|
),
|
||||||
if (widget.item.metadata?['width'] != null &&
|
if (widget.item.metadata?['width'] != null &&
|
||||||
|
@ -1,19 +1,21 @@
|
|||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
import 'package:chewie/chewie.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_animate/flutter_animate.dart';
|
import 'package:flutter_animate/flutter_animate.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:media_kit/media_kit.dart';
|
|
||||||
import 'package:media_kit_video/media_kit_video.dart';
|
|
||||||
import 'package:solian/models/attachment.dart';
|
import 'package:solian/models/attachment.dart';
|
||||||
import 'package:solian/platform.dart';
|
import 'package:solian/platform.dart';
|
||||||
import 'package:solian/services.dart';
|
import 'package:solian/services.dart';
|
||||||
|
import 'package:solian/widgets/sized_container.dart';
|
||||||
import 'package:url_launcher/url_launcher_string.dart';
|
import 'package:url_launcher/url_launcher_string.dart';
|
||||||
|
import 'package:video_player/video_player.dart';
|
||||||
|
|
||||||
class AttachmentItem extends StatefulWidget {
|
class AttachmentItem extends StatefulWidget {
|
||||||
final String parentId;
|
final String parentId;
|
||||||
final Attachment item;
|
final Attachment item;
|
||||||
final bool showBadge;
|
final bool showBadge;
|
||||||
final bool showHideButton;
|
final bool showHideButton;
|
||||||
|
final bool autoload;
|
||||||
final BoxFit fit;
|
final BoxFit fit;
|
||||||
final String? badge;
|
final String? badge;
|
||||||
final Function? onHide;
|
final Function? onHide;
|
||||||
@ -26,6 +28,7 @@ class AttachmentItem extends StatefulWidget {
|
|||||||
this.fit = BoxFit.cover,
|
this.fit = BoxFit.cover,
|
||||||
this.showBadge = true,
|
this.showBadge = true,
|
||||||
this.showHideButton = true,
|
this.showHideButton = true,
|
||||||
|
this.autoload = false,
|
||||||
this.onHide,
|
this.onHide,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -48,7 +51,10 @@ class _AttachmentItemState extends State<AttachmentItem> {
|
|||||||
onHide: widget.onHide,
|
onHide: widget.onHide,
|
||||||
);
|
);
|
||||||
case 'video':
|
case 'video':
|
||||||
return _AttachmentItemVideo(item: widget.item);
|
return _AttachmentItemVideo(
|
||||||
|
item: widget.item,
|
||||||
|
autoload: widget.autoload,
|
||||||
|
);
|
||||||
default:
|
default:
|
||||||
return Center(
|
return Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -85,7 +91,7 @@ class _AttachmentItemState extends State<AttachmentItem> {
|
|||||||
launchUrlString(
|
launchUrlString(
|
||||||
ServiceFinder.buildUrl(
|
ServiceFinder.buildUrl(
|
||||||
'files',
|
'files',
|
||||||
'/attachments/${widget.item.id}',
|
'/attachments/${widget.item.rid}',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -129,7 +135,7 @@ class _AttachmentItemImage extends StatelessWidget {
|
|||||||
fit: fit,
|
fit: fit,
|
||||||
imageUrl: ServiceFinder.buildUrl(
|
imageUrl: ServiceFinder.buildUrl(
|
||||||
'files',
|
'files',
|
||||||
'/attachments/${item.id}',
|
'/attachments/${item.rid}',
|
||||||
),
|
),
|
||||||
progressIndicatorBuilder: (context, url, downloadProgress) {
|
progressIndicatorBuilder: (context, url, downloadProgress) {
|
||||||
return Center(
|
return Center(
|
||||||
@ -213,41 +219,96 @@ class _AttachmentItemImage extends StatelessWidget {
|
|||||||
|
|
||||||
class _AttachmentItemVideo extends StatefulWidget {
|
class _AttachmentItemVideo extends StatefulWidget {
|
||||||
final Attachment item;
|
final Attachment item;
|
||||||
|
final bool autoload;
|
||||||
|
|
||||||
const _AttachmentItemVideo({required this.item});
|
const _AttachmentItemVideo({
|
||||||
|
required this.item,
|
||||||
|
this.autoload = false,
|
||||||
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<_AttachmentItemVideo> createState() => _AttachmentItemVideoState();
|
State<_AttachmentItemVideo> createState() => _AttachmentItemVideoState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AttachmentItemVideoState extends State<_AttachmentItemVideo> {
|
class _AttachmentItemVideoState extends State<_AttachmentItemVideo> {
|
||||||
late final _player = Player(
|
VideoPlayerController? _playerController;
|
||||||
configuration: const PlayerConfiguration(logLevel: MPVLogLevel.error),
|
ChewieController? _chewieController;
|
||||||
);
|
|
||||||
late final _controller = VideoController(_player);
|
bool _showContent = false;
|
||||||
|
|
||||||
|
Future<void> _startLoad() async {
|
||||||
|
final ratio = widget.item.metadata?['ratio'] ?? 16 / 9;
|
||||||
|
_playerController = VideoPlayerController.networkUrl(
|
||||||
|
Uri.parse(
|
||||||
|
ServiceFinder.buildUrl('files', '/attachments/${widget.item.rid}'),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
_playerController!.initialize();
|
||||||
|
_chewieController = ChewieController(
|
||||||
|
aspectRatio: ratio,
|
||||||
|
videoPlayerController: _playerController!,
|
||||||
|
);
|
||||||
|
setState(() => _showContent = true);
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_player.open(
|
if (widget.autoload) {
|
||||||
Media(
|
_startLoad();
|
||||||
ServiceFinder.buildUrl('files', '/attachments/${widget.item.id}'),
|
}
|
||||||
),
|
|
||||||
play: false,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Video(
|
|
||||||
aspectRatio: widget.item.metadata?['ratio'] ?? 16 / 9,
|
|
||||||
controller: _controller,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_player.dispose();
|
_playerController?.dispose();
|
||||||
|
_chewieController?.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final ratio = widget.item.metadata?['ratio'] ?? 16 / 9;
|
||||||
|
if (!_showContent || _chewieController == null) {
|
||||||
|
return GestureDetector(
|
||||||
|
child: AspectRatio(
|
||||||
|
aspectRatio: ratio,
|
||||||
|
child: CenteredContainer(
|
||||||
|
maxWidth: 280,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const Icon(
|
||||||
|
Icons.not_started,
|
||||||
|
color: Colors.white,
|
||||||
|
size: 32,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
Text(
|
||||||
|
'attachmentUnload'.tr,
|
||||||
|
style: const TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'attachmentUnloadCaption'.tr,
|
||||||
|
style: const TextStyle(color: Colors.white),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
_startLoad();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Chewie(
|
||||||
|
controller: _chewieController!,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,19 +3,21 @@ import 'dart:ui';
|
|||||||
|
|
||||||
import 'package:carousel_slider/carousel_slider.dart';
|
import 'package:carousel_slider/carousel_slider.dart';
|
||||||
import 'package:dismissible_page/dismissible_page.dart';
|
import 'package:dismissible_page/dismissible_page.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart' hide CarouselController;
|
||||||
import 'package:flutter_animate/flutter_animate.dart';
|
import 'package:flutter_animate/flutter_animate.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:solian/models/attachment.dart';
|
import 'package:solian/models/attachment.dart';
|
||||||
import 'package:solian/widgets/attachments/attachment_item.dart';
|
import 'package:solian/widgets/attachments/attachment_item.dart';
|
||||||
import 'package:solian/providers/content/attachment.dart';
|
import 'package:solian/providers/content/attachment.dart';
|
||||||
import 'package:solian/widgets/attachments/attachment_fullscreen.dart';
|
import 'package:solian/widgets/attachments/attachment_fullscreen.dart';
|
||||||
|
import 'package:solian/widgets/sized_container.dart';
|
||||||
|
|
||||||
class AttachmentList extends StatefulWidget {
|
class AttachmentList extends StatefulWidget {
|
||||||
final String parentId;
|
final String parentId;
|
||||||
final List<int> attachmentsId;
|
final List<String> attachmentsId;
|
||||||
final bool isGrid;
|
final bool isGrid;
|
||||||
final bool isForceGrid;
|
final bool isForceGrid;
|
||||||
|
final bool autoload;
|
||||||
final double flatMaxHeight;
|
final double flatMaxHeight;
|
||||||
|
|
||||||
final double? width;
|
final double? width;
|
||||||
@ -27,6 +29,7 @@ class AttachmentList extends StatefulWidget {
|
|||||||
required this.attachmentsId,
|
required this.attachmentsId,
|
||||||
this.isGrid = false,
|
this.isGrid = false,
|
||||||
this.isForceGrid = false,
|
this.isForceGrid = false,
|
||||||
|
this.autoload = false,
|
||||||
this.flatMaxHeight = 720,
|
this.flatMaxHeight = 720,
|
||||||
this.width,
|
this.width,
|
||||||
this.viewport,
|
this.viewport,
|
||||||
@ -54,10 +57,12 @@ class _AttachmentListState extends State<AttachmentList> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
attach.listMetadata(widget.attachmentsId).then((result) {
|
attach.listMetadata(widget.attachmentsId).then((result) {
|
||||||
setState(() {
|
if (mounted) {
|
||||||
_attachmentsMeta = result;
|
setState(() {
|
||||||
_isLoading = false;
|
_attachmentsMeta = result;
|
||||||
});
|
_isLoading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
_calculateAspectRatio();
|
_calculateAspectRatio();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -67,6 +72,7 @@ class _AttachmentListState extends State<AttachmentList> {
|
|||||||
double? consistentValue;
|
double? consistentValue;
|
||||||
int portrait = 0, square = 0, landscape = 0;
|
int portrait = 0, square = 0, landscape = 0;
|
||||||
for (var entry in _attachmentsMeta) {
|
for (var entry in _attachmentsMeta) {
|
||||||
|
if (entry == null) continue;
|
||||||
if (entry!.metadata?['ratio'] != null) {
|
if (entry!.metadata?['ratio'] != null) {
|
||||||
if (entry.metadata?['ratio'] is int) {
|
if (entry.metadata?['ratio'] is int) {
|
||||||
consistentValue ??= entry.metadata?['ratio'].toDouble();
|
consistentValue ??= entry.metadata?['ratio'].toDouble();
|
||||||
@ -108,6 +114,7 @@ class _AttachmentListState extends State<AttachmentList> {
|
|||||||
showBadge: _attachmentsMeta.length > 1 && !widget.isGrid,
|
showBadge: _attachmentsMeta.length > 1 && !widget.isGrid,
|
||||||
showBorder: widget.attachmentsId.length > 1,
|
showBorder: widget.attachmentsId.length > 1,
|
||||||
showMature: _showMature,
|
showMature: _showMature,
|
||||||
|
autoload: widget.autoload,
|
||||||
onReveal: (value) {
|
onReveal: (value) {
|
||||||
setState(() => _showMature = value);
|
setState(() => _showMature = value);
|
||||||
},
|
},
|
||||||
@ -135,8 +142,9 @@ class _AttachmentListState extends State<AttachmentList> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
final isNotPureImage = _attachmentsMeta
|
final isNotPureImage = _attachmentsMeta.any(
|
||||||
.any((x) => x?.mimetype.split('/').firstOrNull != 'image');
|
(x) => x?.mimetype.split('/').firstOrNull != 'image',
|
||||||
|
);
|
||||||
if (widget.isGrid && (widget.isForceGrid || !isNotPureImage)) {
|
if (widget.isGrid && (widget.isForceGrid || !isNotPureImage)) {
|
||||||
const radius = BorderRadius.all(Radius.circular(8));
|
const radius = BorderRadius.all(Radius.circular(8));
|
||||||
return GridView.builder(
|
return GridView.builder(
|
||||||
@ -154,8 +162,10 @@ class _AttachmentListState extends State<AttachmentList> {
|
|||||||
final element = _attachmentsMeta[idx];
|
final element = _attachmentsMeta[idx];
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border:
|
border: Border.all(
|
||||||
Border.all(color: Theme.of(context).dividerColor, width: 1),
|
color: Theme.of(context).dividerColor,
|
||||||
|
width: 1,
|
||||||
|
),
|
||||||
borderRadius: radius,
|
borderRadius: radius,
|
||||||
),
|
),
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
@ -207,6 +217,7 @@ class AttachmentListEntry extends StatelessWidget {
|
|||||||
final bool showBadge;
|
final bool showBadge;
|
||||||
final bool showMature;
|
final bool showMature;
|
||||||
final bool isDense;
|
final bool isDense;
|
||||||
|
final bool autoload;
|
||||||
final Function(bool) onReveal;
|
final Function(bool) onReveal;
|
||||||
|
|
||||||
const AttachmentListEntry({
|
const AttachmentListEntry({
|
||||||
@ -220,6 +231,7 @@ class AttachmentListEntry extends StatelessWidget {
|
|||||||
this.showBadge = false,
|
this.showBadge = false,
|
||||||
this.showMature = false,
|
this.showMature = false,
|
||||||
this.isDense = false,
|
this.isDense = false,
|
||||||
|
this.autoload = false,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -258,6 +270,7 @@ class AttachmentListEntry extends StatelessWidget {
|
|||||||
item: item!,
|
item: item!,
|
||||||
badge: showBadge ? badgeContent : null,
|
badge: showBadge ? badgeContent : null,
|
||||||
showHideButton: !item!.isMature || showMature,
|
showHideButton: !item!.isMature || showMature,
|
||||||
|
autoload: autoload,
|
||||||
onHide: () {
|
onHide: () {
|
||||||
onReveal(false);
|
onReveal(false);
|
||||||
},
|
},
|
||||||
@ -272,35 +285,33 @@ class AttachmentListEntry extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (item!.isMature && !showMature)
|
if (item!.isMature && !showMature)
|
||||||
Center(
|
CenteredContainer(
|
||||||
child: Container(
|
maxWidth: 280,
|
||||||
constraints: const BoxConstraints(maxWidth: 280),
|
child: Column(
|
||||||
child: Column(
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
children: [
|
||||||
children: [
|
const Icon(
|
||||||
const Icon(
|
Icons.visibility_off,
|
||||||
Icons.visibility_off,
|
color: Colors.white,
|
||||||
color: Colors.white,
|
size: 32,
|
||||||
size: 32,
|
),
|
||||||
|
if (!isDense) const SizedBox(height: 8),
|
||||||
|
if (!isDense)
|
||||||
|
Text(
|
||||||
|
'matureContent'.tr,
|
||||||
|
style: const TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
if (!isDense) const SizedBox(height: 8),
|
if (!isDense)
|
||||||
if (!isDense)
|
Text(
|
||||||
Text(
|
'matureContentCaption'.tr,
|
||||||
'matureContent'.tr,
|
style: const TextStyle(color: Colors.white),
|
||||||
style: const TextStyle(
|
textAlign: TextAlign.center,
|
||||||
color: Colors.white,
|
),
|
||||||
fontWeight: FontWeight.bold,
|
],
|
||||||
fontSize: 16,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (!isDense)
|
|
||||||
Text(
|
|
||||||
'matureContentCaption'.tr,
|
|
||||||
style: const TextStyle(color: Colors.white),
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -322,3 +333,51 @@ class AttachmentListEntry extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class AttachmentSelfContainedEntry extends StatefulWidget {
|
||||||
|
final String rid;
|
||||||
|
final String parentId;
|
||||||
|
final bool isDense;
|
||||||
|
|
||||||
|
const AttachmentSelfContainedEntry({
|
||||||
|
super.key,
|
||||||
|
required this.rid,
|
||||||
|
required this.parentId,
|
||||||
|
this.isDense = false,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<AttachmentSelfContainedEntry> createState() =>
|
||||||
|
_AttachmentSelfContainedEntryState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AttachmentSelfContainedEntryState
|
||||||
|
extends State<AttachmentSelfContainedEntry> {
|
||||||
|
bool _showMature = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final AttachmentProvider attachments = Get.find();
|
||||||
|
|
||||||
|
return FutureBuilder(
|
||||||
|
future: attachments.getMetadata(widget.rid),
|
||||||
|
builder: (context, snapshot) {
|
||||||
|
if (!snapshot.hasData) {
|
||||||
|
return const Center(
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return AttachmentListEntry(
|
||||||
|
item: snapshot.data,
|
||||||
|
isDense: widget.isDense,
|
||||||
|
parentId: widget.parentId,
|
||||||
|
showMature: _showMature,
|
||||||
|
onReveal: (value) {
|
||||||
|
setState(() => _showMature = value);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -159,8 +159,9 @@ class _ControlsWidgetState extends State<ControlsWidget> {
|
|||||||
}
|
}
|
||||||
var track = await LocalVideoTrack.createScreenShareTrack(
|
var track = await LocalVideoTrack.createScreenShareTrack(
|
||||||
ScreenShareCaptureOptions(
|
ScreenShareCaptureOptions(
|
||||||
|
captureScreenAudio: true,
|
||||||
sourceId: source.id,
|
sourceId: source.id,
|
||||||
maxFrameRate: 15.0,
|
maxFrameRate: 30.0,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
await _participant.publishVideoTrack(track);
|
await _participant.publishVideoTrack(track);
|
||||||
@ -174,6 +175,7 @@ class _ControlsWidgetState extends State<ControlsWidget> {
|
|||||||
var track = await LocalVideoTrack.createScreenShareTrack(
|
var track = await LocalVideoTrack.createScreenShareTrack(
|
||||||
const ScreenShareCaptureOptions(
|
const ScreenShareCaptureOptions(
|
||||||
useiOSBroadcastExtension: true,
|
useiOSBroadcastExtension: true,
|
||||||
|
captureScreenAudio: true,
|
||||||
maxFrameRate: 30.0,
|
maxFrameRate: 30.0,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -39,8 +39,8 @@ class ChatEvent extends StatelessWidget {
|
|||||||
|
|
||||||
Widget _buildAttachment(BuildContext context, {bool isMinimal = false}) {
|
Widget _buildAttachment(BuildContext context, {bool isMinimal = false}) {
|
||||||
final attachments = item.body['attachments'] != null
|
final attachments = item.body['attachments'] != null
|
||||||
? List<int>.from(item.body['attachments'].map((x) => x))
|
? List<String>.from(item.body['attachments']?.whereType<String>())
|
||||||
: List<int>.empty();
|
: List<String>.empty();
|
||||||
|
|
||||||
if (attachments.isEmpty) return const SizedBox();
|
if (attachments.isEmpty) return const SizedBox();
|
||||||
|
|
||||||
@ -50,10 +50,10 @@ class ChatEvent extends StatelessWidget {
|
|||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
Icons.attachment,
|
Icons.file_copy,
|
||||||
size: 18,
|
size: 15,
|
||||||
color: unFocusColor,
|
color: unFocusColor,
|
||||||
).paddingOnly(right: 6),
|
).paddingOnly(right: 5),
|
||||||
Text(
|
Text(
|
||||||
'attachmentHint'.trParams(
|
'attachmentHint'.trParams(
|
||||||
{'count': attachments.length.toString()},
|
{'count': attachments.length.toString()},
|
||||||
@ -221,6 +221,8 @@ class ChatEvent extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
_buildContent().paddingOnly(left: 0.5),
|
_buildContent().paddingOnly(left: 0.5),
|
||||||
|
_buildAttachment(context, isMinimal: true)
|
||||||
|
.paddingOnly(left: 0),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -31,7 +31,11 @@ class ChatEventMessageActionLog extends StatelessWidget {
|
|||||||
).paddingOnly(
|
).paddingOnly(
|
||||||
left: isQuote ? 0 : (isMerged ? 64 : 12),
|
left: isQuote ? 0 : (isMerged ? 64 : 12),
|
||||||
top: 2,
|
top: 2,
|
||||||
bottom: isHasMerged ? 2 : 0,
|
bottom: isQuote
|
||||||
|
? 0
|
||||||
|
: isHasMerged
|
||||||
|
? 2
|
||||||
|
: 0,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -23,16 +23,19 @@ class ChatEventMessage extends StatelessWidget {
|
|||||||
final body = EventMessageBody.fromJson(item.body);
|
final body = EventMessageBody.fromJson(item.body);
|
||||||
final hasAttachment = body.attachments?.isNotEmpty ?? false;
|
final hasAttachment = body.attachments?.isNotEmpty ?? false;
|
||||||
|
|
||||||
if (body.text.isEmpty && hasAttachment) {
|
if (body.text.isEmpty &&
|
||||||
|
hasAttachment &&
|
||||||
|
!isContentPreviewing &&
|
||||||
|
!isQuote) {
|
||||||
final unFocusColor =
|
final unFocusColor =
|
||||||
Theme.of(context).colorScheme.onSurface.withOpacity(0.75);
|
Theme.of(context).colorScheme.onSurface.withOpacity(0.75);
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
Icons.attachment,
|
Icons.file_copy,
|
||||||
size: 18,
|
size: 15,
|
||||||
color: unFocusColor,
|
color: unFocusColor,
|
||||||
).paddingOnly(right: 6),
|
).paddingOnly(right: 5),
|
||||||
Text(
|
Text(
|
||||||
'attachmentHint'.trParams(
|
'attachmentHint'.trParams(
|
||||||
{'count': body.attachments?.length.toString() ?? 0.toString()},
|
{'count': body.attachments?.length.toString() ?? 0.toString()},
|
||||||
@ -43,7 +46,11 @@ class ChatEventMessage extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return MarkdownTextContent(content: body.text);
|
return MarkdownTextContent(
|
||||||
|
parentId: 'm${item.id}',
|
||||||
|
isSelectable: true,
|
||||||
|
content: body.text,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildBody(BuildContext context) {
|
Widget _buildBody(BuildContext context) {
|
||||||
@ -63,7 +70,9 @@ class ChatEventMessage extends StatelessWidget {
|
|||||||
left: isQuote ? 0 : 12,
|
left: isQuote ? 0 : 12,
|
||||||
right: isQuote ? 0 : 12,
|
right: isQuote ? 0 : 12,
|
||||||
top: body.quoteEvent == null ? 2 : 0,
|
top: body.quoteEvent == null ? 2 : 0,
|
||||||
bottom: hasAttachment && !isContentPreviewing ? 4 : (isHasMerged ? 2 : 0),
|
bottom: hasAttachment && !isContentPreviewing && !isQuote
|
||||||
|
? 4
|
||||||
|
: (isHasMerged ? 2 : 0),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,36 @@
|
|||||||
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_typeahead/flutter_typeahead.dart';
|
||||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:solian/exts.dart';
|
import 'package:solian/exts.dart';
|
||||||
import 'package:solian/models/account.dart';
|
import 'package:solian/models/account.dart';
|
||||||
import 'package:solian/models/channel.dart';
|
import 'package:solian/models/channel.dart';
|
||||||
import 'package:solian/models/event.dart';
|
import 'package:solian/models/event.dart';
|
||||||
|
import 'package:solian/platform.dart';
|
||||||
import 'package:solian/providers/attachment_uploader.dart';
|
import 'package:solian/providers/attachment_uploader.dart';
|
||||||
import 'package:solian/providers/auth.dart';
|
import 'package:solian/providers/auth.dart';
|
||||||
|
import 'package:solian/providers/stickers.dart';
|
||||||
|
import 'package:solian/widgets/account/account_avatar.dart';
|
||||||
import 'package:solian/widgets/attachments/attachment_editor.dart';
|
import 'package:solian/widgets/attachments/attachment_editor.dart';
|
||||||
import 'package:solian/widgets/chat/chat_event.dart';
|
import 'package:solian/widgets/chat/chat_event.dart';
|
||||||
import 'package:badges/badges.dart' as badges;
|
import 'package:badges/badges.dart' as badges;
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
|
class ChatMessageSuggestion {
|
||||||
|
final String type;
|
||||||
|
final Widget leading;
|
||||||
|
final String display;
|
||||||
|
final String content;
|
||||||
|
|
||||||
|
ChatMessageSuggestion({
|
||||||
|
required this.type,
|
||||||
|
required this.leading,
|
||||||
|
required this.display,
|
||||||
|
required this.content,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
class ChatMessageInput extends StatefulWidget {
|
class ChatMessageInput extends StatefulWidget {
|
||||||
final Event? edit;
|
final Event? edit;
|
||||||
final Event? reply;
|
final Event? reply;
|
||||||
@ -40,7 +59,7 @@ class _ChatMessageInputState extends State<ChatMessageInput> {
|
|||||||
final TextEditingController _textController = TextEditingController();
|
final TextEditingController _textController = TextEditingController();
|
||||||
final FocusNode _focusNode = FocusNode();
|
final FocusNode _focusNode = FocusNode();
|
||||||
|
|
||||||
final List<int> _attachments = List.empty(growable: true);
|
final List<String> _attachments = List.empty(growable: true);
|
||||||
|
|
||||||
Event? _editTo;
|
Event? _editTo;
|
||||||
Event? _replyTo;
|
Event? _replyTo;
|
||||||
@ -49,7 +68,7 @@ class _ChatMessageInputState extends State<ChatMessageInput> {
|
|||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) => AttachmentEditorPopup(
|
builder: (context) => AttachmentEditorPopup(
|
||||||
usage: 'm.attachment',
|
pool: 'messaging',
|
||||||
initialAttachments: _attachments,
|
initialAttachments: _attachments,
|
||||||
onAdd: (value) {
|
onAdd: (value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -84,7 +103,7 @@ class _ChatMessageInputState extends State<ChatMessageInput> {
|
|||||||
|
|
||||||
final AttachmentUploaderController uploader = Get.find();
|
final AttachmentUploaderController uploader = Get.find();
|
||||||
if (uploader.queueOfUpload.any(
|
if (uploader.queueOfUpload.any(
|
||||||
((x) => x.usage == 'm.attachment' && x.isUploading),
|
((x) => x.isUploading),
|
||||||
)) {
|
)) {
|
||||||
context.showErrorDialog('attachmentUploadInProgress'.tr);
|
context.showErrorDialog('attachmentUploadInProgress'.tr);
|
||||||
return;
|
return;
|
||||||
@ -110,12 +129,14 @@ class _ChatMessageInputState extends State<ChatMessageInput> {
|
|||||||
|
|
||||||
client = auth.configureClient('messaging');
|
client = auth.configureClient('messaging');
|
||||||
|
|
||||||
|
if (_textController.text.trim().isEmpty && _attachments.isEmpty) return;
|
||||||
|
|
||||||
const uuid = Uuid();
|
const uuid = Uuid();
|
||||||
final payload = {
|
final payload = {
|
||||||
'uuid': uuid.v4(),
|
'uuid': uuid.v4(),
|
||||||
'type': _editTo == null ? 'messages.new' : 'messages.edit',
|
'type': _editTo == null ? 'messages.new' : 'messages.edit',
|
||||||
'body': {
|
'body': {
|
||||||
'text': _textController.text,
|
'text': _textController.text.trim(),
|
||||||
'algorithm': 'plain',
|
'algorithm': 'plain',
|
||||||
'attachments': List.from(_attachments),
|
'attachments': List.from(_attachments),
|
||||||
'related_users': [
|
'related_users': [
|
||||||
@ -156,7 +177,7 @@ class _ChatMessageInputState extends State<ChatMessageInput> {
|
|||||||
widget.onSent(message);
|
widget.onSent(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
resetInput();
|
_resetInput();
|
||||||
|
|
||||||
if (_editTo != null) {
|
if (_editTo != null) {
|
||||||
resp = await client.put(
|
resp = await client.put(
|
||||||
@ -175,7 +196,7 @@ class _ChatMessageInputState extends State<ChatMessageInput> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void resetInput() {
|
void _resetInput() {
|
||||||
if (widget.onReset != null) widget.onReset!();
|
if (widget.onReset != null) widget.onReset!();
|
||||||
_editTo = null;
|
_editTo = null;
|
||||||
_replyTo = null;
|
_replyTo = null;
|
||||||
@ -184,11 +205,13 @@ class _ChatMessageInputState extends State<ChatMessageInput> {
|
|||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncWidget() {
|
void _syncWidget() {
|
||||||
if (widget.edit != null && widget.edit!.type.startsWith('messages')) {
|
if (widget.edit != null && widget.edit!.type.startsWith('messages')) {
|
||||||
final body = EventMessageBody.fromJson(widget.edit!.body);
|
final body = EventMessageBody.fromJson(widget.edit!.body);
|
||||||
_editTo = widget.edit!;
|
_editTo = widget.edit!;
|
||||||
_textController.text = body.text;
|
_textController.text = body.text;
|
||||||
|
_attachments.addAll(
|
||||||
|
widget.edit!.body['attachments']?.cast<int>() ?? List.empty());
|
||||||
}
|
}
|
||||||
if (widget.reply != null) {
|
if (widget.reply != null) {
|
||||||
_replyTo = widget.reply!;
|
_replyTo = widget.reply!;
|
||||||
@ -197,9 +220,52 @@ class _ChatMessageInputState extends State<ChatMessageInput> {
|
|||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _buildSuggestion(ChatMessageSuggestion suggestion) {
|
||||||
|
return ListTile(
|
||||||
|
leading: suggestion.leading,
|
||||||
|
title: Text(suggestion.display),
|
||||||
|
subtitle: Text(suggestion.content),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _insertSuggestion(ChatMessageSuggestion suggestion) {
|
||||||
|
final replaceText =
|
||||||
|
_textController.text.substring(0, _textController.selection.baseOffset);
|
||||||
|
var startText = '';
|
||||||
|
final afterText = replaceText == _textController.text
|
||||||
|
? ''
|
||||||
|
: _textController.text
|
||||||
|
.substring(_textController.selection.baseOffset + 1);
|
||||||
|
var insertText = '';
|
||||||
|
|
||||||
|
if (suggestion.type == 'emotes') {
|
||||||
|
insertText = suggestion.content;
|
||||||
|
startText = replaceText.replaceFirstMapped(
|
||||||
|
RegExp(r':(?:([-\w]+)~)?([-\w]+)$'),
|
||||||
|
(Match m) => insertText,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (suggestion.type == 'users') {
|
||||||
|
insertText = suggestion.content;
|
||||||
|
startText = replaceText.replaceFirstMapped(
|
||||||
|
RegExp(r'(?:\s|^)@([-\w]+)$'),
|
||||||
|
(Match m) => insertText,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (insertText.isNotEmpty && startText.isNotEmpty) {
|
||||||
|
_textController.text = startText + afterText;
|
||||||
|
_textController.selection = TextSelection(
|
||||||
|
baseOffset: startText.length,
|
||||||
|
extentOffset: startText.length,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didUpdateWidget(covariant ChatMessageInput oldWidget) {
|
void didUpdateWidget(covariant ChatMessageInput oldWidget) {
|
||||||
syncWidget();
|
_syncWidget();
|
||||||
super.didUpdateWidget(oldWidget);
|
super.didUpdateWidget(oldWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,7 +273,7 @@ class _ChatMessageInputState extends State<ChatMessageInput> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final notifyBannerActions = [
|
final notifyBannerActions = [
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: resetInput,
|
onPressed: _resetInput,
|
||||||
child: Text('cancel'.tr),
|
child: Text('cancel'.tr),
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
@ -251,21 +317,101 @@ class _ChatMessageInputState extends State<ChatMessageInput> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TextField(
|
child: TypeAheadField<ChatMessageSuggestion>(
|
||||||
|
direction: VerticalDirection.up,
|
||||||
|
hideOnEmpty: true,
|
||||||
|
hideOnLoading: true,
|
||||||
controller: _textController,
|
controller: _textController,
|
||||||
focusNode: _focusNode,
|
focusNode: _focusNode,
|
||||||
maxLines: null,
|
hideOnSelect: false,
|
||||||
autocorrect: true,
|
debounceDuration: const Duration(milliseconds: 500),
|
||||||
keyboardType: TextInputType.text,
|
onSelected: (value) {
|
||||||
decoration: InputDecoration.collapsed(
|
_insertSuggestion(value);
|
||||||
hintText: widget.placeholder ??
|
},
|
||||||
'messageInputPlaceholder'.trParams(
|
itemBuilder: (context, item) => _buildSuggestion(item),
|
||||||
{'channel': '#${widget.channel.alias}'},
|
builder: (context, controller, focusNode) {
|
||||||
),
|
return TextField(
|
||||||
),
|
controller: _textController,
|
||||||
onSubmitted: (_) => _sendMessage(),
|
focusNode: _focusNode,
|
||||||
onTapOutside: (_) =>
|
maxLines: null,
|
||||||
FocusManager.instance.primaryFocus?.unfocus(),
|
autocorrect: true,
|
||||||
|
keyboardType: TextInputType.text,
|
||||||
|
decoration: InputDecoration.collapsed(
|
||||||
|
hintText: widget.placeholder ??
|
||||||
|
'messageInputPlaceholder'.trParams({
|
||||||
|
'channel': '#${widget.channel.alias}',
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
onSubmitted: (_) => _sendMessage(),
|
||||||
|
onTapOutside: (_) =>
|
||||||
|
FocusManager.instance.primaryFocus?.unfocus(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
suggestionsCallback: (search) async {
|
||||||
|
final searchText = _textController.text
|
||||||
|
.substring(0, _textController.selection.baseOffset);
|
||||||
|
|
||||||
|
final emojiMatch = RegExp(r':(?:([-\w]+)~)?([-\w]+)$')
|
||||||
|
.firstMatch(searchText);
|
||||||
|
if (emojiMatch != null) {
|
||||||
|
final StickerProvider stickers = Get.find();
|
||||||
|
final emoteSearch = emojiMatch[2]!;
|
||||||
|
return stickers.availableStickers
|
||||||
|
.where(
|
||||||
|
(x) => x.textWarpedPlaceholder
|
||||||
|
.toUpperCase()
|
||||||
|
.contains(emoteSearch.toUpperCase()),
|
||||||
|
)
|
||||||
|
.map(
|
||||||
|
(x) => ChatMessageSuggestion(
|
||||||
|
type: 'emotes',
|
||||||
|
leading: PlatformInfo.canCacheImage
|
||||||
|
? CachedNetworkImage(
|
||||||
|
imageUrl: x.imageUrl,
|
||||||
|
width: 28,
|
||||||
|
height: 28,
|
||||||
|
)
|
||||||
|
: Image.network(
|
||||||
|
x.imageUrl,
|
||||||
|
width: 28,
|
||||||
|
height: 28,
|
||||||
|
),
|
||||||
|
display: x.name,
|
||||||
|
content: x.textWarpedPlaceholder,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
final userMatch =
|
||||||
|
RegExp(r'(?:\s|^)@([-\w]+)$').firstMatch(searchText);
|
||||||
|
if (userMatch != null) {
|
||||||
|
final userSearch = userMatch[1]!.toLowerCase();
|
||||||
|
final AuthProvider auth = Get.find();
|
||||||
|
|
||||||
|
final client = auth.configureClient('auth');
|
||||||
|
final resp = await client.get(
|
||||||
|
'/users/search?probe=$userSearch',
|
||||||
|
);
|
||||||
|
|
||||||
|
final List<Account> result = resp.body
|
||||||
|
.map((x) => Account.fromJson(x))
|
||||||
|
.toList()
|
||||||
|
.cast<Account>();
|
||||||
|
return result
|
||||||
|
.map(
|
||||||
|
(x) => ChatMessageSuggestion(
|
||||||
|
type: 'users',
|
||||||
|
leading: AccountAvatar(content: x.avatar),
|
||||||
|
display: x.nick,
|
||||||
|
content: '@${x.name}',
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
|
@ -1,24 +1,33 @@
|
|||||||
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_markdown_selectionarea/flutter_markdown.dart';
|
import 'package:flutter_markdown_selectionarea/flutter_markdown.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:markdown/markdown.dart' as markdown;
|
import 'package:markdown/markdown.dart' as markdown;
|
||||||
import 'package:markdown/markdown.dart';
|
import 'package:markdown/markdown.dart';
|
||||||
|
import 'package:solian/platform.dart';
|
||||||
import 'package:solian/providers/stickers.dart';
|
import 'package:solian/providers/stickers.dart';
|
||||||
|
import 'package:solian/widgets/attachments/attachment_list.dart';
|
||||||
import 'package:url_launcher/url_launcher_string.dart';
|
import 'package:url_launcher/url_launcher_string.dart';
|
||||||
|
|
||||||
import 'account/account_profile_popup.dart';
|
import 'account/account_profile_popup.dart';
|
||||||
|
|
||||||
class MarkdownTextContent extends StatelessWidget {
|
class MarkdownTextContent extends StatelessWidget {
|
||||||
final String content;
|
final String content;
|
||||||
|
final String parentId;
|
||||||
final bool isSelectable;
|
final bool isSelectable;
|
||||||
|
|
||||||
const MarkdownTextContent({
|
const MarkdownTextContent({
|
||||||
super.key,
|
super.key,
|
||||||
required this.content,
|
required this.content,
|
||||||
|
required this.parentId,
|
||||||
this.isSelectable = false,
|
this.isSelectable = false,
|
||||||
});
|
});
|
||||||
|
|
||||||
Widget _buildContent(BuildContext context) {
|
Widget _buildContent(BuildContext context) {
|
||||||
|
final emojiRegex = RegExp(r':([-\w]+):');
|
||||||
|
final emojiMatch = emojiRegex.allMatches(content);
|
||||||
|
final isOnlyEmoji = content.replaceAll(emojiRegex, '').trim().isEmpty;
|
||||||
|
|
||||||
return Markdown(
|
return Markdown(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
@ -42,6 +51,7 @@ class MarkdownTextContent extends StatelessWidget {
|
|||||||
_UserNameCardInlineSyntax(),
|
_UserNameCardInlineSyntax(),
|
||||||
_CustomEmoteInlineSyntax(),
|
_CustomEmoteInlineSyntax(),
|
||||||
markdown.EmojiSyntax(),
|
markdown.EmojiSyntax(),
|
||||||
|
markdown.AutolinkSyntax(),
|
||||||
markdown.AutolinkExtensionSyntax(),
|
markdown.AutolinkExtensionSyntax(),
|
||||||
...markdown.ExtensionSet.gitHubFlavored.inlineSyntaxes
|
...markdown.ExtensionSet.gitHubFlavored.inlineSyntaxes
|
||||||
],
|
],
|
||||||
@ -70,6 +80,78 @@ class MarkdownTextContent extends StatelessWidget {
|
|||||||
mode: LaunchMode.externalApplication,
|
mode: LaunchMode.externalApplication,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
imageBuilder: (uri, title, alt) {
|
||||||
|
var url = uri.toString();
|
||||||
|
double? width, height;
|
||||||
|
BoxFit? fit;
|
||||||
|
if (url.startsWith('solink://')) {
|
||||||
|
final segments = url.replaceFirst('solink://', '').split('/');
|
||||||
|
switch (segments[0]) {
|
||||||
|
case 'stickers':
|
||||||
|
double radius = 8;
|
||||||
|
final StickerProvider sticker = Get.find();
|
||||||
|
url = sticker.aliasImageMapping[segments[1].toUpperCase()]!;
|
||||||
|
if (emojiMatch.length <= 1 && isOnlyEmoji) {
|
||||||
|
width = 128;
|
||||||
|
height = 128;
|
||||||
|
} else if (emojiMatch.length <= 3 && isOnlyEmoji) {
|
||||||
|
width = 32;
|
||||||
|
height = 32;
|
||||||
|
} else {
|
||||||
|
radius = 4;
|
||||||
|
width = 16;
|
||||||
|
height = 16;
|
||||||
|
}
|
||||||
|
fit = BoxFit.contain;
|
||||||
|
return ClipRRect(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(radius)),
|
||||||
|
child: Container(
|
||||||
|
color: Theme.of(context).colorScheme.surfaceContainer,
|
||||||
|
child: PlatformInfo.canCacheImage
|
||||||
|
? CachedNetworkImage(
|
||||||
|
imageUrl: url,
|
||||||
|
width: width,
|
||||||
|
height: height,
|
||||||
|
fit: fit,
|
||||||
|
)
|
||||||
|
: Image.network(
|
||||||
|
url,
|
||||||
|
width: width,
|
||||||
|
height: height,
|
||||||
|
fit: fit,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
).paddingSymmetric(vertical: 4);
|
||||||
|
case 'attachments':
|
||||||
|
const radius = BorderRadius.all(Radius.circular(8));
|
||||||
|
return LimitedBox(
|
||||||
|
maxHeight: MediaQuery.of(context).size.width,
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: radius,
|
||||||
|
child: AttachmentSelfContainedEntry(
|
||||||
|
isDense: true,
|
||||||
|
parentId: parentId,
|
||||||
|
rid: segments[1],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
).paddingSymmetric(vertical: 4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return PlatformInfo.canCacheImage
|
||||||
|
? CachedNetworkImage(
|
||||||
|
imageUrl: url,
|
||||||
|
width: width,
|
||||||
|
height: height,
|
||||||
|
fit: fit,
|
||||||
|
)
|
||||||
|
: Image.network(
|
||||||
|
url,
|
||||||
|
width: width,
|
||||||
|
height: height,
|
||||||
|
fit: fit,
|
||||||
|
);
|
||||||
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,19 +181,19 @@ class _UserNameCardInlineSyntax extends InlineSyntax {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _CustomEmoteInlineSyntax extends InlineSyntax {
|
class _CustomEmoteInlineSyntax extends InlineSyntax {
|
||||||
_CustomEmoteInlineSyntax() : super(r':([a-z0-9_+-]+):');
|
_CustomEmoteInlineSyntax() : super(r':([-\w]+):');
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool onMatch(markdown.InlineParser parser, Match match) {
|
bool onMatch(markdown.InlineParser parser, Match match) {
|
||||||
final StickerProvider sticker = Get.find();
|
final StickerProvider sticker = Get.find();
|
||||||
final alias = match[1]!;
|
final alias = match[1]!.toUpperCase();
|
||||||
if (sticker.aliasImageMapping[alias] == null) {
|
if (sticker.aliasImageMapping[alias] == null) {
|
||||||
parser.advanceBy(1);
|
parser.advanceBy(1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final element = markdown.Element.empty('img');
|
final element = markdown.Element.empty('img');
|
||||||
element.attributes['src'] = sticker.aliasImageMapping[alias]!;
|
element.attributes['src'] = 'solink://stickers/$alias';
|
||||||
parser.addNode(element);
|
parser.addNode(element);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -4,17 +4,17 @@ import 'package:get/utils.dart';
|
|||||||
abstract class AppNavigation {
|
abstract class AppNavigation {
|
||||||
static List<AppNavigationDestination> destinations = [
|
static List<AppNavigationDestination> destinations = [
|
||||||
AppNavigationDestination(
|
AppNavigationDestination(
|
||||||
icon: const Icon(Icons.home),
|
icon: Icons.home,
|
||||||
label: 'home'.tr,
|
label: 'home'.tr,
|
||||||
page: 'home',
|
page: 'home',
|
||||||
),
|
),
|
||||||
AppNavigationDestination(
|
AppNavigationDestination(
|
||||||
icon: const Icon(Icons.workspaces),
|
icon: Icons.workspaces,
|
||||||
label: 'realms'.tr,
|
label: 'realms'.tr,
|
||||||
page: 'realms',
|
page: 'realms',
|
||||||
),
|
),
|
||||||
AppNavigationDestination(
|
AppNavigationDestination(
|
||||||
icon: const Icon(Icons.forum),
|
icon: Icons.forum,
|
||||||
label: 'channelTypeDirect'.tr,
|
label: 'channelTypeDirect'.tr,
|
||||||
page: 'chat',
|
page: 'chat',
|
||||||
),
|
),
|
||||||
@ -25,7 +25,7 @@ abstract class AppNavigation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class AppNavigationDestination {
|
class AppNavigationDestination {
|
||||||
final Widget icon;
|
final IconData icon;
|
||||||
final String label;
|
final String label;
|
||||||
final String page;
|
final String page;
|
||||||
|
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
|
import 'dart:math' as math;
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:solian/models/account_status.dart';
|
import 'package:solian/models/account_status.dart';
|
||||||
import 'package:solian/providers/account_status.dart';
|
import 'package:solian/providers/account_status.dart';
|
||||||
import 'package:solian/providers/auth.dart';
|
import 'package:solian/providers/auth.dart';
|
||||||
import 'package:solian/providers/content/channel.dart';
|
|
||||||
import 'package:solian/providers/relation.dart';
|
import 'package:solian/providers/relation.dart';
|
||||||
import 'package:solian/router.dart';
|
import 'package:solian/router.dart';
|
||||||
import 'package:solian/shells/root_shell.dart';
|
import 'package:solian/shells/root_shell.dart';
|
||||||
import 'package:solian/theme.dart';
|
import 'package:solian/theme.dart';
|
||||||
import 'package:solian/widgets/account/account_avatar.dart';
|
import 'package:solian/widgets/account/account_avatar.dart';
|
||||||
import 'package:solian/widgets/account/account_status_action.dart';
|
import 'package:solian/widgets/account/account_status_action.dart';
|
||||||
import 'package:solian/widgets/channel/channel_list.dart';
|
|
||||||
import 'package:solian/widgets/navigation/app_navigation.dart';
|
import 'package:solian/widgets/navigation/app_navigation.dart';
|
||||||
import 'package:badges/badges.dart' as badges;
|
import 'package:badges/badges.dart' as badges;
|
||||||
|
import 'package:solian/widgets/navigation/app_navigation_regions.dart';
|
||||||
|
|
||||||
class AppNavigationDrawer extends StatefulWidget {
|
class AppNavigationDrawer extends StatefulWidget {
|
||||||
final String? routeName;
|
final String? routeName;
|
||||||
@ -24,12 +25,8 @@ class AppNavigationDrawer extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _AppNavigationDrawerState extends State<AppNavigationDrawer> {
|
class _AppNavigationDrawerState extends State<AppNavigationDrawer> {
|
||||||
int? _selectedIndex = 0;
|
|
||||||
|
|
||||||
AccountStatus? _accountStatus;
|
AccountStatus? _accountStatus;
|
||||||
|
|
||||||
late final ChannelProvider _channels;
|
|
||||||
|
|
||||||
Future<void> _getStatus() async {
|
Future<void> _getStatus() async {
|
||||||
final StatusProvider provider = Get.find();
|
final StatusProvider provider = Get.find();
|
||||||
|
|
||||||
@ -41,201 +38,165 @@ class _AppNavigationDrawerState extends State<AppNavigationDrawer> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void _detectSelectedIndex() {
|
|
||||||
if (widget.routeName == null) return;
|
|
||||||
|
|
||||||
final nameList = AppNavigation.destinations.map((x) => x.page).toList();
|
|
||||||
final idx = nameList.indexOf(widget.routeName!);
|
|
||||||
|
|
||||||
_selectedIndex = idx != -1 ? idx : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
void _closeDrawer() {
|
void _closeDrawer() {
|
||||||
rootScaffoldKey.currentState!.closeDrawer();
|
rootScaffoldKey.currentState!.closeDrawer();
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildSettingButton() {
|
|
||||||
return IconButton(
|
|
||||||
icon: const Icon(Icons.settings),
|
|
||||||
onPressed: () {
|
|
||||||
AppRouter.instance.pushNamed('settings');
|
|
||||||
setState(() => _selectedIndex = null);
|
|
||||||
_closeDrawer();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_channels = Get.find();
|
|
||||||
_detectSelectedIndex();
|
|
||||||
_getStatus();
|
_getStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
void didChangeDependencies() {
|
|
||||||
super.didChangeDependencies();
|
|
||||||
_detectSelectedIndex();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
|
|
||||||
return NavigationDrawer(
|
return Drawer(
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
SolianTheme.isLargeScreen(context) ? Colors.transparent : null,
|
SolianTheme.isLargeScreen(context) ? Colors.transparent : null,
|
||||||
selectedIndex: _selectedIndex,
|
child: SafeArea(
|
||||||
onDestinationSelected: (idx) {
|
bottom: false,
|
||||||
setState(() => _selectedIndex = idx);
|
child: Column(
|
||||||
AppRouter.instance.goNamed(AppNavigation.destinations[idx].page);
|
children: [
|
||||||
_closeDrawer();
|
Obx(() {
|
||||||
},
|
if (auth.isAuthorized.isFalse || auth.userProfile.value == null) {
|
||||||
children: [
|
return ListTile(
|
||||||
Obx(() {
|
contentPadding: const EdgeInsets.symmetric(horizontal: 28),
|
||||||
if (auth.isAuthorized.isFalse || auth.userProfile.value == null) {
|
leading: const Icon(Icons.account_circle),
|
||||||
return ListTile(
|
title: Text('guest'.tr),
|
||||||
contentPadding: const EdgeInsets.symmetric(horizontal: 28),
|
subtitle: Text('unsignedIn'.tr),
|
||||||
leading: const Icon(Icons.account_circle),
|
onTap: () {
|
||||||
title: Text('guest'.tr),
|
AppRouter.instance.goNamed('account');
|
||||||
subtitle: Text('unsignedIn'.tr),
|
_closeDrawer();
|
||||||
trailing: _buildSettingButton(),
|
},
|
||||||
onTap: () {
|
|
||||||
AppRouter.instance.goNamed('account');
|
|
||||||
setState(() => _selectedIndex = null);
|
|
||||||
_closeDrawer();
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ListTile(
|
|
||||||
contentPadding: const EdgeInsets.symmetric(horizontal: 24),
|
|
||||||
title: Text(
|
|
||||||
auth.userProfile.value!['nick'],
|
|
||||||
maxLines: 1,
|
|
||||||
overflow: TextOverflow.fade,
|
|
||||||
),
|
|
||||||
subtitle: Builder(
|
|
||||||
builder: (context) {
|
|
||||||
if (_accountStatus == null) {
|
|
||||||
return Text('loading'.tr);
|
|
||||||
}
|
|
||||||
final info = StatusProvider.determineStatus(
|
|
||||||
_accountStatus!,
|
|
||||||
);
|
);
|
||||||
return Text(
|
}
|
||||||
info.$3,
|
|
||||||
|
return ListTile(
|
||||||
|
contentPadding: const EdgeInsets.only(left: 20, right: 20),
|
||||||
|
title: Text(
|
||||||
|
auth.userProfile.value!['nick'],
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.fade,
|
overflow: TextOverflow.fade,
|
||||||
);
|
),
|
||||||
},
|
subtitle: Builder(
|
||||||
),
|
builder: (context) {
|
||||||
leading: Obx(() {
|
if (_accountStatus == null) {
|
||||||
final statusBadgeColor = _accountStatus != null
|
return Text('loading'.tr);
|
||||||
? StatusProvider.determineStatus(
|
}
|
||||||
|
final info = StatusProvider.determineStatus(
|
||||||
_accountStatus!,
|
_accountStatus!,
|
||||||
).$2
|
);
|
||||||
: Colors.grey;
|
return Text(
|
||||||
|
info.$3,
|
||||||
final RelationshipProvider relations = Get.find();
|
maxLines: 1,
|
||||||
final accountNotifications = relations.friendRequestCount.value;
|
overflow: TextOverflow.fade,
|
||||||
|
);
|
||||||
return badges.Badge(
|
},
|
||||||
badgeContent: Text(
|
|
||||||
accountNotifications.toString(),
|
|
||||||
style: const TextStyle(color: Colors.white),
|
|
||||||
),
|
),
|
||||||
showBadge: accountNotifications > 0,
|
leading: Obx(() {
|
||||||
position: badges.BadgePosition.topEnd(
|
final statusBadgeColor = _accountStatus != null
|
||||||
top: -10,
|
? StatusProvider.determineStatus(
|
||||||
end: -6,
|
_accountStatus!,
|
||||||
),
|
).$2
|
||||||
child: badges.Badge(
|
: Colors.grey;
|
||||||
showBadge: _accountStatus != null,
|
|
||||||
badgeStyle: badges.BadgeStyle(badgeColor: statusBadgeColor),
|
|
||||||
position: badges.BadgePosition.bottomEnd(
|
|
||||||
bottom: 0,
|
|
||||||
end: -2,
|
|
||||||
),
|
|
||||||
child: AccountAvatar(
|
|
||||||
content: auth.userProfile.value!['avatar'],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
trailing: _buildSettingButton(),
|
|
||||||
onTap: () {
|
|
||||||
AppRouter.instance.goNamed('account');
|
|
||||||
setState(() => _selectedIndex = null);
|
|
||||||
_closeDrawer();
|
|
||||||
},
|
|
||||||
onLongPress: () {
|
|
||||||
showModalBottomSheet(
|
|
||||||
useRootNavigator: true,
|
|
||||||
context: context,
|
|
||||||
builder: (context) => AccountStatusAction(
|
|
||||||
currentStatus: _accountStatus!.status,
|
|
||||||
),
|
|
||||||
).then((val) {
|
|
||||||
if (val == true) _getStatus();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}).paddingOnly(top: 8),
|
|
||||||
const Divider(thickness: 0.3, height: 1).paddingOnly(
|
|
||||||
bottom: 12,
|
|
||||||
top: 8,
|
|
||||||
),
|
|
||||||
...AppNavigation.destinations.map(
|
|
||||||
(e) => NavigationDrawerDestination(
|
|
||||||
icon: e.icon,
|
|
||||||
label: Text(e.label),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const Divider(thickness: 0.3, height: 1).paddingOnly(
|
|
||||||
top: 12,
|
|
||||||
),
|
|
||||||
Obx(() {
|
|
||||||
if (auth.isAuthorized.isFalse || auth.userProfile.value == null) {
|
|
||||||
return const SizedBox();
|
|
||||||
}
|
|
||||||
|
|
||||||
final selfId = auth.userProfile.value!['id'];
|
final RelationshipProvider relations = Get.find();
|
||||||
|
final accountNotifications =
|
||||||
|
relations.friendRequestCount.value;
|
||||||
|
|
||||||
return Column(
|
return badges.Badge(
|
||||||
children: [
|
badgeContent: Text(
|
||||||
Theme(
|
accountNotifications.toString(),
|
||||||
data: Theme.of(context)
|
style: const TextStyle(color: Colors.white),
|
||||||
.copyWith(dividerColor: Colors.transparent),
|
),
|
||||||
child: ExpansionTile(
|
showBadge: accountNotifications > 0,
|
||||||
title: Text('channels'.tr),
|
position: badges.BadgePosition.topEnd(
|
||||||
tilePadding: const EdgeInsets.symmetric(horizontal: 24),
|
top: -10,
|
||||||
children: [
|
end: -6,
|
||||||
Obx(
|
),
|
||||||
() => SizedBox(
|
child: badges.Badge(
|
||||||
height: 360,
|
showBadge: _accountStatus != null,
|
||||||
child: RefreshIndicator(
|
badgeStyle:
|
||||||
onRefresh: () => _channels.refreshAvailableChannel(),
|
badges.BadgeStyle(badgeColor: statusBadgeColor),
|
||||||
child: ChannelListWidget(
|
position: badges.BadgePosition.bottomEnd(
|
||||||
channels: _channels.groupChannels,
|
bottom: 0,
|
||||||
selfId: selfId,
|
end: -2,
|
||||||
isDense: true,
|
),
|
||||||
useReplace: true,
|
child: AccountAvatar(
|
||||||
onSelected: (_) {
|
content: auth.userProfile.value!['avatar'],
|
||||||
setState(() => _selectedIndex = null);
|
|
||||||
_closeDrawer();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
);
|
||||||
),
|
}),
|
||||||
|
onTap: () {
|
||||||
|
AppRouter.instance.goNamed('account');
|
||||||
|
_closeDrawer();
|
||||||
|
},
|
||||||
|
onLongPress: () {
|
||||||
|
showModalBottomSheet(
|
||||||
|
useRootNavigator: true,
|
||||||
|
context: context,
|
||||||
|
builder: (context) => AccountStatusAction(
|
||||||
|
currentStatus: _accountStatus!.status,
|
||||||
|
),
|
||||||
|
).then((val) {
|
||||||
|
if (val == true) _getStatus();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}).paddingSymmetric(vertical: 8),
|
||||||
|
const Divider(thickness: 0.3, height: 1),
|
||||||
|
Column(
|
||||||
|
children: AppNavigation.destinations
|
||||||
|
.map(
|
||||||
|
(e) => ListTile(
|
||||||
|
contentPadding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 20,
|
||||||
|
),
|
||||||
|
leading: Icon(e.icon, size: 20).paddingAll(2),
|
||||||
|
title: Text(e.label),
|
||||||
|
enabled: true,
|
||||||
|
onTap: () {
|
||||||
|
AppRouter.instance.goNamed(e.page);
|
||||||
|
_closeDrawer();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.toList(),
|
||||||
|
).paddingSymmetric(vertical: 8),
|
||||||
|
const Divider(thickness: 0.3, height: 1),
|
||||||
|
Expanded(
|
||||||
|
child: AppNavigationRegions(
|
||||||
|
onSelected: (item) {
|
||||||
|
_closeDrawer();
|
||||||
|
},
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
);
|
const Divider(thickness: 0.3, height: 1),
|
||||||
}),
|
Column(
|
||||||
],
|
children: [
|
||||||
|
ListTile(
|
||||||
|
minTileHeight: 0,
|
||||||
|
contentPadding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 20,
|
||||||
|
),
|
||||||
|
leading: const Icon(Icons.settings, size: 20).paddingAll(2),
|
||||||
|
title: Text('settings'.tr),
|
||||||
|
onTap: () {
|
||||||
|
AppRouter.instance.pushNamed('settings');
|
||||||
|
_closeDrawer();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
).paddingOnly(
|
||||||
|
top: 8,
|
||||||
|
bottom: math.max(8, MediaQuery.of(context).padding.bottom),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
89
lib/widgets/navigation/app_navigation_regions.dart
Normal file
89
lib/widgets/navigation/app_navigation_regions.dart
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:solian/models/channel.dart';
|
||||||
|
import 'package:solian/providers/content/channel.dart';
|
||||||
|
import 'package:solian/router.dart';
|
||||||
|
import 'package:collection/collection.dart';
|
||||||
|
|
||||||
|
class AppNavigationRegions extends StatelessWidget {
|
||||||
|
final Function(Channel item) onSelected;
|
||||||
|
|
||||||
|
const AppNavigationRegions({super.key, required this.onSelected});
|
||||||
|
|
||||||
|
void _gotoChannel(Channel item) {
|
||||||
|
AppRouter.instance.pushReplacementNamed(
|
||||||
|
'channelChat',
|
||||||
|
pathParameters: {'alias': item.alias},
|
||||||
|
queryParameters: {
|
||||||
|
if (item.realmId != null) 'realm': item.realm!.alias,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
onSelected(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildEntry(BuildContext context, Channel item) {
|
||||||
|
const padding = EdgeInsets.symmetric(horizontal: 20);
|
||||||
|
|
||||||
|
return ListTile(
|
||||||
|
minTileHeight: 0,
|
||||||
|
leading: const Icon(Icons.tag_outlined),
|
||||||
|
contentPadding: padding,
|
||||||
|
title: Text(item.name),
|
||||||
|
subtitle: Text(
|
||||||
|
item.description,
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
onTap: () => _gotoChannel(item),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final ChannelProvider channels = Get.find();
|
||||||
|
|
||||||
|
return Obx(() {
|
||||||
|
final List<Channel> noRealmGroupChannels = channels.availableChannels
|
||||||
|
.where((x) => x.type == 0 && x.realmId == null)
|
||||||
|
.toList();
|
||||||
|
final List<Channel> hasRealmGroupChannels = channels.availableChannels
|
||||||
|
.where((x) => x.type == 0 && x.realmId != null)
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
return CustomScrollView(
|
||||||
|
slivers: [
|
||||||
|
const SliverPadding(padding: EdgeInsets.only(top: 8)),
|
||||||
|
SliverList.builder(
|
||||||
|
itemCount: noRealmGroupChannels.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
final element = noRealmGroupChannels[index];
|
||||||
|
return _buildEntry(context, element);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
SliverList.list(
|
||||||
|
children: hasRealmGroupChannels
|
||||||
|
.groupListsBy((x) => x.realm)
|
||||||
|
.entries
|
||||||
|
.map((element) {
|
||||||
|
return ExpansionTile(
|
||||||
|
minTileHeight: 0,
|
||||||
|
initiallyExpanded: true,
|
||||||
|
tilePadding: const EdgeInsets.only(left: 20, right: 24),
|
||||||
|
backgroundColor: Theme.of(context).colorScheme.surfaceContainer,
|
||||||
|
collapsedBackgroundColor:
|
||||||
|
Theme.of(context).colorScheme.surfaceContainer,
|
||||||
|
title: Text(element.value.first.realm!.name),
|
||||||
|
leading: const Icon(Icons.workspaces, size: 16)
|
||||||
|
.paddingSymmetric(horizontal: 4),
|
||||||
|
children:
|
||||||
|
element.value.map((x) => _buildEntry(context, x)).toList(),
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
const SliverPadding(padding: EdgeInsets.only(bottom: 8)),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -19,7 +19,7 @@ class PostEditorCategoriesDialog extends StatelessWidget {
|
|||||||
initialTags: controller.tags,
|
initialTags: controller.tags,
|
||||||
hintText: 'postTagsPlaceholder'.tr,
|
hintText: 'postTagsPlaceholder'.tr,
|
||||||
onUpdate: (value) {
|
onUpdate: (value) {
|
||||||
controller.tags.value = value;
|
controller.tags.value = List.from(value, growable: true);
|
||||||
controller.tags.refresh();
|
controller.tags.refresh();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -14,12 +14,25 @@ class PostEditorOverviewDialog extends StatelessWidget {
|
|||||||
content: Column(
|
content: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
|
TextField(
|
||||||
|
autofocus: true,
|
||||||
|
autocorrect: true,
|
||||||
|
controller: controller.aliasController,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
isDense: true,
|
||||||
|
border: const OutlineInputBorder(),
|
||||||
|
hintText: 'alias'.tr,
|
||||||
|
),
|
||||||
|
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
TextField(
|
TextField(
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
autocorrect: true,
|
autocorrect: true,
|
||||||
controller: controller.titleController,
|
controller: controller.titleController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
border: const UnderlineInputBorder(),
|
isDense: true,
|
||||||
|
border: const OutlineInputBorder(),
|
||||||
hintText: 'title'.tr,
|
hintText: 'title'.tr,
|
||||||
),
|
),
|
||||||
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
|
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
|
||||||
@ -33,7 +46,8 @@ class PostEditorOverviewDialog extends StatelessWidget {
|
|||||||
keyboardType: TextInputType.multiline,
|
keyboardType: TextInputType.multiline,
|
||||||
controller: controller.descriptionController,
|
controller: controller.descriptionController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
border: const UnderlineInputBorder(),
|
isDense: true,
|
||||||
|
border: const OutlineInputBorder(),
|
||||||
hintText: 'description'.tr,
|
hintText: 'description'.tr,
|
||||||
),
|
),
|
||||||
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
|
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
|
||||||
|
95
lib/widgets/posts/editor/post_editor_thumbnail.dart
Normal file
95
lib/widgets/posts/editor/post_editor_thumbnail.dart
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:solian/controllers/post_editor_controller.dart';
|
||||||
|
import 'package:solian/widgets/attachments/attachment_editor.dart';
|
||||||
|
|
||||||
|
class PostEditorThumbnailDialog extends StatefulWidget {
|
||||||
|
final PostEditorController controller;
|
||||||
|
|
||||||
|
const PostEditorThumbnailDialog({super.key, required this.controller});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<PostEditorThumbnailDialog> createState() =>
|
||||||
|
_PostEditorThumbnailDialogState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PostEditorThumbnailDialogState extends State<PostEditorThumbnailDialog> {
|
||||||
|
final TextEditingController _attachmentController = TextEditingController();
|
||||||
|
|
||||||
|
void _promptUploadNewAttachment() {
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
builder: (context) => AttachmentEditorPopup(
|
||||||
|
pool: 'interactive',
|
||||||
|
singleMode: true,
|
||||||
|
imageOnly: true,
|
||||||
|
autoUpload: true,
|
||||||
|
onAdd: (value) {
|
||||||
|
setState(() {
|
||||||
|
_attachmentController.text = value.toString();
|
||||||
|
});
|
||||||
|
|
||||||
|
widget.controller.thumbnail.value = value;
|
||||||
|
},
|
||||||
|
initialAttachments: const [],
|
||||||
|
onRemove: (_) {},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
_attachmentController.text =
|
||||||
|
widget.controller.thumbnail.value?.toString() ?? '';
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_attachmentController.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AlertDialog(
|
||||||
|
title: Text('postThumbnail'.tr),
|
||||||
|
content: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
ListTile(
|
||||||
|
title: Text('postThumbnailAttachmentNew'.tr),
|
||||||
|
contentPadding: const EdgeInsets.only(left: 16, right: 13),
|
||||||
|
trailing: const Icon(Icons.chevron_right),
|
||||||
|
shape: const RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
_promptUploadNewAttachment();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
TextField(
|
||||||
|
controller: _attachmentController,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
isDense: true,
|
||||||
|
border: const OutlineInputBorder(),
|
||||||
|
prefixText: '#',
|
||||||
|
labelText: 'postThumbnailAttachment'.tr,
|
||||||
|
),
|
||||||
|
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
widget.controller.thumbnail.value = _attachmentController.text;
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
child: Text('confirm'.tr),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
|
||||||
|
import 'package:firebase_analytics/firebase_analytics.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_animate/flutter_animate.dart';
|
import 'package:flutter_animate/flutter_animate.dart';
|
||||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
@ -7,6 +8,7 @@ import 'package:get/get.dart';
|
|||||||
import 'package:share_plus/share_plus.dart';
|
import 'package:share_plus/share_plus.dart';
|
||||||
import 'package:solian/exts.dart';
|
import 'package:solian/exts.dart';
|
||||||
import 'package:solian/models/post.dart';
|
import 'package:solian/models/post.dart';
|
||||||
|
import 'package:solian/platform.dart';
|
||||||
import 'package:solian/providers/auth.dart';
|
import 'package:solian/providers/auth.dart';
|
||||||
import 'package:solian/router.dart';
|
import 'package:solian/router.dart';
|
||||||
import 'package:solian/screens/posts/post_editor.dart';
|
import 'package:solian/screens/posts/post_editor.dart';
|
||||||
@ -38,19 +40,47 @@ class _PostActionState extends State<PostAction> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _doShare() async {
|
Future<void> _doShare({bool noUri = false}) async {
|
||||||
|
ShareResult result;
|
||||||
|
String id;
|
||||||
final box = context.findRenderObject() as RenderBox?;
|
final box = context.findRenderObject() as RenderBox?;
|
||||||
await Share.share(
|
if (widget.item.alias?.isNotEmpty ?? false) {
|
||||||
'postShareContent'.trParams({
|
id = '${widget.item.areaAlias}/${widget.item.alias}';
|
||||||
'username': widget.item.author.nick,
|
} else {
|
||||||
'content': widget.item.body['content'] ?? 'no content',
|
id = '${widget.item.id}';
|
||||||
'link': 'https://sn.solsynth.dev/posts/view/${widget.item.id}',
|
}
|
||||||
}),
|
if ((PlatformInfo.isAndroid || PlatformInfo.isIOS) && !noUri) {
|
||||||
subject: 'postShareSubject'.trParams({
|
result = await Share.shareUri(
|
||||||
'username': widget.item.author.nick,
|
Uri.parse('https://solsynth.dev/posts/$id'),
|
||||||
}),
|
sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size,
|
||||||
sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size,
|
);
|
||||||
);
|
} else {
|
||||||
|
final extraContent = <String?>[
|
||||||
|
widget.item.body['title'],
|
||||||
|
widget.item.body['description'],
|
||||||
|
].where((x) => x != null && x.isNotEmpty).toList();
|
||||||
|
final isExtraNotEmpty = extraContent.any((x) => x != null);
|
||||||
|
result = await Share.share(
|
||||||
|
'postShareContent'.trParams({
|
||||||
|
'username': widget.item.author.nick,
|
||||||
|
'content':
|
||||||
|
'${extraContent.join('\n')}${isExtraNotEmpty ? '\n\n' : ''}${widget.item.body['content'] ?? 'no content'}',
|
||||||
|
'link': 'https://solsynth.dev/posts/$id',
|
||||||
|
}),
|
||||||
|
subject: 'postShareSubject'.trParams({
|
||||||
|
'username': widget.item.author.nick,
|
||||||
|
}),
|
||||||
|
sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.status != ShareResultStatus.dismissed) {
|
||||||
|
await FirebaseAnalytics.instance.logShare(
|
||||||
|
contentType: 'Post',
|
||||||
|
itemId: widget.item.id.toString(),
|
||||||
|
method: result.raw,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -72,9 +102,27 @@ class _PostActionState extends State<PostAction> {
|
|||||||
'postActionList'.tr,
|
'postActionList'.tr,
|
||||||
style: Theme.of(context).textTheme.headlineSmall,
|
style: Theme.of(context).textTheme.headlineSmall,
|
||||||
),
|
),
|
||||||
Text(
|
Row(
|
||||||
'#${widget.item.id.toString().padLeft(8, '0')}',
|
children: [
|
||||||
style: Theme.of(context).textTheme.bodySmall,
|
Text(
|
||||||
|
'#${widget.item.id.toString().padLeft(8, '0')}',
|
||||||
|
style: Theme.of(context).textTheme.bodySmall,
|
||||||
|
),
|
||||||
|
if (widget.item.alias?.isNotEmpty ?? false)
|
||||||
|
Text(
|
||||||
|
'·',
|
||||||
|
style: Theme.of(context).textTheme.bodySmall,
|
||||||
|
).paddingSymmetric(horizontal: 6),
|
||||||
|
if (widget.item.alias?.isNotEmpty ?? false)
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
'${widget.item.areaAlias}:${widget.item.alias}',
|
||||||
|
style: Theme.of(context).textTheme.bodySmall,
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
).paddingOnly(left: 24, right: 24, top: 32, bottom: 16),
|
).paddingOnly(left: 24, right: 24, top: 32, bottom: 16),
|
||||||
@ -86,6 +134,16 @@ class _PostActionState extends State<PostAction> {
|
|||||||
contentPadding: const EdgeInsets.symmetric(horizontal: 24),
|
contentPadding: const EdgeInsets.symmetric(horizontal: 24),
|
||||||
leading: const Icon(Icons.share),
|
leading: const Icon(Icons.share),
|
||||||
title: Text('share'.tr),
|
title: Text('share'.tr),
|
||||||
|
trailing: PlatformInfo.isIOS || PlatformInfo.isAndroid
|
||||||
|
? IconButton(
|
||||||
|
icon: const Icon(Icons.link_off),
|
||||||
|
tooltip: 'shareNoUri'.tr,
|
||||||
|
onPressed: () async {
|
||||||
|
await _doShare(noUri: true);
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
)
|
||||||
|
: null,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await _doShare();
|
await _doShare();
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
@ -97,13 +155,13 @@ class _PostActionState extends State<PostAction> {
|
|||||||
leading: const FaIcon(FontAwesomeIcons.reply, size: 20),
|
leading: const FaIcon(FontAwesomeIcons.reply, size: 20),
|
||||||
title: Text('reply'.tr),
|
title: Text('reply'.tr),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final value = await AppRouter.instance.pushNamed(
|
Navigator.pop(
|
||||||
'postEditor',
|
context,
|
||||||
extra: PostPublishArguments(reply: widget.item),
|
AppRouter.instance.pushNamed(
|
||||||
|
'postEditor',
|
||||||
|
extra: PostPublishArguments(reply: widget.item),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
if (value != null) {
|
|
||||||
Navigator.pop(context, true);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
if (!widget.noReact)
|
if (!widget.noReact)
|
||||||
@ -112,13 +170,13 @@ class _PostActionState extends State<PostAction> {
|
|||||||
leading: const FaIcon(FontAwesomeIcons.retweet, size: 20),
|
leading: const FaIcon(FontAwesomeIcons.retweet, size: 20),
|
||||||
title: Text('repost'.tr),
|
title: Text('repost'.tr),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final value = await AppRouter.instance.pushNamed(
|
Navigator.pop(
|
||||||
'postEditor',
|
context,
|
||||||
extra: PostPublishArguments(repost: widget.item),
|
AppRouter.instance.pushNamed(
|
||||||
|
'postEditor',
|
||||||
|
extra: PostPublishArguments(repost: widget.item),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
if (value != null) {
|
|
||||||
Navigator.pop(context, true);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
if (_canModifyContent && !widget.noReact)
|
if (_canModifyContent && !widget.noReact)
|
||||||
@ -146,13 +204,13 @@ class _PostActionState extends State<PostAction> {
|
|||||||
leading: const Icon(Icons.edit),
|
leading: const Icon(Icons.edit),
|
||||||
title: Text('edit'.tr),
|
title: Text('edit'.tr),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final value = await AppRouter.instance.pushNamed(
|
Navigator.pop(
|
||||||
'postEditor',
|
context,
|
||||||
extra: PostPublishArguments(edit: widget.item),
|
AppRouter.instance.pushNamed(
|
||||||
|
'postEditor',
|
||||||
|
extra: PostPublishArguments(edit: widget.item),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
if (value != null) {
|
|
||||||
Navigator.pop(context, true);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
if (_canModifyContent)
|
if (_canModifyContent)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import 'package:animations/animations.dart';
|
import 'package:animations/animations.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
import 'package:get/get_utils/get_utils.dart';
|
import 'package:get/get_utils/get_utils.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
@ -22,7 +23,9 @@ class PostItem extends StatefulWidget {
|
|||||||
final bool isReactable;
|
final bool isReactable;
|
||||||
final bool isShowReply;
|
final bool isShowReply;
|
||||||
final bool isShowEmbed;
|
final bool isShowEmbed;
|
||||||
|
final bool isOverrideEmbedClickable;
|
||||||
final bool isFullDate;
|
final bool isFullDate;
|
||||||
|
final bool isFullContent;
|
||||||
final bool isContentSelectable;
|
final bool isContentSelectable;
|
||||||
final String? attachmentParent;
|
final String? attachmentParent;
|
||||||
final Color? backgroundColor;
|
final Color? backgroundColor;
|
||||||
@ -35,7 +38,9 @@ class PostItem extends StatefulWidget {
|
|||||||
this.isReactable = true,
|
this.isReactable = true,
|
||||||
this.isShowReply = true,
|
this.isShowReply = true,
|
||||||
this.isShowEmbed = true,
|
this.isShowEmbed = true,
|
||||||
|
this.isOverrideEmbedClickable = false,
|
||||||
this.isFullDate = false,
|
this.isFullDate = false,
|
||||||
|
this.isFullContent = false,
|
||||||
this.isContentSelectable = false,
|
this.isContentSelectable = false,
|
||||||
this.attachmentParent,
|
this.attachmentParent,
|
||||||
this.backgroundColor,
|
this.backgroundColor,
|
||||||
@ -71,14 +76,33 @@ class _PostItemState extends State<PostItem> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _buildThumbnail() {
|
||||||
|
if (widget.item.body['thumbnail'] == null) return const SizedBox();
|
||||||
|
final border = BorderSide(
|
||||||
|
color: Theme.of(context).dividerColor,
|
||||||
|
width: 0.3,
|
||||||
|
);
|
||||||
|
return Container(
|
||||||
|
decoration: BoxDecoration(border: Border(top: border, bottom: border)),
|
||||||
|
child: AspectRatio(
|
||||||
|
aspectRatio: 16 / 9,
|
||||||
|
child: AttachmentSelfContainedEntry(
|
||||||
|
rid: widget.item.body['thumbnail'],
|
||||||
|
parentId: 'p${item.id}-thumbnail',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Widget _buildHeader() {
|
Widget _buildHeader() {
|
||||||
return Row(
|
return Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
if (widget.isCompact)
|
if (widget.isCompact)
|
||||||
AccountAvatar(
|
AccountAvatar(
|
||||||
content: item.author.avatar.toString(),
|
content: item.author.avatar.toString(),
|
||||||
radius: 10,
|
radius: 10,
|
||||||
).paddingOnly(left: 2),
|
).paddingOnly(left: 2, top: 1),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@ -105,18 +129,26 @@ class _PostItemState extends State<PostItem> {
|
|||||||
item.body['description'],
|
item.body['description'],
|
||||||
style: Theme.of(context).textTheme.bodySmall,
|
style: Theme.of(context).textTheme.bodySmall,
|
||||||
),
|
),
|
||||||
if (item.body['description'] != null ||
|
|
||||||
item.body['title'] != null)
|
|
||||||
const Divider(thickness: 0.3, height: 1).paddingSymmetric(
|
|
||||||
vertical: 8,
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
).paddingOnly(left: widget.isCompact ? 6 : 12),
|
).paddingOnly(left: widget.isCompact ? 6 : 12),
|
||||||
),
|
),
|
||||||
|
if (widget.item.type == 'article')
|
||||||
|
Badge(
|
||||||
|
label: Text('article'.tr),
|
||||||
|
).paddingOnly(top: 3),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _buildHeaderDivider() {
|
||||||
|
if (item.body['description'] != null || item.body['title'] != null) {
|
||||||
|
return const Divider(thickness: 0.3, height: 1).paddingSymmetric(
|
||||||
|
vertical: 8,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return const SizedBox();
|
||||||
|
}
|
||||||
|
|
||||||
Widget _buildFooter() {
|
Widget _buildFooter() {
|
||||||
List<String> labels = List.empty(growable: true);
|
List<String> labels = List.empty(growable: true);
|
||||||
if (widget.item.editedAt != null) {
|
if (widget.item.editedAt != null) {
|
||||||
@ -164,6 +196,7 @@ class _PostItemState extends State<PostItem> {
|
|||||||
|
|
||||||
Widget _buildReply(BuildContext context) {
|
Widget _buildReply(BuildContext context) {
|
||||||
return OpenContainer(
|
return OpenContainer(
|
||||||
|
tappable: widget.isClickable || widget.isOverrideEmbedClickable,
|
||||||
closedBuilder: (_, openContainer) => Column(
|
closedBuilder: (_, openContainer) => Column(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
@ -202,13 +235,15 @@ class _PostItemState extends State<PostItem> {
|
|||||||
),
|
),
|
||||||
closedElevation: 0,
|
closedElevation: 0,
|
||||||
openElevation: 0,
|
openElevation: 0,
|
||||||
closedColor: widget.backgroundColor ?? Theme.of(context).colorScheme.surface,
|
closedColor:
|
||||||
|
widget.backgroundColor ?? Theme.of(context).colorScheme.surface,
|
||||||
openColor: Theme.of(context).colorScheme.surface,
|
openColor: Theme.of(context).colorScheme.surface,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildRepost(BuildContext context) {
|
Widget _buildRepost(BuildContext context) {
|
||||||
return OpenContainer(
|
return OpenContainer(
|
||||||
|
tappable: widget.isClickable || widget.isOverrideEmbedClickable,
|
||||||
closedBuilder: (_, openContainer) => Column(
|
closedBuilder: (_, openContainer) => Column(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
@ -247,15 +282,18 @@ class _PostItemState extends State<PostItem> {
|
|||||||
),
|
),
|
||||||
closedElevation: 0,
|
closedElevation: 0,
|
||||||
openElevation: 0,
|
openElevation: 0,
|
||||||
closedColor: widget.backgroundColor ?? Theme.of(context).colorScheme.surface,
|
closedColor:
|
||||||
|
widget.backgroundColor ?? Theme.of(context).colorScheme.surface,
|
||||||
openColor: Theme.of(context).colorScheme.surface,
|
openColor: Theme.of(context).colorScheme.surface,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double _contentHeight = 0;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final List<int> attachments = item.body['attachments'] is List
|
final List<String> attachments = item.body['attachments'] is List
|
||||||
? item.body['attachments']?.cast<int>()
|
? List.from(item.body['attachments']?.whereType<String>())
|
||||||
: List.empty();
|
: List.empty();
|
||||||
final hasAttachment = attachments.isNotEmpty;
|
final hasAttachment = attachments.isNotEmpty;
|
||||||
|
|
||||||
@ -263,25 +301,63 @@ class _PostItemState extends State<PostItem> {
|
|||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
_buildThumbnail().paddingOnly(bottom: 8),
|
||||||
_buildHeader().paddingSymmetric(horizontal: 12),
|
_buildHeader().paddingSymmetric(horizontal: 12),
|
||||||
MarkdownTextContent(
|
_buildHeaderDivider().paddingSymmetric(horizontal: 12),
|
||||||
content: item.body['content'],
|
Stack(
|
||||||
isSelectable: widget.isContentSelectable,
|
children: [
|
||||||
).paddingOnly(
|
SizedContainer(
|
||||||
left: 16,
|
maxWidth: 640,
|
||||||
right: 12,
|
maxHeight: widget.isFullContent ? double.infinity : 80,
|
||||||
top: 2,
|
child: _MeasureSize(
|
||||||
bottom: hasAttachment ? 4 : 0,
|
onChange: (size) {
|
||||||
|
setState(() => _contentHeight = size.height);
|
||||||
|
},
|
||||||
|
child: MarkdownTextContent(
|
||||||
|
parentId: 'p${item.id}',
|
||||||
|
content: item.body['content'],
|
||||||
|
isSelectable: widget.isContentSelectable,
|
||||||
|
).paddingOnly(
|
||||||
|
left: 16,
|
||||||
|
right: 12,
|
||||||
|
top: 2,
|
||||||
|
bottom: hasAttachment ? 4 : 0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (_contentHeight >= 80 && !widget.isFullContent)
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
child: IgnorePointer(
|
||||||
|
child: Container(
|
||||||
|
height: 80,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
begin: Alignment.bottomCenter,
|
||||||
|
end: Alignment.topCenter,
|
||||||
|
colors: [
|
||||||
|
Theme.of(context).colorScheme.surfaceContainerLow,
|
||||||
|
Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.surface
|
||||||
|
.withOpacity(0),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
_buildFooter().paddingOnly(left: 16),
|
_buildFooter().paddingOnly(left: 16),
|
||||||
if (attachments.isNotEmpty)
|
if (attachments.isNotEmpty)
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
Icons.attachment,
|
Icons.file_copy,
|
||||||
size: 18,
|
size: 15,
|
||||||
color: _unFocusColor,
|
color: _unFocusColor,
|
||||||
).paddingOnly(right: 6),
|
).paddingOnly(right: 5),
|
||||||
Text(
|
Text(
|
||||||
'attachmentHint'.trParams(
|
'attachmentHint'.trParams(
|
||||||
{'count': attachments.length.toString()},
|
{'count': attachments.length.toString()},
|
||||||
@ -295,9 +371,11 @@ class _PostItemState extends State<PostItem> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return OpenContainer(
|
return OpenContainer(
|
||||||
|
tappable: widget.isClickable,
|
||||||
closedBuilder: (_, openContainer) => Column(
|
closedBuilder: (_, openContainer) => Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
_buildThumbnail().paddingOnly(bottom: 4),
|
||||||
Row(
|
Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
@ -320,12 +398,47 @@ class _PostItemState extends State<PostItem> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
_buildHeader(),
|
_buildHeader(),
|
||||||
SizedContainer(
|
_buildHeaderDivider(),
|
||||||
maxWidth: 640,
|
Stack(
|
||||||
child: MarkdownTextContent(
|
children: [
|
||||||
content: item.body['content'],
|
SizedContainer(
|
||||||
isSelectable: widget.isContentSelectable,
|
maxWidth: 640,
|
||||||
).paddingOnly(left: 12, right: 8),
|
maxHeight:
|
||||||
|
widget.isFullContent ? double.infinity : 320,
|
||||||
|
child: _MeasureSize(
|
||||||
|
onChange: (size) {
|
||||||
|
setState(() => _contentHeight = size.height);
|
||||||
|
},
|
||||||
|
child: MarkdownTextContent(
|
||||||
|
parentId: 'p${item.id}-embed',
|
||||||
|
content: item.body['content'],
|
||||||
|
isSelectable: widget.isContentSelectable,
|
||||||
|
).paddingOnly(left: 12, right: 8),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (_contentHeight >= 320 && !widget.isFullContent)
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
child: IgnorePointer(
|
||||||
|
child: Container(
|
||||||
|
height: 320,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
begin: Alignment.bottomCenter,
|
||||||
|
end: Alignment.topCenter,
|
||||||
|
colors: [
|
||||||
|
Theme.of(context).colorScheme.surface,
|
||||||
|
Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.surface
|
||||||
|
.withOpacity(0),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
if (widget.item.replyTo != null && widget.isShowEmbed)
|
if (widget.item.replyTo != null && widget.isShowEmbed)
|
||||||
_buildReply(context).paddingOnly(top: 4),
|
_buildReply(context).paddingOnly(top: 4),
|
||||||
@ -343,11 +456,13 @@ class _PostItemState extends State<PostItem> {
|
|||||||
left: 16,
|
left: 16,
|
||||||
),
|
),
|
||||||
AttachmentList(
|
AttachmentList(
|
||||||
|
flatMaxHeight: MediaQuery.of(context).size.width,
|
||||||
parentId: widget.item.id.toString(),
|
parentId: widget.item.id.toString(),
|
||||||
attachmentsId: attachments,
|
attachmentsId: attachments,
|
||||||
|
autoload: true,
|
||||||
isGrid: attachments.length > 1,
|
isGrid: attachments.length > 1,
|
||||||
),
|
),
|
||||||
if (widget.isShowReply && widget.isReactable)
|
if (widget.isShowReply || widget.isReactable)
|
||||||
PostQuickAction(
|
PostQuickAction(
|
||||||
isShowReply: widget.isShowReply,
|
isShowReply: widget.isShowReply,
|
||||||
isReactable: widget.isReactable,
|
isReactable: widget.isReactable,
|
||||||
@ -377,8 +492,51 @@ class _PostItemState extends State<PostItem> {
|
|||||||
),
|
),
|
||||||
closedElevation: 0,
|
closedElevation: 0,
|
||||||
openElevation: 0,
|
openElevation: 0,
|
||||||
closedColor: widget.backgroundColor ?? Theme.of(context).colorScheme.surface,
|
closedColor:
|
||||||
|
widget.backgroundColor ?? Theme.of(context).colorScheme.surface,
|
||||||
openColor: Theme.of(context).colorScheme.surface,
|
openColor: Theme.of(context).colorScheme.surface,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef _OnWidgetSizeChange = void Function(Size size);
|
||||||
|
|
||||||
|
class _MeasureSizeRenderObject extends RenderProxyBox {
|
||||||
|
Size? oldSize;
|
||||||
|
_OnWidgetSizeChange onChange;
|
||||||
|
|
||||||
|
_MeasureSizeRenderObject(this.onChange);
|
||||||
|
|
||||||
|
@override
|
||||||
|
void performLayout() {
|
||||||
|
super.performLayout();
|
||||||
|
|
||||||
|
Size newSize = child!.size;
|
||||||
|
if (oldSize == newSize) return;
|
||||||
|
|
||||||
|
oldSize = newSize;
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
onChange(newSize);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class _MeasureSize extends SingleChildRenderObjectWidget {
|
||||||
|
final _OnWidgetSizeChange onChange;
|
||||||
|
|
||||||
|
const _MeasureSize({
|
||||||
|
required this.onChange,
|
||||||
|
required Widget super.child,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
RenderObject createRenderObject(BuildContext context) {
|
||||||
|
return _MeasureSizeRenderObject(onChange);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void updateRenderObject(
|
||||||
|
BuildContext context, covariant _MeasureSizeRenderObject renderObject) {
|
||||||
|
renderObject.onChange = onChange;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -85,7 +85,13 @@ class PostListEntryWidget extends StatelessWidget {
|
|||||||
context: context,
|
context: context,
|
||||||
builder: (context) => PostAction(item: item),
|
builder: (context) => PostAction(item: item),
|
||||||
).then((value) {
|
).then((value) {
|
||||||
if (value != null) onUpdate();
|
if (value is Future) {
|
||||||
|
value.then((_) {
|
||||||
|
onUpdate();
|
||||||
|
});
|
||||||
|
} else if (value != null) {
|
||||||
|
onUpdate();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -6,18 +6,21 @@ import 'package:solian/widgets/posts/post_item.dart';
|
|||||||
class PostOwnedListEntry extends StatelessWidget {
|
class PostOwnedListEntry extends StatelessWidget {
|
||||||
final Post item;
|
final Post item;
|
||||||
final Function onTap;
|
final Function onTap;
|
||||||
|
final bool isFullContent;
|
||||||
|
final Color? backgroundColor;
|
||||||
|
|
||||||
const PostOwnedListEntry({
|
const PostOwnedListEntry({
|
||||||
super.key,
|
super.key,
|
||||||
required this.item,
|
required this.item,
|
||||||
required this.onTap,
|
required this.onTap,
|
||||||
|
this.isFullContent = false,
|
||||||
|
this.backgroundColor,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Card(
|
return Card(
|
||||||
child: InkWell(
|
child: GestureDetector(
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
@ -28,6 +31,8 @@ class PostOwnedListEntry extends StatelessWidget {
|
|||||||
isClickable: false,
|
isClickable: false,
|
||||||
isShowReply: false,
|
isShowReply: false,
|
||||||
isReactable: false,
|
isReactable: false,
|
||||||
|
isFullContent: isFullContent,
|
||||||
|
backgroundColor: backgroundColor,
|
||||||
).paddingSymmetric(vertical: 8),
|
).paddingSymmetric(vertical: 8),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -9,6 +9,7 @@ class PostWarpedListWidget extends StatelessWidget {
|
|||||||
final bool isNestedClickable;
|
final bool isNestedClickable;
|
||||||
final bool isPinned;
|
final bool isPinned;
|
||||||
final PagingController<int, Post> controller;
|
final PagingController<int, Post> controller;
|
||||||
|
final Function? onUpdate;
|
||||||
|
|
||||||
const PostWarpedListWidget({
|
const PostWarpedListWidget({
|
||||||
super.key,
|
super.key,
|
||||||
@ -17,6 +18,7 @@ class PostWarpedListWidget extends StatelessWidget {
|
|||||||
this.isClickable = true,
|
this.isClickable = true,
|
||||||
this.isNestedClickable = true,
|
this.isNestedClickable = true,
|
||||||
this.isPinned = true,
|
this.isPinned = true,
|
||||||
|
this.onUpdate,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -35,9 +37,7 @@ class PostWarpedListWidget extends StatelessWidget {
|
|||||||
isNestedClickable: isNestedClickable,
|
isNestedClickable: isNestedClickable,
|
||||||
isClickable: isClickable,
|
isClickable: isClickable,
|
||||||
item: item,
|
item: item,
|
||||||
onUpdate: () {
|
onUpdate: onUpdate ?? () {},
|
||||||
controller.refresh();
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -3,11 +3,13 @@ import 'package:flutter/material.dart';
|
|||||||
class SizedContainer extends StatelessWidget {
|
class SizedContainer extends StatelessWidget {
|
||||||
final Widget child;
|
final Widget child;
|
||||||
final double maxWidth;
|
final double maxWidth;
|
||||||
|
final double maxHeight;
|
||||||
|
|
||||||
const SizedContainer({
|
const SizedContainer({
|
||||||
super.key,
|
super.key,
|
||||||
required this.child,
|
required this.child,
|
||||||
this.maxWidth = 720,
|
this.maxWidth = 720,
|
||||||
|
this.maxHeight = double.infinity,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -15,7 +17,7 @@ class SizedContainer extends StatelessWidget {
|
|||||||
return Align(
|
return Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Container(
|
child: Container(
|
||||||
constraints: BoxConstraints(maxWidth: maxWidth),
|
constraints: BoxConstraints(maxWidth: maxWidth, maxHeight: maxHeight),
|
||||||
child: child,
|
child: child,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -29,7 +29,7 @@ class _StickerUploadDialogState extends State<StickerUploadDialog> {
|
|||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) => AttachmentEditorPopup(
|
builder: (context) => AttachmentEditorPopup(
|
||||||
usage: 'sticker',
|
pool: 'sticker',
|
||||||
singleMode: true,
|
singleMode: true,
|
||||||
imageOnly: true,
|
imageOnly: true,
|
||||||
autoUpload: true,
|
autoUpload: true,
|
||||||
|
@ -11,10 +11,7 @@
|
|||||||
#include <flutter_acrylic/flutter_acrylic_plugin.h>
|
#include <flutter_acrylic/flutter_acrylic_plugin.h>
|
||||||
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
|
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
|
||||||
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
|
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
|
||||||
#include <media_kit_libs_linux/media_kit_libs_linux_plugin.h>
|
|
||||||
#include <media_kit_video/media_kit_video_plugin.h>
|
|
||||||
#include <pasteboard/pasteboard_plugin.h>
|
#include <pasteboard/pasteboard_plugin.h>
|
||||||
#include <sentry_flutter/sentry_flutter_plugin.h>
|
|
||||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||||
|
|
||||||
void fl_register_plugins(FlPluginRegistry* registry) {
|
void fl_register_plugins(FlPluginRegistry* registry) {
|
||||||
@ -33,18 +30,9 @@ void fl_register_plugins(FlPluginRegistry* registry) {
|
|||||||
g_autoptr(FlPluginRegistrar) flutter_webrtc_registrar =
|
g_autoptr(FlPluginRegistrar) flutter_webrtc_registrar =
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterWebRTCPlugin");
|
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterWebRTCPlugin");
|
||||||
flutter_web_r_t_c_plugin_register_with_registrar(flutter_webrtc_registrar);
|
flutter_web_r_t_c_plugin_register_with_registrar(flutter_webrtc_registrar);
|
||||||
g_autoptr(FlPluginRegistrar) media_kit_libs_linux_registrar =
|
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "MediaKitLibsLinuxPlugin");
|
|
||||||
media_kit_libs_linux_plugin_register_with_registrar(media_kit_libs_linux_registrar);
|
|
||||||
g_autoptr(FlPluginRegistrar) media_kit_video_registrar =
|
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "MediaKitVideoPlugin");
|
|
||||||
media_kit_video_plugin_register_with_registrar(media_kit_video_registrar);
|
|
||||||
g_autoptr(FlPluginRegistrar) pasteboard_registrar =
|
g_autoptr(FlPluginRegistrar) pasteboard_registrar =
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "PasteboardPlugin");
|
fl_plugin_registry_get_registrar_for_plugin(registry, "PasteboardPlugin");
|
||||||
pasteboard_plugin_register_with_registrar(pasteboard_registrar);
|
pasteboard_plugin_register_with_registrar(pasteboard_registrar);
|
||||||
g_autoptr(FlPluginRegistrar) sentry_flutter_registrar =
|
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "SentryFlutterPlugin");
|
|
||||||
sentry_flutter_plugin_register_with_registrar(sentry_flutter_registrar);
|
|
||||||
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
|
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
|
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
|
||||||
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
|
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
|
||||||
|
@ -8,15 +8,11 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
|||||||
flutter_acrylic
|
flutter_acrylic
|
||||||
flutter_secure_storage_linux
|
flutter_secure_storage_linux
|
||||||
flutter_webrtc
|
flutter_webrtc
|
||||||
media_kit_libs_linux
|
|
||||||
media_kit_video
|
|
||||||
pasteboard
|
pasteboard
|
||||||
sentry_flutter
|
|
||||||
url_launcher_linux
|
url_launcher_linux
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||||
media_kit_native_event_loop
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(PLUGIN_BUNDLED_LIBRARIES)
|
set(PLUGIN_BUNDLED_LIBRARIES)
|
||||||
|
@ -9,25 +9,24 @@ import connectivity_plus
|
|||||||
import desktop_drop
|
import desktop_drop
|
||||||
import device_info_plus
|
import device_info_plus
|
||||||
import file_selector_macos
|
import file_selector_macos
|
||||||
|
import firebase_analytics
|
||||||
import firebase_core
|
import firebase_core
|
||||||
|
import firebase_crashlytics
|
||||||
import firebase_messaging
|
import firebase_messaging
|
||||||
import flutter_secure_storage_macos
|
import flutter_secure_storage_macos
|
||||||
import flutter_webrtc
|
import flutter_webrtc
|
||||||
import gal
|
import gal
|
||||||
import livekit_client
|
import livekit_client
|
||||||
import macos_window_utils
|
import macos_window_utils
|
||||||
import media_kit_libs_macos_video
|
|
||||||
import media_kit_video
|
|
||||||
import package_info_plus
|
import package_info_plus
|
||||||
import pasteboard
|
import pasteboard
|
||||||
import path_provider_foundation
|
import path_provider_foundation
|
||||||
import protocol_handler_macos
|
import protocol_handler_macos
|
||||||
import screen_brightness_macos
|
|
||||||
import sentry_flutter
|
|
||||||
import share_plus
|
import share_plus
|
||||||
import shared_preferences_foundation
|
import shared_preferences_foundation
|
||||||
import sqflite
|
import sqflite
|
||||||
import url_launcher_macos
|
import url_launcher_macos
|
||||||
|
import video_player_avfoundation
|
||||||
import wakelock_plus
|
import wakelock_plus
|
||||||
|
|
||||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
@ -35,24 +34,23 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
|||||||
DesktopDropPlugin.register(with: registry.registrar(forPlugin: "DesktopDropPlugin"))
|
DesktopDropPlugin.register(with: registry.registrar(forPlugin: "DesktopDropPlugin"))
|
||||||
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
|
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
|
||||||
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
|
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
|
||||||
|
FLTFirebaseAnalyticsPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAnalyticsPlugin"))
|
||||||
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
|
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
|
||||||
|
FLTFirebaseCrashlyticsPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCrashlyticsPlugin"))
|
||||||
FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin"))
|
FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin"))
|
||||||
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
|
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
|
||||||
FlutterWebRTCPlugin.register(with: registry.registrar(forPlugin: "FlutterWebRTCPlugin"))
|
FlutterWebRTCPlugin.register(with: registry.registrar(forPlugin: "FlutterWebRTCPlugin"))
|
||||||
GalPlugin.register(with: registry.registrar(forPlugin: "GalPlugin"))
|
GalPlugin.register(with: registry.registrar(forPlugin: "GalPlugin"))
|
||||||
LiveKitPlugin.register(with: registry.registrar(forPlugin: "LiveKitPlugin"))
|
LiveKitPlugin.register(with: registry.registrar(forPlugin: "LiveKitPlugin"))
|
||||||
MacOSWindowUtilsPlugin.register(with: registry.registrar(forPlugin: "MacOSWindowUtilsPlugin"))
|
MacOSWindowUtilsPlugin.register(with: registry.registrar(forPlugin: "MacOSWindowUtilsPlugin"))
|
||||||
MediaKitLibsMacosVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitLibsMacosVideoPlugin"))
|
|
||||||
MediaKitVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitVideoPlugin"))
|
|
||||||
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
|
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
|
||||||
PasteboardPlugin.register(with: registry.registrar(forPlugin: "PasteboardPlugin"))
|
PasteboardPlugin.register(with: registry.registrar(forPlugin: "PasteboardPlugin"))
|
||||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||||
ProtocolHandlerMacosPlugin.register(with: registry.registrar(forPlugin: "ProtocolHandlerMacosPlugin"))
|
ProtocolHandlerMacosPlugin.register(with: registry.registrar(forPlugin: "ProtocolHandlerMacosPlugin"))
|
||||||
ScreenBrightnessMacosPlugin.register(with: registry.registrar(forPlugin: "ScreenBrightnessMacosPlugin"))
|
|
||||||
SentryFlutterPlugin.register(with: registry.registrar(forPlugin: "SentryFlutterPlugin"))
|
|
||||||
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
|
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
|
||||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||||
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
||||||
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
||||||
|
FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin"))
|
||||||
WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin"))
|
WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin"))
|
||||||
}
|
}
|
||||||
|
@ -8,25 +8,71 @@ PODS:
|
|||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- file_selector_macos (0.0.1):
|
- file_selector_macos (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
- Firebase/Analytics (10.29.0):
|
||||||
|
- Firebase/Core
|
||||||
|
- Firebase/Core (10.29.0):
|
||||||
|
- Firebase/CoreOnly
|
||||||
|
- FirebaseAnalytics (~> 10.29.0)
|
||||||
- Firebase/CoreOnly (10.29.0):
|
- Firebase/CoreOnly (10.29.0):
|
||||||
- FirebaseCore (= 10.29.0)
|
- FirebaseCore (= 10.29.0)
|
||||||
|
- Firebase/Crashlytics (10.29.0):
|
||||||
|
- Firebase/CoreOnly
|
||||||
|
- FirebaseCrashlytics (~> 10.29.0)
|
||||||
- Firebase/Messaging (10.29.0):
|
- Firebase/Messaging (10.29.0):
|
||||||
- Firebase/CoreOnly
|
- Firebase/CoreOnly
|
||||||
- FirebaseMessaging (~> 10.29.0)
|
- FirebaseMessaging (~> 10.29.0)
|
||||||
|
- firebase_analytics (11.2.1):
|
||||||
|
- Firebase/Analytics (= 10.29.0)
|
||||||
|
- firebase_core
|
||||||
|
- FlutterMacOS
|
||||||
- firebase_core (3.3.0):
|
- firebase_core (3.3.0):
|
||||||
- Firebase/CoreOnly (~> 10.29.0)
|
- Firebase/CoreOnly (~> 10.29.0)
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
- firebase_crashlytics (4.0.4):
|
||||||
|
- Firebase/CoreOnly (~> 10.29.0)
|
||||||
|
- Firebase/Crashlytics (~> 10.29.0)
|
||||||
|
- firebase_core
|
||||||
|
- FlutterMacOS
|
||||||
- firebase_messaging (15.0.4):
|
- firebase_messaging (15.0.4):
|
||||||
- Firebase/CoreOnly (~> 10.29.0)
|
- Firebase/CoreOnly (~> 10.29.0)
|
||||||
- Firebase/Messaging (~> 10.29.0)
|
- Firebase/Messaging (~> 10.29.0)
|
||||||
- firebase_core
|
- firebase_core
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
- FirebaseAnalytics (10.29.0):
|
||||||
|
- FirebaseAnalytics/AdIdSupport (= 10.29.0)
|
||||||
|
- FirebaseCore (~> 10.0)
|
||||||
|
- FirebaseInstallations (~> 10.0)
|
||||||
|
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
|
||||||
|
- GoogleUtilities/MethodSwizzler (~> 7.11)
|
||||||
|
- GoogleUtilities/Network (~> 7.11)
|
||||||
|
- "GoogleUtilities/NSData+zlib (~> 7.11)"
|
||||||
|
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||||
|
- FirebaseAnalytics/AdIdSupport (10.29.0):
|
||||||
|
- FirebaseCore (~> 10.0)
|
||||||
|
- FirebaseInstallations (~> 10.0)
|
||||||
|
- GoogleAppMeasurement (= 10.29.0)
|
||||||
|
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
|
||||||
|
- GoogleUtilities/MethodSwizzler (~> 7.11)
|
||||||
|
- GoogleUtilities/Network (~> 7.11)
|
||||||
|
- "GoogleUtilities/NSData+zlib (~> 7.11)"
|
||||||
|
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||||
- FirebaseCore (10.29.0):
|
- FirebaseCore (10.29.0):
|
||||||
- FirebaseCoreInternal (~> 10.0)
|
- FirebaseCoreInternal (~> 10.0)
|
||||||
- GoogleUtilities/Environment (~> 7.12)
|
- GoogleUtilities/Environment (~> 7.12)
|
||||||
- GoogleUtilities/Logger (~> 7.12)
|
- GoogleUtilities/Logger (~> 7.12)
|
||||||
|
- FirebaseCoreExtension (10.29.0):
|
||||||
|
- FirebaseCore (~> 10.0)
|
||||||
- FirebaseCoreInternal (10.29.0):
|
- FirebaseCoreInternal (10.29.0):
|
||||||
- "GoogleUtilities/NSData+zlib (~> 7.8)"
|
- "GoogleUtilities/NSData+zlib (~> 7.8)"
|
||||||
|
- FirebaseCrashlytics (10.29.0):
|
||||||
|
- FirebaseCore (~> 10.5)
|
||||||
|
- FirebaseInstallations (~> 10.0)
|
||||||
|
- FirebaseRemoteConfigInterop (~> 10.23)
|
||||||
|
- FirebaseSessions (~> 10.5)
|
||||||
|
- GoogleDataTransport (~> 9.2)
|
||||||
|
- GoogleUtilities/Environment (~> 7.8)
|
||||||
|
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||||
|
- PromisesObjC (~> 2.1)
|
||||||
- FirebaseInstallations (10.29.0):
|
- FirebaseInstallations (10.29.0):
|
||||||
- FirebaseCore (~> 10.0)
|
- FirebaseCore (~> 10.0)
|
||||||
- GoogleUtilities/Environment (~> 7.8)
|
- GoogleUtilities/Environment (~> 7.8)
|
||||||
@ -41,6 +87,16 @@ PODS:
|
|||||||
- GoogleUtilities/Reachability (~> 7.8)
|
- GoogleUtilities/Reachability (~> 7.8)
|
||||||
- GoogleUtilities/UserDefaults (~> 7.8)
|
- GoogleUtilities/UserDefaults (~> 7.8)
|
||||||
- nanopb (< 2.30911.0, >= 2.30908.0)
|
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||||
|
- FirebaseRemoteConfigInterop (10.29.0)
|
||||||
|
- FirebaseSessions (10.29.0):
|
||||||
|
- FirebaseCore (~> 10.5)
|
||||||
|
- FirebaseCoreExtension (~> 10.0)
|
||||||
|
- FirebaseInstallations (~> 10.0)
|
||||||
|
- GoogleDataTransport (~> 9.2)
|
||||||
|
- GoogleUtilities/Environment (~> 7.13)
|
||||||
|
- GoogleUtilities/UserDefaults (~> 7.13)
|
||||||
|
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||||
|
- PromisesSwift (~> 2.1)
|
||||||
- flutter_secure_storage_macos (6.1.1):
|
- flutter_secure_storage_macos (6.1.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- flutter_webrtc (0.11.3):
|
- flutter_webrtc (0.11.3):
|
||||||
@ -50,6 +106,26 @@ PODS:
|
|||||||
- gal (1.0.0):
|
- gal (1.0.0):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
- GoogleAppMeasurement (10.29.0):
|
||||||
|
- GoogleAppMeasurement/AdIdSupport (= 10.29.0)
|
||||||
|
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
|
||||||
|
- GoogleUtilities/MethodSwizzler (~> 7.11)
|
||||||
|
- GoogleUtilities/Network (~> 7.11)
|
||||||
|
- "GoogleUtilities/NSData+zlib (~> 7.11)"
|
||||||
|
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||||
|
- GoogleAppMeasurement/AdIdSupport (10.29.0):
|
||||||
|
- GoogleAppMeasurement/WithoutAdIdSupport (= 10.29.0)
|
||||||
|
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
|
||||||
|
- GoogleUtilities/MethodSwizzler (~> 7.11)
|
||||||
|
- GoogleUtilities/Network (~> 7.11)
|
||||||
|
- "GoogleUtilities/NSData+zlib (~> 7.11)"
|
||||||
|
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||||
|
- GoogleAppMeasurement/WithoutAdIdSupport (10.29.0):
|
||||||
|
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
|
||||||
|
- GoogleUtilities/MethodSwizzler (~> 7.11)
|
||||||
|
- GoogleUtilities/Network (~> 7.11)
|
||||||
|
- "GoogleUtilities/NSData+zlib (~> 7.11)"
|
||||||
|
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||||
- GoogleDataTransport (9.4.1):
|
- GoogleDataTransport (9.4.1):
|
||||||
- GoogleUtilities/Environment (~> 7.7)
|
- GoogleUtilities/Environment (~> 7.7)
|
||||||
- nanopb (< 2.30911.0, >= 2.30908.0)
|
- nanopb (< 2.30911.0, >= 2.30908.0)
|
||||||
@ -65,6 +141,9 @@ PODS:
|
|||||||
- GoogleUtilities/Logger (7.13.3):
|
- GoogleUtilities/Logger (7.13.3):
|
||||||
- GoogleUtilities/Environment
|
- GoogleUtilities/Environment
|
||||||
- GoogleUtilities/Privacy
|
- GoogleUtilities/Privacy
|
||||||
|
- GoogleUtilities/MethodSwizzler (7.13.3):
|
||||||
|
- GoogleUtilities/Logger
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
- GoogleUtilities/Network (7.13.3):
|
- GoogleUtilities/Network (7.13.3):
|
||||||
- GoogleUtilities/Logger
|
- GoogleUtilities/Logger
|
||||||
- "GoogleUtilities/NSData+zlib"
|
- "GoogleUtilities/NSData+zlib"
|
||||||
@ -79,17 +158,11 @@ PODS:
|
|||||||
- GoogleUtilities/UserDefaults (7.13.3):
|
- GoogleUtilities/UserDefaults (7.13.3):
|
||||||
- GoogleUtilities/Logger
|
- GoogleUtilities/Logger
|
||||||
- GoogleUtilities/Privacy
|
- GoogleUtilities/Privacy
|
||||||
- livekit_client (2.2.3):
|
- livekit_client (2.2.4):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- WebRTC-SDK (= 125.6422.04)
|
- WebRTC-SDK (= 125.6422.04)
|
||||||
- macos_window_utils (1.0.0):
|
- macos_window_utils (1.0.0):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- media_kit_libs_macos_video (1.0.4):
|
|
||||||
- FlutterMacOS
|
|
||||||
- media_kit_native_event_loop (1.0.0):
|
|
||||||
- FlutterMacOS
|
|
||||||
- media_kit_video (0.0.1):
|
|
||||||
- FlutterMacOS
|
|
||||||
- nanopb (2.30910.0):
|
- nanopb (2.30910.0):
|
||||||
- nanopb/decode (= 2.30910.0)
|
- nanopb/decode (= 2.30910.0)
|
||||||
- nanopb/encode (= 2.30910.0)
|
- nanopb/encode (= 2.30910.0)
|
||||||
@ -103,15 +176,10 @@ PODS:
|
|||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- PromisesObjC (2.4.0)
|
- PromisesObjC (2.4.0)
|
||||||
|
- PromisesSwift (2.4.0):
|
||||||
|
- PromisesObjC (= 2.4.0)
|
||||||
- protocol_handler_macos (0.0.1):
|
- protocol_handler_macos (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- screen_brightness_macos (0.1.0):
|
|
||||||
- FlutterMacOS
|
|
||||||
- Sentry/HybridSDK (8.32.0)
|
|
||||||
- sentry_flutter (8.6.0):
|
|
||||||
- Flutter
|
|
||||||
- FlutterMacOS
|
|
||||||
- Sentry/HybridSDK (= 8.32.0)
|
|
||||||
- share_plus (0.0.1):
|
- share_plus (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- shared_preferences_foundation (0.0.1):
|
- shared_preferences_foundation (0.0.1):
|
||||||
@ -122,6 +190,9 @@ PODS:
|
|||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- url_launcher_macos (0.0.1):
|
- url_launcher_macos (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
- video_player_avfoundation (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- FlutterMacOS
|
||||||
- wakelock_plus (0.0.1):
|
- wakelock_plus (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- WebRTC-SDK (125.6422.04)
|
- WebRTC-SDK (125.6422.04)
|
||||||
@ -131,7 +202,9 @@ DEPENDENCIES:
|
|||||||
- desktop_drop (from `Flutter/ephemeral/.symlinks/plugins/desktop_drop/macos`)
|
- desktop_drop (from `Flutter/ephemeral/.symlinks/plugins/desktop_drop/macos`)
|
||||||
- device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`)
|
- device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`)
|
||||||
- file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`)
|
- file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`)
|
||||||
|
- firebase_analytics (from `Flutter/ephemeral/.symlinks/plugins/firebase_analytics/macos`)
|
||||||
- firebase_core (from `Flutter/ephemeral/.symlinks/plugins/firebase_core/macos`)
|
- firebase_core (from `Flutter/ephemeral/.symlinks/plugins/firebase_core/macos`)
|
||||||
|
- firebase_crashlytics (from `Flutter/ephemeral/.symlinks/plugins/firebase_crashlytics/macos`)
|
||||||
- firebase_messaging (from `Flutter/ephemeral/.symlinks/plugins/firebase_messaging/macos`)
|
- firebase_messaging (from `Flutter/ephemeral/.symlinks/plugins/firebase_messaging/macos`)
|
||||||
- flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`)
|
- flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`)
|
||||||
- flutter_webrtc (from `Flutter/ephemeral/.symlinks/plugins/flutter_webrtc/macos`)
|
- flutter_webrtc (from `Flutter/ephemeral/.symlinks/plugins/flutter_webrtc/macos`)
|
||||||
@ -139,33 +212,35 @@ DEPENDENCIES:
|
|||||||
- gal (from `Flutter/ephemeral/.symlinks/plugins/gal/darwin`)
|
- gal (from `Flutter/ephemeral/.symlinks/plugins/gal/darwin`)
|
||||||
- livekit_client (from `Flutter/ephemeral/.symlinks/plugins/livekit_client/macos`)
|
- livekit_client (from `Flutter/ephemeral/.symlinks/plugins/livekit_client/macos`)
|
||||||
- macos_window_utils (from `Flutter/ephemeral/.symlinks/plugins/macos_window_utils/macos`)
|
- macos_window_utils (from `Flutter/ephemeral/.symlinks/plugins/macos_window_utils/macos`)
|
||||||
- media_kit_libs_macos_video (from `Flutter/ephemeral/.symlinks/plugins/media_kit_libs_macos_video/macos`)
|
|
||||||
- media_kit_native_event_loop (from `Flutter/ephemeral/.symlinks/plugins/media_kit_native_event_loop/macos`)
|
|
||||||
- media_kit_video (from `Flutter/ephemeral/.symlinks/plugins/media_kit_video/macos`)
|
|
||||||
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
|
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
|
||||||
- pasteboard (from `Flutter/ephemeral/.symlinks/plugins/pasteboard/macos`)
|
- pasteboard (from `Flutter/ephemeral/.symlinks/plugins/pasteboard/macos`)
|
||||||
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
|
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
|
||||||
- protocol_handler_macos (from `Flutter/ephemeral/.symlinks/plugins/protocol_handler_macos/macos`)
|
- protocol_handler_macos (from `Flutter/ephemeral/.symlinks/plugins/protocol_handler_macos/macos`)
|
||||||
- screen_brightness_macos (from `Flutter/ephemeral/.symlinks/plugins/screen_brightness_macos/macos`)
|
|
||||||
- sentry_flutter (from `Flutter/ephemeral/.symlinks/plugins/sentry_flutter/macos`)
|
|
||||||
- share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`)
|
- share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`)
|
||||||
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
|
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||||
- sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/darwin`)
|
- sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/darwin`)
|
||||||
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
|
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
|
||||||
|
- video_player_avfoundation (from `Flutter/ephemeral/.symlinks/plugins/video_player_avfoundation/darwin`)
|
||||||
- wakelock_plus (from `Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos`)
|
- wakelock_plus (from `Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos`)
|
||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
trunk:
|
trunk:
|
||||||
- Firebase
|
- Firebase
|
||||||
|
- FirebaseAnalytics
|
||||||
- FirebaseCore
|
- FirebaseCore
|
||||||
|
- FirebaseCoreExtension
|
||||||
- FirebaseCoreInternal
|
- FirebaseCoreInternal
|
||||||
|
- FirebaseCrashlytics
|
||||||
- FirebaseInstallations
|
- FirebaseInstallations
|
||||||
- FirebaseMessaging
|
- FirebaseMessaging
|
||||||
|
- FirebaseRemoteConfigInterop
|
||||||
|
- FirebaseSessions
|
||||||
|
- GoogleAppMeasurement
|
||||||
- GoogleDataTransport
|
- GoogleDataTransport
|
||||||
- GoogleUtilities
|
- GoogleUtilities
|
||||||
- nanopb
|
- nanopb
|
||||||
- PromisesObjC
|
- PromisesObjC
|
||||||
- Sentry
|
- PromisesSwift
|
||||||
- WebRTC-SDK
|
- WebRTC-SDK
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
@ -177,8 +252,12 @@ EXTERNAL SOURCES:
|
|||||||
:path: Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos
|
||||||
file_selector_macos:
|
file_selector_macos:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos
|
||||||
|
firebase_analytics:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/firebase_analytics/macos
|
||||||
firebase_core:
|
firebase_core:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/firebase_core/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/firebase_core/macos
|
||||||
|
firebase_crashlytics:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/firebase_crashlytics/macos
|
||||||
firebase_messaging:
|
firebase_messaging:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/firebase_messaging/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/firebase_messaging/macos
|
||||||
flutter_secure_storage_macos:
|
flutter_secure_storage_macos:
|
||||||
@ -193,12 +272,6 @@ EXTERNAL SOURCES:
|
|||||||
:path: Flutter/ephemeral/.symlinks/plugins/livekit_client/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/livekit_client/macos
|
||||||
macos_window_utils:
|
macos_window_utils:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/macos_window_utils/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/macos_window_utils/macos
|
||||||
media_kit_libs_macos_video:
|
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/media_kit_libs_macos_video/macos
|
|
||||||
media_kit_native_event_loop:
|
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/media_kit_native_event_loop/macos
|
|
||||||
media_kit_video:
|
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/media_kit_video/macos
|
|
||||||
package_info_plus:
|
package_info_plus:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
|
||||||
pasteboard:
|
pasteboard:
|
||||||
@ -207,10 +280,6 @@ EXTERNAL SOURCES:
|
|||||||
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
|
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
|
||||||
protocol_handler_macos:
|
protocol_handler_macos:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/protocol_handler_macos/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/protocol_handler_macos/macos
|
||||||
screen_brightness_macos:
|
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/screen_brightness_macos/macos
|
|
||||||
sentry_flutter:
|
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/sentry_flutter/macos
|
|
||||||
share_plus:
|
share_plus:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/share_plus/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/share_plus/macos
|
||||||
shared_preferences_foundation:
|
shared_preferences_foundation:
|
||||||
@ -219,6 +288,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: Flutter/ephemeral/.symlinks/plugins/sqflite/darwin
|
:path: Flutter/ephemeral/.symlinks/plugins/sqflite/darwin
|
||||||
url_launcher_macos:
|
url_launcher_macos:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
|
||||||
|
video_player_avfoundation:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/video_player_avfoundation/darwin
|
||||||
wakelock_plus:
|
wakelock_plus:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos
|
||||||
|
|
||||||
@ -228,36 +299,40 @@ SPEC CHECKSUMS:
|
|||||||
device_info_plus: ce1b7762849d3ec103d0e0517299f2db7ad60720
|
device_info_plus: ce1b7762849d3ec103d0e0517299f2db7ad60720
|
||||||
file_selector_macos: 54fdab7caa3ac3fc43c9fac4d7d8d231277f8cf2
|
file_selector_macos: 54fdab7caa3ac3fc43c9fac4d7d8d231277f8cf2
|
||||||
Firebase: cec914dab6fd7b1bd8ab56ea07ce4e03dd251c2d
|
Firebase: cec914dab6fd7b1bd8ab56ea07ce4e03dd251c2d
|
||||||
|
firebase_analytics: e1236d621a5d62d16a706315d198f3cd7f0e2fcb
|
||||||
firebase_core: 73185b844efc8a534e5744d68152e75e740922d2
|
firebase_core: 73185b844efc8a534e5744d68152e75e740922d2
|
||||||
|
firebase_crashlytics: a7b94c09eb4df16cabb0cfae4831ff4624a3d5d6
|
||||||
firebase_messaging: 167fdd90971720e0b62ccd6fa8d430b8af4ca6e9
|
firebase_messaging: 167fdd90971720e0b62ccd6fa8d430b8af4ca6e9
|
||||||
|
FirebaseAnalytics: 23717de130b779aa506e757edb9713d24b6ffeda
|
||||||
FirebaseCore: 30e9c1cbe3d38f5f5e75f48bfcea87d7c358ec16
|
FirebaseCore: 30e9c1cbe3d38f5f5e75f48bfcea87d7c358ec16
|
||||||
|
FirebaseCoreExtension: 705ca5b14bf71d2564a0ddc677df1fc86ffa600f
|
||||||
FirebaseCoreInternal: df84dd300b561c27d5571684f389bf60b0a5c934
|
FirebaseCoreInternal: df84dd300b561c27d5571684f389bf60b0a5c934
|
||||||
|
FirebaseCrashlytics: 34647b41e18de773717fdd348a22206f2f9bc774
|
||||||
FirebaseInstallations: 913cf60d0400ebd5d6b63a28b290372ab44590dd
|
FirebaseInstallations: 913cf60d0400ebd5d6b63a28b290372ab44590dd
|
||||||
FirebaseMessaging: 7b5d8033e183ab59eb5b852a53201559e976d366
|
FirebaseMessaging: 7b5d8033e183ab59eb5b852a53201559e976d366
|
||||||
|
FirebaseRemoteConfigInterop: 6efda51fb5e2f15b16585197e26eaa09574e8a4d
|
||||||
|
FirebaseSessions: dbd14adac65ce996228652c1fc3a3f576bdf3ecc
|
||||||
flutter_secure_storage_macos: 59459653abe1adb92abbc8ea747d79f8d19866c9
|
flutter_secure_storage_macos: 59459653abe1adb92abbc8ea747d79f8d19866c9
|
||||||
flutter_webrtc: 2b4e4a2de70a1485836e40fd71a7a94c77d49bd9
|
flutter_webrtc: 2b4e4a2de70a1485836e40fd71a7a94c77d49bd9
|
||||||
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
||||||
gal: 61e868295d28fe67ffa297fae6dacebf56fd53e1
|
gal: 61e868295d28fe67ffa297fae6dacebf56fd53e1
|
||||||
|
GoogleAppMeasurement: f9de05ee17401e3355f68e8fc8b5064d429f5918
|
||||||
GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a
|
GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a
|
||||||
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
|
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
|
||||||
livekit_client: a59d8778582019242d96fe9da69d4ec48833b5ca
|
livekit_client: 95f3b71e6545845aa658a6df0a3a62dcc3471d7c
|
||||||
macos_window_utils: 933f91f64805e2eb91a5bd057cf97cd097276663
|
macos_window_utils: 933f91f64805e2eb91a5bd057cf97cd097276663
|
||||||
media_kit_libs_macos_video: b3e2bbec2eef97c285f2b1baa7963c67c753fb82
|
|
||||||
media_kit_native_event_loop: 81fd5b45192b72f8b5b69eaf5b540f45777eb8d5
|
|
||||||
media_kit_video: c75b07f14d59706c775778e4dd47dd027de8d1e5
|
|
||||||
nanopb: 438bc412db1928dac798aa6fd75726007be04262
|
nanopb: 438bc412db1928dac798aa6fd75726007be04262
|
||||||
package_info_plus: fa739dd842b393193c5ca93c26798dff6e3d0e0c
|
package_info_plus: fa739dd842b393193c5ca93c26798dff6e3d0e0c
|
||||||
pasteboard: 9b69dba6fedbb04866be632205d532fe2f6b1d99
|
pasteboard: 9b69dba6fedbb04866be632205d532fe2f6b1d99
|
||||||
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
||||||
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||||
|
PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851
|
||||||
protocol_handler_macos: d10a6c01d6373389ffd2278013ab4c47ed6d6daa
|
protocol_handler_macos: d10a6c01d6373389ffd2278013ab4c47ed6d6daa
|
||||||
screen_brightness_macos: 2d6d3af2165592d9a55ffcd95b7550970e41ebda
|
|
||||||
Sentry: 96ae1dcdf01a644bc3a3b1dc279cecaf48a833fb
|
|
||||||
sentry_flutter: 090351ce1ff5f96a4b33ef9455b7e3b28185387d
|
|
||||||
share_plus: 36537c04ce0c3e3f5bd297ce4318b6d5ee5fd6cf
|
share_plus: 36537c04ce0c3e3f5bd297ce4318b6d5ee5fd6cf
|
||||||
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
|
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
|
||||||
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
|
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
|
||||||
url_launcher_macos: 5f437abeda8c85500ceb03f5c1938a8c5a705399
|
url_launcher_macos: 5f437abeda8c85500ceb03f5c1938a8c5a705399
|
||||||
|
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
|
||||||
wakelock_plus: 4783562c9a43d209c458cb9b30692134af456269
|
wakelock_plus: 4783562c9a43d209c458cb9b30692134af456269
|
||||||
WebRTC-SDK: c3d69a87e7185fad3568f6f3cff7c9ac5890acf3
|
WebRTC-SDK: c3d69a87e7185fad3568f6f3cff7c9ac5890acf3
|
||||||
|
|
||||||
|
@ -288,6 +288,7 @@
|
|||||||
3399D490228B24CF009A79C7 /* ShellScript */,
|
3399D490228B24CF009A79C7 /* ShellScript */,
|
||||||
C5DDC734703B72E778163C68 /* [CP] Embed Pods Frameworks */,
|
C5DDC734703B72E778163C68 /* [CP] Embed Pods Frameworks */,
|
||||||
7009C53F1F4A3CB93BB64EF3 /* [CP] Copy Pods Resources */,
|
7009C53F1F4A3CB93BB64EF3 /* [CP] Copy Pods Resources */,
|
||||||
|
230664685E2D9269C5BF6747 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */,
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
@ -400,6 +401,24 @@
|
|||||||
/* End PBXResourcesBuildPhase section */
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXShellScriptBuildPhase section */
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
|
230664685E2D9269C5BF6747 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
name = "FlutterFire: \"flutterfire upload-crashlytics-symbols\"";
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "\n#!/bin/bash\nPATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\nflutterfire upload-crashlytics-symbols --upload-symbols-script-path=$PODS_ROOT/FirebaseCrashlytics/upload-symbols --platform=macos --apple-project-path=${SRCROOT} --env-platform-name=${PLATFORM_NAME} --env-configuration=${CONFIGURATION} --env-project-dir=${PROJECT_DIR} --env-built-products-dir=${BUILT_PRODUCTS_DIR} --env-dwarf-dsym-folder-path=${DWARF_DSYM_FOLDER_PATH} --env-dwarf-dsym-file-name=${DWARF_DSYM_FILE_NAME} --env-infoplist-path=${INFOPLIST_PATH} --default-config=default\n";
|
||||||
|
};
|
||||||
291CAD95BC748648C4154147 /* [CP] Check Pods Manifest.lock */ = {
|
291CAD95BC748648C4154147 /* [CP] Check Pods Manifest.lock */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import Cocoa
|
import Cocoa
|
||||||
import FlutterMacOS
|
import FlutterMacOS
|
||||||
|
|
||||||
@NSApplicationMain
|
@main
|
||||||
class AppDelegate: FlutterAppDelegate {
|
class AppDelegate: FlutterAppDelegate {
|
||||||
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
||||||
return true
|
return true
|
||||||
|
597
pubspec.lock
597
pubspec.lock
File diff suppressed because it is too large
Load Diff
16
pubspec.yaml
16
pubspec.yaml
@ -2,7 +2,7 @@ name: solian
|
|||||||
description: "The Solar Network App"
|
description: "The Solar Network App"
|
||||||
publish_to: "none"
|
publish_to: "none"
|
||||||
|
|
||||||
version: 1.2.1+1
|
version: 1.2.1+18
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.3.4 <4.0.0"
|
sdk: ">=3.3.4 <4.0.0"
|
||||||
@ -19,7 +19,7 @@ dependencies:
|
|||||||
flutter_markdown: ^0.7.1
|
flutter_markdown: ^0.7.1
|
||||||
flutter_animate: ^4.5.0
|
flutter_animate: ^4.5.0
|
||||||
flutter_secure_storage: ^9.2.1
|
flutter_secure_storage: ^9.2.1
|
||||||
carousel_slider: ^4.2.1
|
carousel_slider: ^5.0.0
|
||||||
url_launcher: ^6.2.6
|
url_launcher: ^6.2.6
|
||||||
infinite_scroll_pagination: ^4.0.0
|
infinite_scroll_pagination: ^4.0.0
|
||||||
image_picker: ^1.1.1
|
image_picker: ^1.1.1
|
||||||
@ -36,7 +36,6 @@ dependencies:
|
|||||||
flutter_webrtc: ^0.11.4
|
flutter_webrtc: ^0.11.4
|
||||||
wakelock_plus: ^1.2.5
|
wakelock_plus: ^1.2.5
|
||||||
cached_network_image: ^3.3.1
|
cached_network_image: ^3.3.1
|
||||||
sentry_flutter: ^8.2.0
|
|
||||||
firebase_core: ^3.0.0
|
firebase_core: ^3.0.0
|
||||||
firebase_messaging: ^15.0.0
|
firebase_messaging: ^15.0.0
|
||||||
package_info_plus: ^8.0.0
|
package_info_plus: ^8.0.0
|
||||||
@ -46,9 +45,6 @@ dependencies:
|
|||||||
sqflite: ^2.3.3+1
|
sqflite: ^2.3.3+1
|
||||||
protocol_handler: ^0.2.0
|
protocol_handler: ^0.2.0
|
||||||
markdown: ^7.2.2
|
markdown: ^7.2.2
|
||||||
media_kit: ^1.1.10+1
|
|
||||||
media_kit_video: ^1.2.4
|
|
||||||
media_kit_libs_video: ^1.0.4
|
|
||||||
pasteboard: ^0.2.0
|
pasteboard: ^0.2.0
|
||||||
desktop_drop: ^0.4.4
|
desktop_drop: ^0.4.4
|
||||||
badges: ^3.1.2
|
badges: ^3.1.2
|
||||||
@ -66,6 +62,14 @@ dependencies:
|
|||||||
animations: ^2.0.11
|
animations: ^2.0.11
|
||||||
avatar_stack: ^1.2.0
|
avatar_stack: ^1.2.0
|
||||||
async: ^2.11.0
|
async: ^2.11.0
|
||||||
|
field_suggestion: ^0.2.5
|
||||||
|
flutter_typeahead: ^5.2.0
|
||||||
|
collection: ^1.18.0
|
||||||
|
firebase_crashlytics: ^4.0.4
|
||||||
|
firebase_analytics: ^11.2.1
|
||||||
|
video_player: ^2.9.1
|
||||||
|
chewie: ^1.8.3
|
||||||
|
firebase_performance: ^0.10.0+4
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
@ -15,13 +15,9 @@
|
|||||||
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
|
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
|
||||||
#include <gal/gal_plugin_c_api.h>
|
#include <gal/gal_plugin_c_api.h>
|
||||||
#include <livekit_client/live_kit_plugin.h>
|
#include <livekit_client/live_kit_plugin.h>
|
||||||
#include <media_kit_libs_windows_video/media_kit_libs_windows_video_plugin_c_api.h>
|
|
||||||
#include <media_kit_video/media_kit_video_plugin_c_api.h>
|
|
||||||
#include <pasteboard/pasteboard_plugin.h>
|
#include <pasteboard/pasteboard_plugin.h>
|
||||||
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
||||||
#include <protocol_handler_windows/protocol_handler_windows_plugin_c_api.h>
|
#include <protocol_handler_windows/protocol_handler_windows_plugin_c_api.h>
|
||||||
#include <screen_brightness_windows/screen_brightness_windows_plugin.h>
|
|
||||||
#include <sentry_flutter/sentry_flutter_plugin.h>
|
|
||||||
#include <share_plus/share_plus_windows_plugin_c_api.h>
|
#include <share_plus/share_plus_windows_plugin_c_api.h>
|
||||||
#include <url_launcher_windows/url_launcher_windows.h>
|
#include <url_launcher_windows/url_launcher_windows.h>
|
||||||
|
|
||||||
@ -44,20 +40,12 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
|||||||
registry->GetRegistrarForPlugin("GalPluginCApi"));
|
registry->GetRegistrarForPlugin("GalPluginCApi"));
|
||||||
LiveKitPluginRegisterWithRegistrar(
|
LiveKitPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("LiveKitPlugin"));
|
registry->GetRegistrarForPlugin("LiveKitPlugin"));
|
||||||
MediaKitLibsWindowsVideoPluginCApiRegisterWithRegistrar(
|
|
||||||
registry->GetRegistrarForPlugin("MediaKitLibsWindowsVideoPluginCApi"));
|
|
||||||
MediaKitVideoPluginCApiRegisterWithRegistrar(
|
|
||||||
registry->GetRegistrarForPlugin("MediaKitVideoPluginCApi"));
|
|
||||||
PasteboardPluginRegisterWithRegistrar(
|
PasteboardPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("PasteboardPlugin"));
|
registry->GetRegistrarForPlugin("PasteboardPlugin"));
|
||||||
PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
|
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
|
||||||
ProtocolHandlerWindowsPluginCApiRegisterWithRegistrar(
|
ProtocolHandlerWindowsPluginCApiRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("ProtocolHandlerWindowsPluginCApi"));
|
registry->GetRegistrarForPlugin("ProtocolHandlerWindowsPluginCApi"));
|
||||||
ScreenBrightnessWindowsPluginRegisterWithRegistrar(
|
|
||||||
registry->GetRegistrarForPlugin("ScreenBrightnessWindowsPlugin"));
|
|
||||||
SentryFlutterPluginRegisterWithRegistrar(
|
|
||||||
registry->GetRegistrarForPlugin("SentryFlutterPlugin"));
|
|
||||||
SharePlusWindowsPluginCApiRegisterWithRegistrar(
|
SharePlusWindowsPluginCApiRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
|
registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
|
||||||
UrlLauncherWindowsRegisterWithRegistrar(
|
UrlLauncherWindowsRegisterWithRegistrar(
|
||||||
|
@ -12,19 +12,14 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
|||||||
flutter_webrtc
|
flutter_webrtc
|
||||||
gal
|
gal
|
||||||
livekit_client
|
livekit_client
|
||||||
media_kit_libs_windows_video
|
|
||||||
media_kit_video
|
|
||||||
pasteboard
|
pasteboard
|
||||||
permission_handler_windows
|
permission_handler_windows
|
||||||
protocol_handler_windows
|
protocol_handler_windows
|
||||||
screen_brightness_windows
|
|
||||||
sentry_flutter
|
|
||||||
share_plus
|
share_plus
|
||||||
url_launcher_windows
|
url_launcher_windows
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||||
media_kit_native_event_loop
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(PLUGIN_BUNDLED_LIBRARIES)
|
set(PLUGIN_BUNDLED_LIBRARIES)
|
||||||
|
Reference in New Issue
Block a user