Compare commits
17 Commits
3.0.0+104
...
36fb06b81c
Author | SHA1 | Date | |
---|---|---|---|
36fb06b81c | |||
129c215a02 | |||
0f125f45f0 | |||
30416f7ca0 | |||
6e74cf3a93 | |||
0d6424e155 | |||
0424eb0c2a | |||
be01bac5db | |||
7bb4e68054 | |||
61e61866d7 | |||
280c261ea1 | |||
49bc6b9a98 | |||
461f32545a | |||
36b9026e9e | |||
78f258dcea | |||
044fb983d6 | |||
2a7876e22f |
@ -113,7 +113,8 @@
|
||||
"addVideo": "Add video",
|
||||
"addPhoto": "Add photo",
|
||||
"addFile": "Add file",
|
||||
"createDirectMessage": "New direct message",
|
||||
"createDirectMessage": "Send new DM",
|
||||
"gotoDirectMessage": "Go to DM",
|
||||
"react": "React",
|
||||
"reactions": {
|
||||
"zero": "Reactions",
|
||||
@ -134,14 +135,11 @@
|
||||
"checkInResultLevel2": "A Normal Day",
|
||||
"checkInResultLevel3": "Good Luck",
|
||||
"checkInResultLevel4": "Best Luck",
|
||||
"checkInResultLevelShort0": "Wrost",
|
||||
"checkInResultLevelShort1": "Bad",
|
||||
"checkInResultLevelShort2": "Normal",
|
||||
"checkInResultLevelShort3": "Good",
|
||||
"checkInResultLevelShort4": "Best",
|
||||
"checkInActivityTitle": "{} checked in on {} and got a {}",
|
||||
"eventCalander": "Event Calander",
|
||||
"eventCalanderEmpty": "No events on that day.",
|
||||
"fortuneGraph": "Fortune Trend",
|
||||
"noFortuneData": "No fortune data available for this month.",
|
||||
"creatorHub": "Creator Hub",
|
||||
"creatorHubDescription": "Manage posts, analytics, and more.",
|
||||
"developerPortal": "Developer Portal",
|
||||
@ -233,6 +231,7 @@
|
||||
"creatorHubUnselectedHint": "Pick / create a publisher to get started.",
|
||||
"relationships": "Relationships",
|
||||
"addFriend": "Send a Friend Request",
|
||||
"addFriendShort": "Add as Friend",
|
||||
"addFriendHint": "Add a friend to your relationship list.",
|
||||
"pendingRequest": "Pending",
|
||||
"waitingRequest": "Waiting",
|
||||
@ -277,11 +276,13 @@
|
||||
"posts": "Posts",
|
||||
"settingsBackgroundImage": "Background Image",
|
||||
"settingsBackgroundImageClear": "Clear Background Image",
|
||||
"settingsBackgroundGenerateColor": "Generate color scheme from Bacground Image",
|
||||
"messageNone": "No content to display",
|
||||
"unreadMessages": {
|
||||
"one": "{} unread message",
|
||||
"other": "{} unread messages"
|
||||
},
|
||||
"chatBreakNone": "None",
|
||||
"settingsRealmCompactView": "Compact Realm View",
|
||||
"settingsMixedFeed": "Mixed Feed",
|
||||
"settingsAutoTranslate": "Auto Translate",
|
||||
@ -315,7 +316,7 @@
|
||||
"accountSettingsHelpContent": "This page allows you to manage your account security, privacy, and other settings. If you need assistance, please contact support.",
|
||||
"unauthorized": "Unauthorized",
|
||||
"unauthorizedHint": "You're not signed in or session expired, please sign in again.",
|
||||
"publisherVisitAccountPage": "Visit the profile of {}",
|
||||
"publisherBelongsTo": "Belongs to {}",
|
||||
"postVisibility": "Visibility",
|
||||
"postVisibilityPublic": "Public",
|
||||
"postVisibilityFriends": "Friends Only",
|
||||
@ -396,5 +397,37 @@
|
||||
"contactMethodPrimary": "Primary",
|
||||
"contactMethodSetPrimary": "Set as Primary",
|
||||
"contactMethodSetPrimaryHint": "Set this contact method as your primary contact method for account recovery and notifications",
|
||||
"contactMethodDeleteHint": "Are you sure to delete this contact method? This action cannot be undone."
|
||||
"contactMethodDeleteHint": "Are you sure to delete this contact method? This action cannot be undone.",
|
||||
"chatNotifyLevel": "Notify Level",
|
||||
"chatNotifyLevelDescription": "Decide how many notifications you will receive.",
|
||||
"chatNotifyLevelAll": "All",
|
||||
"chatNotifyLevelMention": "Mentions",
|
||||
"chatNotifyLevelNone": "None",
|
||||
"chatNotifyLevelUpdated": "The notify level has been updated to {}.",
|
||||
"chatBreak": "Take a Break",
|
||||
"chatBreakDescription": "Set a time, before that time, your notification level will be metions only, to take a break of the current topic they're talking about.",
|
||||
"chatBreakClear": "Clear the break time",
|
||||
"chatBreakHour": "{} break",
|
||||
"chatBreakDay": "{} day break",
|
||||
"chatBreakSet": "Break set for {}",
|
||||
"chatBreakCleared": "Chat break has been cleared.",
|
||||
"chatBreakCustom": "Custom duration",
|
||||
"chatBreakEnterMinutes": "Enter minutes",
|
||||
"firstName": "First Name",
|
||||
"middleName": "Middle Name",
|
||||
"lastName": "Last Name",
|
||||
"gender": "Gender",
|
||||
"pronouns": "Pronouns",
|
||||
"location": "Location",
|
||||
"timeZone": "Time Zone",
|
||||
"birthday": "Birthday",
|
||||
"selectADate": "Select a date",
|
||||
"checkInResultT0": "Worst",
|
||||
"checkInResultT1": "Poor",
|
||||
"checkInResultT2": "Mid",
|
||||
"checkInResultT3": "Good",
|
||||
"checkInResultT4": "Best",
|
||||
"accountProfileView": "View Profile",
|
||||
"unspecified": "Unspecified",
|
||||
"added": "Added"
|
||||
}
|
||||
|
@ -291,5 +291,26 @@
|
||||
"postVisibilityPublic": "公开",
|
||||
"postVisibilityFriends": "仅好友可见",
|
||||
"postVisibilityUnlisted": "不公开",
|
||||
"postVisibilityPrivate": "私密"
|
||||
"postVisibilityPrivate": "私密",
|
||||
"chatNotifyLevel": "通知级别",
|
||||
"chatNotifyLevelDescription": "决定您将收到多少通知。",
|
||||
"chatNotifyLevelAll": "全部",
|
||||
"chatNotifyLevelMention": "提及",
|
||||
"chatNotifyLevelNone": "无",
|
||||
"chatNotifyLevelUpdated": "通知级别已更新为 {}。",
|
||||
"chatBreak": "暂停聊天",
|
||||
"chatBreakDescription": "设置一个时间,在该时间之前,您的通知级别将仅为提及,以暂时休息当前讨论的话题。",
|
||||
"chatBreakClear": "清除暂停时间",
|
||||
"chatBreakHour": "暂停 {} 分钟",
|
||||
"chatBreakDay": "暂停 {} 天",
|
||||
"chatBreakSet": "已设置暂停 {}",
|
||||
"chatBreakCleared": "聊天暂停已清除。",
|
||||
"chatBreakCustom": "自定义时长",
|
||||
"chatBreakEnterMinutes": "输入分钟数",
|
||||
"chatBreakNone": "无",
|
||||
"checkInResultT0": "大凶",
|
||||
"checkInResultT1": "凶",
|
||||
"checkInResultT2": "中平",
|
||||
"checkInResultT3": "吉",
|
||||
"checkInResultT4": "大吉"
|
||||
}
|
@ -68,7 +68,7 @@
|
||||
"createRealmHint": "結識志同道合的朋友、建立社群等等。",
|
||||
"editRealm": "編輯領域",
|
||||
"deleteRealm": "刪除領域",
|
||||
"deleteRealmHint": "確定要刪除此領域嗎?這也將刪除此領域下的所有頻道、發佈者和貼文。",
|
||||
"deleteRealmHint": "確定要刪除此領域嗎?這也將刪除該領域下的所有頻道、發佈者和貼文。",
|
||||
"explore": "探索",
|
||||
"account": "帳號",
|
||||
"name": "名稱",
|
||||
@ -291,5 +291,21 @@
|
||||
"postVisibilityPublic": "公開",
|
||||
"postVisibilityFriends": "僅好友可見",
|
||||
"postVisibilityUnlisted": "不公開",
|
||||
"postVisibilityPrivate": "私密"
|
||||
"postVisibilityPrivate": "私密",
|
||||
"chatNotifyLevel": "通知等級",
|
||||
"chatNotifyLevelDescription": "決定您將收到多少通知。",
|
||||
"chatNotifyLevelAll": "全部",
|
||||
"chatNotifyLevelMention": "提及",
|
||||
"chatNotifyLevelNone": "無",
|
||||
"chatNotifyLevelUpdated": "通知等級已更新為 {}。",
|
||||
"chatBreak": "暫停聊天",
|
||||
"chatBreakDescription": "設定一個時間,在該時間之前,您的通知等級將僅為提及,以暫時休息當前討論的話題。",
|
||||
"chatBreakClear": "清除暫停時間",
|
||||
"chatBreakHour": "暫停 {} 分鐘",
|
||||
"chatBreakDay": "暫停 {} 天",
|
||||
"chatBreakSet": "已設定暫停 {}",
|
||||
"chatBreakCleared": "聊天暫停已清除。",
|
||||
"chatBreakCustom": "自訂時長",
|
||||
"chatBreakEnterMinutes": "輸入分鐘數",
|
||||
"chatBreakNone": "無"
|
||||
}
|
109
ios/Podfile.lock
109
ios/Podfile.lock
@ -40,37 +40,37 @@ PODS:
|
||||
- file_picker (0.0.1):
|
||||
- DKImagePickerController/PhotoGallery
|
||||
- Flutter
|
||||
- Firebase/CoreOnly (11.10.0):
|
||||
- FirebaseCore (~> 11.10.0)
|
||||
- Firebase/Messaging (11.10.0):
|
||||
- Firebase/CoreOnly (11.13.0):
|
||||
- FirebaseCore (~> 11.13.0)
|
||||
- Firebase/Messaging (11.13.0):
|
||||
- Firebase/CoreOnly
|
||||
- FirebaseMessaging (~> 11.10.0)
|
||||
- firebase_core (3.13.1):
|
||||
- Firebase/CoreOnly (= 11.10.0)
|
||||
- FirebaseMessaging (~> 11.13.0)
|
||||
- firebase_core (3.14.0):
|
||||
- Firebase/CoreOnly (= 11.13.0)
|
||||
- Flutter
|
||||
- firebase_messaging (15.2.6):
|
||||
- Firebase/Messaging (= 11.10.0)
|
||||
- firebase_messaging (15.2.7):
|
||||
- Firebase/Messaging (= 11.13.0)
|
||||
- firebase_core
|
||||
- Flutter
|
||||
- FirebaseCore (11.10.0):
|
||||
- FirebaseCoreInternal (~> 11.10.0)
|
||||
- GoogleUtilities/Environment (~> 8.0)
|
||||
- GoogleUtilities/Logger (~> 8.0)
|
||||
- FirebaseCoreInternal (11.10.0):
|
||||
- "GoogleUtilities/NSData+zlib (~> 8.0)"
|
||||
- FirebaseInstallations (11.10.0):
|
||||
- FirebaseCore (~> 11.10.0)
|
||||
- GoogleUtilities/Environment (~> 8.0)
|
||||
- GoogleUtilities/UserDefaults (~> 8.0)
|
||||
- FirebaseCore (11.13.0):
|
||||
- FirebaseCoreInternal (~> 11.13.0)
|
||||
- GoogleUtilities/Environment (~> 8.1)
|
||||
- GoogleUtilities/Logger (~> 8.1)
|
||||
- FirebaseCoreInternal (11.13.0):
|
||||
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
||||
- FirebaseInstallations (11.13.0):
|
||||
- FirebaseCore (~> 11.13.0)
|
||||
- GoogleUtilities/Environment (~> 8.1)
|
||||
- GoogleUtilities/UserDefaults (~> 8.1)
|
||||
- PromisesObjC (~> 2.4)
|
||||
- FirebaseMessaging (11.10.0):
|
||||
- FirebaseCore (~> 11.10.0)
|
||||
- FirebaseMessaging (11.13.0):
|
||||
- FirebaseCore (~> 11.13.0)
|
||||
- FirebaseInstallations (~> 11.0)
|
||||
- GoogleDataTransport (~> 10.0)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.0)
|
||||
- GoogleUtilities/Environment (~> 8.0)
|
||||
- GoogleUtilities/Reachability (~> 8.0)
|
||||
- GoogleUtilities/UserDefaults (~> 8.0)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
||||
- GoogleUtilities/Environment (~> 8.1)
|
||||
- GoogleUtilities/Reachability (~> 8.1)
|
||||
- GoogleUtilities/UserDefaults (~> 8.1)
|
||||
- nanopb (~> 3.30910.0)
|
||||
- Flutter (1.0.0)
|
||||
- flutter_inappwebview_ios (0.0.1):
|
||||
@ -84,6 +84,8 @@ PODS:
|
||||
- Flutter
|
||||
- flutter_platform_alert (0.0.1):
|
||||
- Flutter
|
||||
- flutter_timezone (0.0.1):
|
||||
- Flutter
|
||||
- flutter_udid (0.0.1):
|
||||
- Flutter
|
||||
- SAMKeychain
|
||||
@ -92,6 +94,7 @@ PODS:
|
||||
- WebRTC-SDK (= 125.6422.07)
|
||||
- gal (1.0.0):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- GoogleDataTransport (10.1.0):
|
||||
- nanopb (~> 3.30910.0)
|
||||
- PromisesObjC (~> 2.4)
|
||||
@ -124,7 +127,7 @@ PODS:
|
||||
- irondash_engine_context (0.0.1):
|
||||
- Flutter
|
||||
- Kingfisher (8.3.2)
|
||||
- livekit_client (2.4.7):
|
||||
- livekit_client (2.4.8):
|
||||
- Flutter
|
||||
- flutter_webrtc
|
||||
- WebRTC-SDK (= 125.6422.07)
|
||||
@ -149,32 +152,32 @@ PODS:
|
||||
- record_ios (1.0.0):
|
||||
- Flutter
|
||||
- SAMKeychain (1.5.3)
|
||||
- SDWebImage (5.21.0):
|
||||
- SDWebImage/Core (= 5.21.0)
|
||||
- SDWebImage/Core (5.21.0)
|
||||
- SDWebImage (5.21.1):
|
||||
- SDWebImage/Core (= 5.21.1)
|
||||
- SDWebImage/Core (5.21.1)
|
||||
- shared_preferences_foundation (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- sqflite_darwin (0.0.4):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- sqlite3 (3.49.2):
|
||||
- sqlite3/common (= 3.49.2)
|
||||
- sqlite3/common (3.49.2)
|
||||
- sqlite3/dbstatvtab (3.49.2):
|
||||
- sqlite3 (3.50.1):
|
||||
- sqlite3/common (= 3.50.1)
|
||||
- sqlite3/common (3.50.1)
|
||||
- sqlite3/dbstatvtab (3.50.1):
|
||||
- sqlite3/common
|
||||
- sqlite3/fts5 (3.49.2):
|
||||
- sqlite3/fts5 (3.50.1):
|
||||
- sqlite3/common
|
||||
- sqlite3/math (3.49.2):
|
||||
- sqlite3/math (3.50.1):
|
||||
- sqlite3/common
|
||||
- sqlite3/perf-threadsafe (3.49.2):
|
||||
- sqlite3/perf-threadsafe (3.50.1):
|
||||
- sqlite3/common
|
||||
- sqlite3/rtree (3.49.2):
|
||||
- sqlite3/rtree (3.50.1):
|
||||
- sqlite3/common
|
||||
- sqlite3_flutter_libs (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- sqlite3 (~> 3.49.2)
|
||||
- sqlite3 (~> 3.50.1)
|
||||
- sqlite3/dbstatvtab
|
||||
- sqlite3/fts5
|
||||
- sqlite3/math
|
||||
@ -203,9 +206,10 @@ DEPENDENCIES:
|
||||
- flutter_inappwebview_ios (from `.symlinks/plugins/flutter_inappwebview_ios/ios`)
|
||||
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
|
||||
- flutter_platform_alert (from `.symlinks/plugins/flutter_platform_alert/ios`)
|
||||
- flutter_timezone (from `.symlinks/plugins/flutter_timezone/ios`)
|
||||
- flutter_udid (from `.symlinks/plugins/flutter_udid/ios`)
|
||||
- flutter_webrtc (from `.symlinks/plugins/flutter_webrtc/ios`)
|
||||
- gal (from `.symlinks/plugins/gal/ios`)
|
||||
- gal (from `.symlinks/plugins/gal/darwin`)
|
||||
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
||||
- irondash_engine_context (from `.symlinks/plugins/irondash_engine_context/ios`)
|
||||
- Kingfisher (~> 8.0)
|
||||
@ -267,12 +271,14 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/flutter_native_splash/ios"
|
||||
flutter_platform_alert:
|
||||
:path: ".symlinks/plugins/flutter_platform_alert/ios"
|
||||
flutter_timezone:
|
||||
:path: ".symlinks/plugins/flutter_timezone/ios"
|
||||
flutter_udid:
|
||||
:path: ".symlinks/plugins/flutter_udid/ios"
|
||||
flutter_webrtc:
|
||||
:path: ".symlinks/plugins/flutter_webrtc/ios"
|
||||
gal:
|
||||
:path: ".symlinks/plugins/gal/ios"
|
||||
:path: ".symlinks/plugins/gal/darwin"
|
||||
image_picker_ios:
|
||||
:path: ".symlinks/plugins/image_picker_ios/ios"
|
||||
irondash_engine_context:
|
||||
@ -314,26 +320,27 @@ SPEC CHECKSUMS:
|
||||
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
|
||||
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
|
||||
file_picker: a0560bc09d61de87f12d246fc47d2119e6ef37be
|
||||
Firebase: 1fe1c0a7d9aaea32efe01fbea5f0ebd8d70e53a2
|
||||
firebase_core: ba71b44041571da878cb624ce0d80250bcbe58ad
|
||||
firebase_messaging: 13129fe2ca166d1ed2d095062d76cee88943d067
|
||||
FirebaseCore: 8344daef5e2661eb004b177488d6f9f0f24251b7
|
||||
FirebaseCoreInternal: ef4505d2afb1d0ebbc33162cb3795382904b5679
|
||||
FirebaseInstallations: 9980995bdd06ec8081dfb6ab364162bdd64245c3
|
||||
FirebaseMessaging: 2b9f56aa4ed286e1f0ce2ee1d413aabb8f9f5cb9
|
||||
Firebase: 3435bc66b4d494c2f22c79fd3aae4c1db6662327
|
||||
firebase_core: 700bac7ed92bb754fd70fbf01d72b36ecdd6d450
|
||||
firebase_messaging: 860c017fcfbb5e27c163062d1d3135388f3ef954
|
||||
FirebaseCore: c692c7f1c75305ab6aff2b367f25e11d73aa8bd0
|
||||
FirebaseCoreInternal: 29d7b3af4aaf0b8f3ed20b568c13df399b06f68c
|
||||
FirebaseInstallations: 0ee9074f2c1e86561ace168ee1470dc67aabaf02
|
||||
FirebaseMessaging: 195bbdb73e6ca1dbc76cd46e73f3552c084ef6e4
|
||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||
flutter_inappwebview_ios: b89ba3482b96fb25e00c967aae065701b66e9b99
|
||||
flutter_native_splash: c32d145d68aeda5502d5f543ee38c192065986cf
|
||||
flutter_platform_alert: bf3b5fcd4ac14bd637e20527e9c471633071afd3
|
||||
flutter_timezone: 7c838e17ffd4645d261e87037e5bebf6d38fe544
|
||||
flutter_udid: f7c3884e6ec2951efe4f9de082257fc77c4d15e9
|
||||
flutter_webrtc: fd0d3bdef8766a0736dbbe2e5b7e85f1f3c52117
|
||||
gal: 29e711cd17bccb47f839d9b30afe9bc9750950b2
|
||||
gal: baecd024ebfd13c441269ca7404792a7152fde89
|
||||
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
|
||||
GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
|
||||
image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a
|
||||
irondash_engine_context: 8e58ca8e0212ee9d1c7dc6a42121849986c88486
|
||||
Kingfisher: 0621d0ac0c78fecb19f6dc5303bde2b52abaf2f5
|
||||
livekit_client: c30950bf36aa4c0244dd5551b1818cd15f90ba32
|
||||
livekit_client: 9e901890552514206e5ff828903ed271531da264
|
||||
media_kit_libs_ios_video: 5a18affdb97d1f5d466dc79988b13eff6c5e2854
|
||||
media_kit_video: 1746e198cb697d1ffb734b1d05ec429d1fcd1474
|
||||
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
|
||||
@ -344,11 +351,11 @@ SPEC CHECKSUMS:
|
||||
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||
record_ios: fee1c924aa4879b882ebca2b4bce6011bcfc3d8b
|
||||
SAMKeychain: 483e1c9f32984d50ca961e26818a534283b4cd5c
|
||||
SDWebImage: f84b0feeb08d2d11e6a9b843cb06d75ebf5b8868
|
||||
SDWebImage: f29024626962457f3470184232766516dee8dfea
|
||||
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
|
||||
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
|
||||
sqlite3: 3c950dc86011117c307eb0b28c4a7bb449dce9f1
|
||||
sqlite3_flutter_libs: 74334e3ef2dbdb7d37e50859bb45da43935779c4
|
||||
sqlite3: 1d85290c3321153511f6e900ede7a1608718bbd5
|
||||
sqlite3_flutter_libs: e7fc8c9ea2200ff3271f08f127842131746b70e2
|
||||
super_native_extensions: b763c02dc3a8fd078389f410bf15149179020cb4
|
||||
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
|
||||
url_launcher_ios: 694010445543906933d732453a59da0a173ae33d
|
||||
|
@ -4,6 +4,8 @@
|
||||
<dict>
|
||||
<key>aps-environment</key>
|
||||
<string>development</string>
|
||||
<key>com.apple.developer.device-information.user-assigned-device-name</key>
|
||||
<true/>
|
||||
<key>com.apple.developer.usernotifications.communication</key>
|
||||
<true/>
|
||||
</dict>
|
||||
|
@ -1,6 +1,3 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:island/database/drift_db.dart';
|
||||
import 'package:island/database/message.dart';
|
||||
@ -48,13 +45,6 @@ class MessageRepository {
|
||||
},
|
||||
);
|
||||
|
||||
for (final item in resp.data['changes']) {
|
||||
if (item['message']['sender']['account'] == null)
|
||||
log(jsonEncode(item['message']['sender']['account']));
|
||||
// if (item['message'] != null &&
|
||||
// item['message']['sender']['account'] == null) {
|
||||
// }
|
||||
}
|
||||
final response = MessageSyncResponse.fromJson(resp.data);
|
||||
for (final change in response.changes) {
|
||||
switch (change.action) {
|
||||
|
@ -19,6 +19,7 @@ import 'package:island/pods/websocket.dart';
|
||||
import 'package:island/route.dart';
|
||||
import 'package:island/screens/auth/tabs.dart';
|
||||
import 'package:island/services/notify.dart';
|
||||
import 'package:island/services/timezone.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:relative_time/relative_time.dart';
|
||||
@ -45,6 +46,14 @@ void main() async {
|
||||
showErrorAlert(err);
|
||||
}
|
||||
|
||||
try {
|
||||
log("[SplashScreen] Loading timezone database...");
|
||||
await initializeTzdb();
|
||||
log("[SplashScreen] Time zone database was loaded!");
|
||||
} catch (err) {
|
||||
log("[SplashScreen] Failed to load timezone database... $err");
|
||||
}
|
||||
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
|
||||
if (!kIsWeb && (Platform.isMacOS || Platform.isLinux || Platform.isWindows)) {
|
||||
|
@ -1,6 +1,3 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:island/models/file.dart';
|
||||
import 'package:island/models/realm.dart';
|
||||
@ -90,7 +87,10 @@ sealed class SnChatMember with _$SnChatMember {
|
||||
required int role,
|
||||
required int notify,
|
||||
required DateTime? joinedAt,
|
||||
required DateTime? breakUntil,
|
||||
required DateTime? timeoutUntil,
|
||||
required bool isBot,
|
||||
// Frontend data
|
||||
DateTime? lastTyped,
|
||||
}) = _SnChatMember;
|
||||
|
||||
|
@ -663,7 +663,8 @@ $SnChatMemberCopyWith<$Res> get sender {
|
||||
/// @nodoc
|
||||
mixin _$SnChatMember {
|
||||
|
||||
DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; String get id; String get chatRoomId; SnChatRoom? get chatRoom; String get accountId; SnAccount get account; String? get nick; int get role; int get notify; DateTime? get joinedAt; bool get isBot; DateTime? get lastTyped;
|
||||
DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; String get id; String get chatRoomId; SnChatRoom? get chatRoom; String get accountId; SnAccount get account; String? get nick; int get role; int get notify; DateTime? get joinedAt; DateTime? get breakUntil; DateTime? get timeoutUntil; bool get isBot;// Frontend data
|
||||
DateTime? get lastTyped;
|
||||
/// Create a copy of SnChatMember
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@ -676,16 +677,16 @@ $SnChatMemberCopyWith<SnChatMember> get copyWith => _$SnChatMemberCopyWithImpl<S
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnChatMember&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.id, id) || other.id == id)&&(identical(other.chatRoomId, chatRoomId) || other.chatRoomId == chatRoomId)&&(identical(other.chatRoom, chatRoom) || other.chatRoom == chatRoom)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.account, account) || other.account == account)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.role, role) || other.role == role)&&(identical(other.notify, notify) || other.notify == notify)&&(identical(other.joinedAt, joinedAt) || other.joinedAt == joinedAt)&&(identical(other.isBot, isBot) || other.isBot == isBot)&&(identical(other.lastTyped, lastTyped) || other.lastTyped == lastTyped));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnChatMember&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.id, id) || other.id == id)&&(identical(other.chatRoomId, chatRoomId) || other.chatRoomId == chatRoomId)&&(identical(other.chatRoom, chatRoom) || other.chatRoom == chatRoom)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.account, account) || other.account == account)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.role, role) || other.role == role)&&(identical(other.notify, notify) || other.notify == notify)&&(identical(other.joinedAt, joinedAt) || other.joinedAt == joinedAt)&&(identical(other.breakUntil, breakUntil) || other.breakUntil == breakUntil)&&(identical(other.timeoutUntil, timeoutUntil) || other.timeoutUntil == timeoutUntil)&&(identical(other.isBot, isBot) || other.isBot == isBot)&&(identical(other.lastTyped, lastTyped) || other.lastTyped == lastTyped));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,createdAt,updatedAt,deletedAt,id,chatRoomId,chatRoom,accountId,account,nick,role,notify,joinedAt,isBot,lastTyped);
|
||||
int get hashCode => Object.hash(runtimeType,createdAt,updatedAt,deletedAt,id,chatRoomId,chatRoom,accountId,account,nick,role,notify,joinedAt,breakUntil,timeoutUntil,isBot,lastTyped);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnChatMember(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, chatRoomId: $chatRoomId, chatRoom: $chatRoom, accountId: $accountId, account: $account, nick: $nick, role: $role, notify: $notify, joinedAt: $joinedAt, isBot: $isBot, lastTyped: $lastTyped)';
|
||||
return 'SnChatMember(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, chatRoomId: $chatRoomId, chatRoom: $chatRoom, accountId: $accountId, account: $account, nick: $nick, role: $role, notify: $notify, joinedAt: $joinedAt, breakUntil: $breakUntil, timeoutUntil: $timeoutUntil, isBot: $isBot, lastTyped: $lastTyped)';
|
||||
}
|
||||
|
||||
|
||||
@ -696,7 +697,7 @@ abstract mixin class $SnChatMemberCopyWith<$Res> {
|
||||
factory $SnChatMemberCopyWith(SnChatMember value, $Res Function(SnChatMember) _then) = _$SnChatMemberCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int role, int notify, DateTime? joinedAt, bool isBot, DateTime? lastTyped
|
||||
DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int role, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, bool isBot, DateTime? lastTyped
|
||||
});
|
||||
|
||||
|
||||
@ -713,7 +714,7 @@ class _$SnChatMemberCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnChatMember
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? id = null,Object? chatRoomId = null,Object? chatRoom = freezed,Object? accountId = null,Object? account = null,Object? nick = freezed,Object? role = null,Object? notify = null,Object? joinedAt = freezed,Object? isBot = null,Object? lastTyped = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? id = null,Object? chatRoomId = null,Object? chatRoom = freezed,Object? accountId = null,Object? account = null,Object? nick = freezed,Object? role = null,Object? notify = null,Object? joinedAt = freezed,Object? breakUntil = freezed,Object? timeoutUntil = freezed,Object? isBot = null,Object? lastTyped = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
@ -727,6 +728,8 @@ as SnAccount,nick: freezed == nick ? _self.nick : nick // ignore: cast_nullable_
|
||||
as String?,role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
|
||||
as int,notify: null == notify ? _self.notify : notify // ignore: cast_nullable_to_non_nullable
|
||||
as int,joinedAt: freezed == joinedAt ? _self.joinedAt : joinedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,breakUntil: freezed == breakUntil ? _self.breakUntil : breakUntil // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,timeoutUntil: freezed == timeoutUntil ? _self.timeoutUntil : timeoutUntil // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,isBot: null == isBot ? _self.isBot : isBot // ignore: cast_nullable_to_non_nullable
|
||||
as bool,lastTyped: freezed == lastTyped ? _self.lastTyped : lastTyped // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
@ -761,7 +764,7 @@ $SnAccountCopyWith<$Res> get account {
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnChatMember implements SnChatMember {
|
||||
const _SnChatMember({required this.createdAt, required this.updatedAt, required this.deletedAt, required this.id, required this.chatRoomId, required this.chatRoom, required this.accountId, required this.account, required this.nick, required this.role, required this.notify, required this.joinedAt, required this.isBot, this.lastTyped});
|
||||
const _SnChatMember({required this.createdAt, required this.updatedAt, required this.deletedAt, required this.id, required this.chatRoomId, required this.chatRoom, required this.accountId, required this.account, required this.nick, required this.role, required this.notify, required this.joinedAt, required this.breakUntil, required this.timeoutUntil, required this.isBot, this.lastTyped});
|
||||
factory _SnChatMember.fromJson(Map<String, dynamic> json) => _$SnChatMemberFromJson(json);
|
||||
|
||||
@override final DateTime createdAt;
|
||||
@ -776,7 +779,10 @@ class _SnChatMember implements SnChatMember {
|
||||
@override final int role;
|
||||
@override final int notify;
|
||||
@override final DateTime? joinedAt;
|
||||
@override final DateTime? breakUntil;
|
||||
@override final DateTime? timeoutUntil;
|
||||
@override final bool isBot;
|
||||
// Frontend data
|
||||
@override final DateTime? lastTyped;
|
||||
|
||||
/// Create a copy of SnChatMember
|
||||
@ -792,16 +798,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnChatMember&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.id, id) || other.id == id)&&(identical(other.chatRoomId, chatRoomId) || other.chatRoomId == chatRoomId)&&(identical(other.chatRoom, chatRoom) || other.chatRoom == chatRoom)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.account, account) || other.account == account)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.role, role) || other.role == role)&&(identical(other.notify, notify) || other.notify == notify)&&(identical(other.joinedAt, joinedAt) || other.joinedAt == joinedAt)&&(identical(other.isBot, isBot) || other.isBot == isBot)&&(identical(other.lastTyped, lastTyped) || other.lastTyped == lastTyped));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnChatMember&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.id, id) || other.id == id)&&(identical(other.chatRoomId, chatRoomId) || other.chatRoomId == chatRoomId)&&(identical(other.chatRoom, chatRoom) || other.chatRoom == chatRoom)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.account, account) || other.account == account)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.role, role) || other.role == role)&&(identical(other.notify, notify) || other.notify == notify)&&(identical(other.joinedAt, joinedAt) || other.joinedAt == joinedAt)&&(identical(other.breakUntil, breakUntil) || other.breakUntil == breakUntil)&&(identical(other.timeoutUntil, timeoutUntil) || other.timeoutUntil == timeoutUntil)&&(identical(other.isBot, isBot) || other.isBot == isBot)&&(identical(other.lastTyped, lastTyped) || other.lastTyped == lastTyped));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,createdAt,updatedAt,deletedAt,id,chatRoomId,chatRoom,accountId,account,nick,role,notify,joinedAt,isBot,lastTyped);
|
||||
int get hashCode => Object.hash(runtimeType,createdAt,updatedAt,deletedAt,id,chatRoomId,chatRoom,accountId,account,nick,role,notify,joinedAt,breakUntil,timeoutUntil,isBot,lastTyped);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnChatMember(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, chatRoomId: $chatRoomId, chatRoom: $chatRoom, accountId: $accountId, account: $account, nick: $nick, role: $role, notify: $notify, joinedAt: $joinedAt, isBot: $isBot, lastTyped: $lastTyped)';
|
||||
return 'SnChatMember(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, chatRoomId: $chatRoomId, chatRoom: $chatRoom, accountId: $accountId, account: $account, nick: $nick, role: $role, notify: $notify, joinedAt: $joinedAt, breakUntil: $breakUntil, timeoutUntil: $timeoutUntil, isBot: $isBot, lastTyped: $lastTyped)';
|
||||
}
|
||||
|
||||
|
||||
@ -812,7 +818,7 @@ abstract mixin class _$SnChatMemberCopyWith<$Res> implements $SnChatMemberCopyWi
|
||||
factory _$SnChatMemberCopyWith(_SnChatMember value, $Res Function(_SnChatMember) _then) = __$SnChatMemberCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int role, int notify, DateTime? joinedAt, bool isBot, DateTime? lastTyped
|
||||
DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int role, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, bool isBot, DateTime? lastTyped
|
||||
});
|
||||
|
||||
|
||||
@ -829,7 +835,7 @@ class __$SnChatMemberCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnChatMember
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? id = null,Object? chatRoomId = null,Object? chatRoom = freezed,Object? accountId = null,Object? account = null,Object? nick = freezed,Object? role = null,Object? notify = null,Object? joinedAt = freezed,Object? isBot = null,Object? lastTyped = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? id = null,Object? chatRoomId = null,Object? chatRoom = freezed,Object? accountId = null,Object? account = null,Object? nick = freezed,Object? role = null,Object? notify = null,Object? joinedAt = freezed,Object? breakUntil = freezed,Object? timeoutUntil = freezed,Object? isBot = null,Object? lastTyped = freezed,}) {
|
||||
return _then(_SnChatMember(
|
||||
createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
@ -843,6 +849,8 @@ as SnAccount,nick: freezed == nick ? _self.nick : nick // ignore: cast_nullable_
|
||||
as String?,role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
|
||||
as int,notify: null == notify ? _self.notify : notify // ignore: cast_nullable_to_non_nullable
|
||||
as int,joinedAt: freezed == joinedAt ? _self.joinedAt : joinedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,breakUntil: freezed == breakUntil ? _self.breakUntil : breakUntil // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,timeoutUntil: freezed == timeoutUntil ? _self.timeoutUntil : timeoutUntil // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,isBot: null == isBot ? _self.isBot : isBot // ignore: cast_nullable_to_non_nullable
|
||||
as bool,lastTyped: freezed == lastTyped ? _self.lastTyped : lastTyped // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
|
@ -166,6 +166,14 @@ _SnChatMember _$SnChatMemberFromJson(Map<String, dynamic> json) =>
|
||||
json['joined_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['joined_at'] as String),
|
||||
breakUntil:
|
||||
json['break_until'] == null
|
||||
? null
|
||||
: DateTime.parse(json['break_until'] as String),
|
||||
timeoutUntil:
|
||||
json['timeout_until'] == null
|
||||
? null
|
||||
: DateTime.parse(json['timeout_until'] as String),
|
||||
isBot: json['is_bot'] as bool,
|
||||
lastTyped:
|
||||
json['last_typed'] == null
|
||||
@ -187,6 +195,8 @@ Map<String, dynamic> _$SnChatMemberToJson(_SnChatMember instance) =>
|
||||
'role': instance.role,
|
||||
'notify': instance.notify,
|
||||
'joined_at': instance.joinedAt?.toIso8601String(),
|
||||
'break_until': instance.breakUntil?.toIso8601String(),
|
||||
'timeout_until': instance.timeoutUntil?.toIso8601String(),
|
||||
'is_bot': instance.isBot,
|
||||
'last_typed': instance.lastTyped?.toIso8601String(),
|
||||
};
|
||||
|
@ -59,6 +59,7 @@ sealed class SnPublisher with _$SnPublisher {
|
||||
required DateTime updatedAt,
|
||||
required DateTime? deletedAt,
|
||||
required String? realmId,
|
||||
required SnVerificationMark? verification,
|
||||
}) = _SnPublisher;
|
||||
|
||||
factory SnPublisher.fromJson(Map<String, dynamic> json) =>
|
||||
|
@ -370,7 +370,7 @@ $SnPublisherCopyWith<$Res> get publisher {
|
||||
/// @nodoc
|
||||
mixin _$SnPublisher {
|
||||
|
||||
String get id; int get type; String get name; String get nick; String get bio; SnCloudFile? get picture; SnCloudFile? get background; SnAccount? get account; String? get accountId; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; String? get realmId;
|
||||
String get id; int get type; String get name; String get nick; String get bio; SnCloudFile? get picture; SnCloudFile? get background; SnAccount? get account; String? get accountId; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; String? get realmId; SnVerificationMark? get verification;
|
||||
/// Create a copy of SnPublisher
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@ -383,16 +383,16 @@ $SnPublisherCopyWith<SnPublisher> get copyWith => _$SnPublisherCopyWithImpl<SnPu
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnPublisher&&(identical(other.id, id) || other.id == id)&&(identical(other.type, type) || other.type == type)&&(identical(other.name, name) || other.name == name)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.bio, bio) || other.bio == bio)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.account, account) || other.account == account)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.realmId, realmId) || other.realmId == realmId));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnPublisher&&(identical(other.id, id) || other.id == id)&&(identical(other.type, type) || other.type == type)&&(identical(other.name, name) || other.name == name)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.bio, bio) || other.bio == bio)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.account, account) || other.account == account)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.realmId, realmId) || other.realmId == realmId)&&(identical(other.verification, verification) || other.verification == verification));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,type,name,nick,bio,picture,background,account,accountId,createdAt,updatedAt,deletedAt,realmId);
|
||||
int get hashCode => Object.hash(runtimeType,id,type,name,nick,bio,picture,background,account,accountId,createdAt,updatedAt,deletedAt,realmId,verification);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnPublisher(id: $id, type: $type, name: $name, nick: $nick, bio: $bio, picture: $picture, background: $background, account: $account, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, realmId: $realmId)';
|
||||
return 'SnPublisher(id: $id, type: $type, name: $name, nick: $nick, bio: $bio, picture: $picture, background: $background, account: $account, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, realmId: $realmId, verification: $verification)';
|
||||
}
|
||||
|
||||
|
||||
@ -403,11 +403,11 @@ abstract mixin class $SnPublisherCopyWith<$Res> {
|
||||
factory $SnPublisherCopyWith(SnPublisher value, $Res Function(SnPublisher) _then) = _$SnPublisherCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, int type, String name, String nick, String bio, SnCloudFile? picture, SnCloudFile? background, SnAccount? account, String? accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String? realmId
|
||||
String id, int type, String name, String nick, String bio, SnCloudFile? picture, SnCloudFile? background, SnAccount? account, String? accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String? realmId, SnVerificationMark? verification
|
||||
});
|
||||
|
||||
|
||||
$SnCloudFileCopyWith<$Res>? get picture;$SnCloudFileCopyWith<$Res>? get background;$SnAccountCopyWith<$Res>? get account;
|
||||
$SnCloudFileCopyWith<$Res>? get picture;$SnCloudFileCopyWith<$Res>? get background;$SnAccountCopyWith<$Res>? get account;$SnVerificationMarkCopyWith<$Res>? get verification;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
@ -420,7 +420,7 @@ class _$SnPublisherCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnPublisher
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? type = null,Object? name = null,Object? nick = null,Object? bio = null,Object? picture = freezed,Object? background = freezed,Object? account = freezed,Object? accountId = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? realmId = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? type = null,Object? name = null,Object? nick = null,Object? bio = null,Object? picture = freezed,Object? background = freezed,Object? account = freezed,Object? accountId = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? realmId = freezed,Object? verification = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
||||
@ -435,7 +435,8 @@ as String?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore:
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,realmId: freezed == realmId ? _self.realmId : realmId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
as String?,verification: freezed == verification ? _self.verification : verification // ignore: cast_nullable_to_non_nullable
|
||||
as SnVerificationMark?,
|
||||
));
|
||||
}
|
||||
/// Create a copy of SnPublisher
|
||||
@ -474,6 +475,18 @@ $SnAccountCopyWith<$Res>? get account {
|
||||
return $SnAccountCopyWith<$Res>(_self.account!, (value) {
|
||||
return _then(_self.copyWith(account: value));
|
||||
});
|
||||
}/// Create a copy of SnPublisher
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnVerificationMarkCopyWith<$Res>? get verification {
|
||||
if (_self.verification == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SnVerificationMarkCopyWith<$Res>(_self.verification!, (value) {
|
||||
return _then(_self.copyWith(verification: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -482,7 +495,7 @@ $SnAccountCopyWith<$Res>? get account {
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnPublisher implements SnPublisher {
|
||||
const _SnPublisher({required this.id, required this.type, required this.name, required this.nick, this.bio = '', required this.picture, required this.background, required this.account, required this.accountId, required this.createdAt, required this.updatedAt, required this.deletedAt, required this.realmId});
|
||||
const _SnPublisher({required this.id, required this.type, required this.name, required this.nick, this.bio = '', required this.picture, required this.background, required this.account, required this.accountId, required this.createdAt, required this.updatedAt, required this.deletedAt, required this.realmId, required this.verification});
|
||||
factory _SnPublisher.fromJson(Map<String, dynamic> json) => _$SnPublisherFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@ -498,6 +511,7 @@ class _SnPublisher implements SnPublisher {
|
||||
@override final DateTime updatedAt;
|
||||
@override final DateTime? deletedAt;
|
||||
@override final String? realmId;
|
||||
@override final SnVerificationMark? verification;
|
||||
|
||||
/// Create a copy of SnPublisher
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@ -512,16 +526,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnPublisher&&(identical(other.id, id) || other.id == id)&&(identical(other.type, type) || other.type == type)&&(identical(other.name, name) || other.name == name)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.bio, bio) || other.bio == bio)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.account, account) || other.account == account)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.realmId, realmId) || other.realmId == realmId));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnPublisher&&(identical(other.id, id) || other.id == id)&&(identical(other.type, type) || other.type == type)&&(identical(other.name, name) || other.name == name)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.bio, bio) || other.bio == bio)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.account, account) || other.account == account)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.realmId, realmId) || other.realmId == realmId)&&(identical(other.verification, verification) || other.verification == verification));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,type,name,nick,bio,picture,background,account,accountId,createdAt,updatedAt,deletedAt,realmId);
|
||||
int get hashCode => Object.hash(runtimeType,id,type,name,nick,bio,picture,background,account,accountId,createdAt,updatedAt,deletedAt,realmId,verification);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnPublisher(id: $id, type: $type, name: $name, nick: $nick, bio: $bio, picture: $picture, background: $background, account: $account, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, realmId: $realmId)';
|
||||
return 'SnPublisher(id: $id, type: $type, name: $name, nick: $nick, bio: $bio, picture: $picture, background: $background, account: $account, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, realmId: $realmId, verification: $verification)';
|
||||
}
|
||||
|
||||
|
||||
@ -532,11 +546,11 @@ abstract mixin class _$SnPublisherCopyWith<$Res> implements $SnPublisherCopyWith
|
||||
factory _$SnPublisherCopyWith(_SnPublisher value, $Res Function(_SnPublisher) _then) = __$SnPublisherCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, int type, String name, String nick, String bio, SnCloudFile? picture, SnCloudFile? background, SnAccount? account, String? accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String? realmId
|
||||
String id, int type, String name, String nick, String bio, SnCloudFile? picture, SnCloudFile? background, SnAccount? account, String? accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String? realmId, SnVerificationMark? verification
|
||||
});
|
||||
|
||||
|
||||
@override $SnCloudFileCopyWith<$Res>? get picture;@override $SnCloudFileCopyWith<$Res>? get background;@override $SnAccountCopyWith<$Res>? get account;
|
||||
@override $SnCloudFileCopyWith<$Res>? get picture;@override $SnCloudFileCopyWith<$Res>? get background;@override $SnAccountCopyWith<$Res>? get account;@override $SnVerificationMarkCopyWith<$Res>? get verification;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
@ -549,7 +563,7 @@ class __$SnPublisherCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnPublisher
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? type = null,Object? name = null,Object? nick = null,Object? bio = null,Object? picture = freezed,Object? background = freezed,Object? account = freezed,Object? accountId = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? realmId = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? type = null,Object? name = null,Object? nick = null,Object? bio = null,Object? picture = freezed,Object? background = freezed,Object? account = freezed,Object? accountId = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? realmId = freezed,Object? verification = freezed,}) {
|
||||
return _then(_SnPublisher(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
||||
@ -564,7 +578,8 @@ as String?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore:
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,realmId: freezed == realmId ? _self.realmId : realmId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
as String?,verification: freezed == verification ? _self.verification : verification // ignore: cast_nullable_to_non_nullable
|
||||
as SnVerificationMark?,
|
||||
));
|
||||
}
|
||||
|
||||
@ -604,6 +619,18 @@ $SnAccountCopyWith<$Res>? get account {
|
||||
return $SnAccountCopyWith<$Res>(_self.account!, (value) {
|
||||
return _then(_self.copyWith(account: value));
|
||||
});
|
||||
}/// Create a copy of SnPublisher
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnVerificationMarkCopyWith<$Res>? get verification {
|
||||
if (_self.verification == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SnVerificationMarkCopyWith<$Res>(_self.verification!, (value) {
|
||||
return _then(_self.copyWith(verification: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -120,6 +120,12 @@ _SnPublisher _$SnPublisherFromJson(Map<String, dynamic> json) => _SnPublisher(
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
realmId: json['realm_id'] as String?,
|
||||
verification:
|
||||
json['verification'] == null
|
||||
? null
|
||||
: SnVerificationMark.fromJson(
|
||||
json['verification'] as Map<String, dynamic>,
|
||||
),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnPublisherToJson(_SnPublisher instance) =>
|
||||
@ -137,6 +143,7 @@ Map<String, dynamic> _$SnPublisherToJson(_SnPublisher instance) =>
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
'realm_id': instance.realmId,
|
||||
'verification': instance.verification?.toJson(),
|
||||
};
|
||||
|
||||
_SnPublisherStats _$SnPublisherStatsFromJson(Map<String, dynamic> json) =>
|
||||
|
@ -27,15 +27,23 @@ sealed class SnAccount with _$SnAccount {
|
||||
sealed class SnAccountProfile with _$SnAccountProfile {
|
||||
const factory SnAccountProfile({
|
||||
required String id,
|
||||
required String? firstName,
|
||||
required String? middleName,
|
||||
required String? lastName,
|
||||
@Default('') String firstName,
|
||||
@Default('') String middleName,
|
||||
@Default('') String lastName,
|
||||
@Default('') String bio,
|
||||
@Default('') String gender,
|
||||
@Default('') String pronouns,
|
||||
@Default('') String location,
|
||||
@Default('') String timeZone,
|
||||
DateTime? birthday,
|
||||
DateTime? lastSeenAt,
|
||||
SnAccountBadge? activeBadge,
|
||||
required int experience,
|
||||
required int level,
|
||||
required double levelingProgress,
|
||||
required SnCloudFile? picture,
|
||||
required SnCloudFile? background,
|
||||
required SnVerificationMark? verification,
|
||||
required DateTime createdAt,
|
||||
required DateTime updatedAt,
|
||||
required DateTime? deletedAt,
|
||||
@ -78,6 +86,7 @@ sealed class SnAccountBadge with _$SnAccountBadge {
|
||||
required String accountId,
|
||||
required DateTime createdAt,
|
||||
required DateTime updatedAt,
|
||||
required DateTime? activatedAt,
|
||||
required DateTime? deletedAt,
|
||||
}) = _SnAccountBadge;
|
||||
|
||||
@ -123,3 +132,16 @@ sealed class SnNotification with _$SnNotification {
|
||||
factory SnNotification.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnNotificationFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class SnVerificationMark with _$SnVerificationMark {
|
||||
const factory SnVerificationMark({
|
||||
required int type,
|
||||
required String? title,
|
||||
required String? description,
|
||||
required String? verifiedBy,
|
||||
}) = _SnVerificationMark;
|
||||
|
||||
factory SnVerificationMark.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnVerificationMarkFromJson(json);
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ $SnAccountProfileCopyWith<$Res> get profile {
|
||||
/// @nodoc
|
||||
mixin _$SnAccountProfile {
|
||||
|
||||
String get id; String? get firstName; String? get middleName; String? get lastName; String get bio; int get experience; int get level; double get levelingProgress; SnCloudFile? get picture; SnCloudFile? get background; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
||||
String get id; String get firstName; String get middleName; String get lastName; String get bio; String get gender; String get pronouns; String get location; String get timeZone; DateTime? get birthday; DateTime? get lastSeenAt; SnAccountBadge? get activeBadge; int get experience; int get level; double get levelingProgress; SnCloudFile? get picture; SnCloudFile? get background; SnVerificationMark? get verification; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
||||
/// Create a copy of SnAccountProfile
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@ -213,16 +213,16 @@ $SnAccountProfileCopyWith<SnAccountProfile> get copyWith => _$SnAccountProfileCo
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAccountProfile&&(identical(other.id, id) || other.id == id)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.middleName, middleName) || other.middleName == middleName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.bio, bio) || other.bio == bio)&&(identical(other.experience, experience) || other.experience == experience)&&(identical(other.level, level) || other.level == level)&&(identical(other.levelingProgress, levelingProgress) || other.levelingProgress == levelingProgress)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAccountProfile&&(identical(other.id, id) || other.id == id)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.middleName, middleName) || other.middleName == middleName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.bio, bio) || other.bio == bio)&&(identical(other.gender, gender) || other.gender == gender)&&(identical(other.pronouns, pronouns) || other.pronouns == pronouns)&&(identical(other.location, location) || other.location == location)&&(identical(other.timeZone, timeZone) || other.timeZone == timeZone)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.lastSeenAt, lastSeenAt) || other.lastSeenAt == lastSeenAt)&&(identical(other.activeBadge, activeBadge) || other.activeBadge == activeBadge)&&(identical(other.experience, experience) || other.experience == experience)&&(identical(other.level, level) || other.level == level)&&(identical(other.levelingProgress, levelingProgress) || other.levelingProgress == levelingProgress)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.verification, verification) || other.verification == verification)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,firstName,middleName,lastName,bio,experience,level,levelingProgress,picture,background,createdAt,updatedAt,deletedAt);
|
||||
int get hashCode => Object.hashAll([runtimeType,id,firstName,middleName,lastName,bio,gender,pronouns,location,timeZone,birthday,lastSeenAt,activeBadge,experience,level,levelingProgress,picture,background,verification,createdAt,updatedAt,deletedAt]);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnAccountProfile(id: $id, firstName: $firstName, middleName: $middleName, lastName: $lastName, bio: $bio, experience: $experience, level: $level, levelingProgress: $levelingProgress, picture: $picture, background: $background, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
return 'SnAccountProfile(id: $id, firstName: $firstName, middleName: $middleName, lastName: $lastName, bio: $bio, gender: $gender, pronouns: $pronouns, location: $location, timeZone: $timeZone, birthday: $birthday, lastSeenAt: $lastSeenAt, activeBadge: $activeBadge, experience: $experience, level: $level, levelingProgress: $levelingProgress, picture: $picture, background: $background, verification: $verification, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
}
|
||||
|
||||
|
||||
@ -233,11 +233,11 @@ abstract mixin class $SnAccountProfileCopyWith<$Res> {
|
||||
factory $SnAccountProfileCopyWith(SnAccountProfile value, $Res Function(SnAccountProfile) _then) = _$SnAccountProfileCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String? firstName, String? middleName, String? lastName, String bio, int experience, int level, double levelingProgress, SnCloudFile? picture, SnCloudFile? background, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
String id, String firstName, String middleName, String lastName, String bio, String gender, String pronouns, String location, String timeZone, DateTime? birthday, DateTime? lastSeenAt, SnAccountBadge? activeBadge, int experience, int level, double levelingProgress, SnCloudFile? picture, SnCloudFile? background, SnVerificationMark? verification, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
});
|
||||
|
||||
|
||||
$SnCloudFileCopyWith<$Res>? get picture;$SnCloudFileCopyWith<$Res>? get background;
|
||||
$SnAccountBadgeCopyWith<$Res>? get activeBadge;$SnCloudFileCopyWith<$Res>? get picture;$SnCloudFileCopyWith<$Res>? get background;$SnVerificationMarkCopyWith<$Res>? get verification;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
@ -250,19 +250,27 @@ class _$SnAccountProfileCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnAccountProfile
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? firstName = freezed,Object? middleName = freezed,Object? lastName = freezed,Object? bio = null,Object? experience = null,Object? level = null,Object? levelingProgress = null,Object? picture = freezed,Object? background = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? firstName = null,Object? middleName = null,Object? lastName = null,Object? bio = null,Object? gender = null,Object? pronouns = null,Object? location = null,Object? timeZone = null,Object? birthday = freezed,Object? lastSeenAt = freezed,Object? activeBadge = freezed,Object? experience = null,Object? level = null,Object? levelingProgress = null,Object? picture = freezed,Object? background = freezed,Object? verification = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,middleName: freezed == middleName ? _self.middleName : middleName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,bio: null == bio ? _self.bio : bio // ignore: cast_nullable_to_non_nullable
|
||||
as String,experience: null == experience ? _self.experience : experience // ignore: cast_nullable_to_non_nullable
|
||||
as String,firstName: null == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
as String,middleName: null == middleName ? _self.middleName : middleName // ignore: cast_nullable_to_non_nullable
|
||||
as String,lastName: null == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
|
||||
as String,bio: null == bio ? _self.bio : bio // ignore: cast_nullable_to_non_nullable
|
||||
as String,gender: null == gender ? _self.gender : gender // ignore: cast_nullable_to_non_nullable
|
||||
as String,pronouns: null == pronouns ? _self.pronouns : pronouns // ignore: cast_nullable_to_non_nullable
|
||||
as String,location: null == location ? _self.location : location // ignore: cast_nullable_to_non_nullable
|
||||
as String,timeZone: null == timeZone ? _self.timeZone : timeZone // ignore: cast_nullable_to_non_nullable
|
||||
as String,birthday: freezed == birthday ? _self.birthday : birthday // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,lastSeenAt: freezed == lastSeenAt ? _self.lastSeenAt : lastSeenAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,activeBadge: freezed == activeBadge ? _self.activeBadge : activeBadge // ignore: cast_nullable_to_non_nullable
|
||||
as SnAccountBadge?,experience: null == experience ? _self.experience : experience // ignore: cast_nullable_to_non_nullable
|
||||
as int,level: null == level ? _self.level : level // ignore: cast_nullable_to_non_nullable
|
||||
as int,levelingProgress: null == levelingProgress ? _self.levelingProgress : levelingProgress // ignore: cast_nullable_to_non_nullable
|
||||
as double,picture: freezed == picture ? _self.picture : picture // ignore: cast_nullable_to_non_nullable
|
||||
as SnCloudFile?,background: freezed == background ? _self.background : background // ignore: cast_nullable_to_non_nullable
|
||||
as SnCloudFile?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as SnCloudFile?,verification: freezed == verification ? _self.verification : verification // ignore: cast_nullable_to_non_nullable
|
||||
as SnVerificationMark?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
@ -272,6 +280,18 @@ as DateTime?,
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnAccountBadgeCopyWith<$Res>? get activeBadge {
|
||||
if (_self.activeBadge == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SnAccountBadgeCopyWith<$Res>(_self.activeBadge!, (value) {
|
||||
return _then(_self.copyWith(activeBadge: value));
|
||||
});
|
||||
}/// Create a copy of SnAccountProfile
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnCloudFileCopyWith<$Res>? get picture {
|
||||
if (_self.picture == null) {
|
||||
return null;
|
||||
@ -292,6 +312,18 @@ $SnCloudFileCopyWith<$Res>? get background {
|
||||
return $SnCloudFileCopyWith<$Res>(_self.background!, (value) {
|
||||
return _then(_self.copyWith(background: value));
|
||||
});
|
||||
}/// Create a copy of SnAccountProfile
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnVerificationMarkCopyWith<$Res>? get verification {
|
||||
if (_self.verification == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SnVerificationMarkCopyWith<$Res>(_self.verification!, (value) {
|
||||
return _then(_self.copyWith(verification: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -300,19 +332,27 @@ $SnCloudFileCopyWith<$Res>? get background {
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnAccountProfile implements SnAccountProfile {
|
||||
const _SnAccountProfile({required this.id, required this.firstName, required this.middleName, required this.lastName, this.bio = '', required this.experience, required this.level, required this.levelingProgress, required this.picture, required this.background, required this.createdAt, required this.updatedAt, required this.deletedAt});
|
||||
const _SnAccountProfile({required this.id, this.firstName = '', this.middleName = '', this.lastName = '', this.bio = '', this.gender = '', this.pronouns = '', this.location = '', this.timeZone = '', this.birthday, this.lastSeenAt, this.activeBadge, required this.experience, required this.level, required this.levelingProgress, required this.picture, required this.background, required this.verification, required this.createdAt, required this.updatedAt, required this.deletedAt});
|
||||
factory _SnAccountProfile.fromJson(Map<String, dynamic> json) => _$SnAccountProfileFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@override final String? firstName;
|
||||
@override final String? middleName;
|
||||
@override final String? lastName;
|
||||
@override@JsonKey() final String firstName;
|
||||
@override@JsonKey() final String middleName;
|
||||
@override@JsonKey() final String lastName;
|
||||
@override@JsonKey() final String bio;
|
||||
@override@JsonKey() final String gender;
|
||||
@override@JsonKey() final String pronouns;
|
||||
@override@JsonKey() final String location;
|
||||
@override@JsonKey() final String timeZone;
|
||||
@override final DateTime? birthday;
|
||||
@override final DateTime? lastSeenAt;
|
||||
@override final SnAccountBadge? activeBadge;
|
||||
@override final int experience;
|
||||
@override final int level;
|
||||
@override final double levelingProgress;
|
||||
@override final SnCloudFile? picture;
|
||||
@override final SnCloudFile? background;
|
||||
@override final SnVerificationMark? verification;
|
||||
@override final DateTime createdAt;
|
||||
@override final DateTime updatedAt;
|
||||
@override final DateTime? deletedAt;
|
||||
@ -330,16 +370,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAccountProfile&&(identical(other.id, id) || other.id == id)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.middleName, middleName) || other.middleName == middleName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.bio, bio) || other.bio == bio)&&(identical(other.experience, experience) || other.experience == experience)&&(identical(other.level, level) || other.level == level)&&(identical(other.levelingProgress, levelingProgress) || other.levelingProgress == levelingProgress)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAccountProfile&&(identical(other.id, id) || other.id == id)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.middleName, middleName) || other.middleName == middleName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.bio, bio) || other.bio == bio)&&(identical(other.gender, gender) || other.gender == gender)&&(identical(other.pronouns, pronouns) || other.pronouns == pronouns)&&(identical(other.location, location) || other.location == location)&&(identical(other.timeZone, timeZone) || other.timeZone == timeZone)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.lastSeenAt, lastSeenAt) || other.lastSeenAt == lastSeenAt)&&(identical(other.activeBadge, activeBadge) || other.activeBadge == activeBadge)&&(identical(other.experience, experience) || other.experience == experience)&&(identical(other.level, level) || other.level == level)&&(identical(other.levelingProgress, levelingProgress) || other.levelingProgress == levelingProgress)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.verification, verification) || other.verification == verification)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,firstName,middleName,lastName,bio,experience,level,levelingProgress,picture,background,createdAt,updatedAt,deletedAt);
|
||||
int get hashCode => Object.hashAll([runtimeType,id,firstName,middleName,lastName,bio,gender,pronouns,location,timeZone,birthday,lastSeenAt,activeBadge,experience,level,levelingProgress,picture,background,verification,createdAt,updatedAt,deletedAt]);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnAccountProfile(id: $id, firstName: $firstName, middleName: $middleName, lastName: $lastName, bio: $bio, experience: $experience, level: $level, levelingProgress: $levelingProgress, picture: $picture, background: $background, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
return 'SnAccountProfile(id: $id, firstName: $firstName, middleName: $middleName, lastName: $lastName, bio: $bio, gender: $gender, pronouns: $pronouns, location: $location, timeZone: $timeZone, birthday: $birthday, lastSeenAt: $lastSeenAt, activeBadge: $activeBadge, experience: $experience, level: $level, levelingProgress: $levelingProgress, picture: $picture, background: $background, verification: $verification, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
}
|
||||
|
||||
|
||||
@ -350,11 +390,11 @@ abstract mixin class _$SnAccountProfileCopyWith<$Res> implements $SnAccountProfi
|
||||
factory _$SnAccountProfileCopyWith(_SnAccountProfile value, $Res Function(_SnAccountProfile) _then) = __$SnAccountProfileCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String? firstName, String? middleName, String? lastName, String bio, int experience, int level, double levelingProgress, SnCloudFile? picture, SnCloudFile? background, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
String id, String firstName, String middleName, String lastName, String bio, String gender, String pronouns, String location, String timeZone, DateTime? birthday, DateTime? lastSeenAt, SnAccountBadge? activeBadge, int experience, int level, double levelingProgress, SnCloudFile? picture, SnCloudFile? background, SnVerificationMark? verification, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
});
|
||||
|
||||
|
||||
@override $SnCloudFileCopyWith<$Res>? get picture;@override $SnCloudFileCopyWith<$Res>? get background;
|
||||
@override $SnAccountBadgeCopyWith<$Res>? get activeBadge;@override $SnCloudFileCopyWith<$Res>? get picture;@override $SnCloudFileCopyWith<$Res>? get background;@override $SnVerificationMarkCopyWith<$Res>? get verification;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
@ -367,19 +407,27 @@ class __$SnAccountProfileCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnAccountProfile
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? firstName = freezed,Object? middleName = freezed,Object? lastName = freezed,Object? bio = null,Object? experience = null,Object? level = null,Object? levelingProgress = null,Object? picture = freezed,Object? background = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? firstName = null,Object? middleName = null,Object? lastName = null,Object? bio = null,Object? gender = null,Object? pronouns = null,Object? location = null,Object? timeZone = null,Object? birthday = freezed,Object? lastSeenAt = freezed,Object? activeBadge = freezed,Object? experience = null,Object? level = null,Object? levelingProgress = null,Object? picture = freezed,Object? background = freezed,Object? verification = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
return _then(_SnAccountProfile(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,middleName: freezed == middleName ? _self.middleName : middleName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,bio: null == bio ? _self.bio : bio // ignore: cast_nullable_to_non_nullable
|
||||
as String,experience: null == experience ? _self.experience : experience // ignore: cast_nullable_to_non_nullable
|
||||
as String,firstName: null == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
as String,middleName: null == middleName ? _self.middleName : middleName // ignore: cast_nullable_to_non_nullable
|
||||
as String,lastName: null == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
|
||||
as String,bio: null == bio ? _self.bio : bio // ignore: cast_nullable_to_non_nullable
|
||||
as String,gender: null == gender ? _self.gender : gender // ignore: cast_nullable_to_non_nullable
|
||||
as String,pronouns: null == pronouns ? _self.pronouns : pronouns // ignore: cast_nullable_to_non_nullable
|
||||
as String,location: null == location ? _self.location : location // ignore: cast_nullable_to_non_nullable
|
||||
as String,timeZone: null == timeZone ? _self.timeZone : timeZone // ignore: cast_nullable_to_non_nullable
|
||||
as String,birthday: freezed == birthday ? _self.birthday : birthday // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,lastSeenAt: freezed == lastSeenAt ? _self.lastSeenAt : lastSeenAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,activeBadge: freezed == activeBadge ? _self.activeBadge : activeBadge // ignore: cast_nullable_to_non_nullable
|
||||
as SnAccountBadge?,experience: null == experience ? _self.experience : experience // ignore: cast_nullable_to_non_nullable
|
||||
as int,level: null == level ? _self.level : level // ignore: cast_nullable_to_non_nullable
|
||||
as int,levelingProgress: null == levelingProgress ? _self.levelingProgress : levelingProgress // ignore: cast_nullable_to_non_nullable
|
||||
as double,picture: freezed == picture ? _self.picture : picture // ignore: cast_nullable_to_non_nullable
|
||||
as SnCloudFile?,background: freezed == background ? _self.background : background // ignore: cast_nullable_to_non_nullable
|
||||
as SnCloudFile?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as SnCloudFile?,verification: freezed == verification ? _self.verification : verification // ignore: cast_nullable_to_non_nullable
|
||||
as SnVerificationMark?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
@ -390,6 +438,18 @@ as DateTime?,
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnAccountBadgeCopyWith<$Res>? get activeBadge {
|
||||
if (_self.activeBadge == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SnAccountBadgeCopyWith<$Res>(_self.activeBadge!, (value) {
|
||||
return _then(_self.copyWith(activeBadge: value));
|
||||
});
|
||||
}/// Create a copy of SnAccountProfile
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnCloudFileCopyWith<$Res>? get picture {
|
||||
if (_self.picture == null) {
|
||||
return null;
|
||||
@ -410,6 +470,18 @@ $SnCloudFileCopyWith<$Res>? get background {
|
||||
return $SnCloudFileCopyWith<$Res>(_self.background!, (value) {
|
||||
return _then(_self.copyWith(background: value));
|
||||
});
|
||||
}/// Create a copy of SnAccountProfile
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnVerificationMarkCopyWith<$Res>? get verification {
|
||||
if (_self.verification == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SnVerificationMarkCopyWith<$Res>(_self.verification!, (value) {
|
||||
return _then(_self.copyWith(verification: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -583,7 +655,7 @@ as DateTime?,
|
||||
/// @nodoc
|
||||
mixin _$SnAccountBadge {
|
||||
|
||||
String get id; String get type; String? get label; String? get caption; Map<String, dynamic> get meta; DateTime? get expiredAt; String get accountId; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
||||
String get id; String get type; String? get label; String? get caption; Map<String, dynamic> get meta; DateTime? get expiredAt; String get accountId; DateTime get createdAt; DateTime get updatedAt; DateTime? get activatedAt; DateTime? get deletedAt;
|
||||
/// Create a copy of SnAccountBadge
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@ -596,16 +668,16 @@ $SnAccountBadgeCopyWith<SnAccountBadge> get copyWith => _$SnAccountBadgeCopyWith
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAccountBadge&&(identical(other.id, id) || other.id == id)&&(identical(other.type, type) || other.type == type)&&(identical(other.label, label) || other.label == label)&&(identical(other.caption, caption) || other.caption == caption)&&const DeepCollectionEquality().equals(other.meta, meta)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAccountBadge&&(identical(other.id, id) || other.id == id)&&(identical(other.type, type) || other.type == type)&&(identical(other.label, label) || other.label == label)&&(identical(other.caption, caption) || other.caption == caption)&&const DeepCollectionEquality().equals(other.meta, meta)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.activatedAt, activatedAt) || other.activatedAt == activatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,type,label,caption,const DeepCollectionEquality().hash(meta),expiredAt,accountId,createdAt,updatedAt,deletedAt);
|
||||
int get hashCode => Object.hash(runtimeType,id,type,label,caption,const DeepCollectionEquality().hash(meta),expiredAt,accountId,createdAt,updatedAt,activatedAt,deletedAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnAccountBadge(id: $id, type: $type, label: $label, caption: $caption, meta: $meta, expiredAt: $expiredAt, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
return 'SnAccountBadge(id: $id, type: $type, label: $label, caption: $caption, meta: $meta, expiredAt: $expiredAt, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, activatedAt: $activatedAt, deletedAt: $deletedAt)';
|
||||
}
|
||||
|
||||
|
||||
@ -616,7 +688,7 @@ abstract mixin class $SnAccountBadgeCopyWith<$Res> {
|
||||
factory $SnAccountBadgeCopyWith(SnAccountBadge value, $Res Function(SnAccountBadge) _then) = _$SnAccountBadgeCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String type, String? label, String? caption, Map<String, dynamic> meta, DateTime? expiredAt, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
String id, String type, String? label, String? caption, Map<String, dynamic> meta, DateTime? expiredAt, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? activatedAt, DateTime? deletedAt
|
||||
});
|
||||
|
||||
|
||||
@ -633,7 +705,7 @@ class _$SnAccountBadgeCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnAccountBadge
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? type = null,Object? label = freezed,Object? caption = freezed,Object? meta = null,Object? expiredAt = freezed,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? type = null,Object? label = freezed,Object? caption = freezed,Object? meta = null,Object? expiredAt = freezed,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? activatedAt = freezed,Object? deletedAt = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
||||
@ -644,7 +716,8 @@ as Map<String, dynamic>,expiredAt: freezed == expiredAt ? _self.expiredAt : expi
|
||||
as DateTime?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||
as String,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,activatedAt: freezed == activatedAt ? _self.activatedAt : activatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
));
|
||||
}
|
||||
@ -656,7 +729,7 @@ as DateTime?,
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnAccountBadge implements SnAccountBadge {
|
||||
const _SnAccountBadge({required this.id, required this.type, required this.label, required this.caption, required final Map<String, dynamic> meta, required this.expiredAt, required this.accountId, required this.createdAt, required this.updatedAt, required this.deletedAt}): _meta = meta;
|
||||
const _SnAccountBadge({required this.id, required this.type, required this.label, required this.caption, required final Map<String, dynamic> meta, required this.expiredAt, required this.accountId, required this.createdAt, required this.updatedAt, required this.activatedAt, required this.deletedAt}): _meta = meta;
|
||||
factory _SnAccountBadge.fromJson(Map<String, dynamic> json) => _$SnAccountBadgeFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@ -674,6 +747,7 @@ class _SnAccountBadge implements SnAccountBadge {
|
||||
@override final String accountId;
|
||||
@override final DateTime createdAt;
|
||||
@override final DateTime updatedAt;
|
||||
@override final DateTime? activatedAt;
|
||||
@override final DateTime? deletedAt;
|
||||
|
||||
/// Create a copy of SnAccountBadge
|
||||
@ -689,16 +763,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAccountBadge&&(identical(other.id, id) || other.id == id)&&(identical(other.type, type) || other.type == type)&&(identical(other.label, label) || other.label == label)&&(identical(other.caption, caption) || other.caption == caption)&&const DeepCollectionEquality().equals(other._meta, _meta)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAccountBadge&&(identical(other.id, id) || other.id == id)&&(identical(other.type, type) || other.type == type)&&(identical(other.label, label) || other.label == label)&&(identical(other.caption, caption) || other.caption == caption)&&const DeepCollectionEquality().equals(other._meta, _meta)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.activatedAt, activatedAt) || other.activatedAt == activatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,type,label,caption,const DeepCollectionEquality().hash(_meta),expiredAt,accountId,createdAt,updatedAt,deletedAt);
|
||||
int get hashCode => Object.hash(runtimeType,id,type,label,caption,const DeepCollectionEquality().hash(_meta),expiredAt,accountId,createdAt,updatedAt,activatedAt,deletedAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnAccountBadge(id: $id, type: $type, label: $label, caption: $caption, meta: $meta, expiredAt: $expiredAt, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
return 'SnAccountBadge(id: $id, type: $type, label: $label, caption: $caption, meta: $meta, expiredAt: $expiredAt, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, activatedAt: $activatedAt, deletedAt: $deletedAt)';
|
||||
}
|
||||
|
||||
|
||||
@ -709,7 +783,7 @@ abstract mixin class _$SnAccountBadgeCopyWith<$Res> implements $SnAccountBadgeCo
|
||||
factory _$SnAccountBadgeCopyWith(_SnAccountBadge value, $Res Function(_SnAccountBadge) _then) = __$SnAccountBadgeCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String type, String? label, String? caption, Map<String, dynamic> meta, DateTime? expiredAt, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
String id, String type, String? label, String? caption, Map<String, dynamic> meta, DateTime? expiredAt, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? activatedAt, DateTime? deletedAt
|
||||
});
|
||||
|
||||
|
||||
@ -726,7 +800,7 @@ class __$SnAccountBadgeCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnAccountBadge
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? type = null,Object? label = freezed,Object? caption = freezed,Object? meta = null,Object? expiredAt = freezed,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? type = null,Object? label = freezed,Object? caption = freezed,Object? meta = null,Object? expiredAt = freezed,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? activatedAt = freezed,Object? deletedAt = freezed,}) {
|
||||
return _then(_SnAccountBadge(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
||||
@ -737,7 +811,8 @@ as Map<String, dynamic>,expiredAt: freezed == expiredAt ? _self.expiredAt : expi
|
||||
as DateTime?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||
as String,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,activatedAt: freezed == activatedAt ? _self.activatedAt : activatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
));
|
||||
}
|
||||
@ -1072,6 +1147,148 @@ as String,
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SnVerificationMark {
|
||||
|
||||
int get type; String? get title; String? get description; String? get verifiedBy;
|
||||
/// Create a copy of SnVerificationMark
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnVerificationMarkCopyWith<SnVerificationMark> get copyWith => _$SnVerificationMarkCopyWithImpl<SnVerificationMark>(this as SnVerificationMark, _$identity);
|
||||
|
||||
/// Serializes this SnVerificationMark to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnVerificationMark&&(identical(other.type, type) || other.type == type)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.verifiedBy, verifiedBy) || other.verifiedBy == verifiedBy));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,type,title,description,verifiedBy);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnVerificationMark(type: $type, title: $title, description: $description, verifiedBy: $verifiedBy)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $SnVerificationMarkCopyWith<$Res> {
|
||||
factory $SnVerificationMarkCopyWith(SnVerificationMark value, $Res Function(SnVerificationMark) _then) = _$SnVerificationMarkCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
int type, String? title, String? description, String? verifiedBy
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$SnVerificationMarkCopyWithImpl<$Res>
|
||||
implements $SnVerificationMarkCopyWith<$Res> {
|
||||
_$SnVerificationMarkCopyWithImpl(this._self, this._then);
|
||||
|
||||
final SnVerificationMark _self;
|
||||
final $Res Function(SnVerificationMark) _then;
|
||||
|
||||
/// Create a copy of SnVerificationMark
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? type = null,Object? title = freezed,Object? description = freezed,Object? verifiedBy = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
||||
as int,title: freezed == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
|
||||
as String?,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||
as String?,verifiedBy: freezed == verifiedBy ? _self.verifiedBy : verifiedBy // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnVerificationMark implements SnVerificationMark {
|
||||
const _SnVerificationMark({required this.type, required this.title, required this.description, required this.verifiedBy});
|
||||
factory _SnVerificationMark.fromJson(Map<String, dynamic> json) => _$SnVerificationMarkFromJson(json);
|
||||
|
||||
@override final int type;
|
||||
@override final String? title;
|
||||
@override final String? description;
|
||||
@override final String? verifiedBy;
|
||||
|
||||
/// Create a copy of SnVerificationMark
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$SnVerificationMarkCopyWith<_SnVerificationMark> get copyWith => __$SnVerificationMarkCopyWithImpl<_SnVerificationMark>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$SnVerificationMarkToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnVerificationMark&&(identical(other.type, type) || other.type == type)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.verifiedBy, verifiedBy) || other.verifiedBy == verifiedBy));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,type,title,description,verifiedBy);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnVerificationMark(type: $type, title: $title, description: $description, verifiedBy: $verifiedBy)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$SnVerificationMarkCopyWith<$Res> implements $SnVerificationMarkCopyWith<$Res> {
|
||||
factory _$SnVerificationMarkCopyWith(_SnVerificationMark value, $Res Function(_SnVerificationMark) _then) = __$SnVerificationMarkCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
int type, String? title, String? description, String? verifiedBy
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$SnVerificationMarkCopyWithImpl<$Res>
|
||||
implements _$SnVerificationMarkCopyWith<$Res> {
|
||||
__$SnVerificationMarkCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _SnVerificationMark _self;
|
||||
final $Res Function(_SnVerificationMark) _then;
|
||||
|
||||
/// Create a copy of SnVerificationMark
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? type = null,Object? title = freezed,Object? description = freezed,Object? verifiedBy = freezed,}) {
|
||||
return _then(_SnVerificationMark(
|
||||
type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
||||
as int,title: freezed == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
|
||||
as String?,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||
as String?,verifiedBy: freezed == verifiedBy ? _self.verifiedBy : verifiedBy // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
@ -43,10 +43,28 @@ Map<String, dynamic> _$SnAccountToJson(_SnAccount instance) =>
|
||||
_SnAccountProfile _$SnAccountProfileFromJson(Map<String, dynamic> json) =>
|
||||
_SnAccountProfile(
|
||||
id: json['id'] as String,
|
||||
firstName: json['first_name'] as String?,
|
||||
middleName: json['middle_name'] as String?,
|
||||
lastName: json['last_name'] as String?,
|
||||
firstName: json['first_name'] as String? ?? '',
|
||||
middleName: json['middle_name'] as String? ?? '',
|
||||
lastName: json['last_name'] as String? ?? '',
|
||||
bio: json['bio'] as String? ?? '',
|
||||
gender: json['gender'] as String? ?? '',
|
||||
pronouns: json['pronouns'] as String? ?? '',
|
||||
location: json['location'] as String? ?? '',
|
||||
timeZone: json['time_zone'] as String? ?? '',
|
||||
birthday:
|
||||
json['birthday'] == null
|
||||
? null
|
||||
: DateTime.parse(json['birthday'] as String),
|
||||
lastSeenAt:
|
||||
json['last_seen_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['last_seen_at'] as String),
|
||||
activeBadge:
|
||||
json['active_badge'] == null
|
||||
? null
|
||||
: SnAccountBadge.fromJson(
|
||||
json['active_badge'] as Map<String, dynamic>,
|
||||
),
|
||||
experience: (json['experience'] as num).toInt(),
|
||||
level: (json['level'] as num).toInt(),
|
||||
levelingProgress: (json['leveling_progress'] as num).toDouble(),
|
||||
@ -60,6 +78,12 @@ _SnAccountProfile _$SnAccountProfileFromJson(Map<String, dynamic> json) =>
|
||||
: SnCloudFile.fromJson(
|
||||
json['background'] as Map<String, dynamic>,
|
||||
),
|
||||
verification:
|
||||
json['verification'] == null
|
||||
? null
|
||||
: SnVerificationMark.fromJson(
|
||||
json['verification'] as Map<String, dynamic>,
|
||||
),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
@ -75,11 +99,19 @@ Map<String, dynamic> _$SnAccountProfileToJson(_SnAccountProfile instance) =>
|
||||
'middle_name': instance.middleName,
|
||||
'last_name': instance.lastName,
|
||||
'bio': instance.bio,
|
||||
'gender': instance.gender,
|
||||
'pronouns': instance.pronouns,
|
||||
'location': instance.location,
|
||||
'time_zone': instance.timeZone,
|
||||
'birthday': instance.birthday?.toIso8601String(),
|
||||
'last_seen_at': instance.lastSeenAt?.toIso8601String(),
|
||||
'active_badge': instance.activeBadge?.toJson(),
|
||||
'experience': instance.experience,
|
||||
'level': instance.level,
|
||||
'leveling_progress': instance.levelingProgress,
|
||||
'picture': instance.picture?.toJson(),
|
||||
'background': instance.background?.toJson(),
|
||||
'verification': instance.verification?.toJson(),
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
@ -137,6 +169,10 @@ _SnAccountBadge _$SnAccountBadgeFromJson(Map<String, dynamic> json) =>
|
||||
accountId: json['account_id'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
activatedAt:
|
||||
json['activated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['activated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
@ -154,6 +190,7 @@ Map<String, dynamic> _$SnAccountBadgeToJson(_SnAccountBadge instance) =>
|
||||
'account_id': instance.accountId,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'activated_at': instance.activatedAt?.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
};
|
||||
|
||||
@ -226,3 +263,19 @@ Map<String, dynamic> _$SnNotificationToJson(_SnNotification instance) =>
|
||||
'viewed_at': instance.viewedAt?.toIso8601String(),
|
||||
'account_id': instance.accountId,
|
||||
};
|
||||
|
||||
_SnVerificationMark _$SnVerificationMarkFromJson(Map<String, dynamic> json) =>
|
||||
_SnVerificationMark(
|
||||
type: (json['type'] as num).toInt(),
|
||||
title: json['title'] as String?,
|
||||
description: json['description'] as String?,
|
||||
verifiedBy: json['verified_by'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnVerificationMarkToJson(_SnVerificationMark instance) =>
|
||||
<String, dynamic>{
|
||||
'type': instance.type,
|
||||
'title': instance.title,
|
||||
'description': instance.description,
|
||||
'verified_by': instance.verifiedBy,
|
||||
};
|
||||
|
56
lib/pods/event_calendar.dart
Normal file
56
lib/pods/event_calendar.dart
Normal file
@ -0,0 +1,56 @@
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/activity.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
part 'event_calendar.g.dart';
|
||||
|
||||
/// Query parameters for fetching event calendar data
|
||||
class EventCalendarQuery {
|
||||
/// Username to fetch calendar for, null means current user ('me')
|
||||
final String? uname;
|
||||
|
||||
/// Year to fetch calendar for
|
||||
final int year;
|
||||
|
||||
/// Month to fetch calendar for
|
||||
final int month;
|
||||
|
||||
const EventCalendarQuery({
|
||||
required this.uname,
|
||||
required this.year,
|
||||
required this.month,
|
||||
});
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is EventCalendarQuery &&
|
||||
runtimeType == other.runtimeType &&
|
||||
uname == other.uname &&
|
||||
year == other.year &&
|
||||
month == other.month;
|
||||
|
||||
@override
|
||||
int get hashCode => uname.hashCode ^ year.hashCode ^ month.hashCode;
|
||||
}
|
||||
|
||||
/// Provider for fetching event calendar data
|
||||
/// This can be used anywhere in the app where calendar data is needed
|
||||
@riverpod
|
||||
Future<List<SnEventCalendarEntry>> eventCalendar(
|
||||
Ref ref,
|
||||
EventCalendarQuery query,
|
||||
) async {
|
||||
final client = ref.watch(apiClientProvider);
|
||||
final resp = await client.get('/accounts/${query.uname ?? 'me'}/calendar',
|
||||
queryParameters: {
|
||||
'year': query.year,
|
||||
'month': query.month,
|
||||
},
|
||||
);
|
||||
return resp.data
|
||||
.map((e) => SnEventCalendarEntry.fromJson(e))
|
||||
.cast<SnEventCalendarEntry>()
|
||||
.toList();
|
||||
}
|
@ -6,8 +6,7 @@ part of 'event_calendar.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$accountEventCalendarHash() =>
|
||||
r'57405caaf53a83d121b6bb4b70540134fb581525';
|
||||
String _$eventCalendarHash() => r'6f2454404fa8660b96334d654490e1a40ee53e10';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
@ -30,24 +29,36 @@ class _SystemHash {
|
||||
}
|
||||
}
|
||||
|
||||
/// See also [accountEventCalendar].
|
||||
@ProviderFor(accountEventCalendar)
|
||||
const accountEventCalendarProvider = AccountEventCalendarFamily();
|
||||
/// Provider for fetching event calendar data
|
||||
/// This can be used anywhere in the app where calendar data is needed
|
||||
///
|
||||
/// Copied from [eventCalendar].
|
||||
@ProviderFor(eventCalendar)
|
||||
const eventCalendarProvider = EventCalendarFamily();
|
||||
|
||||
/// See also [accountEventCalendar].
|
||||
class AccountEventCalendarFamily
|
||||
/// Provider for fetching event calendar data
|
||||
/// This can be used anywhere in the app where calendar data is needed
|
||||
///
|
||||
/// Copied from [eventCalendar].
|
||||
class EventCalendarFamily
|
||||
extends Family<AsyncValue<List<SnEventCalendarEntry>>> {
|
||||
/// See also [accountEventCalendar].
|
||||
const AccountEventCalendarFamily();
|
||||
/// Provider for fetching event calendar data
|
||||
/// This can be used anywhere in the app where calendar data is needed
|
||||
///
|
||||
/// Copied from [eventCalendar].
|
||||
const EventCalendarFamily();
|
||||
|
||||
/// See also [accountEventCalendar].
|
||||
AccountEventCalendarProvider call(EventCalendarQuery query) {
|
||||
return AccountEventCalendarProvider(query);
|
||||
/// Provider for fetching event calendar data
|
||||
/// This can be used anywhere in the app where calendar data is needed
|
||||
///
|
||||
/// Copied from [eventCalendar].
|
||||
EventCalendarProvider call(EventCalendarQuery query) {
|
||||
return EventCalendarProvider(query);
|
||||
}
|
||||
|
||||
@override
|
||||
AccountEventCalendarProvider getProviderOverride(
|
||||
covariant AccountEventCalendarProvider provider,
|
||||
EventCalendarProvider getProviderOverride(
|
||||
covariant EventCalendarProvider provider,
|
||||
) {
|
||||
return call(provider.query);
|
||||
}
|
||||
@ -64,29 +75,35 @@ class AccountEventCalendarFamily
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'accountEventCalendarProvider';
|
||||
String? get name => r'eventCalendarProvider';
|
||||
}
|
||||
|
||||
/// See also [accountEventCalendar].
|
||||
class AccountEventCalendarProvider
|
||||
/// Provider for fetching event calendar data
|
||||
/// This can be used anywhere in the app where calendar data is needed
|
||||
///
|
||||
/// Copied from [eventCalendar].
|
||||
class EventCalendarProvider
|
||||
extends AutoDisposeFutureProvider<List<SnEventCalendarEntry>> {
|
||||
/// See also [accountEventCalendar].
|
||||
AccountEventCalendarProvider(EventCalendarQuery query)
|
||||
/// Provider for fetching event calendar data
|
||||
/// This can be used anywhere in the app where calendar data is needed
|
||||
///
|
||||
/// Copied from [eventCalendar].
|
||||
EventCalendarProvider(EventCalendarQuery query)
|
||||
: this._internal(
|
||||
(ref) => accountEventCalendar(ref as AccountEventCalendarRef, query),
|
||||
from: accountEventCalendarProvider,
|
||||
name: r'accountEventCalendarProvider',
|
||||
(ref) => eventCalendar(ref as EventCalendarRef, query),
|
||||
from: eventCalendarProvider,
|
||||
name: r'eventCalendarProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$accountEventCalendarHash,
|
||||
dependencies: AccountEventCalendarFamily._dependencies,
|
||||
: _$eventCalendarHash,
|
||||
dependencies: EventCalendarFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
AccountEventCalendarFamily._allTransitiveDependencies,
|
||||
EventCalendarFamily._allTransitiveDependencies,
|
||||
query: query,
|
||||
);
|
||||
|
||||
AccountEventCalendarProvider._internal(
|
||||
EventCalendarProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
@ -100,15 +117,13 @@ class AccountEventCalendarProvider
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<List<SnEventCalendarEntry>> Function(
|
||||
AccountEventCalendarRef provider,
|
||||
)
|
||||
FutureOr<List<SnEventCalendarEntry>> Function(EventCalendarRef provider)
|
||||
create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: AccountEventCalendarProvider._internal(
|
||||
(ref) => create(ref as AccountEventCalendarRef),
|
||||
override: EventCalendarProvider._internal(
|
||||
(ref) => create(ref as EventCalendarRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
@ -121,12 +136,12 @@ class AccountEventCalendarProvider
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<List<SnEventCalendarEntry>> createElement() {
|
||||
return _AccountEventCalendarProviderElement(this);
|
||||
return _EventCalendarProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is AccountEventCalendarProvider && other.query == query;
|
||||
return other is EventCalendarProvider && other.query == query;
|
||||
}
|
||||
|
||||
@override
|
||||
@ -140,20 +155,19 @@ class AccountEventCalendarProvider
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin AccountEventCalendarRef
|
||||
mixin EventCalendarRef
|
||||
on AutoDisposeFutureProviderRef<List<SnEventCalendarEntry>> {
|
||||
/// The parameter `query` of this provider.
|
||||
EventCalendarQuery get query;
|
||||
}
|
||||
|
||||
class _AccountEventCalendarProviderElement
|
||||
class _EventCalendarProviderElement
|
||||
extends AutoDisposeFutureProviderElement<List<SnEventCalendarEntry>>
|
||||
with AccountEventCalendarRef {
|
||||
_AccountEventCalendarProviderElement(super.provider);
|
||||
with EventCalendarRef {
|
||||
_EventCalendarProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
EventCalendarQuery get query =>
|
||||
(origin as AccountEventCalendarProvider).query;
|
||||
EventCalendarQuery get query => (origin as EventCalendarProvider).query;
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
@ -15,7 +15,7 @@ import 'package:flutter/material.dart' as _i28;
|
||||
import 'package:island/models/post.dart' as _i30;
|
||||
import 'package:island/route.dart' as _i31;
|
||||
import 'package:island/screens/account.dart' as _i2;
|
||||
import 'package:island/screens/account/me/event_calendar.dart' as _i14;
|
||||
import 'package:island/screens/account/event_calendar.dart' as _i14;
|
||||
import 'package:island/screens/account/me/settings.dart' as _i3;
|
||||
import 'package:island/screens/account/me/update.dart' as _i25;
|
||||
import 'package:island/screens/account/profile.dart' as _i1;
|
||||
|
@ -11,6 +11,7 @@ import 'package:island/pods/userinfo.dart';
|
||||
import 'package:island/route.gr.dart';
|
||||
import 'package:island/screens/notification.dart';
|
||||
import 'package:island/services/responsive.dart';
|
||||
import 'package:island/widgets/account/account_name.dart';
|
||||
import 'package:island/widgets/account/status.dart';
|
||||
import 'package:island/widgets/account/leveling_progress.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
@ -83,7 +84,7 @@ class AccountScreen extends HookConsumerWidget {
|
||||
child: AspectRatio(
|
||||
aspectRatio: 16 / 7,
|
||||
child: CloudImageWidget(
|
||||
fileId: user.value!.profile.background!.id,
|
||||
file: user.value?.profile.background,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
@ -94,7 +95,7 @@ class AccountScreen extends HookConsumerWidget {
|
||||
children: [
|
||||
GestureDetector(
|
||||
child: ProfilePictureWidget(
|
||||
fileId: user.value?.profile.picture?.id,
|
||||
file: user.value?.profile.picture,
|
||||
radius: 24,
|
||||
),
|
||||
onTap: () {
|
||||
@ -112,7 +113,13 @@ class AccountScreen extends HookConsumerWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.baseline,
|
||||
textBaseline: TextBaseline.alphabetic,
|
||||
children: [
|
||||
Text(user.value!.nick).bold().fontSize(16),
|
||||
AccountName(
|
||||
account: user.value!,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
Text('@${user.value!.name}'),
|
||||
],
|
||||
),
|
||||
|
120
lib/screens/account/event_calendar.dart
Normal file
120
lib/screens/account/event_calendar.dart
Normal file
@ -0,0 +1,120 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/pods/event_calendar.dart';
|
||||
import 'package:island/screens/account/profile.dart';
|
||||
import 'package:island/widgets/account/account_nameplate.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/widgets/account/event_calendar.dart';
|
||||
import 'package:island/widgets/account/fortune_graph.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
@RoutePage()
|
||||
class EventCalanderScreen extends HookConsumerWidget {
|
||||
final String name;
|
||||
const EventCalanderScreen({super.key, @PathParam("name") required this.name});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
// Get the current date
|
||||
final now = DateTime.now();
|
||||
|
||||
// Create the query for the current month
|
||||
final query = useState(
|
||||
EventCalendarQuery(uname: name, year: now.year, month: now.month),
|
||||
);
|
||||
|
||||
// Watch the event calendar data
|
||||
final events = ref.watch(eventCalendarProvider(query.value));
|
||||
final user = ref.watch(accountProvider(name));
|
||||
|
||||
// Track the selected day for synchronizing between widgets
|
||||
final selectedDay = useState(now);
|
||||
|
||||
void onMonthChanged(int year, int month) {
|
||||
query.value = EventCalendarQuery(
|
||||
uname: query.value.uname,
|
||||
year: year,
|
||||
month: month,
|
||||
);
|
||||
}
|
||||
|
||||
// Function to handle day selection for synchronizing between widgets
|
||||
void onDaySelected(DateTime day) {
|
||||
selectedDay.value = day;
|
||||
}
|
||||
|
||||
return AppScaffold(
|
||||
noBackground: false,
|
||||
appBar: AppBar(
|
||||
leading: const PageBackButton(),
|
||||
title: Text('eventCalander').tr(),
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
child:
|
||||
MediaQuery.of(context).size.width > 480
|
||||
? ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: 480),
|
||||
child: Column(
|
||||
children: [
|
||||
Card(
|
||||
margin: EdgeInsets.all(16),
|
||||
child: Column(
|
||||
children: [
|
||||
// Use the reusable EventCalendarWidget
|
||||
EventCalendarWidget(
|
||||
events: events,
|
||||
initialDate: now,
|
||||
showEventDetails: true,
|
||||
onMonthChanged: onMonthChanged,
|
||||
onDaySelected: onDaySelected,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
// Add the fortune graph widget
|
||||
const Divider(height: 1),
|
||||
FortuneGraphWidget(
|
||||
events: events,
|
||||
constrainWidth: true,
|
||||
onPointSelected: onDaySelected,
|
||||
),
|
||||
|
||||
// Show user profile if viewing someone else's calendar
|
||||
if (name != 'me' && user.hasValue)
|
||||
AccountNameplate(name: name),
|
||||
],
|
||||
),
|
||||
).center()
|
||||
: Column(
|
||||
children: [
|
||||
// Use the reusable EventCalendarWidget
|
||||
EventCalendarWidget(
|
||||
events: events,
|
||||
initialDate: now,
|
||||
showEventDetails: true,
|
||||
onMonthChanged: onMonthChanged,
|
||||
onDaySelected: onDaySelected,
|
||||
),
|
||||
|
||||
// Add the fortune graph widget
|
||||
const Divider(height: 1),
|
||||
FortuneGraphWidget(
|
||||
events: events,
|
||||
onPointSelected: onDaySelected,
|
||||
).padding(horizontal: 8, vertical: 4),
|
||||
|
||||
// Show user profile if viewing someone else's calendar
|
||||
if (name != 'me' && user.hasValue)
|
||||
AccountNameplate(name: name),
|
||||
Gap(MediaQuery.of(context).padding.bottom + 16),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -1,232 +0,0 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/activity.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/screens/account/profile.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/widgets/content/cloud_files.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
import 'package:table_calendar/table_calendar.dart';
|
||||
|
||||
part 'event_calendar.g.dart';
|
||||
part 'event_calendar.freezed.dart';
|
||||
|
||||
@freezed
|
||||
sealed class EventCalendarQuery with _$EventCalendarQuery {
|
||||
const factory EventCalendarQuery({
|
||||
required String? uname,
|
||||
required int year,
|
||||
required int month,
|
||||
}) = _EventCalendarQuery;
|
||||
}
|
||||
|
||||
@riverpod
|
||||
Future<List<SnEventCalendarEntry>> accountEventCalendar(
|
||||
Ref ref,
|
||||
EventCalendarQuery query,
|
||||
) async {
|
||||
final client = ref.watch(apiClientProvider);
|
||||
final resp = await client.get('/accounts/${query.uname ?? 'me'}/calendar');
|
||||
return resp.data
|
||||
.map((e) => SnEventCalendarEntry.fromJson(e))
|
||||
.cast<SnEventCalendarEntry>()
|
||||
.toList();
|
||||
}
|
||||
|
||||
@RoutePage()
|
||||
class EventCalanderScreen extends HookConsumerWidget {
|
||||
final String name;
|
||||
const EventCalanderScreen({super.key, @PathParam("name") required this.name});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final selectedMonth = useState(DateTime.now().month);
|
||||
final selectedYear = useState(DateTime.now().year);
|
||||
|
||||
final selectedDay = useState(DateTime.now());
|
||||
|
||||
final user = ref.watch(accountProvider(name));
|
||||
final events = ref.watch(
|
||||
accountEventCalendarProvider(
|
||||
EventCalendarQuery(
|
||||
uname: name,
|
||||
year: selectedYear.value,
|
||||
month: selectedMonth.value,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
final content = Column(
|
||||
children: [
|
||||
TableCalendar(
|
||||
locale: EasyLocalization.of(context)!.locale.toString(),
|
||||
firstDay: DateTime.now().add(Duration(days: -3650)),
|
||||
lastDay: DateTime.now().add(Duration(days: 3650)),
|
||||
focusedDay: DateTime.utc(
|
||||
selectedYear.value,
|
||||
selectedMonth.value,
|
||||
DateTime.now().day,
|
||||
),
|
||||
calendarFormat: CalendarFormat.month,
|
||||
selectedDayPredicate: (day) {
|
||||
return isSameDay(selectedDay.value, day);
|
||||
},
|
||||
onDaySelected: (value, _) {
|
||||
selectedDay.value = value;
|
||||
},
|
||||
onPageChanged: (focusedDay) {
|
||||
selectedMonth.value = focusedDay.month;
|
||||
selectedYear.value = focusedDay.year;
|
||||
},
|
||||
eventLoader: (day) {
|
||||
return events.value
|
||||
?.where((e) => isSameDay(e.date, day))
|
||||
.expand((e) => [...e.statuses, e.checkInResult])
|
||||
.where((e) => e != null)
|
||||
.toList() ??
|
||||
[];
|
||||
},
|
||||
calendarBuilders: CalendarBuilders(
|
||||
dowBuilder: (context, day) {
|
||||
final text = DateFormat.EEEEE().format(day);
|
||||
return Center(child: Text(text));
|
||||
},
|
||||
markerBuilder: (context, day, events) {
|
||||
var checkInResult =
|
||||
events.whereType<SnCheckInResult>().firstOrNull;
|
||||
if (checkInResult != null) {
|
||||
return Positioned(
|
||||
top: 32,
|
||||
child: Text(
|
||||
['大凶', '凶', '中平', '吉', '大吉'][checkInResult.level],
|
||||
style: TextStyle(
|
||||
fontSize: 9,
|
||||
color:
|
||||
isSameDay(selectedDay.value, day)
|
||||
? Theme.of(context).colorScheme.onPrimaryContainer
|
||||
: isSameDay(DateTime.now(), day)
|
||||
? Theme.of(
|
||||
context,
|
||||
).colorScheme.onSecondaryContainer
|
||||
: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
),
|
||||
const Divider(height: 1).padding(top: 8),
|
||||
AnimatedSwitcher(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
final event =
|
||||
events.value
|
||||
?.where((e) => isSameDay(e.date, selectedDay.value))
|
||||
.firstOrNull;
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Text(DateFormat.EEEE().format(selectedDay.value))
|
||||
.fontSize(16)
|
||||
.bold()
|
||||
.textColor(
|
||||
Theme.of(context).colorScheme.onSecondaryContainer,
|
||||
),
|
||||
Text(DateFormat.yMd().format(selectedDay.value))
|
||||
.fontSize(12)
|
||||
.textColor(
|
||||
Theme.of(context).colorScheme.onSecondaryContainer,
|
||||
),
|
||||
const Gap(16),
|
||||
if (event?.checkInResult != null)
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Text(
|
||||
'checkInResultLevel${event!.checkInResult!.level}',
|
||||
).tr().fontSize(16).bold(),
|
||||
for (final tip in event.checkInResult!.tips)
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 8,
|
||||
children: [
|
||||
Icon(
|
||||
Symbols.circle,
|
||||
size: 12,
|
||||
fill: 1,
|
||||
).padding(top: 4, right: 4),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(tip.title).bold(),
|
||||
Text(tip.content),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
).padding(top: 8),
|
||||
],
|
||||
),
|
||||
if (event?.checkInResult == null &&
|
||||
(event?.statuses.isEmpty ?? true))
|
||||
Text('eventCalanderEmpty').tr(),
|
||||
],
|
||||
).padding(vertical: 24, horizontal: 24);
|
||||
},
|
||||
),
|
||||
),
|
||||
if (name != 'me' && user.hasValue)
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 1 / MediaQuery.of(context).devicePixelRatio,
|
||||
color: Theme.of(context).dividerColor,
|
||||
),
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
margin: EdgeInsets.all(16),
|
||||
child: Card(
|
||||
margin: EdgeInsets.zero,
|
||||
elevation: 0,
|
||||
color: Colors.transparent,
|
||||
child: ListTile(
|
||||
leading: ProfilePictureWidget(
|
||||
fileId: user.value!.profile.picture?.id,
|
||||
),
|
||||
title: Text(user.value!.nick).bold(),
|
||||
subtitle: Text('@${user.value!.name}'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
return AppScaffold(
|
||||
noBackground: false,
|
||||
appBar: AppBar(
|
||||
leading: const PageBackButton(),
|
||||
title: Text('eventCalander').tr(),
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
child:
|
||||
MediaQuery.of(context).size.width > 480
|
||||
? ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: 480),
|
||||
child: Card(margin: EdgeInsets.all(16), child: content),
|
||||
).center()
|
||||
: content,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -1,148 +0,0 @@
|
||||
// dart format width=80
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'event_calendar.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$EventCalendarQuery {
|
||||
|
||||
String? get uname; int get year; int get month;
|
||||
/// Create a copy of EventCalendarQuery
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$EventCalendarQueryCopyWith<EventCalendarQuery> get copyWith => _$EventCalendarQueryCopyWithImpl<EventCalendarQuery>(this as EventCalendarQuery, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is EventCalendarQuery&&(identical(other.uname, uname) || other.uname == uname)&&(identical(other.year, year) || other.year == year)&&(identical(other.month, month) || other.month == month));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,uname,year,month);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'EventCalendarQuery(uname: $uname, year: $year, month: $month)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $EventCalendarQueryCopyWith<$Res> {
|
||||
factory $EventCalendarQueryCopyWith(EventCalendarQuery value, $Res Function(EventCalendarQuery) _then) = _$EventCalendarQueryCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? uname, int year, int month
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$EventCalendarQueryCopyWithImpl<$Res>
|
||||
implements $EventCalendarQueryCopyWith<$Res> {
|
||||
_$EventCalendarQueryCopyWithImpl(this._self, this._then);
|
||||
|
||||
final EventCalendarQuery _self;
|
||||
final $Res Function(EventCalendarQuery) _then;
|
||||
|
||||
/// Create a copy of EventCalendarQuery
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? uname = freezed,Object? year = null,Object? month = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
uname: freezed == uname ? _self.uname : uname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,year: null == year ? _self.year : year // ignore: cast_nullable_to_non_nullable
|
||||
as int,month: null == month ? _self.month : month // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
|
||||
|
||||
class _EventCalendarQuery implements EventCalendarQuery {
|
||||
const _EventCalendarQuery({required this.uname, required this.year, required this.month});
|
||||
|
||||
|
||||
@override final String? uname;
|
||||
@override final int year;
|
||||
@override final int month;
|
||||
|
||||
/// Create a copy of EventCalendarQuery
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$EventCalendarQueryCopyWith<_EventCalendarQuery> get copyWith => __$EventCalendarQueryCopyWithImpl<_EventCalendarQuery>(this, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _EventCalendarQuery&&(identical(other.uname, uname) || other.uname == uname)&&(identical(other.year, year) || other.year == year)&&(identical(other.month, month) || other.month == month));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,uname,year,month);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'EventCalendarQuery(uname: $uname, year: $year, month: $month)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$EventCalendarQueryCopyWith<$Res> implements $EventCalendarQueryCopyWith<$Res> {
|
||||
factory _$EventCalendarQueryCopyWith(_EventCalendarQuery value, $Res Function(_EventCalendarQuery) _then) = __$EventCalendarQueryCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? uname, int year, int month
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$EventCalendarQueryCopyWithImpl<$Res>
|
||||
implements _$EventCalendarQueryCopyWith<$Res> {
|
||||
__$EventCalendarQueryCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _EventCalendarQuery _self;
|
||||
final $Res Function(_EventCalendarQuery) _then;
|
||||
|
||||
/// Create a copy of EventCalendarQuery
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? uname = freezed,Object? year = null,Object? month = null,}) {
|
||||
return _then(_EventCalendarQuery(
|
||||
uname: freezed == uname ? _self.uname : uname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,year: null == year ? _self.year : year // ignore: cast_nullable_to_non_nullable
|
||||
as int,month: null == month ? _self.month : month // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
@ -86,7 +86,7 @@ class AccountSettingsScreen extends HookConsumerWidget {
|
||||
).push(MaterialPageRoute(builder: (context) => CaptchaScreen()));
|
||||
if (captchaTk == null) return;
|
||||
try {
|
||||
showLoadingModal(context);
|
||||
if (context.mounted) showLoadingModal(context);
|
||||
final userInfo = ref.read(userInfoProvider);
|
||||
final client = ref.read(apiClientProvider);
|
||||
await client.post(
|
||||
|
@ -11,6 +11,7 @@ import 'package:island/pods/config.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/pods/userinfo.dart';
|
||||
import 'package:island/services/file.dart';
|
||||
import 'package:island/services/timezone.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/widgets/content/cloud_files.dart';
|
||||
@ -120,9 +121,33 @@ class UpdateProfileScreen extends HookConsumerWidget {
|
||||
}
|
||||
|
||||
final formKeyProfile = useMemoized(GlobalKey<FormState>.new, const []);
|
||||
final birthday = useState<DateTime?>(
|
||||
user.value!.profile.birthday?.toLocal(),
|
||||
);
|
||||
final firstNameController = useTextEditingController(
|
||||
text: user.value!.profile.firstName,
|
||||
);
|
||||
final middleNameController = useTextEditingController(
|
||||
text: user.value!.profile.middleName,
|
||||
);
|
||||
final lastNameController = useTextEditingController(
|
||||
text: user.value!.profile.lastName,
|
||||
);
|
||||
final bioController = useTextEditingController(
|
||||
text: user.value!.profile.bio,
|
||||
);
|
||||
final genderController = useTextEditingController(
|
||||
text: user.value!.profile.gender,
|
||||
);
|
||||
final pronounsController = useTextEditingController(
|
||||
text: user.value!.profile.pronouns,
|
||||
);
|
||||
final locationController = useTextEditingController(
|
||||
text: user.value!.profile.location,
|
||||
);
|
||||
final timeZoneController = useTextEditingController(
|
||||
text: user.value!.profile.timeZone,
|
||||
);
|
||||
|
||||
void updateProfile() async {
|
||||
if (!formKeyProfile.currentState!.validate()) return;
|
||||
@ -132,7 +157,17 @@ class UpdateProfileScreen extends HookConsumerWidget {
|
||||
final client = ref.watch(apiClientProvider);
|
||||
await client.patch(
|
||||
'/accounts/me/profile',
|
||||
data: {'bio': bioController.text},
|
||||
data: {
|
||||
'bio': bioController.text,
|
||||
'first_name': firstNameController.text,
|
||||
'middle_name': middleNameController.text,
|
||||
'last_name': lastNameController.text,
|
||||
'gender': genderController.text,
|
||||
'pronouns': pronounsController.text,
|
||||
'location': locationController.text,
|
||||
'time_zone': timeZoneController.text,
|
||||
'birthday': birthday.value?.toUtc().toIso8601String(),
|
||||
},
|
||||
);
|
||||
final userNotifier = ref.read(userInfoProvider.notifier);
|
||||
userNotifier.fetchUser();
|
||||
@ -268,6 +303,45 @@ class UpdateProfileScreen extends HookConsumerWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 16,
|
||||
children: [
|
||||
Row(
|
||||
spacing: 16,
|
||||
children: [
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
decoration: InputDecoration(
|
||||
labelText: 'firstName'.tr(),
|
||||
),
|
||||
controller: firstNameController,
|
||||
onTapOutside:
|
||||
(_) =>
|
||||
FocusManager.instance.primaryFocus?.unfocus(),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
decoration: InputDecoration(
|
||||
labelText: 'middleName'.tr(),
|
||||
),
|
||||
controller: middleNameController,
|
||||
onTapOutside:
|
||||
(_) =>
|
||||
FocusManager.instance.primaryFocus?.unfocus(),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
decoration: InputDecoration(
|
||||
labelText: 'lastName'.tr(),
|
||||
),
|
||||
controller: lastNameController,
|
||||
onTapOutside:
|
||||
(_) =>
|
||||
FocusManager.instance.primaryFocus?.unfocus(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
TextFormField(
|
||||
decoration: InputDecoration(labelText: 'bio'.tr()),
|
||||
maxLines: null,
|
||||
@ -276,6 +350,213 @@ class UpdateProfileScreen extends HookConsumerWidget {
|
||||
onTapOutside:
|
||||
(_) => FocusManager.instance.primaryFocus?.unfocus(),
|
||||
),
|
||||
Row(
|
||||
spacing: 16,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Autocomplete<String>(
|
||||
optionsBuilder: (TextEditingValue textEditingValue) {
|
||||
final options = ['Male', 'Female'];
|
||||
if (textEditingValue.text == '') {
|
||||
return options;
|
||||
}
|
||||
return options.where(
|
||||
(option) => option.toLowerCase().contains(
|
||||
textEditingValue.text.toLowerCase(),
|
||||
),
|
||||
);
|
||||
},
|
||||
onSelected: (String selection) {
|
||||
genderController.text = selection;
|
||||
},
|
||||
fieldViewBuilder: (
|
||||
context,
|
||||
controller,
|
||||
focusNode,
|
||||
onFieldSubmitted,
|
||||
) {
|
||||
// Initialize the controller with the current value
|
||||
if (controller.text.isEmpty &&
|
||||
genderController.text.isNotEmpty) {
|
||||
controller.text = genderController.text;
|
||||
}
|
||||
|
||||
return TextFormField(
|
||||
controller: controller,
|
||||
focusNode: focusNode,
|
||||
decoration: InputDecoration(
|
||||
labelText: 'gender'.tr(),
|
||||
),
|
||||
onChanged: (value) {
|
||||
genderController.text = value;
|
||||
},
|
||||
onTapOutside:
|
||||
(_) =>
|
||||
FocusManager.instance.primaryFocus
|
||||
?.unfocus(),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
decoration: InputDecoration(
|
||||
labelText: 'pronouns'.tr(),
|
||||
),
|
||||
controller: pronounsController,
|
||||
onTapOutside:
|
||||
(_) =>
|
||||
FocusManager.instance.primaryFocus?.unfocus(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
spacing: 16,
|
||||
children: [
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
decoration: InputDecoration(
|
||||
labelText: 'location'.tr(),
|
||||
),
|
||||
controller: locationController,
|
||||
onTapOutside:
|
||||
(_) =>
|
||||
FocusManager.instance.primaryFocus?.unfocus(),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Autocomplete<String>(
|
||||
optionsBuilder: (TextEditingValue textEditingValue) {
|
||||
if (textEditingValue.text.isEmpty) {
|
||||
return const Iterable<String>.empty();
|
||||
}
|
||||
final lowercaseQuery =
|
||||
textEditingValue.text.toLowerCase();
|
||||
return getAvailableTz().where((tz) {
|
||||
return tz.toLowerCase().contains(lowercaseQuery);
|
||||
});
|
||||
},
|
||||
onSelected: (String selection) {
|
||||
timeZoneController.text = selection;
|
||||
},
|
||||
fieldViewBuilder: (
|
||||
context,
|
||||
controller,
|
||||
focusNode,
|
||||
onFieldSubmitted,
|
||||
) {
|
||||
// Sync the controller with timeZoneController when the widget is built
|
||||
if (controller.text != timeZoneController.text) {
|
||||
controller.text = timeZoneController.text;
|
||||
}
|
||||
|
||||
return TextFormField(
|
||||
controller: controller,
|
||||
focusNode: focusNode,
|
||||
decoration: InputDecoration(
|
||||
labelText: 'timeZone'.tr(),
|
||||
suffix: InkWell(
|
||||
child: const Icon(
|
||||
Symbols.my_location,
|
||||
size: 18,
|
||||
),
|
||||
onTap: () async {
|
||||
try {
|
||||
showLoadingModal(context);
|
||||
final machineTz = await getMachineTz();
|
||||
controller.text = machineTz;
|
||||
timeZoneController.text = machineTz;
|
||||
} finally {
|
||||
if (context.mounted) {
|
||||
hideLoadingModal(context);
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
onChanged: (value) {
|
||||
timeZoneController.text = value;
|
||||
},
|
||||
);
|
||||
},
|
||||
optionsViewBuilder: (context, onSelected, options) {
|
||||
return Align(
|
||||
alignment: Alignment.topLeft,
|
||||
child: Material(
|
||||
elevation: 4.0,
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(
|
||||
maxHeight: 200,
|
||||
maxWidth: 300,
|
||||
),
|
||||
child: ListView.builder(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
itemCount: options.length,
|
||||
itemBuilder: (
|
||||
BuildContext context,
|
||||
int index,
|
||||
) {
|
||||
final option = options.elementAt(index);
|
||||
return ListTile(
|
||||
title: Text(
|
||||
option,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
onTap: () {
|
||||
onSelected(option);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
final date = await showDatePicker(
|
||||
context: context,
|
||||
initialDate: birthday.value ?? DateTime.now(),
|
||||
firstDate: DateTime(1900),
|
||||
lastDate: DateTime.now(),
|
||||
);
|
||||
if (date != null) {
|
||||
birthday.value = date;
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Theme.of(context).dividerColor,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Text(
|
||||
'birthday'.tr(),
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).hintColor,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
birthday.value != null
|
||||
? DateFormat.yMMMd().format(birthday.value!)
|
||||
: 'Select a date'.tr(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: TextButton.icon(
|
||||
|
@ -1,16 +1,29 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/chat.dart';
|
||||
import 'package:island/models/relationship.dart';
|
||||
import 'package:island/models/user.dart';
|
||||
import 'package:island/pods/config.dart';
|
||||
import 'package:island/pods/event_calendar.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/pods/userinfo.dart';
|
||||
import 'package:island/services/color.dart';
|
||||
import 'package:island/services/time.dart';
|
||||
import 'package:island/services/timezone/native.dart';
|
||||
import 'package:island/widgets/account/account_name.dart';
|
||||
import 'package:island/widgets/account/badge.dart';
|
||||
import 'package:island/widgets/account/fortune_graph.dart';
|
||||
import 'package:island/widgets/account/leveling_progress.dart';
|
||||
import 'package:island/widgets/account/status.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/widgets/content/cloud_files.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:palette_generator/palette_generator.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
@ -38,6 +51,51 @@ Future<List<SnAccountBadge>> accountBadges(Ref ref, String uname) async {
|
||||
);
|
||||
}
|
||||
|
||||
@riverpod
|
||||
Future<Color?> accountAppbarForcegroundColor(Ref ref, String uname) async {
|
||||
final account = await ref.watch(accountProvider(uname).future);
|
||||
if (account.profile.background == null) return null;
|
||||
final palette = await PaletteGenerator.fromImageProvider(
|
||||
CloudImageWidget.provider(
|
||||
fileId: account.profile.background!.id,
|
||||
serverUrl: ref.watch(serverUrlProvider),
|
||||
),
|
||||
);
|
||||
final dominantColor = palette.dominantColor?.color;
|
||||
if (dominantColor == null) return null;
|
||||
return dominantColor.computeLuminance() > 0.5 ? Colors.black : Colors.white;
|
||||
}
|
||||
|
||||
@riverpod
|
||||
Future<SnChatRoom?> accountDirectChat(Ref ref, String uname) async {
|
||||
final account = await ref.watch(accountProvider(uname).future);
|
||||
final apiClient = ref.watch(apiClientProvider);
|
||||
try {
|
||||
final resp = await apiClient.get("/chat/direct/${account.id}");
|
||||
return SnChatRoom.fromJson(resp.data);
|
||||
} catch (err) {
|
||||
if (err is DioException && err.response?.statusCode == 404) {
|
||||
return null;
|
||||
}
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
@riverpod
|
||||
Future<SnRelationship?> accountRelationship(Ref ref, String uname) async {
|
||||
final account = await ref.watch(accountProvider(uname).future);
|
||||
final apiClient = ref.watch(apiClientProvider);
|
||||
try {
|
||||
final resp = await apiClient.get("/relationships/${account.id}");
|
||||
return SnRelationship.fromJson(resp.data);
|
||||
} catch (err) {
|
||||
if (err is DioException && err.response?.statusCode == 404) {
|
||||
return null;
|
||||
}
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
@RoutePage()
|
||||
class AccountProfileScreen extends HookConsumerWidget {
|
||||
final String name;
|
||||
@ -48,13 +106,118 @@ class AccountProfileScreen extends HookConsumerWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final account = ref.watch(accountProvider(name));
|
||||
final now = DateTime.now();
|
||||
|
||||
final iconShadow = Shadow(
|
||||
color: Colors.black54,
|
||||
blurRadius: 5.0,
|
||||
offset: const Offset(1.0, 1.0),
|
||||
final account = ref.watch(accountProvider(name));
|
||||
final accountEvents = ref.watch(
|
||||
eventCalendarProvider(
|
||||
EventCalendarQuery(uname: name, year: now.year, month: now.month),
|
||||
),
|
||||
);
|
||||
final accountChat = ref.watch(accountDirectChatProvider(name));
|
||||
final accountRelationship = ref.watch(accountRelationshipProvider(name));
|
||||
|
||||
final appbarColor = ref.watch(accountAppbarForcegroundColorProvider(name));
|
||||
|
||||
final appbarShadow = Shadow(
|
||||
color: appbarColor.value?.invert ?? Colors.transparent,
|
||||
blurRadius: 5.0,
|
||||
offset: Offset(1.0, 1.0),
|
||||
);
|
||||
|
||||
Future<void> relationshipAction() async {
|
||||
if (accountRelationship.value != null) return;
|
||||
showLoadingModal(context);
|
||||
try {
|
||||
final client = ref.watch(apiClientProvider);
|
||||
await client.post('/relationships/${account.value!.id}/friends');
|
||||
ref.invalidate(accountRelationshipProvider(name));
|
||||
} catch (err) {
|
||||
showErrorAlert(err);
|
||||
} finally {
|
||||
if (context.mounted) hideLoadingModal(context);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> directMessageAction() async {
|
||||
if (!account.hasValue) return;
|
||||
if (accountChat.value != null) {
|
||||
context.router.pushPath('/chat/${accountChat.value!.id}');
|
||||
return;
|
||||
}
|
||||
showLoadingModal(context);
|
||||
try {
|
||||
final client = ref.watch(apiClientProvider);
|
||||
final resp = await client.post(
|
||||
'/chat/direct',
|
||||
data: {'related_user_id': account.value!.id},
|
||||
);
|
||||
final chat = SnChatRoom.fromJson(resp.data);
|
||||
if (context.mounted) context.router.pushPath('/chat/${chat.id}');
|
||||
ref.invalidate(accountDirectChatProvider(name));
|
||||
} catch (err) {
|
||||
showErrorAlert(err);
|
||||
} finally {
|
||||
if (context.mounted) hideLoadingModal(context);
|
||||
}
|
||||
}
|
||||
|
||||
List<Widget> buildSubcolumn(SnAccount data) {
|
||||
return [
|
||||
if (data.profile.birthday != null)
|
||||
Row(
|
||||
spacing: 6,
|
||||
children: [
|
||||
const Icon(Symbols.cake, size: 17, fill: 1),
|
||||
Text(data.profile.birthday!.formatCustom('yyyy-MM-dd')),
|
||||
Text('·').bold(),
|
||||
Text(
|
||||
'${DateTime.now().difference(data.profile.birthday!).inDays ~/ 365} yrs old',
|
||||
),
|
||||
],
|
||||
),
|
||||
if (data.profile.location.isNotEmpty)
|
||||
Row(
|
||||
spacing: 6,
|
||||
children: [
|
||||
const Icon(Symbols.location_on, size: 17, fill: 1),
|
||||
Text(data.profile.location),
|
||||
],
|
||||
),
|
||||
if (data.profile.pronouns.isNotEmpty || data.profile.gender.isNotEmpty)
|
||||
Row(
|
||||
spacing: 6,
|
||||
children: [
|
||||
const Icon(Symbols.person, size: 17, fill: 1),
|
||||
Text(
|
||||
data.profile.gender.isEmpty
|
||||
? 'unspecified'.tr()
|
||||
: data.profile.gender,
|
||||
),
|
||||
Text('·').bold(),
|
||||
Text(
|
||||
data.profile.pronouns.isEmpty
|
||||
? 'unspecified'.tr()
|
||||
: data.profile.pronouns,
|
||||
),
|
||||
],
|
||||
),
|
||||
if (data.profile.firstName.isNotEmpty ||
|
||||
data.profile.middleName.isNotEmpty ||
|
||||
data.profile.lastName.isNotEmpty)
|
||||
Row(
|
||||
spacing: 6,
|
||||
children: [
|
||||
const Icon(Symbols.id_card, size: 17, fill: 1),
|
||||
if (data.profile.firstName.isNotEmpty)
|
||||
Text(data.profile.firstName),
|
||||
if (data.profile.middleName.isNotEmpty)
|
||||
Text(data.profile.middleName),
|
||||
if (data.profile.lastName.isNotEmpty) Text(data.profile.lastName),
|
||||
],
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
return account.when(
|
||||
data:
|
||||
@ -62,26 +225,40 @@ class AccountProfileScreen extends HookConsumerWidget {
|
||||
body: CustomScrollView(
|
||||
slivers: [
|
||||
SliverAppBar(
|
||||
foregroundColor: appbarColor.value,
|
||||
expandedHeight: 180,
|
||||
pinned: true,
|
||||
leading: PageBackButton(shadows: [iconShadow]),
|
||||
flexibleSpace: FlexibleSpaceBar(
|
||||
background:
|
||||
data.profile.background?.id != null
|
||||
? CloudImageWidget(
|
||||
fileId: data.profile.background!.id,
|
||||
)
|
||||
: Container(
|
||||
color:
|
||||
Theme.of(context).appBarTheme.backgroundColor,
|
||||
),
|
||||
title: Text(
|
||||
data.nick,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).appBarTheme.foregroundColor,
|
||||
shadows: [iconShadow],
|
||||
leading: PageBackButton(
|
||||
color: appbarColor.value,
|
||||
shadows: [appbarShadow],
|
||||
),
|
||||
flexibleSpace: Stack(
|
||||
children: [
|
||||
Positioned.fill(
|
||||
child:
|
||||
data.profile.background?.id != null
|
||||
? CloudImageWidget(
|
||||
file: data.profile.background,
|
||||
)
|
||||
: Container(
|
||||
color:
|
||||
Theme.of(
|
||||
context,
|
||||
).appBarTheme.backgroundColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
FlexibleSpaceBar(
|
||||
title: Text(
|
||||
data.nick,
|
||||
style: TextStyle(
|
||||
color:
|
||||
appbarColor.value ??
|
||||
Theme.of(context).appBarTheme.foregroundColor,
|
||||
shadows: [appbarShadow],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SliverToBoxAdapter(
|
||||
@ -91,7 +268,7 @@ class AccountProfileScreen extends HookConsumerWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ProfilePictureWidget(
|
||||
fileId: data.profile.picture?.id,
|
||||
file: data.profile.picture,
|
||||
radius: 32,
|
||||
),
|
||||
const Gap(20),
|
||||
@ -124,29 +301,144 @@ class AccountProfileScreen extends HookConsumerWidget {
|
||||
child: BadgeList(
|
||||
badges: data.badges,
|
||||
).padding(horizontal: 24, bottom: 24),
|
||||
)
|
||||
else
|
||||
const SliverGap(4),
|
||||
SliverToBoxAdapter(
|
||||
child: LevelingProgressCard(
|
||||
level: data.profile.level,
|
||||
experience: data.profile.experience,
|
||||
progress: data.profile.levelingProgress,
|
||||
).padding(horizontal: 20, bottom: 24),
|
||||
),
|
||||
SliverToBoxAdapter(
|
||||
child: const Divider(height: 1).padding(bottom: 24),
|
||||
),
|
||||
if (data.profile.bio.isNotEmpty)
|
||||
SliverToBoxAdapter(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Text('bio').tr().bold(),
|
||||
Text(data.profile.bio),
|
||||
],
|
||||
).padding(horizontal: 24),
|
||||
),
|
||||
SliverToBoxAdapter(
|
||||
child: Column(
|
||||
spacing: 12,
|
||||
children: [
|
||||
LevelingProgressCard(
|
||||
level: data.profile.level,
|
||||
experience: data.profile.experience,
|
||||
progress: data.profile.levelingProgress,
|
||||
),
|
||||
if (data.profile.verification != null)
|
||||
VerificationStatusCard(
|
||||
mark: data.profile.verification!,
|
||||
),
|
||||
],
|
||||
).padding(horizontal: 20),
|
||||
),
|
||||
|
||||
SliverToBoxAdapter(
|
||||
child: const Divider(height: 1).padding(vertical: 24),
|
||||
),
|
||||
SliverToBoxAdapter(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
spacing: 24,
|
||||
children: [
|
||||
if (buildSubcolumn(data).isNotEmpty)
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 2,
|
||||
children: buildSubcolumn(data),
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text('bio').tr().bold(),
|
||||
Text(
|
||||
data.profile.bio.isEmpty
|
||||
? 'descriptionNone'.tr()
|
||||
: data.profile.bio,
|
||||
),
|
||||
],
|
||||
),
|
||||
if (data.profile.timeZone.isNotEmpty)
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text('timeZone').tr().bold(),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.baseline,
|
||||
textBaseline: TextBaseline.alphabetic,
|
||||
spacing: 6,
|
||||
children: [
|
||||
Text(data.profile.timeZone),
|
||||
Text(
|
||||
getTzInfo(
|
||||
data.profile.timeZone,
|
||||
).$2.formatCustomGlobal('HH:mm'),
|
||||
),
|
||||
Text(
|
||||
getTzInfo(
|
||||
data.profile.timeZone,
|
||||
).$1.formatOffsetLocal(),
|
||||
).fontSize(11),
|
||||
Text(
|
||||
'UTC${getTzInfo(data.profile.timeZone).$1.formatOffset()}',
|
||||
).fontSize(11).opacity(0.75),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
).padding(horizontal: 24),
|
||||
),
|
||||
|
||||
SliverToBoxAdapter(
|
||||
child: const Divider(height: 1).padding(top: 24, bottom: 12),
|
||||
),
|
||||
SliverToBoxAdapter(
|
||||
child: Row(
|
||||
spacing: 8,
|
||||
children: [
|
||||
Expanded(
|
||||
child: FilledButton.icon(
|
||||
style: ButtonStyle(
|
||||
backgroundColor: WidgetStatePropertyAll(
|
||||
accountRelationship.value == null
|
||||
? null
|
||||
: Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
foregroundColor: WidgetStatePropertyAll(
|
||||
accountRelationship.value == null
|
||||
? null
|
||||
: Theme.of(context).colorScheme.onSecondary,
|
||||
),
|
||||
),
|
||||
onPressed: relationshipAction,
|
||||
label:
|
||||
Text(
|
||||
accountRelationship.value == null
|
||||
? 'addFriendShort'
|
||||
: 'added',
|
||||
).tr(),
|
||||
icon:
|
||||
accountRelationship.value == null
|
||||
? const Icon(Symbols.person_add)
|
||||
: const Icon(Symbols.person_check),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: FilledButton.icon(
|
||||
onPressed: directMessageAction,
|
||||
icon: const Icon(Symbols.message),
|
||||
label:
|
||||
Text(
|
||||
accountChat.value == null
|
||||
? 'createDirectMessage'
|
||||
: 'gotoDirectMessage',
|
||||
maxLines: 1,
|
||||
).tr(),
|
||||
),
|
||||
),
|
||||
],
|
||||
).padding(horizontal: 16),
|
||||
),
|
||||
SliverToBoxAdapter(
|
||||
child: const Divider(height: 1).padding(top: 12),
|
||||
),
|
||||
SliverToBoxAdapter(
|
||||
child: Column(
|
||||
children: [
|
||||
FortuneGraphWidget(
|
||||
events: accountEvents,
|
||||
eventCalanderUser: data.name,
|
||||
),
|
||||
],
|
||||
).padding(all: 8),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -267,5 +267,377 @@ class _AccountBadgesProviderElement
|
||||
String get uname => (origin as AccountBadgesProvider).uname;
|
||||
}
|
||||
|
||||
String _$accountAppbarForcegroundColorHash() =>
|
||||
r'f654a7a5594eda1500906e9ad023c22772257a9b';
|
||||
|
||||
/// See also [accountAppbarForcegroundColor].
|
||||
@ProviderFor(accountAppbarForcegroundColor)
|
||||
const accountAppbarForcegroundColorProvider =
|
||||
AccountAppbarForcegroundColorFamily();
|
||||
|
||||
/// See also [accountAppbarForcegroundColor].
|
||||
class AccountAppbarForcegroundColorFamily extends Family<AsyncValue<Color?>> {
|
||||
/// See also [accountAppbarForcegroundColor].
|
||||
const AccountAppbarForcegroundColorFamily();
|
||||
|
||||
/// See also [accountAppbarForcegroundColor].
|
||||
AccountAppbarForcegroundColorProvider call(String uname) {
|
||||
return AccountAppbarForcegroundColorProvider(uname);
|
||||
}
|
||||
|
||||
@override
|
||||
AccountAppbarForcegroundColorProvider getProviderOverride(
|
||||
covariant AccountAppbarForcegroundColorProvider provider,
|
||||
) {
|
||||
return call(provider.uname);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'accountAppbarForcegroundColorProvider';
|
||||
}
|
||||
|
||||
/// See also [accountAppbarForcegroundColor].
|
||||
class AccountAppbarForcegroundColorProvider
|
||||
extends AutoDisposeFutureProvider<Color?> {
|
||||
/// See also [accountAppbarForcegroundColor].
|
||||
AccountAppbarForcegroundColorProvider(String uname)
|
||||
: this._internal(
|
||||
(ref) => accountAppbarForcegroundColor(
|
||||
ref as AccountAppbarForcegroundColorRef,
|
||||
uname,
|
||||
),
|
||||
from: accountAppbarForcegroundColorProvider,
|
||||
name: r'accountAppbarForcegroundColorProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$accountAppbarForcegroundColorHash,
|
||||
dependencies: AccountAppbarForcegroundColorFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
AccountAppbarForcegroundColorFamily._allTransitiveDependencies,
|
||||
uname: uname,
|
||||
);
|
||||
|
||||
AccountAppbarForcegroundColorProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.uname,
|
||||
}) : super.internal();
|
||||
|
||||
final String uname;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<Color?> Function(AccountAppbarForcegroundColorRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: AccountAppbarForcegroundColorProvider._internal(
|
||||
(ref) => create(ref as AccountAppbarForcegroundColorRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
uname: uname,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<Color?> createElement() {
|
||||
return _AccountAppbarForcegroundColorProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is AccountAppbarForcegroundColorProvider &&
|
||||
other.uname == uname;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, uname.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin AccountAppbarForcegroundColorRef on AutoDisposeFutureProviderRef<Color?> {
|
||||
/// The parameter `uname` of this provider.
|
||||
String get uname;
|
||||
}
|
||||
|
||||
class _AccountAppbarForcegroundColorProviderElement
|
||||
extends AutoDisposeFutureProviderElement<Color?>
|
||||
with AccountAppbarForcegroundColorRef {
|
||||
_AccountAppbarForcegroundColorProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get uname => (origin as AccountAppbarForcegroundColorProvider).uname;
|
||||
}
|
||||
|
||||
String _$accountDirectChatHash() => r'60d0015fc2a3c8fc2190bb41d6818cf3027d9d0a';
|
||||
|
||||
/// See also [accountDirectChat].
|
||||
@ProviderFor(accountDirectChat)
|
||||
const accountDirectChatProvider = AccountDirectChatFamily();
|
||||
|
||||
/// See also [accountDirectChat].
|
||||
class AccountDirectChatFamily extends Family<AsyncValue<SnChatRoom?>> {
|
||||
/// See also [accountDirectChat].
|
||||
const AccountDirectChatFamily();
|
||||
|
||||
/// See also [accountDirectChat].
|
||||
AccountDirectChatProvider call(String uname) {
|
||||
return AccountDirectChatProvider(uname);
|
||||
}
|
||||
|
||||
@override
|
||||
AccountDirectChatProvider getProviderOverride(
|
||||
covariant AccountDirectChatProvider provider,
|
||||
) {
|
||||
return call(provider.uname);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'accountDirectChatProvider';
|
||||
}
|
||||
|
||||
/// See also [accountDirectChat].
|
||||
class AccountDirectChatProvider extends AutoDisposeFutureProvider<SnChatRoom?> {
|
||||
/// See also [accountDirectChat].
|
||||
AccountDirectChatProvider(String uname)
|
||||
: this._internal(
|
||||
(ref) => accountDirectChat(ref as AccountDirectChatRef, uname),
|
||||
from: accountDirectChatProvider,
|
||||
name: r'accountDirectChatProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$accountDirectChatHash,
|
||||
dependencies: AccountDirectChatFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
AccountDirectChatFamily._allTransitiveDependencies,
|
||||
uname: uname,
|
||||
);
|
||||
|
||||
AccountDirectChatProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.uname,
|
||||
}) : super.internal();
|
||||
|
||||
final String uname;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<SnChatRoom?> Function(AccountDirectChatRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: AccountDirectChatProvider._internal(
|
||||
(ref) => create(ref as AccountDirectChatRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
uname: uname,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<SnChatRoom?> createElement() {
|
||||
return _AccountDirectChatProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is AccountDirectChatProvider && other.uname == uname;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, uname.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin AccountDirectChatRef on AutoDisposeFutureProviderRef<SnChatRoom?> {
|
||||
/// The parameter `uname` of this provider.
|
||||
String get uname;
|
||||
}
|
||||
|
||||
class _AccountDirectChatProviderElement
|
||||
extends AutoDisposeFutureProviderElement<SnChatRoom?>
|
||||
with AccountDirectChatRef {
|
||||
_AccountDirectChatProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get uname => (origin as AccountDirectChatProvider).uname;
|
||||
}
|
||||
|
||||
String _$accountRelationshipHash() =>
|
||||
r'cb7d0d3f8cd4f23ad9d2d529872c540dac483d4f';
|
||||
|
||||
/// See also [accountRelationship].
|
||||
@ProviderFor(accountRelationship)
|
||||
const accountRelationshipProvider = AccountRelationshipFamily();
|
||||
|
||||
/// See also [accountRelationship].
|
||||
class AccountRelationshipFamily extends Family<AsyncValue<SnRelationship?>> {
|
||||
/// See also [accountRelationship].
|
||||
const AccountRelationshipFamily();
|
||||
|
||||
/// See also [accountRelationship].
|
||||
AccountRelationshipProvider call(String uname) {
|
||||
return AccountRelationshipProvider(uname);
|
||||
}
|
||||
|
||||
@override
|
||||
AccountRelationshipProvider getProviderOverride(
|
||||
covariant AccountRelationshipProvider provider,
|
||||
) {
|
||||
return call(provider.uname);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'accountRelationshipProvider';
|
||||
}
|
||||
|
||||
/// See also [accountRelationship].
|
||||
class AccountRelationshipProvider
|
||||
extends AutoDisposeFutureProvider<SnRelationship?> {
|
||||
/// See also [accountRelationship].
|
||||
AccountRelationshipProvider(String uname)
|
||||
: this._internal(
|
||||
(ref) => accountRelationship(ref as AccountRelationshipRef, uname),
|
||||
from: accountRelationshipProvider,
|
||||
name: r'accountRelationshipProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$accountRelationshipHash,
|
||||
dependencies: AccountRelationshipFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
AccountRelationshipFamily._allTransitiveDependencies,
|
||||
uname: uname,
|
||||
);
|
||||
|
||||
AccountRelationshipProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.uname,
|
||||
}) : super.internal();
|
||||
|
||||
final String uname;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<SnRelationship?> Function(AccountRelationshipRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: AccountRelationshipProvider._internal(
|
||||
(ref) => create(ref as AccountRelationshipRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
uname: uname,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<SnRelationship?> createElement() {
|
||||
return _AccountRelationshipProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is AccountRelationshipProvider && other.uname == uname;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, uname.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin AccountRelationshipRef on AutoDisposeFutureProviderRef<SnRelationship?> {
|
||||
/// The parameter `uname` of this provider.
|
||||
String get uname;
|
||||
}
|
||||
|
||||
class _AccountRelationshipProviderElement
|
||||
extends AutoDisposeFutureProviderElement<SnRelationship?>
|
||||
with AccountRelationshipRef {
|
||||
_AccountRelationshipProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get uname => (origin as AccountRelationshipProvider).uname;
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
@ -214,9 +214,6 @@ class _LoginCheckScreen extends HookConsumerWidget {
|
||||
if (!kIsWeb) {
|
||||
String? name;
|
||||
if (Platform.isIOS) {
|
||||
return;
|
||||
// TODO waiting for apple to respond to grant my access to com.apple.developer.device-information.user-assigned-device-name
|
||||
// ignore: dead_code
|
||||
final deviceInfo = await DeviceInfoPlugin().iosInfo;
|
||||
name = deviceInfo.name;
|
||||
} else if (Platform.isAndroid) {
|
||||
@ -388,20 +385,6 @@ class _LoginPickerScreen extends HookConsumerWidget {
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() {
|
||||
if (ticket == null || (factors?.isEmpty ?? true)) return;
|
||||
if (ticket!.blacklistFactors.isEmpty) {
|
||||
Future(() {
|
||||
var password = factors!.where((x) => x.type == 0).firstOrNull;
|
||||
if (password != null) {
|
||||
factorPicked.value = password;
|
||||
performGetFactorCode();
|
||||
}
|
||||
});
|
||||
}
|
||||
return null;
|
||||
}, [ticket, factors]);
|
||||
|
||||
return Column(
|
||||
key: const ValueKey<int>(1),
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
@ -337,7 +337,7 @@ class ChatRoomScreen extends HookConsumerWidget {
|
||||
),
|
||||
);
|
||||
|
||||
typingDebouncer.value = Timer(const Duration(milliseconds: 1000), () {
|
||||
typingDebouncer.value = Timer(const Duration(milliseconds: 850), () {
|
||||
typingDebouncer.value = null;
|
||||
});
|
||||
}
|
||||
@ -384,9 +384,12 @@ class ChatRoomScreen extends HookConsumerWidget {
|
||||
if (!pkt.type.startsWith('messages')) return;
|
||||
if (['messages.read'].contains(pkt.type)) return;
|
||||
|
||||
if (pkt.type == 'messages.typing') {
|
||||
if (pkt.type == 'messages.typing' && pkt.data?['sender'] != null) {
|
||||
if (pkt.data?['room_id'] != chatRoom.value?.id) return;
|
||||
if (pkt.data?['sender_id'] == chatIdentity.value?.id) return;
|
||||
|
||||
final sender = SnChatMember.fromJson(
|
||||
pkt.data!['sender'],
|
||||
pkt.data?['sender'],
|
||||
).copyWith(lastTyped: DateTime.now());
|
||||
|
||||
// Check if the sender is already in the typing list
|
||||
@ -733,7 +736,7 @@ class ChatRoomScreen extends HookConsumerWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
AnimatedSwitcher(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
duration: const Duration(milliseconds: 150),
|
||||
switchInCurve: Curves.fastEaseInToSlowEaseOut,
|
||||
switchOutCurve: Curves.fastEaseInToSlowEaseOut,
|
||||
transitionBuilder: (
|
||||
@ -800,7 +803,7 @@ class ChatRoomScreen extends HookConsumerWidget {
|
||||
),
|
||||
)
|
||||
: const SizedBox.shrink(
|
||||
key: ValueKey('no_typing'),
|
||||
key: ValueKey('typing-indicator-none'),
|
||||
),
|
||||
),
|
||||
_ChatInput(
|
||||
|
@ -14,7 +14,7 @@ import 'package:island/widgets/account/account_picker.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/widgets/content/cloud_files.dart';
|
||||
import 'package:island/widgets/content/paging_helper_ext.dart';
|
||||
import 'package:island/widgets/content/sheet.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:riverpod_paging_utils/riverpod_paging_utils.dart';
|
||||
@ -31,6 +31,206 @@ class ChatDetailScreen extends HookConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final roomState = ref.watch(chatroomProvider(id));
|
||||
final roomIdentity = ref.watch(chatroomIdentityProvider(id));
|
||||
|
||||
const kNotifyLevelText = [
|
||||
'chatNotifyLevelAll',
|
||||
'chatNotifyLevelMention',
|
||||
'chatNotifyLevelNone',
|
||||
];
|
||||
|
||||
void setNotifyLevel(int level) async {
|
||||
try {
|
||||
final client = ref.watch(apiClientProvider);
|
||||
await client.patch(
|
||||
'/chat/$id/members/me/notify',
|
||||
data: {'notify_level': level},
|
||||
);
|
||||
ref.invalidate(chatroomIdentityProvider(id));
|
||||
if (context.mounted) {
|
||||
showSnackBar(
|
||||
context,
|
||||
'chatNotifyLevelUpdated'.tr(args: [kNotifyLevelText[level].tr()]),
|
||||
);
|
||||
}
|
||||
} catch (err) {
|
||||
showErrorAlert(err);
|
||||
}
|
||||
}
|
||||
|
||||
void setChatBreak(DateTime until) async {
|
||||
try {
|
||||
final client = ref.watch(apiClientProvider);
|
||||
await client.patch(
|
||||
'/chat/$id/members/me/notify',
|
||||
data: {'break_until': until.toUtc().toIso8601String()},
|
||||
);
|
||||
ref.invalidate(chatroomProvider(id));
|
||||
} catch (err) {
|
||||
showErrorAlert(err);
|
||||
}
|
||||
}
|
||||
|
||||
void showNotifyLevelBottomSheet(SnChatMember identity) {
|
||||
showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
context: context,
|
||||
builder:
|
||||
(context) => SheetScaffold(
|
||||
height: 320,
|
||||
titleText: 'chatNotifyLevel'.tr(),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ListTile(
|
||||
title: const Text('chatNotifyLevelAll').tr(),
|
||||
subtitle: const Text('chatNotifyLevelDescription').tr(),
|
||||
leading: const Icon(Icons.notifications_active),
|
||||
selected: identity.notify == 0,
|
||||
onTap: () {
|
||||
setNotifyLevel(0);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: const Text('chatNotifyLevelMention').tr(),
|
||||
subtitle: const Text('chatNotifyLevelDescription').tr(),
|
||||
leading: const Icon(Icons.alternate_email),
|
||||
selected: identity.notify == 1,
|
||||
onTap: () {
|
||||
setNotifyLevel(1);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: const Text('chatNotifyLevelNone').tr(),
|
||||
subtitle: const Text('chatNotifyLevelDescription').tr(),
|
||||
leading: const Icon(Icons.notifications_off),
|
||||
selected: identity.notify == 2,
|
||||
onTap: () {
|
||||
setNotifyLevel(2);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void showChatBreakDialog() {
|
||||
final now = DateTime.now();
|
||||
final durationController = TextEditingController();
|
||||
|
||||
showDialog(
|
||||
context: context,
|
||||
builder:
|
||||
(context) => AlertDialog(
|
||||
title: const Text('chatBreak').tr(),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Text('chatBreakDescription').tr(),
|
||||
const Gap(16),
|
||||
ListTile(
|
||||
title: const Text('Clear').tr(),
|
||||
subtitle: const Text('chatBreakClear').tr(),
|
||||
leading: const Icon(Icons.notifications_active),
|
||||
onTap: () {
|
||||
setChatBreak(now);
|
||||
Navigator.pop(context);
|
||||
if (context.mounted) {
|
||||
showSnackBar(context, 'chatBreakCleared'.tr());
|
||||
}
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: const Text('5m'),
|
||||
subtitle: const Text('chatBreakHour').tr(args: ['5m']),
|
||||
leading: const Icon(Symbols.circle),
|
||||
onTap: () {
|
||||
setChatBreak(now.add(const Duration(minutes: 5)));
|
||||
Navigator.pop(context);
|
||||
if (context.mounted) {
|
||||
showSnackBar(context, 'chatBreakSet'.tr(args: ['5m']));
|
||||
}
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: const Text('10m'),
|
||||
subtitle: const Text('chatBreakHour').tr(args: ['10m']),
|
||||
leading: const Icon(Symbols.circle),
|
||||
onTap: () {
|
||||
setChatBreak(now.add(const Duration(minutes: 10)));
|
||||
Navigator.pop(context);
|
||||
if (context.mounted) {
|
||||
showSnackBar(context, 'chatBreakSet'.tr(args: ['10m']));
|
||||
}
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: const Text('15m'),
|
||||
subtitle: const Text('chatBreakHour').tr(args: ['15m']),
|
||||
leading: const Icon(Symbols.timer_3),
|
||||
onTap: () {
|
||||
setChatBreak(now.add(const Duration(minutes: 15)));
|
||||
Navigator.pop(context);
|
||||
if (context.mounted) {
|
||||
showSnackBar(context, 'chatBreakSet'.tr(args: ['15m']));
|
||||
}
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: const Text('30m'),
|
||||
subtitle: const Text('chatBreakHour').tr(args: ['30m']),
|
||||
leading: const Icon(Symbols.timer),
|
||||
onTap: () {
|
||||
setChatBreak(now.add(const Duration(minutes: 30)));
|
||||
Navigator.pop(context);
|
||||
if (context.mounted) {
|
||||
showSnackBar(context, 'chatBreakSet'.tr(args: ['30m']));
|
||||
}
|
||||
},
|
||||
),
|
||||
const Gap(8),
|
||||
TextField(
|
||||
controller: durationController,
|
||||
decoration: InputDecoration(
|
||||
labelText: 'Custom (minutes)'.tr(),
|
||||
hintText: 'Enter minutes'.tr(),
|
||||
border: const OutlineInputBorder(),
|
||||
suffixIcon: IconButton(
|
||||
icon: const Icon(Icons.check),
|
||||
onPressed: () {
|
||||
final minutes = int.tryParse(durationController.text);
|
||||
if (minutes != null && minutes > 0) {
|
||||
setChatBreak(now.add(Duration(minutes: minutes)));
|
||||
Navigator.pop(context);
|
||||
if (context.mounted) {
|
||||
showSnackBar(
|
||||
context,
|
||||
'chatBreakSet'.tr(args: ['${minutes}m']),
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
keyboardType: TextInputType.number,
|
||||
onTapOutside:
|
||||
(_) => FocusManager.instance.primaryFocus?.unfocus(),
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: const Text('cancel').tr(),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
const iconShadow = Shadow(
|
||||
color: Colors.black54,
|
||||
@ -114,17 +314,59 @@ class ChatDetailScreen extends HookConsumerWidget {
|
||||
],
|
||||
),
|
||||
SliverToBoxAdapter(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
currentRoom.description ?? 'descriptionNone'.tr(),
|
||||
style: const TextStyle(fontSize: 16),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
currentRoom.description ?? 'descriptionNone'.tr(),
|
||||
style: const TextStyle(fontSize: 16),
|
||||
).padding(all: 24),
|
||||
const Divider(height: 1),
|
||||
roomIdentity.when(
|
||||
data:
|
||||
(identity) => Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ListTile(
|
||||
contentPadding: EdgeInsets.symmetric(
|
||||
horizontal: 24,
|
||||
),
|
||||
leading: const Icon(Symbols.notifications),
|
||||
trailing: const Icon(Symbols.chevron_right),
|
||||
title: const Text('chatNotifyLevel').tr(),
|
||||
subtitle: Text(
|
||||
kNotifyLevelText[identity!.notify].tr(),
|
||||
),
|
||||
onTap:
|
||||
() =>
|
||||
showNotifyLevelBottomSheet(identity),
|
||||
),
|
||||
ListTile(
|
||||
contentPadding: EdgeInsets.symmetric(
|
||||
horizontal: 24,
|
||||
),
|
||||
leading: const Icon(Icons.timer),
|
||||
trailing: const Icon(Symbols.chevron_right),
|
||||
title: const Text('chatBreak').tr(),
|
||||
subtitle:
|
||||
identity.breakUntil != null &&
|
||||
identity.breakUntil!.isAfter(
|
||||
DateTime.now(),
|
||||
)
|
||||
? Text(
|
||||
DateFormat(
|
||||
'yyyy-MM-dd HH:mm',
|
||||
).format(identity.breakUntil!),
|
||||
)
|
||||
: const Text('chatBreakNone').tr(),
|
||||
onTap: () => showChatBreakDialog(),
|
||||
),
|
||||
],
|
||||
),
|
||||
error: (_, _) => const SizedBox.shrink(),
|
||||
loading: () => const SizedBox.shrink(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -7,7 +7,6 @@ import 'package:island/models/activity.dart';
|
||||
import 'package:island/pods/userinfo.dart';
|
||||
import 'package:island/route.gr.dart';
|
||||
import 'package:island/services/responsive.dart';
|
||||
import 'package:island/widgets/account/status.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/models/post.dart';
|
||||
import 'package:island/widgets/check_in.dart';
|
||||
@ -194,10 +193,7 @@ class ActivityListNotifier extends _$ActivityListNotifier
|
||||
|
||||
final response = await client.get(
|
||||
'/activities',
|
||||
queryParameters: {
|
||||
if (cursor != null) 'reading_cursor': cursor,
|
||||
'take': take,
|
||||
},
|
||||
queryParameters: {if (cursor != null) 'cursor': cursor, 'take': take},
|
||||
);
|
||||
|
||||
final List<SnActivity> items =
|
||||
@ -207,7 +203,12 @@ class ActivityListNotifier extends _$ActivityListNotifier
|
||||
|
||||
final hasMore = (items.firstOrNull?.type ?? 'empty') != 'empty';
|
||||
final nextCursor =
|
||||
items.map((x) => x.createdAt).lastOrNull?.toIso8601String().toString();
|
||||
items
|
||||
.map((x) => x.createdAt)
|
||||
.lastOrNull
|
||||
?.toUtc()
|
||||
.toIso8601String()
|
||||
.toString();
|
||||
|
||||
return CursorPagingData(
|
||||
items: items,
|
||||
|
@ -7,7 +7,7 @@ part of 'explore.dart';
|
||||
// **************************************************************************
|
||||
|
||||
String _$activityListNotifierHash() =>
|
||||
r'1baf0bb961bc02bfc8a5b5f515981072c6ce1750';
|
||||
r'c9683035f7a66a2f331689e274642b60064fbb2e';
|
||||
|
||||
/// See also [ActivityListNotifier].
|
||||
@ProviderFor(ActivityListNotifier)
|
||||
|
@ -47,6 +47,7 @@ class PostDetailScreen extends HookConsumerWidget {
|
||||
PostItem(
|
||||
item: post!,
|
||||
isOpenable: false,
|
||||
isFullPost: true,
|
||||
backgroundColor: isWide ? Colors.transparent : null,
|
||||
),
|
||||
const Divider(height: 1),
|
||||
@ -63,7 +64,6 @@ class PostDetailScreen extends HookConsumerWidget {
|
||||
right: 0,
|
||||
child: Material(
|
||||
elevation: 2,
|
||||
color: Colors.transparent,
|
||||
child: PostQuickReply(
|
||||
parent: post,
|
||||
onPosted: () {
|
||||
|
@ -7,13 +7,18 @@ import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/post.dart';
|
||||
import 'package:island/models/user.dart';
|
||||
import 'package:island/pods/config.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/services/color.dart';
|
||||
import 'package:island/widgets/account/account_name.dart';
|
||||
import 'package:island/widgets/account/badge.dart';
|
||||
import 'package:island/widgets/account/status.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/widgets/content/cloud_files.dart';
|
||||
import 'package:island/widgets/post/post_list.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:palette_generator/palette_generator.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
@ -47,6 +52,21 @@ Future<SnSubscriptionStatus> publisherSubscriptionStatus(
|
||||
return SnSubscriptionStatus.fromJson(resp.data);
|
||||
}
|
||||
|
||||
@riverpod
|
||||
Future<Color?> publisherAppbarForcegroundColor(Ref ref, String pubName) async {
|
||||
final publisher = await ref.watch(publisherProvider(pubName).future);
|
||||
if (publisher.background == null) return null;
|
||||
final palette = await PaletteGenerator.fromImageProvider(
|
||||
CloudImageWidget.provider(
|
||||
fileId: publisher.background!.id,
|
||||
serverUrl: ref.watch(serverUrlProvider),
|
||||
),
|
||||
);
|
||||
final dominantColor = palette.dominantColor?.color;
|
||||
if (dominantColor == null) return null;
|
||||
return dominantColor.computeLuminance() > 0.5 ? Colors.black : Colors.white;
|
||||
}
|
||||
|
||||
@RoutePage()
|
||||
class PublisherProfileScreen extends HookConsumerWidget {
|
||||
final String name;
|
||||
@ -60,6 +80,9 @@ class PublisherProfileScreen extends HookConsumerWidget {
|
||||
final publisher = ref.watch(publisherProvider(name));
|
||||
final badges = ref.watch(publisherBadgesProvider(name));
|
||||
final subStatus = ref.watch(publisherSubscriptionStatusProvider(name));
|
||||
final appbarColor = ref.watch(
|
||||
publisherAppbarForcegroundColorProvider(name),
|
||||
);
|
||||
|
||||
final subscribing = useState(false);
|
||||
|
||||
@ -91,8 +114,8 @@ class PublisherProfileScreen extends HookConsumerWidget {
|
||||
}
|
||||
}
|
||||
|
||||
final iconShadow = Shadow(
|
||||
color: Colors.black54,
|
||||
final appbarShadow = Shadow(
|
||||
color: appbarColor.value?.invert ?? Colors.transparent,
|
||||
blurRadius: 5.0,
|
||||
offset: Offset(1.0, 1.0),
|
||||
);
|
||||
@ -103,24 +126,40 @@ class PublisherProfileScreen extends HookConsumerWidget {
|
||||
body: CustomScrollView(
|
||||
slivers: [
|
||||
SliverAppBar(
|
||||
foregroundColor: appbarColor.value,
|
||||
expandedHeight: 180,
|
||||
pinned: true,
|
||||
leading: PageBackButton(shadows: [iconShadow]),
|
||||
flexibleSpace: FlexibleSpaceBar(
|
||||
background:
|
||||
data.background?.id != null
|
||||
? CloudImageWidget(fileId: data.background!.id)
|
||||
: Container(
|
||||
color:
|
||||
Theme.of(context).appBarTheme.backgroundColor,
|
||||
),
|
||||
title: Text(
|
||||
data.nick,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).appBarTheme.foregroundColor,
|
||||
shadows: [iconShadow],
|
||||
leading: PageBackButton(
|
||||
color: appbarColor.value,
|
||||
shadows: [appbarShadow],
|
||||
),
|
||||
flexibleSpace: Stack(
|
||||
children: [
|
||||
Positioned.fill(
|
||||
child:
|
||||
data.background?.id != null
|
||||
? CloudImageWidget(file: data.background)
|
||||
: Container(
|
||||
color:
|
||||
Theme.of(
|
||||
context,
|
||||
).appBarTheme.backgroundColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
FlexibleSpaceBar(
|
||||
title: Text(
|
||||
data.nick,
|
||||
style: TextStyle(
|
||||
color:
|
||||
appbarColor.value ??
|
||||
Theme.of(context).appBarTheme.foregroundColor,
|
||||
shadows: [appbarShadow],
|
||||
),
|
||||
),
|
||||
background:
|
||||
Container(), // Empty container since background is handled by Stack
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
subStatus.when(
|
||||
@ -136,7 +175,7 @@ class PublisherProfileScreen extends HookConsumerWidget {
|
||||
status.isSubscribed
|
||||
? Icons.remove_circle
|
||||
: Icons.add_circle,
|
||||
shadows: [iconShadow],
|
||||
shadows: [appbarShadow],
|
||||
),
|
||||
),
|
||||
error: (_, _) => const SizedBox(),
|
||||
@ -163,10 +202,7 @@ class PublisherProfileScreen extends HookConsumerWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 20,
|
||||
children: [
|
||||
ProfilePictureWidget(
|
||||
fileId: data.picture!.id,
|
||||
radius: 32,
|
||||
),
|
||||
ProfilePictureWidget(file: data.picture, radius: 32),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
@ -175,62 +211,85 @@ class PublisherProfileScreen extends HookConsumerWidget {
|
||||
spacing: 6,
|
||||
children: [
|
||||
Text(data.nick).fontSize(20),
|
||||
if (data.verification != null)
|
||||
VerificationMark(mark: data.verification!),
|
||||
Text(
|
||||
'@${data.name}',
|
||||
).fontSize(14).opacity(0.85),
|
||||
],
|
||||
),
|
||||
if (data.type == 0 && data.account != null)
|
||||
InkWell(
|
||||
onTap: () {
|
||||
context.router.pushPath(
|
||||
'/account/${data.account!.name}',
|
||||
);
|
||||
},
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
spacing: 4,
|
||||
children: [
|
||||
Text(
|
||||
'publisherVisitAccountPage'.tr(
|
||||
args: ['@${data.account!.name}'],
|
||||
),
|
||||
).fontSize(14),
|
||||
Icon(Icons.launch, size: 14),
|
||||
],
|
||||
).opacity(0.85),
|
||||
).padding(bottom: 6),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
spacing: 6,
|
||||
children: [
|
||||
Icon(
|
||||
data.type == 0
|
||||
? Symbols.person
|
||||
: Symbols.workspaces,
|
||||
fill: 1,
|
||||
size: 17,
|
||||
),
|
||||
Text(
|
||||
'publisherBelongsTo'.tr(
|
||||
args: ['@${data.account!.name}'],
|
||||
),
|
||||
).fontSize(14),
|
||||
],
|
||||
).opacity(0.85).padding(bottom: 6),
|
||||
if (data.type == 0 && data.account != null)
|
||||
AccountStatusWidget(
|
||||
uname: data.account!.name,
|
||||
padding: EdgeInsets.zero,
|
||||
),
|
||||
OutlinedButton.icon(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
context.router.pushPath(
|
||||
'/account/${data.name}',
|
||||
);
|
||||
},
|
||||
icon: const Icon(Symbols.launch),
|
||||
label: Text('accountProfileView').tr(),
|
||||
style: ButtonStyle(
|
||||
visualDensity: VisualDensity(vertical: -2),
|
||||
),
|
||||
).padding(top: 8),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
).padding(horizontal: 24, top: 24, bottom: 24),
|
||||
).padding(horizontal: 24, top: 24),
|
||||
),
|
||||
SliverToBoxAdapter(
|
||||
child: Column(
|
||||
children: [
|
||||
if (badges.value?.isNotEmpty ?? false)
|
||||
BadgeList(badges: badges.value!).padding(top: 16),
|
||||
if (data.verification != null)
|
||||
VerificationStatusCard(
|
||||
mark: data.verification!,
|
||||
).padding(top: 16),
|
||||
],
|
||||
).padding(horizontal: 24),
|
||||
),
|
||||
SliverToBoxAdapter(
|
||||
child: const Divider(height: 1).padding(vertical: 24),
|
||||
),
|
||||
SliverToBoxAdapter(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Text('bio').tr().bold(),
|
||||
Text(
|
||||
data.bio.isEmpty ? 'descriptionNone'.tr() : data.bio,
|
||||
),
|
||||
],
|
||||
).padding(horizontal: 24),
|
||||
),
|
||||
SliverToBoxAdapter(
|
||||
child: const Divider(height: 1).padding(top: 24),
|
||||
),
|
||||
if (badges.value?.isNotEmpty ?? false)
|
||||
SliverToBoxAdapter(
|
||||
child: BadgeList(
|
||||
badges: badges.value!,
|
||||
).padding(horizontal: 24, bottom: 24),
|
||||
)
|
||||
else
|
||||
const SliverGap(16),
|
||||
SliverToBoxAdapter(child: const Divider(height: 1)),
|
||||
if (data.bio.isNotEmpty)
|
||||
SliverToBoxAdapter(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [Text('bio').tr().bold(), Text(data.bio)],
|
||||
).padding(horizontal: 24, top: 24),
|
||||
),
|
||||
if (data.bio.isNotEmpty)
|
||||
SliverToBoxAdapter(
|
||||
child: const Divider(height: 1).padding(top: 24),
|
||||
),
|
||||
SliverPostList(pubName: name),
|
||||
SliverGap(MediaQuery.of(context).padding.bottom + 16),
|
||||
],
|
||||
|
@ -399,5 +399,136 @@ class _PublisherSubscriptionStatusProviderElement
|
||||
String get pubName => (origin as PublisherSubscriptionStatusProvider).pubName;
|
||||
}
|
||||
|
||||
String _$publisherAppbarForcegroundColorHash() =>
|
||||
r'3ff2eebb48d3f3af1907052f471e648f5b14b13c';
|
||||
|
||||
/// See also [publisherAppbarForcegroundColor].
|
||||
@ProviderFor(publisherAppbarForcegroundColor)
|
||||
const publisherAppbarForcegroundColorProvider =
|
||||
PublisherAppbarForcegroundColorFamily();
|
||||
|
||||
/// See also [publisherAppbarForcegroundColor].
|
||||
class PublisherAppbarForcegroundColorFamily extends Family<AsyncValue<Color?>> {
|
||||
/// See also [publisherAppbarForcegroundColor].
|
||||
const PublisherAppbarForcegroundColorFamily();
|
||||
|
||||
/// See also [publisherAppbarForcegroundColor].
|
||||
PublisherAppbarForcegroundColorProvider call(String pubName) {
|
||||
return PublisherAppbarForcegroundColorProvider(pubName);
|
||||
}
|
||||
|
||||
@override
|
||||
PublisherAppbarForcegroundColorProvider getProviderOverride(
|
||||
covariant PublisherAppbarForcegroundColorProvider provider,
|
||||
) {
|
||||
return call(provider.pubName);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'publisherAppbarForcegroundColorProvider';
|
||||
}
|
||||
|
||||
/// See also [publisherAppbarForcegroundColor].
|
||||
class PublisherAppbarForcegroundColorProvider
|
||||
extends AutoDisposeFutureProvider<Color?> {
|
||||
/// See also [publisherAppbarForcegroundColor].
|
||||
PublisherAppbarForcegroundColorProvider(String pubName)
|
||||
: this._internal(
|
||||
(ref) => publisherAppbarForcegroundColor(
|
||||
ref as PublisherAppbarForcegroundColorRef,
|
||||
pubName,
|
||||
),
|
||||
from: publisherAppbarForcegroundColorProvider,
|
||||
name: r'publisherAppbarForcegroundColorProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$publisherAppbarForcegroundColorHash,
|
||||
dependencies: PublisherAppbarForcegroundColorFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
PublisherAppbarForcegroundColorFamily._allTransitiveDependencies,
|
||||
pubName: pubName,
|
||||
);
|
||||
|
||||
PublisherAppbarForcegroundColorProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.pubName,
|
||||
}) : super.internal();
|
||||
|
||||
final String pubName;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<Color?> Function(PublisherAppbarForcegroundColorRef provider)
|
||||
create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: PublisherAppbarForcegroundColorProvider._internal(
|
||||
(ref) => create(ref as PublisherAppbarForcegroundColorRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
pubName: pubName,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<Color?> createElement() {
|
||||
return _PublisherAppbarForcegroundColorProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is PublisherAppbarForcegroundColorProvider &&
|
||||
other.pubName == pubName;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, pubName.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin PublisherAppbarForcegroundColorRef
|
||||
on AutoDisposeFutureProviderRef<Color?> {
|
||||
/// The parameter `pubName` of this provider.
|
||||
String get pubName;
|
||||
}
|
||||
|
||||
class _PublisherAppbarForcegroundColorProviderElement
|
||||
extends AutoDisposeFutureProviderElement<Color?>
|
||||
with PublisherAppbarForcegroundColorRef {
|
||||
_PublisherAppbarForcegroundColorProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get pubName =>
|
||||
(origin as PublisherAppbarForcegroundColorProvider).pubName;
|
||||
}
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
@ -16,6 +16,7 @@ import 'package:island/services/responsive.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:palette_generator/palette_generator.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
import 'package:island/pods/config.dart';
|
||||
@ -232,7 +233,7 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
return ListTile(
|
||||
minLeadingWidth: 48,
|
||||
title: Text('settingsBackgroundImageClear').tr(),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
contentPadding: const EdgeInsets.only(left: 24, right: 17),
|
||||
leading: const Icon(Symbols.texture),
|
||||
trailing: const Icon(Symbols.chevron_right),
|
||||
onTap: () {
|
||||
@ -248,6 +249,53 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
if (!kIsWeb && docBasepath.value != null)
|
||||
FutureBuilder(
|
||||
future:
|
||||
File('${docBasepath.value}/$kAppBackgroundImagePath').exists(),
|
||||
builder: (context, snapshot) {
|
||||
if (!snapshot.hasData || !snapshot.data!) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return ListTile(
|
||||
minLeadingWidth: 48,
|
||||
title: Text('settingsBackgroundGenerateColor').tr(),
|
||||
contentPadding: const EdgeInsets.only(left: 24, right: 17),
|
||||
leading: const Icon(Symbols.format_color_fill),
|
||||
trailing: const Icon(Symbols.chevron_right),
|
||||
onTap: () async {
|
||||
showLoadingModal(context);
|
||||
final palette = await PaletteGenerator.fromImageProvider(
|
||||
FileImage(
|
||||
File('${docBasepath.value}/$kAppBackgroundImagePath'),
|
||||
),
|
||||
);
|
||||
if (palette.darkVibrantColor == null ||
|
||||
palette.lightVibrantColor == null) {
|
||||
if (context.mounted) hideLoadingModal(context);
|
||||
showErrorAlert(
|
||||
'Unable to calculate the domiant color of the background image.',
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (!context.mounted) return;
|
||||
final color =
|
||||
MediaQuery.of(context).platformBrightness == Brightness.dark
|
||||
? palette.darkVibrantColor!.color
|
||||
: palette.lightVibrantColor!.color;
|
||||
ref
|
||||
.read(appSettingsNotifierProvider.notifier)
|
||||
.setAppColorScheme(color.value);
|
||||
if (context.mounted) {
|
||||
hideLoadingModal(context);
|
||||
showSnackBar(context, 'settingsApplied'.tr());
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
];
|
||||
|
||||
final serverSettings = [
|
||||
@ -402,19 +450,24 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
children: [
|
||||
_ShortcutRow(
|
||||
shortcut: 'Ctrl+F',
|
||||
description: 'settingsKeyboardShortcutSearch'.tr(),
|
||||
description:
|
||||
'settingsKeyboardShortcutSearch'.tr(),
|
||||
),
|
||||
_ShortcutRow(
|
||||
shortcut: 'Ctrl+,',
|
||||
description: 'settingsKeyboardShortcutSettings'.tr(),
|
||||
description:
|
||||
'settingsKeyboardShortcutSettings'.tr(),
|
||||
),
|
||||
_ShortcutRow(
|
||||
shortcut: 'Ctrl+N',
|
||||
description: 'settingsKeyboardShortcutNewMessage'.tr(),
|
||||
description:
|
||||
'settingsKeyboardShortcutNewMessage'.tr(),
|
||||
),
|
||||
_ShortcutRow(
|
||||
shortcut: 'Esc',
|
||||
description: 'settingsKeyboardShortcutCloseDialog'.tr(),
|
||||
description:
|
||||
'settingsKeyboardShortcutCloseDialog'
|
||||
.tr(),
|
||||
),
|
||||
// Add more shortcuts as needed
|
||||
],
|
||||
@ -448,7 +501,10 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
title: 'settingsAppearance'.tr(),
|
||||
children: appearanceSettings,
|
||||
),
|
||||
_SettingsSection(title: 'settingsServer'.tr(), children: serverSettings),
|
||||
_SettingsSection(
|
||||
title: 'settingsServer'.tr(),
|
||||
children: serverSettings,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -475,11 +531,23 @@ class SettingsScreen extends HookConsumerWidget {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
_SettingsSection(title: 'settingsAppearance'.tr(), children: appearanceSettings),
|
||||
_SettingsSection(title: 'settingsServer'.tr(), children: serverSettings),
|
||||
_SettingsSection(title: 'settingsBehavior'.tr(), children: behaviorSettings),
|
||||
_SettingsSection(
|
||||
title: 'settingsAppearance'.tr(),
|
||||
children: appearanceSettings,
|
||||
),
|
||||
_SettingsSection(
|
||||
title: 'settingsServer'.tr(),
|
||||
children: serverSettings,
|
||||
),
|
||||
_SettingsSection(
|
||||
title: 'settingsBehavior'.tr(),
|
||||
children: behaviorSettings,
|
||||
),
|
||||
if (desktopSettings.isNotEmpty)
|
||||
_SettingsSection(title: 'settingsDesktop'.tr(), children: desktopSettings),
|
||||
_SettingsSection(
|
||||
title: 'settingsDesktop'.tr(),
|
||||
children: desktopSettings,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
7
lib/services/color.dart
Normal file
7
lib/services/color.dart
Normal file
@ -0,0 +1,7 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
extension ColorInversion on Color {
|
||||
Color get invert {
|
||||
return Color.fromARGB(alpha, 255 - red, 255 - green, 255 - blue);
|
||||
}
|
||||
}
|
76
lib/services/time.dart
Normal file
76
lib/services/time.dart
Normal file
@ -0,0 +1,76 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:relative_time/relative_time.dart';
|
||||
|
||||
extension DurationFormatter on Duration {
|
||||
String formatDuration() {
|
||||
final isNegative = inMicroseconds < 0;
|
||||
final positiveDuration = isNegative ? -this : this;
|
||||
|
||||
final hours = positiveDuration.inHours.toString().padLeft(2, '0');
|
||||
final minutes = (positiveDuration.inMinutes % 60).toString().padLeft(
|
||||
2,
|
||||
'0',
|
||||
);
|
||||
final seconds = (positiveDuration.inSeconds % 60).toString().padLeft(
|
||||
2,
|
||||
'0',
|
||||
);
|
||||
|
||||
return '${isNegative ? '-' : ''}$hours:$minutes:$seconds';
|
||||
}
|
||||
|
||||
String formatOffset() {
|
||||
final isNegative = inMicroseconds < 0;
|
||||
final positiveDuration = isNegative ? -this : this;
|
||||
|
||||
final hours = positiveDuration.inHours.toString().padLeft(2, '0');
|
||||
final minutes = (positiveDuration.inMinutes % 60).toString().padLeft(
|
||||
2,
|
||||
'0',
|
||||
);
|
||||
|
||||
return '${isNegative ? '-' : '+'}$hours:$minutes';
|
||||
}
|
||||
|
||||
String formatOffsetLocal() {
|
||||
// Get the local timezone offset
|
||||
final localOffset = DateTime.now().timeZoneOffset;
|
||||
|
||||
// Add the local offset to the input duration
|
||||
final totalOffset = this - localOffset;
|
||||
|
||||
final isNegative = totalOffset.inMicroseconds < 0;
|
||||
final positiveDuration = isNegative ? -totalOffset : totalOffset;
|
||||
|
||||
final hours = positiveDuration.inHours.toString().padLeft(2, '0');
|
||||
final minutes = (positiveDuration.inMinutes % 60).toString().padLeft(
|
||||
2,
|
||||
'0',
|
||||
);
|
||||
|
||||
return '${isNegative ? '-' : '+'}$hours:$minutes';
|
||||
}
|
||||
}
|
||||
|
||||
extension DateTimeFormatter on DateTime {
|
||||
String formatSystem() {
|
||||
return DateFormat.yMd().add_jm().format(toLocal());
|
||||
}
|
||||
|
||||
String formatCustom(String pattern) {
|
||||
return DateFormat(pattern).format(toLocal());
|
||||
}
|
||||
|
||||
String formatCustomGlobal(String pattern) {
|
||||
return DateFormat(pattern).format(this);
|
||||
}
|
||||
|
||||
String formatWithLocale(String locale) {
|
||||
return DateFormat.yMd().add_jm().format(toLocal()).toString();
|
||||
}
|
||||
|
||||
String formatRelative(BuildContext context) {
|
||||
return RelativeTime(context).format(toLocal());
|
||||
}
|
||||
}
|
1
lib/services/timezone.dart
Normal file
1
lib/services/timezone.dart
Normal file
@ -0,0 +1 @@
|
||||
export 'timezone/native.dart' if (dart.library.html) 'timezone/web.dart';
|
22
lib/services/timezone/native.dart
Normal file
22
lib/services/timezone/native.dart
Normal file
@ -0,0 +1,22 @@
|
||||
import 'package:flutter_timezone/flutter_timezone.dart';
|
||||
import 'package:timezone/standalone.dart' as tz;
|
||||
import 'package:timezone/data/latest_all.dart' as tzdb;
|
||||
|
||||
Future<void> initializeTzdb() async {
|
||||
tzdb.initializeTimeZones();
|
||||
}
|
||||
|
||||
(Duration offset, DateTime now) getTzInfo(String name) {
|
||||
final location = tz.getLocation(name);
|
||||
final now = tz.TZDateTime.now(location);
|
||||
final offset = now.timeZoneOffset;
|
||||
return (offset, now);
|
||||
}
|
||||
|
||||
Future<String> getMachineTz() async {
|
||||
return await FlutterTimezone.getLocalTimezone();
|
||||
}
|
||||
|
||||
List<String> getAvailableTz() {
|
||||
return tz.timeZoneDatabase.locations.keys.toList();
|
||||
}
|
21
lib/services/timezone/web.dart
Normal file
21
lib/services/timezone/web.dart
Normal file
@ -0,0 +1,21 @@
|
||||
import 'package:flutter_timezone/flutter_timezone.dart';
|
||||
import 'package:timezone/browser.dart' as tz;
|
||||
|
||||
Future<void> initializeTzdb() async {
|
||||
await tz.initializeTimeZone();
|
||||
}
|
||||
|
||||
(Duration offset, DateTime now) getTzInfo(String name) {
|
||||
final location = tz.getLocation(name);
|
||||
final now = tz.TZDateTime.now(location);
|
||||
final offset = now.timeZoneOffset;
|
||||
return (offset, now);
|
||||
}
|
||||
|
||||
Future<String> getMachineTz() async {
|
||||
return await FlutterTimezone.getLocalTimezone();
|
||||
}
|
||||
|
||||
List<String> getAvailableTz() {
|
||||
return tz.timeZoneDatabase.locations.keys.toList();
|
||||
}
|
99
lib/widgets/account/account_name.dart
Normal file
99
lib/widgets/account/account_name.dart
Normal file
@ -0,0 +1,99 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:island/models/user.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
const kVerificationMarkColors = [
|
||||
Colors.teal,
|
||||
Colors.blue,
|
||||
Colors.amber,
|
||||
Colors.blueGrey,
|
||||
Colors.lightBlue,
|
||||
];
|
||||
|
||||
class AccountName extends StatelessWidget {
|
||||
final SnAccount account;
|
||||
final TextStyle? style;
|
||||
const AccountName({super.key, required this.account, this.style});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
spacing: 4,
|
||||
children: [
|
||||
Flexible(child: Text(account.nick, style: style)),
|
||||
if (account.profile.verification != null)
|
||||
VerificationMark(mark: account.profile.verification!),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class VerificationMark extends StatelessWidget {
|
||||
final SnVerificationMark mark;
|
||||
const VerificationMark({super.key, required this.mark});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Tooltip(
|
||||
richMessage: TextSpan(
|
||||
text: mark.title ?? 'No title',
|
||||
children: [
|
||||
TextSpan(text: '\n'),
|
||||
TextSpan(
|
||||
text: mark.description ?? 'descriptionNone'.tr(),
|
||||
style: TextStyle(fontWeight: FontWeight.normal),
|
||||
),
|
||||
],
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
child: Icon(
|
||||
mark.type == 4
|
||||
? Symbols.play_circle
|
||||
: mark.type == 0
|
||||
? Symbols.build_circle
|
||||
: Symbols.verified,
|
||||
size: 16,
|
||||
color: kVerificationMarkColors[mark.type],
|
||||
fill: 1,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class VerificationStatusCard extends StatelessWidget {
|
||||
final SnVerificationMark mark;
|
||||
const VerificationStatusCard({super.key, required this.mark});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Card(
|
||||
margin: EdgeInsets.zero,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Icon(
|
||||
mark.type == 4
|
||||
? Symbols.play_circle
|
||||
: mark.type == 0
|
||||
? Symbols.build_circle
|
||||
: Symbols.verified,
|
||||
size: 32,
|
||||
color: kVerificationMarkColors[mark.type],
|
||||
fill: 1,
|
||||
),
|
||||
const Gap(8),
|
||||
Text(mark.title ?? 'No title').bold(),
|
||||
Text(mark.description ?? 'descriptionNone'.tr()),
|
||||
const Gap(6),
|
||||
Text(
|
||||
'Verified by\n${mark.verifiedBy ?? 'No one verified it'}',
|
||||
).fontSize(11).opacity(0.8),
|
||||
],
|
||||
).padding(horizontal: 24, vertical: 16),
|
||||
);
|
||||
}
|
||||
}
|
218
lib/widgets/account/account_nameplate.dart
Normal file
218
lib/widgets/account/account_nameplate.dart
Normal file
@ -0,0 +1,218 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:island/widgets/account/account_name.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/screens/account/profile.dart';
|
||||
import 'package:island/widgets/content/cloud_files.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
class AccountNameplate extends HookConsumerWidget {
|
||||
final String name;
|
||||
final bool isOutlined;
|
||||
final EdgeInsetsGeometry padding;
|
||||
|
||||
const AccountNameplate({
|
||||
super.key,
|
||||
required this.name,
|
||||
this.isOutlined = true,
|
||||
this.padding = const EdgeInsets.all(16),
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final user = ref.watch(accountProvider(name));
|
||||
|
||||
return Container(
|
||||
decoration:
|
||||
isOutlined
|
||||
? BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 1 / MediaQuery.of(context).devicePixelRatio,
|
||||
color: Theme.of(context).dividerColor,
|
||||
),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
||||
)
|
||||
: null,
|
||||
margin: padding,
|
||||
child: Card(
|
||||
margin: EdgeInsets.zero,
|
||||
elevation: 0,
|
||||
color: Colors.transparent,
|
||||
child: user.when(
|
||||
data:
|
||||
(account) =>
|
||||
account.profile.background != null
|
||||
? AspectRatio(
|
||||
aspectRatio: 16 / 9,
|
||||
child: Stack(
|
||||
children: [
|
||||
// Background image
|
||||
Positioned.fill(
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: CloudFileWidget(
|
||||
item: account.profile.background!,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
// Gradient overlay for text readability
|
||||
Positioned.fill(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.bottomCenter,
|
||||
end: Alignment.topCenter,
|
||||
colors: [
|
||||
Colors.black.withOpacity(0.8),
|
||||
Colors.black.withOpacity(0.1),
|
||||
Colors.transparent,
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
// Content positioned at the bottom
|
||||
Positioned(
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16.0,
|
||||
vertical: 8.0,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
// Profile picture (equivalent to leading)
|
||||
ProfilePictureWidget(
|
||||
fileId: account.profile.picture?.id,
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
// Text content (equivalent to title and subtitle)
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
AccountName(
|
||||
account: account,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'@${account.name}',
|
||||
).textColor(Colors.white70),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16.0,
|
||||
vertical: 8.0,
|
||||
),
|
||||
decoration:
|
||||
isOutlined
|
||||
? BoxDecoration(
|
||||
border: Border.all(
|
||||
color:
|
||||
Theme.of(context).colorScheme.outline,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
)
|
||||
: null,
|
||||
child: Row(
|
||||
children: [
|
||||
// Profile picture (equivalent to leading)
|
||||
ProfilePictureWidget(
|
||||
fileId: account.profile.picture?.id,
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
// Text content (equivalent to title and subtitle)
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
AccountName(
|
||||
account: account,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
Text('@${account.name}'),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
loading:
|
||||
() => Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16.0,
|
||||
vertical: 8.0,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
// Loading indicator (equivalent to leading)
|
||||
const CircularProgressIndicator(),
|
||||
const SizedBox(width: 16),
|
||||
// Loading text content (equivalent to title and subtitle)
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Text('loading').bold().tr(),
|
||||
const SizedBox(height: 4),
|
||||
const Text('...'),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
error:
|
||||
(error, stackTrace) => Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16.0,
|
||||
vertical: 8.0,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
// Error icon (equivalent to leading)
|
||||
const Icon(Symbols.error),
|
||||
const SizedBox(width: 16),
|
||||
// Error text content (equivalent to title and subtitle)
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text('somethingWentWrong').tr().bold(),
|
||||
const SizedBox(height: 4),
|
||||
Text(error.toString()),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
169
lib/widgets/account/account_pfc.dart
Normal file
169
lib/widgets/account/account_pfc.dart
Normal file
@ -0,0 +1,169 @@
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_popup_card/flutter_popup_card.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/screens/account/profile.dart';
|
||||
import 'package:island/services/time.dart';
|
||||
import 'package:island/services/timezone/native.dart';
|
||||
import 'package:island/widgets/account/account_name.dart';
|
||||
import 'package:island/widgets/account/badge.dart';
|
||||
import 'package:island/widgets/account/leveling_progress.dart';
|
||||
import 'package:island/widgets/account/status.dart';
|
||||
import 'package:island/widgets/content/cloud_files.dart';
|
||||
import 'package:island/widgets/response.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
class AccountProfileCard extends HookConsumerWidget {
|
||||
final String uname;
|
||||
const AccountProfileCard({super.key, required this.uname});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final account = ref.watch(accountProvider(uname));
|
||||
final width =
|
||||
math.max(MediaQuery.of(context).size.width - 80, 360).toDouble();
|
||||
return PopupCard(
|
||||
elevation: 8,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)),
|
||||
child: SizedBox(
|
||||
width: width,
|
||||
child: account.when(
|
||||
data:
|
||||
(data) => Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
if (data.profile.background != null)
|
||||
ClipRRect(
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(12),
|
||||
),
|
||||
child: AspectRatio(
|
||||
aspectRatio: 16 / 9,
|
||||
child: CloudImageWidget(file: data.profile.background),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
ProfilePictureWidget(file: data.profile.picture),
|
||||
const Gap(12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AccountName(
|
||||
account: data,
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
Text('@${data.name}').fontSize(12),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const Gap(12),
|
||||
AccountStatusWidget(
|
||||
uname: data.name,
|
||||
padding: EdgeInsets.zero,
|
||||
),
|
||||
if (data.profile.timeZone.isNotEmpty)
|
||||
Row(
|
||||
spacing: 6,
|
||||
children: [
|
||||
Icon(
|
||||
Symbols.alarm,
|
||||
size: 17,
|
||||
fill: 1,
|
||||
).padding(right: 2),
|
||||
Text(
|
||||
getTzInfo(
|
||||
data.profile.timeZone,
|
||||
).$2.formatCustomGlobal('HH:mm'),
|
||||
).fontSize(12),
|
||||
Text(
|
||||
getTzInfo(
|
||||
data.profile.timeZone,
|
||||
).$1.formatOffsetLocal(),
|
||||
).fontSize(12),
|
||||
],
|
||||
).padding(top: 2),
|
||||
if (data.badges.isNotEmpty)
|
||||
BadgeList(badges: data.badges).padding(top: 12),
|
||||
LevelingProgressCard(
|
||||
level: data.profile.level,
|
||||
experience: data.profile.experience,
|
||||
progress: data.profile.levelingProgress,
|
||||
).padding(top: 12),
|
||||
FilledButton.tonalIcon(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
context.router.pushPath('/account/${data.name}');
|
||||
},
|
||||
icon: const Icon(Symbols.launch),
|
||||
label: Text('accountProfileView').tr(),
|
||||
).padding(top: 12, horizontal: 2),
|
||||
],
|
||||
).padding(horizontal: 24, vertical: 16),
|
||||
],
|
||||
),
|
||||
error:
|
||||
(err, _) => ResponseErrorWidget(
|
||||
error: err,
|
||||
onRetry: () => ref.invalidate(accountProvider(uname)),
|
||||
),
|
||||
loading:
|
||||
() => SizedBox(
|
||||
width: width,
|
||||
height: width,
|
||||
child:
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(24),
|
||||
child: CircularProgressIndicator(),
|
||||
).center(),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class AccountPfcGestureDetector extends StatelessWidget {
|
||||
final String uname;
|
||||
final Widget child;
|
||||
const AccountPfcGestureDetector({
|
||||
super.key,
|
||||
required this.uname,
|
||||
required this.child,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
child: child,
|
||||
onTapDown: (details) {
|
||||
showAccountProfileCard(context, uname, offset: details.localPosition);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> showAccountProfileCard(
|
||||
BuildContext context,
|
||||
String uname, {
|
||||
Offset? offset,
|
||||
}) async {
|
||||
await showPopupCard<void>(
|
||||
offset: offset ?? Offset.zero,
|
||||
context: context,
|
||||
builder: (context) => AccountProfileCard(uname: uname),
|
||||
dimBackground: true,
|
||||
);
|
||||
}
|
193
lib/widgets/account/event_calendar.dart
Normal file
193
lib/widgets/account/event_calendar.dart
Normal file
@ -0,0 +1,193 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/activity.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
import 'package:table_calendar/table_calendar.dart';
|
||||
|
||||
/// A reusable widget for displaying an event calendar with event details
|
||||
/// This can be used in various places throughout the app
|
||||
class EventCalendarWidget extends HookConsumerWidget {
|
||||
/// The list of calendar entries to display
|
||||
final AsyncValue<List<SnEventCalendarEntry>> events;
|
||||
|
||||
/// Initial date to focus on
|
||||
final DateTime? initialDate;
|
||||
|
||||
/// Whether to show the event details below the calendar
|
||||
final bool showEventDetails;
|
||||
|
||||
/// Whether to constrain the width of the calendar
|
||||
final bool constrainWidth;
|
||||
|
||||
/// Maximum width constraint when constrainWidth is true
|
||||
final double maxWidth;
|
||||
|
||||
/// Callback when a day is selected
|
||||
final void Function(DateTime)? onDaySelected;
|
||||
|
||||
/// Callback when the focused month changes
|
||||
final void Function(int year, int month)? onMonthChanged;
|
||||
|
||||
const EventCalendarWidget({
|
||||
super.key,
|
||||
required this.events,
|
||||
this.initialDate,
|
||||
this.showEventDetails = true,
|
||||
this.constrainWidth = false,
|
||||
this.maxWidth = 480,
|
||||
this.onDaySelected,
|
||||
this.onMonthChanged,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final selectedMonth = useState(initialDate?.month ?? DateTime.now().month);
|
||||
final selectedYear = useState(initialDate?.year ?? DateTime.now().year);
|
||||
final selectedDay = useState(initialDate ?? DateTime.now());
|
||||
|
||||
final content = Column(
|
||||
children: [
|
||||
TableCalendar(
|
||||
locale: EasyLocalization.of(context)!.locale.toString(),
|
||||
firstDay: DateTime.now().add(Duration(days: -3650)),
|
||||
lastDay: DateTime.now().add(Duration(days: 3650)),
|
||||
focusedDay: DateTime.utc(
|
||||
selectedYear.value,
|
||||
selectedMonth.value,
|
||||
selectedDay.value.day,
|
||||
),
|
||||
weekNumbersVisible: false,
|
||||
calendarFormat: CalendarFormat.month,
|
||||
selectedDayPredicate: (day) {
|
||||
return isSameDay(selectedDay.value, day);
|
||||
},
|
||||
onDaySelected: (value, _) {
|
||||
selectedDay.value = value;
|
||||
onDaySelected?.call(value);
|
||||
},
|
||||
onPageChanged: (focusedDay) {
|
||||
selectedMonth.value = focusedDay.month;
|
||||
selectedYear.value = focusedDay.year;
|
||||
onMonthChanged?.call(focusedDay.year, focusedDay.month);
|
||||
},
|
||||
eventLoader: (day) {
|
||||
return events.value
|
||||
?.where((e) => isSameDay(e.date, day))
|
||||
.expand((e) => [...e.statuses, e.checkInResult])
|
||||
.where((e) => e != null)
|
||||
.toList() ??
|
||||
[];
|
||||
},
|
||||
calendarBuilders: CalendarBuilders(
|
||||
dowBuilder: (context, day) {
|
||||
final text = DateFormat.EEEEE().format(day);
|
||||
return Center(child: Text(text));
|
||||
},
|
||||
markerBuilder: (context, day, events) {
|
||||
var checkInResult =
|
||||
events.whereType<SnCheckInResult>().firstOrNull;
|
||||
if (checkInResult != null) {
|
||||
return Positioned(
|
||||
top: 32,
|
||||
child: Text(
|
||||
'checkInResultT${checkInResult.level}'.tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 9,
|
||||
color:
|
||||
isSameDay(selectedDay.value, day)
|
||||
? Theme.of(context).colorScheme.onPrimaryContainer
|
||||
: isSameDay(DateTime.now(), day)
|
||||
? Theme.of(
|
||||
context,
|
||||
).colorScheme.onSecondaryContainer
|
||||
: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
),
|
||||
if (showEventDetails) ...[
|
||||
const Divider(height: 1).padding(top: 8),
|
||||
AnimatedSwitcher(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
final event =
|
||||
events.value
|
||||
?.where((e) => isSameDay(e.date, selectedDay.value))
|
||||
.firstOrNull;
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Text(DateFormat.EEEE().format(selectedDay.value))
|
||||
.fontSize(16)
|
||||
.bold()
|
||||
.textColor(
|
||||
Theme.of(context).colorScheme.onSecondaryContainer,
|
||||
),
|
||||
Text(DateFormat.yMd().format(selectedDay.value))
|
||||
.fontSize(12)
|
||||
.textColor(
|
||||
Theme.of(context).colorScheme.onSecondaryContainer,
|
||||
),
|
||||
const Gap(16),
|
||||
if (event?.checkInResult != null)
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Text(
|
||||
'checkInResultLevel${event!.checkInResult!.level}',
|
||||
).tr().fontSize(16).bold(),
|
||||
for (final tip in event.checkInResult!.tips)
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 8,
|
||||
children: [
|
||||
Icon(
|
||||
Symbols.circle,
|
||||
size: 12,
|
||||
fill: 1,
|
||||
).padding(top: 4, right: 4),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(tip.title).bold(),
|
||||
Text(tip.content),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
).padding(top: 8),
|
||||
],
|
||||
),
|
||||
if (event?.checkInResult == null &&
|
||||
(event?.statuses.isEmpty ?? true))
|
||||
Text('eventCalanderEmpty').tr(),
|
||||
],
|
||||
).padding(vertical: 24, horizontal: 24);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
);
|
||||
|
||||
if (constrainWidth) {
|
||||
return ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: maxWidth),
|
||||
child: Card(margin: EdgeInsets.all(16), child: content),
|
||||
).center();
|
||||
}
|
||||
|
||||
return content;
|
||||
}
|
||||
}
|
280
lib/widgets/account/fortune_graph.dart
Normal file
280
lib/widgets/account/fortune_graph.dart
Normal file
@ -0,0 +1,280 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:fl_chart/fl_chart.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/activity.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
/// A widget that displays a graph of fortune levels over time
|
||||
/// This can be used alongside the EventCalendarWidget to provide a different visualization
|
||||
class FortuneGraphWidget extends HookConsumerWidget {
|
||||
/// The list of calendar entries to display
|
||||
final AsyncValue<List<SnEventCalendarEntry>> events;
|
||||
|
||||
/// Whether to constrain the width of the graph
|
||||
final bool constrainWidth;
|
||||
|
||||
/// Maximum width constraint when constrainWidth is true
|
||||
final double maxWidth;
|
||||
|
||||
/// Height of the graph
|
||||
final double height;
|
||||
|
||||
/// Callback when a point is selected
|
||||
final void Function(DateTime)? onPointSelected;
|
||||
|
||||
final String? eventCalanderUser;
|
||||
|
||||
const FortuneGraphWidget({
|
||||
super.key,
|
||||
required this.events,
|
||||
this.constrainWidth = false,
|
||||
this.maxWidth = double.infinity,
|
||||
this.height = 180,
|
||||
this.onPointSelected,
|
||||
this.eventCalanderUser,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
// Filter events to only include those with check-in results
|
||||
final filteredEvents = events.whenData(
|
||||
(data) =>
|
||||
data
|
||||
.where((event) => event.checkInResult != null)
|
||||
.toList()
|
||||
.cast<SnEventCalendarEntry>()
|
||||
// Sort by date
|
||||
..sort((a, b) => a.date.compareTo(b.date)),
|
||||
);
|
||||
|
||||
final content = Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('fortuneGraph').tr().fontSize(18).bold(),
|
||||
if (eventCalanderUser != null)
|
||||
IconButton(
|
||||
icon: const Icon(Icons.calendar_month, size: 20),
|
||||
visualDensity: const VisualDensity(
|
||||
horizontal: -4,
|
||||
vertical: -4,
|
||||
),
|
||||
padding: EdgeInsets.zero,
|
||||
constraints: const BoxConstraints(),
|
||||
onPressed: () {
|
||||
context.router.pushNamed(
|
||||
'/account/$eventCalanderUser/calendar',
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
).padding(all: 16, bottom: 24),
|
||||
SizedBox(
|
||||
height: height,
|
||||
child: filteredEvents.when(
|
||||
data: (data) {
|
||||
if (data.isEmpty) {
|
||||
return Center(child: Text('noFortuneData').tr());
|
||||
}
|
||||
|
||||
// Create spots for the line chart
|
||||
final spots =
|
||||
data
|
||||
.map(
|
||||
(e) => FlSpot(
|
||||
e.date.millisecondsSinceEpoch.toDouble(),
|
||||
e.checkInResult!.level.toDouble(),
|
||||
),
|
||||
)
|
||||
.toList();
|
||||
|
||||
// Get min and max dates for the x-axis
|
||||
final minDate = data.first.date;
|
||||
final maxDate = data.last.date;
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 0, 16, 0),
|
||||
child: LineChart(
|
||||
LineChartData(
|
||||
gridData: FlGridData(
|
||||
show: true,
|
||||
horizontalInterval: 1,
|
||||
drawVerticalLine: false,
|
||||
),
|
||||
titlesData: FlTitlesData(
|
||||
bottomTitles: AxisTitles(
|
||||
sideTitles: SideTitles(
|
||||
showTitles: true,
|
||||
reservedSize: 30,
|
||||
interval: _calculateDateInterval(minDate, maxDate),
|
||||
getTitlesWidget: (value, meta) {
|
||||
final date = DateTime.fromMillisecondsSinceEpoch(
|
||||
value.toInt(),
|
||||
);
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
child: Text(
|
||||
DateFormat.MMMd().format(date),
|
||||
style: TextStyle(fontSize: 10),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
leftTitles: AxisTitles(
|
||||
sideTitles: SideTitles(
|
||||
showTitles: true,
|
||||
interval: 1,
|
||||
reservedSize: 40,
|
||||
getTitlesWidget: (value, meta) {
|
||||
final level = value.toInt();
|
||||
if (level < 0 || level > 4) return const SizedBox();
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0),
|
||||
child: Text(
|
||||
'checkInResultT$level'.tr(),
|
||||
style: TextStyle(fontSize: 10),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
topTitles: AxisTitles(
|
||||
sideTitles: SideTitles(showTitles: false),
|
||||
),
|
||||
rightTitles: AxisTitles(
|
||||
sideTitles: SideTitles(showTitles: false),
|
||||
),
|
||||
),
|
||||
borderData: FlBorderData(
|
||||
show: true,
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Theme.of(context).dividerColor,
|
||||
),
|
||||
left: BorderSide(color: Theme.of(context).dividerColor),
|
||||
),
|
||||
),
|
||||
minX: minDate.millisecondsSinceEpoch.toDouble(),
|
||||
maxX: maxDate.millisecondsSinceEpoch.toDouble(),
|
||||
minY: 0,
|
||||
maxY: 4,
|
||||
lineTouchData: LineTouchData(
|
||||
touchTooltipData: LineTouchTooltipData(
|
||||
getTooltipItems: (touchedSpots) {
|
||||
return touchedSpots.map((spot) {
|
||||
final date = DateTime.fromMillisecondsSinceEpoch(
|
||||
spot.x.toInt(),
|
||||
);
|
||||
final level = spot.y.toInt();
|
||||
return LineTooltipItem(
|
||||
'${DateFormat.yMMMd().format(date)}\n',
|
||||
TextStyle(
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'checkInResultLevel$level'.tr(),
|
||||
style: TextStyle(
|
||||
color:
|
||||
Theme.of(context).colorScheme.onSurface,
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}).toList();
|
||||
},
|
||||
),
|
||||
touchCallback: (
|
||||
FlTouchEvent event,
|
||||
LineTouchResponse? response,
|
||||
) {
|
||||
if (event is FlTapUpEvent &&
|
||||
response != null &&
|
||||
response.lineBarSpots != null &&
|
||||
response.lineBarSpots!.isNotEmpty) {
|
||||
final spot = response.lineBarSpots!.first;
|
||||
final date = DateTime.fromMillisecondsSinceEpoch(
|
||||
spot.x.toInt(),
|
||||
);
|
||||
onPointSelected?.call(date);
|
||||
}
|
||||
},
|
||||
),
|
||||
lineBarsData: [
|
||||
LineChartBarData(
|
||||
spots: spots,
|
||||
isCurved: true,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
barWidth: 3,
|
||||
isStrokeCapRound: true,
|
||||
dotData: FlDotData(
|
||||
show: true,
|
||||
getDotPainter: (spot, percent, barData, index) {
|
||||
return FlDotCirclePainter(
|
||||
radius: 4,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
strokeWidth: 2,
|
||||
strokeColor:
|
||||
Theme.of(context).colorScheme.surface,
|
||||
);
|
||||
},
|
||||
),
|
||||
belowBarData: BarAreaData(
|
||||
show: true,
|
||||
color: Theme.of(
|
||||
context,
|
||||
).colorScheme.primary.withOpacity(0.2),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
loading: () => const Center(child: CircularProgressIndicator()),
|
||||
error: (error, stack) => Center(child: Text('Error: $error')),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
if (constrainWidth) {
|
||||
return ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: maxWidth),
|
||||
child: Card(margin: EdgeInsets.all(16), child: content),
|
||||
).center();
|
||||
}
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
/// Calculate an appropriate interval for date labels based on the date range
|
||||
double _calculateDateInterval(DateTime minDate, DateTime maxDate) {
|
||||
final difference = maxDate.difference(minDate).inDays;
|
||||
|
||||
// If less than 7 days, show all days
|
||||
if (difference <= 7) {
|
||||
return 24 * 60 * 60 * 1000; // One day in milliseconds
|
||||
}
|
||||
|
||||
// If less than a month, show every 3 days
|
||||
if (difference <= 30) {
|
||||
return 3 * 24 * 60 * 60 * 1000; // Three days in milliseconds
|
||||
}
|
||||
|
||||
// If less than 3 months, show weekly
|
||||
if (difference <= 90) {
|
||||
return 7 * 24 * 60 * 60 * 1000; // One week in milliseconds
|
||||
}
|
||||
|
||||
// Otherwise show every 2 weeks
|
||||
return 14 * 24 * 60 * 60 * 1000; // Two weeks in milliseconds
|
||||
}
|
||||
}
|
@ -19,6 +19,7 @@ class LevelingProgressCard extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Card(
|
||||
margin: EdgeInsets.zero,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
|
@ -1,15 +1,13 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/activity.dart';
|
||||
import 'package:island/models/user.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/screens/account/profile.dart';
|
||||
import 'package:island/services/time.dart';
|
||||
import 'package:island/widgets/account/status_creation.dart';
|
||||
import 'package:island/widgets/content/cloud_files.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:relative_time/relative_time.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
@ -108,14 +106,15 @@ class AccountStatusWidget extends HookConsumerWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final userStatus = ref.watch(accountStatusProvider(uname));
|
||||
final status = ref.watch(accountStatusProvider(uname));
|
||||
final account = ref.watch(accountProvider(uname));
|
||||
|
||||
return Padding(
|
||||
padding: padding ?? EdgeInsets.symmetric(horizontal: 27, vertical: 4),
|
||||
child: Row(
|
||||
spacing: 4,
|
||||
children: [
|
||||
if (userStatus.value?.isOnline ?? false)
|
||||
if (status.value?.isOnline ?? false)
|
||||
Icon(
|
||||
Symbols.circle,
|
||||
fill: 1,
|
||||
@ -123,13 +122,24 @@ class AccountStatusWidget extends HookConsumerWidget {
|
||||
size: 16,
|
||||
).padding(right: 4)
|
||||
else
|
||||
Icon(Symbols.circle, color: Colors.grey, size: 16).padding(all: 4),
|
||||
if (userStatus.value?.isCustomized ?? false)
|
||||
Text(userStatus.value?.label ?? 'unknown'.tr())
|
||||
Icon(
|
||||
Symbols.circle,
|
||||
color: Colors.grey,
|
||||
size: 16,
|
||||
).padding(right: 4),
|
||||
if (status.value?.isCustomized ?? false)
|
||||
Text(status.value?.label ?? 'unknown'.tr())
|
||||
else
|
||||
Text((userStatus.value?.label ?? 'offline').toLowerCase()).tr(),
|
||||
Text((status.value?.label ?? 'offline').toLowerCase()).tr(),
|
||||
if (!(status.value?.isOnline ?? false) &&
|
||||
account.value?.profile.lastSeenAt != null)
|
||||
Flexible(
|
||||
child: Text(
|
||||
account.value!.profile.lastSeenAt!.formatRelative(context),
|
||||
).opacity(0.75),
|
||||
),
|
||||
],
|
||||
),
|
||||
).opacity((userStatus.value?.isCustomized ?? false) ? 1 : 0.85);
|
||||
).opacity((status.value?.isCustomized ?? false) ? 1 : 0.85);
|
||||
}
|
||||
}
|
||||
|
@ -167,9 +167,10 @@ class AppScaffold extends StatelessWidget {
|
||||
}
|
||||
|
||||
class PageBackButton extends StatelessWidget {
|
||||
final Color? color;
|
||||
final List<Shadow>? shadows;
|
||||
final VoidCallback? onWillPop;
|
||||
const PageBackButton({super.key, this.shadows, this.onWillPop});
|
||||
const PageBackButton({super.key, this.shadows, this.onWillPop, this.color});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -179,6 +180,7 @@ class PageBackButton extends StatelessWidget {
|
||||
context.router.maybePop();
|
||||
},
|
||||
icon: Icon(
|
||||
color: color,
|
||||
(!kIsWeb && (Platform.isMacOS || Platform.isIOS))
|
||||
? Symbols.arrow_back_ios_new
|
||||
: Symbols.arrow_back,
|
||||
|
@ -10,6 +10,7 @@ import 'package:island/database/message.dart';
|
||||
import 'package:island/models/chat.dart';
|
||||
import 'package:island/pods/call.dart';
|
||||
import 'package:island/screens/chat/room.dart';
|
||||
import 'package:island/widgets/account/account_pfc.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/widgets/content/cloud_file_collection.dart';
|
||||
import 'package:island/widgets/content/cloud_files.dart';
|
||||
@ -129,9 +130,12 @@ class MessageItem extends HookConsumerWidget {
|
||||
spacing: 8,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ProfilePictureWidget(
|
||||
fileId: sender.account.profile.picture?.id,
|
||||
radius: 16,
|
||||
AccountPfcGestureDetector(
|
||||
uname: sender.account.name,
|
||||
child: ProfilePictureWidget(
|
||||
fileId: sender.account.profile.picture?.id,
|
||||
radius: 16,
|
||||
),
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
@ -10,13 +10,13 @@ import 'package:gal/gal.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/file.dart';
|
||||
import 'package:island/pods/config.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/widgets/content/cloud_files.dart';
|
||||
import 'package:path/path.dart' show extension;
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:photo_view/photo_view.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
class CloudFileList extends HookConsumerWidget {
|
||||
final List<SnCloudFile> files;
|
||||
@ -194,14 +194,18 @@ class CloudFileZoomIn extends HookConsumerWidget {
|
||||
);
|
||||
|
||||
// Get the image URL
|
||||
final imageUrl = '$serverUrl/files/${item.id}?original=true';
|
||||
final client = ref.watch(apiClientProvider);
|
||||
|
||||
// Create a temporary file to save the image
|
||||
final tempDir = await getTemporaryDirectory();
|
||||
final filePath = '${tempDir.path}/${item.id}.${extension(item.name)}';
|
||||
|
||||
await Dio().download(imageUrl, filePath);
|
||||
await Gal.putImage(filePath);
|
||||
await client.download(
|
||||
'/files/${item.id}',
|
||||
filePath,
|
||||
queryParameters: {'original': true},
|
||||
);
|
||||
await Gal.putImage(filePath, album: 'Solar Network');
|
||||
|
||||
// Show success message
|
||||
scaffold.showSnackBar(
|
||||
|
@ -54,13 +54,15 @@ class CloudFileWidget extends ConsumerWidget {
|
||||
}
|
||||
|
||||
class CloudImageWidget extends ConsumerWidget {
|
||||
final String fileId;
|
||||
final String? fileId;
|
||||
final SnCloudFile? file;
|
||||
final BoxFit fit;
|
||||
final double aspectRatio;
|
||||
final String? blurHash;
|
||||
const CloudImageWidget({
|
||||
super.key,
|
||||
required this.fileId,
|
||||
this.fileId,
|
||||
this.file,
|
||||
this.aspectRatio = 1,
|
||||
this.fit = BoxFit.cover,
|
||||
this.blurHash,
|
||||
@ -69,10 +71,14 @@ class CloudImageWidget extends ConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final serverUrl = ref.watch(serverUrlProvider);
|
||||
final uri = '$serverUrl/files/$fileId';
|
||||
final uri = '$serverUrl/files/${file?.id ?? fileId}';
|
||||
|
||||
return AspectRatio(
|
||||
aspectRatio: aspectRatio,
|
||||
child: UniversalImage(uri: uri, blurHash: blurHash),
|
||||
child:
|
||||
file != null
|
||||
? CloudFileWidget(item: file!, fit: fit)
|
||||
: UniversalImage(uri: uri, blurHash: blurHash, fit: fit),
|
||||
);
|
||||
}
|
||||
|
||||
@ -88,12 +94,14 @@ class CloudImageWidget extends ConsumerWidget {
|
||||
|
||||
class ProfilePictureWidget extends ConsumerWidget {
|
||||
final String? fileId;
|
||||
final SnCloudFile? file;
|
||||
final double radius;
|
||||
final IconData? fallbackIcon;
|
||||
final Color? fallbackColor;
|
||||
const ProfilePictureWidget({
|
||||
super.key,
|
||||
required this.fileId,
|
||||
this.fileId,
|
||||
this.file,
|
||||
this.radius = 20,
|
||||
this.fallbackIcon,
|
||||
this.fallbackColor,
|
||||
@ -102,7 +110,7 @@ class ProfilePictureWidget extends ConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final serverUrl = ref.watch(serverUrlProvider);
|
||||
final uri = '$serverUrl/files/$fileId';
|
||||
final uri = '$serverUrl/files/${file?.id ?? fileId}';
|
||||
|
||||
return ClipRRect(
|
||||
borderRadius: BorderRadius.all(Radius.circular(radius)),
|
||||
@ -111,7 +119,9 @@ class ProfilePictureWidget extends ConsumerWidget {
|
||||
height: radius * 2,
|
||||
color: Theme.of(context).colorScheme.primaryContainer,
|
||||
child:
|
||||
fileId == null
|
||||
file != null
|
||||
? CloudFileWidget(item: file!, fit: BoxFit.cover)
|
||||
: fileId == null
|
||||
? Icon(
|
||||
fallbackIcon ?? Symbols.account_circle,
|
||||
size: radius,
|
||||
|
@ -7,6 +7,7 @@ class SheetScaffold extends StatelessWidget {
|
||||
final List<Widget> actions;
|
||||
final Widget child;
|
||||
final double heightFactor;
|
||||
final double? height;
|
||||
const SheetScaffold({
|
||||
super.key,
|
||||
this.title,
|
||||
@ -14,6 +15,7 @@ class SheetScaffold extends StatelessWidget {
|
||||
required this.child,
|
||||
this.actions = const [],
|
||||
this.heightFactor = 0.8,
|
||||
this.height,
|
||||
});
|
||||
|
||||
@override
|
||||
@ -32,7 +34,7 @@ class SheetScaffold extends StatelessWidget {
|
||||
|
||||
return Container(
|
||||
constraints: BoxConstraints(
|
||||
maxHeight: MediaQuery.of(context).size.height * heightFactor,
|
||||
maxHeight: height ?? MediaQuery.of(context).size.height * heightFactor,
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
|
@ -5,12 +5,15 @@ import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/post.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/pods/userinfo.dart';
|
||||
import 'package:island/route.gr.dart';
|
||||
import 'package:island/services/responsive.dart';
|
||||
import 'package:island/services/time.dart';
|
||||
import 'package:island/widgets/account/account_name.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/widgets/content/cloud_file_collection.dart';
|
||||
@ -25,6 +28,7 @@ class PostItem extends HookConsumerWidget {
|
||||
final SnPost item;
|
||||
final EdgeInsets? padding;
|
||||
final bool isOpenable;
|
||||
final bool isFullPost;
|
||||
final bool showReferencePost;
|
||||
final Function? onRefresh;
|
||||
final Function(SnPost)? onUpdate;
|
||||
@ -34,6 +38,7 @@ class PostItem extends HookConsumerWidget {
|
||||
this.backgroundColor,
|
||||
this.padding,
|
||||
this.isOpenable = true,
|
||||
this.isFullPost = false,
|
||||
this.showReferencePost = true,
|
||||
this.onRefresh,
|
||||
this.onUpdate,
|
||||
@ -133,9 +138,7 @@ class PostItem extends HookConsumerWidget {
|
||||
spacing: 12,
|
||||
children: [
|
||||
GestureDetector(
|
||||
child: ProfilePictureWidget(
|
||||
fileId: item.publisher.picture?.id,
|
||||
),
|
||||
child: ProfilePictureWidget(file: item.publisher.picture),
|
||||
onTap: () {
|
||||
context.router.push(
|
||||
PublisherProfileRoute(name: item.publisher.name),
|
||||
@ -147,7 +150,22 @@ class PostItem extends HookConsumerWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(item.publisher.nick).bold(),
|
||||
Row(
|
||||
children: [
|
||||
Text(item.publisher.nick).bold(),
|
||||
if (item.publisher.verification != null)
|
||||
VerificationMark(
|
||||
mark: item.publisher.verification!,
|
||||
).padding(left: 4),
|
||||
Spacer(),
|
||||
Text(
|
||||
isFullPost
|
||||
? item.publishedAt.formatSystem()
|
||||
: item.publishedAt.formatRelative(context),
|
||||
).fontSize(11).alignment(Alignment.bottomRight),
|
||||
const Gap(4),
|
||||
],
|
||||
),
|
||||
// Add visibility indicator if not public (visibility != 0)
|
||||
if (item.visibility != 0)
|
||||
Row(
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <bitsdojo_window_linux/bitsdojo_window_plugin.h>
|
||||
#include <file_selector_linux/file_selector_plugin.h>
|
||||
#include <flutter_platform_alert/flutter_platform_alert_plugin.h>
|
||||
#include <flutter_timezone/flutter_timezone_plugin.h>
|
||||
#include <flutter_udid/flutter_udid_plugin.h>
|
||||
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
|
||||
#include <irondash_engine_context/irondash_engine_context_plugin.h>
|
||||
@ -31,6 +32,9 @@ void fl_register_plugins(FlPluginRegistry* registry) {
|
||||
g_autoptr(FlPluginRegistrar) flutter_platform_alert_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterPlatformAlertPlugin");
|
||||
flutter_platform_alert_plugin_register_with_registrar(flutter_platform_alert_registrar);
|
||||
g_autoptr(FlPluginRegistrar) flutter_timezone_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterTimezonePlugin");
|
||||
flutter_timezone_plugin_register_with_registrar(flutter_timezone_registrar);
|
||||
g_autoptr(FlPluginRegistrar) flutter_udid_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterUdidPlugin");
|
||||
flutter_udid_plugin_register_with_registrar(flutter_udid_registrar);
|
||||
|
@ -6,6 +6,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
||||
bitsdojo_window_linux
|
||||
file_selector_linux
|
||||
flutter_platform_alert
|
||||
flutter_timezone
|
||||
flutter_udid
|
||||
flutter_webrtc
|
||||
irondash_engine_context
|
||||
|
@ -14,8 +14,10 @@ import firebase_core
|
||||
import firebase_messaging
|
||||
import flutter_inappwebview_macos
|
||||
import flutter_platform_alert
|
||||
import flutter_timezone
|
||||
import flutter_udid
|
||||
import flutter_webrtc
|
||||
import gal
|
||||
import irondash_engine_context
|
||||
import livekit_client
|
||||
import media_kit_libs_macos_video
|
||||
@ -42,8 +44,10 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin"))
|
||||
InAppWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "InAppWebViewFlutterPlugin"))
|
||||
FlutterPlatformAlertPlugin.register(with: registry.registrar(forPlugin: "FlutterPlatformAlertPlugin"))
|
||||
FlutterTimezonePlugin.register(with: registry.registrar(forPlugin: "FlutterTimezonePlugin"))
|
||||
FlutterUdidPlugin.register(with: registry.registrar(forPlugin: "FlutterUdidPlugin"))
|
||||
FlutterWebRTCPlugin.register(with: registry.registrar(forPlugin: "FlutterWebRTCPlugin"))
|
||||
GalPlugin.register(with: registry.registrar(forPlugin: "GalPlugin"))
|
||||
IrondashEngineContextPlugin.register(with: registry.registrar(forPlugin: "IrondashEngineContextPlugin"))
|
||||
LiveKitPlugin.register(with: registry.registrar(forPlugin: "LiveKitPlugin"))
|
||||
MediaKitLibsMacosVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitLibsMacosVideoPlugin"))
|
||||
|
@ -1,4 +1,4 @@
|
||||
platform :osx, '10.15'
|
||||
platform :osx, '11.0'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
|
@ -1,300 +0,0 @@
|
||||
PODS:
|
||||
- bitsdojo_window_macos (0.0.1):
|
||||
- FlutterMacOS
|
||||
- connectivity_plus (0.0.1):
|
||||
- FlutterMacOS
|
||||
- croppy (0.0.1):
|
||||
- FlutterMacOS
|
||||
- device_info_plus (0.0.1):
|
||||
- FlutterMacOS
|
||||
- file_picker (0.0.1):
|
||||
- FlutterMacOS
|
||||
- file_selector_macos (0.0.1):
|
||||
- FlutterMacOS
|
||||
- Firebase/CoreOnly (11.10.0):
|
||||
- FirebaseCore (~> 11.10.0)
|
||||
- Firebase/Messaging (11.10.0):
|
||||
- Firebase/CoreOnly
|
||||
- FirebaseMessaging (~> 11.10.0)
|
||||
- firebase_core (3.13.1):
|
||||
- Firebase/CoreOnly (~> 11.10.0)
|
||||
- FlutterMacOS
|
||||
- firebase_messaging (15.2.6):
|
||||
- Firebase/CoreOnly (~> 11.10.0)
|
||||
- Firebase/Messaging (~> 11.10.0)
|
||||
- firebase_core
|
||||
- FlutterMacOS
|
||||
- FirebaseCore (11.10.0):
|
||||
- FirebaseCoreInternal (~> 11.10.0)
|
||||
- GoogleUtilities/Environment (~> 8.0)
|
||||
- GoogleUtilities/Logger (~> 8.0)
|
||||
- FirebaseCoreInternal (11.10.0):
|
||||
- "GoogleUtilities/NSData+zlib (~> 8.0)"
|
||||
- FirebaseInstallations (11.10.0):
|
||||
- FirebaseCore (~> 11.10.0)
|
||||
- GoogleUtilities/Environment (~> 8.0)
|
||||
- GoogleUtilities/UserDefaults (~> 8.0)
|
||||
- PromisesObjC (~> 2.4)
|
||||
- FirebaseMessaging (11.10.0):
|
||||
- FirebaseCore (~> 11.10.0)
|
||||
- FirebaseInstallations (~> 11.0)
|
||||
- GoogleDataTransport (~> 10.0)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.0)
|
||||
- GoogleUtilities/Environment (~> 8.0)
|
||||
- GoogleUtilities/Reachability (~> 8.0)
|
||||
- GoogleUtilities/UserDefaults (~> 8.0)
|
||||
- nanopb (~> 3.30910.0)
|
||||
- flutter_inappwebview_macos (0.0.1):
|
||||
- FlutterMacOS
|
||||
- OrderedSet (~> 6.0.3)
|
||||
- flutter_platform_alert (0.0.1):
|
||||
- FlutterMacOS
|
||||
- flutter_udid (0.0.1):
|
||||
- FlutterMacOS
|
||||
- SAMKeychain
|
||||
- flutter_webrtc (0.14.0):
|
||||
- FlutterMacOS
|
||||
- WebRTC-SDK (= 125.6422.07)
|
||||
- FlutterMacOS (1.0.0)
|
||||
- GoogleDataTransport (10.1.0):
|
||||
- nanopb (~> 3.30910.0)
|
||||
- PromisesObjC (~> 2.4)
|
||||
- GoogleUtilities/AppDelegateSwizzler (8.1.0):
|
||||
- GoogleUtilities/Environment
|
||||
- GoogleUtilities/Logger
|
||||
- GoogleUtilities/Network
|
||||
- GoogleUtilities/Privacy
|
||||
- GoogleUtilities/Environment (8.1.0):
|
||||
- GoogleUtilities/Privacy
|
||||
- GoogleUtilities/Logger (8.1.0):
|
||||
- GoogleUtilities/Environment
|
||||
- GoogleUtilities/Privacy
|
||||
- GoogleUtilities/Network (8.1.0):
|
||||
- GoogleUtilities/Logger
|
||||
- "GoogleUtilities/NSData+zlib"
|
||||
- GoogleUtilities/Privacy
|
||||
- GoogleUtilities/Reachability
|
||||
- "GoogleUtilities/NSData+zlib (8.1.0)":
|
||||
- GoogleUtilities/Privacy
|
||||
- GoogleUtilities/Privacy (8.1.0)
|
||||
- GoogleUtilities/Reachability (8.1.0):
|
||||
- GoogleUtilities/Logger
|
||||
- GoogleUtilities/Privacy
|
||||
- GoogleUtilities/UserDefaults (8.1.0):
|
||||
- GoogleUtilities/Logger
|
||||
- GoogleUtilities/Privacy
|
||||
- irondash_engine_context (0.0.1):
|
||||
- FlutterMacOS
|
||||
- livekit_client (2.4.7):
|
||||
- flutter_webrtc
|
||||
- FlutterMacOS
|
||||
- WebRTC-SDK (= 125.6422.07)
|
||||
- media_kit_libs_macos_video (1.0.4):
|
||||
- FlutterMacOS
|
||||
- media_kit_video (0.0.1):
|
||||
- FlutterMacOS
|
||||
- nanopb (3.30910.0):
|
||||
- nanopb/decode (= 3.30910.0)
|
||||
- nanopb/encode (= 3.30910.0)
|
||||
- nanopb/decode (3.30910.0)
|
||||
- nanopb/encode (3.30910.0)
|
||||
- OrderedSet (6.0.3)
|
||||
- package_info_plus (0.0.1):
|
||||
- FlutterMacOS
|
||||
- pasteboard (0.0.1):
|
||||
- FlutterMacOS
|
||||
- path_provider_foundation (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- PromisesObjC (2.4.0)
|
||||
- record_macos (1.0.0):
|
||||
- FlutterMacOS
|
||||
- SAMKeychain (1.5.3)
|
||||
- shared_preferences_foundation (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- sqflite_darwin (0.0.4):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- sqlite3 (3.49.2):
|
||||
- sqlite3/common (= 3.49.2)
|
||||
- sqlite3/common (3.49.2)
|
||||
- sqlite3/dbstatvtab (3.49.2):
|
||||
- sqlite3/common
|
||||
- sqlite3/fts5 (3.49.2):
|
||||
- sqlite3/common
|
||||
- sqlite3/math (3.49.2):
|
||||
- sqlite3/common
|
||||
- sqlite3/perf-threadsafe (3.49.2):
|
||||
- sqlite3/common
|
||||
- sqlite3/rtree (3.49.2):
|
||||
- sqlite3/common
|
||||
- sqlite3_flutter_libs (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- sqlite3 (~> 3.49.2)
|
||||
- sqlite3/dbstatvtab
|
||||
- sqlite3/fts5
|
||||
- sqlite3/math
|
||||
- sqlite3/perf-threadsafe
|
||||
- sqlite3/rtree
|
||||
- super_native_extensions (0.0.1):
|
||||
- FlutterMacOS
|
||||
- url_launcher_macos (0.0.1):
|
||||
- FlutterMacOS
|
||||
- volume_controller (0.0.1):
|
||||
- FlutterMacOS
|
||||
- wakelock_plus (0.0.1):
|
||||
- FlutterMacOS
|
||||
- WebRTC-SDK (125.6422.07)
|
||||
|
||||
DEPENDENCIES:
|
||||
- bitsdojo_window_macos (from `Flutter/ephemeral/.symlinks/plugins/bitsdojo_window_macos/macos`)
|
||||
- connectivity_plus (from `Flutter/ephemeral/.symlinks/plugins/connectivity_plus/macos`)
|
||||
- croppy (from `Flutter/ephemeral/.symlinks/plugins/croppy/macos`)
|
||||
- device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`)
|
||||
- file_picker (from `Flutter/ephemeral/.symlinks/plugins/file_picker/macos`)
|
||||
- file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`)
|
||||
- firebase_core (from `Flutter/ephemeral/.symlinks/plugins/firebase_core/macos`)
|
||||
- firebase_messaging (from `Flutter/ephemeral/.symlinks/plugins/firebase_messaging/macos`)
|
||||
- flutter_inappwebview_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_inappwebview_macos/macos`)
|
||||
- flutter_platform_alert (from `Flutter/ephemeral/.symlinks/plugins/flutter_platform_alert/macos`)
|
||||
- flutter_udid (from `Flutter/ephemeral/.symlinks/plugins/flutter_udid/macos`)
|
||||
- flutter_webrtc (from `Flutter/ephemeral/.symlinks/plugins/flutter_webrtc/macos`)
|
||||
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||
- irondash_engine_context (from `Flutter/ephemeral/.symlinks/plugins/irondash_engine_context/macos`)
|
||||
- livekit_client (from `Flutter/ephemeral/.symlinks/plugins/livekit_client/macos`)
|
||||
- media_kit_libs_macos_video (from `Flutter/ephemeral/.symlinks/plugins/media_kit_libs_macos_video/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`)
|
||||
- pasteboard (from `Flutter/ephemeral/.symlinks/plugins/pasteboard/macos`)
|
||||
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
|
||||
- record_macos (from `Flutter/ephemeral/.symlinks/plugins/record_macos/macos`)
|
||||
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||
- sqflite_darwin (from `Flutter/ephemeral/.symlinks/plugins/sqflite_darwin/darwin`)
|
||||
- sqlite3_flutter_libs (from `Flutter/ephemeral/.symlinks/plugins/sqlite3_flutter_libs/darwin`)
|
||||
- super_native_extensions (from `Flutter/ephemeral/.symlinks/plugins/super_native_extensions/macos`)
|
||||
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
|
||||
- volume_controller (from `Flutter/ephemeral/.symlinks/plugins/volume_controller/macos`)
|
||||
- wakelock_plus (from `Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos`)
|
||||
|
||||
SPEC REPOS:
|
||||
trunk:
|
||||
- Firebase
|
||||
- FirebaseCore
|
||||
- FirebaseCoreInternal
|
||||
- FirebaseInstallations
|
||||
- FirebaseMessaging
|
||||
- GoogleDataTransport
|
||||
- GoogleUtilities
|
||||
- nanopb
|
||||
- OrderedSet
|
||||
- PromisesObjC
|
||||
- SAMKeychain
|
||||
- sqlite3
|
||||
- WebRTC-SDK
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
bitsdojo_window_macos:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/bitsdojo_window_macos/macos
|
||||
connectivity_plus:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/connectivity_plus/macos
|
||||
croppy:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/croppy/macos
|
||||
device_info_plus:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos
|
||||
file_picker:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/file_picker/macos
|
||||
file_selector_macos:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos
|
||||
firebase_core:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/firebase_core/macos
|
||||
firebase_messaging:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/firebase_messaging/macos
|
||||
flutter_inappwebview_macos:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/flutter_inappwebview_macos/macos
|
||||
flutter_platform_alert:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/flutter_platform_alert/macos
|
||||
flutter_udid:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/flutter_udid/macos
|
||||
flutter_webrtc:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/flutter_webrtc/macos
|
||||
FlutterMacOS:
|
||||
:path: Flutter/ephemeral
|
||||
irondash_engine_context:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/irondash_engine_context/macos
|
||||
livekit_client:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/livekit_client/macos
|
||||
media_kit_libs_macos_video:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/media_kit_libs_macos_video/macos
|
||||
media_kit_video:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/media_kit_video/macos
|
||||
package_info_plus:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
|
||||
pasteboard:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/pasteboard/macos
|
||||
path_provider_foundation:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
|
||||
record_macos:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/record_macos/macos
|
||||
shared_preferences_foundation:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
|
||||
sqflite_darwin:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/sqflite_darwin/darwin
|
||||
sqlite3_flutter_libs:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/sqlite3_flutter_libs/darwin
|
||||
super_native_extensions:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/super_native_extensions/macos
|
||||
url_launcher_macos:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
|
||||
volume_controller:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/volume_controller/macos
|
||||
wakelock_plus:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
bitsdojo_window_macos: 7959fb0ca65a3ccda30095c181ecb856fae48ea9
|
||||
connectivity_plus: 4adf20a405e25b42b9c9f87feff8f4b6fde18a4e
|
||||
croppy: d9bfc8c02f3cd1851f669a421df298a474b78f43
|
||||
device_info_plus: 4fb280989f669696856f8b129e4a5e3cd6c48f76
|
||||
file_picker: 7584aae6fa07a041af2b36a2655122d42f578c1a
|
||||
file_selector_macos: 6280b52b459ae6c590af5d78fc35c7267a3c4b31
|
||||
Firebase: 1fe1c0a7d9aaea32efe01fbea5f0ebd8d70e53a2
|
||||
firebase_core: 25e649fdb52de4f20314f9e54b914e7298875acc
|
||||
firebase_messaging: cfe5129bd3b65e4da0b2ac98b9af0735ef2fd564
|
||||
FirebaseCore: 8344daef5e2661eb004b177488d6f9f0f24251b7
|
||||
FirebaseCoreInternal: ef4505d2afb1d0ebbc33162cb3795382904b5679
|
||||
FirebaseInstallations: 9980995bdd06ec8081dfb6ab364162bdd64245c3
|
||||
FirebaseMessaging: 2b9f56aa4ed286e1f0ce2ee1d413aabb8f9f5cb9
|
||||
flutter_inappwebview_macos: c2d68649f9f8f1831bfcd98d73fd6256366d9d1d
|
||||
flutter_platform_alert: 8fa7a7c21f95b26d08b4a3891936ca27e375f284
|
||||
flutter_udid: d26e455e8c06174e6aff476e147defc6cae38495
|
||||
flutter_webrtc: a7eeb54859e672228c28f4b48b1fb61561976ea3
|
||||
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
||||
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
|
||||
GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
|
||||
irondash_engine_context: 893c7d96d20ce361d7e996f39d360c4c2f9869ba
|
||||
livekit_client: c5fc13c397f17de76534280744ddd8c232915057
|
||||
media_kit_libs_macos_video: 85a23e549b5f480e72cae3e5634b5514bc692f65
|
||||
media_kit_video: fa6564e3799a0a28bff39442334817088b7ca758
|
||||
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
|
||||
OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94
|
||||
package_info_plus: f0052d280d17aa382b932f399edf32507174e870
|
||||
pasteboard: 278d8100149f940fb795d6b3a74f0720c890ecb7
|
||||
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
|
||||
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||
record_macos: 295d70bd5fb47145df78df7b80e6697cd18403c0
|
||||
SAMKeychain: 483e1c9f32984d50ca961e26818a534283b4cd5c
|
||||
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
|
||||
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
|
||||
sqlite3: 3c950dc86011117c307eb0b28c4a7bb449dce9f1
|
||||
sqlite3_flutter_libs: 74334e3ef2dbdb7d37e50859bb45da43935779c4
|
||||
super_native_extensions: c2795d6d9aedf4a79fae25cb6160b71b50549189
|
||||
url_launcher_macos: 0fba8ddabfc33ce0a9afe7c5fef5aab3d8d2d673
|
||||
volume_controller: 5c068e6d085c80dadd33fc2c918d2114b775b3dd
|
||||
wakelock_plus: 21ddc249ac4b8d018838dbdabd65c5976c308497
|
||||
WebRTC-SDK: dff00a3892bc570b6014e046297782084071657e
|
||||
|
||||
PODFILE CHECKSUM: 54d867c82ac51cbd61b565781b9fada492027009
|
||||
|
||||
COCOAPODS: 1.16.2
|
@ -384,10 +384,14 @@
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
|
||||
@ -423,10 +427,14 @@
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||
@ -583,6 +591,7 @@
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = W7HPZ53V6B;
|
||||
@ -593,7 +602,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
MACOSX_DEPLOYMENT_TARGET = 11.0;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
@ -720,6 +729,7 @@
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = W7HPZ53V6B;
|
||||
@ -730,7 +740,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
MACOSX_DEPLOYMENT_TARGET = 11.0;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
@ -745,6 +755,7 @@
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = W7HPZ53V6B;
|
||||
@ -755,7 +766,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
MACOSX_DEPLOYMENT_TARGET = 11.0;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
|
@ -18,5 +18,7 @@
|
||||
<true/>
|
||||
<key>com.apple.security.network.server</key>
|
||||
<true/>
|
||||
<key>com.apple.developer.device-information.user-assigned-device-name</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -16,5 +16,7 @@
|
||||
<true/>
|
||||
<key>com.apple.security.network.server</key>
|
||||
<true/>
|
||||
<key>com.apple.developer.device-information.user-assigned-device-name</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
254
pubspec.lock
254
pubspec.lock
@ -5,34 +5,34 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: _fe_analyzer_shared
|
||||
sha256: dc27559385e905ad30838356c5f5d574014ba39872d732111cd07ac0beff4c57
|
||||
sha256: e55636ed79578b9abca5fecf9437947798f5ef7456308b5cb85720b793eac92f
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "80.0.0"
|
||||
version: "82.0.0"
|
||||
_flutterfire_internals:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: _flutterfire_internals
|
||||
sha256: "214e6f07e2a44f45972e0365c7b537eaeaddb4598db0778dd4ac64b4acd3f5b1"
|
||||
sha256: dda4fd7909a732a014239009aa52537b136f8ce568de23c212587097887e2307
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.55"
|
||||
version: "1.3.56"
|
||||
analyzer:
|
||||
dependency: "direct overridden"
|
||||
dependency: transitive
|
||||
description:
|
||||
name: analyzer
|
||||
sha256: "192d1c5b944e7e53b24b5586db760db934b177d4147c42fbca8c8c5f1eb8d11e"
|
||||
sha256: "904ae5bb474d32c38fb9482e2d925d5454cda04ddd0e55d2e6826bc72f6ba8c0"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.3.0"
|
||||
version: "7.4.5"
|
||||
analyzer_plugin:
|
||||
dependency: "direct overridden"
|
||||
dependency: transitive
|
||||
description:
|
||||
name: analyzer_plugin
|
||||
sha256: "1d460d14e3c2ae36dc2b32cef847c4479198cf87704f63c3c3c8150ee50c3916"
|
||||
sha256: ee188b6df6c85f1441497c7171c84f1392affadc0384f71089cb10a3bc508cef
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.0"
|
||||
version: "0.13.1"
|
||||
animations:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -85,10 +85,10 @@ packages:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: auto_route_generator
|
||||
sha256: "9e3846fcbeacba5c362557328dd8c8fbc953b6a0cbc3395365e8d8f92eea29c4"
|
||||
sha256: "2a5b5bf9c55d4a2098931037dac90921a4663808aed494bb4f134d82d46cb8ec"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.1.0"
|
||||
version: "10.2.3"
|
||||
avatar_stack:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -269,10 +269,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: checked_yaml
|
||||
sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff
|
||||
sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.3"
|
||||
version: "2.0.4"
|
||||
ci:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -281,6 +281,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.1.0"
|
||||
cli_config:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: cli_config
|
||||
sha256: ac20a183a07002b700f0c25e61b7ee46b23c309d76ab7b7640a028f18e4d99ec
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.2.0"
|
||||
cli_util:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -337,6 +345,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
coverage:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: coverage
|
||||
sha256: aa07dbe5f2294c827b7edb9a87bba44a9c15a3cc81bc8da2ca19b37322d30080
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.14.1"
|
||||
croppy:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -402,13 +418,13 @@ packages:
|
||||
source: hosted
|
||||
version: "0.7.5"
|
||||
custom_lint_visitor:
|
||||
dependency: "direct overridden"
|
||||
dependency: transitive
|
||||
description:
|
||||
name: custom_lint_visitor
|
||||
sha256: "36282d85714af494ee2d7da8c8913630aa6694da99f104fb2ed4afcf8fc857d8"
|
||||
sha256: cba5b6d7a6217312472bf4468cdf68c949488aed7ffb0eab792cd0b6c435054d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.0+7.3.0"
|
||||
version: "1.0.0+7.4.5"
|
||||
dart_style:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -573,10 +589,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: file_picker
|
||||
sha256: "77f8e81d22d2a07d0dee2c62e1dda71dc1da73bf43bb2d45af09727406167964"
|
||||
sha256: ef9908739bdd9c476353d6adff72e88fd00c625f5b959ae23f7567bd5137db0a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.1.9"
|
||||
version: "10.2.0"
|
||||
file_selector_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -613,10 +629,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: firebase_core
|
||||
sha256: "8cfe3c900512399ce8d50fcc817e5758ff8615eeb6fa5c846a4cc47bbf6353b6"
|
||||
sha256: "420d9111dcf095341f1ea8fdce926eef750cf7b9745d21f38000de780c94f608"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.13.1"
|
||||
version: "3.14.0"
|
||||
firebase_core_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -637,26 +653,26 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: firebase_messaging
|
||||
sha256: "38111089e511f03daa2c66b4c3614c16421b7d78c84ee04331a0a65b47df4542"
|
||||
sha256: "758461f67b96aa5ad27625aaae39882fd6d1961b1c7e005301f9a74b6336100b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "15.2.6"
|
||||
version: "15.2.7"
|
||||
firebase_messaging_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: firebase_messaging_platform_interface
|
||||
sha256: ba254769982e5f439e534eed68856181c74e2b3f417c8188afad2bb440807cc7
|
||||
sha256: "614db1b0df0f53e541e41cc182b6d7ede5763c400f6ba232a5f8d0e1b5e5de32"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.6.6"
|
||||
version: "4.6.7"
|
||||
firebase_messaging_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: firebase_messaging_web
|
||||
sha256: dba89137272aac39e95f71408ba25c33fb8ed903cd5fa8d1e49b5cd0d96069e0
|
||||
sha256: b5fbbcdd3e0e7f3fde72b0c119410f22737638fed5fc428b54bba06bc1455d81
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.10.6"
|
||||
version: "3.10.7"
|
||||
fixnum:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -665,6 +681,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
fl_chart:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: fl_chart
|
||||
sha256: "577aeac8ca414c25333334d7c4bb246775234c0e44b38b10a82b559dd4d764e7"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
@ -778,10 +802,10 @@ packages:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: flutter_launcher_icons
|
||||
sha256: bfa04787c85d80ecb3f8777bde5fc10c3de809240c48fa061a2c2bf15ea5211c
|
||||
sha256: "10f13781741a2e3972126fae08393d3c4e01fa4cd7473326b94b72cf594195e7"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.14.3"
|
||||
version: "0.14.4"
|
||||
flutter_lints:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
@ -851,6 +875,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.28"
|
||||
flutter_popup_card:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_popup_card
|
||||
sha256: "71bca1521e3bae790162183d4dbfb77b84e11a9604e4b5f3b0edad6c5a1495cd"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.0.6"
|
||||
flutter_riverpod:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -872,6 +904,14 @@ packages:
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_timezone:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_timezone
|
||||
sha256: "13b2109ad75651faced4831bf262e32559e44aa549426eab8a597610d385d934"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.1.1"
|
||||
flutter_udid:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -929,10 +969,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: gal
|
||||
sha256: "1bdef5879e4569910cfd8c77f460f98fcb7a1f910026af1daa80869856c67d66"
|
||||
sha256: "2771519c8b29f784d5e27f4efc2667667eef51c6c47cccaa0435a8fe8aa208e4"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.9.1"
|
||||
version: "2.3.1"
|
||||
gap:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -1110,14 +1150,13 @@ packages:
|
||||
source: hosted
|
||||
version: "1.0.5"
|
||||
irondash_engine_context:
|
||||
dependency: "direct overridden"
|
||||
dependency: transitive
|
||||
description:
|
||||
path: "engine_context/dart"
|
||||
ref: "refs/pull/66/head"
|
||||
resolved-ref: e2551d9a3b0272a723b3627c5ef70e01a9e26961
|
||||
url: "https://github.com/irondash/irondash.git"
|
||||
source: git
|
||||
version: "0.5.4"
|
||||
name: irondash_engine_context
|
||||
sha256: "2bb0bc13dfda9f5aaef8dde06ecc5feb1379f5bb387d59716d799554f3f305d7"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.5.5"
|
||||
irondash_message_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -1174,6 +1213,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
lean_builder:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: lean_builder
|
||||
sha256: ac129cd2173aa4e53e1327bcee2233d738d68ee446f3c797135633deafe6ca8a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.1.0-alpha.12"
|
||||
lint:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -1194,10 +1241,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: livekit_client
|
||||
sha256: dc8fe8295353a6f4c96915a49faece4ede2334d2b2bdf5ed4b985e07507bdf09
|
||||
sha256: c270720a49b935591960c6f3296fd8f00c09b45a70cd64aef78cd0a8f8257913
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.7"
|
||||
version: "2.4.8"
|
||||
logging:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -1366,6 +1413,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.5.0"
|
||||
node_preamble:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: node_preamble
|
||||
sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.2"
|
||||
octo_image:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -1398,6 +1453,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.0"
|
||||
palette_generator:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: palette_generator
|
||||
sha256: "4420f7ccc3f0a4a906144e73f8b6267cd940b64f57a7262e95cb8cec3a8ae0ed"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.3.3+7"
|
||||
pasteboard:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -1530,10 +1593,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: protobuf
|
||||
sha256: "68645b24e0716782e58948f8467fd42a880f255096a821f9e7d0ec625b00c84d"
|
||||
sha256: "579fe5557eae58e3adca2e999e38f02441d8aa908703854a9e0a0f47fa857731"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.0"
|
||||
version: "4.1.0"
|
||||
provider:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -1634,10 +1697,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: record_web
|
||||
sha256: f8e536a9c927e52f95326d7540898457eaeefbe0b21a84d3cb3d2d7d4645e8cb
|
||||
sha256: "024c81eb7f51468b1833a3eca8b461c7ca25c04899dba37abe580bb57afd32e4"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.7"
|
||||
version: "1.1.8"
|
||||
record_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -1814,6 +1877,22 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.2"
|
||||
shelf_packages_handler:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf_packages_handler
|
||||
sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
shelf_static:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf_static
|
||||
sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.3"
|
||||
shelf_web_socket:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -1851,6 +1930,22 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.5"
|
||||
source_map_stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_map_stack_trace
|
||||
sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
source_maps:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_maps
|
||||
sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.10.13"
|
||||
source_span:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -1927,10 +2022,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: sqlite3_flutter_libs
|
||||
sha256: "7986c26234c0a5cf4fd83ff4ee39d4195b1f47cdb50a949ec7987ede4dcbdc2a"
|
||||
sha256: e07232b998755fe795655c56d1f5426e0190c9c435e1752d39e7b1cd33699c71
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.5.33"
|
||||
version: "0.5.34"
|
||||
sqlparser:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -1991,19 +2086,18 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: super_context_menu
|
||||
sha256: "29f5a7090a35d3af627a80dc77d56b4a748b723461f2e5a5e592c61607b17e87"
|
||||
sha256: "44570d342bea2381c57520f181016207c0ffde401f05f641e6dfec495fa728fe"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.9.0-dev.6"
|
||||
version: "0.9.1"
|
||||
super_native_extensions:
|
||||
dependency: "direct overridden"
|
||||
dependency: transitive
|
||||
description:
|
||||
path: super_native_extensions
|
||||
ref: "refs/pull/525/head"
|
||||
resolved-ref: d3020a8c5acd8555707b3b6477fd744d09f3e22f
|
||||
url: "https://github.com/superlistapp/super_native_extensions.git"
|
||||
source: git
|
||||
version: "0.9.0-dev.6"
|
||||
name: super_native_extensions
|
||||
sha256: b9611dcb68f1047d6f3ef11af25e4e68a21b1a705bbcc3eb8cb4e9f5c3148569
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.9.1"
|
||||
super_sliver_list:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -2044,6 +2138,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.2"
|
||||
test:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test
|
||||
sha256: "301b213cd241ca982e9ba50266bd3f5bd1ea33f1455554c5abb85d1be0e2d87e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.25.15"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -2052,6 +2154,22 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.4"
|
||||
test_core:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_core
|
||||
sha256: "84d17c3486c8dfdbe5e12a50c8ae176d15e2a771b96909a9442b40173649ccaa"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.8"
|
||||
timezone:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: timezone
|
||||
sha256: dd14a3b83cfd7cb19e7888f1cbc20f258b8d71b54c06f79ac585f14093a287d1
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.10.1"
|
||||
timing:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -2185,10 +2303,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_graphics
|
||||
sha256: "44cc7104ff32563122a929e4620cf3efd584194eec6d1d913eb5ba593dbcf6de"
|
||||
sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.18"
|
||||
version: "1.1.19"
|
||||
vector_graphics_codec:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -2265,10 +2383,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: watcher
|
||||
sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104"
|
||||
sha256: "0b7fd4a0bbc4b92641dbf20adfd7e3fd1398fe17102d94b674234563e110088a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
version: "1.1.2"
|
||||
web:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -2293,6 +2411,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.3"
|
||||
webkit_inspection_protocol:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: webkit_inspection_protocol
|
||||
sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
webrtc_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -2333,6 +2459,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.5.0"
|
||||
xxh3:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: xxh3
|
||||
sha256: "399a0438f5d426785723c99da6b16e136f4953fb1e9db0bf270bd41dd4619916"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -2343,4 +2477,4 @@ packages:
|
||||
version: "3.1.3"
|
||||
sdks:
|
||||
dart: ">=3.8.0 <4.0.0"
|
||||
flutter: ">=3.27.0"
|
||||
flutter: ">=3.27.4"
|
||||
|
25
pubspec.yaml
25
pubspec.yaml
@ -98,7 +98,7 @@ dependencies:
|
||||
visibility_detector: ^0.4.0+2
|
||||
flutter_native_splash: ^2.4.6
|
||||
photo_view: ^0.15.0
|
||||
gal: ^1.9.1
|
||||
gal: ^2.3.1
|
||||
dismissible_page: ^1.0.2
|
||||
super_sliver_list: ^0.4.1
|
||||
flutter_webrtc: ^0.14.1
|
||||
@ -108,6 +108,11 @@ dependencies:
|
||||
record: ^6.0.0
|
||||
qr_flutter: ^4.1.0
|
||||
flutter_otp_text_field: ^1.5.1+1
|
||||
palette_generator: ^0.3.3+7
|
||||
flutter_popup_card: ^0.0.6
|
||||
timezone: ^0.10.1
|
||||
flutter_timezone: ^4.1.1
|
||||
fl_chart: ^1.0.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
@ -129,24 +134,6 @@ dev_dependencies:
|
||||
drift_dev: ^2.26.0
|
||||
flutter_launcher_icons: ^0.14.3
|
||||
|
||||
dependency_overrides:
|
||||
# https://github.com/dart-lang/sdk/issues/60784#issuecomment-2904784415
|
||||
analyzer: 7.3.0
|
||||
analyzer_plugin: 0.12.0
|
||||
# https://github.com/dart-lang/sdk/issues/60784#issuecomment-2906872272
|
||||
custom_lint_visitor: 1.0.0+7.3.0
|
||||
# https://github.com/superlistapp/super_native_extensions/issues/524#issuecomment-2918531753
|
||||
super_native_extensions:
|
||||
git:
|
||||
url: https://github.com/superlistapp/super_native_extensions.git
|
||||
ref: refs/pull/525/head
|
||||
path: super_native_extensions
|
||||
irondash_engine_context:
|
||||
git:
|
||||
url: https://github.com/irondash/irondash.git
|
||||
ref: refs/pull/66/head
|
||||
path: engine_context/dart
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
||||
|
@ -12,8 +12,10 @@
|
||||
#include <firebase_core/firebase_core_plugin_c_api.h>
|
||||
#include <flutter_inappwebview_windows/flutter_inappwebview_windows_plugin_c_api.h>
|
||||
#include <flutter_platform_alert/flutter_platform_alert_plugin.h>
|
||||
#include <flutter_timezone/flutter_timezone_plugin_c_api.h>
|
||||
#include <flutter_udid/flutter_udid_plugin_c_api.h>
|
||||
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
|
||||
#include <gal/gal_plugin_c_api.h>
|
||||
#include <irondash_engine_context/irondash_engine_context_plugin_c_api.h>
|
||||
#include <livekit_client/live_kit_plugin.h>
|
||||
#include <media_kit_libs_windows_video/media_kit_libs_windows_video_plugin_c_api.h>
|
||||
@ -38,10 +40,14 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||
registry->GetRegistrarForPlugin("FlutterInappwebviewWindowsPluginCApi"));
|
||||
FlutterPlatformAlertPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FlutterPlatformAlertPlugin"));
|
||||
FlutterTimezonePluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FlutterTimezonePluginCApi"));
|
||||
FlutterUdidPluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FlutterUdidPluginCApi"));
|
||||
FlutterWebRTCPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FlutterWebRTCPlugin"));
|
||||
GalPluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("GalPluginCApi"));
|
||||
IrondashEngineContextPluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("IrondashEngineContextPluginCApi"));
|
||||
LiveKitPluginRegisterWithRegistrar(
|
||||
|
@ -9,8 +9,10 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
||||
firebase_core
|
||||
flutter_inappwebview_windows
|
||||
flutter_platform_alert
|
||||
flutter_timezone
|
||||
flutter_udid
|
||||
flutter_webrtc
|
||||
gal
|
||||
irondash_engine_context
|
||||
livekit_client
|
||||
media_kit_libs_windows_video
|
||||
|
Reference in New Issue
Block a user