Compare commits
233 Commits
3f9881e943
...
v3
| Author | SHA1 | Date | |
|---|---|---|---|
|
5c14236603
|
|||
|
738ed357bf
|
|||
|
0876ab9b74
|
|||
|
7071399cd8
|
|||
|
af23df6e48
|
|||
|
e7e7cc424b
|
|||
|
56ad8f60ea
|
|||
|
026dd3eb01
|
|||
|
72baf0ca5c
|
|||
|
82cb8c7ff9
|
|||
|
a266177628
|
|||
|
2474c7f97c
|
|||
|
1716afd66c
|
|||
|
78a3cd6dd2
|
|||
|
d655840e85
|
|||
|
2e3e988125
|
|||
|
2a94ed5171
|
|||
|
0948810993
|
|||
|
689965c582
|
|||
|
ac82fdb8c8
|
|||
|
d94baab877
|
|||
|
0a179acb13
|
|||
|
33686b83e3
|
|||
|
09abe79f6a
|
|||
|
b0b227f36b
|
|||
|
62a45317a9
|
|||
|
f727882b93
|
|||
|
ba6d6ef97a
|
|||
|
c904826c49
|
|||
|
595aa45378
|
|||
|
a481b1b82f
|
|||
|
2df31e4244
|
|||
|
9c1eb8e5bc
|
|||
|
4d095aa333
|
|||
|
fb62ce7735
|
|||
|
b258df56c9
|
|||
|
2bf54099f9
|
|||
|
eb89d9223a
|
|||
|
87a54625aa
|
|||
|
30b2c0a0b4
|
|||
|
59c34ada40
|
|||
|
67a522753e
|
|||
|
e6338e8a5a
|
|||
|
cb7eef943c
|
|||
|
7a56e7882e
|
|||
|
b0085c2ab0
|
|||
|
d3f990691e
|
|||
|
46a773cfe9
|
|||
|
f5fb5d8a98
|
|||
|
4d87ca7cca
|
|||
|
e16a04bd5a
|
|||
|
d68b39f80f
|
|||
|
b7360f1f91
|
|||
|
5f094aca4b
|
|||
|
6010c17900
|
|||
|
2ee6b3514c
|
|||
|
8c83ee9b88
|
|||
|
18c81503f1
|
|||
|
53137aed3f
|
|||
|
b2aa8b8ec1
|
|||
|
b13a4f5bcf
|
|||
|
8fe703ef6d
|
|||
|
2297fb3c47
|
|||
|
580663dcda
|
|||
|
de20803119
|
|||
|
fb51d2076f
|
|||
|
d8485954fa
|
|||
|
d7746d14e4
|
|||
|
648d5225f6
|
|||
|
9d4d0f2e48
|
|||
|
fe386163f4
|
|||
|
ac2cee10e5
|
|||
|
9c370647dd
|
|||
|
7516e197fe
|
|||
|
71c372ab6c
|
|||
|
25f23f7f93
|
|||
|
51853698b9
|
|||
|
39ed5393ab
|
|||
|
782b3f1b08
|
|||
|
3ef2f13dd3
|
|||
|
36b0f55a47
|
|||
|
bc7a6e865e
|
|||
|
2ff60fc4ff
|
|||
|
ea93aa144e
|
|||
|
e4cd0c99df
|
|||
|
dff84dde58
|
|||
|
16c7b7e764
|
|||
|
240509ceff
|
|||
|
91da9768c1
|
|||
|
60b8e2bcad
|
|||
|
504e4d55ad
|
|||
|
38a15bb62a
|
|||
|
9d03faf594
|
|||
|
fd79c11d18
|
|||
|
c4ac256896
|
|||
|
c1fc8ea3fe
|
|||
|
29574ada88
|
|||
|
7369f5d88c
|
|||
|
5b3c138ebe
|
|||
|
562bdf62e9
|
|||
|
a73672925e
|
|||
|
c585522c35
|
|||
|
6aba84e506
|
|||
|
c6f104afc7
|
|||
|
4181fd0090
|
|||
|
84bca9601a
|
|||
|
31b83b2d27
|
|||
|
dfcb089c69
|
|||
|
fe365e8c6d
|
|||
|
b5262137ad
|
|||
|
11e93314c7
|
|||
|
c8658bc0ca
|
|||
|
b2f689693b
|
|||
|
33ec0b1d9a
|
|||
|
f698385494
|
|||
|
6ecdf89d20
|
|||
|
683f686540
|
|||
|
6a115ab1cc
|
|||
|
d05283d3b1
|
|||
|
b9653e7264
|
|||
|
87d1c8b320
|
|||
|
22eb54b61f
|
|||
|
a90ad2debc
|
|||
|
2f00bf660d
|
|||
|
322a93324c
|
|||
|
c3a3be0807
|
|||
|
27c7c8f039
|
|||
|
a7960da362
|
|||
|
64ab30b0a9
|
|||
|
935e6d5833
|
|||
|
938b128b1e
|
|||
|
c9764daa20
|
|||
|
7bc44e8f06
|
|||
|
4a7ff96a8b
|
|||
|
e759d5f46c
|
|||
|
f5ca6a37bf
|
|||
|
5fc8859f3b
|
|||
|
e30e7adbe2
|
|||
|
68be4db160
|
|||
|
aa91e376ca
|
|||
|
caffb85588
|
|||
|
521b192205
|
|||
|
77ac0428ea
|
|||
|
88c8227c66
|
|||
|
b20d8350a8
|
|||
|
98b27bed0e
|
|||
|
3a7d8b1a0d
|
|||
|
b4801d6af6
|
|||
|
aab5b957af
|
|||
|
43d706a184
|
|||
|
98df275f88
|
|||
|
5663df6ef1
|
|||
|
e996a0c95f
|
|||
|
a090e93f57
|
|||
|
c69034c071
|
|||
|
369ea6cf5b
|
|||
|
2e371b5296
|
|||
|
2e9d61bcfa
|
|||
|
9c2b5b0dfa
|
|||
|
3b40f515b3
|
|||
|
5ee61dbef2
|
|||
|
b151ef6686
|
|||
|
ff934d0f08
|
|||
|
abe5ded896
|
|||
|
f1d72a5215
|
|||
|
864cbe73b7
|
|||
|
108a6da074
|
|||
|
f9a09599c9
|
|||
|
9067dadd3e
|
|||
|
09f8df1e78
|
|||
|
2c5f246c55
|
|||
|
a66c6ea654
|
|||
|
3ad4bb4518
|
|||
|
53f0dcb825
|
|||
|
557f5a2389
|
|||
|
78f14f890f
|
|||
|
77b2effb34
|
|||
|
f02b4abf65
|
|||
|
3f37c4f761
|
|||
|
5deb910fa4
|
|||
|
f50a19f573
|
|||
|
98c8a356e8
|
|||
|
d0c16ea08f
|
|||
|
f2c1b2a531
|
|||
|
3061f0c5a9
|
|||
|
98f7f33c65
|
|||
|
d9af5d32fd
|
|||
|
f2031697ec
|
|||
|
9b85b7573c
|
|||
|
4fb739b33b
|
|||
|
c03ba3bc3a
|
|||
|
fc65440420
|
|||
|
7b85533184
|
|||
|
77d9eb60c6
|
|||
|
4d8953cd22
|
|||
|
fafa460fe8
|
|||
|
faf3a677d4
|
|||
|
0f644a0234
|
|||
|
18d16fdd57
|
|||
|
18e890d63c
|
|||
|
9c5e50c16a
|
|||
|
96a2c8182e
|
|||
|
56b27c3e82
|
|||
|
ad4bf94195
|
|||
|
b77a832d8a
|
|||
|
5e61805db7
|
|||
|
35b96b0bd2
|
|||
|
c8ad791ff3
|
|||
|
1e908502dc
|
|||
|
715ce1a368
|
|||
|
548c9963ee
|
|||
|
db5199438a
|
|||
|
4409a6fb1e
|
|||
|
26a24b0e41
|
|||
|
9b948d259b
|
|||
|
1f713b5b2b
|
|||
|
f92cfafda4
|
|||
|
fa208b44d7
|
|||
|
94adecafbb
|
|||
|
0303ef4a93
|
|||
|
c2b18ce10b
|
|||
|
0767bb53ce
|
|||
|
b233f9a410
|
|||
|
256024fb46
|
|||
|
4a80aaf24d
|
|||
|
aafd160c44
|
|||
|
4a800725e3
|
|||
|
24791b3293
|
|||
|
3ac263d483
|
|||
|
2445d8adf8
|
|||
|
d4f95bbbf4
|
|||
|
943e4b7b5c
|
|||
|
7edc02a1d3
|
@@ -12,6 +12,8 @@
|
|||||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />
|
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||||
android:maxSdkVersion="29" />
|
android:maxSdkVersion="29" />
|
||||||
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
|
||||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
|
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -164,8 +164,6 @@
|
|||||||
"checkInResultLevel3": "Good Luck",
|
"checkInResultLevel3": "Good Luck",
|
||||||
"checkInResultLevel4": "Best Luck",
|
"checkInResultLevel4": "Best Luck",
|
||||||
"checkInActivityTitle": "{} checked in on {} and got a {}",
|
"checkInActivityTitle": "{} checked in on {} and got a {}",
|
||||||
"eventCalander": "Event Calander",
|
|
||||||
"eventCalanderEmpty": "No events on that day.",
|
|
||||||
"fortuneGraph": "Fortune Trend",
|
"fortuneGraph": "Fortune Trend",
|
||||||
"noFortuneData": "No fortune data available for this month.",
|
"noFortuneData": "No fortune data available for this month.",
|
||||||
"creatorHub": "Creator Hub",
|
"creatorHub": "Creator Hub",
|
||||||
@@ -752,21 +750,6 @@
|
|||||||
"rename": "Rename",
|
"rename": "Rename",
|
||||||
"markAsSensitive": "Mark as Sensitive",
|
"markAsSensitive": "Mark as Sensitive",
|
||||||
"fileName": "File name",
|
"fileName": "File name",
|
||||||
"sensitiveCategories": {
|
|
||||||
"language": "Language",
|
|
||||||
"sexualContent": "Sexual Content",
|
|
||||||
"violence": "Violence",
|
|
||||||
"profanity": "Profanity",
|
|
||||||
"hateSpeech": "Hate Speech",
|
|
||||||
"racism": "Racism",
|
|
||||||
"adultContent": "Adult Content",
|
|
||||||
"drugAbuse": "Drug Abuse",
|
|
||||||
"alcoholAbuse": "Alcohol Abuse",
|
|
||||||
"gambling": "Gambling",
|
|
||||||
"selfHarm": "Self-harm",
|
|
||||||
"childAbuse": "Child Abuse",
|
|
||||||
"other": "Other"
|
|
||||||
},
|
|
||||||
"poll": "Poll",
|
"poll": "Poll",
|
||||||
"pollsRecent": "Recent Polls",
|
"pollsRecent": "Recent Polls",
|
||||||
"pollCreateNew": "Create New",
|
"pollCreateNew": "Create New",
|
||||||
@@ -1075,5 +1058,421 @@
|
|||||||
"deleteRecycledFiles": "Delete Recycled Files",
|
"deleteRecycledFiles": "Delete Recycled Files",
|
||||||
"recycledFilesDeleted": "Recycled files deleted successfully",
|
"recycledFilesDeleted": "Recycled files deleted successfully",
|
||||||
"failedToDeleteRecycledFiles": "Failed to delete recycled files",
|
"failedToDeleteRecycledFiles": "Failed to delete recycled files",
|
||||||
"upload": "Upload"
|
"upload": "Upload",
|
||||||
|
"deleteMessage": "Delete Message",
|
||||||
|
"deleteMessageConfirmation": "Are you sure you want to delete this message?",
|
||||||
|
"customReaction": "Custom Reaction",
|
||||||
|
"customReactions": "Custom Reactions",
|
||||||
|
"stickerPlaceholder": "Sticker Placeholder",
|
||||||
|
"reactionAttitude": "Reaction Attitude",
|
||||||
|
"addReaction": "Add Reaction",
|
||||||
|
"eventCalendar": "Event Calendar",
|
||||||
|
"eventCalendarEmpty": "No events on that day.",
|
||||||
|
"walletStats": "Wallet Statistics",
|
||||||
|
"totalTransactions": "Total Transactions",
|
||||||
|
"totalOrders": "Total Orders",
|
||||||
|
"totalIncome": "Total Income",
|
||||||
|
"totalOutgoing": "Total Outgoing",
|
||||||
|
"netBalance": "Net Balance",
|
||||||
|
"messageUpdateLinks": "Server generated links previews",
|
||||||
|
"messageUpdateEdited": "Edited a message",
|
||||||
|
"settingsCardBackgroundOpacity": "Card Background Opacity",
|
||||||
|
"settingsThemeMode": "Theme Mode",
|
||||||
|
"settingsThemeModeSystem": "System",
|
||||||
|
"settingsThemeModeLight": "Light",
|
||||||
|
"settingsThemeModeDark": "Dark",
|
||||||
|
"enterPin": "Enter your PIN code",
|
||||||
|
"chatReplyingTo": "Replying to {}",
|
||||||
|
"chatForwarding": "Forwarding message",
|
||||||
|
"chatEditing": "Editing message",
|
||||||
|
"chatNoContent": "No content",
|
||||||
|
"sensitiveCategories": {
|
||||||
|
"language": "Language",
|
||||||
|
"sexualContent": "Sexual Content",
|
||||||
|
"violence": "Violence",
|
||||||
|
"profanity": "Profanity",
|
||||||
|
"hateSpeech": "Hate Speech",
|
||||||
|
"racism": "Racism",
|
||||||
|
"adultContent": "Adult Content",
|
||||||
|
"drugAbuse": "Drug Abuse",
|
||||||
|
"alcoholAbuse": "Alcohol Abuse",
|
||||||
|
"gambling": "Gambling",
|
||||||
|
"selfHarm": "Self-harm",
|
||||||
|
"childAbuse": "Child Abuse",
|
||||||
|
"other": "Other"
|
||||||
|
},
|
||||||
|
"Searching...": "Searching...",
|
||||||
|
"searchError": "Search failed. Please try again.",
|
||||||
|
"tryDifferentKeywords": "Try different keywords or remove search filters",
|
||||||
|
"settingsWindowOpacity": "Window Opacity",
|
||||||
|
"messageContent": "Message Content",
|
||||||
|
"updateAvailable": "Update available",
|
||||||
|
"noChangelogProvided": "No changelog provided.",
|
||||||
|
"useSecondarySourceForDownload": "Use secondary source for download",
|
||||||
|
"installUpdate": "Install update",
|
||||||
|
"openReleasePage": "Open release page",
|
||||||
|
"postCompose": "Compose Post",
|
||||||
|
"postPublish": "Publish Post",
|
||||||
|
"restoreDraftTitle": "Restore Draft",
|
||||||
|
"restoreDraftMessage": "A draft was found. Do you want to restore it?",
|
||||||
|
"draft": "Draft",
|
||||||
|
"purchaseGift": "Purchase Gift",
|
||||||
|
"selectRecipient": "Select Recipient",
|
||||||
|
"changeRecipient": "Change Recipient",
|
||||||
|
"addMessage": "Add Message",
|
||||||
|
"skipRecipient": "Skip Recipient",
|
||||||
|
"giftSubscriptions": "Gift Subscriptions",
|
||||||
|
"purchaseAGift": "Purchase a Gift",
|
||||||
|
"redeemAGift": "Redeem a Gift",
|
||||||
|
"giftHistory": "Gift History",
|
||||||
|
"sentGifts": "Sent Gifts",
|
||||||
|
"receivedGifts": "Received Gifts",
|
||||||
|
"noSentGifts": "No sent gifts",
|
||||||
|
"noReceivedGifts": "No received gifts",
|
||||||
|
"stellarGift": "Stellar Gift",
|
||||||
|
"novaGift": "Nova Gift",
|
||||||
|
"supernovaGift": "Supernova Gift",
|
||||||
|
"sameAsMembership": "Same as membership",
|
||||||
|
"enterGiftCodeToRedeem": "Enter gift code to redeem",
|
||||||
|
"enterGiftCode": "Enter gift code",
|
||||||
|
"giftPurchased": "Gift Purchased!",
|
||||||
|
"shareCodeWithRecipient": "Share this code with the recipient to redeem the gift.",
|
||||||
|
"openGiftAnyoneCanRedeem": "This is an open gift that anyone can redeem.",
|
||||||
|
"ok": "OK",
|
||||||
|
"selectedRecipient": "Selected recipient",
|
||||||
|
"noRecipientSelected": "No recipient selected",
|
||||||
|
"thisWillBeAnOpenGift": "This will be an open gift",
|
||||||
|
"personalMessage": "Personal Message",
|
||||||
|
"addPersonalMessageForRecipient": "Add a personal message for the recipient",
|
||||||
|
"giftStatusCreated": "Created",
|
||||||
|
"giftStatusSent": "Sent",
|
||||||
|
"giftStatusRedeemed": "Redeemed",
|
||||||
|
"giftStatusCancelled": "Cancelled",
|
||||||
|
"giftStatusExpired": "Expired",
|
||||||
|
"giftStatusUnknown": "Unknown",
|
||||||
|
"giftCodeCopiedToClipboard": "Gift code copied to clipboard",
|
||||||
|
"codeLabel": "Code: ",
|
||||||
|
"subscriptionLabel": "Subscription: ",
|
||||||
|
"toLabel": "To: ",
|
||||||
|
"fromLabel": "From: ",
|
||||||
|
"messageLabel": "Message: ",
|
||||||
|
"giftRedeemed": "Gift Redeemed!",
|
||||||
|
"giftRedeemedSuccessfully": "You have successfully redeemed the gift. Your new subscription is now active.",
|
||||||
|
"cancelGift": "Cancel Gift",
|
||||||
|
"cancelGiftConfirm": "Are you sure you want to cancel this gift? This action cannot be undone.",
|
||||||
|
"giftCancelledSuccessfully": "Gift cancelled successfully",
|
||||||
|
"createFund": "Create Fund",
|
||||||
|
"fundAmount": "Fund Amount",
|
||||||
|
"enterAmount": "Enter Amount",
|
||||||
|
"selectCurrency": "Select Currency",
|
||||||
|
"splitType": "Split Type",
|
||||||
|
"evenSplit": "Even Split",
|
||||||
|
"equalAmountEach": "Equal amount for each recipient",
|
||||||
|
"randomSplit": "Random Split",
|
||||||
|
"randomAmountEach": "Random amount for each recipient",
|
||||||
|
"recipientCount": "Recipient Count",
|
||||||
|
"numberOfRecipients": "Number of Recipients",
|
||||||
|
"addPersonalMessageForRecipients": "Add a personal message for recipients",
|
||||||
|
"invalidAmount": "Invalid amount",
|
||||||
|
"invalidRecipientCount": "Invalid recipient count",
|
||||||
|
"fundOverview": "Fund Overview",
|
||||||
|
"totalFundsSent": "Total Funds Sent",
|
||||||
|
"totalFundsReceived": "Total Funds Received",
|
||||||
|
"transactions": "Transactions",
|
||||||
|
"myFunds": "My Funds",
|
||||||
|
"availableFunds": "Available Funds",
|
||||||
|
"fundStatusCreated": "Created",
|
||||||
|
"fundStatusPartial": "Partially Claimed",
|
||||||
|
"fundStatusCompleted": "Fully Claimed",
|
||||||
|
"fundStatusExpired": "Expired",
|
||||||
|
"fundStatusUnknown": "Unknown",
|
||||||
|
"recipients": "Recipients",
|
||||||
|
"fundClaimedSuccessfully": "Fund claimed successfully!",
|
||||||
|
"claim": "Claim",
|
||||||
|
"noFundsCreated": "No funds created yet",
|
||||||
|
"createYourFirstFund": "Create your first fund to get started",
|
||||||
|
"noAvailableFunds": "No available funds",
|
||||||
|
"fundsWillAppearHere": "Funds you can claim will appear here",
|
||||||
|
"fundCreatedSuccessfully": "Fund created successfully!",
|
||||||
|
"selectRecipients": "Select Recipients",
|
||||||
|
"noRecipientsSelected": "No recipients selected",
|
||||||
|
"selectRecipientsToSendFund": "Select recipients to send the fund to",
|
||||||
|
"addRecipient": "Add Recipient",
|
||||||
|
"addMoreRecipients": "Add More Recipients",
|
||||||
|
"transactionDetails": "Transaction Details",
|
||||||
|
"remarks": "Remarks",
|
||||||
|
"payer": "Payer",
|
||||||
|
"payee": "Payee",
|
||||||
|
"transactionType": "Transaction Type",
|
||||||
|
"transfer": "Transfer",
|
||||||
|
"payment": "Payment",
|
||||||
|
"systemWallet": "System Wallet",
|
||||||
|
"date": "Date",
|
||||||
|
"createTransfer": "Create Transfer",
|
||||||
|
"transferAmount": "Transfer Amount",
|
||||||
|
"selectPayee": "Select Payee",
|
||||||
|
"selectedPayee": "Selected Payee",
|
||||||
|
"noPayeeSelected": "No payee selected",
|
||||||
|
"selectPayeeToTransfer": "Select payee to transfer to",
|
||||||
|
"addRemark": "Add Remark",
|
||||||
|
"transferRemark": "Transfer Remark",
|
||||||
|
"addRemarkForTransfer": "Add remark for transfer",
|
||||||
|
"enterPinToConfirmTransfer": "Enter your 6-digit PIN to confirm transfer",
|
||||||
|
"transferCreatedSuccessfully": "Transfer created successfully!",
|
||||||
|
"postUpdate": "Update",
|
||||||
|
"fileMetadata": "File Metadata",
|
||||||
|
"resend": "Resend",
|
||||||
|
"fileInfoTitle": "File Information",
|
||||||
|
"download": "Download",
|
||||||
|
"info": "Info",
|
||||||
|
"noStickers": "No Stickers",
|
||||||
|
"noStickersInPack": "This pack does not contains stickers",
|
||||||
|
"noStickerPacks": "No Sticker Packs",
|
||||||
|
"refresh": "Refresh",
|
||||||
|
"spoiler": "Spoiler",
|
||||||
|
"activityHeatmap": "Activity Heatmap",
|
||||||
|
"custom": "Custom",
|
||||||
|
"usernameColor": "Username Color",
|
||||||
|
"colorType": "Color Type",
|
||||||
|
"plain": "Plain",
|
||||||
|
"gradient": "Gradient",
|
||||||
|
"colorValue": "Color Value",
|
||||||
|
"gradientDirection": "Gradient Direction",
|
||||||
|
"gradientDirectionToRight": "To Right",
|
||||||
|
"gradientDirectionToLeft": "To Left",
|
||||||
|
"gradientDirectionToBottom": "To Bottom",
|
||||||
|
"gradientDirectionToTop": "To Top",
|
||||||
|
"gradientDirectionToBottomRight": "To Bottom Right",
|
||||||
|
"gradientDirectionToBottomLeft": "To Bottom Left",
|
||||||
|
"gradientDirectionToTopRight": "To Top Right",
|
||||||
|
"gradientDirectionToTopLeft": "To Top Left",
|
||||||
|
"gradientColors": "Gradient Colors",
|
||||||
|
"color": "Color",
|
||||||
|
"addColor": "Add Color",
|
||||||
|
"availableWithYourPlan": "Available with your plan",
|
||||||
|
"upgradeRequired": "Upgrade required",
|
||||||
|
"settingsDisableAnimation": "Disable Animation",
|
||||||
|
"addTag": "Add Tag",
|
||||||
|
"accountConnectionProviderSpotify": "Spotify",
|
||||||
|
"accountConnectionProviderSteam": "Steam",
|
||||||
|
"timezoneNotFound": "Time zone not found",
|
||||||
|
"awardPoints": "Awarded {} points",
|
||||||
|
"postFeaturedOn": "Post featured on {}",
|
||||||
|
"messageSentAt": "Sent at {}",
|
||||||
|
"myTickets": "My Tickets",
|
||||||
|
"drawHistory": "Draw History",
|
||||||
|
"lottery": "Lottery",
|
||||||
|
"noLotteryTickets": "No lottery tickets yet",
|
||||||
|
"buyYourFirstTicket": "Buy your first lottery ticket to get started!",
|
||||||
|
"buyTicket": "Buy Ticket",
|
||||||
|
"ticketNumbers": "Numbers: {}, Special: {}",
|
||||||
|
"cost": "Cost",
|
||||||
|
"multiplier": "Multiplier",
|
||||||
|
"prizeWon": "Prize Won",
|
||||||
|
"pending": "Pending",
|
||||||
|
"drawn": "Drawn",
|
||||||
|
"won": "Won",
|
||||||
|
"lost": "Lost",
|
||||||
|
"noDrawHistory": "No draw history yet",
|
||||||
|
"buyLotteryTicket": "Buy Lottery Ticket",
|
||||||
|
"selectNumbers": "Select Numbers",
|
||||||
|
"select5UniqueNumbers": "Select 5 unique numbers",
|
||||||
|
"selectSpecialNumber": "Select Special Number",
|
||||||
|
"selectMultiplier": "Select Multiplier",
|
||||||
|
"baseCost": "Base Cost",
|
||||||
|
"totalCost": "Total Cost",
|
||||||
|
"prizeStructure": "Prize Structure",
|
||||||
|
"enterPinToConfirmPurchase": "Enter your PIN to confirm purchase",
|
||||||
|
"ticketPurchasedSuccessfully": "Ticket purchased successfully!",
|
||||||
|
"winningNumbers": "Winning Numbers",
|
||||||
|
"specialNumber": "Special Number",
|
||||||
|
"totalTickets": "Total Tickets",
|
||||||
|
"totalWinners": "Total Winners",
|
||||||
|
"prizePool": "Prize Pool",
|
||||||
|
"enterPinToConfirmPayment": "Enter your PIN code to confirm payment",
|
||||||
|
"purchase": "Purchase",
|
||||||
|
"multiplierLabel": "Multiplier",
|
||||||
|
"specialOnly": "Special Only",
|
||||||
|
"matches": "Matches",
|
||||||
|
"thoughtDefaultTopic": "Reflection",
|
||||||
|
"thoughtAiName": "SN-chan",
|
||||||
|
"thoughtUserName": "You",
|
||||||
|
"thoughtStreamingHint": "Sn-chan is thinking...",
|
||||||
|
"thoughtInputHint": "Ask sn-chan anything...",
|
||||||
|
"thoughtNewConversation": "Start New Conversation",
|
||||||
|
"thoughtParseError": "Failed to parse AI response",
|
||||||
|
"thoughtFunctionCall": "Use {}",
|
||||||
|
"aiThought": "AI Thought",
|
||||||
|
"aiThoughtTitle": "Let sn-chan think",
|
||||||
|
"postReferenceUnavailable": "Referenced post is unavailable",
|
||||||
|
"fabLocation": "FAB Location",
|
||||||
|
"activities": "Activities",
|
||||||
|
"presenceTypeGaming": "Playing",
|
||||||
|
"presenceTypeMusic": "Listening to Music",
|
||||||
|
"presenceTypeWorkout": "Working out",
|
||||||
|
"articleCompose": "Compose Article",
|
||||||
|
"backToHub": "Back to Hub",
|
||||||
|
"advancedFilters": "Advanced Filters",
|
||||||
|
"searchPosts": "Search Posts",
|
||||||
|
"sortBy": "Sort by",
|
||||||
|
"fromDate": "From Date",
|
||||||
|
"toDate": "To Date",
|
||||||
|
"popularity": "Popularity",
|
||||||
|
"descendingOrder": "Descending Order",
|
||||||
|
"selectDate": "Select Date",
|
||||||
|
"pinnedPosts": "Pinned Posts",
|
||||||
|
"customReactionHint": "Custom Reaction allow you to use user uploaded stickers as the symbol of the reaction for the post. Exclusive for Stellar Program members.",
|
||||||
|
"publicationSites": "Publication Sites",
|
||||||
|
"uploadTasks": "Upload Tasks",
|
||||||
|
"thoughtFunctionCallBegin": "Calling tool {}",
|
||||||
|
"thoughtFunctionCallFinish": "{} responded",
|
||||||
|
"thoughtUnpaidHint": "Thinking unavaiable due to unpaid orders",
|
||||||
|
"more": "More",
|
||||||
|
"collapse": "Collapse",
|
||||||
|
"pollConfirmDiscard": "Are you sure you want to leave? All the poll data you're editing will not be saved.",
|
||||||
|
"discard": "Discard",
|
||||||
|
"fund": "Fund",
|
||||||
|
"fundsRecent": "Recent Funds",
|
||||||
|
"fundCreateNew": "Create New",
|
||||||
|
"fundCreateNewHint": "Create a new fund for your message. Select recipients and amount.",
|
||||||
|
"amountOfSplits": "Amount of Splits",
|
||||||
|
"enterNumberOfSplits": "Enter Splits Amount",
|
||||||
|
"orCreateWith": "Or\ncreate with",
|
||||||
|
"unindexedFiles": "Unindexed files",
|
||||||
|
"folder": "Folder",
|
||||||
|
"clearCompleted": "Clear Completed",
|
||||||
|
"uploadSuccess": "Upload successful!",
|
||||||
|
"wouldYouLikeToViewFile": "Would you like to view the file?",
|
||||||
|
"contentCantEmpty": "Content cannot be empty",
|
||||||
|
"features": "Features",
|
||||||
|
"unnamed": "Unnamed",
|
||||||
|
"fundEnvelopeLoadFailed": "Failed to load fund envelope",
|
||||||
|
"fundEnvelope": "Fund Envelope",
|
||||||
|
"fundEnvelopeRemaining": "Remaining: {} {}",
|
||||||
|
"fundEnvelopeSplit": "Split: {}",
|
||||||
|
"fundEnvelopeSplitEvenly": "Evenly",
|
||||||
|
"fundEnvelopeSplitRandomly": "Randomly",
|
||||||
|
"fundEnvelopeClaimSuccess": "Fund claimed successfully!",
|
||||||
|
"fundEnvelopeStatusCreated": "Created",
|
||||||
|
"fundEnvelopeStatusPartial": "Partially Claimed",
|
||||||
|
"fundEnvelopeStatusCompleted": "Fully Claimed",
|
||||||
|
"fundEnvelopeStatusExpired": "Expired",
|
||||||
|
"fundEnvelopeStatusUnknown": "Unknown",
|
||||||
|
"fundEnvelopeRecipients": "Recipients ({}/{} claimed)",
|
||||||
|
"fundEnvelopeExpiredDaysAgo": {
|
||||||
|
"one": "Expired {} day ago",
|
||||||
|
"other": "Expired {} days ago"
|
||||||
|
},
|
||||||
|
"fundEnvelopeExpiresSoon": "Expires soon",
|
||||||
|
"fundEnvelopeExpiresInHours": {
|
||||||
|
"one": "Expires in {} hour",
|
||||||
|
"other": "Expires in {} hours"
|
||||||
|
},
|
||||||
|
"fundEnvelopeExpiresInDays": {
|
||||||
|
"one": "Expires in {} day",
|
||||||
|
"other": "Expires in {} days"
|
||||||
|
},
|
||||||
|
"fundEnvelopeRemainingWithSplits": "{} {} / {} splits",
|
||||||
|
"fundEnvelopeUnknownUser": "Unknown User",
|
||||||
|
"deleteSite": "Delete Site",
|
||||||
|
"deleteSiteConfirm": "Are you sure you want to delete this site?",
|
||||||
|
"siteDeletedSuccess": "Site deleted successfully",
|
||||||
|
"siteSlug": "Slug",
|
||||||
|
"siteSlugHint": "my-site",
|
||||||
|
"siteSlugRequired": "Please enter a slug",
|
||||||
|
"siteSlugInvalid": "Slug can only contain lowercase letters, numbers, and dashes",
|
||||||
|
"siteName": "Site Name",
|
||||||
|
"siteNameHint": "My Publication Site",
|
||||||
|
"siteNameRequired": "Please enter a site name",
|
||||||
|
"siteMode": "Mode",
|
||||||
|
"siteModeFullyManaged": "Fully Managed",
|
||||||
|
"siteModeSelfManaged": "Self-Managed",
|
||||||
|
"editPublicationSite": "Edit Publication Site",
|
||||||
|
"deletePublicationSite": "Delete Publication Site",
|
||||||
|
"publicationSiteSavedSuccess": "Publication site saved successfully",
|
||||||
|
"publicationSiteDeleteConfirm": "Are you sure you want to delete this publication site? This action cannot be undone.",
|
||||||
|
"publicationSiteDeletedSuccess": "Publication site deleted successfully",
|
||||||
|
"newPublicationSite": "New Publication Site",
|
||||||
|
"siteDetails": "Site Details",
|
||||||
|
"siteInformation": "Site Information",
|
||||||
|
"siteDomain": "Domain",
|
||||||
|
"siteCreated": "Created",
|
||||||
|
"siteUpdated": "Updated",
|
||||||
|
"failedToLoadSite": "Failed to load site",
|
||||||
|
"sitePages": "Pages",
|
||||||
|
"noPagesYet": "No pages yet",
|
||||||
|
"createFirstPage": "Create your first page to get started",
|
||||||
|
"failedToLoadPages": "Failed to load pages",
|
||||||
|
"fileManagement": "File Management",
|
||||||
|
"siteFiles": "Files",
|
||||||
|
"siteFolder": "Folder",
|
||||||
|
"siteRoot": "Root",
|
||||||
|
"noFilesUploadedYet": "No files uploaded yet",
|
||||||
|
"uploadFirstFile": "Upload your first file to get started",
|
||||||
|
"failedToLoadFiles": "Failed to load files",
|
||||||
|
"noFilesFoundInFolder": "No files found in the selected folder",
|
||||||
|
"fileActions": "File Actions",
|
||||||
|
"purgeFiles": "Purge Files",
|
||||||
|
"purgeFilesDescription": "Remove all uploaded files from the site",
|
||||||
|
"deploySite": "Deploy Site",
|
||||||
|
"deploySiteDescription": "Upload and deploy a new version from ZIP archive",
|
||||||
|
"confirmPurge": "Confirm Purge",
|
||||||
|
"purgeFilesConfirm": "This will permanently delete all files uploaded to this site. This action cannot be undone. Are you sure you want to continue?",
|
||||||
|
"purgeAllFiles": "Purge All Files",
|
||||||
|
"allFilesPurgedSuccess": "All files purged successfully",
|
||||||
|
"failedToPurgeFiles": "Failed to purge files: {}",
|
||||||
|
"siteDeployedSuccess": "Site deployed successfully",
|
||||||
|
"failedToDeploySite": "Failed to deploy site: {}",
|
||||||
|
"createPage": "Create Page",
|
||||||
|
"editPage": "Edit Page",
|
||||||
|
"pageType": "Page Type",
|
||||||
|
"htmlPage": "HTML Page",
|
||||||
|
"redirectPage": "Redirect Page",
|
||||||
|
"pageTypeRequired": "Please select a page type",
|
||||||
|
"pagePath": "Page Path",
|
||||||
|
"pagePathHint": "/about, /contact, etc.",
|
||||||
|
"pagePathRequired": "Please enter a page path",
|
||||||
|
"pagePathInvalid": "Page path can only contain letters, numbers, hyphens, underscores, and slashes",
|
||||||
|
"pagePathMustStartWithSlash": "Page path must start with /",
|
||||||
|
"pagePathNoConsecutiveSlashes": "Page path cannot have consecutive slashes",
|
||||||
|
"pageTitle": "Page Title",
|
||||||
|
"pageTitleHint": "About Us, Contact, etc.",
|
||||||
|
"pageTitleRequired": "Please enter a page title",
|
||||||
|
"pageContentHtml": "Page Content (HTML)",
|
||||||
|
"pageContentHint": "<h1>Hello World</h1><p>This is my page content...</p>",
|
||||||
|
"pageContentRequired": "Please enter HTML content for the page",
|
||||||
|
"redirectTarget": "Redirect Target",
|
||||||
|
"redirectTargetHint": "/new-page, https://example.com, etc.",
|
||||||
|
"redirectTargetRequired": "Please enter a redirect target",
|
||||||
|
"redirectTargetInvalid": "Target must be a relative path (/) or absolute URL (http/https)",
|
||||||
|
"deletePage": "Delete Page",
|
||||||
|
"deletePageConfirm": "Are you sure you want to delete this page?",
|
||||||
|
"savePage": "Save Page",
|
||||||
|
"pageCreatedSuccess": "Page created successfully",
|
||||||
|
"pageUpdatedSuccess": "Page updated successfully",
|
||||||
|
"pageDeletedSuccess": "Page deleted successfully",
|
||||||
|
"uploadFiles": "Upload Files",
|
||||||
|
"uploadPath": "Upload Path",
|
||||||
|
"uploadPathHint": "/ (root) or /assets/images/",
|
||||||
|
"uploadPathRequired": "Please enter an upload path",
|
||||||
|
"uploadPathMustStartWithSlash": "Path must start with /",
|
||||||
|
"uploadPathNoSpaces": "Path cannot contain spaces",
|
||||||
|
"uploadPathNoConsecutiveSlashes": "Path cannot have consecutive slashes",
|
||||||
|
"percentCompleted": "{}% completed",
|
||||||
|
"filesToUpload": "{} files to upload",
|
||||||
|
"fileSizeKb": "Size: {} KB",
|
||||||
|
"uploadingEllipsis": "Uploading...",
|
||||||
|
"uploadFilesCount": {
|
||||||
|
"one": "Upload {} File",
|
||||||
|
"other": "Upload {} Files"
|
||||||
|
},
|
||||||
|
"allUploadsCompleted": "All uploads completed",
|
||||||
|
"someUploadsFailed": "Some uploads failed",
|
||||||
|
"uploadingInProgress": "Uploading in progress",
|
||||||
|
"readyToUpload": "Ready to upload",
|
||||||
|
"allFilesUploadedSuccess": "All files uploaded successfully",
|
||||||
|
"lotteryLastNumberSpecial": "The last selected number will be your special number.",
|
||||||
|
"lotteryMultiplierRequired": "Please enter a multiplier",
|
||||||
|
"lotteryMultiplierRange": "Multiplier must be between 1 and 10",
|
||||||
|
"dropToShare": "Drop to share"
|
||||||
}
|
}
|
||||||
@@ -164,8 +164,6 @@
|
|||||||
"checkInResultLevel3": "Good Luck",
|
"checkInResultLevel3": "Good Luck",
|
||||||
"checkInResultLevel4": "Best Luck",
|
"checkInResultLevel4": "Best Luck",
|
||||||
"checkInActivityTitle": "{} checked in on {} and got a {}",
|
"checkInActivityTitle": "{} checked in on {} and got a {}",
|
||||||
"eventCalander": "Event Calander",
|
|
||||||
"eventCalanderEmpty": "No events on that day.",
|
|
||||||
"fortuneGraph": "Fortune Trend",
|
"fortuneGraph": "Fortune Trend",
|
||||||
"noFortuneData": "No fortune data available for this month.",
|
"noFortuneData": "No fortune data available for this month.",
|
||||||
"creatorHub": "Creator Hub",
|
"creatorHub": "Creator Hub",
|
||||||
@@ -752,21 +750,6 @@
|
|||||||
"rename": "Rename",
|
"rename": "Rename",
|
||||||
"markAsSensitive": "Mark as Sensitive",
|
"markAsSensitive": "Mark as Sensitive",
|
||||||
"fileName": "File name",
|
"fileName": "File name",
|
||||||
"sensitiveCategories": {
|
|
||||||
"language": "Language",
|
|
||||||
"sexualContent": "Sexual Content",
|
|
||||||
"violence": "Violence",
|
|
||||||
"profanity": "Profanity",
|
|
||||||
"hateSpeech": "Hate Speech",
|
|
||||||
"racism": "Racism",
|
|
||||||
"adultContent": "Adult Content",
|
|
||||||
"drugAbuse": "Drug Abuse",
|
|
||||||
"alcoholAbuse": "Alcohol Abuse",
|
|
||||||
"gambling": "Gambling",
|
|
||||||
"selfHarm": "Self-harm",
|
|
||||||
"childAbuse": "Child Abuse",
|
|
||||||
"other": "Other"
|
|
||||||
},
|
|
||||||
"poll": "Poll",
|
"poll": "Poll",
|
||||||
"pollsRecent": "Recent Polls",
|
"pollsRecent": "Recent Polls",
|
||||||
"pollCreateNew": "Create New",
|
"pollCreateNew": "Create New",
|
||||||
@@ -1075,5 +1058,421 @@
|
|||||||
"deleteRecycledFiles": "Delete Recycled Files",
|
"deleteRecycledFiles": "Delete Recycled Files",
|
||||||
"recycledFilesDeleted": "Recycled files deleted successfully",
|
"recycledFilesDeleted": "Recycled files deleted successfully",
|
||||||
"failedToDeleteRecycledFiles": "Failed to delete recycled files",
|
"failedToDeleteRecycledFiles": "Failed to delete recycled files",
|
||||||
"upload": "Upload"
|
"upload": "Upload",
|
||||||
|
"deleteMessage": "Delete Message",
|
||||||
|
"deleteMessageConfirmation": "Are you sure you want to delete this message?",
|
||||||
|
"customReaction": "Custom Reaction",
|
||||||
|
"customReactions": "Custom Reactions",
|
||||||
|
"stickerPlaceholder": "Sticker Placeholder",
|
||||||
|
"reactionAttitude": "Reaction Attitude",
|
||||||
|
"addReaction": "Add Reaction",
|
||||||
|
"eventCalendar": "Event Calendar",
|
||||||
|
"eventCalendarEmpty": "No events on that day.",
|
||||||
|
"walletStats": "Wallet Statistics",
|
||||||
|
"totalTransactions": "Total Transactions",
|
||||||
|
"totalOrders": "Total Orders",
|
||||||
|
"totalIncome": "Total Income",
|
||||||
|
"totalOutgoing": "Total Outgoing",
|
||||||
|
"netBalance": "Net Balance",
|
||||||
|
"messageUpdateLinks": "Server generated links previews",
|
||||||
|
"messageUpdateEdited": "Edited a message",
|
||||||
|
"settingsCardBackgroundOpacity": "Card Background Opacity",
|
||||||
|
"settingsThemeMode": "Theme Mode",
|
||||||
|
"settingsThemeModeSystem": "System",
|
||||||
|
"settingsThemeModeLight": "Light",
|
||||||
|
"settingsThemeModeDark": "Dark",
|
||||||
|
"enterPin": "Enter your PIN code",
|
||||||
|
"chatReplyingTo": "Replying to {}",
|
||||||
|
"chatForwarding": "Forwarding message",
|
||||||
|
"chatEditing": "Editing message",
|
||||||
|
"chatNoContent": "No content",
|
||||||
|
"sensitiveCategories": {
|
||||||
|
"language": "Language",
|
||||||
|
"sexualContent": "Sexual Content",
|
||||||
|
"violence": "Violence",
|
||||||
|
"profanity": "Profanity",
|
||||||
|
"hateSpeech": "Hate Speech",
|
||||||
|
"racism": "Racism",
|
||||||
|
"adultContent": "Adult Content",
|
||||||
|
"drugAbuse": "Drug Abuse",
|
||||||
|
"alcoholAbuse": "Alcohol Abuse",
|
||||||
|
"gambling": "Gambling",
|
||||||
|
"selfHarm": "Self-harm",
|
||||||
|
"childAbuse": "Child Abuse",
|
||||||
|
"other": "Other"
|
||||||
|
},
|
||||||
|
"Searching...": "Searching...",
|
||||||
|
"searchError": "Search failed. Please try again.",
|
||||||
|
"tryDifferentKeywords": "Try different keywords or remove search filters",
|
||||||
|
"settingsWindowOpacity": "Window Opacity",
|
||||||
|
"messageContent": "Message Content",
|
||||||
|
"updateAvailable": "Update available",
|
||||||
|
"noChangelogProvided": "No changelog provided.",
|
||||||
|
"useSecondarySourceForDownload": "Use secondary source for download",
|
||||||
|
"installUpdate": "Install update",
|
||||||
|
"openReleasePage": "Open release page",
|
||||||
|
"postCompose": "Compose Post",
|
||||||
|
"postPublish": "Publish Post",
|
||||||
|
"restoreDraftTitle": "Restore Draft",
|
||||||
|
"restoreDraftMessage": "A draft was found. Do you want to restore it?",
|
||||||
|
"draft": "Draft",
|
||||||
|
"purchaseGift": "Purchase Gift",
|
||||||
|
"selectRecipient": "Select Recipient",
|
||||||
|
"changeRecipient": "Change Recipient",
|
||||||
|
"addMessage": "Add Message",
|
||||||
|
"skipRecipient": "Skip Recipient",
|
||||||
|
"giftSubscriptions": "Gift Subscriptions",
|
||||||
|
"purchaseAGift": "Purchase a Gift",
|
||||||
|
"redeemAGift": "Redeem a Gift",
|
||||||
|
"giftHistory": "Gift History",
|
||||||
|
"sentGifts": "Sent Gifts",
|
||||||
|
"receivedGifts": "Received Gifts",
|
||||||
|
"noSentGifts": "No sent gifts",
|
||||||
|
"noReceivedGifts": "No received gifts",
|
||||||
|
"stellarGift": "Stellar Gift",
|
||||||
|
"novaGift": "Nova Gift",
|
||||||
|
"supernovaGift": "Supernova Gift",
|
||||||
|
"sameAsMembership": "Same as membership",
|
||||||
|
"enterGiftCodeToRedeem": "Enter gift code to redeem",
|
||||||
|
"enterGiftCode": "Enter gift code",
|
||||||
|
"giftPurchased": "Gift Purchased!",
|
||||||
|
"shareCodeWithRecipient": "Share this code with the recipient to redeem the gift.",
|
||||||
|
"openGiftAnyoneCanRedeem": "This is an open gift that anyone can redeem.",
|
||||||
|
"ok": "OK",
|
||||||
|
"selectedRecipient": "Selected recipient",
|
||||||
|
"noRecipientSelected": "No recipient selected",
|
||||||
|
"thisWillBeAnOpenGift": "This will be an open gift",
|
||||||
|
"personalMessage": "Personal Message",
|
||||||
|
"addPersonalMessageForRecipient": "Add a personal message for the recipient",
|
||||||
|
"giftStatusCreated": "Created",
|
||||||
|
"giftStatusSent": "Sent",
|
||||||
|
"giftStatusRedeemed": "Redeemed",
|
||||||
|
"giftStatusCancelled": "Cancelled",
|
||||||
|
"giftStatusExpired": "Expired",
|
||||||
|
"giftStatusUnknown": "Unknown",
|
||||||
|
"giftCodeCopiedToClipboard": "Gift code copied to clipboard",
|
||||||
|
"codeLabel": "Code: ",
|
||||||
|
"subscriptionLabel": "Subscription: ",
|
||||||
|
"toLabel": "To: ",
|
||||||
|
"fromLabel": "From: ",
|
||||||
|
"messageLabel": "Message: ",
|
||||||
|
"giftRedeemed": "Gift Redeemed!",
|
||||||
|
"giftRedeemedSuccessfully": "You have successfully redeemed the gift. Your new subscription is now active.",
|
||||||
|
"cancelGift": "Cancel Gift",
|
||||||
|
"cancelGiftConfirm": "Are you sure you want to cancel this gift? This action cannot be undone.",
|
||||||
|
"giftCancelledSuccessfully": "Gift cancelled successfully",
|
||||||
|
"createFund": "Create Fund",
|
||||||
|
"fundAmount": "Fund Amount",
|
||||||
|
"enterAmount": "Enter Amount",
|
||||||
|
"selectCurrency": "Select Currency",
|
||||||
|
"splitType": "Split Type",
|
||||||
|
"evenSplit": "Even Split",
|
||||||
|
"equalAmountEach": "Equal amount for each recipient",
|
||||||
|
"randomSplit": "Random Split",
|
||||||
|
"randomAmountEach": "Random amount for each recipient",
|
||||||
|
"recipientCount": "Recipient Count",
|
||||||
|
"numberOfRecipients": "Number of Recipients",
|
||||||
|
"addPersonalMessageForRecipients": "Add a personal message for recipients",
|
||||||
|
"invalidAmount": "Invalid amount",
|
||||||
|
"invalidRecipientCount": "Invalid recipient count",
|
||||||
|
"fundOverview": "Fund Overview",
|
||||||
|
"totalFundsSent": "Total Funds Sent",
|
||||||
|
"totalFundsReceived": "Total Funds Received",
|
||||||
|
"transactions": "Transactions",
|
||||||
|
"myFunds": "My Funds",
|
||||||
|
"availableFunds": "Available Funds",
|
||||||
|
"fundStatusCreated": "Created",
|
||||||
|
"fundStatusPartial": "Partially Claimed",
|
||||||
|
"fundStatusCompleted": "Fully Claimed",
|
||||||
|
"fundStatusExpired": "Expired",
|
||||||
|
"fundStatusUnknown": "Unknown",
|
||||||
|
"recipients": "Recipients",
|
||||||
|
"fundClaimedSuccessfully": "Fund claimed successfully!",
|
||||||
|
"claim": "Claim",
|
||||||
|
"noFundsCreated": "No funds created yet",
|
||||||
|
"createYourFirstFund": "Create your first fund to get started",
|
||||||
|
"noAvailableFunds": "No available funds",
|
||||||
|
"fundsWillAppearHere": "Funds you can claim will appear here",
|
||||||
|
"fundCreatedSuccessfully": "Fund created successfully!",
|
||||||
|
"selectRecipients": "Select Recipients",
|
||||||
|
"noRecipientsSelected": "No recipients selected",
|
||||||
|
"selectRecipientsToSendFund": "Select recipients to send the fund to",
|
||||||
|
"addRecipient": "Add Recipient",
|
||||||
|
"addMoreRecipients": "Add More Recipients",
|
||||||
|
"transactionDetails": "Transaction Details",
|
||||||
|
"remarks": "Remarks",
|
||||||
|
"payer": "Payer",
|
||||||
|
"payee": "Payee",
|
||||||
|
"transactionType": "Transaction Type",
|
||||||
|
"transfer": "Transfer",
|
||||||
|
"payment": "Payment",
|
||||||
|
"systemWallet": "System Wallet",
|
||||||
|
"date": "Date",
|
||||||
|
"createTransfer": "Create Transfer",
|
||||||
|
"transferAmount": "Transfer Amount",
|
||||||
|
"selectPayee": "Select Payee",
|
||||||
|
"selectedPayee": "Selected Payee",
|
||||||
|
"noPayeeSelected": "No payee selected",
|
||||||
|
"selectPayeeToTransfer": "Select payee to transfer to",
|
||||||
|
"addRemark": "Add Remark",
|
||||||
|
"transferRemark": "Transfer Remark",
|
||||||
|
"addRemarkForTransfer": "Add remark for transfer",
|
||||||
|
"enterPinToConfirmTransfer": "Enter your 6-digit PIN to confirm transfer",
|
||||||
|
"transferCreatedSuccessfully": "Transfer created successfully!",
|
||||||
|
"postUpdate": "Update",
|
||||||
|
"fileMetadata": "File Metadata",
|
||||||
|
"resend": "Resend",
|
||||||
|
"fileInfoTitle": "File Information",
|
||||||
|
"download": "Download",
|
||||||
|
"info": "Info",
|
||||||
|
"noStickers": "No Stickers",
|
||||||
|
"noStickersInPack": "This pack does not contains stickers",
|
||||||
|
"noStickerPacks": "No Sticker Packs",
|
||||||
|
"refresh": "Refresh",
|
||||||
|
"spoiler": "Spoiler",
|
||||||
|
"activityHeatmap": "Activity Heatmap",
|
||||||
|
"custom": "Custom",
|
||||||
|
"usernameColor": "Username Color",
|
||||||
|
"colorType": "Color Type",
|
||||||
|
"plain": "Plain",
|
||||||
|
"gradient": "Gradient",
|
||||||
|
"colorValue": "Color Value",
|
||||||
|
"gradientDirection": "Gradient Direction",
|
||||||
|
"gradientDirectionToRight": "To Right",
|
||||||
|
"gradientDirectionToLeft": "To Left",
|
||||||
|
"gradientDirectionToBottom": "To Bottom",
|
||||||
|
"gradientDirectionToTop": "To Top",
|
||||||
|
"gradientDirectionToBottomRight": "To Bottom Right",
|
||||||
|
"gradientDirectionToBottomLeft": "To Bottom Left",
|
||||||
|
"gradientDirectionToTopRight": "To Top Right",
|
||||||
|
"gradientDirectionToTopLeft": "To Top Left",
|
||||||
|
"gradientColors": "Gradient Colors",
|
||||||
|
"color": "Color",
|
||||||
|
"addColor": "Add Color",
|
||||||
|
"availableWithYourPlan": "Available with your plan",
|
||||||
|
"upgradeRequired": "Upgrade required",
|
||||||
|
"settingsDisableAnimation": "Disable Animation",
|
||||||
|
"addTag": "Add Tag",
|
||||||
|
"accountConnectionProviderSpotify": "Spotify",
|
||||||
|
"accountConnectionProviderSteam": "Steam",
|
||||||
|
"timezoneNotFound": "Time zone not found",
|
||||||
|
"awardPoints": "Awarded {} points",
|
||||||
|
"postFeaturedOn": "Post featured on {}",
|
||||||
|
"messageSentAt": "Sent at {}",
|
||||||
|
"myTickets": "My Tickets",
|
||||||
|
"drawHistory": "Draw History",
|
||||||
|
"lottery": "Lottery",
|
||||||
|
"noLotteryTickets": "No lottery tickets yet",
|
||||||
|
"buyYourFirstTicket": "Buy your first lottery ticket to get started!",
|
||||||
|
"buyTicket": "Buy Ticket",
|
||||||
|
"ticketNumbers": "Numbers: {}, Special: {}",
|
||||||
|
"cost": "Cost",
|
||||||
|
"multiplier": "Multiplier",
|
||||||
|
"prizeWon": "Prize Won",
|
||||||
|
"pending": "Pending",
|
||||||
|
"drawn": "Drawn",
|
||||||
|
"won": "Won",
|
||||||
|
"lost": "Lost",
|
||||||
|
"noDrawHistory": "No draw history yet",
|
||||||
|
"buyLotteryTicket": "Buy Lottery Ticket",
|
||||||
|
"selectNumbers": "Select Numbers",
|
||||||
|
"select5UniqueNumbers": "Select 5 unique numbers",
|
||||||
|
"selectSpecialNumber": "Select Special Number",
|
||||||
|
"selectMultiplier": "Select Multiplier",
|
||||||
|
"baseCost": "Base Cost",
|
||||||
|
"totalCost": "Total Cost",
|
||||||
|
"prizeStructure": "Prize Structure",
|
||||||
|
"enterPinToConfirmPurchase": "Enter your PIN to confirm purchase",
|
||||||
|
"ticketPurchasedSuccessfully": "Ticket purchased successfully!",
|
||||||
|
"winningNumbers": "Winning Numbers",
|
||||||
|
"specialNumber": "Special Number",
|
||||||
|
"totalTickets": "Total Tickets",
|
||||||
|
"totalWinners": "Total Winners",
|
||||||
|
"prizePool": "Prize Pool",
|
||||||
|
"enterPinToConfirmPayment": "Enter your PIN code to confirm payment",
|
||||||
|
"purchase": "Purchase",
|
||||||
|
"multiplierLabel": "Multiplier",
|
||||||
|
"specialOnly": "Special Only",
|
||||||
|
"matches": "Matches",
|
||||||
|
"thoughtDefaultTopic": "Reflection",
|
||||||
|
"thoughtAiName": "SN-chan",
|
||||||
|
"thoughtUserName": "You",
|
||||||
|
"thoughtStreamingHint": "Sn-chan is thinking...",
|
||||||
|
"thoughtInputHint": "Ask sn-chan anything...",
|
||||||
|
"thoughtNewConversation": "Start New Conversation",
|
||||||
|
"thoughtParseError": "Failed to parse AI response",
|
||||||
|
"thoughtFunctionCall": "Use {}",
|
||||||
|
"aiThought": "AI Thought",
|
||||||
|
"aiThoughtTitle": "Let sn-chan think",
|
||||||
|
"postReferenceUnavailable": "Referenced post is unavailable",
|
||||||
|
"fabLocation": "FAB Location",
|
||||||
|
"activities": "Activities",
|
||||||
|
"presenceTypeGaming": "Playing",
|
||||||
|
"presenceTypeMusic": "Listening to Music",
|
||||||
|
"presenceTypeWorkout": "Working out",
|
||||||
|
"articleCompose": "Compose Article",
|
||||||
|
"backToHub": "Back to Hub",
|
||||||
|
"advancedFilters": "Advanced Filters",
|
||||||
|
"searchPosts": "Search Posts",
|
||||||
|
"sortBy": "Sort by",
|
||||||
|
"fromDate": "From Date",
|
||||||
|
"toDate": "To Date",
|
||||||
|
"popularity": "Popularity",
|
||||||
|
"descendingOrder": "Descending Order",
|
||||||
|
"selectDate": "Select Date",
|
||||||
|
"pinnedPosts": "Pinned Posts",
|
||||||
|
"customReactionHint": "Custom Reaction allow you to use user uploaded stickers as the symbol of the reaction for the post. Exclusive for Stellar Program members.",
|
||||||
|
"publicationSites": "Publication Sites",
|
||||||
|
"uploadTasks": "Upload Tasks",
|
||||||
|
"thoughtFunctionCallBegin": "Calling tool {}",
|
||||||
|
"thoughtFunctionCallFinish": "{} responded",
|
||||||
|
"thoughtUnpaidHint": "Thinking unavaiable due to unpaid orders",
|
||||||
|
"more": "More",
|
||||||
|
"collapse": "Collapse",
|
||||||
|
"pollConfirmDiscard": "Are you sure you want to leave? All the poll data you're editing will not be saved.",
|
||||||
|
"discard": "Discard",
|
||||||
|
"fund": "Fund",
|
||||||
|
"fundsRecent": "Recent Funds",
|
||||||
|
"fundCreateNew": "Create New",
|
||||||
|
"fundCreateNewHint": "Create a new fund for your message. Select recipients and amount.",
|
||||||
|
"amountOfSplits": "Amount of Splits",
|
||||||
|
"enterNumberOfSplits": "Enter Splits Amount",
|
||||||
|
"orCreateWith": "Or\ncreate with",
|
||||||
|
"unindexedFiles": "Unindexed files",
|
||||||
|
"folder": "Folder",
|
||||||
|
"clearCompleted": "Clear Completed",
|
||||||
|
"uploadSuccess": "Upload successful!",
|
||||||
|
"wouldYouLikeToViewFile": "Would you like to view the file?",
|
||||||
|
"contentCantEmpty": "Content cannot be empty",
|
||||||
|
"features": "Features",
|
||||||
|
"unnamed": "Unnamed",
|
||||||
|
"fundEnvelopeLoadFailed": "Failed to load fund envelope",
|
||||||
|
"fundEnvelope": "Fund Envelope",
|
||||||
|
"fundEnvelopeRemaining": "Remaining: {} {}",
|
||||||
|
"fundEnvelopeSplit": "Split: {}",
|
||||||
|
"fundEnvelopeSplitEvenly": "Evenly",
|
||||||
|
"fundEnvelopeSplitRandomly": "Randomly",
|
||||||
|
"fundEnvelopeClaimSuccess": "Fund claimed successfully!",
|
||||||
|
"fundEnvelopeStatusCreated": "Created",
|
||||||
|
"fundEnvelopeStatusPartial": "Partially Claimed",
|
||||||
|
"fundEnvelopeStatusCompleted": "Fully Claimed",
|
||||||
|
"fundEnvelopeStatusExpired": "Expired",
|
||||||
|
"fundEnvelopeStatusUnknown": "Unknown",
|
||||||
|
"fundEnvelopeRecipients": "Recipients ({}/{} claimed)",
|
||||||
|
"fundEnvelopeExpiredDaysAgo": {
|
||||||
|
"one": "Expired {} day ago",
|
||||||
|
"other": "Expired {} days ago"
|
||||||
|
},
|
||||||
|
"fundEnvelopeExpiresSoon": "Expires soon",
|
||||||
|
"fundEnvelopeExpiresInHours": {
|
||||||
|
"one": "Expires in {} hour",
|
||||||
|
"other": "Expires in {} hours"
|
||||||
|
},
|
||||||
|
"fundEnvelopeExpiresInDays": {
|
||||||
|
"one": "Expires in {} day",
|
||||||
|
"other": "Expires in {} days"
|
||||||
|
},
|
||||||
|
"fundEnvelopeRemainingWithSplits": "{} {} / {} splits",
|
||||||
|
"fundEnvelopeUnknownUser": "Unknown User",
|
||||||
|
"deleteSite": "Delete Site",
|
||||||
|
"deleteSiteConfirm": "Are you sure you want to delete this site?",
|
||||||
|
"siteDeletedSuccess": "Site deleted successfully",
|
||||||
|
"siteSlug": "Slug",
|
||||||
|
"siteSlugHint": "my-site",
|
||||||
|
"siteSlugRequired": "Please enter a slug",
|
||||||
|
"siteSlugInvalid": "Slug can only contain lowercase letters, numbers, and dashes",
|
||||||
|
"siteName": "Site Name",
|
||||||
|
"siteNameHint": "My Publication Site",
|
||||||
|
"siteNameRequired": "Please enter a site name",
|
||||||
|
"siteMode": "Mode",
|
||||||
|
"siteModeFullyManaged": "Fully Managed",
|
||||||
|
"siteModeSelfManaged": "Self-Managed",
|
||||||
|
"editPublicationSite": "Edit Publication Site",
|
||||||
|
"deletePublicationSite": "Delete Publication Site",
|
||||||
|
"publicationSiteSavedSuccess": "Publication site saved successfully",
|
||||||
|
"publicationSiteDeleteConfirm": "Are you sure you want to delete this publication site? This action cannot be undone.",
|
||||||
|
"publicationSiteDeletedSuccess": "Publication site deleted successfully",
|
||||||
|
"newPublicationSite": "New Publication Site",
|
||||||
|
"siteDetails": "Site Details",
|
||||||
|
"siteInformation": "Site Information",
|
||||||
|
"siteDomain": "Domain",
|
||||||
|
"siteCreated": "Created",
|
||||||
|
"siteUpdated": "Updated",
|
||||||
|
"failedToLoadSite": "Failed to load site",
|
||||||
|
"sitePages": "Pages",
|
||||||
|
"noPagesYet": "No pages yet",
|
||||||
|
"createFirstPage": "Create your first page to get started",
|
||||||
|
"failedToLoadPages": "Failed to load pages",
|
||||||
|
"fileManagement": "File Management",
|
||||||
|
"siteFiles": "Files",
|
||||||
|
"siteFolder": "Folder",
|
||||||
|
"siteRoot": "Root",
|
||||||
|
"noFilesUploadedYet": "No files uploaded yet",
|
||||||
|
"uploadFirstFile": "Upload your first file to get started",
|
||||||
|
"failedToLoadFiles": "Failed to load files",
|
||||||
|
"noFilesFoundInFolder": "No files found in the selected folder",
|
||||||
|
"fileActions": "File Actions",
|
||||||
|
"purgeFiles": "Purge Files",
|
||||||
|
"purgeFilesDescription": "Remove all uploaded files from the site",
|
||||||
|
"deploySite": "Deploy Site",
|
||||||
|
"deploySiteDescription": "Upload and deploy a new version from ZIP archive",
|
||||||
|
"confirmPurge": "Confirm Purge",
|
||||||
|
"purgeFilesConfirm": "This will permanently delete all files uploaded to this site. This action cannot be undone. Are you sure you want to continue?",
|
||||||
|
"purgeAllFiles": "Purge All Files",
|
||||||
|
"allFilesPurgedSuccess": "All files purged successfully",
|
||||||
|
"failedToPurgeFiles": "Failed to purge files: {}",
|
||||||
|
"siteDeployedSuccess": "Site deployed successfully",
|
||||||
|
"failedToDeploySite": "Failed to deploy site: {}",
|
||||||
|
"createPage": "Create Page",
|
||||||
|
"editPage": "Edit Page",
|
||||||
|
"pageType": "Page Type",
|
||||||
|
"htmlPage": "HTML Page",
|
||||||
|
"redirectPage": "Redirect Page",
|
||||||
|
"pageTypeRequired": "Please select a page type",
|
||||||
|
"pagePath": "Page Path",
|
||||||
|
"pagePathHint": "/about, /contact, etc.",
|
||||||
|
"pagePathRequired": "Please enter a page path",
|
||||||
|
"pagePathInvalid": "Page path can only contain letters, numbers, hyphens, underscores, and slashes",
|
||||||
|
"pagePathMustStartWithSlash": "Page path must start with /",
|
||||||
|
"pagePathNoConsecutiveSlashes": "Page path cannot have consecutive slashes",
|
||||||
|
"pageTitle": "Page Title",
|
||||||
|
"pageTitleHint": "About Us, Contact, etc.",
|
||||||
|
"pageTitleRequired": "Please enter a page title",
|
||||||
|
"pageContentHtml": "Page Content (HTML)",
|
||||||
|
"pageContentHint": "<h1>Hello World</h1><p>This is my page content...</p>",
|
||||||
|
"pageContentRequired": "Please enter HTML content for the page",
|
||||||
|
"redirectTarget": "Redirect Target",
|
||||||
|
"redirectTargetHint": "/new-page, https://example.com, etc.",
|
||||||
|
"redirectTargetRequired": "Please enter a redirect target",
|
||||||
|
"redirectTargetInvalid": "Target must be a relative path (/) or absolute URL (http/https)",
|
||||||
|
"deletePage": "Delete Page",
|
||||||
|
"deletePageConfirm": "Are you sure you want to delete this page?",
|
||||||
|
"savePage": "Save Page",
|
||||||
|
"pageCreatedSuccess": "Page created successfully",
|
||||||
|
"pageUpdatedSuccess": "Page updated successfully",
|
||||||
|
"pageDeletedSuccess": "Page deleted successfully",
|
||||||
|
"uploadFiles": "Upload Files",
|
||||||
|
"uploadPath": "Upload Path",
|
||||||
|
"uploadPathHint": "/ (root) or /assets/images/",
|
||||||
|
"uploadPathRequired": "Please enter an upload path",
|
||||||
|
"uploadPathMustStartWithSlash": "Path must start with /",
|
||||||
|
"uploadPathNoSpaces": "Path cannot contain spaces",
|
||||||
|
"uploadPathNoConsecutiveSlashes": "Path cannot have consecutive slashes",
|
||||||
|
"percentCompleted": "{}% completed",
|
||||||
|
"filesToUpload": "{} files to upload",
|
||||||
|
"fileSizeKb": "Size: {} KB",
|
||||||
|
"uploadingEllipsis": "Uploading...",
|
||||||
|
"uploadFilesCount": {
|
||||||
|
"one": "Upload {} File",
|
||||||
|
"other": "Upload {} Files"
|
||||||
|
},
|
||||||
|
"allUploadsCompleted": "All uploads completed",
|
||||||
|
"someUploadsFailed": "Some uploads failed",
|
||||||
|
"uploadingInProgress": "Uploading in progress",
|
||||||
|
"readyToUpload": "Ready to upload",
|
||||||
|
"allFilesUploadedSuccess": "All files uploaded successfully",
|
||||||
|
"lotteryLastNumberSpecial": "The last selected number will be your special number.",
|
||||||
|
"lotteryMultiplierRequired": "Please enter a multiplier",
|
||||||
|
"lotteryMultiplierRange": "Multiplier must be between 1 and 10",
|
||||||
|
"dropToShare": "Drop to share"
|
||||||
}
|
}
|
||||||
@@ -164,8 +164,6 @@
|
|||||||
"checkInResultLevel3": "Good Luck",
|
"checkInResultLevel3": "Good Luck",
|
||||||
"checkInResultLevel4": "Best Luck",
|
"checkInResultLevel4": "Best Luck",
|
||||||
"checkInActivityTitle": "{} checked in on {} and got a {}",
|
"checkInActivityTitle": "{} checked in on {} and got a {}",
|
||||||
"eventCalander": "Event Calander",
|
|
||||||
"eventCalanderEmpty": "No events on that day.",
|
|
||||||
"fortuneGraph": "Fortune Trend",
|
"fortuneGraph": "Fortune Trend",
|
||||||
"noFortuneData": "No fortune data available for this month.",
|
"noFortuneData": "No fortune data available for this month.",
|
||||||
"creatorHub": "Creator Hub",
|
"creatorHub": "Creator Hub",
|
||||||
@@ -752,21 +750,6 @@
|
|||||||
"rename": "Rename",
|
"rename": "Rename",
|
||||||
"markAsSensitive": "Mark as Sensitive",
|
"markAsSensitive": "Mark as Sensitive",
|
||||||
"fileName": "File name",
|
"fileName": "File name",
|
||||||
"sensitiveCategories": {
|
|
||||||
"language": "Language",
|
|
||||||
"sexualContent": "Sexual Content",
|
|
||||||
"violence": "Violence",
|
|
||||||
"profanity": "Profanity",
|
|
||||||
"hateSpeech": "Hate Speech",
|
|
||||||
"racism": "Racism",
|
|
||||||
"adultContent": "Adult Content",
|
|
||||||
"drugAbuse": "Drug Abuse",
|
|
||||||
"alcoholAbuse": "Alcohol Abuse",
|
|
||||||
"gambling": "Gambling",
|
|
||||||
"selfHarm": "Self-harm",
|
|
||||||
"childAbuse": "Child Abuse",
|
|
||||||
"other": "Other"
|
|
||||||
},
|
|
||||||
"poll": "Poll",
|
"poll": "Poll",
|
||||||
"pollsRecent": "Recent Polls",
|
"pollsRecent": "Recent Polls",
|
||||||
"pollCreateNew": "Create New",
|
"pollCreateNew": "Create New",
|
||||||
@@ -1075,5 +1058,421 @@
|
|||||||
"deleteRecycledFiles": "Delete Recycled Files",
|
"deleteRecycledFiles": "Delete Recycled Files",
|
||||||
"recycledFilesDeleted": "Recycled files deleted successfully",
|
"recycledFilesDeleted": "Recycled files deleted successfully",
|
||||||
"failedToDeleteRecycledFiles": "Failed to delete recycled files",
|
"failedToDeleteRecycledFiles": "Failed to delete recycled files",
|
||||||
"upload": "Upload"
|
"upload": "Upload",
|
||||||
|
"deleteMessage": "Delete Message",
|
||||||
|
"deleteMessageConfirmation": "Are you sure you want to delete this message?",
|
||||||
|
"customReaction": "Custom Reaction",
|
||||||
|
"customReactions": "Custom Reactions",
|
||||||
|
"stickerPlaceholder": "Sticker Placeholder",
|
||||||
|
"reactionAttitude": "Reaction Attitude",
|
||||||
|
"addReaction": "Add Reaction",
|
||||||
|
"eventCalendar": "Event Calendar",
|
||||||
|
"eventCalendarEmpty": "No events on that day.",
|
||||||
|
"walletStats": "Wallet Statistics",
|
||||||
|
"totalTransactions": "Total Transactions",
|
||||||
|
"totalOrders": "Total Orders",
|
||||||
|
"totalIncome": "Total Income",
|
||||||
|
"totalOutgoing": "Total Outgoing",
|
||||||
|
"netBalance": "Net Balance",
|
||||||
|
"messageUpdateLinks": "Server generated links previews",
|
||||||
|
"messageUpdateEdited": "Edited a message",
|
||||||
|
"settingsCardBackgroundOpacity": "Card Background Opacity",
|
||||||
|
"settingsThemeMode": "Theme Mode",
|
||||||
|
"settingsThemeModeSystem": "System",
|
||||||
|
"settingsThemeModeLight": "Light",
|
||||||
|
"settingsThemeModeDark": "Dark",
|
||||||
|
"enterPin": "Enter your PIN code",
|
||||||
|
"chatReplyingTo": "Replying to {}",
|
||||||
|
"chatForwarding": "Forwarding message",
|
||||||
|
"chatEditing": "Editing message",
|
||||||
|
"chatNoContent": "No content",
|
||||||
|
"sensitiveCategories": {
|
||||||
|
"language": "Language",
|
||||||
|
"sexualContent": "Sexual Content",
|
||||||
|
"violence": "Violence",
|
||||||
|
"profanity": "Profanity",
|
||||||
|
"hateSpeech": "Hate Speech",
|
||||||
|
"racism": "Racism",
|
||||||
|
"adultContent": "Adult Content",
|
||||||
|
"drugAbuse": "Drug Abuse",
|
||||||
|
"alcoholAbuse": "Alcohol Abuse",
|
||||||
|
"gambling": "Gambling",
|
||||||
|
"selfHarm": "Self-harm",
|
||||||
|
"childAbuse": "Child Abuse",
|
||||||
|
"other": "Other"
|
||||||
|
},
|
||||||
|
"Searching...": "Searching...",
|
||||||
|
"searchError": "Search failed. Please try again.",
|
||||||
|
"tryDifferentKeywords": "Try different keywords or remove search filters",
|
||||||
|
"settingsWindowOpacity": "Window Opacity",
|
||||||
|
"messageContent": "Message Content",
|
||||||
|
"updateAvailable": "Update available",
|
||||||
|
"noChangelogProvided": "No changelog provided.",
|
||||||
|
"useSecondarySourceForDownload": "Use secondary source for download",
|
||||||
|
"installUpdate": "Install update",
|
||||||
|
"openReleasePage": "Open release page",
|
||||||
|
"postCompose": "Compose Post",
|
||||||
|
"postPublish": "Publish Post",
|
||||||
|
"restoreDraftTitle": "Restore Draft",
|
||||||
|
"restoreDraftMessage": "A draft was found. Do you want to restore it?",
|
||||||
|
"draft": "Draft",
|
||||||
|
"purchaseGift": "Purchase Gift",
|
||||||
|
"selectRecipient": "Select Recipient",
|
||||||
|
"changeRecipient": "Change Recipient",
|
||||||
|
"addMessage": "Add Message",
|
||||||
|
"skipRecipient": "Skip Recipient",
|
||||||
|
"giftSubscriptions": "Gift Subscriptions",
|
||||||
|
"purchaseAGift": "Purchase a Gift",
|
||||||
|
"redeemAGift": "Redeem a Gift",
|
||||||
|
"giftHistory": "Gift History",
|
||||||
|
"sentGifts": "Sent Gifts",
|
||||||
|
"receivedGifts": "Received Gifts",
|
||||||
|
"noSentGifts": "No sent gifts",
|
||||||
|
"noReceivedGifts": "No received gifts",
|
||||||
|
"stellarGift": "Stellar Gift",
|
||||||
|
"novaGift": "Nova Gift",
|
||||||
|
"supernovaGift": "Supernova Gift",
|
||||||
|
"sameAsMembership": "Same as membership",
|
||||||
|
"enterGiftCodeToRedeem": "Enter gift code to redeem",
|
||||||
|
"enterGiftCode": "Enter gift code",
|
||||||
|
"giftPurchased": "Gift Purchased!",
|
||||||
|
"shareCodeWithRecipient": "Share this code with the recipient to redeem the gift.",
|
||||||
|
"openGiftAnyoneCanRedeem": "This is an open gift that anyone can redeem.",
|
||||||
|
"ok": "OK",
|
||||||
|
"selectedRecipient": "Selected recipient",
|
||||||
|
"noRecipientSelected": "No recipient selected",
|
||||||
|
"thisWillBeAnOpenGift": "This will be an open gift",
|
||||||
|
"personalMessage": "Personal Message",
|
||||||
|
"addPersonalMessageForRecipient": "Add a personal message for the recipient",
|
||||||
|
"giftStatusCreated": "Created",
|
||||||
|
"giftStatusSent": "Sent",
|
||||||
|
"giftStatusRedeemed": "Redeemed",
|
||||||
|
"giftStatusCancelled": "Cancelled",
|
||||||
|
"giftStatusExpired": "Expired",
|
||||||
|
"giftStatusUnknown": "Unknown",
|
||||||
|
"giftCodeCopiedToClipboard": "Gift code copied to clipboard",
|
||||||
|
"codeLabel": "Code: ",
|
||||||
|
"subscriptionLabel": "Subscription: ",
|
||||||
|
"toLabel": "To: ",
|
||||||
|
"fromLabel": "From: ",
|
||||||
|
"messageLabel": "Message: ",
|
||||||
|
"giftRedeemed": "Gift Redeemed!",
|
||||||
|
"giftRedeemedSuccessfully": "You have successfully redeemed the gift. Your new subscription is now active.",
|
||||||
|
"cancelGift": "Cancel Gift",
|
||||||
|
"cancelGiftConfirm": "Are you sure you want to cancel this gift? This action cannot be undone.",
|
||||||
|
"giftCancelledSuccessfully": "Gift cancelled successfully",
|
||||||
|
"createFund": "Create Fund",
|
||||||
|
"fundAmount": "Fund Amount",
|
||||||
|
"enterAmount": "Enter Amount",
|
||||||
|
"selectCurrency": "Select Currency",
|
||||||
|
"splitType": "Split Type",
|
||||||
|
"evenSplit": "Even Split",
|
||||||
|
"equalAmountEach": "Equal amount for each recipient",
|
||||||
|
"randomSplit": "Random Split",
|
||||||
|
"randomAmountEach": "Random amount for each recipient",
|
||||||
|
"recipientCount": "Recipient Count",
|
||||||
|
"numberOfRecipients": "Number of Recipients",
|
||||||
|
"addPersonalMessageForRecipients": "Add a personal message for recipients",
|
||||||
|
"invalidAmount": "Invalid amount",
|
||||||
|
"invalidRecipientCount": "Invalid recipient count",
|
||||||
|
"fundOverview": "Fund Overview",
|
||||||
|
"totalFundsSent": "Total Funds Sent",
|
||||||
|
"totalFundsReceived": "Total Funds Received",
|
||||||
|
"transactions": "Transactions",
|
||||||
|
"myFunds": "My Funds",
|
||||||
|
"availableFunds": "Available Funds",
|
||||||
|
"fundStatusCreated": "Created",
|
||||||
|
"fundStatusPartial": "Partially Claimed",
|
||||||
|
"fundStatusCompleted": "Fully Claimed",
|
||||||
|
"fundStatusExpired": "Expired",
|
||||||
|
"fundStatusUnknown": "Unknown",
|
||||||
|
"recipients": "Recipients",
|
||||||
|
"fundClaimedSuccessfully": "Fund claimed successfully!",
|
||||||
|
"claim": "Claim",
|
||||||
|
"noFundsCreated": "No funds created yet",
|
||||||
|
"createYourFirstFund": "Create your first fund to get started",
|
||||||
|
"noAvailableFunds": "No available funds",
|
||||||
|
"fundsWillAppearHere": "Funds you can claim will appear here",
|
||||||
|
"fundCreatedSuccessfully": "Fund created successfully!",
|
||||||
|
"selectRecipients": "Select Recipients",
|
||||||
|
"noRecipientsSelected": "No recipients selected",
|
||||||
|
"selectRecipientsToSendFund": "Select recipients to send the fund to",
|
||||||
|
"addRecipient": "Add Recipient",
|
||||||
|
"addMoreRecipients": "Add More Recipients",
|
||||||
|
"transactionDetails": "Transaction Details",
|
||||||
|
"remarks": "Remarks",
|
||||||
|
"payer": "Payer",
|
||||||
|
"payee": "Payee",
|
||||||
|
"transactionType": "Transaction Type",
|
||||||
|
"transfer": "Transfer",
|
||||||
|
"payment": "Payment",
|
||||||
|
"systemWallet": "System Wallet",
|
||||||
|
"date": "Date",
|
||||||
|
"createTransfer": "Create Transfer",
|
||||||
|
"transferAmount": "Transfer Amount",
|
||||||
|
"selectPayee": "Select Payee",
|
||||||
|
"selectedPayee": "Selected Payee",
|
||||||
|
"noPayeeSelected": "No payee selected",
|
||||||
|
"selectPayeeToTransfer": "Select payee to transfer to",
|
||||||
|
"addRemark": "Add Remark",
|
||||||
|
"transferRemark": "Transfer Remark",
|
||||||
|
"addRemarkForTransfer": "Add remark for transfer",
|
||||||
|
"enterPinToConfirmTransfer": "Enter your 6-digit PIN to confirm transfer",
|
||||||
|
"transferCreatedSuccessfully": "Transfer created successfully!",
|
||||||
|
"postUpdate": "Update",
|
||||||
|
"fileMetadata": "File Metadata",
|
||||||
|
"resend": "Resend",
|
||||||
|
"fileInfoTitle": "File Information",
|
||||||
|
"download": "Download",
|
||||||
|
"info": "Info",
|
||||||
|
"noStickers": "No Stickers",
|
||||||
|
"noStickersInPack": "This pack does not contains stickers",
|
||||||
|
"noStickerPacks": "No Sticker Packs",
|
||||||
|
"refresh": "Refresh",
|
||||||
|
"spoiler": "Spoiler",
|
||||||
|
"activityHeatmap": "Activity Heatmap",
|
||||||
|
"custom": "Custom",
|
||||||
|
"usernameColor": "Username Color",
|
||||||
|
"colorType": "Color Type",
|
||||||
|
"plain": "Plain",
|
||||||
|
"gradient": "Gradient",
|
||||||
|
"colorValue": "Color Value",
|
||||||
|
"gradientDirection": "Gradient Direction",
|
||||||
|
"gradientDirectionToRight": "To Right",
|
||||||
|
"gradientDirectionToLeft": "To Left",
|
||||||
|
"gradientDirectionToBottom": "To Bottom",
|
||||||
|
"gradientDirectionToTop": "To Top",
|
||||||
|
"gradientDirectionToBottomRight": "To Bottom Right",
|
||||||
|
"gradientDirectionToBottomLeft": "To Bottom Left",
|
||||||
|
"gradientDirectionToTopRight": "To Top Right",
|
||||||
|
"gradientDirectionToTopLeft": "To Top Left",
|
||||||
|
"gradientColors": "Gradient Colors",
|
||||||
|
"color": "Color",
|
||||||
|
"addColor": "Add Color",
|
||||||
|
"availableWithYourPlan": "Available with your plan",
|
||||||
|
"upgradeRequired": "Upgrade required",
|
||||||
|
"settingsDisableAnimation": "Disable Animation",
|
||||||
|
"addTag": "Add Tag",
|
||||||
|
"accountConnectionProviderSpotify": "Spotify",
|
||||||
|
"accountConnectionProviderSteam": "Steam",
|
||||||
|
"timezoneNotFound": "Time zone not found",
|
||||||
|
"awardPoints": "Awarded {} points",
|
||||||
|
"postFeaturedOn": "Post featured on {}",
|
||||||
|
"messageSentAt": "Sent at {}",
|
||||||
|
"myTickets": "My Tickets",
|
||||||
|
"drawHistory": "Draw History",
|
||||||
|
"lottery": "Lottery",
|
||||||
|
"noLotteryTickets": "No lottery tickets yet",
|
||||||
|
"buyYourFirstTicket": "Buy your first lottery ticket to get started!",
|
||||||
|
"buyTicket": "Buy Ticket",
|
||||||
|
"ticketNumbers": "Numbers: {}, Special: {}",
|
||||||
|
"cost": "Cost",
|
||||||
|
"multiplier": "Multiplier",
|
||||||
|
"prizeWon": "Prize Won",
|
||||||
|
"pending": "Pending",
|
||||||
|
"drawn": "Drawn",
|
||||||
|
"won": "Won",
|
||||||
|
"lost": "Lost",
|
||||||
|
"noDrawHistory": "No draw history yet",
|
||||||
|
"buyLotteryTicket": "Buy Lottery Ticket",
|
||||||
|
"selectNumbers": "Select Numbers",
|
||||||
|
"select5UniqueNumbers": "Select 5 unique numbers",
|
||||||
|
"selectSpecialNumber": "Select Special Number",
|
||||||
|
"selectMultiplier": "Select Multiplier",
|
||||||
|
"baseCost": "Base Cost",
|
||||||
|
"totalCost": "Total Cost",
|
||||||
|
"prizeStructure": "Prize Structure",
|
||||||
|
"enterPinToConfirmPurchase": "Enter your PIN to confirm purchase",
|
||||||
|
"ticketPurchasedSuccessfully": "Ticket purchased successfully!",
|
||||||
|
"winningNumbers": "Winning Numbers",
|
||||||
|
"specialNumber": "Special Number",
|
||||||
|
"totalTickets": "Total Tickets",
|
||||||
|
"totalWinners": "Total Winners",
|
||||||
|
"prizePool": "Prize Pool",
|
||||||
|
"enterPinToConfirmPayment": "Enter your PIN code to confirm payment",
|
||||||
|
"purchase": "Purchase",
|
||||||
|
"multiplierLabel": "Multiplier",
|
||||||
|
"specialOnly": "Special Only",
|
||||||
|
"matches": "Matches",
|
||||||
|
"thoughtDefaultTopic": "Reflection",
|
||||||
|
"thoughtAiName": "SN-chan",
|
||||||
|
"thoughtUserName": "You",
|
||||||
|
"thoughtStreamingHint": "Sn-chan is thinking...",
|
||||||
|
"thoughtInputHint": "Ask sn-chan anything...",
|
||||||
|
"thoughtNewConversation": "Start New Conversation",
|
||||||
|
"thoughtParseError": "Failed to parse AI response",
|
||||||
|
"thoughtFunctionCall": "Use {}",
|
||||||
|
"aiThought": "AI Thought",
|
||||||
|
"aiThoughtTitle": "Let sn-chan think",
|
||||||
|
"postReferenceUnavailable": "Referenced post is unavailable",
|
||||||
|
"fabLocation": "FAB Location",
|
||||||
|
"activities": "Activities",
|
||||||
|
"presenceTypeGaming": "Playing",
|
||||||
|
"presenceTypeMusic": "Listening to Music",
|
||||||
|
"presenceTypeWorkout": "Working out",
|
||||||
|
"articleCompose": "Compose Article",
|
||||||
|
"backToHub": "Back to Hub",
|
||||||
|
"advancedFilters": "Advanced Filters",
|
||||||
|
"searchPosts": "Search Posts",
|
||||||
|
"sortBy": "Sort by",
|
||||||
|
"fromDate": "From Date",
|
||||||
|
"toDate": "To Date",
|
||||||
|
"popularity": "Popularity",
|
||||||
|
"descendingOrder": "Descending Order",
|
||||||
|
"selectDate": "Select Date",
|
||||||
|
"pinnedPosts": "Pinned Posts",
|
||||||
|
"customReactionHint": "Custom Reaction allow you to use user uploaded stickers as the symbol of the reaction for the post. Exclusive for Stellar Program members.",
|
||||||
|
"publicationSites": "Publication Sites",
|
||||||
|
"uploadTasks": "Upload Tasks",
|
||||||
|
"thoughtFunctionCallBegin": "Calling tool {}",
|
||||||
|
"thoughtFunctionCallFinish": "{} responded",
|
||||||
|
"thoughtUnpaidHint": "Thinking unavaiable due to unpaid orders",
|
||||||
|
"more": "More",
|
||||||
|
"collapse": "Collapse",
|
||||||
|
"pollConfirmDiscard": "Are you sure you want to leave? All the poll data you're editing will not be saved.",
|
||||||
|
"discard": "Discard",
|
||||||
|
"fund": "Fund",
|
||||||
|
"fundsRecent": "Recent Funds",
|
||||||
|
"fundCreateNew": "Create New",
|
||||||
|
"fundCreateNewHint": "Create a new fund for your message. Select recipients and amount.",
|
||||||
|
"amountOfSplits": "Amount of Splits",
|
||||||
|
"enterNumberOfSplits": "Enter Splits Amount",
|
||||||
|
"orCreateWith": "Or\ncreate with",
|
||||||
|
"unindexedFiles": "Unindexed files",
|
||||||
|
"folder": "Folder",
|
||||||
|
"clearCompleted": "Clear Completed",
|
||||||
|
"uploadSuccess": "Upload successful!",
|
||||||
|
"wouldYouLikeToViewFile": "Would you like to view the file?",
|
||||||
|
"contentCantEmpty": "Content cannot be empty",
|
||||||
|
"features": "Features",
|
||||||
|
"unnamed": "Unnamed",
|
||||||
|
"fundEnvelopeLoadFailed": "Failed to load fund envelope",
|
||||||
|
"fundEnvelope": "Fund Envelope",
|
||||||
|
"fundEnvelopeRemaining": "Remaining: {} {}",
|
||||||
|
"fundEnvelopeSplit": "Split: {}",
|
||||||
|
"fundEnvelopeSplitEvenly": "Evenly",
|
||||||
|
"fundEnvelopeSplitRandomly": "Randomly",
|
||||||
|
"fundEnvelopeClaimSuccess": "Fund claimed successfully!",
|
||||||
|
"fundEnvelopeStatusCreated": "Created",
|
||||||
|
"fundEnvelopeStatusPartial": "Partially Claimed",
|
||||||
|
"fundEnvelopeStatusCompleted": "Fully Claimed",
|
||||||
|
"fundEnvelopeStatusExpired": "Expired",
|
||||||
|
"fundEnvelopeStatusUnknown": "Unknown",
|
||||||
|
"fundEnvelopeRecipients": "Recipients ({}/{} claimed)",
|
||||||
|
"fundEnvelopeExpiredDaysAgo": {
|
||||||
|
"one": "Expired {} day ago",
|
||||||
|
"other": "Expired {} days ago"
|
||||||
|
},
|
||||||
|
"fundEnvelopeExpiresSoon": "Expires soon",
|
||||||
|
"fundEnvelopeExpiresInHours": {
|
||||||
|
"one": "Expires in {} hour",
|
||||||
|
"other": "Expires in {} hours"
|
||||||
|
},
|
||||||
|
"fundEnvelopeExpiresInDays": {
|
||||||
|
"one": "Expires in {} day",
|
||||||
|
"other": "Expires in {} days"
|
||||||
|
},
|
||||||
|
"fundEnvelopeRemainingWithSplits": "{} {} / {} splits",
|
||||||
|
"fundEnvelopeUnknownUser": "Unknown User",
|
||||||
|
"deleteSite": "Delete Site",
|
||||||
|
"deleteSiteConfirm": "Are you sure you want to delete this site?",
|
||||||
|
"siteDeletedSuccess": "Site deleted successfully",
|
||||||
|
"siteSlug": "Slug",
|
||||||
|
"siteSlugHint": "my-site",
|
||||||
|
"siteSlugRequired": "Please enter a slug",
|
||||||
|
"siteSlugInvalid": "Slug can only contain lowercase letters, numbers, and dashes",
|
||||||
|
"siteName": "Site Name",
|
||||||
|
"siteNameHint": "My Publication Site",
|
||||||
|
"siteNameRequired": "Please enter a site name",
|
||||||
|
"siteMode": "Mode",
|
||||||
|
"siteModeFullyManaged": "Fully Managed",
|
||||||
|
"siteModeSelfManaged": "Self-Managed",
|
||||||
|
"editPublicationSite": "Edit Publication Site",
|
||||||
|
"deletePublicationSite": "Delete Publication Site",
|
||||||
|
"publicationSiteSavedSuccess": "Publication site saved successfully",
|
||||||
|
"publicationSiteDeleteConfirm": "Are you sure you want to delete this publication site? This action cannot be undone.",
|
||||||
|
"publicationSiteDeletedSuccess": "Publication site deleted successfully",
|
||||||
|
"newPublicationSite": "New Publication Site",
|
||||||
|
"siteDetails": "Site Details",
|
||||||
|
"siteInformation": "Site Information",
|
||||||
|
"siteDomain": "Domain",
|
||||||
|
"siteCreated": "Created",
|
||||||
|
"siteUpdated": "Updated",
|
||||||
|
"failedToLoadSite": "Failed to load site",
|
||||||
|
"sitePages": "Pages",
|
||||||
|
"noPagesYet": "No pages yet",
|
||||||
|
"createFirstPage": "Create your first page to get started",
|
||||||
|
"failedToLoadPages": "Failed to load pages",
|
||||||
|
"fileManagement": "File Management",
|
||||||
|
"siteFiles": "Files",
|
||||||
|
"siteFolder": "Folder",
|
||||||
|
"siteRoot": "Root",
|
||||||
|
"noFilesUploadedYet": "No files uploaded yet",
|
||||||
|
"uploadFirstFile": "Upload your first file to get started",
|
||||||
|
"failedToLoadFiles": "Failed to load files",
|
||||||
|
"noFilesFoundInFolder": "No files found in the selected folder",
|
||||||
|
"fileActions": "File Actions",
|
||||||
|
"purgeFiles": "Purge Files",
|
||||||
|
"purgeFilesDescription": "Remove all uploaded files from the site",
|
||||||
|
"deploySite": "Deploy Site",
|
||||||
|
"deploySiteDescription": "Upload and deploy a new version from ZIP archive",
|
||||||
|
"confirmPurge": "Confirm Purge",
|
||||||
|
"purgeFilesConfirm": "This will permanently delete all files uploaded to this site. This action cannot be undone. Are you sure you want to continue?",
|
||||||
|
"purgeAllFiles": "Purge All Files",
|
||||||
|
"allFilesPurgedSuccess": "All files purged successfully",
|
||||||
|
"failedToPurgeFiles": "Failed to purge files: {}",
|
||||||
|
"siteDeployedSuccess": "Site deployed successfully",
|
||||||
|
"failedToDeploySite": "Failed to deploy site: {}",
|
||||||
|
"createPage": "Create Page",
|
||||||
|
"editPage": "Edit Page",
|
||||||
|
"pageType": "Page Type",
|
||||||
|
"htmlPage": "HTML Page",
|
||||||
|
"redirectPage": "Redirect Page",
|
||||||
|
"pageTypeRequired": "Please select a page type",
|
||||||
|
"pagePath": "Page Path",
|
||||||
|
"pagePathHint": "/about, /contact, etc.",
|
||||||
|
"pagePathRequired": "Please enter a page path",
|
||||||
|
"pagePathInvalid": "Page path can only contain letters, numbers, hyphens, underscores, and slashes",
|
||||||
|
"pagePathMustStartWithSlash": "Page path must start with /",
|
||||||
|
"pagePathNoConsecutiveSlashes": "Page path cannot have consecutive slashes",
|
||||||
|
"pageTitle": "Page Title",
|
||||||
|
"pageTitleHint": "About Us, Contact, etc.",
|
||||||
|
"pageTitleRequired": "Please enter a page title",
|
||||||
|
"pageContentHtml": "Page Content (HTML)",
|
||||||
|
"pageContentHint": "<h1>Hello World</h1><p>This is my page content...</p>",
|
||||||
|
"pageContentRequired": "Please enter HTML content for the page",
|
||||||
|
"redirectTarget": "Redirect Target",
|
||||||
|
"redirectTargetHint": "/new-page, https://example.com, etc.",
|
||||||
|
"redirectTargetRequired": "Please enter a redirect target",
|
||||||
|
"redirectTargetInvalid": "Target must be a relative path (/) or absolute URL (http/https)",
|
||||||
|
"deletePage": "Delete Page",
|
||||||
|
"deletePageConfirm": "Are you sure you want to delete this page?",
|
||||||
|
"savePage": "Save Page",
|
||||||
|
"pageCreatedSuccess": "Page created successfully",
|
||||||
|
"pageUpdatedSuccess": "Page updated successfully",
|
||||||
|
"pageDeletedSuccess": "Page deleted successfully",
|
||||||
|
"uploadFiles": "Upload Files",
|
||||||
|
"uploadPath": "Upload Path",
|
||||||
|
"uploadPathHint": "/ (root) or /assets/images/",
|
||||||
|
"uploadPathRequired": "Please enter an upload path",
|
||||||
|
"uploadPathMustStartWithSlash": "Path must start with /",
|
||||||
|
"uploadPathNoSpaces": "Path cannot contain spaces",
|
||||||
|
"uploadPathNoConsecutiveSlashes": "Path cannot have consecutive slashes",
|
||||||
|
"percentCompleted": "{}% completed",
|
||||||
|
"filesToUpload": "{} files to upload",
|
||||||
|
"fileSizeKb": "Size: {} KB",
|
||||||
|
"uploadingEllipsis": "Uploading...",
|
||||||
|
"uploadFilesCount": {
|
||||||
|
"one": "Upload {} File",
|
||||||
|
"other": "Upload {} Files"
|
||||||
|
},
|
||||||
|
"allUploadsCompleted": "All uploads completed",
|
||||||
|
"someUploadsFailed": "Some uploads failed",
|
||||||
|
"uploadingInProgress": "Uploading in progress",
|
||||||
|
"readyToUpload": "Ready to upload",
|
||||||
|
"allFilesUploadedSuccess": "All files uploaded successfully",
|
||||||
|
"lotteryLastNumberSpecial": "The last selected number will be your special number.",
|
||||||
|
"lotteryMultiplierRequired": "Please enter a multiplier",
|
||||||
|
"lotteryMultiplierRange": "Multiplier must be between 1 and 10",
|
||||||
|
"dropToShare": "Drop to share"
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -164,177 +164,175 @@
|
|||||||
"checkInResultLevel3": "吉",
|
"checkInResultLevel3": "吉",
|
||||||
"checkInResultLevel4": "大吉",
|
"checkInResultLevel4": "大吉",
|
||||||
"checkInActivityTitle": "{} 於 {} 簽到,獲 {} 籤",
|
"checkInActivityTitle": "{} 於 {} 簽到,獲 {} 籤",
|
||||||
"eventCalander": "Event Calander",
|
"fortuneGraph": "运程谶",
|
||||||
"eventCalanderEmpty": "No events on that day.",
|
"noFortuneData": "本月气数未显。",
|
||||||
"fortuneGraph": "Fortune Trend",
|
"creatorHub": "著書閣",
|
||||||
"noFortuneData": "No fortune data available for this month.",
|
"creatorHubDescription": "司理帖文、析策諸務。",
|
||||||
"creatorHub": "Creator Hub",
|
"developerPortal": "匠造司",
|
||||||
"creatorHubDescription": "Manage posts, analytics, and more.",
|
"developerPortalDescription": "築基於 Solar Network™。",
|
||||||
"developerPortal": "Developer Portal",
|
"statusCreateHint": "何所思?可添近況。",
|
||||||
"developerPortalDescription": "Build with Solar Network™.",
|
"statusCreate": "增境況",
|
||||||
"statusCreateHint": "What's on your mind? Add a status.",
|
"statusUpdate": "更境況",
|
||||||
"statusCreate": "Add a Status",
|
"statusLabel": "心境",
|
||||||
"statusUpdate": "Update Status",
|
"statusAttitude": "意態",
|
||||||
"statusLabel": "Status",
|
"attitudePositive": "昂揚",
|
||||||
"statusAttitude": "Attitude",
|
"attitudeNeutral": "平瀾",
|
||||||
"attitudePositive": "Positive",
|
"attitudeNegative": "消沉",
|
||||||
"attitudeNeutral": "Neutral",
|
"statusInvisible": "隱跡",
|
||||||
"attitudeNegative": "Negative",
|
"statusInvisibleDescription": "汝之形跡不現於人前。",
|
||||||
"statusInvisible": "Invisible",
|
"statusNotDisturb": "勿擾",
|
||||||
"statusInvisibleDescription": "Your will be showing as offline to others.",
|
"statusNotDisturbDescription": "急報皆止。",
|
||||||
"statusNotDisturb": "Do Not Disturb",
|
"statusClearTime": "滌除於",
|
||||||
"statusNotDisturbDescription": "Push notification will be disabled.",
|
"statusNoAutoClear": "不自滌",
|
||||||
"statusClearTime": "Cleared At",
|
"online": "在朝",
|
||||||
"statusNoAutoClear": "Do not auto clear",
|
"offline": "在野",
|
||||||
"online": "Online",
|
"status": "心境",
|
||||||
"offline": "Offline",
|
"statusActivityTitle": "{} 正於 {} {}",
|
||||||
"status": "Status",
|
"statusActivityEndedTitle": "{} 正於 {} {} 迄於 {}",
|
||||||
"statusActivityTitle": "{} is {} {}",
|
"appSettings": "應用設置",
|
||||||
"statusActivityEndedTitle": "{} is {} {} until {}",
|
"accountSettings": "賬戶設置",
|
||||||
"appSettings": "App Settings",
|
"settings": "設置",
|
||||||
"accountSettings": "Account Settings",
|
"language": "言語",
|
||||||
"settings": "Settings",
|
"accountLanguageHint": "此言語將行於電郵並推送告示。",
|
||||||
"language": "Language",
|
"settingsDisplayLanguage": "顯示言語",
|
||||||
"accountLanguageHint": "This language will be used for email and push notifications.",
|
"languageFollowSystem": "從系統之制",
|
||||||
"settingsDisplayLanguage": "Display Language",
|
"postsCreatedCount": "貼文",
|
||||||
"languageFollowSystem": "Follow System",
|
"stickerPacksCreatedCount": "貼札集",
|
||||||
"postsCreatedCount": "Posts",
|
"stickersCreatedCount": "貼札",
|
||||||
"stickerPacksCreatedCount": "Sticker Packs",
|
"upvoteReceived": "收擢",
|
||||||
"stickersCreatedCount": "Stickers",
|
"downvoteReceived": "收黜",
|
||||||
"upvoteReceived": "Upvotes Recieved",
|
"stickerPacks": "貼札集",
|
||||||
"downvoteReceived": "Downvotes Recieved",
|
"createStickerPack": "始創一貼札集",
|
||||||
"stickerPacks": "Sticker Packs",
|
"editStickerPack": "修訂貼札集",
|
||||||
"createStickerPack": "Create a Sticker Pack",
|
"deleteStickerPack": "革去貼札集",
|
||||||
"editStickerPack": "Edit Sticker Pack",
|
"deleteStickerPackHint": "決革去此貼札譜否?此令無可更赦。",
|
||||||
"deleteStickerPack": "Delete Sticker Pack",
|
"stickerPackPrefix": "首綴",
|
||||||
"deleteStickerPackHint": "Are you sure to delete this sticker pack? This action cannot be undone.",
|
"stickerPackPrefixHint": "此首綴將加於本帙諸貼札縮略名之前。",
|
||||||
"stickerPackPrefix": "Prefix",
|
"stickers": "貼札",
|
||||||
"stickerPackPrefixHint": "The prefix will be added before each stickers' slug in this pack.",
|
"createSticker": "始創一貼札",
|
||||||
"stickers": "Stickers",
|
"editSticker": "修訂貼札",
|
||||||
"createSticker": "Create a Sticker",
|
"deleteSticker": "革去貼札",
|
||||||
"editSticker": "Edit Sticker",
|
"deleteStickerHint": "確欲革去此貼札乎?此勢無可逆轉。",
|
||||||
"deleteSticker": "Delete Sticker",
|
"stickerImage": "圖像",
|
||||||
"deleteStickerHint": "Are you sure to delete this sticker? This action cannot be undone.",
|
"stickerSlug": "籤碼",
|
||||||
"stickerImage": "Image",
|
"stickerSlugHint": "此籤碼將聯題端以構貼札獨契。",
|
||||||
"stickerSlug": "Slug",
|
"dataEmpty": "此間尚虛。",
|
||||||
"stickerSlugHint": "The slug will be combined with the prefix to form the sticker's unique identifier.",
|
"pickFile": "擇一卷宗",
|
||||||
"dataEmpty": "Nothing's here yet.",
|
"uploading": "上呈中",
|
||||||
"pickFile": "Pick a file",
|
"uploadingProgress": "正呈 {} 於 {}",
|
||||||
"uploading": "Uploading",
|
"uploadAll": "全盤呈上",
|
||||||
"uploadingProgress": "Uploading {} of {}",
|
"stickerCopyPlaceholder": "摹寫虛位",
|
||||||
"uploadAll": "Upload All",
|
"realmSelection": "擇一界域",
|
||||||
"stickerCopyPlaceholder": "Copy Placeholder",
|
"individual": "獨詣",
|
||||||
"realmSelection": "Select a Realm",
|
"firstPostBadgeName": "處女作",
|
||||||
"individual": "Individual",
|
"firstPostBadgeDescription": "始發帖於 Solar Network",
|
||||||
"firstPostBadgeName": "First Post",
|
"popularPostBadgeName": "熱帖",
|
||||||
"firstPostBadgeDescription": "Created your first post on Solar Network",
|
"popularPostBadgeDescription": "君作得眾譽",
|
||||||
"popularPostBadgeName": "Popular Post",
|
"viralPostBadgeName": "洛陽紙",
|
||||||
"popularPostBadgeDescription": "Your post received significant engagement from the community",
|
"viralPostBadgeDescription": "君文傳抄殆遍",
|
||||||
"viralPostBadgeName": "Viral Post",
|
"helpfulCommentBadgeName": "裨益論",
|
||||||
"viralPostBadgeDescription": "Your post went viral and reached a wide audience",
|
"helpfulCommentBadgeDescription": "諸君以為斯論足以啟迪來者",
|
||||||
"helpfulCommentBadgeName": "Helpful Comment",
|
"newcomerBadgeName": "新客",
|
||||||
"helpfulCommentBadgeDescription": "Your comment was marked as helpful by others",
|
"newcomerBadgeDescription": "欣迎加入 Solar Network!請開始遊覽結緣",
|
||||||
"newcomerBadgeName": "Newcomer",
|
"contributorBadgeName": "資士",
|
||||||
"newcomerBadgeDescription": "Welcome to Solar Network! Start exploring and connecting",
|
"contributorBadgeDescription": "勤力貢獻於 Solar Network 社群",
|
||||||
"contributorBadgeName": "Contributor",
|
"expertBadgeName": "達人",
|
||||||
"contributorBadgeDescription": "Actively contributing to the Solar Network community",
|
"expertBadgeDescription": "以專精與厚獻見稱於世",
|
||||||
"expertBadgeName": "Expert",
|
"founderBadgeName": "肇基",
|
||||||
"expertBadgeDescription": "Recognized for your expertise and valuable contributions",
|
"founderBadgeDescription": "屬 Solar Network 草創先驅",
|
||||||
"founderBadgeName": "Founder",
|
"betaTesterBadgeName": "預勘師",
|
||||||
"founderBadgeDescription": "One of the earliest members of Solar Network",
|
"betaTesterBadgeDescription": "嘗輔試 Solar Network 於初創之境",
|
||||||
"betaTesterBadgeName": "Beta Tester",
|
"moderatorBadgeName": "持衡官",
|
||||||
"betaTesterBadgeDescription": "Helped test and improve Solar Network during beta",
|
"moderatorBadgeDescription": "協理談筵規矩與秩序",
|
||||||
"moderatorBadgeName": "Moderator",
|
"developerBadgeName": "開物者",
|
||||||
"moderatorBadgeDescription": "Helping maintain and moderate the community",
|
"developerBadgeDescription": "獻力於 Solar Network 之功業",
|
||||||
"developerBadgeName": "Developer",
|
"translatorBadgeName": "譯介士",
|
||||||
"developerBadgeDescription": "Contributing to Solar Network's development",
|
"translatorBadgeDescription": "助譯 Solar Network 為諸邦之言",
|
||||||
"translatorBadgeName": "Translator",
|
"wallet": "荷包",
|
||||||
"translatorBadgeDescription": "Helping translate Solar Network into different languages",
|
"walletCurrencyPoints": "新太陽點",
|
||||||
"wallet": "Wallet",
|
|
||||||
"walletCurrencyPoints": "New Solar Points",
|
|
||||||
"walletCurrencyShortPoints": "NSP",
|
"walletCurrencyShortPoints": "NSP",
|
||||||
"walletCurrencyGolds": "The Solar Dollars",
|
"walletCurrencyGolds": "太陽幣",
|
||||||
"walletCurrencyShortGolds": "NSD",
|
"walletCurrencyShortGolds": "NSD",
|
||||||
"retry": "Retry",
|
"retry": "復行",
|
||||||
"creatorHubUnselectedHint": "Pick / create a publisher to get started.",
|
"creatorHubUnselectedHint": "擇/創發布者以啟程。",
|
||||||
"relationships": "Relationships",
|
"relationships": "交誼錄",
|
||||||
"addFriend": "Send a Friend Request",
|
"addFriend": "送締交書",
|
||||||
"addFriendShort": "Add as Friend",
|
"addFriendShort": "結為知交",
|
||||||
"addFriendHint": "Add a friend to your relationship list.",
|
"addFriendHint": "添友於交誼錄中。",
|
||||||
"pendingRequest": "Pending",
|
"pendingRequest": "待決",
|
||||||
"waitingRequest": "Waiting",
|
"waitingRequest": "候音",
|
||||||
"relationshipStatusFriend": "Friend",
|
"relationshipStatusFriend": "知交",
|
||||||
"relationshipStatusBlocked": "Blocked",
|
"relationshipStatusBlocked": "已阻",
|
||||||
"blockUser": "Block User",
|
"blockUser": "禁此戶",
|
||||||
"unblockUser": "Unblock User",
|
"unblockUser": "解禁",
|
||||||
"friendRequestAccepted": "Accepted friend request from {}",
|
"friendRequestAccepted": "已納 {} 締交書",
|
||||||
"friendRequestDeclined": "Declined friend request from {}",
|
"friendRequestDeclined": "已謝 {} 締交書",
|
||||||
"requestExpiredIn": "Expired in {}",
|
"requestExpiredIn": "效期 {}",
|
||||||
"friendSentRequest": "Sent Friend Requests",
|
"friendSentRequest": "已送締交書",
|
||||||
"friendSentRequestEmpty": "No sent friend requests",
|
"friendSentRequestEmpty": "未送締交書",
|
||||||
"friendSentRequestHint": {
|
"friendSentRequestHint": {
|
||||||
"one": "{} friend request sent",
|
"one": "已送{}締交書",
|
||||||
"other": "{} friend requests sent"
|
"other": "已送{}締交書"
|
||||||
},
|
},
|
||||||
"levelingProgress": "Leveling Progress",
|
"levelingProgress": "修為進境",
|
||||||
"levelingProgressExperience": "{} EXP",
|
"levelingProgressExperience": "{} 修為",
|
||||||
"levelingProgressLevel": "Level {}",
|
"levelingProgressLevel": "第 {} 重",
|
||||||
"fileUploadingProgress": "Uploading file #{}: {}%",
|
"fileUploadingProgress": "傳輸第 {} 宗卷:{}%",
|
||||||
"removeChatMember": "Remove Chat Room Member",
|
"removeChatMember": "逐出談席",
|
||||||
"removeChatMemberHint": "Are you sure to remove this member from the room?",
|
"removeChatMemberHint": "確欲逐此客出談筵乎?",
|
||||||
"removeRealmMember": "Remove Realm Member",
|
"removeRealmMember": "革出界域",
|
||||||
"removeRealmMemberHint": "Are you sure to remove this member from the realm?",
|
"removeRealmMemberHint": "確欲革此員出界域乎?",
|
||||||
"memberRole": "Member Role",
|
"memberRole": "成員權階",
|
||||||
"memberRoleHint": "Greater number has higher permission.",
|
"memberRoleHint": "數高則權重。",
|
||||||
"memberRoleEdit": "Edit role for @{}",
|
"memberRoleEdit": "修訂 @{} 之職",
|
||||||
"openLinkConfirm": "Leaving the Solar Network",
|
"openLinkConfirm": "行將離 Solar Network",
|
||||||
"openLinkConfirmDescription": "You're going to leave the Solar Network and open the link ({}) in your browser. It is not related to Solar Network. Beware of phishing and scams.",
|
"openLinkConfirmDescription": "君將辭 Solar Network 而啟 {} 之徑於瀏覽器,此徑與 Solar Network 無干,當心詐偽之害。",
|
||||||
"brokenLink": "Unable open link {}... It might be broken or missing uri parts...",
|
"brokenLink": "未能開啟 {} 之鏈……或為殘鏈佚址……",
|
||||||
"copyToClipboard": "Copy to clipboard",
|
"copyToClipboard": "抄入剪貼板",
|
||||||
"leaveChatRoom": "Leave Chat Room",
|
"leaveChatRoom": "辭離談席",
|
||||||
"leaveChatRoomHint": "Are you sure to leave this chat room?",
|
"leaveChatRoomHint": "君確要辭此談席否?",
|
||||||
"leaveRealm": "Leave Realm",
|
"leaveRealm": "辭離界域",
|
||||||
"leaveRealmHint": "Are you sure to leave this realm?",
|
"leaveRealmHint": "君確要辭此界域否?",
|
||||||
"walletNotFound": "Wallet not found",
|
"walletNotFound": "未見荷包",
|
||||||
"walletCreateHint": "You don't have a wallet yet. Create one to start using the Solar Network eWallet.",
|
"walletCreateHint": "君尚未備荷包,請創之以啟用 Solar Network 電子荷包。",
|
||||||
"walletCreate": "Create a Wallet",
|
"walletCreate": "始創一荷包",
|
||||||
"settingsServerUrl": "Server URL",
|
"settingsServerUrl": "伺服器網址",
|
||||||
"settingsApplied": "The settings has been applied.",
|
"settingsApplied": "諸設定已施畢。",
|
||||||
"notifications": "Notifications",
|
"notifications": "報聞",
|
||||||
"posts": "Posts",
|
"posts": "貼文",
|
||||||
"settingsBackgroundImage": "Background Image",
|
"settingsBackgroundImage": "底圖",
|
||||||
"settingsBackgroundImageClear": "Clear Background Image",
|
"settingsBackgroundImageClear": "清底圖",
|
||||||
"settingsBackgroundGenerateColor": "Generate color scheme from Bacground Image",
|
"settingsBackgroundGenerateColor": "取背景畫配色",
|
||||||
"messageNone": "No content to display",
|
"messageNone": "無文可示",
|
||||||
"unreadMessages": {
|
"unreadMessages": {
|
||||||
"one": "{} unread message",
|
"one": "{} 條未讀訊",
|
||||||
"other": "{} unread messages"
|
"other": "{} 條未讀訊"
|
||||||
},
|
},
|
||||||
"chatBreakNone": "None",
|
"chatBreakNone": "無",
|
||||||
"settingsRealmCompactView": "Compact Realm View",
|
"settingsRealmCompactView": "緊湊界域視圖",
|
||||||
"settingsMixedFeed": "Mixed Feed",
|
"settingsMixedFeed": "混流饋訊",
|
||||||
"settingsAutoTranslate": "Auto Translate",
|
"settingsAutoTranslate": "自轉譯",
|
||||||
"settingsHideBottomNav": "Hide Bottom Navigation",
|
"settingsHideBottomNav": "隱底航",
|
||||||
"settingsSoundEffects": "Sound Effects",
|
"settingsSoundEffects": "音效",
|
||||||
"settingsAprilFoolFeatures": "April Fool Features",
|
"settingsAprilFoolFeatures": "謔辰妙能",
|
||||||
"settingsEnterToSend": "Enter to Send",
|
"settingsEnterToSend": "叩回車鍵即送",
|
||||||
"settingsTransparentAppBar": "Transparent App Bar",
|
"settingsTransparentAppBar": "透光應用欄",
|
||||||
"settingsCustomFonts": "Custom Fonts",
|
"settingsCustomFonts": "自定字體",
|
||||||
"settingsCustomFontsHint": "Custom fonts will be used for all text in the app. Make sure it is installed on your device.",
|
"settingsCustomFontsHint": "此字體將通施於應用內文,請先確安於裝置。",
|
||||||
"settingsColorScheme": "Color Scheme",
|
"settingsColorScheme": "設置色彩方案",
|
||||||
"postTitle": "Title",
|
"postTitle": "標題",
|
||||||
"postDescription": "Description",
|
"postDescription": "状",
|
||||||
"call": "Call",
|
"call": "传信",
|
||||||
"done": "Done",
|
"done": "已成矣",
|
||||||
"loginResetPasswordSent": "Password reset link sent, please check your email inbox.",
|
"loginResetPasswordSent": "密码重置之链已送至,恳愿于汝之邮址查阅。",
|
||||||
"accountDeletion": "Delete Account",
|
"accountDeletion": "除去此账户",
|
||||||
"accountDeletionHint": "Are you sure to delete your account? If you confirmed, we will send an confirmation email to your primary email address, you can continue the deletion process by follow the insturctions in the email.",
|
"accountDeletionHint": "汝已存心除此账户?如已一意,信将至汝邮址,随信中之言续此行。",
|
||||||
"accountDeletionSent": "Account deletion confirmation email sent, please check your email inbox.",
|
"accountDeletionSent": "除此账户之信已送至,请于汝之邮址查阅。",
|
||||||
"accountSecurityTitle": "Security",
|
"accountSecurityTitle": "Security",
|
||||||
"accountDangerZoneTitle": "Danger Zone",
|
"accountDangerZoneTitle": "Danger Zone",
|
||||||
"accountPassword": "Password",
|
"accountPassword": "密碼",
|
||||||
"accountPasswordDescription": "Change your account password",
|
"accountPasswordDescription": "變更账户密碼",
|
||||||
"accountPasswordChange": "Change Password",
|
"accountPasswordChange": "變更密碼",
|
||||||
"accountPasswordChangeSent": "Password reset link sent, please check your email inbox.",
|
"accountPasswordChangeSent": "Password reset link sent, please check your email inbox.",
|
||||||
"accountPasswordChangeDescription": "We will send an email to your primary email address to reset your password.",
|
"accountPasswordChangeDescription": "We will send an email to your primary email address to reset your password.",
|
||||||
"accountAuthFactor": "Auth factors",
|
"accountAuthFactor": "Auth factors",
|
||||||
@@ -346,14 +344,14 @@
|
|||||||
"unauthorizedHint": "You're not signed in or session expired, please sign in again.",
|
"unauthorizedHint": "You're not signed in or session expired, please sign in again.",
|
||||||
"publisherBelongsTo": "Belongs to {}",
|
"publisherBelongsTo": "Belongs to {}",
|
||||||
"postContent": "Content",
|
"postContent": "Content",
|
||||||
"postSettings": "Settings",
|
"postSettings": "設定",
|
||||||
"postPublisherUnselected": "Publisher Unspecified",
|
"postPublisherUnselected": "发信者未定",
|
||||||
"postVisibilityPublic": "Public",
|
"postVisibilityPublic": "众以见",
|
||||||
"postVisibilityFriends": "Friends Only",
|
"postVisibilityFriends": "唯友以见",
|
||||||
"postVisibilityUnlisted": "Unlisted",
|
"postVisibilityUnlisted": "非指之人以见",
|
||||||
"postVisibilityPrivate": "Private",
|
"postVisibilityPrivate": "唯己可见",
|
||||||
"postTruncated": "Content truncated, tap to view full post",
|
"postTruncated": "Content truncated, tap to view full post",
|
||||||
"copyMessage": "Copy Message",
|
"copyMessage": "抄文",
|
||||||
"authFactor": "Authentication Factor",
|
"authFactor": "Authentication Factor",
|
||||||
"authFactorDelete": "Delete the Factor",
|
"authFactorDelete": "Delete the Factor",
|
||||||
"authFactorDeleteHint": "Are you sure you want to delete this authentication factor? This action cannot be undone.",
|
"authFactorDeleteHint": "Are you sure you want to delete this authentication factor? This action cannot be undone.",
|
||||||
@@ -366,8 +364,8 @@
|
|||||||
"authFactorSecretHint": "Create an secret for this factor.",
|
"authFactorSecretHint": "Create an secret for this factor.",
|
||||||
"authFactorQrCodeScan": "Scan this QR code with your authenticator app to set up TOTP authentication",
|
"authFactorQrCodeScan": "Scan this QR code with your authenticator app to set up TOTP authentication",
|
||||||
"authFactorNoQrCode": "No QR code available for this authentication factor",
|
"authFactorNoQrCode": "No QR code available for this authentication factor",
|
||||||
"cancel": "Cancel",
|
"cancel": "止",
|
||||||
"confirm": "Confirm",
|
"confirm": "认",
|
||||||
"authFactorAdditional": "One more step",
|
"authFactorAdditional": "One more step",
|
||||||
"authFactorHint": "Contact method hint",
|
"authFactorHint": "Contact method hint",
|
||||||
"authFactorHintHelper": "You need provide a part of your contact method and we will send the verification code to that contact method if it matched our records",
|
"authFactorHintHelper": "You need provide a part of your contact method and we will send the verification code to that contact method if it matched our records",
|
||||||
@@ -387,12 +385,12 @@
|
|||||||
"authDeviceSwipeEditHint": "Swipe left to edit label",
|
"authDeviceSwipeEditHint": "Swipe left to edit label",
|
||||||
"authDeviceSwipeLogoutHint": "Swipe right to logout device",
|
"authDeviceSwipeLogoutHint": "Swipe right to logout device",
|
||||||
"typingHint": {
|
"typingHint": {
|
||||||
"one": "{} is typing...",
|
"one": "{} 正在执笔……",
|
||||||
"other": "{} are typing..."
|
"other": "{} 正在执笔……"
|
||||||
},
|
},
|
||||||
"settingsAppearance": "Appearance",
|
"settingsAppearance": "Appearance",
|
||||||
"settingsServer": "Server",
|
"settingsServer": "伺服器",
|
||||||
"settingsBehavior": "Behavior",
|
"settingsBehavior": "为",
|
||||||
"settingsDesktop": "Desktop",
|
"settingsDesktop": "Desktop",
|
||||||
"settingsKeyboardShortcuts": "Keyboard Shortcuts",
|
"settingsKeyboardShortcuts": "Keyboard Shortcuts",
|
||||||
"settingsEnterToSendDesktopHint": "Press Enter to send messages, use Shift+Enter for new line.",
|
"settingsEnterToSendDesktopHint": "Press Enter to send messages, use Shift+Enter for new line.",
|
||||||
@@ -752,21 +750,6 @@
|
|||||||
"rename": "Rename",
|
"rename": "Rename",
|
||||||
"markAsSensitive": "Mark as Sensitive",
|
"markAsSensitive": "Mark as Sensitive",
|
||||||
"fileName": "File name",
|
"fileName": "File name",
|
||||||
"sensitiveCategories": {
|
|
||||||
"language": "Language",
|
|
||||||
"sexualContent": "Sexual Content",
|
|
||||||
"violence": "Violence",
|
|
||||||
"profanity": "Profanity",
|
|
||||||
"hateSpeech": "Hate Speech",
|
|
||||||
"racism": "Racism",
|
|
||||||
"adultContent": "Adult Content",
|
|
||||||
"drugAbuse": "Drug Abuse",
|
|
||||||
"alcoholAbuse": "Alcohol Abuse",
|
|
||||||
"gambling": "Gambling",
|
|
||||||
"selfHarm": "Self-harm",
|
|
||||||
"childAbuse": "Child Abuse",
|
|
||||||
"other": "Other"
|
|
||||||
},
|
|
||||||
"poll": "Poll",
|
"poll": "Poll",
|
||||||
"pollsRecent": "Recent Polls",
|
"pollsRecent": "Recent Polls",
|
||||||
"pollCreateNew": "Create New",
|
"pollCreateNew": "Create New",
|
||||||
@@ -1075,5 +1058,421 @@
|
|||||||
"deleteRecycledFiles": "Delete Recycled Files",
|
"deleteRecycledFiles": "Delete Recycled Files",
|
||||||
"recycledFilesDeleted": "Recycled files deleted successfully",
|
"recycledFilesDeleted": "Recycled files deleted successfully",
|
||||||
"failedToDeleteRecycledFiles": "Failed to delete recycled files",
|
"failedToDeleteRecycledFiles": "Failed to delete recycled files",
|
||||||
"upload": "Upload"
|
"upload": "Upload",
|
||||||
|
"deleteMessage": "Delete Message",
|
||||||
|
"deleteMessageConfirmation": "Are you sure you want to delete this message?",
|
||||||
|
"customReaction": "Custom Reaction",
|
||||||
|
"customReactions": "Custom Reactions",
|
||||||
|
"stickerPlaceholder": "Sticker Placeholder",
|
||||||
|
"reactionAttitude": "Reaction Attitude",
|
||||||
|
"addReaction": "Add Reaction",
|
||||||
|
"eventCalendar": "Event Calendar",
|
||||||
|
"eventCalendarEmpty": "No events on that day.",
|
||||||
|
"walletStats": "Wallet Statistics",
|
||||||
|
"totalTransactions": "Total Transactions",
|
||||||
|
"totalOrders": "Total Orders",
|
||||||
|
"totalIncome": "Total Income",
|
||||||
|
"totalOutgoing": "Total Outgoing",
|
||||||
|
"netBalance": "Net Balance",
|
||||||
|
"messageUpdateLinks": "Server generated links previews",
|
||||||
|
"messageUpdateEdited": "Edited a message",
|
||||||
|
"settingsCardBackgroundOpacity": "Card Background Opacity",
|
||||||
|
"settingsThemeMode": "Theme Mode",
|
||||||
|
"settingsThemeModeSystem": "System",
|
||||||
|
"settingsThemeModeLight": "Light",
|
||||||
|
"settingsThemeModeDark": "Dark",
|
||||||
|
"enterPin": "Enter your PIN code",
|
||||||
|
"chatReplyingTo": "Replying to {}",
|
||||||
|
"chatForwarding": "Forwarding message",
|
||||||
|
"chatEditing": "Editing message",
|
||||||
|
"chatNoContent": "No content",
|
||||||
|
"sensitiveCategories": {
|
||||||
|
"language": "Language",
|
||||||
|
"sexualContent": "Sexual Content",
|
||||||
|
"violence": "Violence",
|
||||||
|
"profanity": "Profanity",
|
||||||
|
"hateSpeech": "Hate Speech",
|
||||||
|
"racism": "Racism",
|
||||||
|
"adultContent": "Adult Content",
|
||||||
|
"drugAbuse": "Drug Abuse",
|
||||||
|
"alcoholAbuse": "Alcohol Abuse",
|
||||||
|
"gambling": "Gambling",
|
||||||
|
"selfHarm": "Self-harm",
|
||||||
|
"childAbuse": "Child Abuse",
|
||||||
|
"other": "Other"
|
||||||
|
},
|
||||||
|
"Searching...": "Searching...",
|
||||||
|
"searchError": "Search failed. Please try again.",
|
||||||
|
"tryDifferentKeywords": "Try different keywords or remove search filters",
|
||||||
|
"settingsWindowOpacity": "Window Opacity",
|
||||||
|
"messageContent": "Message Content",
|
||||||
|
"updateAvailable": "Update available",
|
||||||
|
"noChangelogProvided": "No changelog provided.",
|
||||||
|
"useSecondarySourceForDownload": "Use secondary source for download",
|
||||||
|
"installUpdate": "Install update",
|
||||||
|
"openReleasePage": "Open release page",
|
||||||
|
"postCompose": "Compose Post",
|
||||||
|
"postPublish": "Publish Post",
|
||||||
|
"restoreDraftTitle": "Restore Draft",
|
||||||
|
"restoreDraftMessage": "A draft was found. Do you want to restore it?",
|
||||||
|
"draft": "Draft",
|
||||||
|
"purchaseGift": "Purchase Gift",
|
||||||
|
"selectRecipient": "Select Recipient",
|
||||||
|
"changeRecipient": "Change Recipient",
|
||||||
|
"addMessage": "Add Message",
|
||||||
|
"skipRecipient": "Skip Recipient",
|
||||||
|
"giftSubscriptions": "Gift Subscriptions",
|
||||||
|
"purchaseAGift": "Purchase a Gift",
|
||||||
|
"redeemAGift": "Redeem a Gift",
|
||||||
|
"giftHistory": "Gift History",
|
||||||
|
"sentGifts": "Sent Gifts",
|
||||||
|
"receivedGifts": "Received Gifts",
|
||||||
|
"noSentGifts": "No sent gifts",
|
||||||
|
"noReceivedGifts": "No received gifts",
|
||||||
|
"stellarGift": "Stellar Gift",
|
||||||
|
"novaGift": "Nova Gift",
|
||||||
|
"supernovaGift": "Supernova Gift",
|
||||||
|
"sameAsMembership": "Same as membership",
|
||||||
|
"enterGiftCodeToRedeem": "Enter gift code to redeem",
|
||||||
|
"enterGiftCode": "Enter gift code",
|
||||||
|
"giftPurchased": "Gift Purchased!",
|
||||||
|
"shareCodeWithRecipient": "Share this code with the recipient to redeem the gift.",
|
||||||
|
"openGiftAnyoneCanRedeem": "This is an open gift that anyone can redeem.",
|
||||||
|
"ok": "OK",
|
||||||
|
"selectedRecipient": "Selected recipient",
|
||||||
|
"noRecipientSelected": "No recipient selected",
|
||||||
|
"thisWillBeAnOpenGift": "This will be an open gift",
|
||||||
|
"personalMessage": "Personal Message",
|
||||||
|
"addPersonalMessageForRecipient": "Add a personal message for the recipient",
|
||||||
|
"giftStatusCreated": "Created",
|
||||||
|
"giftStatusSent": "Sent",
|
||||||
|
"giftStatusRedeemed": "Redeemed",
|
||||||
|
"giftStatusCancelled": "Cancelled",
|
||||||
|
"giftStatusExpired": "Expired",
|
||||||
|
"giftStatusUnknown": "Unknown",
|
||||||
|
"giftCodeCopiedToClipboard": "Gift code copied to clipboard",
|
||||||
|
"codeLabel": "Code: ",
|
||||||
|
"subscriptionLabel": "Subscription: ",
|
||||||
|
"toLabel": "To: ",
|
||||||
|
"fromLabel": "From: ",
|
||||||
|
"messageLabel": "Message: ",
|
||||||
|
"giftRedeemed": "Gift Redeemed!",
|
||||||
|
"giftRedeemedSuccessfully": "You have successfully redeemed the gift. Your new subscription is now active.",
|
||||||
|
"cancelGift": "Cancel Gift",
|
||||||
|
"cancelGiftConfirm": "Are you sure you want to cancel this gift? This action cannot be undone.",
|
||||||
|
"giftCancelledSuccessfully": "Gift cancelled successfully",
|
||||||
|
"createFund": "Create Fund",
|
||||||
|
"fundAmount": "Fund Amount",
|
||||||
|
"enterAmount": "Enter Amount",
|
||||||
|
"selectCurrency": "Select Currency",
|
||||||
|
"splitType": "Split Type",
|
||||||
|
"evenSplit": "Even Split",
|
||||||
|
"equalAmountEach": "Equal amount for each recipient",
|
||||||
|
"randomSplit": "Random Split",
|
||||||
|
"randomAmountEach": "Random amount for each recipient",
|
||||||
|
"recipientCount": "Recipient Count",
|
||||||
|
"numberOfRecipients": "Number of Recipients",
|
||||||
|
"addPersonalMessageForRecipients": "Add a personal message for recipients",
|
||||||
|
"invalidAmount": "Invalid amount",
|
||||||
|
"invalidRecipientCount": "Invalid recipient count",
|
||||||
|
"fundOverview": "Fund Overview",
|
||||||
|
"totalFundsSent": "Total Funds Sent",
|
||||||
|
"totalFundsReceived": "Total Funds Received",
|
||||||
|
"transactions": "Transactions",
|
||||||
|
"myFunds": "My Funds",
|
||||||
|
"availableFunds": "Available Funds",
|
||||||
|
"fundStatusCreated": "Created",
|
||||||
|
"fundStatusPartial": "Partially Claimed",
|
||||||
|
"fundStatusCompleted": "Fully Claimed",
|
||||||
|
"fundStatusExpired": "Expired",
|
||||||
|
"fundStatusUnknown": "Unknown",
|
||||||
|
"recipients": "Recipients",
|
||||||
|
"fundClaimedSuccessfully": "Fund claimed successfully!",
|
||||||
|
"claim": "Claim",
|
||||||
|
"noFundsCreated": "No funds created yet",
|
||||||
|
"createYourFirstFund": "Create your first fund to get started",
|
||||||
|
"noAvailableFunds": "No available funds",
|
||||||
|
"fundsWillAppearHere": "Funds you can claim will appear here",
|
||||||
|
"fundCreatedSuccessfully": "Fund created successfully!",
|
||||||
|
"selectRecipients": "Select Recipients",
|
||||||
|
"noRecipientsSelected": "No recipients selected",
|
||||||
|
"selectRecipientsToSendFund": "Select recipients to send the fund to",
|
||||||
|
"addRecipient": "Add Recipient",
|
||||||
|
"addMoreRecipients": "Add More Recipients",
|
||||||
|
"transactionDetails": "Transaction Details",
|
||||||
|
"remarks": "Remarks",
|
||||||
|
"payer": "Payer",
|
||||||
|
"payee": "Payee",
|
||||||
|
"transactionType": "Transaction Type",
|
||||||
|
"transfer": "Transfer",
|
||||||
|
"payment": "Payment",
|
||||||
|
"systemWallet": "System Wallet",
|
||||||
|
"date": "Date",
|
||||||
|
"createTransfer": "Create Transfer",
|
||||||
|
"transferAmount": "Transfer Amount",
|
||||||
|
"selectPayee": "Select Payee",
|
||||||
|
"selectedPayee": "Selected Payee",
|
||||||
|
"noPayeeSelected": "No payee selected",
|
||||||
|
"selectPayeeToTransfer": "Select payee to transfer to",
|
||||||
|
"addRemark": "Add Remark",
|
||||||
|
"transferRemark": "Transfer Remark",
|
||||||
|
"addRemarkForTransfer": "Add remark for transfer",
|
||||||
|
"enterPinToConfirmTransfer": "Enter your 6-digit PIN to confirm transfer",
|
||||||
|
"transferCreatedSuccessfully": "Transfer created successfully!",
|
||||||
|
"postUpdate": "Update",
|
||||||
|
"fileMetadata": "File Metadata",
|
||||||
|
"resend": "Resend",
|
||||||
|
"fileInfoTitle": "File Information",
|
||||||
|
"download": "Download",
|
||||||
|
"info": "Info",
|
||||||
|
"noStickers": "No Stickers",
|
||||||
|
"noStickersInPack": "This pack does not contains stickers",
|
||||||
|
"noStickerPacks": "No Sticker Packs",
|
||||||
|
"refresh": "Refresh",
|
||||||
|
"spoiler": "Spoiler",
|
||||||
|
"activityHeatmap": "Activity Heatmap",
|
||||||
|
"custom": "Custom",
|
||||||
|
"usernameColor": "Username Color",
|
||||||
|
"colorType": "Color Type",
|
||||||
|
"plain": "Plain",
|
||||||
|
"gradient": "Gradient",
|
||||||
|
"colorValue": "Color Value",
|
||||||
|
"gradientDirection": "Gradient Direction",
|
||||||
|
"gradientDirectionToRight": "To Right",
|
||||||
|
"gradientDirectionToLeft": "To Left",
|
||||||
|
"gradientDirectionToBottom": "To Bottom",
|
||||||
|
"gradientDirectionToTop": "To Top",
|
||||||
|
"gradientDirectionToBottomRight": "To Bottom Right",
|
||||||
|
"gradientDirectionToBottomLeft": "To Bottom Left",
|
||||||
|
"gradientDirectionToTopRight": "To Top Right",
|
||||||
|
"gradientDirectionToTopLeft": "To Top Left",
|
||||||
|
"gradientColors": "Gradient Colors",
|
||||||
|
"color": "Color",
|
||||||
|
"addColor": "Add Color",
|
||||||
|
"availableWithYourPlan": "Available with your plan",
|
||||||
|
"upgradeRequired": "Upgrade required",
|
||||||
|
"settingsDisableAnimation": "Disable Animation",
|
||||||
|
"addTag": "Add Tag",
|
||||||
|
"accountConnectionProviderSpotify": "Spotify",
|
||||||
|
"accountConnectionProviderSteam": "Steam",
|
||||||
|
"timezoneNotFound": "Time zone not found",
|
||||||
|
"awardPoints": "Awarded {} points",
|
||||||
|
"postFeaturedOn": "Post featured on {}",
|
||||||
|
"messageSentAt": "Sent at {}",
|
||||||
|
"myTickets": "My Tickets",
|
||||||
|
"drawHistory": "Draw History",
|
||||||
|
"lottery": "Lottery",
|
||||||
|
"noLotteryTickets": "No lottery tickets yet",
|
||||||
|
"buyYourFirstTicket": "Buy your first lottery ticket to get started!",
|
||||||
|
"buyTicket": "Buy Ticket",
|
||||||
|
"ticketNumbers": "Numbers: {}, Special: {}",
|
||||||
|
"cost": "Cost",
|
||||||
|
"multiplier": "Multiplier",
|
||||||
|
"prizeWon": "Prize Won",
|
||||||
|
"pending": "Pending",
|
||||||
|
"drawn": "Drawn",
|
||||||
|
"won": "Won",
|
||||||
|
"lost": "Lost",
|
||||||
|
"noDrawHistory": "No draw history yet",
|
||||||
|
"buyLotteryTicket": "Buy Lottery Ticket",
|
||||||
|
"selectNumbers": "Select Numbers",
|
||||||
|
"select5UniqueNumbers": "Select 5 unique numbers",
|
||||||
|
"selectSpecialNumber": "Select Special Number",
|
||||||
|
"selectMultiplier": "Select Multiplier",
|
||||||
|
"baseCost": "Base Cost",
|
||||||
|
"totalCost": "Total Cost",
|
||||||
|
"prizeStructure": "Prize Structure",
|
||||||
|
"enterPinToConfirmPurchase": "Enter your PIN to confirm purchase",
|
||||||
|
"ticketPurchasedSuccessfully": "Ticket purchased successfully!",
|
||||||
|
"winningNumbers": "Winning Numbers",
|
||||||
|
"specialNumber": "Special Number",
|
||||||
|
"totalTickets": "Total Tickets",
|
||||||
|
"totalWinners": "Total Winners",
|
||||||
|
"prizePool": "Prize Pool",
|
||||||
|
"enterPinToConfirmPayment": "Enter your PIN code to confirm payment",
|
||||||
|
"purchase": "Purchase",
|
||||||
|
"multiplierLabel": "Multiplier",
|
||||||
|
"specialOnly": "Special Only",
|
||||||
|
"matches": "Matches",
|
||||||
|
"thoughtDefaultTopic": "Reflection",
|
||||||
|
"thoughtAiName": "SN-chan",
|
||||||
|
"thoughtUserName": "You",
|
||||||
|
"thoughtStreamingHint": "Sn-chan is thinking...",
|
||||||
|
"thoughtInputHint": "Ask sn-chan anything...",
|
||||||
|
"thoughtNewConversation": "Start New Conversation",
|
||||||
|
"thoughtParseError": "Failed to parse AI response",
|
||||||
|
"thoughtFunctionCall": "Use {}",
|
||||||
|
"aiThought": "AI Thought",
|
||||||
|
"aiThoughtTitle": "Let sn-chan think",
|
||||||
|
"postReferenceUnavailable": "Referenced post is unavailable",
|
||||||
|
"fabLocation": "FAB Location",
|
||||||
|
"activities": "Activities",
|
||||||
|
"presenceTypeGaming": "Playing",
|
||||||
|
"presenceTypeMusic": "Listening to Music",
|
||||||
|
"presenceTypeWorkout": "Working out",
|
||||||
|
"articleCompose": "Compose Article",
|
||||||
|
"backToHub": "Back to Hub",
|
||||||
|
"advancedFilters": "Advanced Filters",
|
||||||
|
"searchPosts": "Search Posts",
|
||||||
|
"sortBy": "Sort by",
|
||||||
|
"fromDate": "From Date",
|
||||||
|
"toDate": "To Date",
|
||||||
|
"popularity": "Popularity",
|
||||||
|
"descendingOrder": "Descending Order",
|
||||||
|
"selectDate": "Select Date",
|
||||||
|
"pinnedPosts": "Pinned Posts",
|
||||||
|
"customReactionHint": "Custom Reaction allow you to use user uploaded stickers as the symbol of the reaction for the post. Exclusive for Stellar Program members.",
|
||||||
|
"publicationSites": "Publication Sites",
|
||||||
|
"uploadTasks": "Upload Tasks",
|
||||||
|
"thoughtFunctionCallBegin": "Calling tool {}",
|
||||||
|
"thoughtFunctionCallFinish": "{} responded",
|
||||||
|
"thoughtUnpaidHint": "Thinking unavaiable due to unpaid orders",
|
||||||
|
"more": "More",
|
||||||
|
"collapse": "Collapse",
|
||||||
|
"pollConfirmDiscard": "Are you sure you want to leave? All the poll data you're editing will not be saved.",
|
||||||
|
"discard": "Discard",
|
||||||
|
"fund": "Fund",
|
||||||
|
"fundsRecent": "Recent Funds",
|
||||||
|
"fundCreateNew": "Create New",
|
||||||
|
"fundCreateNewHint": "Create a new fund for your message. Select recipients and amount.",
|
||||||
|
"amountOfSplits": "Amount of Splits",
|
||||||
|
"enterNumberOfSplits": "Enter Splits Amount",
|
||||||
|
"orCreateWith": "Or\ncreate with",
|
||||||
|
"unindexedFiles": "Unindexed files",
|
||||||
|
"folder": "Folder",
|
||||||
|
"clearCompleted": "Clear Completed",
|
||||||
|
"uploadSuccess": "Upload successful!",
|
||||||
|
"wouldYouLikeToViewFile": "Would you like to view the file?",
|
||||||
|
"contentCantEmpty": "Content cannot be empty",
|
||||||
|
"features": "Features",
|
||||||
|
"unnamed": "Unnamed",
|
||||||
|
"fundEnvelopeLoadFailed": "Failed to load fund envelope",
|
||||||
|
"fundEnvelope": "Fund Envelope",
|
||||||
|
"fundEnvelopeRemaining": "Remaining: {} {}",
|
||||||
|
"fundEnvelopeSplit": "Split: {}",
|
||||||
|
"fundEnvelopeSplitEvenly": "Evenly",
|
||||||
|
"fundEnvelopeSplitRandomly": "Randomly",
|
||||||
|
"fundEnvelopeClaimSuccess": "Fund claimed successfully!",
|
||||||
|
"fundEnvelopeStatusCreated": "Created",
|
||||||
|
"fundEnvelopeStatusPartial": "Partially Claimed",
|
||||||
|
"fundEnvelopeStatusCompleted": "Fully Claimed",
|
||||||
|
"fundEnvelopeStatusExpired": "Expired",
|
||||||
|
"fundEnvelopeStatusUnknown": "Unknown",
|
||||||
|
"fundEnvelopeRecipients": "Recipients ({}/{} claimed)",
|
||||||
|
"fundEnvelopeExpiredDaysAgo": {
|
||||||
|
"one": "Expired {} day ago",
|
||||||
|
"other": "Expired {} days ago"
|
||||||
|
},
|
||||||
|
"fundEnvelopeExpiresSoon": "Expires soon",
|
||||||
|
"fundEnvelopeExpiresInHours": {
|
||||||
|
"one": "Expires in {} hour",
|
||||||
|
"other": "Expires in {} hours"
|
||||||
|
},
|
||||||
|
"fundEnvelopeExpiresInDays": {
|
||||||
|
"one": "Expires in {} day",
|
||||||
|
"other": "Expires in {} days"
|
||||||
|
},
|
||||||
|
"fundEnvelopeRemainingWithSplits": "{} {} / {} splits",
|
||||||
|
"fundEnvelopeUnknownUser": "Unknown User",
|
||||||
|
"deleteSite": "Delete Site",
|
||||||
|
"deleteSiteConfirm": "Are you sure you want to delete this site?",
|
||||||
|
"siteDeletedSuccess": "Site deleted successfully",
|
||||||
|
"siteSlug": "Slug",
|
||||||
|
"siteSlugHint": "my-site",
|
||||||
|
"siteSlugRequired": "Please enter a slug",
|
||||||
|
"siteSlugInvalid": "Slug can only contain lowercase letters, numbers, and dashes",
|
||||||
|
"siteName": "Site Name",
|
||||||
|
"siteNameHint": "My Publication Site",
|
||||||
|
"siteNameRequired": "Please enter a site name",
|
||||||
|
"siteMode": "Mode",
|
||||||
|
"siteModeFullyManaged": "Fully Managed",
|
||||||
|
"siteModeSelfManaged": "Self-Managed",
|
||||||
|
"editPublicationSite": "Edit Publication Site",
|
||||||
|
"deletePublicationSite": "Delete Publication Site",
|
||||||
|
"publicationSiteSavedSuccess": "Publication site saved successfully",
|
||||||
|
"publicationSiteDeleteConfirm": "Are you sure you want to delete this publication site? This action cannot be undone.",
|
||||||
|
"publicationSiteDeletedSuccess": "Publication site deleted successfully",
|
||||||
|
"newPublicationSite": "New Publication Site",
|
||||||
|
"siteDetails": "Site Details",
|
||||||
|
"siteInformation": "Site Information",
|
||||||
|
"siteDomain": "Domain",
|
||||||
|
"siteCreated": "Created",
|
||||||
|
"siteUpdated": "Updated",
|
||||||
|
"failedToLoadSite": "Failed to load site",
|
||||||
|
"sitePages": "Pages",
|
||||||
|
"noPagesYet": "No pages yet",
|
||||||
|
"createFirstPage": "Create your first page to get started",
|
||||||
|
"failedToLoadPages": "Failed to load pages",
|
||||||
|
"fileManagement": "File Management",
|
||||||
|
"siteFiles": "Files",
|
||||||
|
"siteFolder": "Folder",
|
||||||
|
"siteRoot": "Root",
|
||||||
|
"noFilesUploadedYet": "No files uploaded yet",
|
||||||
|
"uploadFirstFile": "Upload your first file to get started",
|
||||||
|
"failedToLoadFiles": "Failed to load files",
|
||||||
|
"noFilesFoundInFolder": "No files found in the selected folder",
|
||||||
|
"fileActions": "File Actions",
|
||||||
|
"purgeFiles": "Purge Files",
|
||||||
|
"purgeFilesDescription": "Remove all uploaded files from the site",
|
||||||
|
"deploySite": "Deploy Site",
|
||||||
|
"deploySiteDescription": "Upload and deploy a new version from ZIP archive",
|
||||||
|
"confirmPurge": "Confirm Purge",
|
||||||
|
"purgeFilesConfirm": "This will permanently delete all files uploaded to this site. This action cannot be undone. Are you sure you want to continue?",
|
||||||
|
"purgeAllFiles": "Purge All Files",
|
||||||
|
"allFilesPurgedSuccess": "All files purged successfully",
|
||||||
|
"failedToPurgeFiles": "Failed to purge files: {}",
|
||||||
|
"siteDeployedSuccess": "Site deployed successfully",
|
||||||
|
"failedToDeploySite": "Failed to deploy site: {}",
|
||||||
|
"createPage": "Create Page",
|
||||||
|
"editPage": "Edit Page",
|
||||||
|
"pageType": "Page Type",
|
||||||
|
"htmlPage": "HTML Page",
|
||||||
|
"redirectPage": "Redirect Page",
|
||||||
|
"pageTypeRequired": "Please select a page type",
|
||||||
|
"pagePath": "Page Path",
|
||||||
|
"pagePathHint": "/about, /contact, etc.",
|
||||||
|
"pagePathRequired": "Please enter a page path",
|
||||||
|
"pagePathInvalid": "Page path can only contain letters, numbers, hyphens, underscores, and slashes",
|
||||||
|
"pagePathMustStartWithSlash": "Page path must start with /",
|
||||||
|
"pagePathNoConsecutiveSlashes": "Page path cannot have consecutive slashes",
|
||||||
|
"pageTitle": "Page Title",
|
||||||
|
"pageTitleHint": "About Us, Contact, etc.",
|
||||||
|
"pageTitleRequired": "Please enter a page title",
|
||||||
|
"pageContentHtml": "Page Content (HTML)",
|
||||||
|
"pageContentHint": "<h1>Hello World</h1><p>This is my page content...</p>",
|
||||||
|
"pageContentRequired": "Please enter HTML content for the page",
|
||||||
|
"redirectTarget": "Redirect Target",
|
||||||
|
"redirectTargetHint": "/new-page, https://example.com, etc.",
|
||||||
|
"redirectTargetRequired": "Please enter a redirect target",
|
||||||
|
"redirectTargetInvalid": "Target must be a relative path (/) or absolute URL (http/https)",
|
||||||
|
"deletePage": "Delete Page",
|
||||||
|
"deletePageConfirm": "Are you sure you want to delete this page?",
|
||||||
|
"savePage": "Save Page",
|
||||||
|
"pageCreatedSuccess": "Page created successfully",
|
||||||
|
"pageUpdatedSuccess": "Page updated successfully",
|
||||||
|
"pageDeletedSuccess": "Page deleted successfully",
|
||||||
|
"uploadFiles": "Upload Files",
|
||||||
|
"uploadPath": "Upload Path",
|
||||||
|
"uploadPathHint": "/ (root) or /assets/images/",
|
||||||
|
"uploadPathRequired": "Please enter an upload path",
|
||||||
|
"uploadPathMustStartWithSlash": "Path must start with /",
|
||||||
|
"uploadPathNoSpaces": "Path cannot contain spaces",
|
||||||
|
"uploadPathNoConsecutiveSlashes": "Path cannot have consecutive slashes",
|
||||||
|
"percentCompleted": "{}% completed",
|
||||||
|
"filesToUpload": "{} files to upload",
|
||||||
|
"fileSizeKb": "Size: {} KB",
|
||||||
|
"uploadingEllipsis": "Uploading...",
|
||||||
|
"uploadFilesCount": {
|
||||||
|
"one": "Upload {} File",
|
||||||
|
"other": "Upload {} Files"
|
||||||
|
},
|
||||||
|
"allUploadsCompleted": "All uploads completed",
|
||||||
|
"someUploadsFailed": "Some uploads failed",
|
||||||
|
"uploadingInProgress": "Uploading in progress",
|
||||||
|
"readyToUpload": "Ready to upload",
|
||||||
|
"allFilesUploadedSuccess": "All files uploaded successfully",
|
||||||
|
"lotteryLastNumberSpecial": "The last selected number will be your special number.",
|
||||||
|
"lotteryMultiplierRequired": "Please enter a multiplier",
|
||||||
|
"lotteryMultiplierRange": "Multiplier must be between 1 and 10",
|
||||||
|
"dropToShare": "Drop to share"
|
||||||
}
|
}
|
||||||
@@ -164,8 +164,6 @@
|
|||||||
"checkInResultLevel3": "好運",
|
"checkInResultLevel3": "好運",
|
||||||
"checkInResultLevel4": "最佳運氣",
|
"checkInResultLevel4": "最佳運氣",
|
||||||
"checkInActivityTitle": "{} 在 {} 簽到並獲得了 {}",
|
"checkInActivityTitle": "{} 在 {} 簽到並獲得了 {}",
|
||||||
"eventCalander": "活動日曆",
|
|
||||||
"eventCalanderEmpty": "該日無活動。",
|
|
||||||
"fortuneGraph": "時運趨勢",
|
"fortuneGraph": "時運趨勢",
|
||||||
"noFortuneData": "本月沒有時運數據。",
|
"noFortuneData": "本月沒有時運數據。",
|
||||||
"creatorHub": "創作者中心",
|
"creatorHub": "創作者中心",
|
||||||
@@ -752,21 +750,6 @@
|
|||||||
"rename": "重命名",
|
"rename": "重命名",
|
||||||
"markAsSensitive": "標記為敏感",
|
"markAsSensitive": "標記為敏感",
|
||||||
"fileName": "文件名",
|
"fileName": "文件名",
|
||||||
"sensitiveCategories": {
|
|
||||||
"language": "語言",
|
|
||||||
"sexualContent": "色情內容",
|
|
||||||
"violence": "暴力",
|
|
||||||
"profanity": "褻瀆",
|
|
||||||
"hateSpeech": "仇恨言論",
|
|
||||||
"racism": "種族主義",
|
|
||||||
"adultContent": "成人內容",
|
|
||||||
"drugAbuse": "藥物濫用",
|
|
||||||
"alcoholAbuse": "酗酒",
|
|
||||||
"gambling": "賭博",
|
|
||||||
"selfHarm": "自殘",
|
|
||||||
"childAbuse": "虐待兒童",
|
|
||||||
"other": "其他"
|
|
||||||
},
|
|
||||||
"poll": "投票",
|
"poll": "投票",
|
||||||
"pollsRecent": "最近投票",
|
"pollsRecent": "最近投票",
|
||||||
"pollCreateNew": "創建新投票",
|
"pollCreateNew": "創建新投票",
|
||||||
@@ -1076,6 +1059,420 @@
|
|||||||
"recycledFilesDeleted": "已回收檔案刪除成功",
|
"recycledFilesDeleted": "已回收檔案刪除成功",
|
||||||
"failedToDeleteRecycledFiles": "已回收檔案刪除失敗",
|
"failedToDeleteRecycledFiles": "已回收檔案刪除失敗",
|
||||||
"upload": "上傳",
|
"upload": "上傳",
|
||||||
|
"deleteMessage": "刪除訊息",
|
||||||
|
"deleteMessageConfirmation": "確定要刪除此郵件嗎?",
|
||||||
|
"customReaction": "自訂反應",
|
||||||
|
"customReactions": "自訂反應",
|
||||||
|
"stickerPlaceholder": "貼紙佔位符",
|
||||||
|
"reactionAttitude": "反應態度",
|
||||||
|
"addReaction": "添加反應",
|
||||||
|
"eventCalendar": "事件日曆",
|
||||||
|
"eventCalendarEmpty": "該日無活動。",
|
||||||
|
"walletStats": "錢包統計",
|
||||||
|
"totalTransactions": "交易總數",
|
||||||
|
"totalOrders": "訂單總數",
|
||||||
|
"totalIncome": "總收入",
|
||||||
|
"totalOutgoing": "總支出",
|
||||||
|
"netBalance": "淨餘額",
|
||||||
|
"messageUpdateLinks": "伺服器產生的連結預覽",
|
||||||
|
"messageUpdateEdited": "編輯一則訊息",
|
||||||
|
"settingsCardBackgroundOpacity": "卡片背景不透明度",
|
||||||
|
"settingsThemeMode": "主題模式",
|
||||||
|
"settingsThemeModeSystem": "跟隨系統",
|
||||||
|
"settingsThemeModeLight": "淺色",
|
||||||
|
"settingsThemeModeDark": "暗色",
|
||||||
|
"enterPin": "請輸入您的PIN碼",
|
||||||
|
"chatReplyingTo": "回復給 {}",
|
||||||
|
"chatForwarding": "正在轉傳訊息",
|
||||||
|
"chatEditing": "訊息編輯中",
|
||||||
|
"chatNoContent": "內容為空",
|
||||||
|
"sensitiveCategories": {
|
||||||
|
"language": "語言",
|
||||||
|
"sexualContent": "色情內容",
|
||||||
|
"violence": "暴力",
|
||||||
|
"profanity": "褻瀆",
|
||||||
|
"hateSpeech": "仇恨言論",
|
||||||
|
"racism": "種族主義",
|
||||||
|
"adultContent": "成人內容",
|
||||||
|
"drugAbuse": "藥物濫用",
|
||||||
|
"alcoholAbuse": "酗酒",
|
||||||
|
"gambling": "賭博",
|
||||||
|
"selfHarm": "自殘",
|
||||||
|
"childAbuse": "虐待兒童",
|
||||||
|
"other": "其他"
|
||||||
|
},
|
||||||
|
"Searching...": "檢索中……",
|
||||||
|
"searchError": "付款失敗,請重試。",
|
||||||
|
"tryDifferentKeywords": "嘗試不同的關鍵字或刪除搜尋過濾器",
|
||||||
|
"settingsWindowOpacity": "視窗不透明度",
|
||||||
|
"messageContent": "訊息內容",
|
||||||
|
"updateAvailable": "更新可用",
|
||||||
|
"noChangelogProvided": "無更新紀錄。",
|
||||||
|
"useSecondarySourceForDownload": "使用次要來源下載",
|
||||||
|
"installUpdate": "安装更新",
|
||||||
|
"openReleasePage": "開啟發行頁面",
|
||||||
"postCompose": "撰寫帖子",
|
"postCompose": "撰寫帖子",
|
||||||
"postPublish": "發佈帖子"
|
"postPublish": "發佈帖子",
|
||||||
|
"restoreDraftTitle": "還原草稿",
|
||||||
|
"restoreDraftMessage": "發現了一個草稿。你想要恢復它嗎?",
|
||||||
|
"draft": "草稿",
|
||||||
|
"purchaseGift": "充值有禮",
|
||||||
|
"selectRecipient": "選擇收件者",
|
||||||
|
"changeRecipient": "修改款件人",
|
||||||
|
"addMessage": "添加消息",
|
||||||
|
"skipRecipient": "跳過款件人",
|
||||||
|
"giftSubscriptions": "贈送訂閱",
|
||||||
|
"purchaseAGift": "充值有禮",
|
||||||
|
"redeemAGift": "兌換禮物",
|
||||||
|
"giftHistory": "禮物記錄",
|
||||||
|
"sentGifts": "發送禮物",
|
||||||
|
"receivedGifts": "接收禮物",
|
||||||
|
"noSentGifts": "沒有送過禮物",
|
||||||
|
"noReceivedGifts": "没有收到过礼物",
|
||||||
|
"stellarGift": "恆星禮物",
|
||||||
|
"novaGift": "新星禮物",
|
||||||
|
"supernovaGift": "Supernova Gift",
|
||||||
|
"sameAsMembership": "Same as membership",
|
||||||
|
"enterGiftCodeToRedeem": "Enter gift code to redeem",
|
||||||
|
"enterGiftCode": "Enter gift code",
|
||||||
|
"giftPurchased": "Gift Purchased!",
|
||||||
|
"shareCodeWithRecipient": "Share this code with the recipient to redeem the gift.",
|
||||||
|
"openGiftAnyoneCanRedeem": "This is an open gift that anyone can redeem.",
|
||||||
|
"ok": "OK",
|
||||||
|
"selectedRecipient": "Selected recipient",
|
||||||
|
"noRecipientSelected": "No recipient selected",
|
||||||
|
"thisWillBeAnOpenGift": "This will be an open gift",
|
||||||
|
"personalMessage": "Personal Message",
|
||||||
|
"addPersonalMessageForRecipient": "Add a personal message for the recipient",
|
||||||
|
"giftStatusCreated": "Created",
|
||||||
|
"giftStatusSent": "Sent",
|
||||||
|
"giftStatusRedeemed": "Redeemed",
|
||||||
|
"giftStatusCancelled": "Cancelled",
|
||||||
|
"giftStatusExpired": "Expired",
|
||||||
|
"giftStatusUnknown": "Unknown",
|
||||||
|
"giftCodeCopiedToClipboard": "Gift code copied to clipboard",
|
||||||
|
"codeLabel": "Code: ",
|
||||||
|
"subscriptionLabel": "Subscription: ",
|
||||||
|
"toLabel": "To: ",
|
||||||
|
"fromLabel": "From: ",
|
||||||
|
"messageLabel": "Message: ",
|
||||||
|
"giftRedeemed": "Gift Redeemed!",
|
||||||
|
"giftRedeemedSuccessfully": "You have successfully redeemed the gift. Your new subscription is now active.",
|
||||||
|
"cancelGift": "Cancel Gift",
|
||||||
|
"cancelGiftConfirm": "Are you sure you want to cancel this gift? This action cannot be undone.",
|
||||||
|
"giftCancelledSuccessfully": "Gift cancelled successfully",
|
||||||
|
"createFund": "Create Fund",
|
||||||
|
"fundAmount": "Fund Amount",
|
||||||
|
"enterAmount": "Enter Amount",
|
||||||
|
"selectCurrency": "Select Currency",
|
||||||
|
"splitType": "Split Type",
|
||||||
|
"evenSplit": "Even Split",
|
||||||
|
"equalAmountEach": "Equal amount for each recipient",
|
||||||
|
"randomSplit": "Random Split",
|
||||||
|
"randomAmountEach": "Random amount for each recipient",
|
||||||
|
"recipientCount": "Recipient Count",
|
||||||
|
"numberOfRecipients": "Number of Recipients",
|
||||||
|
"addPersonalMessageForRecipients": "Add a personal message for recipients",
|
||||||
|
"invalidAmount": "Invalid amount",
|
||||||
|
"invalidRecipientCount": "Invalid recipient count",
|
||||||
|
"fundOverview": "Fund Overview",
|
||||||
|
"totalFundsSent": "Total Funds Sent",
|
||||||
|
"totalFundsReceived": "Total Funds Received",
|
||||||
|
"transactions": "Transactions",
|
||||||
|
"myFunds": "My Funds",
|
||||||
|
"availableFunds": "Available Funds",
|
||||||
|
"fundStatusCreated": "Created",
|
||||||
|
"fundStatusPartial": "Partially Claimed",
|
||||||
|
"fundStatusCompleted": "Fully Claimed",
|
||||||
|
"fundStatusExpired": "Expired",
|
||||||
|
"fundStatusUnknown": "Unknown",
|
||||||
|
"recipients": "Recipients",
|
||||||
|
"fundClaimedSuccessfully": "Fund claimed successfully!",
|
||||||
|
"claim": "Claim",
|
||||||
|
"noFundsCreated": "No funds created yet",
|
||||||
|
"createYourFirstFund": "Create your first fund to get started",
|
||||||
|
"noAvailableFunds": "No available funds",
|
||||||
|
"fundsWillAppearHere": "Funds you can claim will appear here",
|
||||||
|
"fundCreatedSuccessfully": "Fund created successfully!",
|
||||||
|
"selectRecipients": "Select Recipients",
|
||||||
|
"noRecipientsSelected": "No recipients selected",
|
||||||
|
"selectRecipientsToSendFund": "Select recipients to send the fund to",
|
||||||
|
"addRecipient": "Add Recipient",
|
||||||
|
"addMoreRecipients": "Add More Recipients",
|
||||||
|
"transactionDetails": "Transaction Details",
|
||||||
|
"remarks": "Remarks",
|
||||||
|
"payer": "Payer",
|
||||||
|
"payee": "Payee",
|
||||||
|
"transactionType": "Transaction Type",
|
||||||
|
"transfer": "Transfer",
|
||||||
|
"payment": "Payment",
|
||||||
|
"systemWallet": "System Wallet",
|
||||||
|
"date": "Date",
|
||||||
|
"createTransfer": "Create Transfer",
|
||||||
|
"transferAmount": "Transfer Amount",
|
||||||
|
"selectPayee": "Select Payee",
|
||||||
|
"selectedPayee": "Selected Payee",
|
||||||
|
"noPayeeSelected": "No payee selected",
|
||||||
|
"selectPayeeToTransfer": "Select payee to transfer to",
|
||||||
|
"addRemark": "Add Remark",
|
||||||
|
"transferRemark": "Transfer Remark",
|
||||||
|
"addRemarkForTransfer": "Add remark for transfer",
|
||||||
|
"enterPinToConfirmTransfer": "Enter your 6-digit PIN to confirm transfer",
|
||||||
|
"transferCreatedSuccessfully": "Transfer created successfully!",
|
||||||
|
"postUpdate": "Update",
|
||||||
|
"fileMetadata": "File Metadata",
|
||||||
|
"resend": "Resend",
|
||||||
|
"fileInfoTitle": "File Information",
|
||||||
|
"download": "Download",
|
||||||
|
"info": "Info",
|
||||||
|
"noStickers": "No Stickers",
|
||||||
|
"noStickersInPack": "This pack does not contains stickers",
|
||||||
|
"noStickerPacks": "No Sticker Packs",
|
||||||
|
"refresh": "Refresh",
|
||||||
|
"spoiler": "Spoiler",
|
||||||
|
"activityHeatmap": "Activity Heatmap",
|
||||||
|
"custom": "Custom",
|
||||||
|
"usernameColor": "Username Color",
|
||||||
|
"colorType": "Color Type",
|
||||||
|
"plain": "Plain",
|
||||||
|
"gradient": "Gradient",
|
||||||
|
"colorValue": "Color Value",
|
||||||
|
"gradientDirection": "Gradient Direction",
|
||||||
|
"gradientDirectionToRight": "To Right",
|
||||||
|
"gradientDirectionToLeft": "To Left",
|
||||||
|
"gradientDirectionToBottom": "To Bottom",
|
||||||
|
"gradientDirectionToTop": "To Top",
|
||||||
|
"gradientDirectionToBottomRight": "To Bottom Right",
|
||||||
|
"gradientDirectionToBottomLeft": "To Bottom Left",
|
||||||
|
"gradientDirectionToTopRight": "To Top Right",
|
||||||
|
"gradientDirectionToTopLeft": "To Top Left",
|
||||||
|
"gradientColors": "Gradient Colors",
|
||||||
|
"color": "Color",
|
||||||
|
"addColor": "Add Color",
|
||||||
|
"availableWithYourPlan": "Available with your plan",
|
||||||
|
"upgradeRequired": "Upgrade required",
|
||||||
|
"settingsDisableAnimation": "Disable Animation",
|
||||||
|
"addTag": "Add Tag",
|
||||||
|
"accountConnectionProviderSpotify": "Spotify",
|
||||||
|
"accountConnectionProviderSteam": "Steam",
|
||||||
|
"timezoneNotFound": "Time zone not found",
|
||||||
|
"awardPoints": "Awarded {} points",
|
||||||
|
"postFeaturedOn": "Post featured on {}",
|
||||||
|
"messageSentAt": "Sent at {}",
|
||||||
|
"myTickets": "My Tickets",
|
||||||
|
"drawHistory": "Draw History",
|
||||||
|
"lottery": "Lottery",
|
||||||
|
"noLotteryTickets": "No lottery tickets yet",
|
||||||
|
"buyYourFirstTicket": "Buy your first lottery ticket to get started!",
|
||||||
|
"buyTicket": "Buy Ticket",
|
||||||
|
"ticketNumbers": "Numbers: {}, Special: {}",
|
||||||
|
"cost": "Cost",
|
||||||
|
"multiplier": "Multiplier",
|
||||||
|
"prizeWon": "Prize Won",
|
||||||
|
"pending": "Pending",
|
||||||
|
"drawn": "Drawn",
|
||||||
|
"won": "Won",
|
||||||
|
"lost": "Lost",
|
||||||
|
"noDrawHistory": "No draw history yet",
|
||||||
|
"buyLotteryTicket": "Buy Lottery Ticket",
|
||||||
|
"selectNumbers": "Select Numbers",
|
||||||
|
"select5UniqueNumbers": "Select 5 unique numbers",
|
||||||
|
"selectSpecialNumber": "Select Special Number",
|
||||||
|
"selectMultiplier": "Select Multiplier",
|
||||||
|
"baseCost": "Base Cost",
|
||||||
|
"totalCost": "Total Cost",
|
||||||
|
"prizeStructure": "Prize Structure",
|
||||||
|
"enterPinToConfirmPurchase": "Enter your PIN to confirm purchase",
|
||||||
|
"ticketPurchasedSuccessfully": "Ticket purchased successfully!",
|
||||||
|
"winningNumbers": "Winning Numbers",
|
||||||
|
"specialNumber": "Special Number",
|
||||||
|
"totalTickets": "Total Tickets",
|
||||||
|
"totalWinners": "Total Winners",
|
||||||
|
"prizePool": "Prize Pool",
|
||||||
|
"enterPinToConfirmPayment": "Enter your PIN code to confirm payment",
|
||||||
|
"purchase": "Purchase",
|
||||||
|
"multiplierLabel": "Multiplier",
|
||||||
|
"specialOnly": "Special Only",
|
||||||
|
"matches": "Matches",
|
||||||
|
"thoughtDefaultTopic": "Reflection",
|
||||||
|
"thoughtAiName": "SN-chan",
|
||||||
|
"thoughtUserName": "You",
|
||||||
|
"thoughtStreamingHint": "Sn-chan is thinking...",
|
||||||
|
"thoughtInputHint": "Ask sn-chan anything...",
|
||||||
|
"thoughtNewConversation": "Start New Conversation",
|
||||||
|
"thoughtParseError": "Failed to parse AI response",
|
||||||
|
"thoughtFunctionCall": "Use {}",
|
||||||
|
"aiThought": "AI Thought",
|
||||||
|
"aiThoughtTitle": "Let sn-chan think",
|
||||||
|
"postReferenceUnavailable": "Referenced post is unavailable",
|
||||||
|
"fabLocation": "FAB Location",
|
||||||
|
"activities": "Activities",
|
||||||
|
"presenceTypeGaming": "Playing",
|
||||||
|
"presenceTypeMusic": "Listening to Music",
|
||||||
|
"presenceTypeWorkout": "Working out",
|
||||||
|
"articleCompose": "Compose Article",
|
||||||
|
"backToHub": "Back to Hub",
|
||||||
|
"advancedFilters": "Advanced Filters",
|
||||||
|
"searchPosts": "Search Posts",
|
||||||
|
"sortBy": "Sort by",
|
||||||
|
"fromDate": "From Date",
|
||||||
|
"toDate": "To Date",
|
||||||
|
"popularity": "Popularity",
|
||||||
|
"descendingOrder": "Descending Order",
|
||||||
|
"selectDate": "Select Date",
|
||||||
|
"pinnedPosts": "Pinned Posts",
|
||||||
|
"customReactionHint": "Custom Reaction allow you to use user uploaded stickers as the symbol of the reaction for the post. Exclusive for Stellar Program members.",
|
||||||
|
"publicationSites": "Publication Sites",
|
||||||
|
"uploadTasks": "Upload Tasks",
|
||||||
|
"thoughtFunctionCallBegin": "Calling tool {}",
|
||||||
|
"thoughtFunctionCallFinish": "{} responded",
|
||||||
|
"thoughtUnpaidHint": "Thinking unavaiable due to unpaid orders",
|
||||||
|
"more": "More",
|
||||||
|
"collapse": "Collapse",
|
||||||
|
"pollConfirmDiscard": "Are you sure you want to leave? All the poll data you're editing will not be saved.",
|
||||||
|
"discard": "Discard",
|
||||||
|
"fund": "Fund",
|
||||||
|
"fundsRecent": "Recent Funds",
|
||||||
|
"fundCreateNew": "Create New",
|
||||||
|
"fundCreateNewHint": "Create a new fund for your message. Select recipients and amount.",
|
||||||
|
"amountOfSplits": "Amount of Splits",
|
||||||
|
"enterNumberOfSplits": "Enter Splits Amount",
|
||||||
|
"orCreateWith": "Or\ncreate with",
|
||||||
|
"unindexedFiles": "Unindexed files",
|
||||||
|
"folder": "Folder",
|
||||||
|
"clearCompleted": "Clear Completed",
|
||||||
|
"uploadSuccess": "Upload successful!",
|
||||||
|
"wouldYouLikeToViewFile": "Would you like to view the file?",
|
||||||
|
"contentCantEmpty": "Content cannot be empty",
|
||||||
|
"features": "Features",
|
||||||
|
"unnamed": "Unnamed",
|
||||||
|
"fundEnvelopeLoadFailed": "Failed to load fund envelope",
|
||||||
|
"fundEnvelope": "Fund Envelope",
|
||||||
|
"fundEnvelopeRemaining": "Remaining: {} {}",
|
||||||
|
"fundEnvelopeSplit": "Split: {}",
|
||||||
|
"fundEnvelopeSplitEvenly": "Evenly",
|
||||||
|
"fundEnvelopeSplitRandomly": "Randomly",
|
||||||
|
"fundEnvelopeClaimSuccess": "Fund claimed successfully!",
|
||||||
|
"fundEnvelopeStatusCreated": "Created",
|
||||||
|
"fundEnvelopeStatusPartial": "Partially Claimed",
|
||||||
|
"fundEnvelopeStatusCompleted": "Fully Claimed",
|
||||||
|
"fundEnvelopeStatusExpired": "Expired",
|
||||||
|
"fundEnvelopeStatusUnknown": "Unknown",
|
||||||
|
"fundEnvelopeRecipients": "Recipients ({}/{} claimed)",
|
||||||
|
"fundEnvelopeExpiredDaysAgo": {
|
||||||
|
"one": "Expired {} day ago",
|
||||||
|
"other": "Expired {} days ago"
|
||||||
|
},
|
||||||
|
"fundEnvelopeExpiresSoon": "Expires soon",
|
||||||
|
"fundEnvelopeExpiresInHours": {
|
||||||
|
"one": "Expires in {} hour",
|
||||||
|
"other": "Expires in {} hours"
|
||||||
|
},
|
||||||
|
"fundEnvelopeExpiresInDays": {
|
||||||
|
"one": "Expires in {} day",
|
||||||
|
"other": "Expires in {} days"
|
||||||
|
},
|
||||||
|
"fundEnvelopeRemainingWithSplits": "{} {} / {} splits",
|
||||||
|
"fundEnvelopeUnknownUser": "Unknown User",
|
||||||
|
"deleteSite": "Delete Site",
|
||||||
|
"deleteSiteConfirm": "Are you sure you want to delete this site?",
|
||||||
|
"siteDeletedSuccess": "Site deleted successfully",
|
||||||
|
"siteSlug": "Slug",
|
||||||
|
"siteSlugHint": "my-site",
|
||||||
|
"siteSlugRequired": "Please enter a slug",
|
||||||
|
"siteSlugInvalid": "Slug can only contain lowercase letters, numbers, and dashes",
|
||||||
|
"siteName": "Site Name",
|
||||||
|
"siteNameHint": "My Publication Site",
|
||||||
|
"siteNameRequired": "Please enter a site name",
|
||||||
|
"siteMode": "Mode",
|
||||||
|
"siteModeFullyManaged": "Fully Managed",
|
||||||
|
"siteModeSelfManaged": "Self-Managed",
|
||||||
|
"editPublicationSite": "Edit Publication Site",
|
||||||
|
"deletePublicationSite": "Delete Publication Site",
|
||||||
|
"publicationSiteSavedSuccess": "Publication site saved successfully",
|
||||||
|
"publicationSiteDeleteConfirm": "Are you sure you want to delete this publication site? This action cannot be undone.",
|
||||||
|
"publicationSiteDeletedSuccess": "Publication site deleted successfully",
|
||||||
|
"newPublicationSite": "New Publication Site",
|
||||||
|
"siteDetails": "Site Details",
|
||||||
|
"siteInformation": "Site Information",
|
||||||
|
"siteDomain": "Domain",
|
||||||
|
"siteCreated": "Created",
|
||||||
|
"siteUpdated": "Updated",
|
||||||
|
"failedToLoadSite": "Failed to load site",
|
||||||
|
"sitePages": "Pages",
|
||||||
|
"noPagesYet": "No pages yet",
|
||||||
|
"createFirstPage": "Create your first page to get started",
|
||||||
|
"failedToLoadPages": "Failed to load pages",
|
||||||
|
"fileManagement": "File Management",
|
||||||
|
"siteFiles": "Files",
|
||||||
|
"siteFolder": "Folder",
|
||||||
|
"siteRoot": "Root",
|
||||||
|
"noFilesUploadedYet": "No files uploaded yet",
|
||||||
|
"uploadFirstFile": "Upload your first file to get started",
|
||||||
|
"failedToLoadFiles": "Failed to load files",
|
||||||
|
"noFilesFoundInFolder": "No files found in the selected folder",
|
||||||
|
"fileActions": "File Actions",
|
||||||
|
"purgeFiles": "Purge Files",
|
||||||
|
"purgeFilesDescription": "Remove all uploaded files from the site",
|
||||||
|
"deploySite": "Deploy Site",
|
||||||
|
"deploySiteDescription": "Upload and deploy a new version from ZIP archive",
|
||||||
|
"confirmPurge": "Confirm Purge",
|
||||||
|
"purgeFilesConfirm": "This will permanently delete all files uploaded to this site. This action cannot be undone. Are you sure you want to continue?",
|
||||||
|
"purgeAllFiles": "Purge All Files",
|
||||||
|
"allFilesPurgedSuccess": "All files purged successfully",
|
||||||
|
"failedToPurgeFiles": "Failed to purge files: {}",
|
||||||
|
"siteDeployedSuccess": "Site deployed successfully",
|
||||||
|
"failedToDeploySite": "Failed to deploy site: {}",
|
||||||
|
"createPage": "Create Page",
|
||||||
|
"editPage": "Edit Page",
|
||||||
|
"pageType": "Page Type",
|
||||||
|
"htmlPage": "HTML Page",
|
||||||
|
"redirectPage": "Redirect Page",
|
||||||
|
"pageTypeRequired": "Please select a page type",
|
||||||
|
"pagePath": "Page Path",
|
||||||
|
"pagePathHint": "/about, /contact, etc.",
|
||||||
|
"pagePathRequired": "Please enter a page path",
|
||||||
|
"pagePathInvalid": "Page path can only contain letters, numbers, hyphens, underscores, and slashes",
|
||||||
|
"pagePathMustStartWithSlash": "Page path must start with /",
|
||||||
|
"pagePathNoConsecutiveSlashes": "Page path cannot have consecutive slashes",
|
||||||
|
"pageTitle": "Page Title",
|
||||||
|
"pageTitleHint": "About Us, Contact, etc.",
|
||||||
|
"pageTitleRequired": "Please enter a page title",
|
||||||
|
"pageContentHtml": "Page Content (HTML)",
|
||||||
|
"pageContentHint": "<h1>Hello World</h1><p>This is my page content...</p>",
|
||||||
|
"pageContentRequired": "Please enter HTML content for the page",
|
||||||
|
"redirectTarget": "Redirect Target",
|
||||||
|
"redirectTargetHint": "/new-page, https://example.com, etc.",
|
||||||
|
"redirectTargetRequired": "Please enter a redirect target",
|
||||||
|
"redirectTargetInvalid": "Target must be a relative path (/) or absolute URL (http/https)",
|
||||||
|
"deletePage": "Delete Page",
|
||||||
|
"deletePageConfirm": "Are you sure you want to delete this page?",
|
||||||
|
"savePage": "Save Page",
|
||||||
|
"pageCreatedSuccess": "Page created successfully",
|
||||||
|
"pageUpdatedSuccess": "Page updated successfully",
|
||||||
|
"pageDeletedSuccess": "Page deleted successfully",
|
||||||
|
"uploadFiles": "Upload Files",
|
||||||
|
"uploadPath": "Upload Path",
|
||||||
|
"uploadPathHint": "/ (root) or /assets/images/",
|
||||||
|
"uploadPathRequired": "Please enter an upload path",
|
||||||
|
"uploadPathMustStartWithSlash": "Path must start with /",
|
||||||
|
"uploadPathNoSpaces": "Path cannot contain spaces",
|
||||||
|
"uploadPathNoConsecutiveSlashes": "Path cannot have consecutive slashes",
|
||||||
|
"percentCompleted": "{}% completed",
|
||||||
|
"filesToUpload": "{} files to upload",
|
||||||
|
"fileSizeKb": "Size: {} KB",
|
||||||
|
"uploadingEllipsis": "Uploading...",
|
||||||
|
"uploadFilesCount": {
|
||||||
|
"one": "Upload {} File",
|
||||||
|
"other": "Upload {} Files"
|
||||||
|
},
|
||||||
|
"allUploadsCompleted": "All uploads completed",
|
||||||
|
"someUploadsFailed": "Some uploads failed",
|
||||||
|
"uploadingInProgress": "Uploading in progress",
|
||||||
|
"readyToUpload": "Ready to upload",
|
||||||
|
"allFilesUploadedSuccess": "All files uploaded successfully",
|
||||||
|
"lotteryLastNumberSpecial": "The last selected number will be your special number.",
|
||||||
|
"lotteryMultiplierRequired": "Please enter a multiplier",
|
||||||
|
"lotteryMultiplierRange": "Multiplier must be between 1 and 10",
|
||||||
|
"dropToShare": "Drop to share"
|
||||||
}
|
}
|
||||||
1
drift_schemas/app_database/drift_schema_v7.json
Normal file
1
drift_schemas/app_database/drift_schema_v7.json
Normal file
File diff suppressed because one or more lines are too long
227
ios/Podfile.lock
227
ios/Podfile.lock
@@ -1,5 +1,5 @@
|
|||||||
PODS:
|
PODS:
|
||||||
- Alamofire (5.10.2)
|
- Alamofire (5.11.0)
|
||||||
- connectivity_plus (0.0.1):
|
- connectivity_plus (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- croppy (0.0.1):
|
- croppy (0.0.1):
|
||||||
@@ -42,83 +42,83 @@ PODS:
|
|||||||
- Flutter
|
- Flutter
|
||||||
- file_saver (0.0.1):
|
- file_saver (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- Firebase/CoreOnly (12.4.0):
|
- Firebase/CoreOnly (12.6.0):
|
||||||
- FirebaseCore (~> 12.4.0)
|
- FirebaseCore (~> 12.6.0)
|
||||||
- Firebase/Crashlytics (12.4.0):
|
- Firebase/Crashlytics (12.6.0):
|
||||||
- Firebase/CoreOnly
|
- Firebase/CoreOnly
|
||||||
- FirebaseCrashlytics (~> 12.4.0)
|
- FirebaseCrashlytics (~> 12.6.0)
|
||||||
- Firebase/Messaging (12.4.0):
|
- Firebase/Messaging (12.6.0):
|
||||||
- Firebase/CoreOnly
|
- Firebase/CoreOnly
|
||||||
- FirebaseMessaging (~> 12.4.0)
|
- FirebaseMessaging (~> 12.6.0)
|
||||||
- firebase_analytics (12.0.4):
|
- firebase_analytics (12.1.0):
|
||||||
- firebase_core
|
- firebase_core
|
||||||
- FirebaseAnalytics (= 12.4.0)
|
- FirebaseAnalytics (= 12.6.0)
|
||||||
- Flutter
|
- Flutter
|
||||||
- firebase_core (4.2.1):
|
- firebase_core (4.3.0):
|
||||||
- Firebase/CoreOnly (= 12.4.0)
|
- Firebase/CoreOnly (= 12.6.0)
|
||||||
- Flutter
|
- Flutter
|
||||||
- firebase_crashlytics (5.0.4):
|
- firebase_crashlytics (5.0.6):
|
||||||
- Firebase/Crashlytics (= 12.4.0)
|
- Firebase/Crashlytics (= 12.6.0)
|
||||||
- firebase_core
|
- firebase_core
|
||||||
- Flutter
|
- Flutter
|
||||||
- firebase_messaging (16.0.4):
|
- firebase_messaging (16.1.0):
|
||||||
- Firebase/Messaging (= 12.4.0)
|
- Firebase/Messaging (= 12.6.0)
|
||||||
- firebase_core
|
- firebase_core
|
||||||
- Flutter
|
- Flutter
|
||||||
- FirebaseAnalytics (12.4.0):
|
- FirebaseAnalytics (12.6.0):
|
||||||
- FirebaseAnalytics/Default (= 12.4.0)
|
- FirebaseAnalytics/Default (= 12.6.0)
|
||||||
- FirebaseCore (~> 12.4.0)
|
- FirebaseCore (~> 12.6.0)
|
||||||
- FirebaseInstallations (~> 12.4.0)
|
- FirebaseInstallations (~> 12.6.0)
|
||||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
||||||
- GoogleUtilities/MethodSwizzler (~> 8.1)
|
- GoogleUtilities/MethodSwizzler (~> 8.1)
|
||||||
- GoogleUtilities/Network (~> 8.1)
|
- GoogleUtilities/Network (~> 8.1)
|
||||||
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
||||||
- nanopb (~> 3.30910.0)
|
- nanopb (~> 3.30910.0)
|
||||||
- FirebaseAnalytics/Default (12.4.0):
|
- FirebaseAnalytics/Default (12.6.0):
|
||||||
- FirebaseCore (~> 12.4.0)
|
- FirebaseCore (~> 12.6.0)
|
||||||
- FirebaseInstallations (~> 12.4.0)
|
- FirebaseInstallations (~> 12.6.0)
|
||||||
- GoogleAppMeasurement/Default (= 12.4.0)
|
- GoogleAppMeasurement/Default (= 12.6.0)
|
||||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
||||||
- GoogleUtilities/MethodSwizzler (~> 8.1)
|
- GoogleUtilities/MethodSwizzler (~> 8.1)
|
||||||
- GoogleUtilities/Network (~> 8.1)
|
- GoogleUtilities/Network (~> 8.1)
|
||||||
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
||||||
- nanopb (~> 3.30910.0)
|
- nanopb (~> 3.30910.0)
|
||||||
- FirebaseCore (12.4.0):
|
- FirebaseCore (12.6.0):
|
||||||
- FirebaseCoreInternal (~> 12.4.0)
|
- FirebaseCoreInternal (~> 12.6.0)
|
||||||
- GoogleUtilities/Environment (~> 8.1)
|
- GoogleUtilities/Environment (~> 8.1)
|
||||||
- GoogleUtilities/Logger (~> 8.1)
|
- GoogleUtilities/Logger (~> 8.1)
|
||||||
- FirebaseCoreExtension (12.4.0):
|
- FirebaseCoreExtension (12.6.0):
|
||||||
- FirebaseCore (~> 12.4.0)
|
- FirebaseCore (~> 12.6.0)
|
||||||
- FirebaseCoreInternal (12.4.0):
|
- FirebaseCoreInternal (12.6.0):
|
||||||
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
||||||
- FirebaseCrashlytics (12.4.0):
|
- FirebaseCrashlytics (12.6.0):
|
||||||
- FirebaseCore (~> 12.4.0)
|
- FirebaseCore (~> 12.6.0)
|
||||||
- FirebaseInstallations (~> 12.4.0)
|
- FirebaseInstallations (~> 12.6.0)
|
||||||
- FirebaseRemoteConfigInterop (~> 12.4.0)
|
- FirebaseRemoteConfigInterop (~> 12.6.0)
|
||||||
- FirebaseSessions (~> 12.4.0)
|
- FirebaseSessions (~> 12.6.0)
|
||||||
- GoogleDataTransport (~> 10.1)
|
- GoogleDataTransport (~> 10.1)
|
||||||
- GoogleUtilities/Environment (~> 8.1)
|
- GoogleUtilities/Environment (~> 8.1)
|
||||||
- nanopb (~> 3.30910.0)
|
- nanopb (~> 3.30910.0)
|
||||||
- PromisesObjC (~> 2.4)
|
- PromisesObjC (~> 2.4)
|
||||||
- FirebaseInstallations (12.4.0):
|
- FirebaseInstallations (12.6.0):
|
||||||
- FirebaseCore (~> 12.4.0)
|
- FirebaseCore (~> 12.6.0)
|
||||||
- GoogleUtilities/Environment (~> 8.1)
|
- GoogleUtilities/Environment (~> 8.1)
|
||||||
- GoogleUtilities/UserDefaults (~> 8.1)
|
- GoogleUtilities/UserDefaults (~> 8.1)
|
||||||
- PromisesObjC (~> 2.4)
|
- PromisesObjC (~> 2.4)
|
||||||
- FirebaseMessaging (12.4.0):
|
- FirebaseMessaging (12.6.0):
|
||||||
- FirebaseCore (~> 12.4.0)
|
- FirebaseCore (~> 12.6.0)
|
||||||
- FirebaseInstallations (~> 12.4.0)
|
- FirebaseInstallations (~> 12.6.0)
|
||||||
- GoogleDataTransport (~> 10.1)
|
- GoogleDataTransport (~> 10.1)
|
||||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
||||||
- GoogleUtilities/Environment (~> 8.1)
|
- GoogleUtilities/Environment (~> 8.1)
|
||||||
- GoogleUtilities/Reachability (~> 8.1)
|
- GoogleUtilities/Reachability (~> 8.1)
|
||||||
- GoogleUtilities/UserDefaults (~> 8.1)
|
- GoogleUtilities/UserDefaults (~> 8.1)
|
||||||
- nanopb (~> 3.30910.0)
|
- nanopb (~> 3.30910.0)
|
||||||
- FirebaseRemoteConfigInterop (12.4.0)
|
- FirebaseRemoteConfigInterop (12.6.0)
|
||||||
- FirebaseSessions (12.4.0):
|
- FirebaseSessions (12.6.0):
|
||||||
- FirebaseCore (~> 12.4.0)
|
- FirebaseCore (~> 12.6.0)
|
||||||
- FirebaseCoreExtension (~> 12.4.0)
|
- FirebaseCoreExtension (~> 12.6.0)
|
||||||
- FirebaseInstallations (~> 12.4.0)
|
- FirebaseInstallations (~> 12.6.0)
|
||||||
- GoogleDataTransport (~> 10.1)
|
- GoogleDataTransport (~> 10.1)
|
||||||
- GoogleUtilities/Environment (~> 8.1)
|
- GoogleUtilities/Environment (~> 8.1)
|
||||||
- GoogleUtilities/UserDefaults (~> 8.1)
|
- GoogleUtilities/UserDefaults (~> 8.1)
|
||||||
@@ -140,43 +140,42 @@ PODS:
|
|||||||
- Flutter
|
- Flutter
|
||||||
- flutter_native_splash (2.4.3):
|
- flutter_native_splash (2.4.3):
|
||||||
- Flutter
|
- Flutter
|
||||||
- flutter_platform_alert (0.0.1):
|
- flutter_secure_storage_darwin (10.0.0):
|
||||||
- Flutter
|
|
||||||
- flutter_secure_storage (6.0.0):
|
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- FlutterMacOS
|
||||||
- flutter_timezone (0.0.1):
|
- flutter_timezone (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- flutter_udid (0.0.1):
|
- flutter_udid (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- SAMKeychain
|
- KeychainAccess
|
||||||
- flutter_webrtc (1.2.0):
|
- flutter_webrtc (1.2.0):
|
||||||
- Flutter
|
- Flutter
|
||||||
- WebRTC-SDK (= 137.7151.04)
|
- WebRTC-SDK (= 137.7151.04)
|
||||||
- gal (1.0.0):
|
- gal (1.0.0):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- GoogleAdsOnDeviceConversion (3.1.0):
|
- GoogleAdsOnDeviceConversion (3.2.0):
|
||||||
- GoogleUtilities/Environment (~> 8.1)
|
- GoogleUtilities/Environment (~> 8.1)
|
||||||
- GoogleUtilities/Logger (~> 8.1)
|
- GoogleUtilities/Logger (~> 8.1)
|
||||||
- GoogleUtilities/Network (~> 8.1)
|
- GoogleUtilities/Network (~> 8.1)
|
||||||
- nanopb (~> 3.30910.0)
|
- nanopb (~> 3.30910.0)
|
||||||
- GoogleAppMeasurement/Core (12.4.0):
|
- GoogleAppMeasurement/Core (12.6.0):
|
||||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
||||||
- GoogleUtilities/MethodSwizzler (~> 8.1)
|
- GoogleUtilities/MethodSwizzler (~> 8.1)
|
||||||
- GoogleUtilities/Network (~> 8.1)
|
- GoogleUtilities/Network (~> 8.1)
|
||||||
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
||||||
- nanopb (~> 3.30910.0)
|
- nanopb (~> 3.30910.0)
|
||||||
- GoogleAppMeasurement/Default (12.4.0):
|
- GoogleAppMeasurement/Default (12.6.0):
|
||||||
- GoogleAdsOnDeviceConversion (~> 3.1.0)
|
- GoogleAdsOnDeviceConversion (~> 3.2.0)
|
||||||
- GoogleAppMeasurement/Core (= 12.4.0)
|
- GoogleAppMeasurement/Core (= 12.6.0)
|
||||||
- GoogleAppMeasurement/IdentitySupport (= 12.4.0)
|
- GoogleAppMeasurement/IdentitySupport (= 12.6.0)
|
||||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
||||||
- GoogleUtilities/MethodSwizzler (~> 8.1)
|
- GoogleUtilities/MethodSwizzler (~> 8.1)
|
||||||
- GoogleUtilities/Network (~> 8.1)
|
- GoogleUtilities/Network (~> 8.1)
|
||||||
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
||||||
- nanopb (~> 3.30910.0)
|
- nanopb (~> 3.30910.0)
|
||||||
- GoogleAppMeasurement/IdentitySupport (12.4.0):
|
- GoogleAppMeasurement/IdentitySupport (12.6.0):
|
||||||
- GoogleAppMeasurement/Core (= 12.4.0)
|
- GoogleAppMeasurement/Core (= 12.6.0)
|
||||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
||||||
- GoogleUtilities/MethodSwizzler (~> 8.1)
|
- GoogleUtilities/MethodSwizzler (~> 8.1)
|
||||||
- GoogleUtilities/Network (~> 8.1)
|
- GoogleUtilities/Network (~> 8.1)
|
||||||
@@ -214,9 +213,12 @@ PODS:
|
|||||||
- GoogleUtilities/Privacy
|
- GoogleUtilities/Privacy
|
||||||
- image_picker_ios (0.0.1):
|
- image_picker_ios (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- in_app_review (2.0.0):
|
||||||
|
- Flutter
|
||||||
- irondash_engine_context (0.0.1):
|
- irondash_engine_context (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- Kingfisher (8.6.1)
|
- KeychainAccess (4.2.2)
|
||||||
|
- Kingfisher (8.6.2)
|
||||||
- KingfisherWebP (1.7.2):
|
- KingfisherWebP (1.7.2):
|
||||||
- Kingfisher (~> 8.0)
|
- Kingfisher (~> 8.0)
|
||||||
- libwebp (>= 1.1.0)
|
- libwebp (>= 1.1.0)
|
||||||
@@ -232,7 +234,7 @@ PODS:
|
|||||||
- libwebp/sharpyuv (1.5.0)
|
- libwebp/sharpyuv (1.5.0)
|
||||||
- libwebp/webp (1.5.0):
|
- libwebp/webp (1.5.0):
|
||||||
- libwebp/sharpyuv
|
- libwebp/sharpyuv
|
||||||
- livekit_client (2.5.3):
|
- livekit_client (2.5.4):
|
||||||
- Flutter
|
- Flutter
|
||||||
- flutter_webrtc
|
- flutter_webrtc
|
||||||
- WebRTC-SDK (= 137.7151.04)
|
- WebRTC-SDK (= 137.7151.04)
|
||||||
@@ -258,6 +260,8 @@ PODS:
|
|||||||
- path_provider_foundation (0.0.1):
|
- path_provider_foundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
- permission_handler_apple (9.3.0):
|
||||||
|
- Flutter
|
||||||
- pointer_interceptor_ios (0.0.1):
|
- pointer_interceptor_ios (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- PromisesObjC (2.4.0)
|
- PromisesObjC (2.4.0)
|
||||||
@@ -269,10 +273,11 @@ PODS:
|
|||||||
- Flutter
|
- Flutter
|
||||||
- record_ios (1.1.0):
|
- record_ios (1.1.0):
|
||||||
- Flutter
|
- Flutter
|
||||||
- SAMKeychain (1.5.3)
|
- SDWebImage (5.21.5):
|
||||||
- SDWebImage (5.21.3):
|
- SDWebImage/Core (= 5.21.5)
|
||||||
- SDWebImage/Core (= 5.21.3)
|
- SDWebImage/Core (5.21.5)
|
||||||
- SDWebImage/Core (5.21.3)
|
- sensors_plus (0.0.1):
|
||||||
|
- Flutter
|
||||||
- share_plus (0.0.1):
|
- share_plus (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- shared_preferences_foundation (0.0.1):
|
- shared_preferences_foundation (0.0.1):
|
||||||
@@ -283,25 +288,25 @@ PODS:
|
|||||||
- sqflite_darwin (0.0.4):
|
- sqflite_darwin (0.0.4):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- sqlite3 (3.50.4):
|
- sqlite3 (3.51.1):
|
||||||
- sqlite3/common (= 3.50.4)
|
- sqlite3/common (= 3.51.1)
|
||||||
- sqlite3/common (3.50.4)
|
- sqlite3/common (3.51.1)
|
||||||
- sqlite3/dbstatvtab (3.50.4):
|
- sqlite3/dbstatvtab (3.51.1):
|
||||||
- sqlite3/common
|
- sqlite3/common
|
||||||
- sqlite3/fts5 (3.50.4):
|
- sqlite3/fts5 (3.51.1):
|
||||||
- sqlite3/common
|
- sqlite3/common
|
||||||
- sqlite3/math (3.50.4):
|
- sqlite3/math (3.51.1):
|
||||||
- sqlite3/common
|
- sqlite3/common
|
||||||
- sqlite3/perf-threadsafe (3.50.4):
|
- sqlite3/perf-threadsafe (3.51.1):
|
||||||
- sqlite3/common
|
- sqlite3/common
|
||||||
- sqlite3/rtree (3.50.4):
|
- sqlite3/rtree (3.51.1):
|
||||||
- sqlite3/common
|
- sqlite3/common
|
||||||
- sqlite3/session (3.50.4):
|
- sqlite3/session (3.51.1):
|
||||||
- sqlite3/common
|
- sqlite3/common
|
||||||
- sqlite3_flutter_libs (0.0.1):
|
- sqlite3_flutter_libs (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- sqlite3 (~> 3.50.4)
|
- sqlite3 (~> 3.51.1)
|
||||||
- sqlite3/dbstatvtab
|
- sqlite3/dbstatvtab
|
||||||
- sqlite3/fts5
|
- sqlite3/fts5
|
||||||
- sqlite3/math
|
- sqlite3/math
|
||||||
@@ -315,8 +320,6 @@ PODS:
|
|||||||
- Flutter
|
- Flutter
|
||||||
- url_launcher_ios (0.0.1):
|
- url_launcher_ios (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- volume_controller (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- wakelock_plus (0.0.1):
|
- wakelock_plus (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- WebRTC-SDK (137.7151.04)
|
- WebRTC-SDK (137.7151.04)
|
||||||
@@ -338,13 +341,13 @@ DEPENDENCIES:
|
|||||||
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
|
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
|
||||||
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
|
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
|
||||||
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
|
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
|
||||||
- flutter_platform_alert (from `.symlinks/plugins/flutter_platform_alert/ios`)
|
- flutter_secure_storage_darwin (from `.symlinks/plugins/flutter_secure_storage_darwin/darwin`)
|
||||||
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
|
|
||||||
- flutter_timezone (from `.symlinks/plugins/flutter_timezone/ios`)
|
- flutter_timezone (from `.symlinks/plugins/flutter_timezone/ios`)
|
||||||
- flutter_udid (from `.symlinks/plugins/flutter_udid/ios`)
|
- flutter_udid (from `.symlinks/plugins/flutter_udid/ios`)
|
||||||
- flutter_webrtc (from `.symlinks/plugins/flutter_webrtc/ios`)
|
- flutter_webrtc (from `.symlinks/plugins/flutter_webrtc/ios`)
|
||||||
- gal (from `.symlinks/plugins/gal/darwin`)
|
- gal (from `.symlinks/plugins/gal/darwin`)
|
||||||
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
||||||
|
- in_app_review (from `.symlinks/plugins/in_app_review/ios`)
|
||||||
- irondash_engine_context (from `.symlinks/plugins/irondash_engine_context/ios`)
|
- irondash_engine_context (from `.symlinks/plugins/irondash_engine_context/ios`)
|
||||||
- Kingfisher (~> 8.0)
|
- Kingfisher (~> 8.0)
|
||||||
- KingfisherWebP
|
- KingfisherWebP
|
||||||
@@ -356,10 +359,12 @@ DEPENDENCIES:
|
|||||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||||
- pasteboard (from `.symlinks/plugins/pasteboard/ios`)
|
- pasteboard (from `.symlinks/plugins/pasteboard/ios`)
|
||||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||||
|
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
||||||
- pointer_interceptor_ios (from `.symlinks/plugins/pointer_interceptor_ios/ios`)
|
- pointer_interceptor_ios (from `.symlinks/plugins/pointer_interceptor_ios/ios`)
|
||||||
- protocol_handler_ios (from `.symlinks/plugins/protocol_handler_ios/ios`)
|
- protocol_handler_ios (from `.symlinks/plugins/protocol_handler_ios/ios`)
|
||||||
- receive_sharing_intent (from `.symlinks/plugins/receive_sharing_intent/ios`)
|
- receive_sharing_intent (from `.symlinks/plugins/receive_sharing_intent/ios`)
|
||||||
- record_ios (from `.symlinks/plugins/record_ios/ios`)
|
- record_ios (from `.symlinks/plugins/record_ios/ios`)
|
||||||
|
- sensors_plus (from `.symlinks/plugins/sensors_plus/ios`)
|
||||||
- share_plus (from `.symlinks/plugins/share_plus/ios`)
|
- share_plus (from `.symlinks/plugins/share_plus/ios`)
|
||||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||||
- sign_in_with_apple (from `.symlinks/plugins/sign_in_with_apple/ios`)
|
- sign_in_with_apple (from `.symlinks/plugins/sign_in_with_apple/ios`)
|
||||||
@@ -368,7 +373,6 @@ DEPENDENCIES:
|
|||||||
- super_native_extensions (from `.symlinks/plugins/super_native_extensions/ios`)
|
- super_native_extensions (from `.symlinks/plugins/super_native_extensions/ios`)
|
||||||
- syncfusion_flutter_pdfviewer (from `.symlinks/plugins/syncfusion_flutter_pdfviewer/ios`)
|
- syncfusion_flutter_pdfviewer (from `.symlinks/plugins/syncfusion_flutter_pdfviewer/ios`)
|
||||||
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
||||||
- volume_controller (from `.symlinks/plugins/volume_controller/ios`)
|
|
||||||
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
|
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
|
||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
@@ -390,6 +394,7 @@ SPEC REPOS:
|
|||||||
- GoogleAppMeasurement
|
- GoogleAppMeasurement
|
||||||
- GoogleDataTransport
|
- GoogleDataTransport
|
||||||
- GoogleUtilities
|
- GoogleUtilities
|
||||||
|
- KeychainAccess
|
||||||
- Kingfisher
|
- Kingfisher
|
||||||
- KingfisherWebP
|
- KingfisherWebP
|
||||||
- libwebp
|
- libwebp
|
||||||
@@ -397,7 +402,6 @@ SPEC REPOS:
|
|||||||
- OrderedSet
|
- OrderedSet
|
||||||
- PromisesObjC
|
- PromisesObjC
|
||||||
- PromisesSwift
|
- PromisesSwift
|
||||||
- SAMKeychain
|
|
||||||
- SDWebImage
|
- SDWebImage
|
||||||
- sqlite3
|
- sqlite3
|
||||||
- SwiftyGif
|
- SwiftyGif
|
||||||
@@ -434,10 +438,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/flutter_local_notifications/ios"
|
:path: ".symlinks/plugins/flutter_local_notifications/ios"
|
||||||
flutter_native_splash:
|
flutter_native_splash:
|
||||||
:path: ".symlinks/plugins/flutter_native_splash/ios"
|
:path: ".symlinks/plugins/flutter_native_splash/ios"
|
||||||
flutter_platform_alert:
|
flutter_secure_storage_darwin:
|
||||||
:path: ".symlinks/plugins/flutter_platform_alert/ios"
|
:path: ".symlinks/plugins/flutter_secure_storage_darwin/darwin"
|
||||||
flutter_secure_storage:
|
|
||||||
:path: ".symlinks/plugins/flutter_secure_storage/ios"
|
|
||||||
flutter_timezone:
|
flutter_timezone:
|
||||||
:path: ".symlinks/plugins/flutter_timezone/ios"
|
:path: ".symlinks/plugins/flutter_timezone/ios"
|
||||||
flutter_udid:
|
flutter_udid:
|
||||||
@@ -448,6 +450,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/gal/darwin"
|
:path: ".symlinks/plugins/gal/darwin"
|
||||||
image_picker_ios:
|
image_picker_ios:
|
||||||
:path: ".symlinks/plugins/image_picker_ios/ios"
|
:path: ".symlinks/plugins/image_picker_ios/ios"
|
||||||
|
in_app_review:
|
||||||
|
:path: ".symlinks/plugins/in_app_review/ios"
|
||||||
irondash_engine_context:
|
irondash_engine_context:
|
||||||
:path: ".symlinks/plugins/irondash_engine_context/ios"
|
:path: ".symlinks/plugins/irondash_engine_context/ios"
|
||||||
livekit_client:
|
livekit_client:
|
||||||
@@ -466,6 +470,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/pasteboard/ios"
|
:path: ".symlinks/plugins/pasteboard/ios"
|
||||||
path_provider_foundation:
|
path_provider_foundation:
|
||||||
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||||
|
permission_handler_apple:
|
||||||
|
:path: ".symlinks/plugins/permission_handler_apple/ios"
|
||||||
pointer_interceptor_ios:
|
pointer_interceptor_ios:
|
||||||
:path: ".symlinks/plugins/pointer_interceptor_ios/ios"
|
:path: ".symlinks/plugins/pointer_interceptor_ios/ios"
|
||||||
protocol_handler_ios:
|
protocol_handler_ios:
|
||||||
@@ -474,6 +480,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/receive_sharing_intent/ios"
|
:path: ".symlinks/plugins/receive_sharing_intent/ios"
|
||||||
record_ios:
|
record_ios:
|
||||||
:path: ".symlinks/plugins/record_ios/ios"
|
:path: ".symlinks/plugins/record_ios/ios"
|
||||||
|
sensors_plus:
|
||||||
|
:path: ".symlinks/plugins/sensors_plus/ios"
|
||||||
share_plus:
|
share_plus:
|
||||||
:path: ".symlinks/plugins/share_plus/ios"
|
:path: ".symlinks/plugins/share_plus/ios"
|
||||||
shared_preferences_foundation:
|
shared_preferences_foundation:
|
||||||
@@ -490,13 +498,11 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/syncfusion_flutter_pdfviewer/ios"
|
:path: ".symlinks/plugins/syncfusion_flutter_pdfviewer/ios"
|
||||||
url_launcher_ios:
|
url_launcher_ios:
|
||||||
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
||||||
volume_controller:
|
|
||||||
:path: ".symlinks/plugins/volume_controller/ios"
|
|
||||||
wakelock_plus:
|
wakelock_plus:
|
||||||
:path: ".symlinks/plugins/wakelock_plus/ios"
|
:path: ".symlinks/plugins/wakelock_plus/ios"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
Alamofire: 7193b3b92c74a07f85569e1a6c4f4237291e7496
|
Alamofire: bd5e7b23a1a750975288482c1831d71e74415f86
|
||||||
connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd
|
connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd
|
||||||
croppy: 979e8ddc254f4642bffe7d52dc7193354b27ba30
|
croppy: 979e8ddc254f4642bffe7d52dc7193354b27ba30
|
||||||
device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe
|
device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe
|
||||||
@@ -504,42 +510,43 @@ SPEC CHECKSUMS:
|
|||||||
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
|
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
|
||||||
file_picker: a0560bc09d61de87f12d246fc47d2119e6ef37be
|
file_picker: a0560bc09d61de87f12d246fc47d2119e6ef37be
|
||||||
file_saver: 6cdbcddd690cb02b0c1a0c225b37cd805c2bf8b6
|
file_saver: 6cdbcddd690cb02b0c1a0c225b37cd805c2bf8b6
|
||||||
Firebase: f07b15ae5a6ec0f93713e30b923d9970d144af3e
|
Firebase: a451a7b61536298fd5cbfe3a746fd40443a50679
|
||||||
firebase_analytics: 67fbdd9f3c04e55048024f3da21cfc36f05e56cf
|
firebase_analytics: 4f9cca09e65f6c2944a862c6dc86f6bed9fb769c
|
||||||
firebase_core: f1aafb21c14f497e5498f7ffc4dc63cbb52b2594
|
firebase_core: ba00a168e719694f38960502ceb560285603d073
|
||||||
firebase_crashlytics: 83c7467d7534975a4d779af43bd226d0a4616464
|
firebase_crashlytics: 13f4b77e9ce2a84b1f8ea07f293db5b6213ce1cf
|
||||||
firebase_messaging: c17a29984eafce4b2997fe078bb0a9e0b06f5dde
|
firebase_messaging: bf0e29321927edc02a563c984dbfa5b063864b15
|
||||||
FirebaseAnalytics: 0fc2b20091f0ddd21bf73397cf8f0eb5346dc24f
|
FirebaseAnalytics: d0a97a0db6425e5a5d966340b87f92ca7b13a557
|
||||||
FirebaseCore: bb595f3114953664e3c1dc032f008a244147cfd3
|
FirebaseCore: 0e38ad5d62d980a47a64b8e9301ffa311457be04
|
||||||
FirebaseCoreExtension: 7e1f7118ee970e001a8013719fb90950ee5e0018
|
FirebaseCoreExtension: 032fd6f8509e591fda8cb76f6651f20d926b121f
|
||||||
FirebaseCoreInternal: d7f5a043c2cd01a08103ab586587c1468047bca6
|
FirebaseCoreInternal: 69bf1306a05b8ac43004f6cc1f804bb7b05b229e
|
||||||
FirebaseCrashlytics: a6ece278a837c7e88de2d9b5da0a3542f2342395
|
FirebaseCrashlytics: 3d6248c50726ee7832aef0e53cb84c9e64d9fa7e
|
||||||
FirebaseInstallations: ae9f4902cb5bf1d0c5eaa31ec1f4e5495a0714e2
|
FirebaseInstallations: 631b38da2e11a83daa4bfb482f79d286a5dfa7ad
|
||||||
FirebaseMessaging: d33971b7bb252745ea6cd31ab190d1a1df4b8ed5
|
FirebaseMessaging: a61bc42dcab3f7a346d94bbb54dab2c9435b18b2
|
||||||
FirebaseRemoteConfigInterop: 1e31ec72b89c9924367c59bfb5ec9ab60d1d6766
|
FirebaseRemoteConfigInterop: 3443b8cb8fffd76bb3e03b2a84bfd3db952fcda4
|
||||||
FirebaseSessions: ba7c7a7ca8696a8d540eb3fe3800fbe98c79786d
|
FirebaseSessions: 2e8f808347e665dff3e5843f275715f07045297d
|
||||||
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
|
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
|
||||||
flutter_app_update: 816fdb2e30e4832a7c45e3f108d391c42ef040a9
|
flutter_app_update: 816fdb2e30e4832a7c45e3f108d391c42ef040a9
|
||||||
flutter_inappwebview_ios: b89ba3482b96fb25e00c967aae065701b66e9b99
|
flutter_inappwebview_ios: b89ba3482b96fb25e00c967aae065701b66e9b99
|
||||||
flutter_keyboard_visibility: 4625131e43015dbbe759d9b20daaf77e0e3f6619
|
flutter_keyboard_visibility: 4625131e43015dbbe759d9b20daaf77e0e3f6619
|
||||||
flutter_local_notifications: a5a732f069baa862e728d839dd2ebb904737effb
|
flutter_local_notifications: a5a732f069baa862e728d839dd2ebb904737effb
|
||||||
flutter_native_splash: c32d145d68aeda5502d5f543ee38c192065986cf
|
flutter_native_splash: c32d145d68aeda5502d5f543ee38c192065986cf
|
||||||
flutter_platform_alert: bf3b5fcd4ac14bd637e20527e9c471633071afd3
|
flutter_secure_storage_darwin: acdb3f316ed05a3e68f856e0353b133eec373a23
|
||||||
flutter_secure_storage: 1ed9476fba7e7a782b22888f956cce43e2c62f13
|
|
||||||
flutter_timezone: 7c838e17ffd4645d261e87037e5bebf6d38fe544
|
flutter_timezone: 7c838e17ffd4645d261e87037e5bebf6d38fe544
|
||||||
flutter_udid: f7c3884e6ec2951efe4f9de082257fc77c4d15e9
|
flutter_udid: 92a5d31fe0526b7b6002a2318df702e12e7eb300
|
||||||
flutter_webrtc: c3e21fc0dcd9d8eb246ae4d5256fcbeb2f5ecd22
|
flutter_webrtc: c3e21fc0dcd9d8eb246ae4d5256fcbeb2f5ecd22
|
||||||
gal: baecd024ebfd13c441269ca7404792a7152fde89
|
gal: baecd024ebfd13c441269ca7404792a7152fde89
|
||||||
GoogleAdsOnDeviceConversion: e03a386840803ea7eef3fd22a061930142c039c1
|
GoogleAdsOnDeviceConversion: d68c69dd9581a0f5da02617b6f377e5be483970f
|
||||||
GoogleAppMeasurement: 1e718274b7e015cefd846ac1fcf7820c70dc017d
|
GoogleAppMeasurement: 3bf40aff49a601af5da1c3345702fcb4991d35ee
|
||||||
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
|
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
|
||||||
GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
|
GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
|
||||||
image_picker_ios: e0ece4aa2a75771a7de3fa735d26d90817041326
|
image_picker_ios: e0ece4aa2a75771a7de3fa735d26d90817041326
|
||||||
|
in_app_review: 7dd1ea365263f834b8464673f9df72c80c17c937
|
||||||
irondash_engine_context: 8e58ca8e0212ee9d1c7dc6a42121849986c88486
|
irondash_engine_context: 8e58ca8e0212ee9d1c7dc6a42121849986c88486
|
||||||
Kingfisher: 7ac7a7288653787a54206b11a3c74f49ab650f1f
|
KeychainAccess: c0c4f7f38f6fc7bbe58f5702e25f7bd2f65abf51
|
||||||
|
Kingfisher: 23d18f54677d973b713e54ce6a8f5eef6e7056ba
|
||||||
KingfisherWebP: 38b9721821947f547afb78f933f75f4f9e0ae402
|
KingfisherWebP: 38b9721821947f547afb78f933f75f4f9e0ae402
|
||||||
libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8
|
libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8
|
||||||
livekit_client: 86c8af579274e4b7a215185a8080db2d4e176f40
|
livekit_client: 53ca658779b78710fb458cccee28b53a13356c15
|
||||||
local_auth_darwin: c3ee6cce0a8d56be34c8ccb66ba31f7f180aaebb
|
local_auth_darwin: c3ee6cce0a8d56be34c8ccb66ba31f7f180aaebb
|
||||||
media_kit_libs_ios_video: 5a18affdb97d1f5d466dc79988b13eff6c5e2854
|
media_kit_libs_ios_video: 5a18affdb97d1f5d466dc79988b13eff6c5e2854
|
||||||
media_kit_video: 1746e198cb697d1ffb734b1d05ec429d1fcd1474
|
media_kit_video: 1746e198cb697d1ffb734b1d05ec429d1fcd1474
|
||||||
@@ -549,25 +556,25 @@ SPEC CHECKSUMS:
|
|||||||
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
|
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
|
||||||
pasteboard: 49088aeb6119d51f976a421db60d8e1ab079b63c
|
pasteboard: 49088aeb6119d51f976a421db60d8e1ab079b63c
|
||||||
path_provider_foundation: bb55f6dbba17d0dccd6737fe6f7f34fbd0376880
|
path_provider_foundation: bb55f6dbba17d0dccd6737fe6f7f34fbd0376880
|
||||||
|
permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d
|
||||||
pointer_interceptor_ios: da06a662d5bfd329602b45b2ab41bc0fb5fdb0f0
|
pointer_interceptor_ios: da06a662d5bfd329602b45b2ab41bc0fb5fdb0f0
|
||||||
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||||
PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851
|
PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851
|
||||||
protocol_handler_ios: 59f23ee71f3ec602d67902ca7f669a80957888d5
|
protocol_handler_ios: 59f23ee71f3ec602d67902ca7f669a80957888d5
|
||||||
receive_sharing_intent: 222384f00ffe7e952bbfabaa9e3967cb87e5fe00
|
receive_sharing_intent: 222384f00ffe7e952bbfabaa9e3967cb87e5fe00
|
||||||
record_ios: f75fa1d57f840012775c0e93a38a7f3ceea1a374
|
record_ios: f75fa1d57f840012775c0e93a38a7f3ceea1a374
|
||||||
SAMKeychain: 483e1c9f32984d50ca961e26818a534283b4cd5c
|
SDWebImage: e9c98383c7572d713c1a0d7dd2783b10599b9838
|
||||||
SDWebImage: 16309af6d214ba3f77a7c6f6fdda888cb313a50a
|
sensors_plus: 6a11ed0c2e1d0bd0b20b4029d3bad27d96e0c65b
|
||||||
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
|
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
|
||||||
shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
|
shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
|
||||||
sign_in_with_apple: c5dcc141574c8c54d5ac99dd2163c0c72ad22418
|
sign_in_with_apple: c5dcc141574c8c54d5ac99dd2163c0c72ad22418
|
||||||
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
|
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
|
||||||
sqlite3: 73513155ec6979715d3904ef53a8d68892d4032b
|
sqlite3: 8d708bc63e9f4ce48f0ad9d6269e478c5ced1d9b
|
||||||
sqlite3_flutter_libs: 83f8e9f5b6554077f1d93119fe20ebaa5f3a9ef1
|
sqlite3_flutter_libs: d13b8b3003f18f596e542bcb9482d105577eff41
|
||||||
super_native_extensions: b763c02dc3a8fd078389f410bf15149179020cb4
|
super_native_extensions: b763c02dc3a8fd078389f410bf15149179020cb4
|
||||||
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
|
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
|
||||||
syncfusion_flutter_pdfviewer: 90dc48305d2e33d4aa20681d1e98ddeda891bc14
|
syncfusion_flutter_pdfviewer: 90dc48305d2e33d4aa20681d1e98ddeda891bc14
|
||||||
url_launcher_ios: 7a95fa5b60cc718a708b8f2966718e93db0cef1b
|
url_launcher_ios: 7a95fa5b60cc718a708b8f2966718e93db0cef1b
|
||||||
volume_controller: 3657a1f65bedb98fa41ff7dc5793537919f31b12
|
|
||||||
wakelock_plus: e29112ab3ef0b318e58cfa5c32326458be66b556
|
wakelock_plus: e29112ab3ef0b318e58cfa5c32326458be66b556
|
||||||
WebRTC-SDK: 40d4f5ba05cadff14e4db5614aec402a633f007e
|
WebRTC-SDK: 40d4f5ba05cadff14e4db5614aec402a633f007e
|
||||||
|
|
||||||
|
|||||||
@@ -1085,8 +1085,8 @@
|
|||||||
baseConfigurationReference = 31EA49B10397BD4145AD765E /* Pods-Solian Watch App.debug.xcconfig */;
|
baseConfigurationReference = 31EA49B10397BD4145AD765E /* Pods-Solian Watch App.debug.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon;
|
||||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
@@ -1136,8 +1136,8 @@
|
|||||||
baseConfigurationReference = 2440CEDEAAD6D51FDA95FA62 /* Pods-Solian Watch App.release.xcconfig */;
|
baseConfigurationReference = 2440CEDEAAD6D51FDA95FA62 /* Pods-Solian Watch App.release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon;
|
||||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
@@ -1185,8 +1185,8 @@
|
|||||||
baseConfigurationReference = 0ECC3D56D018DD87FC342699 /* Pods-Solian Watch App.profile.xcconfig */;
|
baseConfigurationReference = 0ECC3D56D018DD87FC342699 /* Pods-Solian Watch App.profile.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon;
|
||||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
@@ -1232,7 +1232,7 @@
|
|||||||
73ACDFC42E3D0E6100B63535 /* Debug */ = {
|
73ACDFC42E3D0E6100B63535 /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
@@ -1274,7 +1274,7 @@
|
|||||||
73ACDFC52E3D0E6100B63535 /* Release */ = {
|
73ACDFC52E3D0E6100B63535 /* Release */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
@@ -1313,7 +1313,7 @@
|
|||||||
73ACDFC62E3D0E6100B63535 /* Profile */ = {
|
73ACDFC62E3D0E6100B63535 /* Profile */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
@@ -1353,7 +1353,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 17FAB080A9C53193ABD9C15B /* Pods-SolianShareExtension.debug.xcconfig */;
|
baseConfigurationReference = 17FAB080A9C53193ABD9C15B /* Pods-SolianShareExtension.debug.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
@@ -1398,7 +1398,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 27C66EFB5A705F1A822C3EB0 /* Pods-SolianShareExtension.release.xcconfig */;
|
baseConfigurationReference = 27C66EFB5A705F1A822C3EB0 /* Pods-SolianShareExtension.release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
@@ -1440,7 +1440,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = A85FF612AE7623A9934E57CE /* Pods-SolianShareExtension.profile.xcconfig */;
|
baseConfigurationReference = A85FF612AE7623A9934E57CE /* Pods-SolianShareExtension.profile.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
@@ -1482,7 +1482,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = F830F535CB92E3F2E1653A11 /* Pods-SolianNotificationService.debug.xcconfig */;
|
baseConfigurationReference = F830F535CB92E3F2E1653A11 /* Pods-SolianNotificationService.debug.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
@@ -1524,7 +1524,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = B93771F2A63E4148DC6142F7 /* Pods-SolianNotificationService.release.xcconfig */;
|
baseConfigurationReference = B93771F2A63E4148DC6142F7 /* Pods-SolianNotificationService.release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
@@ -1563,7 +1563,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 8B40620B1EEBB09456406A3C /* Pods-SolianNotificationService.profile.xcconfig */;
|
baseConfigurationReference = 8B40620B1EEBB09456406A3C /* Pods-SolianNotificationService.profile.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
|
|||||||
@@ -1,334 +1 @@
|
|||||||
{
|
{"images":[{"size":"20x20","idiom":"universal","filename":"Icon-App-20x20@2x.png","scale":"2x","platform":"ios"},{"size":"20x20","idiom":"universal","filename":"Icon-App-20x20@3x.png","scale":"3x","platform":"ios"},{"size":"29x29","idiom":"universal","filename":"Icon-App-29x29@2x.png","scale":"2x","platform":"ios"},{"size":"29x29","idiom":"universal","filename":"Icon-App-29x29@3x.png","scale":"3x","platform":"ios"},{"size":"38x38","idiom":"universal","filename":"Icon-App-38x38@2x.png","scale":"2x","platform":"ios"},{"size":"38x38","idiom":"universal","filename":"Icon-App-38x38@3x.png","scale":"3x","platform":"ios"},{"size":"40x40","idiom":"universal","filename":"Icon-App-40x40@2x.png","scale":"2x","platform":"ios"},{"size":"40x40","idiom":"universal","filename":"Icon-App-40x40@3x.png","scale":"3x","platform":"ios"},{"size":"60x60","idiom":"universal","filename":"Icon-App-60x60@2x.png","scale":"2x","platform":"ios"},{"size":"60x60","idiom":"universal","filename":"Icon-App-60x60@3x.png","scale":"3x","platform":"ios"},{"size":"64x64","idiom":"universal","filename":"Icon-App-64x64@2x.png","scale":"2x","platform":"ios"},{"size":"64x64","idiom":"universal","filename":"Icon-App-64x64@3x.png","scale":"3x","platform":"ios"},{"size":"68x68","idiom":"universal","filename":"Icon-App-68x68@2x.png","scale":"2x","platform":"ios"},{"size":"76x76","idiom":"universal","filename":"Icon-App-76x76@2x.png","scale":"2x","platform":"ios"},{"size":"83.5x83.5","idiom":"universal","filename":"Icon-App-83.5x83.5@2x.png","scale":"2x","platform":"ios"},{"size":"1024x1024","idiom":"universal","filename":"Icon-App-1024x1024@1x.png","scale":"1x","platform":"ios"},{"size":"1024x1024","idiom":"ios-marketing","filename":"Icon-App-1024x1024@1x.png","scale":"1x"},{"size":"20x20","idiom":"universal","filename":"Icon-App-Dark-20x20@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"20x20","idiom":"universal","filename":"Icon-App-Dark-20x20@3x.png","scale":"3x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"29x29","idiom":"universal","filename":"Icon-App-Dark-29x29@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"29x29","idiom":"universal","filename":"Icon-App-Dark-29x29@3x.png","scale":"3x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"38x38","idiom":"universal","filename":"Icon-App-Dark-38x38@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"38x38","idiom":"universal","filename":"Icon-App-Dark-38x38@3x.png","scale":"3x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"40x40","idiom":"universal","filename":"Icon-App-Dark-40x40@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"40x40","idiom":"universal","filename":"Icon-App-Dark-40x40@3x.png","scale":"3x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"60x60","idiom":"universal","filename":"Icon-App-Dark-60x60@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"60x60","idiom":"universal","filename":"Icon-App-Dark-60x60@3x.png","scale":"3x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"64x64","idiom":"universal","filename":"Icon-App-Dark-64x64@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"64x64","idiom":"universal","filename":"Icon-App-Dark-64x64@3x.png","scale":"3x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"68x68","idiom":"universal","filename":"Icon-App-Dark-68x68@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"76x76","idiom":"universal","filename":"Icon-App-Dark-76x76@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"83.5x83.5","idiom":"universal","filename":"Icon-App-Dark-83.5x83.5@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"1024x1024","idiom":"universal","filename":"Icon-App-Dark-1024x1024@1x.png","scale":"1x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]}],"info":{"version":1,"author":"xcode"}}
|
||||||
"images" : [
|
|
||||||
{
|
|
||||||
"filename" : "Icon-App-20x20@2x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "20x20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename" : "Icon-App-20x20@3x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "3x",
|
|
||||||
"size" : "20x20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename" : "Icon-App-29x29@2x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "29x29"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename" : "Icon-App-29x29@3x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "3x",
|
|
||||||
"size" : "29x29"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename" : "Icon-App-38x38@2x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "38x38"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename" : "Icon-App-38x38@3x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "3x",
|
|
||||||
"size" : "38x38"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename" : "Icon-App-40x40@2x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "40x40"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename" : "Icon-App-40x40@3x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "3x",
|
|
||||||
"size" : "40x40"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename" : "Icon-App-60x60@2x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "60x60"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename" : "Icon-App-60x60@3x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "3x",
|
|
||||||
"size" : "60x60"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename" : "Icon-App-64x64@2x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "64x64"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename" : "Icon-App-64x64@3x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "3x",
|
|
||||||
"size" : "64x64"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename" : "Icon-App-68x68@2x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "68x68"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename" : "Icon-App-76x76@2x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "76x76"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "83.5x83.5"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename" : "Icon-App-1024x1024@1x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "1x",
|
|
||||||
"size" : "1024x1024"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"filename" : "Icon-App-Dark-20x20@2x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "20x20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"filename" : "Icon-App-Dark-20x20@3x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "3x",
|
|
||||||
"size" : "20x20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"filename" : "Icon-App-Dark-29x29@2x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "29x29"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"filename" : "Icon-App-Dark-29x29@3x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "3x",
|
|
||||||
"size" : "29x29"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"filename" : "Icon-App-Dark-38x38@2x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "38x38"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"filename" : "Icon-App-Dark-38x38@3x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "3x",
|
|
||||||
"size" : "38x38"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"filename" : "Icon-App-Dark-40x40@2x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "40x40"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"filename" : "Icon-App-Dark-40x40@3x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "3x",
|
|
||||||
"size" : "40x40"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"filename" : "Icon-App-Dark-60x60@2x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "60x60"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"filename" : "Icon-App-Dark-60x60@3x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "3x",
|
|
||||||
"size" : "60x60"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"filename" : "Icon-App-Dark-64x64@2x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "64x64"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"filename" : "Icon-App-Dark-64x64@3x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "3x",
|
|
||||||
"size" : "64x64"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"filename" : "Icon-App-Dark-68x68@2x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "68x68"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"filename" : "Icon-App-Dark-76x76@2x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "76x76"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"filename" : "Icon-App-Dark-83.5x83.5@2x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "83.5x83.5"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"filename" : "Icon-App-Dark-1024x1024@1x.png",
|
|
||||||
"idiom" : "universal",
|
|
||||||
"platform" : "ios",
|
|
||||||
"scale" : "1x",
|
|
||||||
"size" : "1024x1024"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename" : "Icon-App-1024x1024@1x.png",
|
|
||||||
"idiom" : "ios-marketing",
|
|
||||||
"scale" : "1x",
|
|
||||||
"size" : "1024x1024"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"info" : {
|
|
||||||
"author" : "xcode",
|
|
||||||
"version" : 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<key>BUNDLE_ID</key>
|
<key>BUNDLE_ID</key>
|
||||||
<string>dev.solsynth.solian</string>
|
<string>dev.solsynth.solian</string>
|
||||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||||
<true />
|
<true/>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
<key>CFBundleDisplayName</key>
|
<key>CFBundleDisplayName</key>
|
||||||
@@ -52,16 +52,15 @@
|
|||||||
<key>CLIENT_ID</key>
|
<key>CLIENT_ID</key>
|
||||||
<string>961776991058-stt7et4qvn3cpscl4r61gl1hnlatqkig.apps.googleusercontent.com</string>
|
<string>961776991058-stt7et4qvn3cpscl4r61gl1hnlatqkig.apps.googleusercontent.com</string>
|
||||||
<key>ITSAppUsesNonExemptEncryption</key>
|
<key>ITSAppUsesNonExemptEncryption</key>
|
||||||
<false />
|
<false/>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true />
|
<true/>
|
||||||
<key>NSCalendarsUsageDescription</key>
|
<key>NSCalendarsUsageDescription</key>
|
||||||
<string>Grant access to Calander help us to shows Solar Calander with your own events.</string>
|
<string>Grant access to Calander help us to shows Solar Calander with your own events.</string>
|
||||||
<key>NSCameraUsageDescription</key>
|
<key>NSCameraUsageDescription</key>
|
||||||
<string>Grant access to Camera will allow Solian take photo or video for your post.</string>
|
<string>Grant access to Camera will allow Solian take photo or video for your post.</string>
|
||||||
<key>NSFaceIDUsageDescription</key>
|
<key>NSFaceIDUsageDescription</key>
|
||||||
<string>Allow the Solar Network verify your ownership of the logged in account and continue
|
<string>Allow the Solar Network verify your ownership of the logged in account and continue your action quickly.</string>
|
||||||
your action quickly.</string>
|
|
||||||
<key>NSMicrophoneUsageDescription</key>
|
<key>NSMicrophoneUsageDescription</key>
|
||||||
<string>Grant access to Microphone will allow Solian record audio for your post.</string>
|
<string>Grant access to Microphone will allow Solian record audio for your post.</string>
|
||||||
<key>NSPhotoLibraryAddUsageDescription</key>
|
<key>NSPhotoLibraryAddUsageDescription</key>
|
||||||
@@ -78,7 +77,7 @@
|
|||||||
<key>REVERSED_CLIENT_ID</key>
|
<key>REVERSED_CLIENT_ID</key>
|
||||||
<string>com.googleusercontent.apps.961776991058-stt7et4qvn3cpscl4r61gl1hnlatqkig</string>
|
<string>com.googleusercontent.apps.961776991058-stt7et4qvn3cpscl4r61gl1hnlatqkig</string>
|
||||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||||
<true />
|
<true/>
|
||||||
<key>UIBackgroundModes</key>
|
<key>UIBackgroundModes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>fetch</string>
|
<string>fetch</string>
|
||||||
@@ -91,7 +90,7 @@
|
|||||||
<key>UIMainStoryboardFile</key>
|
<key>UIMainStoryboardFile</key>
|
||||||
<string>Main</string>
|
<string>Main</string>
|
||||||
<key>UIStatusBarHidden</key>
|
<key>UIStatusBarHidden</key>
|
||||||
<false />
|
<false/>
|
||||||
<key>UISupportedInterfaceOrientations</key>
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
<array>
|
<array>
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
|||||||
@@ -140,21 +140,29 @@ class NotificationService: UNNotificationServiceExtension {
|
|||||||
|
|
||||||
guard !attachmentUrls.isEmpty else {
|
guard !attachmentUrls.isEmpty else {
|
||||||
print("Invalid URLs for attachments: \(attachmentUrls)")
|
print("Invalid URLs for attachments: \(attachmentUrls)")
|
||||||
|
self.contentHandler?(content)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let targetSize = 512
|
let targetSize = 512
|
||||||
let scaleProcessor = ResizingImageProcessor(referenceSize: CGSize(width: targetSize, height: targetSize), mode: .aspectFit)
|
let scaleProcessor = ResizingImageProcessor(referenceSize: CGSize(width: targetSize, height: targetSize), mode: .aspectFit)
|
||||||
|
|
||||||
|
let dispatchGroup = DispatchGroup()
|
||||||
|
var attachments: [UNNotificationAttachment] = []
|
||||||
|
let lock = NSLock() // To synchronize access to the attachments array
|
||||||
|
|
||||||
for attachmentUrl in attachmentUrls {
|
for attachmentUrl in attachmentUrls {
|
||||||
guard let remoteUrl = URL(string: attachmentUrl) else {
|
guard let remoteUrl = URL(string: attachmentUrl) else {
|
||||||
print("Invalid URL for attachment: \(attachmentUrl)")
|
print("Invalid URL for attachment: \(attachmentUrl)")
|
||||||
continue // Skip this URL and move to the next one
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dispatchGroup.enter()
|
||||||
|
|
||||||
KingfisherManager.shared.retrieveImage(with: remoteUrl, options: scaleDown ? [
|
KingfisherManager.shared.retrieveImage(with: remoteUrl, options: scaleDown ? [
|
||||||
.processor(scaleProcessor)
|
.processor(scaleProcessor)
|
||||||
] : nil) { [weak self] result in
|
] : nil) { [weak self] result in
|
||||||
|
defer { dispatchGroup.leave() }
|
||||||
guard let self = self else { return }
|
guard let self = self else { return }
|
||||||
|
|
||||||
switch result {
|
switch result {
|
||||||
@@ -166,49 +174,34 @@ class NotificationService: UNNotificationServiceExtension {
|
|||||||
do {
|
do {
|
||||||
// Write the image data to a temporary file for UNNotificationAttachment
|
// Write the image data to a temporary file for UNNotificationAttachment
|
||||||
try retrievalResult.image.pngData()?.write(to: cachedFileUrl)
|
try retrievalResult.image.pngData()?.write(to: cachedFileUrl)
|
||||||
self.attachLocalMedia(to: content, fileType: type?.identifier, from: cachedFileUrl, withIdentifier: attachmentUrl)
|
|
||||||
|
if let attachment = try? UNNotificationAttachment(identifier: attachmentUrl, url: cachedFileUrl, options: [
|
||||||
|
UNNotificationAttachmentOptionsTypeHintKey: type?.identifier as Any,
|
||||||
|
UNNotificationAttachmentOptionsThumbnailHiddenKey: 0,
|
||||||
|
]) {
|
||||||
|
lock.lock()
|
||||||
|
attachments.append(attachment)
|
||||||
|
lock.unlock()
|
||||||
|
}
|
||||||
} catch {
|
} catch {
|
||||||
print("Failed to write media to temporary file: \(error.localizedDescription)")
|
print("Failed to write media to temporary file: \(error.localizedDescription)")
|
||||||
self.contentHandler?(content)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case .failure(let error):
|
case .failure(let error):
|
||||||
print("Failed to retrieve image: \(error.localizedDescription)")
|
print("Failed to retrieve image: \(error.localizedDescription)")
|
||||||
self.contentHandler?(content)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private func attachLocalMedia(to content: UNMutableNotificationContent, fileType type: String?, from localUrl: URL, withIdentifier identifier: String) {
|
|
||||||
do {
|
|
||||||
let attachment = try UNNotificationAttachment(identifier: identifier, url: localUrl, options: [
|
|
||||||
UNNotificationAttachmentOptionsTypeHintKey: type as Any,
|
|
||||||
UNNotificationAttachmentOptionsThumbnailHiddenKey: 0,
|
|
||||||
])
|
|
||||||
content.attachments = [attachment]
|
|
||||||
} catch let error as NSError {
|
|
||||||
// Log detailed error information
|
|
||||||
print("Failed to create attachment from file at \(localUrl.path)")
|
|
||||||
print("Error: \(error.localizedDescription)")
|
|
||||||
|
|
||||||
// Check specific error codes if needed
|
|
||||||
if error.domain == NSCocoaErrorDomain {
|
|
||||||
switch error.code {
|
|
||||||
case NSFileReadNoSuchFileError:
|
|
||||||
print("File does not exist at \(localUrl.path)")
|
|
||||||
case NSFileReadNoPermissionError:
|
|
||||||
print("No permission to read file at \(localUrl.path)")
|
|
||||||
default:
|
|
||||||
print("Unhandled file error: \(error.code)")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call content handler regardless of success or failure
|
dispatchGroup.notify(queue: .main) { [weak self] in
|
||||||
self.contentHandler?(content)
|
guard let self = self else { return }
|
||||||
|
content.attachments = attachments
|
||||||
|
self.contentHandler?(content)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private func createMessageIntent(with sender: INPerson, meta: [AnyHashable: Any], body: String) -> INSendMessageIntent {
|
private func createMessageIntent(with sender: INPerson, meta: [AnyHashable: Any], body: String) -> INSendMessageIntent {
|
||||||
INSendMessageIntent(
|
INSendMessageIntent(
|
||||||
recipients: nil,
|
recipients: nil,
|
||||||
|
|||||||
@@ -2,17 +2,22 @@ import 'dart:convert';
|
|||||||
import 'package:drift/drift.dart';
|
import 'package:drift/drift.dart';
|
||||||
import 'package:island/database/message.dart';
|
import 'package:island/database/message.dart';
|
||||||
import 'package:island/database/draft.dart';
|
import 'package:island/database/draft.dart';
|
||||||
|
import 'package:island/models/account.dart';
|
||||||
|
import 'package:island/models/chat.dart';
|
||||||
import 'package:island/models/post.dart';
|
import 'package:island/models/post.dart';
|
||||||
|
import 'package:island/models/realm.dart';
|
||||||
|
|
||||||
part 'drift_db.g.dart';
|
part 'drift_db.g.dart';
|
||||||
|
|
||||||
// Define the database
|
// Define the database
|
||||||
@DriftDatabase(tables: [ChatMessages, PostDrafts])
|
@DriftDatabase(
|
||||||
|
tables: [Realms, ChatRooms, ChatMembers, ChatMessages, PostDrafts],
|
||||||
|
)
|
||||||
class AppDatabase extends _$AppDatabase {
|
class AppDatabase extends _$AppDatabase {
|
||||||
AppDatabase(super.e);
|
AppDatabase(super.e);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get schemaVersion => 7;
|
int get schemaVersion => 12;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
MigrationStrategy get migration => MigrationStrategy(
|
MigrationStrategy get migration => MigrationStrategy(
|
||||||
@@ -55,6 +60,49 @@ class AppDatabase extends _$AppDatabase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (from < 8) {
|
||||||
|
// Add new tables for separate sender and room data
|
||||||
|
await m.createTable(chatRooms);
|
||||||
|
await m.createTable(chatMembers);
|
||||||
|
}
|
||||||
|
if (from < 9) {
|
||||||
|
// Remove unused columns from chat_members
|
||||||
|
await customStatement('ALTER TABLE chat_members DROP COLUMN role');
|
||||||
|
await customStatement('ALTER TABLE chat_members DROP COLUMN is_bot');
|
||||||
|
await customStatement('ALTER TABLE chat_members DROP COLUMN status');
|
||||||
|
await customStatement(
|
||||||
|
'ALTER TABLE chat_members DROP COLUMN last_typed',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (from < 10) {
|
||||||
|
// Add realms table and update chat_rooms foreign key
|
||||||
|
await m.createTable(realms);
|
||||||
|
// The realmId column in chat_rooms already exists, just need to ensure the foreign key constraint
|
||||||
|
}
|
||||||
|
if (from < 11) {
|
||||||
|
// Add isPinned column to chat_rooms table
|
||||||
|
await customStatement(
|
||||||
|
'ALTER TABLE chat_rooms ADD COLUMN is_pinned INTEGER DEFAULT 0',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (from < 12) {
|
||||||
|
// Add new columns to realms table
|
||||||
|
await customStatement(
|
||||||
|
'ALTER TABLE realms ADD COLUMN slug TEXT NOT NULL DEFAULT \'\'',
|
||||||
|
);
|
||||||
|
await customStatement(
|
||||||
|
'ALTER TABLE realms ADD COLUMN verified_as TEXT NULL',
|
||||||
|
);
|
||||||
|
await customStatement(
|
||||||
|
'ALTER TABLE realms ADD COLUMN verified_at DATETIME NULL',
|
||||||
|
);
|
||||||
|
await customStatement(
|
||||||
|
'ALTER TABLE realms ADD COLUMN is_community INTEGER NOT NULL DEFAULT 0',
|
||||||
|
);
|
||||||
|
await customStatement(
|
||||||
|
'ALTER TABLE realms ADD COLUMN is_public INTEGER NOT NULL DEFAULT 0',
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -76,11 +124,10 @@ class AppDatabase extends _$AppDatabase {
|
|||||||
|
|
||||||
// Migrate existing data if any
|
// Migrate existing data if any
|
||||||
try {
|
try {
|
||||||
final oldDrafts =
|
final oldDrafts = await customSelect(
|
||||||
await customSelect(
|
'SELECT id, post, lastModified FROM post_drafts_old',
|
||||||
'SELECT id, post, lastModified FROM post_drafts_old',
|
readsFrom: {postDrafts},
|
||||||
readsFrom: {postDrafts},
|
).get();
|
||||||
).get();
|
|
||||||
|
|
||||||
for (final row in oldDrafts) {
|
for (final row in oldDrafts) {
|
||||||
final postJson = row.read<String>('post');
|
final postJson = row.read<String>('post');
|
||||||
@@ -134,9 +181,9 @@ class AppDatabase extends _$AppDatabase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<int> updateMessageStatus(String id, MessageStatus status) {
|
Future<int> updateMessageStatus(String id, MessageStatus status) {
|
||||||
return (update(chatMessages)..where(
|
return (update(chatMessages)..where((m) => m.id.equals(id))).write(
|
||||||
(m) => m.id.equals(id),
|
ChatMessagesCompanion(status: Value(status)),
|
||||||
)).write(ChatMessagesCompanion(status: Value(status)));
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<int> deleteMessage(String id) {
|
Future<int> deleteMessage(String id) {
|
||||||
@@ -153,32 +200,36 @@ class AppDatabase extends _$AppDatabase {
|
|||||||
String roomId,
|
String roomId,
|
||||||
String query, {
|
String query, {
|
||||||
bool? withAttachments,
|
bool? withAttachments,
|
||||||
|
Future<SnAccount?> Function(String accountId)? fetchAccount,
|
||||||
}) async {
|
}) async {
|
||||||
var selectStatement = select(chatMessages)
|
var selectStatement = select(chatMessages)
|
||||||
..where((m) => m.roomId.equals(roomId));
|
..where((m) => m.roomId.equals(roomId));
|
||||||
|
|
||||||
if (query.isNotEmpty) {
|
if (query.isNotEmpty) {
|
||||||
final searchTerm = '%$query%';
|
final searchTerm = '%$query%';
|
||||||
selectStatement =
|
selectStatement = selectStatement
|
||||||
selectStatement..where(
|
..where(
|
||||||
(m) =>
|
(m) =>
|
||||||
m.content.like(searchTerm) |
|
m.content.like(searchTerm) |
|
||||||
m.meta.like(searchTerm) |
|
m.meta.like(searchTerm) |
|
||||||
m.attachments.like(searchTerm) |
|
m.attachments.like(searchTerm) |
|
||||||
m.type.like(searchTerm),
|
m.type.like(searchTerm),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (withAttachments == true) {
|
if (withAttachments == true) {
|
||||||
selectStatement =
|
selectStatement = selectStatement
|
||||||
selectStatement..where((m) => m.attachments.equals('[]').not());
|
..where((m) => m.attachments.equals('[]').not());
|
||||||
}
|
}
|
||||||
|
|
||||||
final messages =
|
final messages =
|
||||||
await (selectStatement
|
await (selectStatement
|
||||||
..orderBy([(m) => OrderingTerm.desc(m.createdAt)]))
|
..orderBy([(m) => OrderingTerm.desc(m.createdAt)]))
|
||||||
.get();
|
.get();
|
||||||
return messages.map((msg) => companionToMessage(msg)).toList();
|
final messageFutures = messages
|
||||||
|
.map((msg) => companionToMessage(msg, fetchAccount: fetchAccount))
|
||||||
|
.toList();
|
||||||
|
return await Future.wait(messageFutures);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert between Drift and model objects
|
// Convert between Drift and model objects
|
||||||
@@ -206,12 +257,84 @@ class AppDatabase extends _$AppDatabase {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalChatMessage companionToMessage(ChatMessage dbMessage) {
|
Future<LocalChatMessage> companionToMessage(
|
||||||
|
ChatMessage dbMessage, {
|
||||||
|
Future<SnAccount?> Function(String accountId)? fetchAccount,
|
||||||
|
}) async {
|
||||||
final data = jsonDecode(dbMessage.data);
|
final data = jsonDecode(dbMessage.data);
|
||||||
|
SnChatMember? sender;
|
||||||
|
try {
|
||||||
|
final senderRow = await (select(
|
||||||
|
chatMembers,
|
||||||
|
)..where((m) => m.id.equals(dbMessage.senderId))).getSingle();
|
||||||
|
SnAccount senderAccount;
|
||||||
|
senderAccount = SnAccount.fromJson(senderRow.account);
|
||||||
|
|
||||||
|
sender = SnChatMember(
|
||||||
|
id: senderRow.id,
|
||||||
|
chatRoomId: senderRow.chatRoomId,
|
||||||
|
accountId: senderRow.accountId,
|
||||||
|
account: senderAccount,
|
||||||
|
nick: senderRow.nick,
|
||||||
|
notify: senderRow.notify,
|
||||||
|
joinedAt: senderRow.joinedAt,
|
||||||
|
breakUntil: senderRow.breakUntil,
|
||||||
|
timeoutUntil: senderRow.timeoutUntil,
|
||||||
|
status: null,
|
||||||
|
createdAt: senderRow.createdAt,
|
||||||
|
updatedAt: senderRow.updatedAt,
|
||||||
|
deletedAt: senderRow.deletedAt,
|
||||||
|
chatRoom: null,
|
||||||
|
);
|
||||||
|
} catch (err) {
|
||||||
|
// Fallback to dummy sender with senderId as display name
|
||||||
|
sender = SnChatMember(
|
||||||
|
id: 'unknown',
|
||||||
|
chatRoomId: dbMessage.roomId,
|
||||||
|
accountId: dbMessage.senderId,
|
||||||
|
account: SnAccount(
|
||||||
|
id: 'unknown',
|
||||||
|
name: 'unknown',
|
||||||
|
nick: dbMessage.senderId, // Show the ID instead of Unknown
|
||||||
|
activatedAt: null,
|
||||||
|
profile: SnAccountProfile(
|
||||||
|
picture: null,
|
||||||
|
id: 'unknown',
|
||||||
|
experience: 0,
|
||||||
|
level: 1,
|
||||||
|
levelingProgress: 0.0,
|
||||||
|
background: null,
|
||||||
|
verification: null,
|
||||||
|
createdAt: DateTime.now(),
|
||||||
|
updatedAt: DateTime.now(),
|
||||||
|
deletedAt: null,
|
||||||
|
),
|
||||||
|
language: '',
|
||||||
|
isSuperuser: false,
|
||||||
|
automatedId: null,
|
||||||
|
perkSubscription: null,
|
||||||
|
deletedAt: null,
|
||||||
|
createdAt: DateTime.now(),
|
||||||
|
updatedAt: DateTime.now(),
|
||||||
|
),
|
||||||
|
nick: dbMessage.senderId, // Show the senderId as fallback
|
||||||
|
notify: 0,
|
||||||
|
joinedAt: null,
|
||||||
|
breakUntil: null,
|
||||||
|
timeoutUntil: null,
|
||||||
|
status: null,
|
||||||
|
lastTyped: null,
|
||||||
|
createdAt: DateTime.now(),
|
||||||
|
updatedAt: DateTime.now(),
|
||||||
|
deletedAt: null,
|
||||||
|
chatRoom: null,
|
||||||
|
);
|
||||||
|
}
|
||||||
return LocalChatMessage(
|
return LocalChatMessage(
|
||||||
id: dbMessage.id,
|
id: dbMessage.id,
|
||||||
roomId: dbMessage.roomId,
|
roomId: dbMessage.roomId,
|
||||||
senderId: dbMessage.senderId,
|
senderId: dbMessage.senderId,
|
||||||
|
sender: sender,
|
||||||
data: data,
|
data: data,
|
||||||
createdAt: dbMessage.createdAt,
|
createdAt: dbMessage.createdAt,
|
||||||
status: dbMessage.status,
|
status: dbMessage.status,
|
||||||
@@ -231,6 +354,129 @@ class AppDatabase extends _$AppDatabase {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ChatRoomsCompanion companionFromRoom(SnChatRoom room) {
|
||||||
|
return ChatRoomsCompanion(
|
||||||
|
id: Value(room.id),
|
||||||
|
name: Value(room.name),
|
||||||
|
description: Value(room.description),
|
||||||
|
type: Value(room.type),
|
||||||
|
isPublic: Value(room.isPublic),
|
||||||
|
isCommunity: Value(room.isCommunity),
|
||||||
|
picture: Value(room.picture?.toJson()),
|
||||||
|
background: Value(room.background?.toJson()),
|
||||||
|
realmId: Value(room.realmId),
|
||||||
|
accountId: Value(room.accountId),
|
||||||
|
createdAt: Value(room.createdAt),
|
||||||
|
updatedAt: Value(room.updatedAt),
|
||||||
|
deletedAt: Value(room.deletedAt),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
ChatMembersCompanion companionFromMember(SnChatMember member) {
|
||||||
|
return ChatMembersCompanion(
|
||||||
|
id: Value(member.id),
|
||||||
|
chatRoomId: Value(member.chatRoomId),
|
||||||
|
accountId: Value(member.accountId),
|
||||||
|
account: Value(member.account.toJson()),
|
||||||
|
nick: Value(member.nick),
|
||||||
|
notify: Value(member.notify),
|
||||||
|
joinedAt: Value(member.joinedAt),
|
||||||
|
breakUntil: Value(member.breakUntil),
|
||||||
|
timeoutUntil: Value(member.timeoutUntil),
|
||||||
|
createdAt: Value(member.createdAt),
|
||||||
|
updatedAt: Value(member.updatedAt),
|
||||||
|
deletedAt: Value(member.deletedAt),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
RealmsCompanion companionFromRealm(SnRealm realm) {
|
||||||
|
return RealmsCompanion(
|
||||||
|
id: Value(realm.id),
|
||||||
|
slug: Value(realm.slug),
|
||||||
|
name: Value(realm.name),
|
||||||
|
description: Value(realm.description),
|
||||||
|
verifiedAs: Value(realm.verifiedAs),
|
||||||
|
verifiedAt: Value(realm.verifiedAt),
|
||||||
|
isCommunity: Value(realm.isCommunity),
|
||||||
|
isPublic: Value(realm.isPublic),
|
||||||
|
picture: Value(realm.picture?.toJson()),
|
||||||
|
background: Value(realm.background?.toJson()),
|
||||||
|
accountId: Value(realm.accountId),
|
||||||
|
createdAt: Value(realm.createdAt),
|
||||||
|
updatedAt: Value(realm.updatedAt),
|
||||||
|
deletedAt: Value(realm.deletedAt),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> saveChatRooms(
|
||||||
|
List<SnChatRoom> rooms, {
|
||||||
|
bool override = false,
|
||||||
|
}) async {
|
||||||
|
await transaction(() async {
|
||||||
|
if (override) {
|
||||||
|
// 1. Identify rooms to remove
|
||||||
|
final remoteRoomIds = rooms.map((r) => r.id).toSet();
|
||||||
|
final currentRooms = await select(chatRooms).get();
|
||||||
|
final currentRoomIds = currentRooms.map((r) => r.id).toSet();
|
||||||
|
final idsToRemove = currentRoomIds.difference(remoteRoomIds);
|
||||||
|
|
||||||
|
if (idsToRemove.isNotEmpty) {
|
||||||
|
final idsList = idsToRemove.toList();
|
||||||
|
// Remove messages
|
||||||
|
await (delete(
|
||||||
|
chatMessages,
|
||||||
|
)..where((t) => t.roomId.isIn(idsList))).go();
|
||||||
|
// Remove members
|
||||||
|
await (delete(
|
||||||
|
chatMembers,
|
||||||
|
)..where((t) => t.chatRoomId.isIn(idsList))).go();
|
||||||
|
// Remove rooms
|
||||||
|
await (delete(chatRooms)..where((t) => t.id.isIn(idsList))).go();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Upsert realms first
|
||||||
|
final realmsToSave = rooms
|
||||||
|
.where((room) => room.realm != null)
|
||||||
|
.map((room) => room.realm!)
|
||||||
|
.toSet()
|
||||||
|
.toList();
|
||||||
|
await batch((batch) {
|
||||||
|
for (final realm in realmsToSave) {
|
||||||
|
batch.insert(
|
||||||
|
realms,
|
||||||
|
companionFromRealm(realm),
|
||||||
|
mode: InsertMode.insertOrReplace,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 3. Upsert remote rooms
|
||||||
|
await batch((batch) async {
|
||||||
|
for (final room in rooms) {
|
||||||
|
// Preserve local isPinned status
|
||||||
|
final currentRoom = await (select(
|
||||||
|
chatRooms,
|
||||||
|
)..where((r) => r.id.equals(room.id))).getSingleOrNull();
|
||||||
|
final isPinned = currentRoom?.isPinned ?? false;
|
||||||
|
|
||||||
|
batch.insert(
|
||||||
|
chatRooms,
|
||||||
|
companionFromRoom(room).copyWith(isPinned: Value(isPinned)),
|
||||||
|
mode: InsertMode.insertOrReplace,
|
||||||
|
);
|
||||||
|
for (final member in room.members ?? []) {
|
||||||
|
batch.insert(
|
||||||
|
chatMembers,
|
||||||
|
companionFromMember(member),
|
||||||
|
mode: InsertMode.insertOrReplace,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Methods for post drafts
|
// Methods for post drafts
|
||||||
Future<List<SnPost>> getAllPostDrafts() async {
|
Future<List<SnPost>> getAllPostDrafts() async {
|
||||||
final drafts = await select(postDrafts).get();
|
final drafts = await select(postDrafts).get();
|
||||||
@@ -273,7 +519,35 @@ class AppDatabase extends _$AppDatabase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<PostDraft?> getPostDraftById(String id) async {
|
Future<PostDraft?> getPostDraftById(String id) async {
|
||||||
return await (select(postDrafts)
|
return await (select(
|
||||||
..where((tbl) => tbl.id.equals(id))).getSingleOrNull();
|
postDrafts,
|
||||||
|
)..where((tbl) => tbl.id.equals(id))).getSingleOrNull();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> saveMember(SnChatMember member) async {
|
||||||
|
await into(
|
||||||
|
chatMembers,
|
||||||
|
).insert(companionFromMember(member), mode: InsertMode.insertOrReplace);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<int> saveMessageWithSender(LocalChatMessage message) async {
|
||||||
|
// First save the sender if it exists
|
||||||
|
if (message.sender != null) {
|
||||||
|
await saveMember(message.sender!);
|
||||||
|
}
|
||||||
|
// Then save the message
|
||||||
|
return await saveMessage(messageToCompanion(message));
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> toggleChatRoomPinned(String roomId) async {
|
||||||
|
final room = await (select(
|
||||||
|
chatRooms,
|
||||||
|
)..where((r) => r.id.equals(roomId))).getSingleOrNull();
|
||||||
|
if (room != null) {
|
||||||
|
final newPinnedStatus = !(room.isPinned ?? false);
|
||||||
|
await (update(chatRooms)..where((r) => r.id.equals(roomId))).write(
|
||||||
|
ChatRoomsCompanion(isPinned: Value(newPinnedStatus)),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
616
lib/database/drift_db.steps.dart
Normal file
616
lib/database/drift_db.steps.dart
Normal file
@@ -0,0 +1,616 @@
|
|||||||
|
// dart format width=80
|
||||||
|
import 'package:drift/internal/versioned_schema.dart' as i0;
|
||||||
|
import 'package:drift/drift.dart' as i1;
|
||||||
|
import 'package:drift/drift.dart'; // ignore_for_file: type=lint,unused_import
|
||||||
|
|
||||||
|
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||||
|
final class Schema7 extends i0.VersionedSchema {
|
||||||
|
Schema7({required super.database}) : super(version: 7);
|
||||||
|
@override
|
||||||
|
late final List<i1.DatabaseSchemaEntity> entities = [
|
||||||
|
chatRooms,
|
||||||
|
chatMembers,
|
||||||
|
chatMessages,
|
||||||
|
postDrafts,
|
||||||
|
];
|
||||||
|
late final Shape0 chatRooms = Shape0(
|
||||||
|
source: i0.VersionedTable(
|
||||||
|
entityName: 'chat_rooms',
|
||||||
|
withoutRowId: false,
|
||||||
|
isStrict: false,
|
||||||
|
tableConstraints: ['PRIMARY KEY(id)'],
|
||||||
|
columns: [
|
||||||
|
_column_0,
|
||||||
|
_column_1,
|
||||||
|
_column_2,
|
||||||
|
_column_3,
|
||||||
|
_column_4,
|
||||||
|
_column_5,
|
||||||
|
_column_6,
|
||||||
|
_column_7,
|
||||||
|
_column_8,
|
||||||
|
_column_9,
|
||||||
|
_column_10,
|
||||||
|
_column_11,
|
||||||
|
],
|
||||||
|
attachedDatabase: database,
|
||||||
|
),
|
||||||
|
alias: null,
|
||||||
|
);
|
||||||
|
late final Shape1 chatMembers = Shape1(
|
||||||
|
source: i0.VersionedTable(
|
||||||
|
entityName: 'chat_members',
|
||||||
|
withoutRowId: false,
|
||||||
|
isStrict: false,
|
||||||
|
tableConstraints: ['PRIMARY KEY(id)'],
|
||||||
|
columns: [
|
||||||
|
_column_0,
|
||||||
|
_column_12,
|
||||||
|
_column_13,
|
||||||
|
_column_14,
|
||||||
|
_column_15,
|
||||||
|
_column_16,
|
||||||
|
_column_17,
|
||||||
|
_column_18,
|
||||||
|
_column_19,
|
||||||
|
_column_20,
|
||||||
|
_column_21,
|
||||||
|
_column_22,
|
||||||
|
_column_23,
|
||||||
|
_column_9,
|
||||||
|
_column_10,
|
||||||
|
_column_11,
|
||||||
|
],
|
||||||
|
attachedDatabase: database,
|
||||||
|
),
|
||||||
|
alias: null,
|
||||||
|
);
|
||||||
|
late final Shape2 chatMessages = Shape2(
|
||||||
|
source: i0.VersionedTable(
|
||||||
|
entityName: 'chat_messages',
|
||||||
|
withoutRowId: false,
|
||||||
|
isStrict: false,
|
||||||
|
tableConstraints: ['PRIMARY KEY(id)'],
|
||||||
|
columns: [
|
||||||
|
_column_0,
|
||||||
|
_column_24,
|
||||||
|
_column_25,
|
||||||
|
_column_26,
|
||||||
|
_column_27,
|
||||||
|
_column_28,
|
||||||
|
_column_9,
|
||||||
|
_column_29,
|
||||||
|
_column_30,
|
||||||
|
_column_31,
|
||||||
|
_column_11,
|
||||||
|
_column_32,
|
||||||
|
_column_33,
|
||||||
|
_column_34,
|
||||||
|
_column_35,
|
||||||
|
_column_36,
|
||||||
|
_column_37,
|
||||||
|
_column_38,
|
||||||
|
_column_39,
|
||||||
|
],
|
||||||
|
attachedDatabase: database,
|
||||||
|
),
|
||||||
|
alias: null,
|
||||||
|
);
|
||||||
|
late final Shape3 postDrafts = Shape3(
|
||||||
|
source: i0.VersionedTable(
|
||||||
|
entityName: 'post_drafts',
|
||||||
|
withoutRowId: false,
|
||||||
|
isStrict: false,
|
||||||
|
tableConstraints: ['PRIMARY KEY(id)'],
|
||||||
|
columns: [
|
||||||
|
_column_0,
|
||||||
|
_column_40,
|
||||||
|
_column_2,
|
||||||
|
_column_26,
|
||||||
|
_column_41,
|
||||||
|
_column_42,
|
||||||
|
_column_43,
|
||||||
|
_column_44,
|
||||||
|
],
|
||||||
|
attachedDatabase: database,
|
||||||
|
),
|
||||||
|
alias: null,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
class Shape0 extends i0.VersionedTable {
|
||||||
|
Shape0({required super.source, required super.alias}) : super.aliased();
|
||||||
|
i1.GeneratedColumn<String> get id =>
|
||||||
|
columnsByName['id']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get name =>
|
||||||
|
columnsByName['name']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get description =>
|
||||||
|
columnsByName['description']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<int> get type =>
|
||||||
|
columnsByName['type']! as i1.GeneratedColumn<int>;
|
||||||
|
i1.GeneratedColumn<bool> get isPublic =>
|
||||||
|
columnsByName['is_public']! as i1.GeneratedColumn<bool>;
|
||||||
|
i1.GeneratedColumn<bool> get isCommunity =>
|
||||||
|
columnsByName['is_community']! as i1.GeneratedColumn<bool>;
|
||||||
|
i1.GeneratedColumn<String> get picture =>
|
||||||
|
columnsByName['picture']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get background =>
|
||||||
|
columnsByName['background']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get realmId =>
|
||||||
|
columnsByName['realm_id']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<DateTime> get createdAt =>
|
||||||
|
columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
|
||||||
|
i1.GeneratedColumn<DateTime> get updatedAt =>
|
||||||
|
columnsByName['updated_at']! as i1.GeneratedColumn<DateTime>;
|
||||||
|
i1.GeneratedColumn<DateTime> get deletedAt =>
|
||||||
|
columnsByName['deleted_at']! as i1.GeneratedColumn<DateTime>;
|
||||||
|
}
|
||||||
|
|
||||||
|
i1.GeneratedColumn<String> _column_0(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'id',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_1(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'name',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_2(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'description',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<int> _column_3(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<int>(
|
||||||
|
'type',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.int,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<bool> _column_4(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<bool>(
|
||||||
|
'is_public',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.bool,
|
||||||
|
defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
|
||||||
|
'CHECK ("is_public" IN (0, 1))',
|
||||||
|
),
|
||||||
|
defaultValue: const CustomExpression('0'),
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<bool> _column_5(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<bool>(
|
||||||
|
'is_community',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.bool,
|
||||||
|
defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
|
||||||
|
'CHECK ("is_community" IN (0, 1))',
|
||||||
|
),
|
||||||
|
defaultValue: const CustomExpression('0'),
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_6(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'picture',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_7(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'background',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_8(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'realm_id',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<DateTime> _column_9(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<DateTime>(
|
||||||
|
'created_at',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.dateTime,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<DateTime> _column_10(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<DateTime>(
|
||||||
|
'updated_at',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.dateTime,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<DateTime> _column_11(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<DateTime>(
|
||||||
|
'deleted_at',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.dateTime,
|
||||||
|
);
|
||||||
|
|
||||||
|
class Shape1 extends i0.VersionedTable {
|
||||||
|
Shape1({required super.source, required super.alias}) : super.aliased();
|
||||||
|
i1.GeneratedColumn<String> get id =>
|
||||||
|
columnsByName['id']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get chatRoomId =>
|
||||||
|
columnsByName['chat_room_id']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get accountId =>
|
||||||
|
columnsByName['account_id']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get account =>
|
||||||
|
columnsByName['account']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get nick =>
|
||||||
|
columnsByName['nick']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<int> get role =>
|
||||||
|
columnsByName['role']! as i1.GeneratedColumn<int>;
|
||||||
|
i1.GeneratedColumn<int> get notify =>
|
||||||
|
columnsByName['notify']! as i1.GeneratedColumn<int>;
|
||||||
|
i1.GeneratedColumn<DateTime> get joinedAt =>
|
||||||
|
columnsByName['joined_at']! as i1.GeneratedColumn<DateTime>;
|
||||||
|
i1.GeneratedColumn<DateTime> get breakUntil =>
|
||||||
|
columnsByName['break_until']! as i1.GeneratedColumn<DateTime>;
|
||||||
|
i1.GeneratedColumn<DateTime> get timeoutUntil =>
|
||||||
|
columnsByName['timeout_until']! as i1.GeneratedColumn<DateTime>;
|
||||||
|
i1.GeneratedColumn<bool> get isBot =>
|
||||||
|
columnsByName['is_bot']! as i1.GeneratedColumn<bool>;
|
||||||
|
i1.GeneratedColumn<String> get status =>
|
||||||
|
columnsByName['status']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<DateTime> get lastTyped =>
|
||||||
|
columnsByName['last_typed']! as i1.GeneratedColumn<DateTime>;
|
||||||
|
i1.GeneratedColumn<DateTime> get createdAt =>
|
||||||
|
columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
|
||||||
|
i1.GeneratedColumn<DateTime> get updatedAt =>
|
||||||
|
columnsByName['updated_at']! as i1.GeneratedColumn<DateTime>;
|
||||||
|
i1.GeneratedColumn<DateTime> get deletedAt =>
|
||||||
|
columnsByName['deleted_at']! as i1.GeneratedColumn<DateTime>;
|
||||||
|
}
|
||||||
|
|
||||||
|
i1.GeneratedColumn<String> _column_12(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'chat_room_id',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
|
||||||
|
'REFERENCES chat_rooms (id)',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_13(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'account_id',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_14(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'account',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_15(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'nick',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<int> _column_16(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<int>(
|
||||||
|
'role',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.int,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<int> _column_17(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<int>(
|
||||||
|
'notify',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.int,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<DateTime> _column_18(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<DateTime>(
|
||||||
|
'joined_at',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.dateTime,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<DateTime> _column_19(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<DateTime>(
|
||||||
|
'break_until',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.dateTime,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<DateTime> _column_20(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<DateTime>(
|
||||||
|
'timeout_until',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.dateTime,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<bool> _column_21(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<bool>(
|
||||||
|
'is_bot',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.bool,
|
||||||
|
defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
|
||||||
|
'CHECK ("is_bot" IN (0, 1))',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_22(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'status',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<DateTime> _column_23(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<DateTime>(
|
||||||
|
'last_typed',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.dateTime,
|
||||||
|
);
|
||||||
|
|
||||||
|
class Shape2 extends i0.VersionedTable {
|
||||||
|
Shape2({required super.source, required super.alias}) : super.aliased();
|
||||||
|
i1.GeneratedColumn<String> get id =>
|
||||||
|
columnsByName['id']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get roomId =>
|
||||||
|
columnsByName['room_id']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get senderId =>
|
||||||
|
columnsByName['sender_id']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get content =>
|
||||||
|
columnsByName['content']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get nonce =>
|
||||||
|
columnsByName['nonce']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get data =>
|
||||||
|
columnsByName['data']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<DateTime> get createdAt =>
|
||||||
|
columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
|
||||||
|
i1.GeneratedColumn<int> get status =>
|
||||||
|
columnsByName['status']! as i1.GeneratedColumn<int>;
|
||||||
|
i1.GeneratedColumn<bool> get isDeleted =>
|
||||||
|
columnsByName['is_deleted']! as i1.GeneratedColumn<bool>;
|
||||||
|
i1.GeneratedColumn<DateTime> get updatedAt =>
|
||||||
|
columnsByName['updated_at']! as i1.GeneratedColumn<DateTime>;
|
||||||
|
i1.GeneratedColumn<DateTime> get deletedAt =>
|
||||||
|
columnsByName['deleted_at']! as i1.GeneratedColumn<DateTime>;
|
||||||
|
i1.GeneratedColumn<String> get type =>
|
||||||
|
columnsByName['type']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get meta =>
|
||||||
|
columnsByName['meta']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get membersMentioned =>
|
||||||
|
columnsByName['members_mentioned']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<DateTime> get editedAt =>
|
||||||
|
columnsByName['edited_at']! as i1.GeneratedColumn<DateTime>;
|
||||||
|
i1.GeneratedColumn<String> get attachments =>
|
||||||
|
columnsByName['attachments']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get reactions =>
|
||||||
|
columnsByName['reactions']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get repliedMessageId =>
|
||||||
|
columnsByName['replied_message_id']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get forwardedMessageId =>
|
||||||
|
columnsByName['forwarded_message_id']! as i1.GeneratedColumn<String>;
|
||||||
|
}
|
||||||
|
|
||||||
|
i1.GeneratedColumn<String> _column_24(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'room_id',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
|
||||||
|
'REFERENCES chat_rooms (id)',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_25(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'sender_id',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
|
||||||
|
'REFERENCES chat_members (id)',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_26(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'content',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_27(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'nonce',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_28(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'data',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<int> _column_29(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<int>(
|
||||||
|
'status',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.int,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<bool> _column_30(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<bool>(
|
||||||
|
'is_deleted',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.bool,
|
||||||
|
defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
|
||||||
|
'CHECK ("is_deleted" IN (0, 1))',
|
||||||
|
),
|
||||||
|
defaultValue: const CustomExpression('0'),
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<DateTime> _column_31(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<DateTime>(
|
||||||
|
'updated_at',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.dateTime,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_32(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'type',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
defaultValue: const CustomExpression('\'text\''),
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_33(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'meta',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
defaultValue: const CustomExpression('\'{}\''),
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_34(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'members_mentioned',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
defaultValue: const CustomExpression('\'[]\''),
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<DateTime> _column_35(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<DateTime>(
|
||||||
|
'edited_at',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.dateTime,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_36(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'attachments',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
defaultValue: const CustomExpression('\'[]\''),
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_37(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'reactions',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
defaultValue: const CustomExpression('\'[]\''),
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_38(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'replied_message_id',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_39(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'forwarded_message_id',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
);
|
||||||
|
|
||||||
|
class Shape3 extends i0.VersionedTable {
|
||||||
|
Shape3({required super.source, required super.alias}) : super.aliased();
|
||||||
|
i1.GeneratedColumn<String> get id =>
|
||||||
|
columnsByName['id']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get title =>
|
||||||
|
columnsByName['title']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get description =>
|
||||||
|
columnsByName['description']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<String> get content =>
|
||||||
|
columnsByName['content']! as i1.GeneratedColumn<String>;
|
||||||
|
i1.GeneratedColumn<int> get visibility =>
|
||||||
|
columnsByName['visibility']! as i1.GeneratedColumn<int>;
|
||||||
|
i1.GeneratedColumn<int> get type =>
|
||||||
|
columnsByName['type']! as i1.GeneratedColumn<int>;
|
||||||
|
i1.GeneratedColumn<DateTime> get lastModified =>
|
||||||
|
columnsByName['last_modified']! as i1.GeneratedColumn<DateTime>;
|
||||||
|
i1.GeneratedColumn<String> get postData =>
|
||||||
|
columnsByName['post_data']! as i1.GeneratedColumn<String>;
|
||||||
|
}
|
||||||
|
|
||||||
|
i1.GeneratedColumn<String> _column_40(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'title',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<int> _column_41(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<int>(
|
||||||
|
'visibility',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.int,
|
||||||
|
defaultValue: const CustomExpression('0'),
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<int> _column_42(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<int>(
|
||||||
|
'type',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.int,
|
||||||
|
defaultValue: const CustomExpression('0'),
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<DateTime> _column_43(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<DateTime>(
|
||||||
|
'last_modified',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.dateTime,
|
||||||
|
);
|
||||||
|
i1.GeneratedColumn<String> _column_44(String aliasedName) =>
|
||||||
|
i1.GeneratedColumn<String>(
|
||||||
|
'post_data',
|
||||||
|
aliasedName,
|
||||||
|
false,
|
||||||
|
type: i1.DriftSqlType.string,
|
||||||
|
);
|
||||||
|
i0.MigrationStepWithVersion migrationSteps({
|
||||||
|
required Future<void> Function(i1.Migrator m, Schema7 schema) from6To7,
|
||||||
|
}) {
|
||||||
|
return (currentVersion, database) async {
|
||||||
|
switch (currentVersion) {
|
||||||
|
case 6:
|
||||||
|
final schema = Schema7(database: database);
|
||||||
|
final migrator = i1.Migrator(database, schema);
|
||||||
|
await from6To7(migrator, schema);
|
||||||
|
return 7;
|
||||||
|
default:
|
||||||
|
throw ArgumentError.value('Unknown migration from $currentVersion');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
i1.OnUpgrade stepByStep({
|
||||||
|
required Future<void> Function(i1.Migrator m, Schema7 schema) from6To7,
|
||||||
|
}) => i0.VersionedSchema.stepByStepHelper(
|
||||||
|
step: migrationSteps(from6To7: from6To7),
|
||||||
|
);
|
||||||
@@ -36,10 +36,71 @@ class ListMapConverter
|
|||||||
String toSql(List<Map<String, dynamic>> value) => json.encode(value);
|
String toSql(List<Map<String, dynamic>> value) => json.encode(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class Realms extends Table {
|
||||||
|
TextColumn get id => text()();
|
||||||
|
TextColumn get slug => text()();
|
||||||
|
TextColumn get name => text().nullable()();
|
||||||
|
TextColumn get description => text().nullable()();
|
||||||
|
TextColumn get verifiedAs => text().nullable()();
|
||||||
|
DateTimeColumn get verifiedAt => dateTime().nullable()();
|
||||||
|
BoolColumn get isCommunity => boolean()();
|
||||||
|
BoolColumn get isPublic => boolean()();
|
||||||
|
TextColumn get picture => text().map(const MapConverter()).nullable()();
|
||||||
|
TextColumn get background => text().map(const MapConverter()).nullable()();
|
||||||
|
TextColumn get accountId => text().nullable()();
|
||||||
|
DateTimeColumn get createdAt => dateTime()();
|
||||||
|
DateTimeColumn get updatedAt => dateTime()();
|
||||||
|
DateTimeColumn get deletedAt => dateTime().nullable()();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Set<Column> get primaryKey => {id};
|
||||||
|
}
|
||||||
|
|
||||||
|
class ChatRooms extends Table {
|
||||||
|
TextColumn get id => text()();
|
||||||
|
TextColumn get name => text().nullable()();
|
||||||
|
TextColumn get description => text().nullable()();
|
||||||
|
IntColumn get type => integer()();
|
||||||
|
BoolColumn get isPublic =>
|
||||||
|
boolean().nullable().withDefault(const Constant(false))();
|
||||||
|
BoolColumn get isCommunity =>
|
||||||
|
boolean().nullable().withDefault(const Constant(false))();
|
||||||
|
TextColumn get picture => text().map(const MapConverter()).nullable()();
|
||||||
|
TextColumn get background => text().map(const MapConverter()).nullable()();
|
||||||
|
TextColumn get realmId => text().references(Realms, #id).nullable()();
|
||||||
|
TextColumn get accountId => text().nullable()();
|
||||||
|
BoolColumn get isPinned =>
|
||||||
|
boolean().nullable().withDefault(const Constant(false))();
|
||||||
|
DateTimeColumn get createdAt => dateTime()();
|
||||||
|
DateTimeColumn get updatedAt => dateTime()();
|
||||||
|
DateTimeColumn get deletedAt => dateTime().nullable()();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Set<Column> get primaryKey => {id};
|
||||||
|
}
|
||||||
|
|
||||||
|
class ChatMembers extends Table {
|
||||||
|
TextColumn get id => text()();
|
||||||
|
TextColumn get chatRoomId => text().references(ChatRooms, #id)();
|
||||||
|
TextColumn get accountId => text()();
|
||||||
|
TextColumn get account => text().map(const MapConverter())();
|
||||||
|
TextColumn get nick => text().nullable()();
|
||||||
|
IntColumn get notify => integer()();
|
||||||
|
DateTimeColumn get joinedAt => dateTime().nullable()();
|
||||||
|
DateTimeColumn get breakUntil => dateTime().nullable()();
|
||||||
|
DateTimeColumn get timeoutUntil => dateTime().nullable()();
|
||||||
|
DateTimeColumn get createdAt => dateTime()();
|
||||||
|
DateTimeColumn get updatedAt => dateTime()();
|
||||||
|
DateTimeColumn get deletedAt => dateTime().nullable()();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Set<Column> get primaryKey => {id};
|
||||||
|
}
|
||||||
|
|
||||||
class ChatMessages extends Table {
|
class ChatMessages extends Table {
|
||||||
TextColumn get id => text()();
|
TextColumn get id => text()();
|
||||||
TextColumn get roomId => text()();
|
TextColumn get roomId => text().references(ChatRooms, #id)();
|
||||||
TextColumn get senderId => text()();
|
TextColumn get senderId => text().references(ChatMembers, #id)();
|
||||||
TextColumn get content => text().nullable()();
|
TextColumn get content => text().nullable()();
|
||||||
TextColumn get nonce => text().nullable()();
|
TextColumn get nonce => text().nullable()();
|
||||||
TextColumn get data => text()();
|
TextColumn get data => text()();
|
||||||
@@ -52,10 +113,9 @@ class ChatMessages extends Table {
|
|||||||
TextColumn get type => text().withDefault(const Constant('text'))();
|
TextColumn get type => text().withDefault(const Constant('text'))();
|
||||||
TextColumn get meta =>
|
TextColumn get meta =>
|
||||||
text().map(const MapConverter()).withDefault(const Constant('{}'))();
|
text().map(const MapConverter()).withDefault(const Constant('{}'))();
|
||||||
TextColumn get membersMentioned =>
|
TextColumn get membersMentioned => text()
|
||||||
text()
|
.map(const ListStringConverter())
|
||||||
.map(const ListStringConverter())
|
.withDefault(const Constant('[]'))();
|
||||||
.withDefault(const Constant('[]'))();
|
|
||||||
DateTimeColumn get editedAt => dateTime().nullable()();
|
DateTimeColumn get editedAt => dateTime().nullable()();
|
||||||
TextColumn get attachments =>
|
TextColumn get attachments =>
|
||||||
text().map(const ListMapConverter()).withDefault(const Constant('[]'))();
|
text().map(const ListMapConverter()).withDefault(const Constant('[]'))();
|
||||||
@@ -72,6 +132,7 @@ class LocalChatMessage {
|
|||||||
final String id;
|
final String id;
|
||||||
final String roomId;
|
final String roomId;
|
||||||
final String senderId;
|
final String senderId;
|
||||||
|
final SnChatMember? sender;
|
||||||
final Map<String, dynamic> data;
|
final Map<String, dynamic> data;
|
||||||
final DateTime createdAt;
|
final DateTime createdAt;
|
||||||
MessageStatus status;
|
MessageStatus status;
|
||||||
@@ -94,6 +155,7 @@ class LocalChatMessage {
|
|||||||
required this.id,
|
required this.id,
|
||||||
required this.roomId,
|
required this.roomId,
|
||||||
required this.senderId,
|
required this.senderId,
|
||||||
|
required this.sender,
|
||||||
required this.data,
|
required this.data,
|
||||||
required this.createdAt,
|
required this.createdAt,
|
||||||
required this.nonce,
|
required this.nonce,
|
||||||
@@ -114,7 +176,12 @@ class LocalChatMessage {
|
|||||||
});
|
});
|
||||||
|
|
||||||
SnChatMessage toRemoteMessage() {
|
SnChatMessage toRemoteMessage() {
|
||||||
return SnChatMessage.fromJson(data);
|
if (sender == null) {
|
||||||
|
throw Exception('Cannot create remote message without sender');
|
||||||
|
}
|
||||||
|
final msgData = Map<String, dynamic>.from(data);
|
||||||
|
msgData['sender'] = sender!.toJson();
|
||||||
|
return SnChatMessage.fromJson(msgData);
|
||||||
}
|
}
|
||||||
|
|
||||||
static LocalChatMessage fromRemoteMessage(
|
static LocalChatMessage fromRemoteMessage(
|
||||||
@@ -122,11 +189,26 @@ class LocalChatMessage {
|
|||||||
MessageStatus status, {
|
MessageStatus status, {
|
||||||
String? nonce,
|
String? nonce,
|
||||||
}) {
|
}) {
|
||||||
|
final jsonData = message.toJson();
|
||||||
|
jsonData.remove('sender');
|
||||||
|
// Ensure proper defaults for collections to prevent type cast errors
|
||||||
|
if (jsonData['meta'] == null) jsonData['meta'] = <String, dynamic>{};
|
||||||
|
if (jsonData['members_mentioned'] == null) {
|
||||||
|
jsonData['members_mentioned'] = <String>[];
|
||||||
|
}
|
||||||
|
if (jsonData['attachments'] == null) {
|
||||||
|
jsonData['attachments'] = <Map<String, dynamic>>[];
|
||||||
|
}
|
||||||
|
if (jsonData['reactions'] == null) {
|
||||||
|
jsonData['reactions'] = <Map<String, dynamic>>[];
|
||||||
|
}
|
||||||
|
final msgData = Map<String, dynamic>.from(jsonData);
|
||||||
return LocalChatMessage(
|
return LocalChatMessage(
|
||||||
id: message.id,
|
id: message.id,
|
||||||
roomId: message.chatRoomId,
|
roomId: message.chatRoomId,
|
||||||
senderId: message.senderId,
|
senderId: message.senderId,
|
||||||
data: message.toJson(),
|
sender: message.sender,
|
||||||
|
data: msgData,
|
||||||
createdAt: message.createdAt,
|
createdAt: message.createdAt,
|
||||||
status: status,
|
status: status,
|
||||||
nonce: nonce ?? message.nonce,
|
nonce: nonce ?? message.nonce,
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:hotkey_manager/hotkey_manager.dart';
|
||||||
import 'package:image_picker_android/image_picker_android.dart';
|
import 'package:image_picker_android/image_picker_android.dart';
|
||||||
import 'package:island/talker.dart';
|
import 'package:island/talker.dart';
|
||||||
import 'package:island/firebase_options.dart';
|
import 'package:island/firebase_options.dart';
|
||||||
@@ -53,7 +54,8 @@ void main() async {
|
|||||||
|
|
||||||
if (!kIsWeb && (Platform.isLinux || Platform.isMacOS || Platform.isWindows)) {
|
if (!kIsWeb && (Platform.isLinux || Platform.isMacOS || Platform.isWindows)) {
|
||||||
talker.info("[SplashScreen] Initializing desktop window manager...");
|
talker.info("[SplashScreen] Initializing desktop window manager...");
|
||||||
await protocolHandler.register('myprotocol');
|
await protocolHandler.register('solian');
|
||||||
|
await hotKeyManager.unregisterAll();
|
||||||
talker.info("[SplashScreen] Desktop window manager is ready!");
|
talker.info("[SplashScreen] Desktop window manager is ready!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,7 +213,7 @@ class IslandApp extends HookConsumerWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final theme = ref.watch(themeProvider);
|
final theme = ref.watch(themeProvider);
|
||||||
final settings = ref.watch(appSettingsNotifierProvider);
|
final settings = ref.watch(appSettingsProvider);
|
||||||
|
|
||||||
// Convert string theme mode to ThemeMode enum
|
// Convert string theme mode to ThemeMode enum
|
||||||
ThemeMode getThemeMode() {
|
ThemeMode getThemeMode() {
|
||||||
|
|||||||
@@ -12,18 +12,16 @@ _SnAbuseReport _$SnAbuseReportFromJson(Map<String, dynamic> json) =>
|
|||||||
resourceIdentifier: json['resource_identifier'] as String,
|
resourceIdentifier: json['resource_identifier'] as String,
|
||||||
type: (json['type'] as num).toInt(),
|
type: (json['type'] as num).toInt(),
|
||||||
reason: json['reason'] as String,
|
reason: json['reason'] as String,
|
||||||
resolvedAt:
|
resolvedAt: json['resolved_at'] == null
|
||||||
json['resolved_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['resolved_at'] as String),
|
||||||
: DateTime.parse(json['resolved_at'] as String),
|
|
||||||
resolution: json['resolution'] as String?,
|
resolution: json['resolution'] as String?,
|
||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnAbuseReportToJson(_SnAbuseReport instance) =>
|
Map<String, dynamic> _$SnAbuseReportToJson(_SnAbuseReport instance) =>
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ sealed class SnAccount with _$SnAccount {
|
|||||||
required SnWalletSubscriptionRef? perkSubscription,
|
required SnWalletSubscriptionRef? perkSubscription,
|
||||||
@Default([]) List<SnAccountBadge> badges,
|
@Default([]) List<SnAccountBadge> badges,
|
||||||
@Default([]) List<SnContactMethod> contacts,
|
@Default([]) List<SnContactMethod> contacts,
|
||||||
|
required DateTime? activatedAt,
|
||||||
required DateTime createdAt,
|
required DateTime createdAt,
|
||||||
required DateTime updatedAt,
|
required DateTime updatedAt,
|
||||||
required DateTime? deletedAt,
|
required DateTime? deletedAt,
|
||||||
@@ -215,20 +216,20 @@ sealed class SnAuthDevice with _$SnAuthDevice {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class SnAuthDeviceWithChallenge with _$SnAuthDeviceWithChallenge {
|
sealed class SnAuthDeviceWithSession with _$SnAuthDeviceWithSession {
|
||||||
const factory SnAuthDeviceWithChallenge({
|
const factory SnAuthDeviceWithSession({
|
||||||
required String id,
|
required String id,
|
||||||
required String deviceId,
|
required String deviceId,
|
||||||
required String deviceName,
|
required String deviceName,
|
||||||
required String? deviceLabel,
|
required String? deviceLabel,
|
||||||
required String accountId,
|
required String accountId,
|
||||||
required int platform,
|
required int platform,
|
||||||
required List<SnAuthChallenge> challenges,
|
required List<SnAuthSession> sessions,
|
||||||
@Default(false) bool isCurrent,
|
@Default(false) bool isCurrent,
|
||||||
}) = _SnAuthDeviceWithChallengee;
|
}) = _SnAuthDeviceWithSessione;
|
||||||
|
|
||||||
factory SnAuthDeviceWithChallenge.fromJson(Map<String, dynamic> json) =>
|
factory SnAuthDeviceWithSession.fromJson(Map<String, dynamic> json) =>
|
||||||
_$SnAuthDeviceWithChallengeFromJson(json);
|
_$SnAuthDeviceWithSessionFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$SnAccount {
|
mixin _$SnAccount {
|
||||||
|
|
||||||
String get id; String get name; String get nick; String get language; String get region; bool get isSuperuser; String? get automatedId; SnAccountProfile get profile; SnWalletSubscriptionRef? get perkSubscription; List<SnAccountBadge> get badges; List<SnContactMethod> get contacts; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
String get id; String get name; String get nick; String get language; String get region; bool get isSuperuser; String? get automatedId; SnAccountProfile get profile; SnWalletSubscriptionRef? get perkSubscription; List<SnAccountBadge> get badges; List<SnContactMethod> get contacts; DateTime? get activatedAt; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
||||||
/// Create a copy of SnAccount
|
/// Create a copy of SnAccount
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -28,16 +28,16 @@ $SnAccountCopyWith<SnAccount> get copyWith => _$SnAccountCopyWithImpl<SnAccount>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAccount&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.language, language) || other.language == language)&&(identical(other.region, region) || other.region == region)&&(identical(other.isSuperuser, isSuperuser) || other.isSuperuser == isSuperuser)&&(identical(other.automatedId, automatedId) || other.automatedId == automatedId)&&(identical(other.profile, profile) || other.profile == profile)&&(identical(other.perkSubscription, perkSubscription) || other.perkSubscription == perkSubscription)&&const DeepCollectionEquality().equals(other.badges, badges)&&const DeepCollectionEquality().equals(other.contacts, contacts)&&(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 SnAccount&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.language, language) || other.language == language)&&(identical(other.region, region) || other.region == region)&&(identical(other.isSuperuser, isSuperuser) || other.isSuperuser == isSuperuser)&&(identical(other.automatedId, automatedId) || other.automatedId == automatedId)&&(identical(other.profile, profile) || other.profile == profile)&&(identical(other.perkSubscription, perkSubscription) || other.perkSubscription == perkSubscription)&&const DeepCollectionEquality().equals(other.badges, badges)&&const DeepCollectionEquality().equals(other.contacts, contacts)&&(identical(other.activatedAt, activatedAt) || other.activatedAt == activatedAt)&&(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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,id,name,nick,language,region,isSuperuser,automatedId,profile,perkSubscription,const DeepCollectionEquality().hash(badges),const DeepCollectionEquality().hash(contacts),createdAt,updatedAt,deletedAt);
|
int get hashCode => Object.hash(runtimeType,id,name,nick,language,region,isSuperuser,automatedId,profile,perkSubscription,const DeepCollectionEquality().hash(badges),const DeepCollectionEquality().hash(contacts),activatedAt,createdAt,updatedAt,deletedAt);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnAccount(id: $id, name: $name, nick: $nick, language: $language, region: $region, isSuperuser: $isSuperuser, automatedId: $automatedId, profile: $profile, perkSubscription: $perkSubscription, badges: $badges, contacts: $contacts, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
return 'SnAccount(id: $id, name: $name, nick: $nick, language: $language, region: $region, isSuperuser: $isSuperuser, automatedId: $automatedId, profile: $profile, perkSubscription: $perkSubscription, badges: $badges, contacts: $contacts, activatedAt: $activatedAt, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ abstract mixin class $SnAccountCopyWith<$Res> {
|
|||||||
factory $SnAccountCopyWith(SnAccount value, $Res Function(SnAccount) _then) = _$SnAccountCopyWithImpl;
|
factory $SnAccountCopyWith(SnAccount value, $Res Function(SnAccount) _then) = _$SnAccountCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime? activatedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ class _$SnAccountCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnAccount
|
/// Create a copy of SnAccount
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? nick = null,Object? language = null,Object? region = null,Object? isSuperuser = null,Object? automatedId = freezed,Object? profile = null,Object? perkSubscription = freezed,Object? badges = null,Object? contacts = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? nick = null,Object? language = null,Object? region = null,Object? isSuperuser = null,Object? automatedId = freezed,Object? profile = null,Object? perkSubscription = freezed,Object? badges = null,Object? contacts = null,Object? activatedAt = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -78,7 +78,8 @@ as String?,profile: null == profile ? _self.profile : profile // ignore: cast_nu
|
|||||||
as SnAccountProfile,perkSubscription: freezed == perkSubscription ? _self.perkSubscription : perkSubscription // ignore: cast_nullable_to_non_nullable
|
as SnAccountProfile,perkSubscription: freezed == perkSubscription ? _self.perkSubscription : perkSubscription // ignore: cast_nullable_to_non_nullable
|
||||||
as SnWalletSubscriptionRef?,badges: null == badges ? _self.badges : badges // ignore: cast_nullable_to_non_nullable
|
as SnWalletSubscriptionRef?,badges: null == badges ? _self.badges : badges // ignore: cast_nullable_to_non_nullable
|
||||||
as List<SnAccountBadge>,contacts: null == contacts ? _self.contacts : contacts // ignore: cast_nullable_to_non_nullable
|
as List<SnAccountBadge>,contacts: null == contacts ? _self.contacts : contacts // ignore: cast_nullable_to_non_nullable
|
||||||
as List<SnContactMethod>,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
as List<SnContactMethod>,activatedAt: freezed == activatedAt ? _self.activatedAt : activatedAt // ignore: cast_nullable_to_non_nullable
|
||||||
|
as DateTime?,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,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,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime?,
|
as DateTime?,
|
||||||
@@ -184,10 +185,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime? activatedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnAccount() when $default != null:
|
case _SnAccount() when $default != null:
|
||||||
return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that.isSuperuser,_that.automatedId,_that.profile,_that.perkSubscription,_that.badges,_that.contacts,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that.isSuperuser,_that.automatedId,_that.profile,_that.perkSubscription,_that.badges,_that.contacts,_that.activatedAt,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -205,10 +206,10 @@ return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime? activatedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnAccount():
|
case _SnAccount():
|
||||||
return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that.isSuperuser,_that.automatedId,_that.profile,_that.perkSubscription,_that.badges,_that.contacts,_that.createdAt,_that.updatedAt,_that.deletedAt);}
|
return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that.isSuperuser,_that.automatedId,_that.profile,_that.perkSubscription,_that.badges,_that.contacts,_that.activatedAt,_that.createdAt,_that.updatedAt,_that.deletedAt);}
|
||||||
}
|
}
|
||||||
/// A variant of `when` that fallback to returning `null`
|
/// A variant of `when` that fallback to returning `null`
|
||||||
///
|
///
|
||||||
@@ -222,10 +223,10 @@ return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime? activatedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnAccount() when $default != null:
|
case _SnAccount() when $default != null:
|
||||||
return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that.isSuperuser,_that.automatedId,_that.profile,_that.perkSubscription,_that.badges,_that.contacts,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that.isSuperuser,_that.automatedId,_that.profile,_that.perkSubscription,_that.badges,_that.contacts,_that.activatedAt,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -237,7 +238,7 @@ return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _SnAccount implements SnAccount {
|
class _SnAccount implements SnAccount {
|
||||||
const _SnAccount({required this.id, required this.name, required this.nick, required this.language, this.region = "", required this.isSuperuser, required this.automatedId, required this.profile, required this.perkSubscription, final List<SnAccountBadge> badges = const [], final List<SnContactMethod> contacts = const [], required this.createdAt, required this.updatedAt, required this.deletedAt}): _badges = badges,_contacts = contacts;
|
const _SnAccount({required this.id, required this.name, required this.nick, required this.language, this.region = "", required this.isSuperuser, required this.automatedId, required this.profile, required this.perkSubscription, final List<SnAccountBadge> badges = const [], final List<SnContactMethod> contacts = const [], required this.activatedAt, required this.createdAt, required this.updatedAt, required this.deletedAt}): _badges = badges,_contacts = contacts;
|
||||||
factory _SnAccount.fromJson(Map<String, dynamic> json) => _$SnAccountFromJson(json);
|
factory _SnAccount.fromJson(Map<String, dynamic> json) => _$SnAccountFromJson(json);
|
||||||
|
|
||||||
@override final String id;
|
@override final String id;
|
||||||
@@ -263,6 +264,7 @@ class _SnAccount implements SnAccount {
|
|||||||
return EqualUnmodifiableListView(_contacts);
|
return EqualUnmodifiableListView(_contacts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override final DateTime? activatedAt;
|
||||||
@override final DateTime createdAt;
|
@override final DateTime createdAt;
|
||||||
@override final DateTime updatedAt;
|
@override final DateTime updatedAt;
|
||||||
@override final DateTime? deletedAt;
|
@override final DateTime? deletedAt;
|
||||||
@@ -280,16 +282,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAccount&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.language, language) || other.language == language)&&(identical(other.region, region) || other.region == region)&&(identical(other.isSuperuser, isSuperuser) || other.isSuperuser == isSuperuser)&&(identical(other.automatedId, automatedId) || other.automatedId == automatedId)&&(identical(other.profile, profile) || other.profile == profile)&&(identical(other.perkSubscription, perkSubscription) || other.perkSubscription == perkSubscription)&&const DeepCollectionEquality().equals(other._badges, _badges)&&const DeepCollectionEquality().equals(other._contacts, _contacts)&&(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 _SnAccount&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.language, language) || other.language == language)&&(identical(other.region, region) || other.region == region)&&(identical(other.isSuperuser, isSuperuser) || other.isSuperuser == isSuperuser)&&(identical(other.automatedId, automatedId) || other.automatedId == automatedId)&&(identical(other.profile, profile) || other.profile == profile)&&(identical(other.perkSubscription, perkSubscription) || other.perkSubscription == perkSubscription)&&const DeepCollectionEquality().equals(other._badges, _badges)&&const DeepCollectionEquality().equals(other._contacts, _contacts)&&(identical(other.activatedAt, activatedAt) || other.activatedAt == activatedAt)&&(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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,id,name,nick,language,region,isSuperuser,automatedId,profile,perkSubscription,const DeepCollectionEquality().hash(_badges),const DeepCollectionEquality().hash(_contacts),createdAt,updatedAt,deletedAt);
|
int get hashCode => Object.hash(runtimeType,id,name,nick,language,region,isSuperuser,automatedId,profile,perkSubscription,const DeepCollectionEquality().hash(_badges),const DeepCollectionEquality().hash(_contacts),activatedAt,createdAt,updatedAt,deletedAt);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnAccount(id: $id, name: $name, nick: $nick, language: $language, region: $region, isSuperuser: $isSuperuser, automatedId: $automatedId, profile: $profile, perkSubscription: $perkSubscription, badges: $badges, contacts: $contacts, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
return 'SnAccount(id: $id, name: $name, nick: $nick, language: $language, region: $region, isSuperuser: $isSuperuser, automatedId: $automatedId, profile: $profile, perkSubscription: $perkSubscription, badges: $badges, contacts: $contacts, activatedAt: $activatedAt, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -300,7 +302,7 @@ abstract mixin class _$SnAccountCopyWith<$Res> implements $SnAccountCopyWith<$Re
|
|||||||
factory _$SnAccountCopyWith(_SnAccount value, $Res Function(_SnAccount) _then) = __$SnAccountCopyWithImpl;
|
factory _$SnAccountCopyWith(_SnAccount value, $Res Function(_SnAccount) _then) = __$SnAccountCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime? activatedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -317,7 +319,7 @@ class __$SnAccountCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnAccount
|
/// Create a copy of SnAccount
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? nick = null,Object? language = null,Object? region = null,Object? isSuperuser = null,Object? automatedId = freezed,Object? profile = null,Object? perkSubscription = freezed,Object? badges = null,Object? contacts = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? nick = null,Object? language = null,Object? region = null,Object? isSuperuser = null,Object? automatedId = freezed,Object? profile = null,Object? perkSubscription = freezed,Object? badges = null,Object? contacts = null,Object? activatedAt = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||||
return _then(_SnAccount(
|
return _then(_SnAccount(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -330,7 +332,8 @@ as String?,profile: null == profile ? _self.profile : profile // ignore: cast_nu
|
|||||||
as SnAccountProfile,perkSubscription: freezed == perkSubscription ? _self.perkSubscription : perkSubscription // ignore: cast_nullable_to_non_nullable
|
as SnAccountProfile,perkSubscription: freezed == perkSubscription ? _self.perkSubscription : perkSubscription // ignore: cast_nullable_to_non_nullable
|
||||||
as SnWalletSubscriptionRef?,badges: null == badges ? _self._badges : badges // ignore: cast_nullable_to_non_nullable
|
as SnWalletSubscriptionRef?,badges: null == badges ? _self._badges : badges // ignore: cast_nullable_to_non_nullable
|
||||||
as List<SnAccountBadge>,contacts: null == contacts ? _self._contacts : contacts // ignore: cast_nullable_to_non_nullable
|
as List<SnAccountBadge>,contacts: null == contacts ? _self._contacts : contacts // ignore: cast_nullable_to_non_nullable
|
||||||
as List<SnContactMethod>,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
as List<SnContactMethod>,activatedAt: freezed == activatedAt ? _self.activatedAt : activatedAt // ignore: cast_nullable_to_non_nullable
|
||||||
|
as DateTime?,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,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,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime?,
|
as DateTime?,
|
||||||
@@ -3065,51 +3068,51 @@ as bool,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SnAuthDeviceWithChallenge _$SnAuthDeviceWithChallengeFromJson(
|
SnAuthDeviceWithSession _$SnAuthDeviceWithSessionFromJson(
|
||||||
Map<String, dynamic> json
|
Map<String, dynamic> json
|
||||||
) {
|
) {
|
||||||
return _SnAuthDeviceWithChallengee.fromJson(
|
return _SnAuthDeviceWithSessione.fromJson(
|
||||||
json
|
json
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$SnAuthDeviceWithChallenge {
|
mixin _$SnAuthDeviceWithSession {
|
||||||
|
|
||||||
String get id; String get deviceId; String get deviceName; String? get deviceLabel; String get accountId; int get platform; List<SnAuthChallenge> get challenges; bool get isCurrent;
|
String get id; String get deviceId; String get deviceName; String? get deviceLabel; String get accountId; int get platform; List<SnAuthSession> get sessions; bool get isCurrent;
|
||||||
/// Create a copy of SnAuthDeviceWithChallenge
|
/// Create a copy of SnAuthDeviceWithSession
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$SnAuthDeviceWithChallengeCopyWith<SnAuthDeviceWithChallenge> get copyWith => _$SnAuthDeviceWithChallengeCopyWithImpl<SnAuthDeviceWithChallenge>(this as SnAuthDeviceWithChallenge, _$identity);
|
$SnAuthDeviceWithSessionCopyWith<SnAuthDeviceWithSession> get copyWith => _$SnAuthDeviceWithSessionCopyWithImpl<SnAuthDeviceWithSession>(this as SnAuthDeviceWithSession, _$identity);
|
||||||
|
|
||||||
/// Serializes this SnAuthDeviceWithChallenge to a JSON map.
|
/// Serializes this SnAuthDeviceWithSession to a JSON map.
|
||||||
Map<String, dynamic> toJson();
|
Map<String, dynamic> toJson();
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAuthDeviceWithChallenge&&(identical(other.id, id) || other.id == id)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.deviceName, deviceName) || other.deviceName == deviceName)&&(identical(other.deviceLabel, deviceLabel) || other.deviceLabel == deviceLabel)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.platform, platform) || other.platform == platform)&&const DeepCollectionEquality().equals(other.challenges, challenges)&&(identical(other.isCurrent, isCurrent) || other.isCurrent == isCurrent));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAuthDeviceWithSession&&(identical(other.id, id) || other.id == id)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.deviceName, deviceName) || other.deviceName == deviceName)&&(identical(other.deviceLabel, deviceLabel) || other.deviceLabel == deviceLabel)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.platform, platform) || other.platform == platform)&&const DeepCollectionEquality().equals(other.sessions, sessions)&&(identical(other.isCurrent, isCurrent) || other.isCurrent == isCurrent));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,id,deviceId,deviceName,deviceLabel,accountId,platform,const DeepCollectionEquality().hash(challenges),isCurrent);
|
int get hashCode => Object.hash(runtimeType,id,deviceId,deviceName,deviceLabel,accountId,platform,const DeepCollectionEquality().hash(sessions),isCurrent);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnAuthDeviceWithChallenge(id: $id, deviceId: $deviceId, deviceName: $deviceName, deviceLabel: $deviceLabel, accountId: $accountId, platform: $platform, challenges: $challenges, isCurrent: $isCurrent)';
|
return 'SnAuthDeviceWithSession(id: $id, deviceId: $deviceId, deviceName: $deviceName, deviceLabel: $deviceLabel, accountId: $accountId, platform: $platform, sessions: $sessions, isCurrent: $isCurrent)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
abstract mixin class $SnAuthDeviceWithChallengeCopyWith<$Res> {
|
abstract mixin class $SnAuthDeviceWithSessionCopyWith<$Res> {
|
||||||
factory $SnAuthDeviceWithChallengeCopyWith(SnAuthDeviceWithChallenge value, $Res Function(SnAuthDeviceWithChallenge) _then) = _$SnAuthDeviceWithChallengeCopyWithImpl;
|
factory $SnAuthDeviceWithSessionCopyWith(SnAuthDeviceWithSession value, $Res Function(SnAuthDeviceWithSession) _then) = _$SnAuthDeviceWithSessionCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
String id, String deviceId, String deviceName, String? deviceLabel, String accountId, int platform, List<SnAuthChallenge> challenges, bool isCurrent
|
String id, String deviceId, String deviceName, String? deviceLabel, String accountId, int platform, List<SnAuthSession> sessions, bool isCurrent
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -3117,16 +3120,16 @@ $Res call({
|
|||||||
|
|
||||||
}
|
}
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
class _$SnAuthDeviceWithChallengeCopyWithImpl<$Res>
|
class _$SnAuthDeviceWithSessionCopyWithImpl<$Res>
|
||||||
implements $SnAuthDeviceWithChallengeCopyWith<$Res> {
|
implements $SnAuthDeviceWithSessionCopyWith<$Res> {
|
||||||
_$SnAuthDeviceWithChallengeCopyWithImpl(this._self, this._then);
|
_$SnAuthDeviceWithSessionCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
final SnAuthDeviceWithChallenge _self;
|
final SnAuthDeviceWithSession _self;
|
||||||
final $Res Function(SnAuthDeviceWithChallenge) _then;
|
final $Res Function(SnAuthDeviceWithSession) _then;
|
||||||
|
|
||||||
/// Create a copy of SnAuthDeviceWithChallenge
|
/// Create a copy of SnAuthDeviceWithSession
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? deviceId = null,Object? deviceName = null,Object? deviceLabel = freezed,Object? accountId = null,Object? platform = null,Object? challenges = null,Object? isCurrent = null,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? deviceId = null,Object? deviceName = null,Object? deviceLabel = freezed,Object? accountId = null,Object? platform = null,Object? sessions = null,Object? isCurrent = null,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
as String,deviceId: null == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable
|
as String,deviceId: null == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -3134,8 +3137,8 @@ as String,deviceName: null == deviceName ? _self.deviceName : deviceName // igno
|
|||||||
as String,deviceLabel: freezed == deviceLabel ? _self.deviceLabel : deviceLabel // ignore: cast_nullable_to_non_nullable
|
as String,deviceLabel: freezed == deviceLabel ? _self.deviceLabel : deviceLabel // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
as String?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||||
as String,platform: null == platform ? _self.platform : platform // ignore: cast_nullable_to_non_nullable
|
as String,platform: null == platform ? _self.platform : platform // ignore: cast_nullable_to_non_nullable
|
||||||
as int,challenges: null == challenges ? _self.challenges : challenges // ignore: cast_nullable_to_non_nullable
|
as int,sessions: null == sessions ? _self.sessions : sessions // ignore: cast_nullable_to_non_nullable
|
||||||
as List<SnAuthChallenge>,isCurrent: null == isCurrent ? _self.isCurrent : isCurrent // ignore: cast_nullable_to_non_nullable
|
as List<SnAuthSession>,isCurrent: null == isCurrent ? _self.isCurrent : isCurrent // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,
|
as bool,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@@ -3143,8 +3146,8 @@ as bool,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Adds pattern-matching-related methods to [SnAuthDeviceWithChallenge].
|
/// Adds pattern-matching-related methods to [SnAuthDeviceWithSession].
|
||||||
extension SnAuthDeviceWithChallengePatterns on SnAuthDeviceWithChallenge {
|
extension SnAuthDeviceWithSessionPatterns on SnAuthDeviceWithSession {
|
||||||
/// A variant of `map` that fallback to returning `orElse`.
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
///
|
///
|
||||||
/// It is equivalent to doing:
|
/// It is equivalent to doing:
|
||||||
@@ -3157,10 +3160,10 @@ extension SnAuthDeviceWithChallengePatterns on SnAuthDeviceWithChallenge {
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnAuthDeviceWithChallengee value)? $default,{required TResult orElse(),}){
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnAuthDeviceWithSessione value)? $default,{required TResult orElse(),}){
|
||||||
final _that = this;
|
final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnAuthDeviceWithChallengee() when $default != null:
|
case _SnAuthDeviceWithSessione() when $default != null:
|
||||||
return $default(_that);case _:
|
return $default(_that);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
@@ -3179,10 +3182,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnAuthDeviceWithChallengee value) $default,){
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnAuthDeviceWithSessione value) $default,){
|
||||||
final _that = this;
|
final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnAuthDeviceWithChallengee():
|
case _SnAuthDeviceWithSessione():
|
||||||
return $default(_that);}
|
return $default(_that);}
|
||||||
}
|
}
|
||||||
/// A variant of `map` that fallback to returning `null`.
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
@@ -3197,10 +3200,10 @@ return $default(_that);}
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnAuthDeviceWithChallengee value)? $default,){
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnAuthDeviceWithSessione value)? $default,){
|
||||||
final _that = this;
|
final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnAuthDeviceWithChallengee() when $default != null:
|
case _SnAuthDeviceWithSessione() when $default != null:
|
||||||
return $default(_that);case _:
|
return $default(_that);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
@@ -3218,10 +3221,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String deviceId, String deviceName, String? deviceLabel, String accountId, int platform, List<SnAuthChallenge> challenges, bool isCurrent)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String deviceId, String deviceName, String? deviceLabel, String accountId, int platform, List<SnAuthSession> sessions, bool isCurrent)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnAuthDeviceWithChallengee() when $default != null:
|
case _SnAuthDeviceWithSessione() when $default != null:
|
||||||
return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that.accountId,_that.platform,_that.challenges,_that.isCurrent);case _:
|
return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that.accountId,_that.platform,_that.sessions,_that.isCurrent);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3239,10 +3242,10 @@ return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String deviceId, String deviceName, String? deviceLabel, String accountId, int platform, List<SnAuthChallenge> challenges, bool isCurrent) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String deviceId, String deviceName, String? deviceLabel, String accountId, int platform, List<SnAuthSession> sessions, bool isCurrent) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnAuthDeviceWithChallengee():
|
case _SnAuthDeviceWithSessione():
|
||||||
return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that.accountId,_that.platform,_that.challenges,_that.isCurrent);}
|
return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that.accountId,_that.platform,_that.sessions,_that.isCurrent);}
|
||||||
}
|
}
|
||||||
/// A variant of `when` that fallback to returning `null`
|
/// A variant of `when` that fallback to returning `null`
|
||||||
///
|
///
|
||||||
@@ -3256,10 +3259,10 @@ return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String deviceId, String deviceName, String? deviceLabel, String accountId, int platform, List<SnAuthChallenge> challenges, bool isCurrent)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String deviceId, String deviceName, String? deviceLabel, String accountId, int platform, List<SnAuthSession> sessions, bool isCurrent)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnAuthDeviceWithChallengee() when $default != null:
|
case _SnAuthDeviceWithSessione() when $default != null:
|
||||||
return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that.accountId,_that.platform,_that.challenges,_that.isCurrent);case _:
|
return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that.accountId,_that.platform,_that.sessions,_that.isCurrent);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3270,9 +3273,9 @@ return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _SnAuthDeviceWithChallengee implements SnAuthDeviceWithChallenge {
|
class _SnAuthDeviceWithSessione implements SnAuthDeviceWithSession {
|
||||||
const _SnAuthDeviceWithChallengee({required this.id, required this.deviceId, required this.deviceName, required this.deviceLabel, required this.accountId, required this.platform, required final List<SnAuthChallenge> challenges, this.isCurrent = false}): _challenges = challenges;
|
const _SnAuthDeviceWithSessione({required this.id, required this.deviceId, required this.deviceName, required this.deviceLabel, required this.accountId, required this.platform, required final List<SnAuthSession> sessions, this.isCurrent = false}): _sessions = sessions;
|
||||||
factory _SnAuthDeviceWithChallengee.fromJson(Map<String, dynamic> json) => _$SnAuthDeviceWithChallengeeFromJson(json);
|
factory _SnAuthDeviceWithSessione.fromJson(Map<String, dynamic> json) => _$SnAuthDeviceWithSessioneFromJson(json);
|
||||||
|
|
||||||
@override final String id;
|
@override final String id;
|
||||||
@override final String deviceId;
|
@override final String deviceId;
|
||||||
@@ -3280,49 +3283,49 @@ class _SnAuthDeviceWithChallengee implements SnAuthDeviceWithChallenge {
|
|||||||
@override final String? deviceLabel;
|
@override final String? deviceLabel;
|
||||||
@override final String accountId;
|
@override final String accountId;
|
||||||
@override final int platform;
|
@override final int platform;
|
||||||
final List<SnAuthChallenge> _challenges;
|
final List<SnAuthSession> _sessions;
|
||||||
@override List<SnAuthChallenge> get challenges {
|
@override List<SnAuthSession> get sessions {
|
||||||
if (_challenges is EqualUnmodifiableListView) return _challenges;
|
if (_sessions is EqualUnmodifiableListView) return _sessions;
|
||||||
// ignore: implicit_dynamic_type
|
// ignore: implicit_dynamic_type
|
||||||
return EqualUnmodifiableListView(_challenges);
|
return EqualUnmodifiableListView(_sessions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override@JsonKey() final bool isCurrent;
|
@override@JsonKey() final bool isCurrent;
|
||||||
|
|
||||||
/// Create a copy of SnAuthDeviceWithChallenge
|
/// Create a copy of SnAuthDeviceWithSession
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$SnAuthDeviceWithChallengeeCopyWith<_SnAuthDeviceWithChallengee> get copyWith => __$SnAuthDeviceWithChallengeeCopyWithImpl<_SnAuthDeviceWithChallengee>(this, _$identity);
|
_$SnAuthDeviceWithSessioneCopyWith<_SnAuthDeviceWithSessione> get copyWith => __$SnAuthDeviceWithSessioneCopyWithImpl<_SnAuthDeviceWithSessione>(this, _$identity);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
return _$SnAuthDeviceWithChallengeeToJson(this, );
|
return _$SnAuthDeviceWithSessioneToJson(this, );
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAuthDeviceWithChallengee&&(identical(other.id, id) || other.id == id)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.deviceName, deviceName) || other.deviceName == deviceName)&&(identical(other.deviceLabel, deviceLabel) || other.deviceLabel == deviceLabel)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.platform, platform) || other.platform == platform)&&const DeepCollectionEquality().equals(other._challenges, _challenges)&&(identical(other.isCurrent, isCurrent) || other.isCurrent == isCurrent));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAuthDeviceWithSessione&&(identical(other.id, id) || other.id == id)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.deviceName, deviceName) || other.deviceName == deviceName)&&(identical(other.deviceLabel, deviceLabel) || other.deviceLabel == deviceLabel)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.platform, platform) || other.platform == platform)&&const DeepCollectionEquality().equals(other._sessions, _sessions)&&(identical(other.isCurrent, isCurrent) || other.isCurrent == isCurrent));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,id,deviceId,deviceName,deviceLabel,accountId,platform,const DeepCollectionEquality().hash(_challenges),isCurrent);
|
int get hashCode => Object.hash(runtimeType,id,deviceId,deviceName,deviceLabel,accountId,platform,const DeepCollectionEquality().hash(_sessions),isCurrent);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnAuthDeviceWithChallenge(id: $id, deviceId: $deviceId, deviceName: $deviceName, deviceLabel: $deviceLabel, accountId: $accountId, platform: $platform, challenges: $challenges, isCurrent: $isCurrent)';
|
return 'SnAuthDeviceWithSession(id: $id, deviceId: $deviceId, deviceName: $deviceName, deviceLabel: $deviceLabel, accountId: $accountId, platform: $platform, sessions: $sessions, isCurrent: $isCurrent)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
abstract mixin class _$SnAuthDeviceWithChallengeeCopyWith<$Res> implements $SnAuthDeviceWithChallengeCopyWith<$Res> {
|
abstract mixin class _$SnAuthDeviceWithSessioneCopyWith<$Res> implements $SnAuthDeviceWithSessionCopyWith<$Res> {
|
||||||
factory _$SnAuthDeviceWithChallengeeCopyWith(_SnAuthDeviceWithChallengee value, $Res Function(_SnAuthDeviceWithChallengee) _then) = __$SnAuthDeviceWithChallengeeCopyWithImpl;
|
factory _$SnAuthDeviceWithSessioneCopyWith(_SnAuthDeviceWithSessione value, $Res Function(_SnAuthDeviceWithSessione) _then) = __$SnAuthDeviceWithSessioneCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
String id, String deviceId, String deviceName, String? deviceLabel, String accountId, int platform, List<SnAuthChallenge> challenges, bool isCurrent
|
String id, String deviceId, String deviceName, String? deviceLabel, String accountId, int platform, List<SnAuthSession> sessions, bool isCurrent
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -3330,25 +3333,25 @@ $Res call({
|
|||||||
|
|
||||||
}
|
}
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
class __$SnAuthDeviceWithChallengeeCopyWithImpl<$Res>
|
class __$SnAuthDeviceWithSessioneCopyWithImpl<$Res>
|
||||||
implements _$SnAuthDeviceWithChallengeeCopyWith<$Res> {
|
implements _$SnAuthDeviceWithSessioneCopyWith<$Res> {
|
||||||
__$SnAuthDeviceWithChallengeeCopyWithImpl(this._self, this._then);
|
__$SnAuthDeviceWithSessioneCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
final _SnAuthDeviceWithChallengee _self;
|
final _SnAuthDeviceWithSessione _self;
|
||||||
final $Res Function(_SnAuthDeviceWithChallengee) _then;
|
final $Res Function(_SnAuthDeviceWithSessione) _then;
|
||||||
|
|
||||||
/// Create a copy of SnAuthDeviceWithChallenge
|
/// Create a copy of SnAuthDeviceWithSession
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? deviceId = null,Object? deviceName = null,Object? deviceLabel = freezed,Object? accountId = null,Object? platform = null,Object? challenges = null,Object? isCurrent = null,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? deviceId = null,Object? deviceName = null,Object? deviceLabel = freezed,Object? accountId = null,Object? platform = null,Object? sessions = null,Object? isCurrent = null,}) {
|
||||||
return _then(_SnAuthDeviceWithChallengee(
|
return _then(_SnAuthDeviceWithSessione(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
as String,deviceId: null == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable
|
as String,deviceId: null == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable
|
||||||
as String,deviceName: null == deviceName ? _self.deviceName : deviceName // ignore: cast_nullable_to_non_nullable
|
as String,deviceName: null == deviceName ? _self.deviceName : deviceName // ignore: cast_nullable_to_non_nullable
|
||||||
as String,deviceLabel: freezed == deviceLabel ? _self.deviceLabel : deviceLabel // ignore: cast_nullable_to_non_nullable
|
as String,deviceLabel: freezed == deviceLabel ? _self.deviceLabel : deviceLabel // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
as String?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||||
as String,platform: null == platform ? _self.platform : platform // ignore: cast_nullable_to_non_nullable
|
as String,platform: null == platform ? _self.platform : platform // ignore: cast_nullable_to_non_nullable
|
||||||
as int,challenges: null == challenges ? _self._challenges : challenges // ignore: cast_nullable_to_non_nullable
|
as int,sessions: null == sessions ? _self._sessions : sessions // ignore: cast_nullable_to_non_nullable
|
||||||
as List<SnAuthChallenge>,isCurrent: null == isCurrent ? _self.isCurrent : isCurrent // ignore: cast_nullable_to_non_nullable
|
as List<SnAuthSession>,isCurrent: null == isCurrent ? _self.isCurrent : isCurrent // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,
|
as bool,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,12 +15,11 @@ _SnAccount _$SnAccountFromJson(Map<String, dynamic> json) => _SnAccount(
|
|||||||
isSuperuser: json['is_superuser'] as bool,
|
isSuperuser: json['is_superuser'] as bool,
|
||||||
automatedId: json['automated_id'] as String?,
|
automatedId: json['automated_id'] as String?,
|
||||||
profile: SnAccountProfile.fromJson(json['profile'] as Map<String, dynamic>),
|
profile: SnAccountProfile.fromJson(json['profile'] as Map<String, dynamic>),
|
||||||
perkSubscription:
|
perkSubscription: json['perk_subscription'] == null
|
||||||
json['perk_subscription'] == null
|
? null
|
||||||
? null
|
: SnWalletSubscriptionRef.fromJson(
|
||||||
: SnWalletSubscriptionRef.fromJson(
|
json['perk_subscription'] as Map<String, dynamic>,
|
||||||
json['perk_subscription'] as Map<String, dynamic>,
|
),
|
||||||
),
|
|
||||||
badges:
|
badges:
|
||||||
(json['badges'] as List<dynamic>?)
|
(json['badges'] as List<dynamic>?)
|
||||||
?.map((e) => SnAccountBadge.fromJson(e as Map<String, dynamic>))
|
?.map((e) => SnAccountBadge.fromJson(e as Map<String, dynamic>))
|
||||||
@@ -31,12 +30,14 @@ _SnAccount _$SnAccountFromJson(Map<String, dynamic> json) => _SnAccount(
|
|||||||
?.map((e) => SnContactMethod.fromJson(e as Map<String, dynamic>))
|
?.map((e) => SnContactMethod.fromJson(e as Map<String, dynamic>))
|
||||||
.toList() ??
|
.toList() ??
|
||||||
const [],
|
const [],
|
||||||
|
activatedAt: json['activated_at'] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json['activated_at'] as String),
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnAccountToJson(_SnAccount instance) =>
|
Map<String, dynamic> _$SnAccountToJson(_SnAccount instance) =>
|
||||||
@@ -52,6 +53,7 @@ Map<String, dynamic> _$SnAccountToJson(_SnAccount instance) =>
|
|||||||
'perk_subscription': instance.perkSubscription?.toJson(),
|
'perk_subscription': instance.perkSubscription?.toJson(),
|
||||||
'badges': instance.badges.map((e) => e.toJson()).toList(),
|
'badges': instance.badges.map((e) => e.toJson()).toList(),
|
||||||
'contacts': instance.contacts.map((e) => e.toJson()).toList(),
|
'contacts': instance.contacts.map((e) => e.toJson()).toList(),
|
||||||
|
'activated_at': instance.activatedAt?.toIso8601String(),
|
||||||
'created_at': instance.createdAt.toIso8601String(),
|
'created_at': instance.createdAt.toIso8601String(),
|
||||||
'updated_at': instance.updatedAt.toIso8601String(),
|
'updated_at': instance.updatedAt.toIso8601String(),
|
||||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||||
@@ -68,8 +70,9 @@ _UsernameColor _$UsernameColorFromJson(Map<String, dynamic> json) =>
|
|||||||
type: json['type'] as String? ?? 'plain',
|
type: json['type'] as String? ?? 'plain',
|
||||||
value: json['value'] as String?,
|
value: json['value'] as String?,
|
||||||
direction: json['direction'] as String?,
|
direction: json['direction'] as String?,
|
||||||
colors:
|
colors: (json['colors'] as List<dynamic>?)
|
||||||
(json['colors'] as List<dynamic>?)?.map((e) => e as String).toList(),
|
?.map((e) => e as String)
|
||||||
|
.toList(),
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$UsernameColorToJson(_UsernameColor instance) =>
|
Map<String, dynamic> _$UsernameColorToJson(_UsernameColor instance) =>
|
||||||
@@ -80,69 +83,55 @@ Map<String, dynamic> _$UsernameColorToJson(_UsernameColor instance) =>
|
|||||||
'colors': instance.colors,
|
'colors': instance.colors,
|
||||||
};
|
};
|
||||||
|
|
||||||
_SnAccountProfile _$SnAccountProfileFromJson(Map<String, dynamic> json) =>
|
_SnAccountProfile _$SnAccountProfileFromJson(
|
||||||
_SnAccountProfile(
|
Map<String, dynamic> json,
|
||||||
id: json['id'] as String,
|
) => _SnAccountProfile(
|
||||||
firstName: json['first_name'] as String? ?? '',
|
id: json['id'] as String,
|
||||||
middleName: json['middle_name'] as String? ?? '',
|
firstName: json['first_name'] as String? ?? '',
|
||||||
lastName: json['last_name'] as String? ?? '',
|
middleName: json['middle_name'] as String? ?? '',
|
||||||
bio: json['bio'] as String? ?? '',
|
lastName: json['last_name'] as String? ?? '',
|
||||||
gender: json['gender'] as String? ?? '',
|
bio: json['bio'] as String? ?? '',
|
||||||
pronouns: json['pronouns'] as String? ?? '',
|
gender: json['gender'] as String? ?? '',
|
||||||
location: json['location'] as String? ?? '',
|
pronouns: json['pronouns'] as String? ?? '',
|
||||||
timeZone: json['time_zone'] as String? ?? '',
|
location: json['location'] as String? ?? '',
|
||||||
birthday:
|
timeZone: json['time_zone'] as String? ?? '',
|
||||||
json['birthday'] == null
|
birthday: json['birthday'] == null
|
||||||
? null
|
? null
|
||||||
: DateTime.parse(json['birthday'] as String),
|
: DateTime.parse(json['birthday'] as String),
|
||||||
links:
|
links: json['links'] == null
|
||||||
json['links'] == null
|
? const []
|
||||||
? const []
|
: const ProfileLinkConverter().fromJson(json['links']),
|
||||||
: const ProfileLinkConverter().fromJson(json['links']),
|
lastSeenAt: json['last_seen_at'] == null
|
||||||
lastSeenAt:
|
? null
|
||||||
json['last_seen_at'] == null
|
: DateTime.parse(json['last_seen_at'] as String),
|
||||||
? null
|
activeBadge: json['active_badge'] == null
|
||||||
: DateTime.parse(json['last_seen_at'] as String),
|
? null
|
||||||
activeBadge:
|
: SnAccountBadge.fromJson(json['active_badge'] as Map<String, dynamic>),
|
||||||
json['active_badge'] == null
|
experience: (json['experience'] as num).toInt(),
|
||||||
? null
|
level: (json['level'] as num).toInt(),
|
||||||
: SnAccountBadge.fromJson(
|
socialCredits: (json['social_credits'] as num?)?.toDouble() ?? 100,
|
||||||
json['active_badge'] as Map<String, dynamic>,
|
socialCreditsLevel: (json['social_credits_level'] as num?)?.toInt() ?? 0,
|
||||||
),
|
levelingProgress: (json['leveling_progress'] as num).toDouble(),
|
||||||
experience: (json['experience'] as num).toInt(),
|
picture: json['picture'] == null
|
||||||
level: (json['level'] as num).toInt(),
|
? null
|
||||||
socialCredits: (json['social_credits'] as num?)?.toDouble() ?? 100,
|
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
||||||
socialCreditsLevel: (json['social_credits_level'] as num?)?.toInt() ?? 0,
|
background: json['background'] == null
|
||||||
levelingProgress: (json['leveling_progress'] as num).toDouble(),
|
? null
|
||||||
picture:
|
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
||||||
json['picture'] == null
|
verification: json['verification'] == null
|
||||||
? null
|
? null
|
||||||
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
: SnVerificationMark.fromJson(
|
||||||
background:
|
json['verification'] as Map<String, dynamic>,
|
||||||
json['background'] == null
|
),
|
||||||
? null
|
usernameColor: json['username_color'] == null
|
||||||
: SnCloudFile.fromJson(
|
? null
|
||||||
json['background'] as Map<String, dynamic>,
|
: UsernameColor.fromJson(json['username_color'] as Map<String, dynamic>),
|
||||||
),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
verification:
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
json['verification'] == null
|
deletedAt: json['deleted_at'] == null
|
||||||
? null
|
? null
|
||||||
: SnVerificationMark.fromJson(
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
json['verification'] as Map<String, dynamic>,
|
);
|
||||||
),
|
|
||||||
usernameColor:
|
|
||||||
json['username_color'] == null
|
|
||||||
? null
|
|
||||||
: UsernameColor.fromJson(
|
|
||||||
json['username_color'] as Map<String, dynamic>,
|
|
||||||
),
|
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
|
||||||
deletedAt:
|
|
||||||
json['deleted_at'] == null
|
|
||||||
? null
|
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$SnAccountProfileToJson(_SnAccountProfile instance) =>
|
Map<String, dynamic> _$SnAccountProfileToJson(_SnAccountProfile instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
@@ -183,17 +172,15 @@ _SnAccountStatus _$SnAccountStatusFromJson(Map<String, dynamic> json) =>
|
|||||||
isCustomized: json['is_customized'] as bool,
|
isCustomized: json['is_customized'] as bool,
|
||||||
label: json['label'] as String? ?? "",
|
label: json['label'] as String? ?? "",
|
||||||
meta: json['meta'] as Map<String, dynamic>?,
|
meta: json['meta'] as Map<String, dynamic>?,
|
||||||
clearedAt:
|
clearedAt: json['cleared_at'] == null
|
||||||
json['cleared_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['cleared_at'] as String),
|
||||||
: DateTime.parse(json['cleared_at'] as String),
|
|
||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnAccountStatusToJson(_SnAccountStatus instance) =>
|
Map<String, dynamic> _$SnAccountStatusToJson(_SnAccountStatus instance) =>
|
||||||
@@ -220,21 +207,18 @@ _SnAccountBadge _$SnAccountBadgeFromJson(Map<String, dynamic> json) =>
|
|||||||
label: json['label'] as String?,
|
label: json['label'] as String?,
|
||||||
caption: json['caption'] as String?,
|
caption: json['caption'] as String?,
|
||||||
meta: json['meta'] as Map<String, dynamic>,
|
meta: json['meta'] as Map<String, dynamic>,
|
||||||
expiredAt:
|
expiredAt: json['expired_at'] == null
|
||||||
json['expired_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['expired_at'] as String),
|
||||||
: DateTime.parse(json['expired_at'] as String),
|
|
||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
activatedAt:
|
activatedAt: json['activated_at'] == null
|
||||||
json['activated_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['activated_at'] as String),
|
||||||
: DateTime.parse(json['activated_at'] as String),
|
deletedAt: json['deleted_at'] == null
|
||||||
deletedAt:
|
? null
|
||||||
json['deleted_at'] == null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
? null
|
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnAccountBadgeToJson(_SnAccountBadge instance) =>
|
Map<String, dynamic> _$SnAccountBadgeToJson(_SnAccountBadge instance) =>
|
||||||
@@ -256,20 +240,18 @@ _SnContactMethod _$SnContactMethodFromJson(Map<String, dynamic> json) =>
|
|||||||
_SnContactMethod(
|
_SnContactMethod(
|
||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
type: (json['type'] as num).toInt(),
|
type: (json['type'] as num).toInt(),
|
||||||
verifiedAt:
|
verifiedAt: json['verified_at'] == null
|
||||||
json['verified_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['verified_at'] as String),
|
||||||
: DateTime.parse(json['verified_at'] as String),
|
|
||||||
isPrimary: json['is_primary'] as bool,
|
isPrimary: json['is_primary'] as bool,
|
||||||
isPublic: json['is_public'] as bool,
|
isPublic: json['is_public'] as bool,
|
||||||
content: json['content'] as String,
|
content: json['content'] as String,
|
||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnContactMethodToJson(_SnContactMethod instance) =>
|
Map<String, dynamic> _$SnContactMethodToJson(_SnContactMethod instance) =>
|
||||||
@@ -290,10 +272,9 @@ _SnNotification _$SnNotificationFromJson(Map<String, dynamic> json) =>
|
|||||||
_SnNotification(
|
_SnNotification(
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
topic: json['topic'] as String,
|
topic: json['topic'] as String,
|
||||||
title: json['title'] as String,
|
title: json['title'] as String,
|
||||||
@@ -301,10 +282,9 @@ _SnNotification _$SnNotificationFromJson(Map<String, dynamic> json) =>
|
|||||||
content: json['content'] as String,
|
content: json['content'] as String,
|
||||||
meta: json['meta'] as Map<String, dynamic>? ?? const {},
|
meta: json['meta'] as Map<String, dynamic>? ?? const {},
|
||||||
priority: (json['priority'] as num).toInt(),
|
priority: (json['priority'] as num).toInt(),
|
||||||
viewedAt:
|
viewedAt: json['viewed_at'] == null
|
||||||
json['viewed_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['viewed_at'] as String),
|
||||||
: DateTime.parse(json['viewed_at'] as String),
|
|
||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -362,24 +342,23 @@ Map<String, dynamic> _$SnAuthDeviceToJson(_SnAuthDevice instance) =>
|
|||||||
'is_current': instance.isCurrent,
|
'is_current': instance.isCurrent,
|
||||||
};
|
};
|
||||||
|
|
||||||
_SnAuthDeviceWithChallengee _$SnAuthDeviceWithChallengeeFromJson(
|
_SnAuthDeviceWithSessione _$SnAuthDeviceWithSessioneFromJson(
|
||||||
Map<String, dynamic> json,
|
Map<String, dynamic> json,
|
||||||
) => _SnAuthDeviceWithChallengee(
|
) => _SnAuthDeviceWithSessione(
|
||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
deviceId: json['device_id'] as String,
|
deviceId: json['device_id'] as String,
|
||||||
deviceName: json['device_name'] as String,
|
deviceName: json['device_name'] as String,
|
||||||
deviceLabel: json['device_label'] as String?,
|
deviceLabel: json['device_label'] as String?,
|
||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
platform: (json['platform'] as num).toInt(),
|
platform: (json['platform'] as num).toInt(),
|
||||||
challenges:
|
sessions: (json['sessions'] as List<dynamic>)
|
||||||
(json['challenges'] as List<dynamic>)
|
.map((e) => SnAuthSession.fromJson(e as Map<String, dynamic>))
|
||||||
.map((e) => SnAuthChallenge.fromJson(e as Map<String, dynamic>))
|
.toList(),
|
||||||
.toList(),
|
|
||||||
isCurrent: json['is_current'] as bool? ?? false,
|
isCurrent: json['is_current'] as bool? ?? false,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnAuthDeviceWithChallengeeToJson(
|
Map<String, dynamic> _$SnAuthDeviceWithSessioneToJson(
|
||||||
_SnAuthDeviceWithChallengee instance,
|
_SnAuthDeviceWithSessione instance,
|
||||||
) => <String, dynamic>{
|
) => <String, dynamic>{
|
||||||
'id': instance.id,
|
'id': instance.id,
|
||||||
'device_id': instance.deviceId,
|
'device_id': instance.deviceId,
|
||||||
@@ -387,7 +366,7 @@ Map<String, dynamic> _$SnAuthDeviceWithChallengeeToJson(
|
|||||||
'device_label': instance.deviceLabel,
|
'device_label': instance.deviceLabel,
|
||||||
'account_id': instance.accountId,
|
'account_id': instance.accountId,
|
||||||
'platform': instance.platform,
|
'platform': instance.platform,
|
||||||
'challenges': instance.challenges.map((e) => e.toJson()).toList(),
|
'sessions': instance.sessions.map((e) => e.toJson()).toList(),
|
||||||
'is_current': instance.isCurrent,
|
'is_current': instance.isCurrent,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -400,10 +379,9 @@ _SnExperienceRecord _$SnExperienceRecordFromJson(Map<String, dynamic> json) =>
|
|||||||
bonusMultiplier: (json['bonus_multiplier'] as num?)?.toDouble() ?? 1.0,
|
bonusMultiplier: (json['bonus_multiplier'] as num?)?.toDouble() ?? 1.0,
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnExperienceRecordToJson(_SnExperienceRecord instance) =>
|
Map<String, dynamic> _$SnExperienceRecordToJson(_SnExperienceRecord instance) =>
|
||||||
@@ -425,16 +403,14 @@ _SnSocialCreditRecord _$SnSocialCreditRecordFromJson(
|
|||||||
delta: (json['delta'] as num).toDouble(),
|
delta: (json['delta'] as num).toDouble(),
|
||||||
reasonType: json['reason_type'] as String,
|
reasonType: json['reason_type'] as String,
|
||||||
reason: json['reason'] as String,
|
reason: json['reason'] as String,
|
||||||
expiredAt:
|
expiredAt: json['expired_at'] == null
|
||||||
json['expired_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['expired_at'] as String),
|
||||||
: DateTime.parse(json['expired_at'] as String),
|
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnSocialCreditRecordToJson(
|
Map<String, dynamic> _$SnSocialCreditRecordToJson(
|
||||||
@@ -455,10 +431,9 @@ _SnFriendOverviewItem _$SnFriendOverviewItemFromJson(
|
|||||||
) => _SnFriendOverviewItem(
|
) => _SnFriendOverviewItem(
|
||||||
account: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
account: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||||
status: SnAccountStatus.fromJson(json['status'] as Map<String, dynamic>),
|
status: SnAccountStatus.fromJson(json['status'] as Map<String, dynamic>),
|
||||||
activities:
|
activities: (json['activities'] as List<dynamic>)
|
||||||
(json['activities'] as List<dynamic>)
|
.map((e) => SnPresenceActivity.fromJson(e as Map<String, dynamic>))
|
||||||
.map((e) => SnPresenceActivity.fromJson(e as Map<String, dynamic>))
|
.toList(),
|
||||||
.toList(),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnFriendOverviewItemToJson(
|
Map<String, dynamic> _$SnFriendOverviewItemToJson(
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ sealed class SnNotableDay with _$SnNotableDay {
|
|||||||
required DateTime date,
|
required DateTime date,
|
||||||
required String localName,
|
required String localName,
|
||||||
required String globalName,
|
required String globalName,
|
||||||
required String countryCode,
|
required String? countryCode,
|
||||||
|
required String? localizableKey,
|
||||||
required List<int> holidays,
|
required List<int> holidays,
|
||||||
}) = _SnNotableDay;
|
}) = _SnNotableDay;
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$SnNotableDay {
|
mixin _$SnNotableDay {
|
||||||
|
|
||||||
DateTime get date; String get localName; String get globalName; String get countryCode; List<int> get holidays;
|
DateTime get date; String get localName; String get globalName; String? get countryCode; String? get localizableKey; List<int> get holidays;
|
||||||
/// Create a copy of SnNotableDay
|
/// Create a copy of SnNotableDay
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -28,16 +28,16 @@ $SnNotableDayCopyWith<SnNotableDay> get copyWith => _$SnNotableDayCopyWithImpl<S
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnNotableDay&&(identical(other.date, date) || other.date == date)&&(identical(other.localName, localName) || other.localName == localName)&&(identical(other.globalName, globalName) || other.globalName == globalName)&&(identical(other.countryCode, countryCode) || other.countryCode == countryCode)&&const DeepCollectionEquality().equals(other.holidays, holidays));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnNotableDay&&(identical(other.date, date) || other.date == date)&&(identical(other.localName, localName) || other.localName == localName)&&(identical(other.globalName, globalName) || other.globalName == globalName)&&(identical(other.countryCode, countryCode) || other.countryCode == countryCode)&&(identical(other.localizableKey, localizableKey) || other.localizableKey == localizableKey)&&const DeepCollectionEquality().equals(other.holidays, holidays));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,date,localName,globalName,countryCode,const DeepCollectionEquality().hash(holidays));
|
int get hashCode => Object.hash(runtimeType,date,localName,globalName,countryCode,localizableKey,const DeepCollectionEquality().hash(holidays));
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnNotableDay(date: $date, localName: $localName, globalName: $globalName, countryCode: $countryCode, holidays: $holidays)';
|
return 'SnNotableDay(date: $date, localName: $localName, globalName: $globalName, countryCode: $countryCode, localizableKey: $localizableKey, holidays: $holidays)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ abstract mixin class $SnNotableDayCopyWith<$Res> {
|
|||||||
factory $SnNotableDayCopyWith(SnNotableDay value, $Res Function(SnNotableDay) _then) = _$SnNotableDayCopyWithImpl;
|
factory $SnNotableDayCopyWith(SnNotableDay value, $Res Function(SnNotableDay) _then) = _$SnNotableDayCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
DateTime date, String localName, String globalName, String countryCode, List<int> holidays
|
DateTime date, String localName, String globalName, String? countryCode, String? localizableKey, List<int> holidays
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -65,13 +65,14 @@ class _$SnNotableDayCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnNotableDay
|
/// Create a copy of SnNotableDay
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? date = null,Object? localName = null,Object? globalName = null,Object? countryCode = null,Object? holidays = null,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? date = null,Object? localName = null,Object? globalName = null,Object? countryCode = freezed,Object? localizableKey = freezed,Object? holidays = null,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
date: null == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
date: null == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime,localName: null == localName ? _self.localName : localName // ignore: cast_nullable_to_non_nullable
|
as DateTime,localName: null == localName ? _self.localName : localName // ignore: cast_nullable_to_non_nullable
|
||||||
as String,globalName: null == globalName ? _self.globalName : globalName // ignore: cast_nullable_to_non_nullable
|
as String,globalName: null == globalName ? _self.globalName : globalName // ignore: cast_nullable_to_non_nullable
|
||||||
as String,countryCode: null == countryCode ? _self.countryCode : countryCode // ignore: cast_nullable_to_non_nullable
|
as String,countryCode: freezed == countryCode ? _self.countryCode : countryCode // ignore: cast_nullable_to_non_nullable
|
||||||
as String,holidays: null == holidays ? _self.holidays : holidays // ignore: cast_nullable_to_non_nullable
|
as String?,localizableKey: freezed == localizableKey ? _self.localizableKey : localizableKey // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,holidays: null == holidays ? _self.holidays : holidays // ignore: cast_nullable_to_non_nullable
|
||||||
as List<int>,
|
as List<int>,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@@ -154,10 +155,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( DateTime date, String localName, String globalName, String countryCode, List<int> holidays)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( DateTime date, String localName, String globalName, String? countryCode, String? localizableKey, List<int> holidays)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnNotableDay() when $default != null:
|
case _SnNotableDay() when $default != null:
|
||||||
return $default(_that.date,_that.localName,_that.globalName,_that.countryCode,_that.holidays);case _:
|
return $default(_that.date,_that.localName,_that.globalName,_that.countryCode,_that.localizableKey,_that.holidays);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -175,10 +176,10 @@ return $default(_that.date,_that.localName,_that.globalName,_that.countryCode,_t
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( DateTime date, String localName, String globalName, String countryCode, List<int> holidays) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( DateTime date, String localName, String globalName, String? countryCode, String? localizableKey, List<int> holidays) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnNotableDay():
|
case _SnNotableDay():
|
||||||
return $default(_that.date,_that.localName,_that.globalName,_that.countryCode,_that.holidays);}
|
return $default(_that.date,_that.localName,_that.globalName,_that.countryCode,_that.localizableKey,_that.holidays);}
|
||||||
}
|
}
|
||||||
/// A variant of `when` that fallback to returning `null`
|
/// A variant of `when` that fallback to returning `null`
|
||||||
///
|
///
|
||||||
@@ -192,10 +193,10 @@ return $default(_that.date,_that.localName,_that.globalName,_that.countryCode,_t
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( DateTime date, String localName, String globalName, String countryCode, List<int> holidays)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( DateTime date, String localName, String globalName, String? countryCode, String? localizableKey, List<int> holidays)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnNotableDay() when $default != null:
|
case _SnNotableDay() when $default != null:
|
||||||
return $default(_that.date,_that.localName,_that.globalName,_that.countryCode,_that.holidays);case _:
|
return $default(_that.date,_that.localName,_that.globalName,_that.countryCode,_that.localizableKey,_that.holidays);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -207,13 +208,14 @@ return $default(_that.date,_that.localName,_that.globalName,_that.countryCode,_t
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _SnNotableDay implements SnNotableDay {
|
class _SnNotableDay implements SnNotableDay {
|
||||||
const _SnNotableDay({required this.date, required this.localName, required this.globalName, required this.countryCode, required final List<int> holidays}): _holidays = holidays;
|
const _SnNotableDay({required this.date, required this.localName, required this.globalName, required this.countryCode, required this.localizableKey, required final List<int> holidays}): _holidays = holidays;
|
||||||
factory _SnNotableDay.fromJson(Map<String, dynamic> json) => _$SnNotableDayFromJson(json);
|
factory _SnNotableDay.fromJson(Map<String, dynamic> json) => _$SnNotableDayFromJson(json);
|
||||||
|
|
||||||
@override final DateTime date;
|
@override final DateTime date;
|
||||||
@override final String localName;
|
@override final String localName;
|
||||||
@override final String globalName;
|
@override final String globalName;
|
||||||
@override final String countryCode;
|
@override final String? countryCode;
|
||||||
|
@override final String? localizableKey;
|
||||||
final List<int> _holidays;
|
final List<int> _holidays;
|
||||||
@override List<int> get holidays {
|
@override List<int> get holidays {
|
||||||
if (_holidays is EqualUnmodifiableListView) return _holidays;
|
if (_holidays is EqualUnmodifiableListView) return _holidays;
|
||||||
@@ -235,16 +237,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnNotableDay&&(identical(other.date, date) || other.date == date)&&(identical(other.localName, localName) || other.localName == localName)&&(identical(other.globalName, globalName) || other.globalName == globalName)&&(identical(other.countryCode, countryCode) || other.countryCode == countryCode)&&const DeepCollectionEquality().equals(other._holidays, _holidays));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnNotableDay&&(identical(other.date, date) || other.date == date)&&(identical(other.localName, localName) || other.localName == localName)&&(identical(other.globalName, globalName) || other.globalName == globalName)&&(identical(other.countryCode, countryCode) || other.countryCode == countryCode)&&(identical(other.localizableKey, localizableKey) || other.localizableKey == localizableKey)&&const DeepCollectionEquality().equals(other._holidays, _holidays));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,date,localName,globalName,countryCode,const DeepCollectionEquality().hash(_holidays));
|
int get hashCode => Object.hash(runtimeType,date,localName,globalName,countryCode,localizableKey,const DeepCollectionEquality().hash(_holidays));
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnNotableDay(date: $date, localName: $localName, globalName: $globalName, countryCode: $countryCode, holidays: $holidays)';
|
return 'SnNotableDay(date: $date, localName: $localName, globalName: $globalName, countryCode: $countryCode, localizableKey: $localizableKey, holidays: $holidays)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -255,7 +257,7 @@ abstract mixin class _$SnNotableDayCopyWith<$Res> implements $SnNotableDayCopyWi
|
|||||||
factory _$SnNotableDayCopyWith(_SnNotableDay value, $Res Function(_SnNotableDay) _then) = __$SnNotableDayCopyWithImpl;
|
factory _$SnNotableDayCopyWith(_SnNotableDay value, $Res Function(_SnNotableDay) _then) = __$SnNotableDayCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
DateTime date, String localName, String globalName, String countryCode, List<int> holidays
|
DateTime date, String localName, String globalName, String? countryCode, String? localizableKey, List<int> holidays
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -272,13 +274,14 @@ class __$SnNotableDayCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnNotableDay
|
/// Create a copy of SnNotableDay
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? date = null,Object? localName = null,Object? globalName = null,Object? countryCode = null,Object? holidays = null,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? date = null,Object? localName = null,Object? globalName = null,Object? countryCode = freezed,Object? localizableKey = freezed,Object? holidays = null,}) {
|
||||||
return _then(_SnNotableDay(
|
return _then(_SnNotableDay(
|
||||||
date: null == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
date: null == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime,localName: null == localName ? _self.localName : localName // ignore: cast_nullable_to_non_nullable
|
as DateTime,localName: null == localName ? _self.localName : localName // ignore: cast_nullable_to_non_nullable
|
||||||
as String,globalName: null == globalName ? _self.globalName : globalName // ignore: cast_nullable_to_non_nullable
|
as String,globalName: null == globalName ? _self.globalName : globalName // ignore: cast_nullable_to_non_nullable
|
||||||
as String,countryCode: null == countryCode ? _self.countryCode : countryCode // ignore: cast_nullable_to_non_nullable
|
as String,countryCode: freezed == countryCode ? _self.countryCode : countryCode // ignore: cast_nullable_to_non_nullable
|
||||||
as String,holidays: null == holidays ? _self._holidays : holidays // ignore: cast_nullable_to_non_nullable
|
as String?,localizableKey: freezed == localizableKey ? _self.localizableKey : localizableKey // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,holidays: null == holidays ? _self._holidays : holidays // ignore: cast_nullable_to_non_nullable
|
||||||
as List<int>,
|
as List<int>,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ _SnNotableDay _$SnNotableDayFromJson(Map<String, dynamic> json) =>
|
|||||||
date: DateTime.parse(json['date'] as String),
|
date: DateTime.parse(json['date'] as String),
|
||||||
localName: json['local_name'] as String,
|
localName: json['local_name'] as String,
|
||||||
globalName: json['global_name'] as String,
|
globalName: json['global_name'] as String,
|
||||||
countryCode: json['country_code'] as String,
|
countryCode: json['country_code'] as String?,
|
||||||
holidays:
|
localizableKey: json['localizable_key'] as String?,
|
||||||
(json['holidays'] as List<dynamic>)
|
holidays: (json['holidays'] as List<dynamic>)
|
||||||
.map((e) => (e as num).toInt())
|
.map((e) => (e as num).toInt())
|
||||||
.toList(),
|
.toList(),
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnNotableDayToJson(_SnNotableDay instance) =>
|
Map<String, dynamic> _$SnNotableDayToJson(_SnNotableDay instance) =>
|
||||||
@@ -24,6 +24,7 @@ Map<String, dynamic> _$SnNotableDayToJson(_SnNotableDay instance) =>
|
|||||||
'local_name': instance.localName,
|
'local_name': instance.localName,
|
||||||
'global_name': instance.globalName,
|
'global_name': instance.globalName,
|
||||||
'country_code': instance.countryCode,
|
'country_code': instance.countryCode,
|
||||||
|
'localizable_key': instance.localizableKey,
|
||||||
'holidays': instance.holidays,
|
'holidays': instance.holidays,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -35,10 +36,9 @@ _SnTimelineEvent _$SnTimelineEventFromJson(Map<String, dynamic> json) =>
|
|||||||
data: json['data'],
|
data: json['data'],
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnTimelineEventToJson(_SnTimelineEvent instance) =>
|
Map<String, dynamic> _$SnTimelineEventToJson(_SnTimelineEvent instance) =>
|
||||||
@@ -56,21 +56,18 @@ _SnCheckInResult _$SnCheckInResultFromJson(Map<String, dynamic> json) =>
|
|||||||
_SnCheckInResult(
|
_SnCheckInResult(
|
||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
level: (json['level'] as num).toInt(),
|
level: (json['level'] as num).toInt(),
|
||||||
tips:
|
tips: (json['tips'] as List<dynamic>)
|
||||||
(json['tips'] as List<dynamic>)
|
.map((e) => SnFortuneTip.fromJson(e as Map<String, dynamic>))
|
||||||
.map((e) => SnFortuneTip.fromJson(e as Map<String, dynamic>))
|
.toList(),
|
||||||
.toList(),
|
|
||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
account:
|
account: json['account'] == null
|
||||||
json['account'] == null
|
? null
|
||||||
? null
|
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnCheckInResultToJson(_SnCheckInResult instance) =>
|
Map<String, dynamic> _$SnCheckInResultToJson(_SnCheckInResult instance) =>
|
||||||
@@ -103,16 +100,14 @@ _SnEventCalendarEntry _$SnEventCalendarEntryFromJson(
|
|||||||
Map<String, dynamic> json,
|
Map<String, dynamic> json,
|
||||||
) => _SnEventCalendarEntry(
|
) => _SnEventCalendarEntry(
|
||||||
date: DateTime.parse(json['date'] as String),
|
date: DateTime.parse(json['date'] as String),
|
||||||
checkInResult:
|
checkInResult: json['check_in_result'] == null
|
||||||
json['check_in_result'] == null
|
? null
|
||||||
? null
|
: SnCheckInResult.fromJson(
|
||||||
: SnCheckInResult.fromJson(
|
json['check_in_result'] as Map<String, dynamic>,
|
||||||
json['check_in_result'] as Map<String, dynamic>,
|
),
|
||||||
),
|
statuses: (json['statuses'] as List<dynamic>)
|
||||||
statuses:
|
.map((e) => SnAccountStatus.fromJson(e as Map<String, dynamic>))
|
||||||
(json['statuses'] as List<dynamic>)
|
.toList(),
|
||||||
.map((e) => SnAccountStatus.fromJson(e as Map<String, dynamic>))
|
|
||||||
.toList(),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnEventCalendarEntryToJson(
|
Map<String, dynamic> _$SnEventCalendarEntryToJson(
|
||||||
@@ -141,10 +136,9 @@ _SnPresenceActivity _$SnPresenceActivityFromJson(Map<String, dynamic> json) =>
|
|||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnPresenceActivityToJson(_SnPresenceActivity instance) =>
|
Map<String, dynamic> _$SnPresenceActivityToJson(_SnPresenceActivity instance) =>
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ sealed class SnAuthChallenge with _$SnAuthChallenge {
|
|||||||
required int stepRemain,
|
required int stepRemain,
|
||||||
required int stepTotal,
|
required int stepTotal,
|
||||||
required int failedAttempts,
|
required int failedAttempts,
|
||||||
required int type,
|
|
||||||
required List<String> blacklistFactors,
|
required List<String> blacklistFactors,
|
||||||
required List<dynamic> audiences,
|
required List<dynamic> audiences,
|
||||||
required List<dynamic> scopes,
|
required List<dynamic> scopes,
|
||||||
@@ -58,9 +57,13 @@ sealed class SnAuthSession with _$SnAuthSession {
|
|||||||
required String? label,
|
required String? label,
|
||||||
required DateTime lastGrantedAt,
|
required DateTime lastGrantedAt,
|
||||||
required DateTime? expiredAt,
|
required DateTime? expiredAt,
|
||||||
|
required List<dynamic> audiences,
|
||||||
|
required List<dynamic> scopes,
|
||||||
|
required String? ipAddress,
|
||||||
|
required String? userAgent,
|
||||||
|
required GeoIpLocation? location,
|
||||||
|
required int type,
|
||||||
required String accountId,
|
required String accountId,
|
||||||
required String challengeId,
|
|
||||||
required SnAuthChallenge challenge,
|
|
||||||
required DateTime createdAt,
|
required DateTime createdAt,
|
||||||
required DateTime updatedAt,
|
required DateTime updatedAt,
|
||||||
required DateTime? deletedAt,
|
required DateTime? deletedAt,
|
||||||
|
|||||||
@@ -541,7 +541,7 @@ as String?,
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$SnAuthChallenge {
|
mixin _$SnAuthChallenge {
|
||||||
|
|
||||||
String get id; DateTime? get expiredAt; int get stepRemain; int get stepTotal; int get failedAttempts; int get type; List<String> get blacklistFactors; List<dynamic> get audiences; List<dynamic> get scopes; String get ipAddress; String get userAgent; String? get nonce; GeoIpLocation? get location; String get accountId; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
String get id; DateTime? get expiredAt; int get stepRemain; int get stepTotal; int get failedAttempts; List<String> get blacklistFactors; List<dynamic> get audiences; List<dynamic> get scopes; String get ipAddress; String get userAgent; String? get nonce; GeoIpLocation? get location; String get accountId; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
||||||
/// Create a copy of SnAuthChallenge
|
/// Create a copy of SnAuthChallenge
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -554,16 +554,16 @@ $SnAuthChallengeCopyWith<SnAuthChallenge> get copyWith => _$SnAuthChallengeCopyW
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAuthChallenge&&(identical(other.id, id) || other.id == id)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.stepRemain, stepRemain) || other.stepRemain == stepRemain)&&(identical(other.stepTotal, stepTotal) || other.stepTotal == stepTotal)&&(identical(other.failedAttempts, failedAttempts) || other.failedAttempts == failedAttempts)&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other.blacklistFactors, blacklistFactors)&&const DeepCollectionEquality().equals(other.audiences, audiences)&&const DeepCollectionEquality().equals(other.scopes, scopes)&&(identical(other.ipAddress, ipAddress) || other.ipAddress == ipAddress)&&(identical(other.userAgent, userAgent) || other.userAgent == userAgent)&&(identical(other.nonce, nonce) || other.nonce == nonce)&&(identical(other.location, location) || other.location == location)&&(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 SnAuthChallenge&&(identical(other.id, id) || other.id == id)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.stepRemain, stepRemain) || other.stepRemain == stepRemain)&&(identical(other.stepTotal, stepTotal) || other.stepTotal == stepTotal)&&(identical(other.failedAttempts, failedAttempts) || other.failedAttempts == failedAttempts)&&const DeepCollectionEquality().equals(other.blacklistFactors, blacklistFactors)&&const DeepCollectionEquality().equals(other.audiences, audiences)&&const DeepCollectionEquality().equals(other.scopes, scopes)&&(identical(other.ipAddress, ipAddress) || other.ipAddress == ipAddress)&&(identical(other.userAgent, userAgent) || other.userAgent == userAgent)&&(identical(other.nonce, nonce) || other.nonce == nonce)&&(identical(other.location, location) || other.location == location)&&(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));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,id,expiredAt,stepRemain,stepTotal,failedAttempts,type,const DeepCollectionEquality().hash(blacklistFactors),const DeepCollectionEquality().hash(audiences),const DeepCollectionEquality().hash(scopes),ipAddress,userAgent,nonce,location,accountId,createdAt,updatedAt,deletedAt);
|
int get hashCode => Object.hash(runtimeType,id,expiredAt,stepRemain,stepTotal,failedAttempts,const DeepCollectionEquality().hash(blacklistFactors),const DeepCollectionEquality().hash(audiences),const DeepCollectionEquality().hash(scopes),ipAddress,userAgent,nonce,location,accountId,createdAt,updatedAt,deletedAt);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnAuthChallenge(id: $id, expiredAt: $expiredAt, stepRemain: $stepRemain, stepTotal: $stepTotal, failedAttempts: $failedAttempts, type: $type, blacklistFactors: $blacklistFactors, audiences: $audiences, scopes: $scopes, ipAddress: $ipAddress, userAgent: $userAgent, nonce: $nonce, location: $location, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
return 'SnAuthChallenge(id: $id, expiredAt: $expiredAt, stepRemain: $stepRemain, stepTotal: $stepTotal, failedAttempts: $failedAttempts, blacklistFactors: $blacklistFactors, audiences: $audiences, scopes: $scopes, ipAddress: $ipAddress, userAgent: $userAgent, nonce: $nonce, location: $location, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -574,7 +574,7 @@ abstract mixin class $SnAuthChallengeCopyWith<$Res> {
|
|||||||
factory $SnAuthChallengeCopyWith(SnAuthChallenge value, $Res Function(SnAuthChallenge) _then) = _$SnAuthChallengeCopyWithImpl;
|
factory $SnAuthChallengeCopyWith(SnAuthChallenge value, $Res Function(SnAuthChallenge) _then) = _$SnAuthChallengeCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, int type, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -591,14 +591,13 @@ class _$SnAuthChallengeCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnAuthChallenge
|
/// Create a copy of SnAuthChallenge
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? expiredAt = freezed,Object? stepRemain = null,Object? stepTotal = null,Object? failedAttempts = null,Object? type = null,Object? blacklistFactors = null,Object? audiences = null,Object? scopes = null,Object? ipAddress = null,Object? userAgent = null,Object? nonce = freezed,Object? location = freezed,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? expiredAt = freezed,Object? stepRemain = null,Object? stepTotal = null,Object? failedAttempts = null,Object? blacklistFactors = null,Object? audiences = null,Object? scopes = null,Object? ipAddress = null,Object? userAgent = null,Object? nonce = freezed,Object? location = freezed,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
as String,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
as String,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime?,stepRemain: null == stepRemain ? _self.stepRemain : stepRemain // ignore: cast_nullable_to_non_nullable
|
as DateTime?,stepRemain: null == stepRemain ? _self.stepRemain : stepRemain // ignore: cast_nullable_to_non_nullable
|
||||||
as int,stepTotal: null == stepTotal ? _self.stepTotal : stepTotal // ignore: cast_nullable_to_non_nullable
|
as int,stepTotal: null == stepTotal ? _self.stepTotal : stepTotal // ignore: cast_nullable_to_non_nullable
|
||||||
as int,failedAttempts: null == failedAttempts ? _self.failedAttempts : failedAttempts // ignore: cast_nullable_to_non_nullable
|
as int,failedAttempts: null == failedAttempts ? _self.failedAttempts : failedAttempts // ignore: cast_nullable_to_non_nullable
|
||||||
as int,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
|
||||||
as int,blacklistFactors: null == blacklistFactors ? _self.blacklistFactors : blacklistFactors // ignore: cast_nullable_to_non_nullable
|
as int,blacklistFactors: null == blacklistFactors ? _self.blacklistFactors : blacklistFactors // ignore: cast_nullable_to_non_nullable
|
||||||
as List<String>,audiences: null == audiences ? _self.audiences : audiences // ignore: cast_nullable_to_non_nullable
|
as List<String>,audiences: null == audiences ? _self.audiences : audiences // ignore: cast_nullable_to_non_nullable
|
||||||
as List<dynamic>,scopes: null == scopes ? _self.scopes : scopes // ignore: cast_nullable_to_non_nullable
|
as List<dynamic>,scopes: null == scopes ? _self.scopes : scopes // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -704,10 +703,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, int type, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnAuthChallenge() when $default != null:
|
case _SnAuthChallenge() when $default != null:
|
||||||
return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.failedAttempts,_that.type,_that.blacklistFactors,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.nonce,_that.location,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.failedAttempts,_that.blacklistFactors,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.nonce,_that.location,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -725,10 +724,10 @@ return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, int type, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnAuthChallenge():
|
case _SnAuthChallenge():
|
||||||
return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.failedAttempts,_that.type,_that.blacklistFactors,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.nonce,_that.location,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);}
|
return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.failedAttempts,_that.blacklistFactors,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.nonce,_that.location,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);}
|
||||||
}
|
}
|
||||||
/// A variant of `when` that fallback to returning `null`
|
/// A variant of `when` that fallback to returning `null`
|
||||||
///
|
///
|
||||||
@@ -742,10 +741,10 @@ return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, int type, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnAuthChallenge() when $default != null:
|
case _SnAuthChallenge() when $default != null:
|
||||||
return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.failedAttempts,_that.type,_that.blacklistFactors,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.nonce,_that.location,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.failedAttempts,_that.blacklistFactors,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.nonce,_that.location,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -757,7 +756,7 @@ return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _SnAuthChallenge implements SnAuthChallenge {
|
class _SnAuthChallenge implements SnAuthChallenge {
|
||||||
const _SnAuthChallenge({required this.id, required this.expiredAt, required this.stepRemain, required this.stepTotal, required this.failedAttempts, required this.type, required final List<String> blacklistFactors, required final List<dynamic> audiences, required final List<dynamic> scopes, required this.ipAddress, required this.userAgent, required this.nonce, required this.location, required this.accountId, required this.createdAt, required this.updatedAt, required this.deletedAt}): _blacklistFactors = blacklistFactors,_audiences = audiences,_scopes = scopes;
|
const _SnAuthChallenge({required this.id, required this.expiredAt, required this.stepRemain, required this.stepTotal, required this.failedAttempts, required final List<String> blacklistFactors, required final List<dynamic> audiences, required final List<dynamic> scopes, required this.ipAddress, required this.userAgent, required this.nonce, required this.location, required this.accountId, required this.createdAt, required this.updatedAt, required this.deletedAt}): _blacklistFactors = blacklistFactors,_audiences = audiences,_scopes = scopes;
|
||||||
factory _SnAuthChallenge.fromJson(Map<String, dynamic> json) => _$SnAuthChallengeFromJson(json);
|
factory _SnAuthChallenge.fromJson(Map<String, dynamic> json) => _$SnAuthChallengeFromJson(json);
|
||||||
|
|
||||||
@override final String id;
|
@override final String id;
|
||||||
@@ -765,7 +764,6 @@ class _SnAuthChallenge implements SnAuthChallenge {
|
|||||||
@override final int stepRemain;
|
@override final int stepRemain;
|
||||||
@override final int stepTotal;
|
@override final int stepTotal;
|
||||||
@override final int failedAttempts;
|
@override final int failedAttempts;
|
||||||
@override final int type;
|
|
||||||
final List<String> _blacklistFactors;
|
final List<String> _blacklistFactors;
|
||||||
@override List<String> get blacklistFactors {
|
@override List<String> get blacklistFactors {
|
||||||
if (_blacklistFactors is EqualUnmodifiableListView) return _blacklistFactors;
|
if (_blacklistFactors is EqualUnmodifiableListView) return _blacklistFactors;
|
||||||
@@ -809,16 +807,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAuthChallenge&&(identical(other.id, id) || other.id == id)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.stepRemain, stepRemain) || other.stepRemain == stepRemain)&&(identical(other.stepTotal, stepTotal) || other.stepTotal == stepTotal)&&(identical(other.failedAttempts, failedAttempts) || other.failedAttempts == failedAttempts)&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other._blacklistFactors, _blacklistFactors)&&const DeepCollectionEquality().equals(other._audiences, _audiences)&&const DeepCollectionEquality().equals(other._scopes, _scopes)&&(identical(other.ipAddress, ipAddress) || other.ipAddress == ipAddress)&&(identical(other.userAgent, userAgent) || other.userAgent == userAgent)&&(identical(other.nonce, nonce) || other.nonce == nonce)&&(identical(other.location, location) || other.location == location)&&(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 _SnAuthChallenge&&(identical(other.id, id) || other.id == id)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.stepRemain, stepRemain) || other.stepRemain == stepRemain)&&(identical(other.stepTotal, stepTotal) || other.stepTotal == stepTotal)&&(identical(other.failedAttempts, failedAttempts) || other.failedAttempts == failedAttempts)&&const DeepCollectionEquality().equals(other._blacklistFactors, _blacklistFactors)&&const DeepCollectionEquality().equals(other._audiences, _audiences)&&const DeepCollectionEquality().equals(other._scopes, _scopes)&&(identical(other.ipAddress, ipAddress) || other.ipAddress == ipAddress)&&(identical(other.userAgent, userAgent) || other.userAgent == userAgent)&&(identical(other.nonce, nonce) || other.nonce == nonce)&&(identical(other.location, location) || other.location == location)&&(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));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,id,expiredAt,stepRemain,stepTotal,failedAttempts,type,const DeepCollectionEquality().hash(_blacklistFactors),const DeepCollectionEquality().hash(_audiences),const DeepCollectionEquality().hash(_scopes),ipAddress,userAgent,nonce,location,accountId,createdAt,updatedAt,deletedAt);
|
int get hashCode => Object.hash(runtimeType,id,expiredAt,stepRemain,stepTotal,failedAttempts,const DeepCollectionEquality().hash(_blacklistFactors),const DeepCollectionEquality().hash(_audiences),const DeepCollectionEquality().hash(_scopes),ipAddress,userAgent,nonce,location,accountId,createdAt,updatedAt,deletedAt);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnAuthChallenge(id: $id, expiredAt: $expiredAt, stepRemain: $stepRemain, stepTotal: $stepTotal, failedAttempts: $failedAttempts, type: $type, blacklistFactors: $blacklistFactors, audiences: $audiences, scopes: $scopes, ipAddress: $ipAddress, userAgent: $userAgent, nonce: $nonce, location: $location, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
return 'SnAuthChallenge(id: $id, expiredAt: $expiredAt, stepRemain: $stepRemain, stepTotal: $stepTotal, failedAttempts: $failedAttempts, blacklistFactors: $blacklistFactors, audiences: $audiences, scopes: $scopes, ipAddress: $ipAddress, userAgent: $userAgent, nonce: $nonce, location: $location, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -829,7 +827,7 @@ abstract mixin class _$SnAuthChallengeCopyWith<$Res> implements $SnAuthChallenge
|
|||||||
factory _$SnAuthChallengeCopyWith(_SnAuthChallenge value, $Res Function(_SnAuthChallenge) _then) = __$SnAuthChallengeCopyWithImpl;
|
factory _$SnAuthChallengeCopyWith(_SnAuthChallenge value, $Res Function(_SnAuthChallenge) _then) = __$SnAuthChallengeCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, int type, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -846,14 +844,13 @@ class __$SnAuthChallengeCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnAuthChallenge
|
/// Create a copy of SnAuthChallenge
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? expiredAt = freezed,Object? stepRemain = null,Object? stepTotal = null,Object? failedAttempts = null,Object? type = null,Object? blacklistFactors = null,Object? audiences = null,Object? scopes = null,Object? ipAddress = null,Object? userAgent = null,Object? nonce = freezed,Object? location = freezed,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? expiredAt = freezed,Object? stepRemain = null,Object? stepTotal = null,Object? failedAttempts = null,Object? blacklistFactors = null,Object? audiences = null,Object? scopes = null,Object? ipAddress = null,Object? userAgent = null,Object? nonce = freezed,Object? location = freezed,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||||
return _then(_SnAuthChallenge(
|
return _then(_SnAuthChallenge(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
as String,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
as String,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime?,stepRemain: null == stepRemain ? _self.stepRemain : stepRemain // ignore: cast_nullable_to_non_nullable
|
as DateTime?,stepRemain: null == stepRemain ? _self.stepRemain : stepRemain // ignore: cast_nullable_to_non_nullable
|
||||||
as int,stepTotal: null == stepTotal ? _self.stepTotal : stepTotal // ignore: cast_nullable_to_non_nullable
|
as int,stepTotal: null == stepTotal ? _self.stepTotal : stepTotal // ignore: cast_nullable_to_non_nullable
|
||||||
as int,failedAttempts: null == failedAttempts ? _self.failedAttempts : failedAttempts // ignore: cast_nullable_to_non_nullable
|
as int,failedAttempts: null == failedAttempts ? _self.failedAttempts : failedAttempts // ignore: cast_nullable_to_non_nullable
|
||||||
as int,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
|
||||||
as int,blacklistFactors: null == blacklistFactors ? _self._blacklistFactors : blacklistFactors // ignore: cast_nullable_to_non_nullable
|
as int,blacklistFactors: null == blacklistFactors ? _self._blacklistFactors : blacklistFactors // ignore: cast_nullable_to_non_nullable
|
||||||
as List<String>,audiences: null == audiences ? _self._audiences : audiences // ignore: cast_nullable_to_non_nullable
|
as List<String>,audiences: null == audiences ? _self._audiences : audiences // ignore: cast_nullable_to_non_nullable
|
||||||
as List<dynamic>,scopes: null == scopes ? _self._scopes : scopes // ignore: cast_nullable_to_non_nullable
|
as List<dynamic>,scopes: null == scopes ? _self._scopes : scopes // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -888,7 +885,7 @@ $GeoIpLocationCopyWith<$Res>? get location {
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$SnAuthSession {
|
mixin _$SnAuthSession {
|
||||||
|
|
||||||
String get id; String? get label; DateTime get lastGrantedAt; DateTime? get expiredAt; String get accountId; String get challengeId; SnAuthChallenge get challenge; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
String get id; String? get label; DateTime get lastGrantedAt; DateTime? get expiredAt; List<dynamic> get audiences; List<dynamic> get scopes; String? get ipAddress; String? get userAgent; GeoIpLocation? get location; int get type; String get accountId; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
||||||
/// Create a copy of SnAuthSession
|
/// Create a copy of SnAuthSession
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -901,16 +898,16 @@ $SnAuthSessionCopyWith<SnAuthSession> get copyWith => _$SnAuthSessionCopyWithImp
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAuthSession&&(identical(other.id, id) || other.id == id)&&(identical(other.label, label) || other.label == label)&&(identical(other.lastGrantedAt, lastGrantedAt) || other.lastGrantedAt == lastGrantedAt)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.challengeId, challengeId) || other.challengeId == challengeId)&&(identical(other.challenge, challenge) || other.challenge == challenge)&&(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 SnAuthSession&&(identical(other.id, id) || other.id == id)&&(identical(other.label, label) || other.label == label)&&(identical(other.lastGrantedAt, lastGrantedAt) || other.lastGrantedAt == lastGrantedAt)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&const DeepCollectionEquality().equals(other.audiences, audiences)&&const DeepCollectionEquality().equals(other.scopes, scopes)&&(identical(other.ipAddress, ipAddress) || other.ipAddress == ipAddress)&&(identical(other.userAgent, userAgent) || other.userAgent == userAgent)&&(identical(other.location, location) || other.location == location)&&(identical(other.type, type) || other.type == type)&&(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));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,id,label,lastGrantedAt,expiredAt,accountId,challengeId,challenge,createdAt,updatedAt,deletedAt);
|
int get hashCode => Object.hash(runtimeType,id,label,lastGrantedAt,expiredAt,const DeepCollectionEquality().hash(audiences),const DeepCollectionEquality().hash(scopes),ipAddress,userAgent,location,type,accountId,createdAt,updatedAt,deletedAt);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnAuthSession(id: $id, label: $label, lastGrantedAt: $lastGrantedAt, expiredAt: $expiredAt, accountId: $accountId, challengeId: $challengeId, challenge: $challenge, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
return 'SnAuthSession(id: $id, label: $label, lastGrantedAt: $lastGrantedAt, expiredAt: $expiredAt, audiences: $audiences, scopes: $scopes, ipAddress: $ipAddress, userAgent: $userAgent, location: $location, type: $type, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -921,11 +918,11 @@ abstract mixin class $SnAuthSessionCopyWith<$Res> {
|
|||||||
factory $SnAuthSessionCopyWith(SnAuthSession value, $Res Function(SnAuthSession) _then) = _$SnAuthSessionCopyWithImpl;
|
factory $SnAuthSessionCopyWith(SnAuthSession value, $Res Function(SnAuthSession) _then) = _$SnAuthSessionCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, String accountId, String challengeId, SnAuthChallenge challenge, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, List<dynamic> audiences, List<dynamic> scopes, String? ipAddress, String? userAgent, GeoIpLocation? location, int type, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$SnAuthChallengeCopyWith<$Res> get challenge;
|
$GeoIpLocationCopyWith<$Res>? get location;
|
||||||
|
|
||||||
}
|
}
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -938,16 +935,20 @@ class _$SnAuthSessionCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnAuthSession
|
/// Create a copy of SnAuthSession
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? label = freezed,Object? lastGrantedAt = null,Object? expiredAt = freezed,Object? accountId = null,Object? challengeId = null,Object? challenge = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? label = freezed,Object? lastGrantedAt = null,Object? expiredAt = freezed,Object? audiences = null,Object? scopes = null,Object? ipAddress = freezed,Object? userAgent = freezed,Object? location = freezed,Object? type = null,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
as String,label: freezed == label ? _self.label : label // ignore: cast_nullable_to_non_nullable
|
as String,label: freezed == label ? _self.label : label // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,lastGrantedAt: null == lastGrantedAt ? _self.lastGrantedAt : lastGrantedAt // ignore: cast_nullable_to_non_nullable
|
as String?,lastGrantedAt: null == lastGrantedAt ? _self.lastGrantedAt : lastGrantedAt // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
as DateTime,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
as DateTime?,audiences: null == audiences ? _self.audiences : audiences // ignore: cast_nullable_to_non_nullable
|
||||||
as String,challengeId: null == challengeId ? _self.challengeId : challengeId // ignore: cast_nullable_to_non_nullable
|
as List<dynamic>,scopes: null == scopes ? _self.scopes : scopes // ignore: cast_nullable_to_non_nullable
|
||||||
as String,challenge: null == challenge ? _self.challenge : challenge // ignore: cast_nullable_to_non_nullable
|
as List<dynamic>,ipAddress: freezed == ipAddress ? _self.ipAddress : ipAddress // ignore: cast_nullable_to_non_nullable
|
||||||
as SnAuthChallenge,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
as String?,userAgent: freezed == userAgent ? _self.userAgent : userAgent // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,location: freezed == location ? _self.location : location // ignore: cast_nullable_to_non_nullable
|
||||||
|
as GeoIpLocation?,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,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,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,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime?,
|
as DateTime?,
|
||||||
@@ -957,10 +958,13 @@ as DateTime?,
|
|||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$SnAuthChallengeCopyWith<$Res> get challenge {
|
$GeoIpLocationCopyWith<$Res>? get location {
|
||||||
|
if (_self.location == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return $SnAuthChallengeCopyWith<$Res>(_self.challenge, (value) {
|
return $GeoIpLocationCopyWith<$Res>(_self.location!, (value) {
|
||||||
return _then(_self.copyWith(challenge: value));
|
return _then(_self.copyWith(location: value));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1041,10 +1045,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, String accountId, String challengeId, SnAuthChallenge challenge, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, List<dynamic> audiences, List<dynamic> scopes, String? ipAddress, String? userAgent, GeoIpLocation? location, int type, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnAuthSession() when $default != null:
|
case _SnAuthSession() when $default != null:
|
||||||
return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.accountId,_that.challengeId,_that.challenge,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.location,_that.type,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1062,10 +1066,10 @@ return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.a
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, String accountId, String challengeId, SnAuthChallenge challenge, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, List<dynamic> audiences, List<dynamic> scopes, String? ipAddress, String? userAgent, GeoIpLocation? location, int type, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnAuthSession():
|
case _SnAuthSession():
|
||||||
return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.accountId,_that.challengeId,_that.challenge,_that.createdAt,_that.updatedAt,_that.deletedAt);}
|
return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.location,_that.type,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);}
|
||||||
}
|
}
|
||||||
/// A variant of `when` that fallback to returning `null`
|
/// A variant of `when` that fallback to returning `null`
|
||||||
///
|
///
|
||||||
@@ -1079,10 +1083,10 @@ return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.a
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, String accountId, String challengeId, SnAuthChallenge challenge, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, List<dynamic> audiences, List<dynamic> scopes, String? ipAddress, String? userAgent, GeoIpLocation? location, int type, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnAuthSession() when $default != null:
|
case _SnAuthSession() when $default != null:
|
||||||
return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.accountId,_that.challengeId,_that.challenge,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.location,_that.type,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1094,16 +1098,32 @@ return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.a
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _SnAuthSession implements SnAuthSession {
|
class _SnAuthSession implements SnAuthSession {
|
||||||
const _SnAuthSession({required this.id, required this.label, required this.lastGrantedAt, required this.expiredAt, required this.accountId, required this.challengeId, required this.challenge, required this.createdAt, required this.updatedAt, required this.deletedAt});
|
const _SnAuthSession({required this.id, required this.label, required this.lastGrantedAt, required this.expiredAt, required final List<dynamic> audiences, required final List<dynamic> scopes, required this.ipAddress, required this.userAgent, required this.location, required this.type, required this.accountId, required this.createdAt, required this.updatedAt, required this.deletedAt}): _audiences = audiences,_scopes = scopes;
|
||||||
factory _SnAuthSession.fromJson(Map<String, dynamic> json) => _$SnAuthSessionFromJson(json);
|
factory _SnAuthSession.fromJson(Map<String, dynamic> json) => _$SnAuthSessionFromJson(json);
|
||||||
|
|
||||||
@override final String id;
|
@override final String id;
|
||||||
@override final String? label;
|
@override final String? label;
|
||||||
@override final DateTime lastGrantedAt;
|
@override final DateTime lastGrantedAt;
|
||||||
@override final DateTime? expiredAt;
|
@override final DateTime? expiredAt;
|
||||||
|
final List<dynamic> _audiences;
|
||||||
|
@override List<dynamic> get audiences {
|
||||||
|
if (_audiences is EqualUnmodifiableListView) return _audiences;
|
||||||
|
// ignore: implicit_dynamic_type
|
||||||
|
return EqualUnmodifiableListView(_audiences);
|
||||||
|
}
|
||||||
|
|
||||||
|
final List<dynamic> _scopes;
|
||||||
|
@override List<dynamic> get scopes {
|
||||||
|
if (_scopes is EqualUnmodifiableListView) return _scopes;
|
||||||
|
// ignore: implicit_dynamic_type
|
||||||
|
return EqualUnmodifiableListView(_scopes);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override final String? ipAddress;
|
||||||
|
@override final String? userAgent;
|
||||||
|
@override final GeoIpLocation? location;
|
||||||
|
@override final int type;
|
||||||
@override final String accountId;
|
@override final String accountId;
|
||||||
@override final String challengeId;
|
|
||||||
@override final SnAuthChallenge challenge;
|
|
||||||
@override final DateTime createdAt;
|
@override final DateTime createdAt;
|
||||||
@override final DateTime updatedAt;
|
@override final DateTime updatedAt;
|
||||||
@override final DateTime? deletedAt;
|
@override final DateTime? deletedAt;
|
||||||
@@ -1121,16 +1141,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAuthSession&&(identical(other.id, id) || other.id == id)&&(identical(other.label, label) || other.label == label)&&(identical(other.lastGrantedAt, lastGrantedAt) || other.lastGrantedAt == lastGrantedAt)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.challengeId, challengeId) || other.challengeId == challengeId)&&(identical(other.challenge, challenge) || other.challenge == challenge)&&(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 _SnAuthSession&&(identical(other.id, id) || other.id == id)&&(identical(other.label, label) || other.label == label)&&(identical(other.lastGrantedAt, lastGrantedAt) || other.lastGrantedAt == lastGrantedAt)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&const DeepCollectionEquality().equals(other._audiences, _audiences)&&const DeepCollectionEquality().equals(other._scopes, _scopes)&&(identical(other.ipAddress, ipAddress) || other.ipAddress == ipAddress)&&(identical(other.userAgent, userAgent) || other.userAgent == userAgent)&&(identical(other.location, location) || other.location == location)&&(identical(other.type, type) || other.type == type)&&(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));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,id,label,lastGrantedAt,expiredAt,accountId,challengeId,challenge,createdAt,updatedAt,deletedAt);
|
int get hashCode => Object.hash(runtimeType,id,label,lastGrantedAt,expiredAt,const DeepCollectionEquality().hash(_audiences),const DeepCollectionEquality().hash(_scopes),ipAddress,userAgent,location,type,accountId,createdAt,updatedAt,deletedAt);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnAuthSession(id: $id, label: $label, lastGrantedAt: $lastGrantedAt, expiredAt: $expiredAt, accountId: $accountId, challengeId: $challengeId, challenge: $challenge, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
return 'SnAuthSession(id: $id, label: $label, lastGrantedAt: $lastGrantedAt, expiredAt: $expiredAt, audiences: $audiences, scopes: $scopes, ipAddress: $ipAddress, userAgent: $userAgent, location: $location, type: $type, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1141,11 +1161,11 @@ abstract mixin class _$SnAuthSessionCopyWith<$Res> implements $SnAuthSessionCopy
|
|||||||
factory _$SnAuthSessionCopyWith(_SnAuthSession value, $Res Function(_SnAuthSession) _then) = __$SnAuthSessionCopyWithImpl;
|
factory _$SnAuthSessionCopyWith(_SnAuthSession value, $Res Function(_SnAuthSession) _then) = __$SnAuthSessionCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, String accountId, String challengeId, SnAuthChallenge challenge, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, List<dynamic> audiences, List<dynamic> scopes, String? ipAddress, String? userAgent, GeoIpLocation? location, int type, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@override $SnAuthChallengeCopyWith<$Res> get challenge;
|
@override $GeoIpLocationCopyWith<$Res>? get location;
|
||||||
|
|
||||||
}
|
}
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -1158,16 +1178,20 @@ class __$SnAuthSessionCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnAuthSession
|
/// Create a copy of SnAuthSession
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? label = freezed,Object? lastGrantedAt = null,Object? expiredAt = freezed,Object? accountId = null,Object? challengeId = null,Object? challenge = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? label = freezed,Object? lastGrantedAt = null,Object? expiredAt = freezed,Object? audiences = null,Object? scopes = null,Object? ipAddress = freezed,Object? userAgent = freezed,Object? location = freezed,Object? type = null,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||||
return _then(_SnAuthSession(
|
return _then(_SnAuthSession(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
as String,label: freezed == label ? _self.label : label // ignore: cast_nullable_to_non_nullable
|
as String,label: freezed == label ? _self.label : label // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,lastGrantedAt: null == lastGrantedAt ? _self.lastGrantedAt : lastGrantedAt // ignore: cast_nullable_to_non_nullable
|
as String?,lastGrantedAt: null == lastGrantedAt ? _self.lastGrantedAt : lastGrantedAt // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
as DateTime,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
as DateTime?,audiences: null == audiences ? _self._audiences : audiences // ignore: cast_nullable_to_non_nullable
|
||||||
as String,challengeId: null == challengeId ? _self.challengeId : challengeId // ignore: cast_nullable_to_non_nullable
|
as List<dynamic>,scopes: null == scopes ? _self._scopes : scopes // ignore: cast_nullable_to_non_nullable
|
||||||
as String,challenge: null == challenge ? _self.challenge : challenge // ignore: cast_nullable_to_non_nullable
|
as List<dynamic>,ipAddress: freezed == ipAddress ? _self.ipAddress : ipAddress // ignore: cast_nullable_to_non_nullable
|
||||||
as SnAuthChallenge,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
as String?,userAgent: freezed == userAgent ? _self.userAgent : userAgent // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,location: freezed == location ? _self.location : location // ignore: cast_nullable_to_non_nullable
|
||||||
|
as GeoIpLocation?,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,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,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,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime?,
|
as DateTime?,
|
||||||
@@ -1178,10 +1202,13 @@ as DateTime?,
|
|||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$SnAuthChallengeCopyWith<$Res> get challenge {
|
$GeoIpLocationCopyWith<$Res>? get location {
|
||||||
|
if (_self.location == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return $SnAuthChallengeCopyWith<$Res>(_self.challenge, (value) {
|
return $GeoIpLocationCopyWith<$Res>(_self.location!, (value) {
|
||||||
return _then(_self.copyWith(challenge: value));
|
return _then(_self.copyWith(location: value));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,36 +34,29 @@ Map<String, dynamic> _$GeoIpLocationToJson(_GeoIpLocation instance) =>
|
|||||||
_SnAuthChallenge _$SnAuthChallengeFromJson(Map<String, dynamic> json) =>
|
_SnAuthChallenge _$SnAuthChallengeFromJson(Map<String, dynamic> json) =>
|
||||||
_SnAuthChallenge(
|
_SnAuthChallenge(
|
||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
expiredAt:
|
expiredAt: json['expired_at'] == null
|
||||||
json['expired_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['expired_at'] as String),
|
||||||
: DateTime.parse(json['expired_at'] as String),
|
|
||||||
stepRemain: (json['step_remain'] as num).toInt(),
|
stepRemain: (json['step_remain'] as num).toInt(),
|
||||||
stepTotal: (json['step_total'] as num).toInt(),
|
stepTotal: (json['step_total'] as num).toInt(),
|
||||||
failedAttempts: (json['failed_attempts'] as num).toInt(),
|
failedAttempts: (json['failed_attempts'] as num).toInt(),
|
||||||
type: (json['type'] as num).toInt(),
|
blacklistFactors: (json['blacklist_factors'] as List<dynamic>)
|
||||||
blacklistFactors:
|
.map((e) => e as String)
|
||||||
(json['blacklist_factors'] as List<dynamic>)
|
.toList(),
|
||||||
.map((e) => e as String)
|
|
||||||
.toList(),
|
|
||||||
audiences: json['audiences'] as List<dynamic>,
|
audiences: json['audiences'] as List<dynamic>,
|
||||||
scopes: json['scopes'] as List<dynamic>,
|
scopes: json['scopes'] as List<dynamic>,
|
||||||
ipAddress: json['ip_address'] as String,
|
ipAddress: json['ip_address'] as String,
|
||||||
userAgent: json['user_agent'] as String,
|
userAgent: json['user_agent'] as String,
|
||||||
nonce: json['nonce'] as String?,
|
nonce: json['nonce'] as String?,
|
||||||
location:
|
location: json['location'] == null
|
||||||
json['location'] == null
|
? null
|
||||||
? null
|
: GeoIpLocation.fromJson(json['location'] as Map<String, dynamic>),
|
||||||
: GeoIpLocation.fromJson(
|
|
||||||
json['location'] as Map<String, dynamic>,
|
|
||||||
),
|
|
||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnAuthChallengeToJson(_SnAuthChallenge instance) =>
|
Map<String, dynamic> _$SnAuthChallengeToJson(_SnAuthChallenge instance) =>
|
||||||
@@ -73,7 +66,6 @@ Map<String, dynamic> _$SnAuthChallengeToJson(_SnAuthChallenge instance) =>
|
|||||||
'step_remain': instance.stepRemain,
|
'step_remain': instance.stepRemain,
|
||||||
'step_total': instance.stepTotal,
|
'step_total': instance.stepTotal,
|
||||||
'failed_attempts': instance.failedAttempts,
|
'failed_attempts': instance.failedAttempts,
|
||||||
'type': instance.type,
|
|
||||||
'blacklist_factors': instance.blacklistFactors,
|
'blacklist_factors': instance.blacklistFactors,
|
||||||
'audiences': instance.audiences,
|
'audiences': instance.audiences,
|
||||||
'scopes': instance.scopes,
|
'scopes': instance.scopes,
|
||||||
@@ -92,21 +84,23 @@ _SnAuthSession _$SnAuthSessionFromJson(Map<String, dynamic> json) =>
|
|||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
label: json['label'] as String?,
|
label: json['label'] as String?,
|
||||||
lastGrantedAt: DateTime.parse(json['last_granted_at'] as String),
|
lastGrantedAt: DateTime.parse(json['last_granted_at'] as String),
|
||||||
expiredAt:
|
expiredAt: json['expired_at'] == null
|
||||||
json['expired_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['expired_at'] as String),
|
||||||
: DateTime.parse(json['expired_at'] as String),
|
audiences: json['audiences'] as List<dynamic>,
|
||||||
|
scopes: json['scopes'] as List<dynamic>,
|
||||||
|
ipAddress: json['ip_address'] as String?,
|
||||||
|
userAgent: json['user_agent'] as String?,
|
||||||
|
location: json['location'] == null
|
||||||
|
? null
|
||||||
|
: GeoIpLocation.fromJson(json['location'] as Map<String, dynamic>),
|
||||||
|
type: (json['type'] as num).toInt(),
|
||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
challengeId: json['challenge_id'] as String,
|
|
||||||
challenge: SnAuthChallenge.fromJson(
|
|
||||||
json['challenge'] as Map<String, dynamic>,
|
|
||||||
),
|
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnAuthSessionToJson(_SnAuthSession instance) =>
|
Map<String, dynamic> _$SnAuthSessionToJson(_SnAuthSession instance) =>
|
||||||
@@ -115,9 +109,13 @@ Map<String, dynamic> _$SnAuthSessionToJson(_SnAuthSession instance) =>
|
|||||||
'label': instance.label,
|
'label': instance.label,
|
||||||
'last_granted_at': instance.lastGrantedAt.toIso8601String(),
|
'last_granted_at': instance.lastGrantedAt.toIso8601String(),
|
||||||
'expired_at': instance.expiredAt?.toIso8601String(),
|
'expired_at': instance.expiredAt?.toIso8601String(),
|
||||||
|
'audiences': instance.audiences,
|
||||||
|
'scopes': instance.scopes,
|
||||||
|
'ip_address': instance.ipAddress,
|
||||||
|
'user_agent': instance.userAgent,
|
||||||
|
'location': instance.location?.toJson(),
|
||||||
|
'type': instance.type,
|
||||||
'account_id': instance.accountId,
|
'account_id': instance.accountId,
|
||||||
'challenge_id': instance.challengeId,
|
|
||||||
'challenge': instance.challenge.toJson(),
|
|
||||||
'created_at': instance.createdAt.toIso8601String(),
|
'created_at': instance.createdAt.toIso8601String(),
|
||||||
'updated_at': instance.updatedAt.toIso8601String(),
|
'updated_at': instance.updatedAt.toIso8601String(),
|
||||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||||
@@ -129,18 +127,15 @@ _SnAuthFactor _$SnAuthFactorFromJson(Map<String, dynamic> json) =>
|
|||||||
type: (json['type'] as num).toInt(),
|
type: (json['type'] as num).toInt(),
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
expiredAt: json['expired_at'] == null
|
||||||
expiredAt:
|
? null
|
||||||
json['expired_at'] == null
|
: DateTime.parse(json['expired_at'] as String),
|
||||||
? null
|
enabledAt: json['enabled_at'] == null
|
||||||
: DateTime.parse(json['expired_at'] as String),
|
? null
|
||||||
enabledAt:
|
: DateTime.parse(json['enabled_at'] as String),
|
||||||
json['enabled_at'] == null
|
|
||||||
? null
|
|
||||||
: DateTime.parse(json['enabled_at'] as String),
|
|
||||||
trustworthy: (json['trustworthy'] as num).toInt(),
|
trustworthy: (json['trustworthy'] as num).toInt(),
|
||||||
createdResponse: json['created_response'] as Map<String, dynamic>?,
|
createdResponse: json['created_response'] as Map<String, dynamic>?,
|
||||||
);
|
);
|
||||||
@@ -168,10 +163,9 @@ _SnAccountConnection _$SnAccountConnectionFromJson(Map<String, dynamic> json) =>
|
|||||||
lastUsedAt: DateTime.parse(json['last_used_at'] as String),
|
lastUsedAt: DateTime.parse(json['last_used_at'] as String),
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnAccountConnectionToJson(
|
Map<String, dynamic> _$SnAccountConnectionToJson(
|
||||||
|
|||||||
@@ -10,10 +10,9 @@ AutoCompletionAccountResponse _$AutoCompletionAccountResponseFromJson(
|
|||||||
Map<String, dynamic> json,
|
Map<String, dynamic> json,
|
||||||
) => AutoCompletionAccountResponse(
|
) => AutoCompletionAccountResponse(
|
||||||
type: json['type'] as String,
|
type: json['type'] as String,
|
||||||
items:
|
items: (json['items'] as List<dynamic>)
|
||||||
(json['items'] as List<dynamic>)
|
.map((e) => AutoCompletionItem.fromJson(e as Map<String, dynamic>))
|
||||||
.map((e) => AutoCompletionItem.fromJson(e as Map<String, dynamic>))
|
.toList(),
|
||||||
.toList(),
|
|
||||||
$type: json['runtimeType'] as String?,
|
$type: json['runtimeType'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -29,10 +28,9 @@ AutoCompletionStickerResponse _$AutoCompletionStickerResponseFromJson(
|
|||||||
Map<String, dynamic> json,
|
Map<String, dynamic> json,
|
||||||
) => AutoCompletionStickerResponse(
|
) => AutoCompletionStickerResponse(
|
||||||
type: json['type'] as String,
|
type: json['type'] as String,
|
||||||
items:
|
items: (json['items'] as List<dynamic>)
|
||||||
(json['items'] as List<dynamic>)
|
.map((e) => AutoCompletionItem.fromJson(e as Map<String, dynamic>))
|
||||||
.map((e) => AutoCompletionItem.fromJson(e as Map<String, dynamic>))
|
.toList(),
|
||||||
.toList(),
|
|
||||||
$type: json['runtimeType'] as String?,
|
$type: json['runtimeType'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -14,10 +14,9 @@ _Bot _$BotFromJson(Map<String, dynamic> json) => _Bot(
|
|||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
account: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
account: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||||
developer:
|
developer: json['developer'] == null
|
||||||
json['developer'] == null
|
? null
|
||||||
? null
|
: SnDeveloper.fromJson(json['developer'] as Map<String, dynamic>),
|
||||||
: SnDeveloper.fromJson(json['developer'] as Map<String, dynamic>),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$BotToJson(_Bot instance) => <String, dynamic>{
|
Map<String, dynamic> _$BotToJson(_Bot instance) => <String, dynamic>{
|
||||||
@@ -74,10 +73,9 @@ _BotSecret _$BotSecretFromJson(Map<String, dynamic> json) => _BotSecret(
|
|||||||
id: json['id'] as String? ?? '',
|
id: json['id'] as String? ?? '',
|
||||||
secret: json['secret'] as String? ?? '',
|
secret: json['secret'] as String? ?? '',
|
||||||
description: json['description'] as String?,
|
description: json['description'] as String?,
|
||||||
expiredAt:
|
expiredAt: json['expired_at'] == null
|
||||||
json['expired_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['expired_at'] as String),
|
||||||
: DateTime.parse(json['expired_at'] as String),
|
|
||||||
botId: json['bot_id'] as String? ?? '',
|
botId: json['bot_id'] as String? ?? '',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -18,11 +18,14 @@ sealed class SnChatRoom with _$SnChatRoom {
|
|||||||
required SnCloudFile? picture,
|
required SnCloudFile? picture,
|
||||||
required SnCloudFile? background,
|
required SnCloudFile? background,
|
||||||
required String? realmId,
|
required String? realmId,
|
||||||
|
required String? accountId,
|
||||||
required SnRealm? realm,
|
required SnRealm? realm,
|
||||||
required DateTime createdAt,
|
required DateTime createdAt,
|
||||||
required DateTime updatedAt,
|
required DateTime updatedAt,
|
||||||
required DateTime? deletedAt,
|
required DateTime? deletedAt,
|
||||||
required List<SnChatMember>? members,
|
required List<SnChatMember>? members,
|
||||||
|
// Frontend data
|
||||||
|
@Default(false) bool isPinned,
|
||||||
}) = _SnChatRoom;
|
}) = _SnChatRoom;
|
||||||
|
|
||||||
factory SnChatRoom.fromJson(Map<String, dynamic> json) =>
|
factory SnChatRoom.fromJson(Map<String, dynamic> json) =>
|
||||||
@@ -85,12 +88,10 @@ sealed class SnChatMember with _$SnChatMember {
|
|||||||
required String accountId,
|
required String accountId,
|
||||||
required SnAccount account,
|
required SnAccount account,
|
||||||
required String? nick,
|
required String? nick,
|
||||||
required int role,
|
|
||||||
required int notify,
|
required int notify,
|
||||||
required DateTime? joinedAt,
|
required DateTime? joinedAt,
|
||||||
required DateTime? breakUntil,
|
required DateTime? breakUntil,
|
||||||
required DateTime? timeoutUntil,
|
required DateTime? timeoutUntil,
|
||||||
required bool isBot,
|
|
||||||
required SnAccountStatus? status,
|
required SnAccountStatus? status,
|
||||||
// Frontend data
|
// Frontend data
|
||||||
DateTime? lastTyped,
|
DateTime? lastTyped,
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ T _$identity<T>(T value) => value;
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$SnChatRoom {
|
mixin _$SnChatRoom {
|
||||||
|
|
||||||
String get id; String? get name; String? get description; int get type; bool get isPublic; bool get isCommunity; SnCloudFile? get picture; SnCloudFile? get background; String? get realmId; SnRealm? get realm; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; List<SnChatMember>? get members;
|
String get id; String? get name; String? get description; int get type; bool get isPublic; bool get isCommunity; SnCloudFile? get picture; SnCloudFile? get background; String? get realmId; String? get accountId; SnRealm? get realm; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; List<SnChatMember>? get members;// Frontend data
|
||||||
|
bool get isPinned;
|
||||||
/// Create a copy of SnChatRoom
|
/// Create a copy of SnChatRoom
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -28,16 +29,16 @@ $SnChatRoomCopyWith<SnChatRoom> get copyWith => _$SnChatRoomCopyWithImpl<SnChatR
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnChatRoom&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.type, type) || other.type == type)&&(identical(other.isPublic, isPublic) || other.isPublic == isPublic)&&(identical(other.isCommunity, isCommunity) || other.isCommunity == isCommunity)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.realmId, realmId) || other.realmId == realmId)&&(identical(other.realm, realm) || other.realm == realm)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other.members, members));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnChatRoom&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.type, type) || other.type == type)&&(identical(other.isPublic, isPublic) || other.isPublic == isPublic)&&(identical(other.isCommunity, isCommunity) || other.isCommunity == isCommunity)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.realmId, realmId) || other.realmId == realmId)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.realm, realm) || other.realm == realm)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other.members, members)&&(identical(other.isPinned, isPinned) || other.isPinned == isPinned));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,id,name,description,type,isPublic,isCommunity,picture,background,realmId,realm,createdAt,updatedAt,deletedAt,const DeepCollectionEquality().hash(members));
|
int get hashCode => Object.hash(runtimeType,id,name,description,type,isPublic,isCommunity,picture,background,realmId,accountId,realm,createdAt,updatedAt,deletedAt,const DeepCollectionEquality().hash(members),isPinned);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnChatRoom(id: $id, name: $name, description: $description, type: $type, isPublic: $isPublic, isCommunity: $isCommunity, picture: $picture, background: $background, realmId: $realmId, realm: $realm, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, members: $members)';
|
return 'SnChatRoom(id: $id, name: $name, description: $description, type: $type, isPublic: $isPublic, isCommunity: $isCommunity, picture: $picture, background: $background, realmId: $realmId, accountId: $accountId, realm: $realm, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, members: $members, isPinned: $isPinned)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -48,7 +49,7 @@ abstract mixin class $SnChatRoomCopyWith<$Res> {
|
|||||||
factory $SnChatRoomCopyWith(SnChatRoom value, $Res Function(SnChatRoom) _then) = _$SnChatRoomCopyWithImpl;
|
factory $SnChatRoomCopyWith(SnChatRoom value, $Res Function(SnChatRoom) _then) = _$SnChatRoomCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members
|
String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, String? accountId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members, bool isPinned
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -65,7 +66,7 @@ class _$SnChatRoomCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnChatRoom
|
/// Create a copy of SnChatRoom
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = freezed,Object? description = freezed,Object? type = null,Object? isPublic = null,Object? isCommunity = null,Object? picture = freezed,Object? background = freezed,Object? realmId = freezed,Object? realm = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? members = freezed,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = freezed,Object? description = freezed,Object? type = null,Object? isPublic = null,Object? isCommunity = null,Object? picture = freezed,Object? background = freezed,Object? realmId = freezed,Object? accountId = freezed,Object? realm = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? members = freezed,Object? isPinned = null,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
as String,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
as String,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -76,12 +77,14 @@ as bool,isCommunity: null == isCommunity ? _self.isCommunity : isCommunity // ig
|
|||||||
as bool,picture: freezed == picture ? _self.picture : picture // ignore: cast_nullable_to_non_nullable
|
as bool,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?,background: freezed == background ? _self.background : background // ignore: cast_nullable_to_non_nullable
|
||||||
as SnCloudFile?,realmId: freezed == realmId ? _self.realmId : realmId // ignore: cast_nullable_to_non_nullable
|
as SnCloudFile?,realmId: freezed == realmId ? _self.realmId : realmId // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,accountId: freezed == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,realm: freezed == realm ? _self.realm : realm // ignore: cast_nullable_to_non_nullable
|
as String?,realm: freezed == realm ? _self.realm : realm // ignore: cast_nullable_to_non_nullable
|
||||||
as SnRealm?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
as SnRealm?,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,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,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime?,members: freezed == members ? _self.members : members // ignore: cast_nullable_to_non_nullable
|
as DateTime?,members: freezed == members ? _self.members : members // ignore: cast_nullable_to_non_nullable
|
||||||
as List<SnChatMember>?,
|
as List<SnChatMember>?,isPinned: null == isPinned ? _self.isPinned : isPinned // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
/// Create a copy of SnChatRoom
|
/// Create a copy of SnChatRoom
|
||||||
@@ -199,10 +202,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, String? accountId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members, bool isPinned)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnChatRoom() when $default != null:
|
case _SnChatRoom() when $default != null:
|
||||||
return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,_that.isCommunity,_that.picture,_that.background,_that.realmId,_that.realm,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.members);case _:
|
return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,_that.isCommunity,_that.picture,_that.background,_that.realmId,_that.accountId,_that.realm,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.members,_that.isPinned);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -220,10 +223,10 @@ return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, String? accountId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members, bool isPinned) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnChatRoom():
|
case _SnChatRoom():
|
||||||
return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,_that.isCommunity,_that.picture,_that.background,_that.realmId,_that.realm,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.members);}
|
return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,_that.isCommunity,_that.picture,_that.background,_that.realmId,_that.accountId,_that.realm,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.members,_that.isPinned);}
|
||||||
}
|
}
|
||||||
/// A variant of `when` that fallback to returning `null`
|
/// A variant of `when` that fallback to returning `null`
|
||||||
///
|
///
|
||||||
@@ -237,10 +240,10 @@ return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, String? accountId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members, bool isPinned)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnChatRoom() when $default != null:
|
case _SnChatRoom() when $default != null:
|
||||||
return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,_that.isCommunity,_that.picture,_that.background,_that.realmId,_that.realm,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.members);case _:
|
return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,_that.isCommunity,_that.picture,_that.background,_that.realmId,_that.accountId,_that.realm,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.members,_that.isPinned);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -252,7 +255,7 @@ return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _SnChatRoom implements SnChatRoom {
|
class _SnChatRoom implements SnChatRoom {
|
||||||
const _SnChatRoom({required this.id, required this.name, required this.description, required this.type, this.isPublic = false, this.isCommunity = false, required this.picture, required this.background, required this.realmId, required this.realm, required this.createdAt, required this.updatedAt, required this.deletedAt, required final List<SnChatMember>? members}): _members = members;
|
const _SnChatRoom({required this.id, required this.name, required this.description, required this.type, this.isPublic = false, this.isCommunity = false, required this.picture, required this.background, required this.realmId, required this.accountId, required this.realm, required this.createdAt, required this.updatedAt, required this.deletedAt, required final List<SnChatMember>? members, this.isPinned = false}): _members = members;
|
||||||
factory _SnChatRoom.fromJson(Map<String, dynamic> json) => _$SnChatRoomFromJson(json);
|
factory _SnChatRoom.fromJson(Map<String, dynamic> json) => _$SnChatRoomFromJson(json);
|
||||||
|
|
||||||
@override final String id;
|
@override final String id;
|
||||||
@@ -264,6 +267,7 @@ class _SnChatRoom implements SnChatRoom {
|
|||||||
@override final SnCloudFile? picture;
|
@override final SnCloudFile? picture;
|
||||||
@override final SnCloudFile? background;
|
@override final SnCloudFile? background;
|
||||||
@override final String? realmId;
|
@override final String? realmId;
|
||||||
|
@override final String? accountId;
|
||||||
@override final SnRealm? realm;
|
@override final SnRealm? realm;
|
||||||
@override final DateTime createdAt;
|
@override final DateTime createdAt;
|
||||||
@override final DateTime updatedAt;
|
@override final DateTime updatedAt;
|
||||||
@@ -277,6 +281,8 @@ class _SnChatRoom implements SnChatRoom {
|
|||||||
return EqualUnmodifiableListView(value);
|
return EqualUnmodifiableListView(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Frontend data
|
||||||
|
@override@JsonKey() final bool isPinned;
|
||||||
|
|
||||||
/// Create a copy of SnChatRoom
|
/// Create a copy of SnChatRoom
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@@ -291,16 +297,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnChatRoom&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.type, type) || other.type == type)&&(identical(other.isPublic, isPublic) || other.isPublic == isPublic)&&(identical(other.isCommunity, isCommunity) || other.isCommunity == isCommunity)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.realmId, realmId) || other.realmId == realmId)&&(identical(other.realm, realm) || other.realm == realm)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other._members, _members));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnChatRoom&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.type, type) || other.type == type)&&(identical(other.isPublic, isPublic) || other.isPublic == isPublic)&&(identical(other.isCommunity, isCommunity) || other.isCommunity == isCommunity)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.realmId, realmId) || other.realmId == realmId)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.realm, realm) || other.realm == realm)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other._members, _members)&&(identical(other.isPinned, isPinned) || other.isPinned == isPinned));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,id,name,description,type,isPublic,isCommunity,picture,background,realmId,realm,createdAt,updatedAt,deletedAt,const DeepCollectionEquality().hash(_members));
|
int get hashCode => Object.hash(runtimeType,id,name,description,type,isPublic,isCommunity,picture,background,realmId,accountId,realm,createdAt,updatedAt,deletedAt,const DeepCollectionEquality().hash(_members),isPinned);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnChatRoom(id: $id, name: $name, description: $description, type: $type, isPublic: $isPublic, isCommunity: $isCommunity, picture: $picture, background: $background, realmId: $realmId, realm: $realm, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, members: $members)';
|
return 'SnChatRoom(id: $id, name: $name, description: $description, type: $type, isPublic: $isPublic, isCommunity: $isCommunity, picture: $picture, background: $background, realmId: $realmId, accountId: $accountId, realm: $realm, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, members: $members, isPinned: $isPinned)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -311,7 +317,7 @@ abstract mixin class _$SnChatRoomCopyWith<$Res> implements $SnChatRoomCopyWith<$
|
|||||||
factory _$SnChatRoomCopyWith(_SnChatRoom value, $Res Function(_SnChatRoom) _then) = __$SnChatRoomCopyWithImpl;
|
factory _$SnChatRoomCopyWith(_SnChatRoom value, $Res Function(_SnChatRoom) _then) = __$SnChatRoomCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members
|
String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, String? accountId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members, bool isPinned
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -328,7 +334,7 @@ class __$SnChatRoomCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnChatRoom
|
/// Create a copy of SnChatRoom
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = freezed,Object? description = freezed,Object? type = null,Object? isPublic = null,Object? isCommunity = null,Object? picture = freezed,Object? background = freezed,Object? realmId = freezed,Object? realm = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? members = freezed,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = freezed,Object? description = freezed,Object? type = null,Object? isPublic = null,Object? isCommunity = null,Object? picture = freezed,Object? background = freezed,Object? realmId = freezed,Object? accountId = freezed,Object? realm = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? members = freezed,Object? isPinned = null,}) {
|
||||||
return _then(_SnChatRoom(
|
return _then(_SnChatRoom(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
as String,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
as String,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -339,12 +345,14 @@ as bool,isCommunity: null == isCommunity ? _self.isCommunity : isCommunity // ig
|
|||||||
as bool,picture: freezed == picture ? _self.picture : picture // ignore: cast_nullable_to_non_nullable
|
as bool,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?,background: freezed == background ? _self.background : background // ignore: cast_nullable_to_non_nullable
|
||||||
as SnCloudFile?,realmId: freezed == realmId ? _self.realmId : realmId // ignore: cast_nullable_to_non_nullable
|
as SnCloudFile?,realmId: freezed == realmId ? _self.realmId : realmId // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,accountId: freezed == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,realm: freezed == realm ? _self.realm : realm // ignore: cast_nullable_to_non_nullable
|
as String?,realm: freezed == realm ? _self.realm : realm // ignore: cast_nullable_to_non_nullable
|
||||||
as SnRealm?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
as SnRealm?,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,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,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime?,members: freezed == members ? _self._members : members // ignore: cast_nullable_to_non_nullable
|
as DateTime?,members: freezed == members ? _self._members : members // ignore: cast_nullable_to_non_nullable
|
||||||
as List<SnChatMember>?,
|
as List<SnChatMember>?,isPinned: null == isPinned ? _self.isPinned : isPinned // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1037,7 +1045,7 @@ $SnChatMemberCopyWith<$Res> get sender {
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$SnChatMember {
|
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; DateTime? get breakUntil; DateTime? get timeoutUntil; bool get isBot; SnAccountStatus? get status;// Frontend data
|
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 notify; DateTime? get joinedAt; DateTime? get breakUntil; DateTime? get timeoutUntil; SnAccountStatus? get status;// Frontend data
|
||||||
DateTime? get lastTyped;
|
DateTime? get lastTyped;
|
||||||
/// Create a copy of SnChatMember
|
/// Create a copy of SnChatMember
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@@ -1051,16 +1059,16 @@ $SnChatMemberCopyWith<SnChatMember> get copyWith => _$SnChatMemberCopyWithImpl<S
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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.breakUntil, breakUntil) || other.breakUntil == breakUntil)&&(identical(other.timeoutUntil, timeoutUntil) || other.timeoutUntil == timeoutUntil)&&(identical(other.isBot, isBot) || other.isBot == isBot)&&(identical(other.status, status) || other.status == status)&&(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.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.status, status) || other.status == status)&&(identical(other.lastTyped, lastTyped) || other.lastTyped == lastTyped));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,createdAt,updatedAt,deletedAt,id,chatRoomId,chatRoom,accountId,account,nick,role,notify,joinedAt,breakUntil,timeoutUntil,isBot,status,lastTyped);
|
int get hashCode => Object.hash(runtimeType,createdAt,updatedAt,deletedAt,id,chatRoomId,chatRoom,accountId,account,nick,notify,joinedAt,breakUntil,timeoutUntil,status,lastTyped);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
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, breakUntil: $breakUntil, timeoutUntil: $timeoutUntil, isBot: $isBot, status: $status, lastTyped: $lastTyped)';
|
return 'SnChatMember(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, chatRoomId: $chatRoomId, chatRoom: $chatRoom, accountId: $accountId, account: $account, nick: $nick, notify: $notify, joinedAt: $joinedAt, breakUntil: $breakUntil, timeoutUntil: $timeoutUntil, status: $status, lastTyped: $lastTyped)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1071,7 +1079,7 @@ abstract mixin class $SnChatMemberCopyWith<$Res> {
|
|||||||
factory $SnChatMemberCopyWith(SnChatMember value, $Res Function(SnChatMember) _then) = _$SnChatMemberCopyWithImpl;
|
factory $SnChatMemberCopyWith(SnChatMember value, $Res Function(SnChatMember) _then) = _$SnChatMemberCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$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, DateTime? breakUntil, DateTime? timeoutUntil, bool isBot, SnAccountStatus? status, DateTime? lastTyped
|
DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, SnAccountStatus? status, DateTime? lastTyped
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -1088,7 +1096,7 @@ class _$SnChatMemberCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnChatMember
|
/// Create a copy of SnChatMember
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// 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? breakUntil = freezed,Object? timeoutUntil = freezed,Object? isBot = null,Object? status = freezed,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? notify = null,Object? joinedAt = freezed,Object? breakUntil = freezed,Object? timeoutUntil = freezed,Object? status = freezed,Object? lastTyped = freezed,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
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,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -1099,13 +1107,11 @@ as String,chatRoom: freezed == chatRoom ? _self.chatRoom : chatRoom // ignore: c
|
|||||||
as SnChatRoom?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
as SnChatRoom?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||||
as String,account: null == account ? _self.account : account // ignore: cast_nullable_to_non_nullable
|
as String,account: null == account ? _self.account : account // ignore: cast_nullable_to_non_nullable
|
||||||
as SnAccount,nick: freezed == nick ? _self.nick : nick // ignore: cast_nullable_to_non_nullable
|
as SnAccount,nick: freezed == nick ? _self.nick : nick // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
|
as String?,notify: null == notify ? _self.notify : notify // 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 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?,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?,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 DateTime?,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
|
||||||
as SnAccountStatus?,lastTyped: freezed == lastTyped ? _self.lastTyped : lastTyped // ignore: cast_nullable_to_non_nullable
|
as SnAccountStatus?,lastTyped: freezed == lastTyped ? _self.lastTyped : lastTyped // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime?,
|
as DateTime?,
|
||||||
));
|
));
|
||||||
@@ -1222,10 +1228,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( 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, SnAccountStatus? status, DateTime? lastTyped)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, SnAccountStatus? status, DateTime? lastTyped)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnChatMember() when $default != null:
|
case _SnChatMember() when $default != null:
|
||||||
return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.chatRoomId,_that.chatRoom,_that.accountId,_that.account,_that.nick,_that.role,_that.notify,_that.joinedAt,_that.breakUntil,_that.timeoutUntil,_that.isBot,_that.status,_that.lastTyped);case _:
|
return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.chatRoomId,_that.chatRoom,_that.accountId,_that.account,_that.nick,_that.notify,_that.joinedAt,_that.breakUntil,_that.timeoutUntil,_that.status,_that.lastTyped);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1243,10 +1249,10 @@ return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.c
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( 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, SnAccountStatus? status, DateTime? lastTyped) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, SnAccountStatus? status, DateTime? lastTyped) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnChatMember():
|
case _SnChatMember():
|
||||||
return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.chatRoomId,_that.chatRoom,_that.accountId,_that.account,_that.nick,_that.role,_that.notify,_that.joinedAt,_that.breakUntil,_that.timeoutUntil,_that.isBot,_that.status,_that.lastTyped);}
|
return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.chatRoomId,_that.chatRoom,_that.accountId,_that.account,_that.nick,_that.notify,_that.joinedAt,_that.breakUntil,_that.timeoutUntil,_that.status,_that.lastTyped);}
|
||||||
}
|
}
|
||||||
/// A variant of `when` that fallback to returning `null`
|
/// A variant of `when` that fallback to returning `null`
|
||||||
///
|
///
|
||||||
@@ -1260,10 +1266,10 @@ return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.c
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( 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, SnAccountStatus? status, DateTime? lastTyped)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, SnAccountStatus? status, DateTime? lastTyped)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnChatMember() when $default != null:
|
case _SnChatMember() when $default != null:
|
||||||
return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.chatRoomId,_that.chatRoom,_that.accountId,_that.account,_that.nick,_that.role,_that.notify,_that.joinedAt,_that.breakUntil,_that.timeoutUntil,_that.isBot,_that.status,_that.lastTyped);case _:
|
return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.chatRoomId,_that.chatRoom,_that.accountId,_that.account,_that.nick,_that.notify,_that.joinedAt,_that.breakUntil,_that.timeoutUntil,_that.status,_that.lastTyped);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1275,7 +1281,7 @@ return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.c
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _SnChatMember implements SnChatMember {
|
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.breakUntil, required this.timeoutUntil, required this.isBot, required this.status, 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.notify, required this.joinedAt, required this.breakUntil, required this.timeoutUntil, required this.status, this.lastTyped});
|
||||||
factory _SnChatMember.fromJson(Map<String, dynamic> json) => _$SnChatMemberFromJson(json);
|
factory _SnChatMember.fromJson(Map<String, dynamic> json) => _$SnChatMemberFromJson(json);
|
||||||
|
|
||||||
@override final DateTime createdAt;
|
@override final DateTime createdAt;
|
||||||
@@ -1287,12 +1293,10 @@ class _SnChatMember implements SnChatMember {
|
|||||||
@override final String accountId;
|
@override final String accountId;
|
||||||
@override final SnAccount account;
|
@override final SnAccount account;
|
||||||
@override final String? nick;
|
@override final String? nick;
|
||||||
@override final int role;
|
|
||||||
@override final int notify;
|
@override final int notify;
|
||||||
@override final DateTime? joinedAt;
|
@override final DateTime? joinedAt;
|
||||||
@override final DateTime? breakUntil;
|
@override final DateTime? breakUntil;
|
||||||
@override final DateTime? timeoutUntil;
|
@override final DateTime? timeoutUntil;
|
||||||
@override final bool isBot;
|
|
||||||
@override final SnAccountStatus? status;
|
@override final SnAccountStatus? status;
|
||||||
// Frontend data
|
// Frontend data
|
||||||
@override final DateTime? lastTyped;
|
@override final DateTime? lastTyped;
|
||||||
@@ -1310,16 +1314,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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.breakUntil, breakUntil) || other.breakUntil == breakUntil)&&(identical(other.timeoutUntil, timeoutUntil) || other.timeoutUntil == timeoutUntil)&&(identical(other.isBot, isBot) || other.isBot == isBot)&&(identical(other.status, status) || other.status == status)&&(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.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.status, status) || other.status == status)&&(identical(other.lastTyped, lastTyped) || other.lastTyped == lastTyped));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,createdAt,updatedAt,deletedAt,id,chatRoomId,chatRoom,accountId,account,nick,role,notify,joinedAt,breakUntil,timeoutUntil,isBot,status,lastTyped);
|
int get hashCode => Object.hash(runtimeType,createdAt,updatedAt,deletedAt,id,chatRoomId,chatRoom,accountId,account,nick,notify,joinedAt,breakUntil,timeoutUntil,status,lastTyped);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
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, breakUntil: $breakUntil, timeoutUntil: $timeoutUntil, isBot: $isBot, status: $status, lastTyped: $lastTyped)';
|
return 'SnChatMember(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, chatRoomId: $chatRoomId, chatRoom: $chatRoom, accountId: $accountId, account: $account, nick: $nick, notify: $notify, joinedAt: $joinedAt, breakUntil: $breakUntil, timeoutUntil: $timeoutUntil, status: $status, lastTyped: $lastTyped)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1330,7 +1334,7 @@ abstract mixin class _$SnChatMemberCopyWith<$Res> implements $SnChatMemberCopyWi
|
|||||||
factory _$SnChatMemberCopyWith(_SnChatMember value, $Res Function(_SnChatMember) _then) = __$SnChatMemberCopyWithImpl;
|
factory _$SnChatMemberCopyWith(_SnChatMember value, $Res Function(_SnChatMember) _then) = __$SnChatMemberCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$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, DateTime? breakUntil, DateTime? timeoutUntil, bool isBot, SnAccountStatus? status, DateTime? lastTyped
|
DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, SnAccountStatus? status, DateTime? lastTyped
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -1347,7 +1351,7 @@ class __$SnChatMemberCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnChatMember
|
/// Create a copy of SnChatMember
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// 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? breakUntil = freezed,Object? timeoutUntil = freezed,Object? isBot = null,Object? status = freezed,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? notify = null,Object? joinedAt = freezed,Object? breakUntil = freezed,Object? timeoutUntil = freezed,Object? status = freezed,Object? lastTyped = freezed,}) {
|
||||||
return _then(_SnChatMember(
|
return _then(_SnChatMember(
|
||||||
createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
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,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -1358,13 +1362,11 @@ as String,chatRoom: freezed == chatRoom ? _self.chatRoom : chatRoom // ignore: c
|
|||||||
as SnChatRoom?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
as SnChatRoom?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||||
as String,account: null == account ? _self.account : account // ignore: cast_nullable_to_non_nullable
|
as String,account: null == account ? _self.account : account // ignore: cast_nullable_to_non_nullable
|
||||||
as SnAccount,nick: freezed == nick ? _self.nick : nick // ignore: cast_nullable_to_non_nullable
|
as SnAccount,nick: freezed == nick ? _self.nick : nick // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
|
as String?,notify: null == notify ? _self.notify : notify // 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 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?,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?,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 DateTime?,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
|
||||||
as SnAccountStatus?,lastTyped: freezed == lastTyped ? _self.lastTyped : lastTyped // ignore: cast_nullable_to_non_nullable
|
as SnAccountStatus?,lastTyped: freezed == lastTyped ? _self.lastTyped : lastTyped // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime?,
|
as DateTime?,
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -13,29 +13,26 @@ _SnChatRoom _$SnChatRoomFromJson(Map<String, dynamic> json) => _SnChatRoom(
|
|||||||
type: (json['type'] as num).toInt(),
|
type: (json['type'] as num).toInt(),
|
||||||
isPublic: json['is_public'] as bool? ?? false,
|
isPublic: json['is_public'] as bool? ?? false,
|
||||||
isCommunity: json['is_community'] as bool? ?? false,
|
isCommunity: json['is_community'] as bool? ?? false,
|
||||||
picture:
|
picture: json['picture'] == null
|
||||||
json['picture'] == null
|
? null
|
||||||
? null
|
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
||||||
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
background: json['background'] == null
|
||||||
background:
|
? null
|
||||||
json['background'] == null
|
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
||||||
? null
|
|
||||||
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
|
||||||
realmId: json['realm_id'] as String?,
|
realmId: json['realm_id'] as String?,
|
||||||
realm:
|
accountId: json['account_id'] as String?,
|
||||||
json['realm'] == null
|
realm: json['realm'] == null
|
||||||
? null
|
? null
|
||||||
: SnRealm.fromJson(json['realm'] as Map<String, dynamic>),
|
: SnRealm.fromJson(json['realm'] as Map<String, dynamic>),
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
members: (json['members'] as List<dynamic>?)
|
||||||
members:
|
?.map((e) => SnChatMember.fromJson(e as Map<String, dynamic>))
|
||||||
(json['members'] as List<dynamic>?)
|
.toList(),
|
||||||
?.map((e) => SnChatMember.fromJson(e as Map<String, dynamic>))
|
isPinned: json['is_pinned'] as bool? ?? false,
|
||||||
.toList(),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnChatRoomToJson(_SnChatRoom instance) =>
|
Map<String, dynamic> _$SnChatRoomToJson(_SnChatRoom instance) =>
|
||||||
@@ -49,21 +46,22 @@ Map<String, dynamic> _$SnChatRoomToJson(_SnChatRoom instance) =>
|
|||||||
'picture': instance.picture?.toJson(),
|
'picture': instance.picture?.toJson(),
|
||||||
'background': instance.background?.toJson(),
|
'background': instance.background?.toJson(),
|
||||||
'realm_id': instance.realmId,
|
'realm_id': instance.realmId,
|
||||||
|
'account_id': instance.accountId,
|
||||||
'realm': instance.realm?.toJson(),
|
'realm': instance.realm?.toJson(),
|
||||||
'created_at': instance.createdAt.toIso8601String(),
|
'created_at': instance.createdAt.toIso8601String(),
|
||||||
'updated_at': instance.updatedAt.toIso8601String(),
|
'updated_at': instance.updatedAt.toIso8601String(),
|
||||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||||
'members': instance.members?.map((e) => e.toJson()).toList(),
|
'members': instance.members?.map((e) => e.toJson()).toList(),
|
||||||
|
'is_pinned': instance.isPinned,
|
||||||
};
|
};
|
||||||
|
|
||||||
_SnChatMessage _$SnChatMessageFromJson(Map<String, dynamic> json) =>
|
_SnChatMessage _$SnChatMessageFromJson(Map<String, dynamic> json) =>
|
||||||
_SnChatMessage(
|
_SnChatMessage(
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
type: json['type'] as String? ?? 'text',
|
type: json['type'] as String? ?? 'text',
|
||||||
content: json['content'] as String?,
|
content: json['content'] as String?,
|
||||||
@@ -74,10 +72,9 @@ _SnChatMessage _$SnChatMessageFromJson(Map<String, dynamic> json) =>
|
|||||||
?.map((e) => e as String)
|
?.map((e) => e as String)
|
||||||
.toList() ??
|
.toList() ??
|
||||||
const [],
|
const [],
|
||||||
editedAt:
|
editedAt: json['edited_at'] == null
|
||||||
json['edited_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['edited_at'] as String),
|
||||||
: DateTime.parse(json['edited_at'] as String),
|
|
||||||
attachments:
|
attachments:
|
||||||
(json['attachments'] as List<dynamic>?)
|
(json['attachments'] as List<dynamic>?)
|
||||||
?.map((e) => SnCloudFile.fromJson(e as Map<String, dynamic>))
|
?.map((e) => SnCloudFile.fromJson(e as Map<String, dynamic>))
|
||||||
@@ -120,10 +117,9 @@ _SnChatReaction _$SnChatReactionFromJson(Map<String, dynamic> json) =>
|
|||||||
_SnChatReaction(
|
_SnChatReaction(
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
messageId: json['message_id'] as String,
|
messageId: json['message_id'] as String,
|
||||||
senderId: json['sender_id'] as String,
|
senderId: json['sender_id'] as String,
|
||||||
@@ -149,44 +145,33 @@ _SnChatMember _$SnChatMemberFromJson(Map<String, dynamic> json) =>
|
|||||||
_SnChatMember(
|
_SnChatMember(
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
chatRoomId: json['chat_room_id'] as String,
|
chatRoomId: json['chat_room_id'] as String,
|
||||||
chatRoom:
|
chatRoom: json['chat_room'] == null
|
||||||
json['chat_room'] == null
|
? null
|
||||||
? null
|
: SnChatRoom.fromJson(json['chat_room'] as Map<String, dynamic>),
|
||||||
: SnChatRoom.fromJson(json['chat_room'] as Map<String, dynamic>),
|
|
||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
account: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
account: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||||
nick: json['nick'] as String?,
|
nick: json['nick'] as String?,
|
||||||
role: (json['role'] as num).toInt(),
|
|
||||||
notify: (json['notify'] as num).toInt(),
|
notify: (json['notify'] as num).toInt(),
|
||||||
joinedAt:
|
joinedAt: json['joined_at'] == null
|
||||||
json['joined_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['joined_at'] as String),
|
||||||
: DateTime.parse(json['joined_at'] as String),
|
breakUntil: json['break_until'] == null
|
||||||
breakUntil:
|
? null
|
||||||
json['break_until'] == null
|
: DateTime.parse(json['break_until'] as String),
|
||||||
? null
|
timeoutUntil: json['timeout_until'] == null
|
||||||
: DateTime.parse(json['break_until'] as String),
|
? null
|
||||||
timeoutUntil:
|
: DateTime.parse(json['timeout_until'] as String),
|
||||||
json['timeout_until'] == null
|
status: json['status'] == null
|
||||||
? null
|
? null
|
||||||
: DateTime.parse(json['timeout_until'] as String),
|
: SnAccountStatus.fromJson(json['status'] as Map<String, dynamic>),
|
||||||
isBot: json['is_bot'] as bool,
|
lastTyped: json['last_typed'] == null
|
||||||
status:
|
? null
|
||||||
json['status'] == null
|
: DateTime.parse(json['last_typed'] as String),
|
||||||
? null
|
|
||||||
: SnAccountStatus.fromJson(
|
|
||||||
json['status'] as Map<String, dynamic>,
|
|
||||||
),
|
|
||||||
lastTyped:
|
|
||||||
json['last_typed'] == null
|
|
||||||
? null
|
|
||||||
: DateTime.parse(json['last_typed'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnChatMemberToJson(_SnChatMember instance) =>
|
Map<String, dynamic> _$SnChatMemberToJson(_SnChatMember instance) =>
|
||||||
@@ -200,12 +185,10 @@ Map<String, dynamic> _$SnChatMemberToJson(_SnChatMember instance) =>
|
|||||||
'account_id': instance.accountId,
|
'account_id': instance.accountId,
|
||||||
'account': instance.account.toJson(),
|
'account': instance.account.toJson(),
|
||||||
'nick': instance.nick,
|
'nick': instance.nick,
|
||||||
'role': instance.role,
|
|
||||||
'notify': instance.notify,
|
'notify': instance.notify,
|
||||||
'joined_at': instance.joinedAt?.toIso8601String(),
|
'joined_at': instance.joinedAt?.toIso8601String(),
|
||||||
'break_until': instance.breakUntil?.toIso8601String(),
|
'break_until': instance.breakUntil?.toIso8601String(),
|
||||||
'timeout_until': instance.timeoutUntil?.toIso8601String(),
|
'timeout_until': instance.timeoutUntil?.toIso8601String(),
|
||||||
'is_bot': instance.isBot,
|
|
||||||
'status': instance.status?.toJson(),
|
'status': instance.status?.toJson(),
|
||||||
'last_typed': instance.lastTyped?.toIso8601String(),
|
'last_typed': instance.lastTyped?.toIso8601String(),
|
||||||
};
|
};
|
||||||
@@ -213,12 +196,11 @@ Map<String, dynamic> _$SnChatMemberToJson(_SnChatMember instance) =>
|
|||||||
_SnChatSummary _$SnChatSummaryFromJson(Map<String, dynamic> json) =>
|
_SnChatSummary _$SnChatSummaryFromJson(Map<String, dynamic> json) =>
|
||||||
_SnChatSummary(
|
_SnChatSummary(
|
||||||
unreadCount: (json['unread_count'] as num).toInt(),
|
unreadCount: (json['unread_count'] as num).toInt(),
|
||||||
lastMessage:
|
lastMessage: json['last_message'] == null
|
||||||
json['last_message'] == null
|
? null
|
||||||
? null
|
: SnChatMessage.fromJson(
|
||||||
: SnChatMessage.fromJson(
|
json['last_message'] as Map<String, dynamic>,
|
||||||
json['last_message'] as Map<String, dynamic>,
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnChatSummaryToJson(_SnChatSummary instance) =>
|
Map<String, dynamic> _$SnChatSummaryToJson(_SnChatSummary instance) =>
|
||||||
@@ -253,10 +235,9 @@ _ChatRealtimeJoinResponse _$ChatRealtimeJoinResponseFromJson(
|
|||||||
callId: json['call_id'] as String,
|
callId: json['call_id'] as String,
|
||||||
roomName: json['room_name'] as String,
|
roomName: json['room_name'] as String,
|
||||||
isAdmin: json['is_admin'] as bool,
|
isAdmin: json['is_admin'] as bool,
|
||||||
participants:
|
participants: (json['participants'] as List<dynamic>)
|
||||||
(json['participants'] as List<dynamic>)
|
.map((e) => CallParticipant.fromJson(e as Map<String, dynamic>))
|
||||||
.map((e) => CallParticipant.fromJson(e as Map<String, dynamic>))
|
.toList(),
|
||||||
.toList(),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$ChatRealtimeJoinResponseToJson(
|
Map<String, dynamic> _$ChatRealtimeJoinResponseToJson(
|
||||||
@@ -290,14 +271,12 @@ _SnRealtimeCall _$SnRealtimeCallFromJson(Map<String, dynamic> json) =>
|
|||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
endedAt: json['ended_at'] == null
|
||||||
endedAt:
|
? null
|
||||||
json['ended_at'] == null
|
: DateTime.parse(json['ended_at'] as String),
|
||||||
? null
|
|
||||||
: DateTime.parse(json['ended_at'] as String),
|
|
||||||
senderId: json['sender_id'] as String,
|
senderId: json['sender_id'] as String,
|
||||||
sender: SnChatMember.fromJson(json['sender'] as Map<String, dynamic>),
|
sender: SnChatMember.fromJson(json['sender'] as Map<String, dynamic>),
|
||||||
roomId: json['room_id'] as String,
|
roomId: json['room_id'] as String,
|
||||||
|
|||||||
@@ -12,30 +12,25 @@ _CustomApp _$CustomAppFromJson(Map<String, dynamic> json) => _CustomApp(
|
|||||||
name: json['name'] as String? ?? '',
|
name: json['name'] as String? ?? '',
|
||||||
description: json['description'] as String?,
|
description: json['description'] as String?,
|
||||||
status: (json['status'] as num?)?.toInt() ?? 0,
|
status: (json['status'] as num?)?.toInt() ?? 0,
|
||||||
picture:
|
picture: json['picture'] == null
|
||||||
json['picture'] == null
|
? null
|
||||||
? null
|
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
||||||
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
background: json['background'] == null
|
||||||
background:
|
? null
|
||||||
json['background'] == null
|
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
||||||
? null
|
verification: json['verification'] == null
|
||||||
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
? null
|
||||||
verification:
|
: SnVerificationMark.fromJson(
|
||||||
json['verification'] == null
|
json['verification'] as Map<String, dynamic>,
|
||||||
? null
|
),
|
||||||
: SnVerificationMark.fromJson(
|
oauthConfig: json['oauth_config'] == null
|
||||||
json['verification'] as Map<String, dynamic>,
|
? null
|
||||||
),
|
: CustomAppOauthConfig.fromJson(
|
||||||
oauthConfig:
|
json['oauth_config'] as Map<String, dynamic>,
|
||||||
json['oauth_config'] == null
|
),
|
||||||
? null
|
links: json['links'] == null
|
||||||
: CustomAppOauthConfig.fromJson(
|
? null
|
||||||
json['oauth_config'] as Map<String, dynamic>,
|
: CustomAppLinks.fromJson(json['links'] as Map<String, dynamic>),
|
||||||
),
|
|
||||||
links:
|
|
||||||
json['links'] == null
|
|
||||||
? null
|
|
||||||
: CustomAppLinks.fromJson(json['links'] as Map<String, dynamic>),
|
|
||||||
secrets:
|
secrets:
|
||||||
(json['secrets'] as List<dynamic>?)
|
(json['secrets'] as List<dynamic>?)
|
||||||
?.map((e) => CustomAppSecret.fromJson(e as Map<String, dynamic>))
|
?.map((e) => CustomAppSecret.fromJson(e as Map<String, dynamic>))
|
||||||
@@ -83,10 +78,9 @@ _CustomAppOauthConfig _$CustomAppOauthConfigFromJson(
|
|||||||
?.map((e) => e as String)
|
?.map((e) => e as String)
|
||||||
.toList() ??
|
.toList() ??
|
||||||
const [],
|
const [],
|
||||||
postLogoutRedirectUris:
|
postLogoutRedirectUris: (json['post_logout_redirect_uris'] as List<dynamic>?)
|
||||||
(json['post_logout_redirect_uris'] as List<dynamic>?)
|
?.map((e) => e as String)
|
||||||
?.map((e) => e as String)
|
.toList(),
|
||||||
.toList(),
|
|
||||||
allowedScopes:
|
allowedScopes:
|
||||||
(json['allowed_scopes'] as List<dynamic>?)
|
(json['allowed_scopes'] as List<dynamic>?)
|
||||||
?.map((e) => e as String)
|
?.map((e) => e as String)
|
||||||
@@ -118,10 +112,9 @@ _CustomAppSecret _$CustomAppSecretFromJson(Map<String, dynamic> json) =>
|
|||||||
id: json['id'] as String? ?? '',
|
id: json['id'] as String? ?? '',
|
||||||
secret: json['secret'] as String? ?? '',
|
secret: json['secret'] as String? ?? '',
|
||||||
description: json['description'] as String?,
|
description: json['description'] as String?,
|
||||||
expiredAt:
|
expiredAt: json['expired_at'] == null
|
||||||
json['expired_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['expired_at'] as String),
|
||||||
: DateTime.parse(json['expired_at'] as String),
|
|
||||||
isOidc: json['is_oidc'] as bool? ?? false,
|
isOidc: json['is_oidc'] as bool? ?? false,
|
||||||
appId: json['app_id'] as String? ?? '',
|
appId: json['app_id'] as String? ?? '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -9,10 +9,9 @@ part of 'developer.dart';
|
|||||||
_SnDeveloper _$SnDeveloperFromJson(Map<String, dynamic> json) => _SnDeveloper(
|
_SnDeveloper _$SnDeveloperFromJson(Map<String, dynamic> json) => _SnDeveloper(
|
||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
publisherId: json['publisher_id'] as String,
|
publisherId: json['publisher_id'] as String,
|
||||||
publisher:
|
publisher: json['publisher'] == null
|
||||||
json['publisher'] == null
|
? null
|
||||||
? null
|
: SnPublisher.fromJson(json['publisher'] as Map<String, dynamic>),
|
||||||
: SnPublisher.fromJson(json['publisher'] as Map<String, dynamic>),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnDeveloperToJson(_SnDeveloper instance) =>
|
Map<String, dynamic> _$SnDeveloperToJson(_SnDeveloper instance) =>
|
||||||
|
|||||||
@@ -22,10 +22,9 @@ _DriveTask _$DriveTaskFromJson(Map<String, dynamic> json) => _DriveTask(
|
|||||||
transmissionProgress: (json['transmission_progress'] as num?)?.toDouble(),
|
transmissionProgress: (json['transmission_progress'] as num?)?.toDouble(),
|
||||||
errorMessage: json['error_message'] as String?,
|
errorMessage: json['error_message'] as String?,
|
||||||
statusMessage: json['status_message'] as String?,
|
statusMessage: json['status_message'] as String?,
|
||||||
result:
|
result: json['result'] == null
|
||||||
json['result'] == null
|
? null
|
||||||
? null
|
: SnCloudFile.fromJson(json['result'] as Map<String, dynamic>),
|
||||||
: SnCloudFile.fromJson(json['result'] as Map<String, dynamic>),
|
|
||||||
poolId: json['pool_id'] as String?,
|
poolId: json['pool_id'] as String?,
|
||||||
bundleId: json['bundle_id'] as String?,
|
bundleId: json['bundle_id'] as String?,
|
||||||
encryptPassword: json['encrypt_password'] as String?,
|
encryptPassword: json['encrypt_password'] as String?,
|
||||||
|
|||||||
@@ -17,10 +17,9 @@ _SnScrappedLink _$SnScrappedLinkFromJson(Map<String, dynamic> json) =>
|
|||||||
siteName: json['site_name'] as String?,
|
siteName: json['site_name'] as String?,
|
||||||
contentType: json['content_type'] as String?,
|
contentType: json['content_type'] as String?,
|
||||||
author: json['author'] as String?,
|
author: json['author'] as String?,
|
||||||
publishedDate:
|
publishedDate: json['published_date'] == null
|
||||||
json['published_date'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['published_date'] as String),
|
||||||
: DateTime.parse(json['published_date'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnScrappedLinkToJson(_SnScrappedLink instance) =>
|
Map<String, dynamic> _$SnScrappedLinkToJson(_SnScrappedLink instance) =>
|
||||||
|
|||||||
@@ -35,10 +35,9 @@ _SnCloudFile _$SnCloudFileFromJson(Map<String, dynamic> json) => _SnCloudFile(
|
|||||||
description: json['description'] as String?,
|
description: json['description'] as String?,
|
||||||
fileMeta: json['file_meta'] as Map<String, dynamic>?,
|
fileMeta: json['file_meta'] as Map<String, dynamic>?,
|
||||||
userMeta: json['user_meta'] as Map<String, dynamic>?,
|
userMeta: json['user_meta'] as Map<String, dynamic>?,
|
||||||
pool:
|
pool: json['pool'] == null
|
||||||
json['pool'] == null
|
? null
|
||||||
? null
|
: SnFilePool.fromJson(json['pool'] as Map<String, dynamic>),
|
||||||
: SnFilePool.fromJson(json['pool'] as Map<String, dynamic>),
|
|
||||||
sensitiveMarks:
|
sensitiveMarks:
|
||||||
(json['sensitive_marks'] as List<dynamic>?)
|
(json['sensitive_marks'] as List<dynamic>?)
|
||||||
?.map((e) => (e as num).toInt())
|
?.map((e) => (e as num).toInt())
|
||||||
@@ -47,17 +46,15 @@ _SnCloudFile _$SnCloudFileFromJson(Map<String, dynamic> json) => _SnCloudFile(
|
|||||||
mimeType: json['mime_type'] as String?,
|
mimeType: json['mime_type'] as String?,
|
||||||
hash: json['hash'] as String?,
|
hash: json['hash'] as String?,
|
||||||
size: (json['size'] as num).toInt(),
|
size: (json['size'] as num).toInt(),
|
||||||
uploadedAt:
|
uploadedAt: json['uploaded_at'] == null
|
||||||
json['uploaded_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['uploaded_at'] as String),
|
||||||
: DateTime.parse(json['uploaded_at'] as String),
|
|
||||||
uploadedTo: json['uploaded_to'] as String?,
|
uploadedTo: json['uploaded_to'] as String?,
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnCloudFileToJson(_SnCloudFile instance) =>
|
Map<String, dynamic> _$SnCloudFileToJson(_SnCloudFile instance) =>
|
||||||
@@ -87,10 +84,9 @@ _SnCloudFileIndex _$SnCloudFileIndexFromJson(Map<String, dynamic> json) =>
|
|||||||
file: SnCloudFile.fromJson(json['file'] as Map<String, dynamic>),
|
file: SnCloudFile.fromJson(json['file'] as Map<String, dynamic>),
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnCloudFileIndexToJson(_SnCloudFileIndex instance) =>
|
Map<String, dynamic> _$SnCloudFileIndexToJson(_SnCloudFileIndex instance) =>
|
||||||
|
|||||||
@@ -16,18 +16,15 @@ _SnFilePool _$SnFilePoolFromJson(Map<String, dynamic> json) => _SnFilePool(
|
|||||||
isHidden: json['is_hidden'] as bool?,
|
isHidden: json['is_hidden'] as bool?,
|
||||||
accountId: json['account_id'] as String?,
|
accountId: json['account_id'] as String?,
|
||||||
resourceIdentifier: json['resource_identifier'] as String?,
|
resourceIdentifier: json['resource_identifier'] as String?,
|
||||||
createdAt:
|
createdAt: json['created_at'] == null
|
||||||
json['created_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['created_at'] as String),
|
||||||
: DateTime.parse(json['created_at'] as String),
|
updatedAt: json['updated_at'] == null
|
||||||
updatedAt:
|
? null
|
||||||
json['updated_at'] == null
|
: DateTime.parse(json['updated_at'] as String),
|
||||||
? null
|
deletedAt: json['deleted_at'] == null
|
||||||
: DateTime.parse(json['updated_at'] as String),
|
? null
|
||||||
deletedAt:
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
json['deleted_at'] == null
|
|
||||||
? null
|
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnFilePoolToJson(_SnFilePool instance) =>
|
Map<String, dynamic> _$SnFilePoolToJson(_SnFilePool instance) =>
|
||||||
|
|||||||
16
lib/models/fortune.dart
Normal file
16
lib/models/fortune.dart
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
|
|
||||||
|
part 'fortune.g.dart';
|
||||||
|
part 'fortune.freezed.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
sealed class SnFortuneSaying with _$SnFortuneSaying {
|
||||||
|
const factory SnFortuneSaying({
|
||||||
|
required String content,
|
||||||
|
required String source,
|
||||||
|
required String language,
|
||||||
|
}) = _SnFortuneSaying;
|
||||||
|
|
||||||
|
factory SnFortuneSaying.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$SnFortuneSayingFromJson(json);
|
||||||
|
}
|
||||||
277
lib/models/fortune.freezed.dart
Normal file
277
lib/models/fortune.freezed.dart
Normal file
@@ -0,0 +1,277 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// coverage:ignore-file
|
||||||
|
// 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 'fortune.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// FreezedGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// dart format off
|
||||||
|
T _$identity<T>(T value) => value;
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$SnFortuneSaying {
|
||||||
|
|
||||||
|
String get content; String get source; String get language;
|
||||||
|
/// Create a copy of SnFortuneSaying
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$SnFortuneSayingCopyWith<SnFortuneSaying> get copyWith => _$SnFortuneSayingCopyWithImpl<SnFortuneSaying>(this as SnFortuneSaying, _$identity);
|
||||||
|
|
||||||
|
/// Serializes this SnFortuneSaying to a JSON map.
|
||||||
|
Map<String, dynamic> toJson();
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnFortuneSaying&&(identical(other.content, content) || other.content == content)&&(identical(other.source, source) || other.source == source)&&(identical(other.language, language) || other.language == language));
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,content,source,language);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'SnFortuneSaying(content: $content, source: $source, language: $language)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $SnFortuneSayingCopyWith<$Res> {
|
||||||
|
factory $SnFortuneSayingCopyWith(SnFortuneSaying value, $Res Function(SnFortuneSaying) _then) = _$SnFortuneSayingCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
String content, String source, String language
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$SnFortuneSayingCopyWithImpl<$Res>
|
||||||
|
implements $SnFortuneSayingCopyWith<$Res> {
|
||||||
|
_$SnFortuneSayingCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final SnFortuneSaying _self;
|
||||||
|
final $Res Function(SnFortuneSaying) _then;
|
||||||
|
|
||||||
|
/// Create a copy of SnFortuneSaying
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') @override $Res call({Object? content = null,Object? source = null,Object? language = null,}) {
|
||||||
|
return _then(_self.copyWith(
|
||||||
|
content: null == content ? _self.content : content // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,source: null == source ? _self.source : source // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,language: null == language ? _self.language : language // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [SnFortuneSaying].
|
||||||
|
extension SnFortuneSayingPatterns on SnFortuneSaying {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnFortuneSaying value)? $default,{required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnFortuneSaying() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnFortuneSaying value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnFortuneSaying():
|
||||||
|
return $default(_that);}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnFortuneSaying value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnFortuneSaying() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String content, String source, String language)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnFortuneSaying() when $default != null:
|
||||||
|
return $default(_that.content,_that.source,_that.language);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String content, String source, String language) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnFortuneSaying():
|
||||||
|
return $default(_that.content,_that.source,_that.language);}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String content, String source, String language)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnFortuneSaying() when $default != null:
|
||||||
|
return $default(_that.content,_that.source,_that.language);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
@JsonSerializable()
|
||||||
|
|
||||||
|
class _SnFortuneSaying implements SnFortuneSaying {
|
||||||
|
const _SnFortuneSaying({required this.content, required this.source, required this.language});
|
||||||
|
factory _SnFortuneSaying.fromJson(Map<String, dynamic> json) => _$SnFortuneSayingFromJson(json);
|
||||||
|
|
||||||
|
@override final String content;
|
||||||
|
@override final String source;
|
||||||
|
@override final String language;
|
||||||
|
|
||||||
|
/// Create a copy of SnFortuneSaying
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$SnFortuneSayingCopyWith<_SnFortuneSaying> get copyWith => __$SnFortuneSayingCopyWithImpl<_SnFortuneSaying>(this, _$identity);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
return _$SnFortuneSayingToJson(this, );
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnFortuneSaying&&(identical(other.content, content) || other.content == content)&&(identical(other.source, source) || other.source == source)&&(identical(other.language, language) || other.language == language));
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,content,source,language);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'SnFortuneSaying(content: $content, source: $source, language: $language)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$SnFortuneSayingCopyWith<$Res> implements $SnFortuneSayingCopyWith<$Res> {
|
||||||
|
factory _$SnFortuneSayingCopyWith(_SnFortuneSaying value, $Res Function(_SnFortuneSaying) _then) = __$SnFortuneSayingCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
String content, String source, String language
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$SnFortuneSayingCopyWithImpl<$Res>
|
||||||
|
implements _$SnFortuneSayingCopyWith<$Res> {
|
||||||
|
__$SnFortuneSayingCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _SnFortuneSaying _self;
|
||||||
|
final $Res Function(_SnFortuneSaying) _then;
|
||||||
|
|
||||||
|
/// Create a copy of SnFortuneSaying
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? content = null,Object? source = null,Object? language = null,}) {
|
||||||
|
return _then(_SnFortuneSaying(
|
||||||
|
content: null == content ? _self.content : content // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,source: null == source ? _self.source : source // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,language: null == language ? _self.language : language // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// dart format on
|
||||||
21
lib/models/fortune.g.dart
Normal file
21
lib/models/fortune.g.dart
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'fortune.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// JsonSerializableGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
_SnFortuneSaying _$SnFortuneSayingFromJson(Map<String, dynamic> json) =>
|
||||||
|
_SnFortuneSaying(
|
||||||
|
content: json['content'] as String,
|
||||||
|
source: json['source'] as String,
|
||||||
|
language: json['language'] as String,
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$SnFortuneSayingToJson(_SnFortuneSaying instance) =>
|
||||||
|
<String, dynamic>{
|
||||||
|
'content': instance.content,
|
||||||
|
'source': instance.source,
|
||||||
|
'language': instance.language,
|
||||||
|
};
|
||||||
@@ -10,10 +10,9 @@ _SnHeatmap _$SnHeatmapFromJson(Map<String, dynamic> json) => _SnHeatmap(
|
|||||||
unit: json['unit'] as String,
|
unit: json['unit'] as String,
|
||||||
periodStart: DateTime.parse(json['period_start'] as String),
|
periodStart: DateTime.parse(json['period_start'] as String),
|
||||||
periodEnd: DateTime.parse(json['period_end'] as String),
|
periodEnd: DateTime.parse(json['period_end'] as String),
|
||||||
items:
|
items: (json['items'] as List<dynamic>)
|
||||||
(json['items'] as List<dynamic>)
|
.map((e) => SnHeatmapItem.fromJson(e as Map<String, dynamic>))
|
||||||
.map((e) => SnHeatmapItem.fromJson(e as Map<String, dynamic>))
|
.toList(),
|
||||||
.toList(),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnHeatmapToJson(_SnHeatmap instance) =>
|
Map<String, dynamic> _$SnHeatmapToJson(_SnHeatmap instance) =>
|
||||||
|
|||||||
@@ -8,31 +8,25 @@ part of 'poll.dart';
|
|||||||
|
|
||||||
_SnPollWithStats _$SnPollWithStatsFromJson(Map<String, dynamic> json) =>
|
_SnPollWithStats _$SnPollWithStatsFromJson(Map<String, dynamic> json) =>
|
||||||
_SnPollWithStats(
|
_SnPollWithStats(
|
||||||
userAnswer:
|
userAnswer: json['user_answer'] == null
|
||||||
json['user_answer'] == null
|
? null
|
||||||
? null
|
: SnPollAnswer.fromJson(json['user_answer'] as Map<String, dynamic>),
|
||||||
: SnPollAnswer.fromJson(
|
|
||||||
json['user_answer'] as Map<String, dynamic>,
|
|
||||||
),
|
|
||||||
stats: json['stats'] as Map<String, dynamic>? ?? const {},
|
stats: json['stats'] as Map<String, dynamic>? ?? const {},
|
||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
questions:
|
questions: (json['questions'] as List<dynamic>)
|
||||||
(json['questions'] as List<dynamic>)
|
.map((e) => SnPollQuestion.fromJson(e as Map<String, dynamic>))
|
||||||
.map((e) => SnPollQuestion.fromJson(e as Map<String, dynamic>))
|
.toList(),
|
||||||
.toList(),
|
|
||||||
title: json['title'] as String?,
|
title: json['title'] as String?,
|
||||||
description: json['description'] as String?,
|
description: json['description'] as String?,
|
||||||
endedAt:
|
endedAt: json['ended_at'] == null
|
||||||
json['ended_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['ended_at'] as String),
|
||||||
: DateTime.parse(json['ended_at'] as String),
|
|
||||||
publisherId: json['publisher_id'] as String,
|
publisherId: json['publisher_id'] as String,
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnPollWithStatsToJson(_SnPollWithStats instance) =>
|
Map<String, dynamic> _$SnPollWithStatsToJson(_SnPollWithStats instance) =>
|
||||||
@@ -52,27 +46,23 @@ Map<String, dynamic> _$SnPollWithStatsToJson(_SnPollWithStats instance) =>
|
|||||||
|
|
||||||
_SnPoll _$SnPollFromJson(Map<String, dynamic> json) => _SnPoll(
|
_SnPoll _$SnPollFromJson(Map<String, dynamic> json) => _SnPoll(
|
||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
questions:
|
questions: (json['questions'] as List<dynamic>)
|
||||||
(json['questions'] as List<dynamic>)
|
.map((e) => SnPollQuestion.fromJson(e as Map<String, dynamic>))
|
||||||
.map((e) => SnPollQuestion.fromJson(e as Map<String, dynamic>))
|
.toList(),
|
||||||
.toList(),
|
|
||||||
title: json['title'] as String?,
|
title: json['title'] as String?,
|
||||||
description: json['description'] as String?,
|
description: json['description'] as String?,
|
||||||
endedAt:
|
endedAt: json['ended_at'] == null
|
||||||
json['ended_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['ended_at'] as String),
|
||||||
: DateTime.parse(json['ended_at'] as String),
|
|
||||||
publisherId: json['publisher_id'] as String,
|
publisherId: json['publisher_id'] as String,
|
||||||
publisher:
|
publisher: json['publisher'] == null
|
||||||
json['publisher'] == null
|
? null
|
||||||
? null
|
: SnPublisher.fromJson(json['publisher'] as Map<String, dynamic>),
|
||||||
: SnPublisher.fromJson(json['publisher'] as Map<String, dynamic>),
|
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnPollToJson(_SnPoll instance) => <String, dynamic>{
|
Map<String, dynamic> _$SnPollToJson(_SnPoll instance) => <String, dynamic>{
|
||||||
@@ -92,10 +82,9 @@ _SnPollQuestion _$SnPollQuestionFromJson(Map<String, dynamic> json) =>
|
|||||||
_SnPollQuestion(
|
_SnPollQuestion(
|
||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
type: $enumDecode(_$SnPollQuestionTypeEnumMap, json['type']),
|
type: $enumDecode(_$SnPollQuestionTypeEnumMap, json['type']),
|
||||||
options:
|
options: (json['options'] as List<dynamic>?)
|
||||||
(json['options'] as List<dynamic>?)
|
?.map((e) => SnPollOption.fromJson(e as Map<String, dynamic>))
|
||||||
?.map((e) => SnPollOption.fromJson(e as Map<String, dynamic>))
|
.toList(),
|
||||||
.toList(),
|
|
||||||
title: json['title'] as String,
|
title: json['title'] as String,
|
||||||
description: json['description'] as String?,
|
description: json['description'] as String?,
|
||||||
order: (json['order'] as num).toInt(),
|
order: (json['order'] as num).toInt(),
|
||||||
@@ -145,14 +134,12 @@ _SnPollAnswer _$SnPollAnswerFromJson(Map<String, dynamic> json) =>
|
|||||||
pollId: json['poll_id'] as String,
|
pollId: json['poll_id'] as String,
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
account: json['account'] == null
|
||||||
account:
|
? null
|
||||||
json['account'] == null
|
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||||
? null
|
|
||||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnPollAnswerToJson(_SnPollAnswer instance) =>
|
Map<String, dynamic> _$SnPollAnswerToJson(_SnPollAnswer instance) =>
|
||||||
|
|||||||
@@ -74,15 +74,15 @@ sealed class SnPublisherStats with _$SnPublisherStats {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class SnSubscriptionStatus with _$SnSubscriptionStatus {
|
sealed class SnPublisherSubscription with _$SnPublisherSubscription {
|
||||||
const factory SnSubscriptionStatus({
|
const factory SnPublisherSubscription({
|
||||||
required bool isSubscribed,
|
required String accountId,
|
||||||
required String publisherId,
|
required String publisherId,
|
||||||
required String publisherName,
|
required SnPublisher publisher,
|
||||||
}) = _SnSubscriptionStatus;
|
}) = _SnPublisherSubscription;
|
||||||
|
|
||||||
factory SnSubscriptionStatus.fromJson(Map<String, dynamic> json) =>
|
factory SnPublisherSubscription.fromJson(Map<String, dynamic> json) =>
|
||||||
_$SnSubscriptionStatusFromJson(json);
|
_$SnPublisherSubscriptionFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
@@ -92,8 +92,9 @@ sealed class ReactInfo with _$ReactInfo {
|
|||||||
|
|
||||||
static String getTranslationKey(String templateKey) {
|
static String getTranslationKey(String templateKey) {
|
||||||
final parts = templateKey.split('_');
|
final parts = templateKey.split('_');
|
||||||
final camelCase =
|
final camelCase = parts
|
||||||
parts.map((p) => p[0].toUpperCase() + p.substring(1)).join();
|
.map((p) => p[0].toUpperCase() + p.substring(1))
|
||||||
|
.join();
|
||||||
return 'reaction$camelCase';
|
return 'reaction$camelCase';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -856,72 +856,81 @@ as int,
|
|||||||
|
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$SnSubscriptionStatus {
|
mixin _$SnPublisherSubscription {
|
||||||
|
|
||||||
bool get isSubscribed; String get publisherId; String get publisherName;
|
String get accountId; String get publisherId; SnPublisher get publisher;
|
||||||
/// Create a copy of SnSubscriptionStatus
|
/// Create a copy of SnPublisherSubscription
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$SnSubscriptionStatusCopyWith<SnSubscriptionStatus> get copyWith => _$SnSubscriptionStatusCopyWithImpl<SnSubscriptionStatus>(this as SnSubscriptionStatus, _$identity);
|
$SnPublisherSubscriptionCopyWith<SnPublisherSubscription> get copyWith => _$SnPublisherSubscriptionCopyWithImpl<SnPublisherSubscription>(this as SnPublisherSubscription, _$identity);
|
||||||
|
|
||||||
/// Serializes this SnSubscriptionStatus to a JSON map.
|
/// Serializes this SnPublisherSubscription to a JSON map.
|
||||||
Map<String, dynamic> toJson();
|
Map<String, dynamic> toJson();
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnSubscriptionStatus&&(identical(other.isSubscribed, isSubscribed) || other.isSubscribed == isSubscribed)&&(identical(other.publisherId, publisherId) || other.publisherId == publisherId)&&(identical(other.publisherName, publisherName) || other.publisherName == publisherName));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnPublisherSubscription&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.publisherId, publisherId) || other.publisherId == publisherId)&&(identical(other.publisher, publisher) || other.publisher == publisher));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,isSubscribed,publisherId,publisherName);
|
int get hashCode => Object.hash(runtimeType,accountId,publisherId,publisher);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnSubscriptionStatus(isSubscribed: $isSubscribed, publisherId: $publisherId, publisherName: $publisherName)';
|
return 'SnPublisherSubscription(accountId: $accountId, publisherId: $publisherId, publisher: $publisher)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
abstract mixin class $SnSubscriptionStatusCopyWith<$Res> {
|
abstract mixin class $SnPublisherSubscriptionCopyWith<$Res> {
|
||||||
factory $SnSubscriptionStatusCopyWith(SnSubscriptionStatus value, $Res Function(SnSubscriptionStatus) _then) = _$SnSubscriptionStatusCopyWithImpl;
|
factory $SnPublisherSubscriptionCopyWith(SnPublisherSubscription value, $Res Function(SnPublisherSubscription) _then) = _$SnPublisherSubscriptionCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
bool isSubscribed, String publisherId, String publisherName
|
String accountId, String publisherId, SnPublisher publisher
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$SnPublisherCopyWith<$Res> get publisher;
|
||||||
|
|
||||||
}
|
}
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
class _$SnSubscriptionStatusCopyWithImpl<$Res>
|
class _$SnPublisherSubscriptionCopyWithImpl<$Res>
|
||||||
implements $SnSubscriptionStatusCopyWith<$Res> {
|
implements $SnPublisherSubscriptionCopyWith<$Res> {
|
||||||
_$SnSubscriptionStatusCopyWithImpl(this._self, this._then);
|
_$SnPublisherSubscriptionCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
final SnSubscriptionStatus _self;
|
final SnPublisherSubscription _self;
|
||||||
final $Res Function(SnSubscriptionStatus) _then;
|
final $Res Function(SnPublisherSubscription) _then;
|
||||||
|
|
||||||
/// Create a copy of SnSubscriptionStatus
|
/// Create a copy of SnPublisherSubscription
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? isSubscribed = null,Object? publisherId = null,Object? publisherName = null,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? accountId = null,Object? publisherId = null,Object? publisher = null,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
isSubscribed: null == isSubscribed ? _self.isSubscribed : isSubscribed // ignore: cast_nullable_to_non_nullable
|
accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,publisherId: null == publisherId ? _self.publisherId : publisherId // ignore: cast_nullable_to_non_nullable
|
as String,publisherId: null == publisherId ? _self.publisherId : publisherId // ignore: cast_nullable_to_non_nullable
|
||||||
as String,publisherName: null == publisherName ? _self.publisherName : publisherName // ignore: cast_nullable_to_non_nullable
|
as String,publisher: null == publisher ? _self.publisher : publisher // ignore: cast_nullable_to_non_nullable
|
||||||
as String,
|
as SnPublisher,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
/// Create a copy of SnPublisherSubscription
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$SnPublisherCopyWith<$Res> get publisher {
|
||||||
|
|
||||||
|
return $SnPublisherCopyWith<$Res>(_self.publisher, (value) {
|
||||||
|
return _then(_self.copyWith(publisher: value));
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Adds pattern-matching-related methods to [SnSubscriptionStatus].
|
/// Adds pattern-matching-related methods to [SnPublisherSubscription].
|
||||||
extension SnSubscriptionStatusPatterns on SnSubscriptionStatus {
|
extension SnPublisherSubscriptionPatterns on SnPublisherSubscription {
|
||||||
/// A variant of `map` that fallback to returning `orElse`.
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
///
|
///
|
||||||
/// It is equivalent to doing:
|
/// It is equivalent to doing:
|
||||||
@@ -934,10 +943,10 @@ extension SnSubscriptionStatusPatterns on SnSubscriptionStatus {
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnSubscriptionStatus value)? $default,{required TResult orElse(),}){
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnPublisherSubscription value)? $default,{required TResult orElse(),}){
|
||||||
final _that = this;
|
final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnSubscriptionStatus() when $default != null:
|
case _SnPublisherSubscription() when $default != null:
|
||||||
return $default(_that);case _:
|
return $default(_that);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
@@ -956,10 +965,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnSubscriptionStatus value) $default,){
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnPublisherSubscription value) $default,){
|
||||||
final _that = this;
|
final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnSubscriptionStatus():
|
case _SnPublisherSubscription():
|
||||||
return $default(_that);}
|
return $default(_that);}
|
||||||
}
|
}
|
||||||
/// A variant of `map` that fallback to returning `null`.
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
@@ -974,10 +983,10 @@ return $default(_that);}
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnSubscriptionStatus value)? $default,){
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnPublisherSubscription value)? $default,){
|
||||||
final _that = this;
|
final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnSubscriptionStatus() when $default != null:
|
case _SnPublisherSubscription() when $default != null:
|
||||||
return $default(_that);case _:
|
return $default(_that);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
@@ -995,10 +1004,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isSubscribed, String publisherId, String publisherName)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String accountId, String publisherId, SnPublisher publisher)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnSubscriptionStatus() when $default != null:
|
case _SnPublisherSubscription() when $default != null:
|
||||||
return $default(_that.isSubscribed,_that.publisherId,_that.publisherName);case _:
|
return $default(_that.accountId,_that.publisherId,_that.publisher);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1016,10 +1025,10 @@ return $default(_that.isSubscribed,_that.publisherId,_that.publisherName);case _
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isSubscribed, String publisherId, String publisherName) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String accountId, String publisherId, SnPublisher publisher) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnSubscriptionStatus():
|
case _SnPublisherSubscription():
|
||||||
return $default(_that.isSubscribed,_that.publisherId,_that.publisherName);}
|
return $default(_that.accountId,_that.publisherId,_that.publisher);}
|
||||||
}
|
}
|
||||||
/// A variant of `when` that fallback to returning `null`
|
/// A variant of `when` that fallback to returning `null`
|
||||||
///
|
///
|
||||||
@@ -1033,10 +1042,10 @@ return $default(_that.isSubscribed,_that.publisherId,_that.publisherName);}
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isSubscribed, String publisherId, String publisherName)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String accountId, String publisherId, SnPublisher publisher)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnSubscriptionStatus() when $default != null:
|
case _SnPublisherSubscription() when $default != null:
|
||||||
return $default(_that.isSubscribed,_that.publisherId,_that.publisherName);case _:
|
return $default(_that.accountId,_that.publisherId,_that.publisher);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1047,74 +1056,83 @@ return $default(_that.isSubscribed,_that.publisherId,_that.publisherName);case _
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _SnSubscriptionStatus implements SnSubscriptionStatus {
|
class _SnPublisherSubscription implements SnPublisherSubscription {
|
||||||
const _SnSubscriptionStatus({required this.isSubscribed, required this.publisherId, required this.publisherName});
|
const _SnPublisherSubscription({required this.accountId, required this.publisherId, required this.publisher});
|
||||||
factory _SnSubscriptionStatus.fromJson(Map<String, dynamic> json) => _$SnSubscriptionStatusFromJson(json);
|
factory _SnPublisherSubscription.fromJson(Map<String, dynamic> json) => _$SnPublisherSubscriptionFromJson(json);
|
||||||
|
|
||||||
@override final bool isSubscribed;
|
@override final String accountId;
|
||||||
@override final String publisherId;
|
@override final String publisherId;
|
||||||
@override final String publisherName;
|
@override final SnPublisher publisher;
|
||||||
|
|
||||||
/// Create a copy of SnSubscriptionStatus
|
/// Create a copy of SnPublisherSubscription
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$SnSubscriptionStatusCopyWith<_SnSubscriptionStatus> get copyWith => __$SnSubscriptionStatusCopyWithImpl<_SnSubscriptionStatus>(this, _$identity);
|
_$SnPublisherSubscriptionCopyWith<_SnPublisherSubscription> get copyWith => __$SnPublisherSubscriptionCopyWithImpl<_SnPublisherSubscription>(this, _$identity);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
return _$SnSubscriptionStatusToJson(this, );
|
return _$SnPublisherSubscriptionToJson(this, );
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnSubscriptionStatus&&(identical(other.isSubscribed, isSubscribed) || other.isSubscribed == isSubscribed)&&(identical(other.publisherId, publisherId) || other.publisherId == publisherId)&&(identical(other.publisherName, publisherName) || other.publisherName == publisherName));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnPublisherSubscription&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.publisherId, publisherId) || other.publisherId == publisherId)&&(identical(other.publisher, publisher) || other.publisher == publisher));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,isSubscribed,publisherId,publisherName);
|
int get hashCode => Object.hash(runtimeType,accountId,publisherId,publisher);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnSubscriptionStatus(isSubscribed: $isSubscribed, publisherId: $publisherId, publisherName: $publisherName)';
|
return 'SnPublisherSubscription(accountId: $accountId, publisherId: $publisherId, publisher: $publisher)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
abstract mixin class _$SnSubscriptionStatusCopyWith<$Res> implements $SnSubscriptionStatusCopyWith<$Res> {
|
abstract mixin class _$SnPublisherSubscriptionCopyWith<$Res> implements $SnPublisherSubscriptionCopyWith<$Res> {
|
||||||
factory _$SnSubscriptionStatusCopyWith(_SnSubscriptionStatus value, $Res Function(_SnSubscriptionStatus) _then) = __$SnSubscriptionStatusCopyWithImpl;
|
factory _$SnPublisherSubscriptionCopyWith(_SnPublisherSubscription value, $Res Function(_SnPublisherSubscription) _then) = __$SnPublisherSubscriptionCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
bool isSubscribed, String publisherId, String publisherName
|
String accountId, String publisherId, SnPublisher publisher
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@override $SnPublisherCopyWith<$Res> get publisher;
|
||||||
|
|
||||||
}
|
}
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
class __$SnSubscriptionStatusCopyWithImpl<$Res>
|
class __$SnPublisherSubscriptionCopyWithImpl<$Res>
|
||||||
implements _$SnSubscriptionStatusCopyWith<$Res> {
|
implements _$SnPublisherSubscriptionCopyWith<$Res> {
|
||||||
__$SnSubscriptionStatusCopyWithImpl(this._self, this._then);
|
__$SnPublisherSubscriptionCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
final _SnSubscriptionStatus _self;
|
final _SnPublisherSubscription _self;
|
||||||
final $Res Function(_SnSubscriptionStatus) _then;
|
final $Res Function(_SnPublisherSubscription) _then;
|
||||||
|
|
||||||
/// Create a copy of SnSubscriptionStatus
|
/// Create a copy of SnPublisherSubscription
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? isSubscribed = null,Object? publisherId = null,Object? publisherName = null,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? accountId = null,Object? publisherId = null,Object? publisher = null,}) {
|
||||||
return _then(_SnSubscriptionStatus(
|
return _then(_SnPublisherSubscription(
|
||||||
isSubscribed: null == isSubscribed ? _self.isSubscribed : isSubscribed // ignore: cast_nullable_to_non_nullable
|
accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,publisherId: null == publisherId ? _self.publisherId : publisherId // ignore: cast_nullable_to_non_nullable
|
as String,publisherId: null == publisherId ? _self.publisherId : publisherId // ignore: cast_nullable_to_non_nullable
|
||||||
as String,publisherName: null == publisherName ? _self.publisherName : publisherName // ignore: cast_nullable_to_non_nullable
|
as String,publisher: null == publisher ? _self.publisher : publisher // ignore: cast_nullable_to_non_nullable
|
||||||
as String,
|
as SnPublisher,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of SnPublisherSubscription
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$SnPublisherCopyWith<$Res> get publisher {
|
||||||
|
|
||||||
|
return $SnPublisherCopyWith<$Res>(_self.publisher, (value) {
|
||||||
|
return _then(_self.copyWith(publisher: value));
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
|
|||||||
@@ -11,25 +11,20 @@ _SnPost _$SnPostFromJson(Map<String, dynamic> json) => _SnPost(
|
|||||||
title: json['title'] as String?,
|
title: json['title'] as String?,
|
||||||
description: json['description'] as String?,
|
description: json['description'] as String?,
|
||||||
language: json['language'] as String?,
|
language: json['language'] as String?,
|
||||||
editedAt:
|
editedAt: json['edited_at'] == null
|
||||||
json['edited_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['edited_at'] as String),
|
||||||
: DateTime.parse(json['edited_at'] as String),
|
publishedAt: json['published_at'] == null
|
||||||
publishedAt:
|
? null
|
||||||
json['published_at'] == null
|
: DateTime.parse(json['published_at'] as String),
|
||||||
? null
|
|
||||||
: DateTime.parse(json['published_at'] as String),
|
|
||||||
visibility: (json['visibility'] as num?)?.toInt() ?? 0,
|
visibility: (json['visibility'] as num?)?.toInt() ?? 0,
|
||||||
content: json['content'] as String?,
|
content: json['content'] as String?,
|
||||||
slug: json['slug'] as String?,
|
slug: json['slug'] as String?,
|
||||||
type: (json['type'] as num?)?.toInt() ?? 0,
|
type: (json['type'] as num?)?.toInt() ?? 0,
|
||||||
meta: json['meta'] as Map<String, dynamic>?,
|
meta: json['meta'] as Map<String, dynamic>?,
|
||||||
embedView:
|
embedView: json['embed_view'] == null
|
||||||
json['embed_view'] == null
|
? null
|
||||||
? null
|
: SnPostEmbedView.fromJson(json['embed_view'] as Map<String, dynamic>),
|
||||||
: SnPostEmbedView.fromJson(
|
|
||||||
json['embed_view'] as Map<String, dynamic>,
|
|
||||||
),
|
|
||||||
viewsUnique: (json['views_unique'] as num?)?.toInt() ?? 0,
|
viewsUnique: (json['views_unique'] as num?)?.toInt() ?? 0,
|
||||||
viewsTotal: (json['views_total'] as num?)?.toInt() ?? 0,
|
viewsTotal: (json['views_total'] as num?)?.toInt() ?? 0,
|
||||||
upvotes: (json['upvotes'] as num?)?.toInt() ?? 0,
|
upvotes: (json['upvotes'] as num?)?.toInt() ?? 0,
|
||||||
@@ -38,25 +33,21 @@ _SnPost _$SnPostFromJson(Map<String, dynamic> json) => _SnPost(
|
|||||||
awardedScore: (json['awarded_score'] as num?)?.toInt() ?? 0,
|
awardedScore: (json['awarded_score'] as num?)?.toInt() ?? 0,
|
||||||
pinMode: (json['pin_mode'] as num?)?.toInt(),
|
pinMode: (json['pin_mode'] as num?)?.toInt(),
|
||||||
threadedPostId: json['threaded_post_id'] as String?,
|
threadedPostId: json['threaded_post_id'] as String?,
|
||||||
threadedPost:
|
threadedPost: json['threaded_post'] == null
|
||||||
json['threaded_post'] == null
|
? null
|
||||||
? null
|
: SnPost.fromJson(json['threaded_post'] as Map<String, dynamic>),
|
||||||
: SnPost.fromJson(json['threaded_post'] as Map<String, dynamic>),
|
|
||||||
repliedPostId: json['replied_post_id'] as String?,
|
repliedPostId: json['replied_post_id'] as String?,
|
||||||
repliedPost:
|
repliedPost: json['replied_post'] == null
|
||||||
json['replied_post'] == null
|
? null
|
||||||
? null
|
: SnPost.fromJson(json['replied_post'] as Map<String, dynamic>),
|
||||||
: SnPost.fromJson(json['replied_post'] as Map<String, dynamic>),
|
|
||||||
forwardedPostId: json['forwarded_post_id'] as String?,
|
forwardedPostId: json['forwarded_post_id'] as String?,
|
||||||
forwardedPost:
|
forwardedPost: json['forwarded_post'] == null
|
||||||
json['forwarded_post'] == null
|
? null
|
||||||
? null
|
: SnPost.fromJson(json['forwarded_post'] as Map<String, dynamic>),
|
||||||
: SnPost.fromJson(json['forwarded_post'] as Map<String, dynamic>),
|
|
||||||
realmId: json['realm_id'] as String?,
|
realmId: json['realm_id'] as String?,
|
||||||
realm:
|
realm: json['realm'] == null
|
||||||
json['realm'] == null
|
? null
|
||||||
? null
|
: SnRealm.fromJson(json['realm'] as Map<String, dynamic>),
|
||||||
: SnRealm.fromJson(json['realm'] as Map<String, dynamic>),
|
|
||||||
attachments:
|
attachments:
|
||||||
(json['attachments'] as List<dynamic>?)
|
(json['attachments'] as List<dynamic>?)
|
||||||
?.map((e) => SnCloudFile.fromJson(e as Map<String, dynamic>))
|
?.map((e) => SnCloudFile.fromJson(e as Map<String, dynamic>))
|
||||||
@@ -90,18 +81,15 @@ _SnPost _$SnPostFromJson(Map<String, dynamic> json) => _SnPost(
|
|||||||
?.map((e) => SnPostFeaturedRecord.fromJson(e as Map<String, dynamic>))
|
?.map((e) => SnPostFeaturedRecord.fromJson(e as Map<String, dynamic>))
|
||||||
.toList() ??
|
.toList() ??
|
||||||
const [],
|
const [],
|
||||||
createdAt:
|
createdAt: json['created_at'] == null
|
||||||
json['created_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['created_at'] as String),
|
||||||
: DateTime.parse(json['created_at'] as String),
|
updatedAt: json['updated_at'] == null
|
||||||
updatedAt:
|
? null
|
||||||
json['updated_at'] == null
|
: DateTime.parse(json['updated_at'] as String),
|
||||||
? null
|
deletedAt: json['deleted_at'] == null
|
||||||
: DateTime.parse(json['updated_at'] as String),
|
? null
|
||||||
deletedAt:
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
json['deleted_at'] == null
|
|
||||||
? null
|
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
repliedGone: json['replied_gone'] as bool? ?? false,
|
repliedGone: json['replied_gone'] as bool? ?? false,
|
||||||
forwardedGone: json['forwarded_gone'] as bool? ?? false,
|
forwardedGone: json['forwarded_gone'] as bool? ?? false,
|
||||||
isTruncated: json['is_truncated'] as bool? ?? false,
|
isTruncated: json['is_truncated'] as bool? ?? false,
|
||||||
@@ -170,20 +158,20 @@ Map<String, dynamic> _$SnPublisherStatsToJson(_SnPublisherStats instance) =>
|
|||||||
'downvote_received': instance.downvoteReceived,
|
'downvote_received': instance.downvoteReceived,
|
||||||
};
|
};
|
||||||
|
|
||||||
_SnSubscriptionStatus _$SnSubscriptionStatusFromJson(
|
_SnPublisherSubscription _$SnPublisherSubscriptionFromJson(
|
||||||
Map<String, dynamic> json,
|
Map<String, dynamic> json,
|
||||||
) => _SnSubscriptionStatus(
|
) => _SnPublisherSubscription(
|
||||||
isSubscribed: json['is_subscribed'] as bool,
|
accountId: json['account_id'] as String,
|
||||||
publisherId: json['publisher_id'] as String,
|
publisherId: json['publisher_id'] as String,
|
||||||
publisherName: json['publisher_name'] as String,
|
publisher: SnPublisher.fromJson(json['publisher'] as Map<String, dynamic>),
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnSubscriptionStatusToJson(
|
Map<String, dynamic> _$SnPublisherSubscriptionToJson(
|
||||||
_SnSubscriptionStatus instance,
|
_SnPublisherSubscription instance,
|
||||||
) => <String, dynamic>{
|
) => <String, dynamic>{
|
||||||
'is_subscribed': instance.isSubscribed,
|
'account_id': instance.accountId,
|
||||||
'publisher_id': instance.publisherId,
|
'publisher_id': instance.publisherId,
|
||||||
'publisher_name': instance.publisherName,
|
'publisher': instance.publisher.toJson(),
|
||||||
};
|
};
|
||||||
|
|
||||||
_SnPostEmbedView _$SnPostEmbedViewFromJson(Map<String, dynamic> json) =>
|
_SnPostEmbedView _$SnPostEmbedViewFromJson(Map<String, dynamic> json) =>
|
||||||
@@ -214,18 +202,15 @@ _SnPostAward _$SnPostAwardFromJson(Map<String, dynamic> json) => _SnPostAward(
|
|||||||
message: json['message'] as String?,
|
message: json['message'] as String?,
|
||||||
postId: json['post_id'] as String,
|
postId: json['post_id'] as String,
|
||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
createdAt:
|
createdAt: json['created_at'] == null
|
||||||
json['created_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['created_at'] as String),
|
||||||
: DateTime.parse(json['created_at'] as String),
|
updatedAt: json['updated_at'] == null
|
||||||
updatedAt:
|
? null
|
||||||
json['updated_at'] == null
|
: DateTime.parse(json['updated_at'] as String),
|
||||||
? null
|
deletedAt: json['deleted_at'] == null
|
||||||
: DateTime.parse(json['updated_at'] as String),
|
? null
|
||||||
deletedAt:
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
json['deleted_at'] == null
|
|
||||||
? null
|
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnPostAwardToJson(_SnPostAward instance) =>
|
Map<String, dynamic> _$SnPostAwardToJson(_SnPostAward instance) =>
|
||||||
@@ -250,14 +235,12 @@ _SnPostReaction _$SnPostReactionFromJson(Map<String, dynamic> json) =>
|
|||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
account:
|
account: json['account'] == null
|
||||||
json['account'] == null
|
? null
|
||||||
? null
|
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
deletedAt: json['deleted_at'] == null
|
||||||
deletedAt:
|
? null
|
||||||
json['deleted_at'] == null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
? null
|
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnPostReactionToJson(_SnPostReaction instance) =>
|
Map<String, dynamic> _$SnPostReactionToJson(_SnPostReaction instance) =>
|
||||||
@@ -278,17 +261,15 @@ _SnPostFeaturedRecord _$SnPostFeaturedRecordFromJson(
|
|||||||
) => _SnPostFeaturedRecord(
|
) => _SnPostFeaturedRecord(
|
||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
postId: json['post_id'] as String,
|
postId: json['post_id'] as String,
|
||||||
featuredAt:
|
featuredAt: json['featured_at'] == null
|
||||||
json['featured_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['featured_at'] as String),
|
||||||
: DateTime.parse(json['featured_at'] as String),
|
|
||||||
socialCredits: (json['social_credits'] as num).toInt(),
|
socialCredits: (json['social_credits'] as num).toInt(),
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnPostFeaturedRecordToJson(
|
Map<String, dynamic> _$SnPostFeaturedRecordToJson(
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
import 'package:island/models/post.dart';
|
import 'package:island/models/post.dart';
|
||||||
|
import 'package:island/models/post_tag.dart';
|
||||||
import 'package:island/utils/text.dart';
|
import 'package:island/utils/text.dart';
|
||||||
|
|
||||||
part 'post_category.freezed.dart';
|
part 'post_category.freezed.dart';
|
||||||
@@ -29,3 +30,21 @@ sealed class SnPostCategory with _$SnPostCategory {
|
|||||||
return name ?? slug;
|
return name ?? slug;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
sealed class SnCategorySubscription with _$SnCategorySubscription {
|
||||||
|
const factory SnCategorySubscription({
|
||||||
|
required String id,
|
||||||
|
required String accountId,
|
||||||
|
required String? categoryId,
|
||||||
|
required SnPostCategory? category,
|
||||||
|
required String? tagId,
|
||||||
|
required SnPostTag? tag,
|
||||||
|
required DateTime createdAt,
|
||||||
|
required DateTime updatedAt,
|
||||||
|
required DateTime? deletedAt,
|
||||||
|
}) = _SnCategorySubscription;
|
||||||
|
|
||||||
|
factory SnCategorySubscription.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$SnCategorySubscriptionFromJson(json);
|
||||||
|
}
|
||||||
|
|||||||
@@ -286,4 +286,333 @@ as int,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$SnCategorySubscription {
|
||||||
|
|
||||||
|
String get id; String get accountId; String? get categoryId; SnPostCategory? get category; String? get tagId; SnPostTag? get tag; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
||||||
|
/// Create a copy of SnCategorySubscription
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$SnCategorySubscriptionCopyWith<SnCategorySubscription> get copyWith => _$SnCategorySubscriptionCopyWithImpl<SnCategorySubscription>(this as SnCategorySubscription, _$identity);
|
||||||
|
|
||||||
|
/// Serializes this SnCategorySubscription to a JSON map.
|
||||||
|
Map<String, dynamic> toJson();
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnCategorySubscription&&(identical(other.id, id) || other.id == id)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.categoryId, categoryId) || other.categoryId == categoryId)&&(identical(other.category, category) || other.category == category)&&(identical(other.tagId, tagId) || other.tagId == tagId)&&(identical(other.tag, tag) || other.tag == tag)&&(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,accountId,categoryId,category,tagId,tag,createdAt,updatedAt,deletedAt);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'SnCategorySubscription(id: $id, accountId: $accountId, categoryId: $categoryId, category: $category, tagId: $tagId, tag: $tag, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $SnCategorySubscriptionCopyWith<$Res> {
|
||||||
|
factory $SnCategorySubscriptionCopyWith(SnCategorySubscription value, $Res Function(SnCategorySubscription) _then) = _$SnCategorySubscriptionCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
String id, String accountId, String? categoryId, SnPostCategory? category, String? tagId, SnPostTag? tag, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$SnPostCategoryCopyWith<$Res>? get category;$SnPostTagCopyWith<$Res>? get tag;
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$SnCategorySubscriptionCopyWithImpl<$Res>
|
||||||
|
implements $SnCategorySubscriptionCopyWith<$Res> {
|
||||||
|
_$SnCategorySubscriptionCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final SnCategorySubscription _self;
|
||||||
|
final $Res Function(SnCategorySubscription) _then;
|
||||||
|
|
||||||
|
/// Create a copy of SnCategorySubscription
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? accountId = null,Object? categoryId = freezed,Object? category = freezed,Object? tagId = freezed,Object? tag = 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,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,categoryId: freezed == categoryId ? _self.categoryId : categoryId // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,category: freezed == category ? _self.category : category // ignore: cast_nullable_to_non_nullable
|
||||||
|
as SnPostCategory?,tagId: freezed == tagId ? _self.tagId : tagId // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,tag: freezed == tag ? _self.tag : tag // ignore: cast_nullable_to_non_nullable
|
||||||
|
as SnPostTag?,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?,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
/// Create a copy of SnCategorySubscription
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$SnPostCategoryCopyWith<$Res>? get category {
|
||||||
|
if (_self.category == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $SnPostCategoryCopyWith<$Res>(_self.category!, (value) {
|
||||||
|
return _then(_self.copyWith(category: value));
|
||||||
|
});
|
||||||
|
}/// Create a copy of SnCategorySubscription
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$SnPostTagCopyWith<$Res>? get tag {
|
||||||
|
if (_self.tag == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $SnPostTagCopyWith<$Res>(_self.tag!, (value) {
|
||||||
|
return _then(_self.copyWith(tag: value));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [SnCategorySubscription].
|
||||||
|
extension SnCategorySubscriptionPatterns on SnCategorySubscription {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnCategorySubscription value)? $default,{required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnCategorySubscription() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnCategorySubscription value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnCategorySubscription():
|
||||||
|
return $default(_that);}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnCategorySubscription value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnCategorySubscription() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String accountId, String? categoryId, SnPostCategory? category, String? tagId, SnPostTag? tag, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnCategorySubscription() when $default != null:
|
||||||
|
return $default(_that.id,_that.accountId,_that.categoryId,_that.category,_that.tagId,_that.tag,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String accountId, String? categoryId, SnPostCategory? category, String? tagId, SnPostTag? tag, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnCategorySubscription():
|
||||||
|
return $default(_that.id,_that.accountId,_that.categoryId,_that.category,_that.tagId,_that.tag,_that.createdAt,_that.updatedAt,_that.deletedAt);}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String accountId, String? categoryId, SnPostCategory? category, String? tagId, SnPostTag? tag, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnCategorySubscription() when $default != null:
|
||||||
|
return $default(_that.id,_that.accountId,_that.categoryId,_that.category,_that.tagId,_that.tag,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
@JsonSerializable()
|
||||||
|
|
||||||
|
class _SnCategorySubscription implements SnCategorySubscription {
|
||||||
|
const _SnCategorySubscription({required this.id, required this.accountId, required this.categoryId, required this.category, required this.tagId, required this.tag, required this.createdAt, required this.updatedAt, required this.deletedAt});
|
||||||
|
factory _SnCategorySubscription.fromJson(Map<String, dynamic> json) => _$SnCategorySubscriptionFromJson(json);
|
||||||
|
|
||||||
|
@override final String id;
|
||||||
|
@override final String accountId;
|
||||||
|
@override final String? categoryId;
|
||||||
|
@override final SnPostCategory? category;
|
||||||
|
@override final String? tagId;
|
||||||
|
@override final SnPostTag? tag;
|
||||||
|
@override final DateTime createdAt;
|
||||||
|
@override final DateTime updatedAt;
|
||||||
|
@override final DateTime? deletedAt;
|
||||||
|
|
||||||
|
/// Create a copy of SnCategorySubscription
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$SnCategorySubscriptionCopyWith<_SnCategorySubscription> get copyWith => __$SnCategorySubscriptionCopyWithImpl<_SnCategorySubscription>(this, _$identity);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
return _$SnCategorySubscriptionToJson(this, );
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnCategorySubscription&&(identical(other.id, id) || other.id == id)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.categoryId, categoryId) || other.categoryId == categoryId)&&(identical(other.category, category) || other.category == category)&&(identical(other.tagId, tagId) || other.tagId == tagId)&&(identical(other.tag, tag) || other.tag == tag)&&(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,accountId,categoryId,category,tagId,tag,createdAt,updatedAt,deletedAt);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'SnCategorySubscription(id: $id, accountId: $accountId, categoryId: $categoryId, category: $category, tagId: $tagId, tag: $tag, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$SnCategorySubscriptionCopyWith<$Res> implements $SnCategorySubscriptionCopyWith<$Res> {
|
||||||
|
factory _$SnCategorySubscriptionCopyWith(_SnCategorySubscription value, $Res Function(_SnCategorySubscription) _then) = __$SnCategorySubscriptionCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
String id, String accountId, String? categoryId, SnPostCategory? category, String? tagId, SnPostTag? tag, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@override $SnPostCategoryCopyWith<$Res>? get category;@override $SnPostTagCopyWith<$Res>? get tag;
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$SnCategorySubscriptionCopyWithImpl<$Res>
|
||||||
|
implements _$SnCategorySubscriptionCopyWith<$Res> {
|
||||||
|
__$SnCategorySubscriptionCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _SnCategorySubscription _self;
|
||||||
|
final $Res Function(_SnCategorySubscription) _then;
|
||||||
|
|
||||||
|
/// Create a copy of SnCategorySubscription
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? accountId = null,Object? categoryId = freezed,Object? category = freezed,Object? tagId = freezed,Object? tag = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||||
|
return _then(_SnCategorySubscription(
|
||||||
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,categoryId: freezed == categoryId ? _self.categoryId : categoryId // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,category: freezed == category ? _self.category : category // ignore: cast_nullable_to_non_nullable
|
||||||
|
as SnPostCategory?,tagId: freezed == tagId ? _self.tagId : tagId // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,tag: freezed == tag ? _self.tag : tag // ignore: cast_nullable_to_non_nullable
|
||||||
|
as SnPostTag?,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?,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Create a copy of SnCategorySubscription
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$SnPostCategoryCopyWith<$Res>? get category {
|
||||||
|
if (_self.category == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $SnPostCategoryCopyWith<$Res>(_self.category!, (value) {
|
||||||
|
return _then(_self.copyWith(category: value));
|
||||||
|
});
|
||||||
|
}/// Create a copy of SnCategorySubscription
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$SnPostTagCopyWith<$Res>? get tag {
|
||||||
|
if (_self.tag == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $SnPostTagCopyWith<$Res>(_self.tag!, (value) {
|
||||||
|
return _then(_self.copyWith(tag: value));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// dart format on
|
// dart format on
|
||||||
|
|||||||
@@ -27,3 +27,37 @@ Map<String, dynamic> _$SnPostCategoryToJson(_SnPostCategory instance) =>
|
|||||||
'posts': instance.posts.map((e) => e.toJson()).toList(),
|
'posts': instance.posts.map((e) => e.toJson()).toList(),
|
||||||
'usage': instance.usage,
|
'usage': instance.usage,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_SnCategorySubscription _$SnCategorySubscriptionFromJson(
|
||||||
|
Map<String, dynamic> json,
|
||||||
|
) => _SnCategorySubscription(
|
||||||
|
id: json['id'] as String,
|
||||||
|
accountId: json['account_id'] as String,
|
||||||
|
categoryId: json['category_id'] as String?,
|
||||||
|
category: json['category'] == null
|
||||||
|
? null
|
||||||
|
: SnPostCategory.fromJson(json['category'] as Map<String, dynamic>),
|
||||||
|
tagId: json['tag_id'] as String?,
|
||||||
|
tag: json['tag'] == null
|
||||||
|
? null
|
||||||
|
: SnPostTag.fromJson(json['tag'] as Map<String, dynamic>),
|
||||||
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
|
deletedAt: json['deleted_at'] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$SnCategorySubscriptionToJson(
|
||||||
|
_SnCategorySubscription instance,
|
||||||
|
) => <String, dynamic>{
|
||||||
|
'id': instance.id,
|
||||||
|
'account_id': instance.accountId,
|
||||||
|
'category_id': instance.categoryId,
|
||||||
|
'category': instance.category?.toJson(),
|
||||||
|
'tag_id': instance.tagId,
|
||||||
|
'tag': instance.tag?.toJson(),
|
||||||
|
'created_at': instance.createdAt.toIso8601String(),
|
||||||
|
'updated_at': instance.updatedAt.toIso8601String(),
|
||||||
|
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||||
|
};
|
||||||
|
|||||||
64
lib/models/publication_site.dart
Normal file
64
lib/models/publication_site.dart
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
|
|
||||||
|
part 'publication_site.freezed.dart';
|
||||||
|
part 'publication_site.g.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
sealed class SnPublicationSiteNavItems with _$SnPublicationSiteNavItems {
|
||||||
|
const factory SnPublicationSiteNavItems({
|
||||||
|
required String label,
|
||||||
|
required String href,
|
||||||
|
}) = _SnPublicationSiteNavItems;
|
||||||
|
|
||||||
|
factory SnPublicationSiteNavItems.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$SnPublicationSiteNavItemsFromJson(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
sealed class SnPublicationSiteConfig with _$SnPublicationSiteConfig {
|
||||||
|
const factory SnPublicationSiteConfig({
|
||||||
|
String? styleOverride,
|
||||||
|
List<SnPublicationSiteNavItems>? navItems,
|
||||||
|
}) = _SnPublicationSiteConfig;
|
||||||
|
|
||||||
|
factory SnPublicationSiteConfig.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$SnPublicationSiteConfigFromJson(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
sealed class SnPublicationSite with _$SnPublicationSite {
|
||||||
|
const factory SnPublicationSite({
|
||||||
|
required String id,
|
||||||
|
required String slug,
|
||||||
|
required String name,
|
||||||
|
String? description,
|
||||||
|
int? mode,
|
||||||
|
required String publisherId,
|
||||||
|
required String accountId,
|
||||||
|
required DateTime createdAt,
|
||||||
|
required DateTime updatedAt,
|
||||||
|
required List<SnPublicationPage> pages,
|
||||||
|
required SnPublicationSiteConfig config,
|
||||||
|
}) = _SnPublicationSite;
|
||||||
|
|
||||||
|
factory SnPublicationSite.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$SnPublicationSiteFromJson(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
sealed class SnPublicationPage with _$SnPublicationPage {
|
||||||
|
const factory SnPublicationPage({
|
||||||
|
required String id,
|
||||||
|
String? preset,
|
||||||
|
String? path,
|
||||||
|
Map<String, dynamic>? config,
|
||||||
|
required String siteId,
|
||||||
|
required DateTime createdAt,
|
||||||
|
required DateTime updatedAt,
|
||||||
|
}) = _SnPublicationPage;
|
||||||
|
|
||||||
|
factory SnPublicationPage.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$SnPublicationPageFromJson(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
enum PublicationPagePreset { landing, profile, posts, custom }
|
||||||
1136
lib/models/publication_site.freezed.dart
Normal file
1136
lib/models/publication_site.freezed.dart
Normal file
File diff suppressed because it is too large
Load Diff
92
lib/models/publication_site.g.dart
Normal file
92
lib/models/publication_site.g.dart
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'publication_site.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// JsonSerializableGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
_SnPublicationSiteNavItems _$SnPublicationSiteNavItemsFromJson(
|
||||||
|
Map<String, dynamic> json,
|
||||||
|
) => _SnPublicationSiteNavItems(
|
||||||
|
label: json['label'] as String,
|
||||||
|
href: json['href'] as String,
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$SnPublicationSiteNavItemsToJson(
|
||||||
|
_SnPublicationSiteNavItems instance,
|
||||||
|
) => <String, dynamic>{'label': instance.label, 'href': instance.href};
|
||||||
|
|
||||||
|
_SnPublicationSiteConfig _$SnPublicationSiteConfigFromJson(
|
||||||
|
Map<String, dynamic> json,
|
||||||
|
) => _SnPublicationSiteConfig(
|
||||||
|
styleOverride: json['style_override'] as String?,
|
||||||
|
navItems: (json['nav_items'] as List<dynamic>?)
|
||||||
|
?.map(
|
||||||
|
(e) => SnPublicationSiteNavItems.fromJson(e as Map<String, dynamic>),
|
||||||
|
)
|
||||||
|
.toList(),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$SnPublicationSiteConfigToJson(
|
||||||
|
_SnPublicationSiteConfig instance,
|
||||||
|
) => <String, dynamic>{
|
||||||
|
'style_override': instance.styleOverride,
|
||||||
|
'nav_items': instance.navItems?.map((e) => e.toJson()).toList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
_SnPublicationSite _$SnPublicationSiteFromJson(Map<String, dynamic> json) =>
|
||||||
|
_SnPublicationSite(
|
||||||
|
id: json['id'] as String,
|
||||||
|
slug: json['slug'] as String,
|
||||||
|
name: json['name'] as String,
|
||||||
|
description: json['description'] as String?,
|
||||||
|
mode: (json['mode'] as num?)?.toInt(),
|
||||||
|
publisherId: json['publisher_id'] as String,
|
||||||
|
accountId: json['account_id'] as String,
|
||||||
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
|
pages: (json['pages'] as List<dynamic>)
|
||||||
|
.map((e) => SnPublicationPage.fromJson(e as Map<String, dynamic>))
|
||||||
|
.toList(),
|
||||||
|
config: SnPublicationSiteConfig.fromJson(
|
||||||
|
json['config'] as Map<String, dynamic>,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$SnPublicationSiteToJson(_SnPublicationSite instance) =>
|
||||||
|
<String, dynamic>{
|
||||||
|
'id': instance.id,
|
||||||
|
'slug': instance.slug,
|
||||||
|
'name': instance.name,
|
||||||
|
'description': instance.description,
|
||||||
|
'mode': instance.mode,
|
||||||
|
'publisher_id': instance.publisherId,
|
||||||
|
'account_id': instance.accountId,
|
||||||
|
'created_at': instance.createdAt.toIso8601String(),
|
||||||
|
'updated_at': instance.updatedAt.toIso8601String(),
|
||||||
|
'pages': instance.pages.map((e) => e.toJson()).toList(),
|
||||||
|
'config': instance.config.toJson(),
|
||||||
|
};
|
||||||
|
|
||||||
|
_SnPublicationPage _$SnPublicationPageFromJson(Map<String, dynamic> json) =>
|
||||||
|
_SnPublicationPage(
|
||||||
|
id: json['id'] as String,
|
||||||
|
preset: json['preset'] as String?,
|
||||||
|
path: json['path'] as String?,
|
||||||
|
config: json['config'] as Map<String, dynamic>?,
|
||||||
|
siteId: json['site_id'] as String,
|
||||||
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$SnPublicationPageToJson(_SnPublicationPage instance) =>
|
||||||
|
<String, dynamic>{
|
||||||
|
'id': instance.id,
|
||||||
|
'preset': instance.preset,
|
||||||
|
'path': instance.path,
|
||||||
|
'config': instance.config,
|
||||||
|
'site_id': instance.siteId,
|
||||||
|
'created_at': instance.createdAt.toIso8601String(),
|
||||||
|
'updated_at': instance.updatedAt.toIso8601String(),
|
||||||
|
};
|
||||||
@@ -12,38 +12,31 @@ _SnPublisher _$SnPublisherFromJson(Map<String, dynamic> json) => _SnPublisher(
|
|||||||
name: json['name'] as String? ?? '',
|
name: json['name'] as String? ?? '',
|
||||||
nick: json['nick'] as String? ?? '',
|
nick: json['nick'] as String? ?? '',
|
||||||
bio: json['bio'] as String? ?? '',
|
bio: json['bio'] as String? ?? '',
|
||||||
picture:
|
picture: json['picture'] == null
|
||||||
json['picture'] == null
|
? null
|
||||||
? null
|
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
||||||
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
background: json['background'] == null
|
||||||
background:
|
? null
|
||||||
json['background'] == null
|
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
||||||
? null
|
account: json['account'] == null
|
||||||
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
? null
|
||||||
account:
|
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||||
json['account'] == null
|
|
||||||
? null
|
|
||||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
|
||||||
accountId: json['account_id'] as String?,
|
accountId: json['account_id'] as String?,
|
||||||
createdAt:
|
createdAt: json['created_at'] == null
|
||||||
json['created_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['created_at'] as String),
|
||||||
: DateTime.parse(json['created_at'] as String),
|
updatedAt: json['updated_at'] == null
|
||||||
updatedAt:
|
? null
|
||||||
json['updated_at'] == null
|
: DateTime.parse(json['updated_at'] as String),
|
||||||
? null
|
deletedAt: json['deleted_at'] == null
|
||||||
: DateTime.parse(json['updated_at'] as String),
|
? null
|
||||||
deletedAt:
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
json['deleted_at'] == null
|
|
||||||
? null
|
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
realmId: json['realm_id'] as String?,
|
realmId: json['realm_id'] as String?,
|
||||||
verification:
|
verification: json['verification'] == null
|
||||||
json['verification'] == null
|
? null
|
||||||
? null
|
: SnVerificationMark.fromJson(
|
||||||
: SnVerificationMark.fromJson(
|
json['verification'] as Map<String, dynamic>,
|
||||||
json['verification'] as Map<String, dynamic>,
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnPublisherToJson(_SnPublisher instance) =>
|
Map<String, dynamic> _$SnPublisherToJson(_SnPublisher instance) =>
|
||||||
@@ -67,26 +60,22 @@ Map<String, dynamic> _$SnPublisherToJson(_SnPublisher instance) =>
|
|||||||
_SnPublisherMember _$SnPublisherMemberFromJson(Map<String, dynamic> json) =>
|
_SnPublisherMember _$SnPublisherMemberFromJson(Map<String, dynamic> json) =>
|
||||||
_SnPublisherMember(
|
_SnPublisherMember(
|
||||||
publisherId: json['publisher_id'] as String,
|
publisherId: json['publisher_id'] as String,
|
||||||
publisher:
|
publisher: json['publisher'] == null
|
||||||
json['publisher'] == null
|
? null
|
||||||
? null
|
: SnPublisher.fromJson(json['publisher'] as Map<String, dynamic>),
|
||||||
: SnPublisher.fromJson(json['publisher'] as Map<String, dynamic>),
|
|
||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
account:
|
account: json['account'] == null
|
||||||
json['account'] == null
|
? null
|
||||||
? null
|
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
|
||||||
role: (json['role'] as num).toInt(),
|
role: (json['role'] as num).toInt(),
|
||||||
joinedAt:
|
joinedAt: json['joined_at'] == null
|
||||||
json['joined_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['joined_at'] as String),
|
||||||
: DateTime.parse(json['joined_at'] as String),
|
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnPublisherMemberToJson(_SnPublisherMember instance) =>
|
Map<String, dynamic> _$SnPublisherMemberToJson(_SnPublisherMember instance) =>
|
||||||
|
|||||||
@@ -12,27 +12,23 @@ _SnRealm _$SnRealmFromJson(Map<String, dynamic> json) => _SnRealm(
|
|||||||
name: json['name'] as String? ?? '',
|
name: json['name'] as String? ?? '',
|
||||||
description: json['description'] as String? ?? '',
|
description: json['description'] as String? ?? '',
|
||||||
verifiedAs: json['verified_as'] as String?,
|
verifiedAs: json['verified_as'] as String?,
|
||||||
verifiedAt:
|
verifiedAt: json['verified_at'] == null
|
||||||
json['verified_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['verified_at'] as String),
|
||||||
: DateTime.parse(json['verified_at'] as String),
|
|
||||||
isCommunity: json['is_community'] as bool,
|
isCommunity: json['is_community'] as bool,
|
||||||
isPublic: json['is_public'] as bool,
|
isPublic: json['is_public'] as bool,
|
||||||
picture:
|
picture: json['picture'] == null
|
||||||
json['picture'] == null
|
? null
|
||||||
? null
|
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
||||||
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
background: json['background'] == null
|
||||||
background:
|
? null
|
||||||
json['background'] == null
|
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
||||||
? null
|
|
||||||
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
|
||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnRealmToJson(_SnRealm instance) => <String, dynamic>{
|
Map<String, dynamic> _$SnRealmToJson(_SnRealm instance) => <String, dynamic>{
|
||||||
@@ -55,32 +51,25 @@ Map<String, dynamic> _$SnRealmToJson(_SnRealm instance) => <String, dynamic>{
|
|||||||
_SnRealmMember _$SnRealmMemberFromJson(Map<String, dynamic> json) =>
|
_SnRealmMember _$SnRealmMemberFromJson(Map<String, dynamic> json) =>
|
||||||
_SnRealmMember(
|
_SnRealmMember(
|
||||||
realmId: json['realm_id'] as String,
|
realmId: json['realm_id'] as String,
|
||||||
realm:
|
realm: json['realm'] == null
|
||||||
json['realm'] == null
|
? null
|
||||||
? null
|
: SnRealm.fromJson(json['realm'] as Map<String, dynamic>),
|
||||||
: SnRealm.fromJson(json['realm'] as Map<String, dynamic>),
|
|
||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
account:
|
account: json['account'] == null
|
||||||
json['account'] == null
|
? null
|
||||||
? null
|
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
|
||||||
role: (json['role'] as num).toInt(),
|
role: (json['role'] as num).toInt(),
|
||||||
joinedAt:
|
joinedAt: json['joined_at'] == null
|
||||||
json['joined_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['joined_at'] as String),
|
||||||
: DateTime.parse(json['joined_at'] as String),
|
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
status: json['status'] == null
|
||||||
status:
|
? null
|
||||||
json['status'] == null
|
: SnAccountStatus.fromJson(json['status'] as Map<String, dynamic>),
|
||||||
? null
|
|
||||||
: SnAccountStatus.fromJson(
|
|
||||||
json['status'] as Map<String, dynamic>,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnRealmMemberToJson(_SnRealmMember instance) =>
|
Map<String, dynamic> _$SnRealmMemberToJson(_SnRealmMember instance) =>
|
||||||
|
|||||||
23
lib/models/reference.dart
Normal file
23
lib/models/reference.dart
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
|
import 'package:island/models/file.dart';
|
||||||
|
|
||||||
|
part 'reference.freezed.dart';
|
||||||
|
part 'reference.g.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
sealed class Reference with _$Reference {
|
||||||
|
const factory Reference({
|
||||||
|
required String id,
|
||||||
|
@JsonKey(name: 'file_id') required String fileId,
|
||||||
|
SnCloudFile? file,
|
||||||
|
required String usage,
|
||||||
|
@JsonKey(name: 'resource_id') required String resourceId,
|
||||||
|
@JsonKey(name: 'expired_at') DateTime? expiredAt,
|
||||||
|
@JsonKey(name: 'created_at') required DateTime createdAt,
|
||||||
|
@JsonKey(name: 'updated_at') required DateTime updatedAt,
|
||||||
|
@JsonKey(name: 'deleted_at') DateTime? deletedAt,
|
||||||
|
}) = _Reference;
|
||||||
|
|
||||||
|
factory Reference.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$ReferenceFromJson(json);
|
||||||
|
}
|
||||||
319
lib/models/reference.freezed.dart
Normal file
319
lib/models/reference.freezed.dart
Normal file
@@ -0,0 +1,319 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// coverage:ignore-file
|
||||||
|
// 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 'reference.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// FreezedGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// dart format off
|
||||||
|
T _$identity<T>(T value) => value;
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$Reference {
|
||||||
|
|
||||||
|
String get id;@JsonKey(name: 'file_id') String get fileId; SnCloudFile? get file; String get usage;@JsonKey(name: 'resource_id') String get resourceId;@JsonKey(name: 'expired_at') DateTime? get expiredAt;@JsonKey(name: 'created_at') DateTime get createdAt;@JsonKey(name: 'updated_at') DateTime get updatedAt;@JsonKey(name: 'deleted_at') DateTime? get deletedAt;
|
||||||
|
/// Create a copy of Reference
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$ReferenceCopyWith<Reference> get copyWith => _$ReferenceCopyWithImpl<Reference>(this as Reference, _$identity);
|
||||||
|
|
||||||
|
/// Serializes this Reference to a JSON map.
|
||||||
|
Map<String, dynamic> toJson();
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is Reference&&(identical(other.id, id) || other.id == id)&&(identical(other.fileId, fileId) || other.fileId == fileId)&&(identical(other.file, file) || other.file == file)&&(identical(other.usage, usage) || other.usage == usage)&&(identical(other.resourceId, resourceId) || other.resourceId == resourceId)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(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,fileId,file,usage,resourceId,expiredAt,createdAt,updatedAt,deletedAt);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'Reference(id: $id, fileId: $fileId, file: $file, usage: $usage, resourceId: $resourceId, expiredAt: $expiredAt, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $ReferenceCopyWith<$Res> {
|
||||||
|
factory $ReferenceCopyWith(Reference value, $Res Function(Reference) _then) = _$ReferenceCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
String id,@JsonKey(name: 'file_id') String fileId, SnCloudFile? file, String usage,@JsonKey(name: 'resource_id') String resourceId,@JsonKey(name: 'expired_at') DateTime? expiredAt,@JsonKey(name: 'created_at') DateTime createdAt,@JsonKey(name: 'updated_at') DateTime updatedAt,@JsonKey(name: 'deleted_at') DateTime? deletedAt
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$SnCloudFileCopyWith<$Res>? get file;
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$ReferenceCopyWithImpl<$Res>
|
||||||
|
implements $ReferenceCopyWith<$Res> {
|
||||||
|
_$ReferenceCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final Reference _self;
|
||||||
|
final $Res Function(Reference) _then;
|
||||||
|
|
||||||
|
/// Create a copy of Reference
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? fileId = null,Object? file = freezed,Object? usage = null,Object? resourceId = null,Object? expiredAt = 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,fileId: null == fileId ? _self.fileId : fileId // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,file: freezed == file ? _self.file : file // ignore: cast_nullable_to_non_nullable
|
||||||
|
as SnCloudFile?,usage: null == usage ? _self.usage : usage // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,resourceId: null == resourceId ? _self.resourceId : resourceId // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
||||||
|
as DateTime?,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?,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
/// Create a copy of Reference
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$SnCloudFileCopyWith<$Res>? get file {
|
||||||
|
if (_self.file == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $SnCloudFileCopyWith<$Res>(_self.file!, (value) {
|
||||||
|
return _then(_self.copyWith(file: value));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [Reference].
|
||||||
|
extension ReferencePatterns on Reference {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Reference value)? $default,{required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Reference() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Reference value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Reference():
|
||||||
|
return $default(_that);}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Reference value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Reference() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, @JsonKey(name: 'file_id') String fileId, SnCloudFile? file, String usage, @JsonKey(name: 'resource_id') String resourceId, @JsonKey(name: 'expired_at') DateTime? expiredAt, @JsonKey(name: 'created_at') DateTime createdAt, @JsonKey(name: 'updated_at') DateTime updatedAt, @JsonKey(name: 'deleted_at') DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Reference() when $default != null:
|
||||||
|
return $default(_that.id,_that.fileId,_that.file,_that.usage,_that.resourceId,_that.expiredAt,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, @JsonKey(name: 'file_id') String fileId, SnCloudFile? file, String usage, @JsonKey(name: 'resource_id') String resourceId, @JsonKey(name: 'expired_at') DateTime? expiredAt, @JsonKey(name: 'created_at') DateTime createdAt, @JsonKey(name: 'updated_at') DateTime updatedAt, @JsonKey(name: 'deleted_at') DateTime? deletedAt) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Reference():
|
||||||
|
return $default(_that.id,_that.fileId,_that.file,_that.usage,_that.resourceId,_that.expiredAt,_that.createdAt,_that.updatedAt,_that.deletedAt);}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, @JsonKey(name: 'file_id') String fileId, SnCloudFile? file, String usage, @JsonKey(name: 'resource_id') String resourceId, @JsonKey(name: 'expired_at') DateTime? expiredAt, @JsonKey(name: 'created_at') DateTime createdAt, @JsonKey(name: 'updated_at') DateTime updatedAt, @JsonKey(name: 'deleted_at') DateTime? deletedAt)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _Reference() when $default != null:
|
||||||
|
return $default(_that.id,_that.fileId,_that.file,_that.usage,_that.resourceId,_that.expiredAt,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
@JsonSerializable()
|
||||||
|
|
||||||
|
class _Reference implements Reference {
|
||||||
|
const _Reference({required this.id, @JsonKey(name: 'file_id') required this.fileId, this.file, required this.usage, @JsonKey(name: 'resource_id') required this.resourceId, @JsonKey(name: 'expired_at') this.expiredAt, @JsonKey(name: 'created_at') required this.createdAt, @JsonKey(name: 'updated_at') required this.updatedAt, @JsonKey(name: 'deleted_at') this.deletedAt});
|
||||||
|
factory _Reference.fromJson(Map<String, dynamic> json) => _$ReferenceFromJson(json);
|
||||||
|
|
||||||
|
@override final String id;
|
||||||
|
@override@JsonKey(name: 'file_id') final String fileId;
|
||||||
|
@override final SnCloudFile? file;
|
||||||
|
@override final String usage;
|
||||||
|
@override@JsonKey(name: 'resource_id') final String resourceId;
|
||||||
|
@override@JsonKey(name: 'expired_at') final DateTime? expiredAt;
|
||||||
|
@override@JsonKey(name: 'created_at') final DateTime createdAt;
|
||||||
|
@override@JsonKey(name: 'updated_at') final DateTime updatedAt;
|
||||||
|
@override@JsonKey(name: 'deleted_at') final DateTime? deletedAt;
|
||||||
|
|
||||||
|
/// Create a copy of Reference
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$ReferenceCopyWith<_Reference> get copyWith => __$ReferenceCopyWithImpl<_Reference>(this, _$identity);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
return _$ReferenceToJson(this, );
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Reference&&(identical(other.id, id) || other.id == id)&&(identical(other.fileId, fileId) || other.fileId == fileId)&&(identical(other.file, file) || other.file == file)&&(identical(other.usage, usage) || other.usage == usage)&&(identical(other.resourceId, resourceId) || other.resourceId == resourceId)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(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,fileId,file,usage,resourceId,expiredAt,createdAt,updatedAt,deletedAt);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'Reference(id: $id, fileId: $fileId, file: $file, usage: $usage, resourceId: $resourceId, expiredAt: $expiredAt, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$ReferenceCopyWith<$Res> implements $ReferenceCopyWith<$Res> {
|
||||||
|
factory _$ReferenceCopyWith(_Reference value, $Res Function(_Reference) _then) = __$ReferenceCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
String id,@JsonKey(name: 'file_id') String fileId, SnCloudFile? file, String usage,@JsonKey(name: 'resource_id') String resourceId,@JsonKey(name: 'expired_at') DateTime? expiredAt,@JsonKey(name: 'created_at') DateTime createdAt,@JsonKey(name: 'updated_at') DateTime updatedAt,@JsonKey(name: 'deleted_at') DateTime? deletedAt
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@override $SnCloudFileCopyWith<$Res>? get file;
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$ReferenceCopyWithImpl<$Res>
|
||||||
|
implements _$ReferenceCopyWith<$Res> {
|
||||||
|
__$ReferenceCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _Reference _self;
|
||||||
|
final $Res Function(_Reference) _then;
|
||||||
|
|
||||||
|
/// Create a copy of Reference
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? fileId = null,Object? file = freezed,Object? usage = null,Object? resourceId = null,Object? expiredAt = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||||
|
return _then(_Reference(
|
||||||
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,fileId: null == fileId ? _self.fileId : fileId // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,file: freezed == file ? _self.file : file // ignore: cast_nullable_to_non_nullable
|
||||||
|
as SnCloudFile?,usage: null == usage ? _self.usage : usage // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,resourceId: null == resourceId ? _self.resourceId : resourceId // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
||||||
|
as DateTime?,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?,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Create a copy of Reference
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$SnCloudFileCopyWith<$Res>? get file {
|
||||||
|
if (_self.file == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $SnCloudFileCopyWith<$Res>(_self.file!, (value) {
|
||||||
|
return _then(_self.copyWith(file: value));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// dart format on
|
||||||
38
lib/models/reference.g.dart
Normal file
38
lib/models/reference.g.dart
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'reference.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// JsonSerializableGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
_Reference _$ReferenceFromJson(Map<String, dynamic> json) => _Reference(
|
||||||
|
id: json['id'] as String,
|
||||||
|
fileId: json['file_id'] as String,
|
||||||
|
file: json['file'] == null
|
||||||
|
? null
|
||||||
|
: SnCloudFile.fromJson(json['file'] as Map<String, dynamic>),
|
||||||
|
usage: json['usage'] as String,
|
||||||
|
resourceId: json['resource_id'] as String,
|
||||||
|
expiredAt: json['expired_at'] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json['expired_at'] as String),
|
||||||
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
|
deletedAt: json['deleted_at'] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$ReferenceToJson(_Reference instance) =>
|
||||||
|
<String, dynamic>{
|
||||||
|
'id': instance.id,
|
||||||
|
'file_id': instance.fileId,
|
||||||
|
'file': instance.file?.toJson(),
|
||||||
|
'usage': instance.usage,
|
||||||
|
'resource_id': instance.resourceId,
|
||||||
|
'expired_at': instance.expiredAt?.toIso8601String(),
|
||||||
|
'created_at': instance.createdAt.toIso8601String(),
|
||||||
|
'updated_at': instance.updatedAt.toIso8601String(),
|
||||||
|
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||||
|
};
|
||||||
@@ -8,26 +8,22 @@ part of 'relationship.dart';
|
|||||||
|
|
||||||
_SnRelationship _$SnRelationshipFromJson(Map<String, dynamic> json) =>
|
_SnRelationship _$SnRelationshipFromJson(Map<String, dynamic> json) =>
|
||||||
_SnRelationship(
|
_SnRelationship(
|
||||||
createdAt:
|
createdAt: json['created_at'] == null
|
||||||
json['created_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['created_at'] as String),
|
||||||
: DateTime.parse(json['created_at'] as String),
|
updatedAt: json['updated_at'] == null
|
||||||
updatedAt:
|
? null
|
||||||
json['updated_at'] == null
|
: DateTime.parse(json['updated_at'] as String),
|
||||||
? null
|
deletedAt: json['deleted_at'] == null
|
||||||
: DateTime.parse(json['updated_at'] as String),
|
? null
|
||||||
deletedAt:
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
json['deleted_at'] == null
|
|
||||||
? null
|
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
account: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
account: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||||
relatedId: json['related_id'] as String,
|
relatedId: json['related_id'] as String,
|
||||||
related: SnAccount.fromJson(json['related'] as Map<String, dynamic>),
|
related: SnAccount.fromJson(json['related'] as Map<String, dynamic>),
|
||||||
expiredAt:
|
expiredAt: json['expired_at'] == null
|
||||||
json['expired_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['expired_at'] as String),
|
||||||
: DateTime.parse(json['expired_at'] as String),
|
|
||||||
status: (json['status'] as num).toInt(),
|
status: (json['status'] as num).toInt(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
231
lib/models/route_item.dart
Normal file
231
lib/models/route_item.dart
Normal file
@@ -0,0 +1,231 @@
|
|||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
|
import 'package:material_symbols_icons/symbols.dart';
|
||||||
|
|
||||||
|
part 'route_item.freezed.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
sealed class RouteItem with _$RouteItem {
|
||||||
|
const factory RouteItem({
|
||||||
|
required String name,
|
||||||
|
required String path,
|
||||||
|
required String description,
|
||||||
|
@Default([]) List<String> searchableAliases,
|
||||||
|
required IconData icon,
|
||||||
|
}) = _RouteItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
final List<RouteItem> kAvailableRoutes = [
|
||||||
|
RouteItem(
|
||||||
|
name: 'dashboard'.tr(),
|
||||||
|
path: '/',
|
||||||
|
description: 'dashboardDescription'.tr(),
|
||||||
|
searchableAliases: ['dashboard', 'home'],
|
||||||
|
icon: Symbols.home,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'explore'.tr(),
|
||||||
|
path: '/explore',
|
||||||
|
description: 'exploreDescription'.tr(),
|
||||||
|
searchableAliases: ['explore', 'discover'],
|
||||||
|
icon: Symbols.explore,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'searchPosts'.tr(),
|
||||||
|
path: '/posts/search',
|
||||||
|
description: 'searchPostsDescription'.tr(),
|
||||||
|
searchableAliases: ['search', 'posts'],
|
||||||
|
icon: Symbols.search,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'postShuffle'.tr(),
|
||||||
|
path: '/posts/shuffle',
|
||||||
|
description: 'postShuffleDescription'.tr(),
|
||||||
|
searchableAliases: ['shuffle', 'random', 'posts'],
|
||||||
|
icon: Symbols.shuffle,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'postTagsCategories'.tr(),
|
||||||
|
path: '/posts/categories',
|
||||||
|
description: 'postTagsCategoriesDescription'.tr(),
|
||||||
|
searchableAliases: ['tags', 'categories', 'posts'],
|
||||||
|
icon: Symbols.category,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'discoverRealms'.tr(),
|
||||||
|
path: '/discovery/realms',
|
||||||
|
description: 'discoverRealmsDescription'.tr(),
|
||||||
|
searchableAliases: ['realms', 'groups', 'communities'],
|
||||||
|
icon: Symbols.public,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'chat'.tr(),
|
||||||
|
path: '/chat',
|
||||||
|
description: 'chatDescription'.tr(),
|
||||||
|
searchableAliases: ['chat', 'messages', 'conversations', 'dm'],
|
||||||
|
icon: Symbols.chat,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'realms'.tr(),
|
||||||
|
path: '/realms',
|
||||||
|
description: 'realmsDescription'.tr(),
|
||||||
|
searchableAliases: ['realms', 'groups', 'communities'],
|
||||||
|
icon: Symbols.group,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'account'.tr(),
|
||||||
|
path: '/account',
|
||||||
|
description: 'accountDescription'.tr(),
|
||||||
|
searchableAliases: ['account', 'me', 'profile', 'user'],
|
||||||
|
icon: Symbols.person,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'stickerMarketplace'.tr(),
|
||||||
|
path: '/stickers',
|
||||||
|
description: 'stickerMarketplaceDescription'.tr(),
|
||||||
|
searchableAliases: ['stickers', 'marketplace', 'emojis', 'emojis'],
|
||||||
|
icon: Symbols.emoji_emotions,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'webFeeds'.tr(),
|
||||||
|
path: '/feeds',
|
||||||
|
description: 'webFeedsDescription'.tr(),
|
||||||
|
searchableAliases: ['feeds', 'web feeds', 'rss', 'news'],
|
||||||
|
icon: Symbols.feed,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'wallet'.tr(),
|
||||||
|
path: '/account/wallet',
|
||||||
|
description: 'walletDescription'.tr(),
|
||||||
|
searchableAliases: [
|
||||||
|
'wallet',
|
||||||
|
'balance',
|
||||||
|
'money',
|
||||||
|
'source points',
|
||||||
|
'gold points',
|
||||||
|
'nsp',
|
||||||
|
'shd',
|
||||||
|
],
|
||||||
|
icon: Symbols.account_balance_wallet,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'relationships'.tr(),
|
||||||
|
path: '/account/relationships',
|
||||||
|
description: 'relationshipsDescription'.tr(),
|
||||||
|
searchableAliases: ['relationships', 'friends', 'block list', 'blocks'],
|
||||||
|
icon: Symbols.people,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'updateYourProfile'.tr(),
|
||||||
|
path: '/account/me/update',
|
||||||
|
description: 'updateYourProfileDescription'.tr(),
|
||||||
|
searchableAliases: ['profile', 'update', 'edit', 'my profile'],
|
||||||
|
icon: Symbols.edit,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'leveling'.tr(),
|
||||||
|
path: '/account/me/leveling',
|
||||||
|
description: 'levelingDescription'.tr(),
|
||||||
|
searchableAliases: [
|
||||||
|
'leveling',
|
||||||
|
'level',
|
||||||
|
'levels',
|
||||||
|
'subscriptions',
|
||||||
|
'social credits',
|
||||||
|
],
|
||||||
|
icon: Symbols.trending_up,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'accountSettings'.tr(),
|
||||||
|
path: '/account/me/settings',
|
||||||
|
description: 'accountSettingsDescription'.tr(),
|
||||||
|
searchableAliases: [
|
||||||
|
'settings',
|
||||||
|
'preferences',
|
||||||
|
'account',
|
||||||
|
'account settings',
|
||||||
|
],
|
||||||
|
icon: Symbols.settings,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'abuseReports'.tr(),
|
||||||
|
path: '/safety/reports/me',
|
||||||
|
description: 'abuseReportsDescription'.tr(),
|
||||||
|
searchableAliases: ['reports', 'abuse', 'safety'],
|
||||||
|
icon: Symbols.report,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'files'.tr(),
|
||||||
|
path: '/files',
|
||||||
|
description: 'filesDescription'.tr(),
|
||||||
|
searchableAliases: ['files', 'folders', 'storage', 'drive', 'cloud'],
|
||||||
|
icon: Symbols.folder,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'aiThought'.tr(),
|
||||||
|
path: '/thought',
|
||||||
|
description: 'aiThoughtTitle'.tr(),
|
||||||
|
searchableAliases: ['thought', 'ai', 'ai thought'],
|
||||||
|
icon: Symbols.psychology,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'creatorHub'.tr(),
|
||||||
|
path: '/creators',
|
||||||
|
description: 'creatorHubDescription'.tr(),
|
||||||
|
searchableAliases: ['creators', 'hub', 'creator hub', 'creators hub'],
|
||||||
|
icon: Symbols.create,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'developerPortal'.tr(),
|
||||||
|
path: '/developers',
|
||||||
|
description: 'developerPortalDescription'.tr(),
|
||||||
|
searchableAliases: [
|
||||||
|
'developers',
|
||||||
|
'dev',
|
||||||
|
'developer',
|
||||||
|
'developer hub',
|
||||||
|
'developers hub',
|
||||||
|
],
|
||||||
|
icon: Symbols.code,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'debugLogs'.tr(),
|
||||||
|
path: '/logs',
|
||||||
|
description: 'debugLogsDescription'.tr(),
|
||||||
|
searchableAliases: ['logs', 'debug', 'debug logs'],
|
||||||
|
icon: Symbols.bug_report,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'webArticlesStand'.tr(),
|
||||||
|
path: '/feeds/articles',
|
||||||
|
description: 'webArticlesStandDescription'.tr(),
|
||||||
|
searchableAliases: ['articles', 'stand', 'feed', 'web feed'],
|
||||||
|
icon: Symbols.article,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'appSettings'.tr(),
|
||||||
|
path: '/settings',
|
||||||
|
description: 'appSettingsDescription'.tr(),
|
||||||
|
searchableAliases: ['settings', 'preferences', 'app', 'app settings'],
|
||||||
|
icon: Symbols.settings,
|
||||||
|
),
|
||||||
|
RouteItem(
|
||||||
|
name: 'about'.tr(),
|
||||||
|
path: '/about',
|
||||||
|
description: 'about'.tr(),
|
||||||
|
searchableAliases: ['about', 'info'],
|
||||||
|
icon: Symbols.info,
|
||||||
|
),
|
||||||
|
];
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
sealed class SpecialAction with _$SpecialAction {
|
||||||
|
const factory SpecialAction({
|
||||||
|
required String name,
|
||||||
|
required String description,
|
||||||
|
required IconData icon,
|
||||||
|
required VoidCallback action,
|
||||||
|
@Default([]) List<String> searchableAliases,
|
||||||
|
}) = _SpecialAction;
|
||||||
|
}
|
||||||
552
lib/models/route_item.freezed.dart
Normal file
552
lib/models/route_item.freezed.dart
Normal file
@@ -0,0 +1,552 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// coverage:ignore-file
|
||||||
|
// 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 'route_item.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// FreezedGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// dart format off
|
||||||
|
T _$identity<T>(T value) => value;
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$RouteItem {
|
||||||
|
|
||||||
|
String get name; String get path; String get description; List<String> get searchableAliases; IconData get icon;
|
||||||
|
/// Create a copy of RouteItem
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$RouteItemCopyWith<RouteItem> get copyWith => _$RouteItemCopyWithImpl<RouteItem>(this as RouteItem, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is RouteItem&&(identical(other.name, name) || other.name == name)&&(identical(other.path, path) || other.path == path)&&(identical(other.description, description) || other.description == description)&&const DeepCollectionEquality().equals(other.searchableAliases, searchableAliases)&&(identical(other.icon, icon) || other.icon == icon));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,name,path,description,const DeepCollectionEquality().hash(searchableAliases),icon);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'RouteItem(name: $name, path: $path, description: $description, searchableAliases: $searchableAliases, icon: $icon)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $RouteItemCopyWith<$Res> {
|
||||||
|
factory $RouteItemCopyWith(RouteItem value, $Res Function(RouteItem) _then) = _$RouteItemCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
String name, String path, String description, List<String> searchableAliases, IconData icon
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$RouteItemCopyWithImpl<$Res>
|
||||||
|
implements $RouteItemCopyWith<$Res> {
|
||||||
|
_$RouteItemCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final RouteItem _self;
|
||||||
|
final $Res Function(RouteItem) _then;
|
||||||
|
|
||||||
|
/// Create a copy of RouteItem
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? path = null,Object? description = null,Object? searchableAliases = null,Object? icon = null,}) {
|
||||||
|
return _then(_self.copyWith(
|
||||||
|
name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,path: null == path ? _self.path : path // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,searchableAliases: null == searchableAliases ? _self.searchableAliases : searchableAliases // ignore: cast_nullable_to_non_nullable
|
||||||
|
as List<String>,icon: null == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable
|
||||||
|
as IconData,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [RouteItem].
|
||||||
|
extension RouteItemPatterns on RouteItem {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _RouteItem value)? $default,{required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _RouteItem() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _RouteItem value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _RouteItem():
|
||||||
|
return $default(_that);}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _RouteItem value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _RouteItem() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String name, String path, String description, List<String> searchableAliases, IconData icon)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _RouteItem() when $default != null:
|
||||||
|
return $default(_that.name,_that.path,_that.description,_that.searchableAliases,_that.icon);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String name, String path, String description, List<String> searchableAliases, IconData icon) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _RouteItem():
|
||||||
|
return $default(_that.name,_that.path,_that.description,_that.searchableAliases,_that.icon);}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String name, String path, String description, List<String> searchableAliases, IconData icon)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _RouteItem() when $default != null:
|
||||||
|
return $default(_that.name,_that.path,_that.description,_that.searchableAliases,_that.icon);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _RouteItem implements RouteItem {
|
||||||
|
const _RouteItem({required this.name, required this.path, required this.description, final List<String> searchableAliases = const [], required this.icon}): _searchableAliases = searchableAliases;
|
||||||
|
|
||||||
|
|
||||||
|
@override final String name;
|
||||||
|
@override final String path;
|
||||||
|
@override final String description;
|
||||||
|
final List<String> _searchableAliases;
|
||||||
|
@override@JsonKey() List<String> get searchableAliases {
|
||||||
|
if (_searchableAliases is EqualUnmodifiableListView) return _searchableAliases;
|
||||||
|
// ignore: implicit_dynamic_type
|
||||||
|
return EqualUnmodifiableListView(_searchableAliases);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override final IconData icon;
|
||||||
|
|
||||||
|
/// Create a copy of RouteItem
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$RouteItemCopyWith<_RouteItem> get copyWith => __$RouteItemCopyWithImpl<_RouteItem>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _RouteItem&&(identical(other.name, name) || other.name == name)&&(identical(other.path, path) || other.path == path)&&(identical(other.description, description) || other.description == description)&&const DeepCollectionEquality().equals(other._searchableAliases, _searchableAliases)&&(identical(other.icon, icon) || other.icon == icon));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,name,path,description,const DeepCollectionEquality().hash(_searchableAliases),icon);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'RouteItem(name: $name, path: $path, description: $description, searchableAliases: $searchableAliases, icon: $icon)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$RouteItemCopyWith<$Res> implements $RouteItemCopyWith<$Res> {
|
||||||
|
factory _$RouteItemCopyWith(_RouteItem value, $Res Function(_RouteItem) _then) = __$RouteItemCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
String name, String path, String description, List<String> searchableAliases, IconData icon
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$RouteItemCopyWithImpl<$Res>
|
||||||
|
implements _$RouteItemCopyWith<$Res> {
|
||||||
|
__$RouteItemCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _RouteItem _self;
|
||||||
|
final $Res Function(_RouteItem) _then;
|
||||||
|
|
||||||
|
/// Create a copy of RouteItem
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? path = null,Object? description = null,Object? searchableAliases = null,Object? icon = null,}) {
|
||||||
|
return _then(_RouteItem(
|
||||||
|
name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,path: null == path ? _self.path : path // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,searchableAliases: null == searchableAliases ? _self._searchableAliases : searchableAliases // ignore: cast_nullable_to_non_nullable
|
||||||
|
as List<String>,icon: null == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable
|
||||||
|
as IconData,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$SpecialAction {
|
||||||
|
|
||||||
|
String get name; String get description; IconData get icon; VoidCallback get action; List<String> get searchableAliases;
|
||||||
|
/// Create a copy of SpecialAction
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$SpecialActionCopyWith<SpecialAction> get copyWith => _$SpecialActionCopyWithImpl<SpecialAction>(this as SpecialAction, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is SpecialAction&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.icon, icon) || other.icon == icon)&&(identical(other.action, action) || other.action == action)&&const DeepCollectionEquality().equals(other.searchableAliases, searchableAliases));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,name,description,icon,action,const DeepCollectionEquality().hash(searchableAliases));
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'SpecialAction(name: $name, description: $description, icon: $icon, action: $action, searchableAliases: $searchableAliases)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $SpecialActionCopyWith<$Res> {
|
||||||
|
factory $SpecialActionCopyWith(SpecialAction value, $Res Function(SpecialAction) _then) = _$SpecialActionCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
String name, String description, IconData icon, VoidCallback action, List<String> searchableAliases
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$SpecialActionCopyWithImpl<$Res>
|
||||||
|
implements $SpecialActionCopyWith<$Res> {
|
||||||
|
_$SpecialActionCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final SpecialAction _self;
|
||||||
|
final $Res Function(SpecialAction) _then;
|
||||||
|
|
||||||
|
/// Create a copy of SpecialAction
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? description = null,Object? icon = null,Object? action = null,Object? searchableAliases = null,}) {
|
||||||
|
return _then(_self.copyWith(
|
||||||
|
name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,icon: null == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable
|
||||||
|
as IconData,action: null == action ? _self.action : action // ignore: cast_nullable_to_non_nullable
|
||||||
|
as VoidCallback,searchableAliases: null == searchableAliases ? _self.searchableAliases : searchableAliases // ignore: cast_nullable_to_non_nullable
|
||||||
|
as List<String>,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [SpecialAction].
|
||||||
|
extension SpecialActionPatterns on SpecialAction {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SpecialAction value)? $default,{required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SpecialAction() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SpecialAction value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SpecialAction():
|
||||||
|
return $default(_that);}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SpecialAction value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SpecialAction() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String name, String description, IconData icon, VoidCallback action, List<String> searchableAliases)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SpecialAction() when $default != null:
|
||||||
|
return $default(_that.name,_that.description,_that.icon,_that.action,_that.searchableAliases);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String name, String description, IconData icon, VoidCallback action, List<String> searchableAliases) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SpecialAction():
|
||||||
|
return $default(_that.name,_that.description,_that.icon,_that.action,_that.searchableAliases);}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String name, String description, IconData icon, VoidCallback action, List<String> searchableAliases)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SpecialAction() when $default != null:
|
||||||
|
return $default(_that.name,_that.description,_that.icon,_that.action,_that.searchableAliases);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _SpecialAction implements SpecialAction {
|
||||||
|
const _SpecialAction({required this.name, required this.description, required this.icon, required this.action, final List<String> searchableAliases = const []}): _searchableAliases = searchableAliases;
|
||||||
|
|
||||||
|
|
||||||
|
@override final String name;
|
||||||
|
@override final String description;
|
||||||
|
@override final IconData icon;
|
||||||
|
@override final VoidCallback action;
|
||||||
|
final List<String> _searchableAliases;
|
||||||
|
@override@JsonKey() List<String> get searchableAliases {
|
||||||
|
if (_searchableAliases is EqualUnmodifiableListView) return _searchableAliases;
|
||||||
|
// ignore: implicit_dynamic_type
|
||||||
|
return EqualUnmodifiableListView(_searchableAliases);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Create a copy of SpecialAction
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$SpecialActionCopyWith<_SpecialAction> get copyWith => __$SpecialActionCopyWithImpl<_SpecialAction>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SpecialAction&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.icon, icon) || other.icon == icon)&&(identical(other.action, action) || other.action == action)&&const DeepCollectionEquality().equals(other._searchableAliases, _searchableAliases));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,name,description,icon,action,const DeepCollectionEquality().hash(_searchableAliases));
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'SpecialAction(name: $name, description: $description, icon: $icon, action: $action, searchableAliases: $searchableAliases)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$SpecialActionCopyWith<$Res> implements $SpecialActionCopyWith<$Res> {
|
||||||
|
factory _$SpecialActionCopyWith(_SpecialAction value, $Res Function(_SpecialAction) _then) = __$SpecialActionCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
String name, String description, IconData icon, VoidCallback action, List<String> searchableAliases
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$SpecialActionCopyWithImpl<$Res>
|
||||||
|
implements _$SpecialActionCopyWith<$Res> {
|
||||||
|
__$SpecialActionCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _SpecialAction _self;
|
||||||
|
final $Res Function(_SpecialAction) _then;
|
||||||
|
|
||||||
|
/// Create a copy of SpecialAction
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? description = null,Object? icon = null,Object? action = null,Object? searchableAliases = null,}) {
|
||||||
|
return _then(_SpecialAction(
|
||||||
|
name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,icon: null == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable
|
||||||
|
as IconData,action: null == action ? _self.action : action // ignore: cast_nullable_to_non_nullable
|
||||||
|
as VoidCallback,searchableAliases: null == searchableAliases ? _self._searchableAliases : searchableAliases // ignore: cast_nullable_to_non_nullable
|
||||||
|
as List<String>,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// dart format on
|
||||||
25
lib/models/site_file.dart
Normal file
25
lib/models/site_file.dart
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
|
|
||||||
|
part 'site_file.freezed.dart';
|
||||||
|
part 'site_file.g.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
sealed class SnSiteFileEntry with _$SnSiteFileEntry {
|
||||||
|
const factory SnSiteFileEntry({
|
||||||
|
required bool isDirectory,
|
||||||
|
required String relativePath,
|
||||||
|
required int size, // Size in bytes (0 for directories)
|
||||||
|
required DateTime modified, // ISO 8601 timestamp
|
||||||
|
}) = _SnSiteFileEntry;
|
||||||
|
|
||||||
|
factory SnSiteFileEntry.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$SnSiteFileEntryFromJson(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
sealed class SnFileContent with _$SnFileContent {
|
||||||
|
const factory SnFileContent({required String content}) = _SnFileContent;
|
||||||
|
|
||||||
|
factory SnFileContent.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$SnFileContentFromJson(json);
|
||||||
|
}
|
||||||
539
lib/models/site_file.freezed.dart
Normal file
539
lib/models/site_file.freezed.dart
Normal file
@@ -0,0 +1,539 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// coverage:ignore-file
|
||||||
|
// 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 'site_file.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// FreezedGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// dart format off
|
||||||
|
T _$identity<T>(T value) => value;
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$SnSiteFileEntry {
|
||||||
|
|
||||||
|
bool get isDirectory; String get relativePath; int get size;// Size in bytes (0 for directories)
|
||||||
|
DateTime get modified;
|
||||||
|
/// Create a copy of SnSiteFileEntry
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$SnSiteFileEntryCopyWith<SnSiteFileEntry> get copyWith => _$SnSiteFileEntryCopyWithImpl<SnSiteFileEntry>(this as SnSiteFileEntry, _$identity);
|
||||||
|
|
||||||
|
/// Serializes this SnSiteFileEntry to a JSON map.
|
||||||
|
Map<String, dynamic> toJson();
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnSiteFileEntry&&(identical(other.isDirectory, isDirectory) || other.isDirectory == isDirectory)&&(identical(other.relativePath, relativePath) || other.relativePath == relativePath)&&(identical(other.size, size) || other.size == size)&&(identical(other.modified, modified) || other.modified == modified));
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,isDirectory,relativePath,size,modified);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'SnSiteFileEntry(isDirectory: $isDirectory, relativePath: $relativePath, size: $size, modified: $modified)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $SnSiteFileEntryCopyWith<$Res> {
|
||||||
|
factory $SnSiteFileEntryCopyWith(SnSiteFileEntry value, $Res Function(SnSiteFileEntry) _then) = _$SnSiteFileEntryCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
bool isDirectory, String relativePath, int size, DateTime modified
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$SnSiteFileEntryCopyWithImpl<$Res>
|
||||||
|
implements $SnSiteFileEntryCopyWith<$Res> {
|
||||||
|
_$SnSiteFileEntryCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final SnSiteFileEntry _self;
|
||||||
|
final $Res Function(SnSiteFileEntry) _then;
|
||||||
|
|
||||||
|
/// Create a copy of SnSiteFileEntry
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') @override $Res call({Object? isDirectory = null,Object? relativePath = null,Object? size = null,Object? modified = null,}) {
|
||||||
|
return _then(_self.copyWith(
|
||||||
|
isDirectory: null == isDirectory ? _self.isDirectory : isDirectory // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,relativePath: null == relativePath ? _self.relativePath : relativePath // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,size: null == size ? _self.size : size // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,modified: null == modified ? _self.modified : modified // ignore: cast_nullable_to_non_nullable
|
||||||
|
as DateTime,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [SnSiteFileEntry].
|
||||||
|
extension SnSiteFileEntryPatterns on SnSiteFileEntry {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnSiteFileEntry value)? $default,{required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnSiteFileEntry() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnSiteFileEntry value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnSiteFileEntry():
|
||||||
|
return $default(_that);}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnSiteFileEntry value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnSiteFileEntry() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isDirectory, String relativePath, int size, DateTime modified)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnSiteFileEntry() when $default != null:
|
||||||
|
return $default(_that.isDirectory,_that.relativePath,_that.size,_that.modified);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isDirectory, String relativePath, int size, DateTime modified) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnSiteFileEntry():
|
||||||
|
return $default(_that.isDirectory,_that.relativePath,_that.size,_that.modified);}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isDirectory, String relativePath, int size, DateTime modified)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnSiteFileEntry() when $default != null:
|
||||||
|
return $default(_that.isDirectory,_that.relativePath,_that.size,_that.modified);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
@JsonSerializable()
|
||||||
|
|
||||||
|
class _SnSiteFileEntry implements SnSiteFileEntry {
|
||||||
|
const _SnSiteFileEntry({required this.isDirectory, required this.relativePath, required this.size, required this.modified});
|
||||||
|
factory _SnSiteFileEntry.fromJson(Map<String, dynamic> json) => _$SnSiteFileEntryFromJson(json);
|
||||||
|
|
||||||
|
@override final bool isDirectory;
|
||||||
|
@override final String relativePath;
|
||||||
|
@override final int size;
|
||||||
|
// Size in bytes (0 for directories)
|
||||||
|
@override final DateTime modified;
|
||||||
|
|
||||||
|
/// Create a copy of SnSiteFileEntry
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$SnSiteFileEntryCopyWith<_SnSiteFileEntry> get copyWith => __$SnSiteFileEntryCopyWithImpl<_SnSiteFileEntry>(this, _$identity);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
return _$SnSiteFileEntryToJson(this, );
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnSiteFileEntry&&(identical(other.isDirectory, isDirectory) || other.isDirectory == isDirectory)&&(identical(other.relativePath, relativePath) || other.relativePath == relativePath)&&(identical(other.size, size) || other.size == size)&&(identical(other.modified, modified) || other.modified == modified));
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,isDirectory,relativePath,size,modified);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'SnSiteFileEntry(isDirectory: $isDirectory, relativePath: $relativePath, size: $size, modified: $modified)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$SnSiteFileEntryCopyWith<$Res> implements $SnSiteFileEntryCopyWith<$Res> {
|
||||||
|
factory _$SnSiteFileEntryCopyWith(_SnSiteFileEntry value, $Res Function(_SnSiteFileEntry) _then) = __$SnSiteFileEntryCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
bool isDirectory, String relativePath, int size, DateTime modified
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$SnSiteFileEntryCopyWithImpl<$Res>
|
||||||
|
implements _$SnSiteFileEntryCopyWith<$Res> {
|
||||||
|
__$SnSiteFileEntryCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _SnSiteFileEntry _self;
|
||||||
|
final $Res Function(_SnSiteFileEntry) _then;
|
||||||
|
|
||||||
|
/// Create a copy of SnSiteFileEntry
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? isDirectory = null,Object? relativePath = null,Object? size = null,Object? modified = null,}) {
|
||||||
|
return _then(_SnSiteFileEntry(
|
||||||
|
isDirectory: null == isDirectory ? _self.isDirectory : isDirectory // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,relativePath: null == relativePath ? _self.relativePath : relativePath // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,size: null == size ? _self.size : size // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,modified: null == modified ? _self.modified : modified // ignore: cast_nullable_to_non_nullable
|
||||||
|
as DateTime,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$SnFileContent {
|
||||||
|
|
||||||
|
String get content;
|
||||||
|
/// Create a copy of SnFileContent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$SnFileContentCopyWith<SnFileContent> get copyWith => _$SnFileContentCopyWithImpl<SnFileContent>(this as SnFileContent, _$identity);
|
||||||
|
|
||||||
|
/// Serializes this SnFileContent to a JSON map.
|
||||||
|
Map<String, dynamic> toJson();
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnFileContent&&(identical(other.content, content) || other.content == content));
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,content);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'SnFileContent(content: $content)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $SnFileContentCopyWith<$Res> {
|
||||||
|
factory $SnFileContentCopyWith(SnFileContent value, $Res Function(SnFileContent) _then) = _$SnFileContentCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
String content
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$SnFileContentCopyWithImpl<$Res>
|
||||||
|
implements $SnFileContentCopyWith<$Res> {
|
||||||
|
_$SnFileContentCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final SnFileContent _self;
|
||||||
|
final $Res Function(SnFileContent) _then;
|
||||||
|
|
||||||
|
/// Create a copy of SnFileContent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') @override $Res call({Object? content = null,}) {
|
||||||
|
return _then(_self.copyWith(
|
||||||
|
content: null == content ? _self.content : content // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [SnFileContent].
|
||||||
|
extension SnFileContentPatterns on SnFileContent {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnFileContent value)? $default,{required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnFileContent() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnFileContent value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnFileContent():
|
||||||
|
return $default(_that);}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnFileContent value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnFileContent() when $default != null:
|
||||||
|
return $default(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String content)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnFileContent() when $default != null:
|
||||||
|
return $default(_that.content);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String content) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnFileContent():
|
||||||
|
return $default(_that.content);}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String content)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _SnFileContent() when $default != null:
|
||||||
|
return $default(_that.content);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
@JsonSerializable()
|
||||||
|
|
||||||
|
class _SnFileContent implements SnFileContent {
|
||||||
|
const _SnFileContent({required this.content});
|
||||||
|
factory _SnFileContent.fromJson(Map<String, dynamic> json) => _$SnFileContentFromJson(json);
|
||||||
|
|
||||||
|
@override final String content;
|
||||||
|
|
||||||
|
/// Create a copy of SnFileContent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$SnFileContentCopyWith<_SnFileContent> get copyWith => __$SnFileContentCopyWithImpl<_SnFileContent>(this, _$identity);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
return _$SnFileContentToJson(this, );
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnFileContent&&(identical(other.content, content) || other.content == content));
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,content);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'SnFileContent(content: $content)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$SnFileContentCopyWith<$Res> implements $SnFileContentCopyWith<$Res> {
|
||||||
|
factory _$SnFileContentCopyWith(_SnFileContent value, $Res Function(_SnFileContent) _then) = __$SnFileContentCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
String content
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$SnFileContentCopyWithImpl<$Res>
|
||||||
|
implements _$SnFileContentCopyWith<$Res> {
|
||||||
|
__$SnFileContentCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _SnFileContent _self;
|
||||||
|
final $Res Function(_SnFileContent) _then;
|
||||||
|
|
||||||
|
/// Create a copy of SnFileContent
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? content = null,}) {
|
||||||
|
return _then(_SnFileContent(
|
||||||
|
content: null == content ? _self.content : content // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// dart format on
|
||||||
29
lib/models/site_file.g.dart
Normal file
29
lib/models/site_file.g.dart
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'site_file.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// JsonSerializableGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
_SnSiteFileEntry _$SnSiteFileEntryFromJson(Map<String, dynamic> json) =>
|
||||||
|
_SnSiteFileEntry(
|
||||||
|
isDirectory: json['is_directory'] as bool,
|
||||||
|
relativePath: json['relative_path'] as String,
|
||||||
|
size: (json['size'] as num).toInt(),
|
||||||
|
modified: DateTime.parse(json['modified'] as String),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$SnSiteFileEntryToJson(_SnSiteFileEntry instance) =>
|
||||||
|
<String, dynamic>{
|
||||||
|
'is_directory': instance.isDirectory,
|
||||||
|
'relative_path': instance.relativePath,
|
||||||
|
'size': instance.size,
|
||||||
|
'modified': instance.modified.toIso8601String(),
|
||||||
|
};
|
||||||
|
|
||||||
|
_SnFileContent _$SnFileContentFromJson(Map<String, dynamic> json) =>
|
||||||
|
_SnFileContent(content: json['content'] as String);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$SnFileContentToJson(_SnFileContent instance) =>
|
||||||
|
<String, dynamic>{'content': instance.content};
|
||||||
@@ -30,6 +30,7 @@ sealed class SnStickerPack with _$SnStickerPack {
|
|||||||
required String description,
|
required String description,
|
||||||
required String prefix,
|
required String prefix,
|
||||||
required String publisherId,
|
required String publisherId,
|
||||||
|
required SnCloudFile? icon,
|
||||||
required SnPublisher? publisher,
|
required SnPublisher? publisher,
|
||||||
required DateTime createdAt,
|
required DateTime createdAt,
|
||||||
required DateTime updatedAt,
|
required DateTime updatedAt,
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ $SnStickerPackCopyWith<$Res>? get pack {
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$SnStickerPack {
|
mixin _$SnStickerPack {
|
||||||
|
|
||||||
String get id; String get name; String get description; String get prefix; String get publisherId; SnPublisher? get publisher; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; List<SnSticker> get stickers;
|
String get id; String get name; String get description; String get prefix; String get publisherId; SnCloudFile? get icon; SnPublisher? get publisher; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; List<SnSticker> get stickers;
|
||||||
/// Create a copy of SnStickerPack
|
/// Create a copy of SnStickerPack
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -348,16 +348,16 @@ $SnStickerPackCopyWith<SnStickerPack> get copyWith => _$SnStickerPackCopyWithImp
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnStickerPack&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.prefix, prefix) || other.prefix == prefix)&&(identical(other.publisherId, publisherId) || other.publisherId == publisherId)&&(identical(other.publisher, publisher) || other.publisher == publisher)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other.stickers, stickers));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnStickerPack&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.prefix, prefix) || other.prefix == prefix)&&(identical(other.publisherId, publisherId) || other.publisherId == publisherId)&&(identical(other.icon, icon) || other.icon == icon)&&(identical(other.publisher, publisher) || other.publisher == publisher)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other.stickers, stickers));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,id,name,description,prefix,publisherId,publisher,createdAt,updatedAt,deletedAt,const DeepCollectionEquality().hash(stickers));
|
int get hashCode => Object.hash(runtimeType,id,name,description,prefix,publisherId,icon,publisher,createdAt,updatedAt,deletedAt,const DeepCollectionEquality().hash(stickers));
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnStickerPack(id: $id, name: $name, description: $description, prefix: $prefix, publisherId: $publisherId, publisher: $publisher, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, stickers: $stickers)';
|
return 'SnStickerPack(id: $id, name: $name, description: $description, prefix: $prefix, publisherId: $publisherId, icon: $icon, publisher: $publisher, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, stickers: $stickers)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -368,11 +368,11 @@ abstract mixin class $SnStickerPackCopyWith<$Res> {
|
|||||||
factory $SnStickerPackCopyWith(SnStickerPack value, $Res Function(SnStickerPack) _then) = _$SnStickerPackCopyWithImpl;
|
factory $SnStickerPackCopyWith(SnStickerPack value, $Res Function(SnStickerPack) _then) = _$SnStickerPackCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
String id, String name, String description, String prefix, String publisherId, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnSticker> stickers
|
String id, String name, String description, String prefix, String publisherId, SnCloudFile? icon, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnSticker> stickers
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$SnPublisherCopyWith<$Res>? get publisher;
|
$SnCloudFileCopyWith<$Res>? get icon;$SnPublisherCopyWith<$Res>? get publisher;
|
||||||
|
|
||||||
}
|
}
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -385,14 +385,15 @@ class _$SnStickerPackCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnStickerPack
|
/// Create a copy of SnStickerPack
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? description = null,Object? prefix = null,Object? publisherId = null,Object? publisher = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? stickers = null,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? description = null,Object? prefix = null,Object? publisherId = null,Object? icon = freezed,Object? publisher = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? stickers = null,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||||
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||||
as String,prefix: null == prefix ? _self.prefix : prefix // ignore: cast_nullable_to_non_nullable
|
as String,prefix: null == prefix ? _self.prefix : prefix // ignore: cast_nullable_to_non_nullable
|
||||||
as String,publisherId: null == publisherId ? _self.publisherId : publisherId // ignore: cast_nullable_to_non_nullable
|
as String,publisherId: null == publisherId ? _self.publisherId : publisherId // ignore: cast_nullable_to_non_nullable
|
||||||
as String,publisher: freezed == publisher ? _self.publisher : publisher // ignore: cast_nullable_to_non_nullable
|
as String,icon: freezed == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable
|
||||||
|
as SnCloudFile?,publisher: freezed == publisher ? _self.publisher : publisher // ignore: cast_nullable_to_non_nullable
|
||||||
as SnPublisher?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
as SnPublisher?,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,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,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -404,6 +405,18 @@ as List<SnSticker>,
|
|||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
|
$SnCloudFileCopyWith<$Res>? get icon {
|
||||||
|
if (_self.icon == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $SnCloudFileCopyWith<$Res>(_self.icon!, (value) {
|
||||||
|
return _then(_self.copyWith(icon: value));
|
||||||
|
});
|
||||||
|
}/// Create a copy of SnStickerPack
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
$SnPublisherCopyWith<$Res>? get publisher {
|
$SnPublisherCopyWith<$Res>? get publisher {
|
||||||
if (_self.publisher == null) {
|
if (_self.publisher == null) {
|
||||||
return null;
|
return null;
|
||||||
@@ -491,10 +504,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String name, String description, String prefix, String publisherId, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnSticker> stickers)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String name, String description, String prefix, String publisherId, SnCloudFile? icon, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnSticker> stickers)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnStickerPack() when $default != null:
|
case _SnStickerPack() when $default != null:
|
||||||
return $default(_that.id,_that.name,_that.description,_that.prefix,_that.publisherId,_that.publisher,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.stickers);case _:
|
return $default(_that.id,_that.name,_that.description,_that.prefix,_that.publisherId,_that.icon,_that.publisher,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.stickers);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -512,10 +525,10 @@ return $default(_that.id,_that.name,_that.description,_that.prefix,_that.publish
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String name, String description, String prefix, String publisherId, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnSticker> stickers) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String name, String description, String prefix, String publisherId, SnCloudFile? icon, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnSticker> stickers) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnStickerPack():
|
case _SnStickerPack():
|
||||||
return $default(_that.id,_that.name,_that.description,_that.prefix,_that.publisherId,_that.publisher,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.stickers);}
|
return $default(_that.id,_that.name,_that.description,_that.prefix,_that.publisherId,_that.icon,_that.publisher,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.stickers);}
|
||||||
}
|
}
|
||||||
/// A variant of `when` that fallback to returning `null`
|
/// A variant of `when` that fallback to returning `null`
|
||||||
///
|
///
|
||||||
@@ -529,10 +542,10 @@ return $default(_that.id,_that.name,_that.description,_that.prefix,_that.publish
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String name, String description, String prefix, String publisherId, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnSticker> stickers)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String name, String description, String prefix, String publisherId, SnCloudFile? icon, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnSticker> stickers)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnStickerPack() when $default != null:
|
case _SnStickerPack() when $default != null:
|
||||||
return $default(_that.id,_that.name,_that.description,_that.prefix,_that.publisherId,_that.publisher,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.stickers);case _:
|
return $default(_that.id,_that.name,_that.description,_that.prefix,_that.publisherId,_that.icon,_that.publisher,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.stickers);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -544,7 +557,7 @@ return $default(_that.id,_that.name,_that.description,_that.prefix,_that.publish
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _SnStickerPack implements SnStickerPack {
|
class _SnStickerPack implements SnStickerPack {
|
||||||
const _SnStickerPack({required this.id, required this.name, required this.description, required this.prefix, required this.publisherId, required this.publisher, required this.createdAt, required this.updatedAt, required this.deletedAt, final List<SnSticker> stickers = const []}): _stickers = stickers;
|
const _SnStickerPack({required this.id, required this.name, required this.description, required this.prefix, required this.publisherId, required this.icon, required this.publisher, required this.createdAt, required this.updatedAt, required this.deletedAt, final List<SnSticker> stickers = const []}): _stickers = stickers;
|
||||||
factory _SnStickerPack.fromJson(Map<String, dynamic> json) => _$SnStickerPackFromJson(json);
|
factory _SnStickerPack.fromJson(Map<String, dynamic> json) => _$SnStickerPackFromJson(json);
|
||||||
|
|
||||||
@override final String id;
|
@override final String id;
|
||||||
@@ -552,6 +565,7 @@ class _SnStickerPack implements SnStickerPack {
|
|||||||
@override final String description;
|
@override final String description;
|
||||||
@override final String prefix;
|
@override final String prefix;
|
||||||
@override final String publisherId;
|
@override final String publisherId;
|
||||||
|
@override final SnCloudFile? icon;
|
||||||
@override final SnPublisher? publisher;
|
@override final SnPublisher? publisher;
|
||||||
@override final DateTime createdAt;
|
@override final DateTime createdAt;
|
||||||
@override final DateTime updatedAt;
|
@override final DateTime updatedAt;
|
||||||
@@ -577,16 +591,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnStickerPack&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.prefix, prefix) || other.prefix == prefix)&&(identical(other.publisherId, publisherId) || other.publisherId == publisherId)&&(identical(other.publisher, publisher) || other.publisher == publisher)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other._stickers, _stickers));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnStickerPack&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.prefix, prefix) || other.prefix == prefix)&&(identical(other.publisherId, publisherId) || other.publisherId == publisherId)&&(identical(other.icon, icon) || other.icon == icon)&&(identical(other.publisher, publisher) || other.publisher == publisher)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other._stickers, _stickers));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,id,name,description,prefix,publisherId,publisher,createdAt,updatedAt,deletedAt,const DeepCollectionEquality().hash(_stickers));
|
int get hashCode => Object.hash(runtimeType,id,name,description,prefix,publisherId,icon,publisher,createdAt,updatedAt,deletedAt,const DeepCollectionEquality().hash(_stickers));
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnStickerPack(id: $id, name: $name, description: $description, prefix: $prefix, publisherId: $publisherId, publisher: $publisher, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, stickers: $stickers)';
|
return 'SnStickerPack(id: $id, name: $name, description: $description, prefix: $prefix, publisherId: $publisherId, icon: $icon, publisher: $publisher, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, stickers: $stickers)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -597,11 +611,11 @@ abstract mixin class _$SnStickerPackCopyWith<$Res> implements $SnStickerPackCopy
|
|||||||
factory _$SnStickerPackCopyWith(_SnStickerPack value, $Res Function(_SnStickerPack) _then) = __$SnStickerPackCopyWithImpl;
|
factory _$SnStickerPackCopyWith(_SnStickerPack value, $Res Function(_SnStickerPack) _then) = __$SnStickerPackCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
String id, String name, String description, String prefix, String publisherId, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnSticker> stickers
|
String id, String name, String description, String prefix, String publisherId, SnCloudFile? icon, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnSticker> stickers
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@override $SnPublisherCopyWith<$Res>? get publisher;
|
@override $SnCloudFileCopyWith<$Res>? get icon;@override $SnPublisherCopyWith<$Res>? get publisher;
|
||||||
|
|
||||||
}
|
}
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -614,14 +628,15 @@ class __$SnStickerPackCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnStickerPack
|
/// Create a copy of SnStickerPack
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? description = null,Object? prefix = null,Object? publisherId = null,Object? publisher = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? stickers = null,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? description = null,Object? prefix = null,Object? publisherId = null,Object? icon = freezed,Object? publisher = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? stickers = null,}) {
|
||||||
return _then(_SnStickerPack(
|
return _then(_SnStickerPack(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||||
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||||
as String,prefix: null == prefix ? _self.prefix : prefix // ignore: cast_nullable_to_non_nullable
|
as String,prefix: null == prefix ? _self.prefix : prefix // ignore: cast_nullable_to_non_nullable
|
||||||
as String,publisherId: null == publisherId ? _self.publisherId : publisherId // ignore: cast_nullable_to_non_nullable
|
as String,publisherId: null == publisherId ? _self.publisherId : publisherId // ignore: cast_nullable_to_non_nullable
|
||||||
as String,publisher: freezed == publisher ? _self.publisher : publisher // ignore: cast_nullable_to_non_nullable
|
as String,icon: freezed == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable
|
||||||
|
as SnCloudFile?,publisher: freezed == publisher ? _self.publisher : publisher // ignore: cast_nullable_to_non_nullable
|
||||||
as SnPublisher?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
as SnPublisher?,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,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,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -634,6 +649,18 @@ as List<SnSticker>,
|
|||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
|
$SnCloudFileCopyWith<$Res>? get icon {
|
||||||
|
if (_self.icon == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $SnCloudFileCopyWith<$Res>(_self.icon!, (value) {
|
||||||
|
return _then(_self.copyWith(icon: value));
|
||||||
|
});
|
||||||
|
}/// Create a copy of SnStickerPack
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
$SnPublisherCopyWith<$Res>? get publisher {
|
$SnPublisherCopyWith<$Res>? get publisher {
|
||||||
if (_self.publisher == null) {
|
if (_self.publisher == null) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -11,16 +11,14 @@ _SnSticker _$SnStickerFromJson(Map<String, dynamic> json) => _SnSticker(
|
|||||||
slug: json['slug'] as String,
|
slug: json['slug'] as String,
|
||||||
image: SnCloudFile.fromJson(json['image'] as Map<String, dynamic>),
|
image: SnCloudFile.fromJson(json['image'] as Map<String, dynamic>),
|
||||||
packId: json['pack_id'] as String,
|
packId: json['pack_id'] as String,
|
||||||
pack:
|
pack: json['pack'] == null
|
||||||
json['pack'] == null
|
? null
|
||||||
? null
|
: SnStickerPack.fromJson(json['pack'] as Map<String, dynamic>),
|
||||||
: SnStickerPack.fromJson(json['pack'] as Map<String, dynamic>),
|
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnStickerToJson(_SnSticker instance) =>
|
Map<String, dynamic> _$SnStickerToJson(_SnSticker instance) =>
|
||||||
@@ -42,16 +40,17 @@ _SnStickerPack _$SnStickerPackFromJson(Map<String, dynamic> json) =>
|
|||||||
description: json['description'] as String,
|
description: json['description'] as String,
|
||||||
prefix: json['prefix'] as String,
|
prefix: json['prefix'] as String,
|
||||||
publisherId: json['publisher_id'] as String,
|
publisherId: json['publisher_id'] as String,
|
||||||
publisher:
|
icon: json['icon'] == null
|
||||||
json['publisher'] == null
|
? null
|
||||||
? null
|
: SnCloudFile.fromJson(json['icon'] as Map<String, dynamic>),
|
||||||
: SnPublisher.fromJson(json['publisher'] as Map<String, dynamic>),
|
publisher: json['publisher'] == null
|
||||||
|
? null
|
||||||
|
: SnPublisher.fromJson(json['publisher'] as Map<String, dynamic>),
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
stickers:
|
stickers:
|
||||||
(json['stickers'] as List<dynamic>?)
|
(json['stickers'] as List<dynamic>?)
|
||||||
?.map((e) => SnSticker.fromJson(e as Map<String, dynamic>))
|
?.map((e) => SnSticker.fromJson(e as Map<String, dynamic>))
|
||||||
@@ -66,6 +65,7 @@ Map<String, dynamic> _$SnStickerPackToJson(_SnStickerPack instance) =>
|
|||||||
'description': instance.description,
|
'description': instance.description,
|
||||||
'prefix': instance.prefix,
|
'prefix': instance.prefix,
|
||||||
'publisher_id': instance.publisherId,
|
'publisher_id': instance.publisherId,
|
||||||
|
'icon': instance.icon?.toJson(),
|
||||||
'publisher': instance.publisher?.toJson(),
|
'publisher': instance.publisher?.toJson(),
|
||||||
'created_at': instance.createdAt.toIso8601String(),
|
'created_at': instance.createdAt.toIso8601String(),
|
||||||
'updated_at': instance.updatedAt.toIso8601String(),
|
'updated_at': instance.updatedAt.toIso8601String(),
|
||||||
|
|||||||
@@ -16,14 +16,12 @@ _StreamThinkingRequest _$StreamThinkingRequestFromJson(
|
|||||||
?.map((e) => e as String)
|
?.map((e) => e as String)
|
||||||
.toList() ??
|
.toList() ??
|
||||||
const [],
|
const [],
|
||||||
attachedPosts:
|
attachedPosts: (json['attached_posts'] as List<dynamic>?)
|
||||||
(json['attached_posts'] as List<dynamic>?)
|
?.map((e) => e as String)
|
||||||
?.map((e) => e as String)
|
.toList(),
|
||||||
.toList(),
|
attachedMessages: (json['attached_messages'] as List<dynamic>?)
|
||||||
attachedMessages:
|
?.map((e) => e as Map<String, dynamic>)
|
||||||
(json['attached_messages'] as List<dynamic>?)
|
.toList(),
|
||||||
?.map((e) => e as Map<String, dynamic>)
|
|
||||||
.toList(),
|
|
||||||
serviceId: json['service_id'] as String?,
|
serviceId: json['service_id'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -87,18 +85,14 @@ _SnThinkingMessagePart _$SnThinkingMessagePartFromJson(
|
|||||||
(json['type'] as num).toInt(),
|
(json['type'] as num).toInt(),
|
||||||
),
|
),
|
||||||
text: json['text'] as String?,
|
text: json['text'] as String?,
|
||||||
functionCall:
|
functionCall: json['function_call'] == null
|
||||||
json['function_call'] == null
|
? null
|
||||||
? null
|
: SnFunctionCall.fromJson(json['function_call'] as Map<String, dynamic>),
|
||||||
: SnFunctionCall.fromJson(
|
functionResult: json['function_result'] == null
|
||||||
json['function_call'] as Map<String, dynamic>,
|
? null
|
||||||
),
|
: SnFunctionResult.fromJson(
|
||||||
functionResult:
|
json['function_result'] as Map<String, dynamic>,
|
||||||
json['function_result'] == null
|
),
|
||||||
? null
|
|
||||||
: SnFunctionResult.fromJson(
|
|
||||||
json['function_result'] as Map<String, dynamic>,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnThinkingMessagePartToJson(
|
Map<String, dynamic> _$SnThinkingMessagePartToJson(
|
||||||
@@ -119,10 +113,9 @@ _SnThinkingSequence _$SnThinkingSequenceFromJson(Map<String, dynamic> json) =>
|
|||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnThinkingSequenceToJson(_SnThinkingSequence instance) =>
|
Map<String, dynamic> _$SnThinkingSequenceToJson(_SnThinkingSequence instance) =>
|
||||||
@@ -159,18 +152,16 @@ _SnThinkingThought _$SnThinkingThoughtFromJson(Map<String, dynamic> json) =>
|
|||||||
tokenCount: (json['token_count'] as num?)?.toInt(),
|
tokenCount: (json['token_count'] as num?)?.toInt(),
|
||||||
modelName: json['model_name'] as String?,
|
modelName: json['model_name'] as String?,
|
||||||
sequenceId: json['sequence_id'] as String,
|
sequenceId: json['sequence_id'] as String,
|
||||||
sequence:
|
sequence: json['sequence'] == null
|
||||||
json['sequence'] == null
|
? null
|
||||||
? null
|
: SnThinkingSequence.fromJson(
|
||||||
: SnThinkingSequence.fromJson(
|
json['sequence'] as Map<String, dynamic>,
|
||||||
json['sequence'] as Map<String, dynamic>,
|
),
|
||||||
),
|
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnThinkingThoughtToJson(_SnThinkingThought instance) =>
|
Map<String, dynamic> _$SnThinkingThoughtToJson(_SnThinkingThought instance) =>
|
||||||
@@ -206,10 +197,9 @@ _ThoughtServicesResponse _$ThoughtServicesResponseFromJson(
|
|||||||
Map<String, dynamic> json,
|
Map<String, dynamic> json,
|
||||||
) => _ThoughtServicesResponse(
|
) => _ThoughtServicesResponse(
|
||||||
defaultService: json['default_service'] as String,
|
defaultService: json['default_service'] as String,
|
||||||
services:
|
services: (json['services'] as List<dynamic>)
|
||||||
(json['services'] as List<dynamic>)
|
.map((e) => ThoughtService.fromJson(e as Map<String, dynamic>))
|
||||||
.map((e) => ThoughtService.fromJson(e as Map<String, dynamic>))
|
.toList(),
|
||||||
.toList(),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$ThoughtServicesResponseToJson(
|
Map<String, dynamic> _$ThoughtServicesResponseToJson(
|
||||||
|
|||||||
@@ -176,6 +176,8 @@ sealed class SnWalletFund with _$SnWalletFund {
|
|||||||
required String id,
|
required String id,
|
||||||
required String currency,
|
required String currency,
|
||||||
required double totalAmount,
|
required double totalAmount,
|
||||||
|
required double remainingAmount,
|
||||||
|
required int amountOfSplits,
|
||||||
required int splitType, // 0: even, 1: random
|
required int splitType, // 0: even, 1: random
|
||||||
required int
|
required int
|
||||||
status, // 0: created, 1: partially claimed, 2: fully claimed, 3: expired
|
status, // 0: created, 1: partially claimed, 2: fully claimed, 3: expired
|
||||||
@@ -184,6 +186,7 @@ sealed class SnWalletFund with _$SnWalletFund {
|
|||||||
required SnAccount? creatorAccount,
|
required SnAccount? creatorAccount,
|
||||||
required DateTime expiredAt,
|
required DateTime expiredAt,
|
||||||
required List<SnWalletFundRecipient> recipients,
|
required List<SnWalletFundRecipient> recipients,
|
||||||
|
required bool isOpen,
|
||||||
required DateTime createdAt,
|
required DateTime createdAt,
|
||||||
required DateTime updatedAt,
|
required DateTime updatedAt,
|
||||||
required DateTime? deletedAt,
|
required DateTime? deletedAt,
|
||||||
|
|||||||
@@ -2553,9 +2553,9 @@ $SnWalletSubscriptionCopyWith<$Res>? get subscription {
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$SnWalletFund {
|
mixin _$SnWalletFund {
|
||||||
|
|
||||||
String get id; String get currency; double get totalAmount; int get splitType;// 0: even, 1: random
|
String get id; String get currency; double get totalAmount; double get remainingAmount; int get amountOfSplits; int get splitType;// 0: even, 1: random
|
||||||
int get status;// 0: created, 1: partially claimed, 2: fully claimed, 3: expired
|
int get status;// 0: created, 1: partially claimed, 2: fully claimed, 3: expired
|
||||||
String? get message; String get creatorAccountId; SnAccount? get creatorAccount; DateTime get expiredAt; List<SnWalletFundRecipient> get recipients; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
String? get message; String get creatorAccountId; SnAccount? get creatorAccount; DateTime get expiredAt; List<SnWalletFundRecipient> get recipients; bool get isOpen; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
||||||
/// Create a copy of SnWalletFund
|
/// Create a copy of SnWalletFund
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -2568,16 +2568,16 @@ $SnWalletFundCopyWith<SnWalletFund> get copyWith => _$SnWalletFundCopyWithImpl<S
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnWalletFund&&(identical(other.id, id) || other.id == id)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.splitType, splitType) || other.splitType == splitType)&&(identical(other.status, status) || other.status == status)&&(identical(other.message, message) || other.message == message)&&(identical(other.creatorAccountId, creatorAccountId) || other.creatorAccountId == creatorAccountId)&&(identical(other.creatorAccount, creatorAccount) || other.creatorAccount == creatorAccount)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&const DeepCollectionEquality().equals(other.recipients, recipients)&&(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 SnWalletFund&&(identical(other.id, id) || other.id == id)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.remainingAmount, remainingAmount) || other.remainingAmount == remainingAmount)&&(identical(other.amountOfSplits, amountOfSplits) || other.amountOfSplits == amountOfSplits)&&(identical(other.splitType, splitType) || other.splitType == splitType)&&(identical(other.status, status) || other.status == status)&&(identical(other.message, message) || other.message == message)&&(identical(other.creatorAccountId, creatorAccountId) || other.creatorAccountId == creatorAccountId)&&(identical(other.creatorAccount, creatorAccount) || other.creatorAccount == creatorAccount)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&const DeepCollectionEquality().equals(other.recipients, recipients)&&(identical(other.isOpen, isOpen) || other.isOpen == isOpen)&&(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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,id,currency,totalAmount,splitType,status,message,creatorAccountId,creatorAccount,expiredAt,const DeepCollectionEquality().hash(recipients),createdAt,updatedAt,deletedAt);
|
int get hashCode => Object.hash(runtimeType,id,currency,totalAmount,remainingAmount,amountOfSplits,splitType,status,message,creatorAccountId,creatorAccount,expiredAt,const DeepCollectionEquality().hash(recipients),isOpen,createdAt,updatedAt,deletedAt);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnWalletFund(id: $id, currency: $currency, totalAmount: $totalAmount, splitType: $splitType, status: $status, message: $message, creatorAccountId: $creatorAccountId, creatorAccount: $creatorAccount, expiredAt: $expiredAt, recipients: $recipients, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
return 'SnWalletFund(id: $id, currency: $currency, totalAmount: $totalAmount, remainingAmount: $remainingAmount, amountOfSplits: $amountOfSplits, splitType: $splitType, status: $status, message: $message, creatorAccountId: $creatorAccountId, creatorAccount: $creatorAccount, expiredAt: $expiredAt, recipients: $recipients, isOpen: $isOpen, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2588,7 +2588,7 @@ abstract mixin class $SnWalletFundCopyWith<$Res> {
|
|||||||
factory $SnWalletFundCopyWith(SnWalletFund value, $Res Function(SnWalletFund) _then) = _$SnWalletFundCopyWithImpl;
|
factory $SnWalletFundCopyWith(SnWalletFund value, $Res Function(SnWalletFund) _then) = _$SnWalletFundCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
String id, String currency, double totalAmount, int splitType, int status, String? message, String creatorAccountId, SnAccount? creatorAccount, DateTime expiredAt, List<SnWalletFundRecipient> recipients, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
String id, String currency, double totalAmount, double remainingAmount, int amountOfSplits, int splitType, int status, String? message, String creatorAccountId, SnAccount? creatorAccount, DateTime expiredAt, List<SnWalletFundRecipient> recipients, bool isOpen, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -2605,19 +2605,22 @@ class _$SnWalletFundCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnWalletFund
|
/// Create a copy of SnWalletFund
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? currency = null,Object? totalAmount = null,Object? splitType = null,Object? status = null,Object? message = freezed,Object? creatorAccountId = null,Object? creatorAccount = freezed,Object? expiredAt = null,Object? recipients = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? currency = null,Object? totalAmount = null,Object? remainingAmount = null,Object? amountOfSplits = null,Object? splitType = null,Object? status = null,Object? message = freezed,Object? creatorAccountId = null,Object? creatorAccount = freezed,Object? expiredAt = null,Object? recipients = null,Object? isOpen = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
as String,currency: null == currency ? _self.currency : currency // ignore: cast_nullable_to_non_nullable
|
as String,currency: null == currency ? _self.currency : currency // ignore: cast_nullable_to_non_nullable
|
||||||
as String,totalAmount: null == totalAmount ? _self.totalAmount : totalAmount // ignore: cast_nullable_to_non_nullable
|
as String,totalAmount: null == totalAmount ? _self.totalAmount : totalAmount // ignore: cast_nullable_to_non_nullable
|
||||||
as double,splitType: null == splitType ? _self.splitType : splitType // ignore: cast_nullable_to_non_nullable
|
as double,remainingAmount: null == remainingAmount ? _self.remainingAmount : remainingAmount // ignore: cast_nullable_to_non_nullable
|
||||||
|
as double,amountOfSplits: null == amountOfSplits ? _self.amountOfSplits : amountOfSplits // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,splitType: null == splitType ? _self.splitType : splitType // ignore: cast_nullable_to_non_nullable
|
||||||
as int,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
as int,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||||
as int,message: freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
|
as int,message: freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,creatorAccountId: null == creatorAccountId ? _self.creatorAccountId : creatorAccountId // ignore: cast_nullable_to_non_nullable
|
as String?,creatorAccountId: null == creatorAccountId ? _self.creatorAccountId : creatorAccountId // ignore: cast_nullable_to_non_nullable
|
||||||
as String,creatorAccount: freezed == creatorAccount ? _self.creatorAccount : creatorAccount // ignore: cast_nullable_to_non_nullable
|
as String,creatorAccount: freezed == creatorAccount ? _self.creatorAccount : creatorAccount // ignore: cast_nullable_to_non_nullable
|
||||||
as SnAccount?,expiredAt: null == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
as SnAccount?,expiredAt: null == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime,recipients: null == recipients ? _self.recipients : recipients // ignore: cast_nullable_to_non_nullable
|
as DateTime,recipients: null == recipients ? _self.recipients : recipients // ignore: cast_nullable_to_non_nullable
|
||||||
as List<SnWalletFundRecipient>,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
as List<SnWalletFundRecipient>,isOpen: null == isOpen ? _self.isOpen : isOpen // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,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,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,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime?,
|
as DateTime?,
|
||||||
@@ -2714,10 +2717,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String currency, double totalAmount, int splitType, int status, String? message, String creatorAccountId, SnAccount? creatorAccount, DateTime expiredAt, List<SnWalletFundRecipient> recipients, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String currency, double totalAmount, double remainingAmount, int amountOfSplits, int splitType, int status, String? message, String creatorAccountId, SnAccount? creatorAccount, DateTime expiredAt, List<SnWalletFundRecipient> recipients, bool isOpen, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnWalletFund() when $default != null:
|
case _SnWalletFund() when $default != null:
|
||||||
return $default(_that.id,_that.currency,_that.totalAmount,_that.splitType,_that.status,_that.message,_that.creatorAccountId,_that.creatorAccount,_that.expiredAt,_that.recipients,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
return $default(_that.id,_that.currency,_that.totalAmount,_that.remainingAmount,_that.amountOfSplits,_that.splitType,_that.status,_that.message,_that.creatorAccountId,_that.creatorAccount,_that.expiredAt,_that.recipients,_that.isOpen,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2735,10 +2738,10 @@ return $default(_that.id,_that.currency,_that.totalAmount,_that.splitType,_that.
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String currency, double totalAmount, int splitType, int status, String? message, String creatorAccountId, SnAccount? creatorAccount, DateTime expiredAt, List<SnWalletFundRecipient> recipients, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String currency, double totalAmount, double remainingAmount, int amountOfSplits, int splitType, int status, String? message, String creatorAccountId, SnAccount? creatorAccount, DateTime expiredAt, List<SnWalletFundRecipient> recipients, bool isOpen, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnWalletFund():
|
case _SnWalletFund():
|
||||||
return $default(_that.id,_that.currency,_that.totalAmount,_that.splitType,_that.status,_that.message,_that.creatorAccountId,_that.creatorAccount,_that.expiredAt,_that.recipients,_that.createdAt,_that.updatedAt,_that.deletedAt);}
|
return $default(_that.id,_that.currency,_that.totalAmount,_that.remainingAmount,_that.amountOfSplits,_that.splitType,_that.status,_that.message,_that.creatorAccountId,_that.creatorAccount,_that.expiredAt,_that.recipients,_that.isOpen,_that.createdAt,_that.updatedAt,_that.deletedAt);}
|
||||||
}
|
}
|
||||||
/// A variant of `when` that fallback to returning `null`
|
/// A variant of `when` that fallback to returning `null`
|
||||||
///
|
///
|
||||||
@@ -2752,10 +2755,10 @@ return $default(_that.id,_that.currency,_that.totalAmount,_that.splitType,_that.
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String currency, double totalAmount, int splitType, int status, String? message, String creatorAccountId, SnAccount? creatorAccount, DateTime expiredAt, List<SnWalletFundRecipient> recipients, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String currency, double totalAmount, double remainingAmount, int amountOfSplits, int splitType, int status, String? message, String creatorAccountId, SnAccount? creatorAccount, DateTime expiredAt, List<SnWalletFundRecipient> recipients, bool isOpen, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnWalletFund() when $default != null:
|
case _SnWalletFund() when $default != null:
|
||||||
return $default(_that.id,_that.currency,_that.totalAmount,_that.splitType,_that.status,_that.message,_that.creatorAccountId,_that.creatorAccount,_that.expiredAt,_that.recipients,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
return $default(_that.id,_that.currency,_that.totalAmount,_that.remainingAmount,_that.amountOfSplits,_that.splitType,_that.status,_that.message,_that.creatorAccountId,_that.creatorAccount,_that.expiredAt,_that.recipients,_that.isOpen,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2767,12 +2770,14 @@ return $default(_that.id,_that.currency,_that.totalAmount,_that.splitType,_that.
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _SnWalletFund implements SnWalletFund {
|
class _SnWalletFund implements SnWalletFund {
|
||||||
const _SnWalletFund({required this.id, required this.currency, required this.totalAmount, required this.splitType, required this.status, required this.message, required this.creatorAccountId, required this.creatorAccount, required this.expiredAt, required final List<SnWalletFundRecipient> recipients, required this.createdAt, required this.updatedAt, required this.deletedAt}): _recipients = recipients;
|
const _SnWalletFund({required this.id, required this.currency, required this.totalAmount, required this.remainingAmount, required this.amountOfSplits, required this.splitType, required this.status, required this.message, required this.creatorAccountId, required this.creatorAccount, required this.expiredAt, required final List<SnWalletFundRecipient> recipients, required this.isOpen, required this.createdAt, required this.updatedAt, required this.deletedAt}): _recipients = recipients;
|
||||||
factory _SnWalletFund.fromJson(Map<String, dynamic> json) => _$SnWalletFundFromJson(json);
|
factory _SnWalletFund.fromJson(Map<String, dynamic> json) => _$SnWalletFundFromJson(json);
|
||||||
|
|
||||||
@override final String id;
|
@override final String id;
|
||||||
@override final String currency;
|
@override final String currency;
|
||||||
@override final double totalAmount;
|
@override final double totalAmount;
|
||||||
|
@override final double remainingAmount;
|
||||||
|
@override final int amountOfSplits;
|
||||||
@override final int splitType;
|
@override final int splitType;
|
||||||
// 0: even, 1: random
|
// 0: even, 1: random
|
||||||
@override final int status;
|
@override final int status;
|
||||||
@@ -2788,6 +2793,7 @@ class _SnWalletFund implements SnWalletFund {
|
|||||||
return EqualUnmodifiableListView(_recipients);
|
return EqualUnmodifiableListView(_recipients);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override final bool isOpen;
|
||||||
@override final DateTime createdAt;
|
@override final DateTime createdAt;
|
||||||
@override final DateTime updatedAt;
|
@override final DateTime updatedAt;
|
||||||
@override final DateTime? deletedAt;
|
@override final DateTime? deletedAt;
|
||||||
@@ -2805,16 +2811,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnWalletFund&&(identical(other.id, id) || other.id == id)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.splitType, splitType) || other.splitType == splitType)&&(identical(other.status, status) || other.status == status)&&(identical(other.message, message) || other.message == message)&&(identical(other.creatorAccountId, creatorAccountId) || other.creatorAccountId == creatorAccountId)&&(identical(other.creatorAccount, creatorAccount) || other.creatorAccount == creatorAccount)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&const DeepCollectionEquality().equals(other._recipients, _recipients)&&(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 _SnWalletFund&&(identical(other.id, id) || other.id == id)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.remainingAmount, remainingAmount) || other.remainingAmount == remainingAmount)&&(identical(other.amountOfSplits, amountOfSplits) || other.amountOfSplits == amountOfSplits)&&(identical(other.splitType, splitType) || other.splitType == splitType)&&(identical(other.status, status) || other.status == status)&&(identical(other.message, message) || other.message == message)&&(identical(other.creatorAccountId, creatorAccountId) || other.creatorAccountId == creatorAccountId)&&(identical(other.creatorAccount, creatorAccount) || other.creatorAccount == creatorAccount)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&const DeepCollectionEquality().equals(other._recipients, _recipients)&&(identical(other.isOpen, isOpen) || other.isOpen == isOpen)&&(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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,id,currency,totalAmount,splitType,status,message,creatorAccountId,creatorAccount,expiredAt,const DeepCollectionEquality().hash(_recipients),createdAt,updatedAt,deletedAt);
|
int get hashCode => Object.hash(runtimeType,id,currency,totalAmount,remainingAmount,amountOfSplits,splitType,status,message,creatorAccountId,creatorAccount,expiredAt,const DeepCollectionEquality().hash(_recipients),isOpen,createdAt,updatedAt,deletedAt);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnWalletFund(id: $id, currency: $currency, totalAmount: $totalAmount, splitType: $splitType, status: $status, message: $message, creatorAccountId: $creatorAccountId, creatorAccount: $creatorAccount, expiredAt: $expiredAt, recipients: $recipients, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
return 'SnWalletFund(id: $id, currency: $currency, totalAmount: $totalAmount, remainingAmount: $remainingAmount, amountOfSplits: $amountOfSplits, splitType: $splitType, status: $status, message: $message, creatorAccountId: $creatorAccountId, creatorAccount: $creatorAccount, expiredAt: $expiredAt, recipients: $recipients, isOpen: $isOpen, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2825,7 +2831,7 @@ abstract mixin class _$SnWalletFundCopyWith<$Res> implements $SnWalletFundCopyWi
|
|||||||
factory _$SnWalletFundCopyWith(_SnWalletFund value, $Res Function(_SnWalletFund) _then) = __$SnWalletFundCopyWithImpl;
|
factory _$SnWalletFundCopyWith(_SnWalletFund value, $Res Function(_SnWalletFund) _then) = __$SnWalletFundCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
String id, String currency, double totalAmount, int splitType, int status, String? message, String creatorAccountId, SnAccount? creatorAccount, DateTime expiredAt, List<SnWalletFundRecipient> recipients, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
String id, String currency, double totalAmount, double remainingAmount, int amountOfSplits, int splitType, int status, String? message, String creatorAccountId, SnAccount? creatorAccount, DateTime expiredAt, List<SnWalletFundRecipient> recipients, bool isOpen, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -2842,19 +2848,22 @@ class __$SnWalletFundCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnWalletFund
|
/// Create a copy of SnWalletFund
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? currency = null,Object? totalAmount = null,Object? splitType = null,Object? status = null,Object? message = freezed,Object? creatorAccountId = null,Object? creatorAccount = freezed,Object? expiredAt = null,Object? recipients = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? currency = null,Object? totalAmount = null,Object? remainingAmount = null,Object? amountOfSplits = null,Object? splitType = null,Object? status = null,Object? message = freezed,Object? creatorAccountId = null,Object? creatorAccount = freezed,Object? expiredAt = null,Object? recipients = null,Object? isOpen = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||||
return _then(_SnWalletFund(
|
return _then(_SnWalletFund(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
as String,currency: null == currency ? _self.currency : currency // ignore: cast_nullable_to_non_nullable
|
as String,currency: null == currency ? _self.currency : currency // ignore: cast_nullable_to_non_nullable
|
||||||
as String,totalAmount: null == totalAmount ? _self.totalAmount : totalAmount // ignore: cast_nullable_to_non_nullable
|
as String,totalAmount: null == totalAmount ? _self.totalAmount : totalAmount // ignore: cast_nullable_to_non_nullable
|
||||||
as double,splitType: null == splitType ? _self.splitType : splitType // ignore: cast_nullable_to_non_nullable
|
as double,remainingAmount: null == remainingAmount ? _self.remainingAmount : remainingAmount // ignore: cast_nullable_to_non_nullable
|
||||||
|
as double,amountOfSplits: null == amountOfSplits ? _self.amountOfSplits : amountOfSplits // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,splitType: null == splitType ? _self.splitType : splitType // ignore: cast_nullable_to_non_nullable
|
||||||
as int,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
as int,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||||
as int,message: freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
|
as int,message: freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,creatorAccountId: null == creatorAccountId ? _self.creatorAccountId : creatorAccountId // ignore: cast_nullable_to_non_nullable
|
as String?,creatorAccountId: null == creatorAccountId ? _self.creatorAccountId : creatorAccountId // ignore: cast_nullable_to_non_nullable
|
||||||
as String,creatorAccount: freezed == creatorAccount ? _self.creatorAccount : creatorAccount // ignore: cast_nullable_to_non_nullable
|
as String,creatorAccount: freezed == creatorAccount ? _self.creatorAccount : creatorAccount // ignore: cast_nullable_to_non_nullable
|
||||||
as SnAccount?,expiredAt: null == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
as SnAccount?,expiredAt: null == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime,recipients: null == recipients ? _self._recipients : recipients // ignore: cast_nullable_to_non_nullable
|
as DateTime,recipients: null == recipients ? _self._recipients : recipients // ignore: cast_nullable_to_non_nullable
|
||||||
as List<SnWalletFundRecipient>,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
as List<SnWalletFundRecipient>,isOpen: null == isOpen ? _self.isOpen : isOpen // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,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,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,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime?,
|
as DateTime?,
|
||||||
|
|||||||
@@ -8,21 +8,18 @@ part of 'wallet.dart';
|
|||||||
|
|
||||||
_SnWallet _$SnWalletFromJson(Map<String, dynamic> json) => _SnWallet(
|
_SnWallet _$SnWalletFromJson(Map<String, dynamic> json) => _SnWallet(
|
||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
pockets:
|
pockets: (json['pockets'] as List<dynamic>)
|
||||||
(json['pockets'] as List<dynamic>)
|
.map((e) => SnWalletPocket.fromJson(e as Map<String, dynamic>))
|
||||||
.map((e) => SnWalletPocket.fromJson(e as Map<String, dynamic>))
|
.toList(),
|
||||||
.toList(),
|
|
||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
account:
|
account: json['account'] == null
|
||||||
json['account'] == null
|
? null
|
||||||
? null
|
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnWalletToJson(_SnWallet instance) => <String, dynamic>{
|
Map<String, dynamic> _$SnWalletToJson(_SnWallet instance) => <String, dynamic>{
|
||||||
@@ -77,10 +74,9 @@ _SnWalletPocket _$SnWalletPocketFromJson(Map<String, dynamic> json) =>
|
|||||||
walletId: json['wallet_id'] as String,
|
walletId: json['wallet_id'] as String,
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnWalletPocketToJson(_SnWalletPocket instance) =>
|
Map<String, dynamic> _$SnWalletPocketToJson(_SnWalletPocket instance) =>
|
||||||
@@ -102,21 +98,18 @@ _SnTransaction _$SnTransactionFromJson(Map<String, dynamic> json) =>
|
|||||||
remarks: json['remarks'] as String?,
|
remarks: json['remarks'] as String?,
|
||||||
type: (json['type'] as num).toInt(),
|
type: (json['type'] as num).toInt(),
|
||||||
payerWalletId: json['payer_wallet_id'] as String?,
|
payerWalletId: json['payer_wallet_id'] as String?,
|
||||||
payerWallet:
|
payerWallet: json['payer_wallet'] == null
|
||||||
json['payer_wallet'] == null
|
? null
|
||||||
? null
|
: SnWallet.fromJson(json['payer_wallet'] as Map<String, dynamic>),
|
||||||
: SnWallet.fromJson(json['payer_wallet'] as Map<String, dynamic>),
|
|
||||||
payeeWalletId: json['payee_wallet_id'] as String?,
|
payeeWalletId: json['payee_wallet_id'] as String?,
|
||||||
payeeWallet:
|
payeeWallet: json['payee_wallet'] == null
|
||||||
json['payee_wallet'] == null
|
? null
|
||||||
? null
|
: SnWallet.fromJson(json['payee_wallet'] as Map<String, dynamic>),
|
||||||
: SnWallet.fromJson(json['payee_wallet'] as Map<String, dynamic>),
|
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnTransactionToJson(_SnTransaction instance) =>
|
Map<String, dynamic> _$SnTransactionToJson(_SnTransaction instance) =>
|
||||||
@@ -140,10 +133,9 @@ _SnWalletSubscription _$SnWalletSubscriptionFromJson(
|
|||||||
) => _SnWalletSubscription(
|
) => _SnWalletSubscription(
|
||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
begunAt: DateTime.parse(json['begun_at'] as String),
|
begunAt: DateTime.parse(json['begun_at'] as String),
|
||||||
endedAt:
|
endedAt: json['ended_at'] == null
|
||||||
json['ended_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['ended_at'] as String),
|
||||||
: DateTime.parse(json['ended_at'] as String),
|
|
||||||
identifier: json['identifier'] as String,
|
identifier: json['identifier'] as String,
|
||||||
isActive: json['is_active'] as bool? ?? true,
|
isActive: json['is_active'] as bool? ?? true,
|
||||||
isFreeTrial: json['is_free_trial'] as bool? ?? false,
|
isFreeTrial: json['is_free_trial'] as bool? ?? false,
|
||||||
@@ -153,23 +145,20 @@ _SnWalletSubscription _$SnWalletSubscriptionFromJson(
|
|||||||
basePrice: (json['base_price'] as num?)?.toDouble(),
|
basePrice: (json['base_price'] as num?)?.toDouble(),
|
||||||
couponId: json['coupon_id'] as String?,
|
couponId: json['coupon_id'] as String?,
|
||||||
coupon: json['coupon'],
|
coupon: json['coupon'],
|
||||||
renewalAt:
|
renewalAt: json['renewal_at'] == null
|
||||||
json['renewal_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['renewal_at'] as String),
|
||||||
: DateTime.parse(json['renewal_at'] as String),
|
|
||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
account:
|
account: json['account'] == null
|
||||||
json['account'] == null
|
? null
|
||||||
? null
|
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
|
||||||
isAvailable: json['is_available'] as bool? ?? true,
|
isAvailable: json['is_available'] as bool? ?? true,
|
||||||
finalPrice: (json['final_price'] as num?)?.toDouble(),
|
finalPrice: (json['final_price'] as num?)?.toDouble(),
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnWalletSubscriptionToJson(
|
Map<String, dynamic> _$SnWalletSubscriptionToJson(
|
||||||
@@ -204,10 +193,9 @@ _SnWalletSubscriptionRef _$SnWalletSubscriptionRefFromJson(
|
|||||||
isActive: json['is_active'] as bool,
|
isActive: json['is_active'] as bool,
|
||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
identifier: json['identifier'] as String,
|
identifier: json['identifier'] as String,
|
||||||
);
|
);
|
||||||
@@ -239,10 +227,9 @@ _SnWalletOrder _$SnWalletOrderFromJson(Map<String, dynamic> json) =>
|
|||||||
issuerAppId: json['issuer_app_id'] as String?,
|
issuerAppId: json['issuer_app_id'] as String?,
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnWalletOrderToJson(_SnWalletOrder instance) =>
|
Map<String, dynamic> _$SnWalletOrderToJson(_SnWalletOrder instance) =>
|
||||||
@@ -269,43 +256,36 @@ _SnWalletGift _$SnWalletGiftFromJson(Map<String, dynamic> json) =>
|
|||||||
giftCode: json['gift_code'] as String,
|
giftCode: json['gift_code'] as String,
|
||||||
subscriptionIdentifier: json['subscription_identifier'] as String,
|
subscriptionIdentifier: json['subscription_identifier'] as String,
|
||||||
recipientId: json['recipient_id'] as String?,
|
recipientId: json['recipient_id'] as String?,
|
||||||
recipient:
|
recipient: json['recipient'] == null
|
||||||
json['recipient'] == null
|
? null
|
||||||
? null
|
: SnAccount.fromJson(json['recipient'] as Map<String, dynamic>),
|
||||||
: SnAccount.fromJson(json['recipient'] as Map<String, dynamic>),
|
|
||||||
gifterId: json['gifter_id'] as String,
|
gifterId: json['gifter_id'] as String,
|
||||||
gifter:
|
gifter: json['gifter'] == null
|
||||||
json['gifter'] == null
|
? null
|
||||||
? null
|
: SnAccount.fromJson(json['gifter'] as Map<String, dynamic>),
|
||||||
: SnAccount.fromJson(json['gifter'] as Map<String, dynamic>),
|
|
||||||
redeemerId: json['redeemer_id'] as String?,
|
redeemerId: json['redeemer_id'] as String?,
|
||||||
redeemer:
|
redeemer: json['redeemer'] == null
|
||||||
json['redeemer'] == null
|
? null
|
||||||
? null
|
: SnAccount.fromJson(json['redeemer'] as Map<String, dynamic>),
|
||||||
: SnAccount.fromJson(json['redeemer'] as Map<String, dynamic>),
|
|
||||||
message: json['message'] as String?,
|
message: json['message'] as String?,
|
||||||
status: (json['status'] as num).toInt(),
|
status: (json['status'] as num).toInt(),
|
||||||
redeemedAt:
|
redeemedAt: json['redeemed_at'] == null
|
||||||
json['redeemed_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['redeemed_at'] as String),
|
||||||
: DateTime.parse(json['redeemed_at'] as String),
|
expiredAt: json['expired_at'] == null
|
||||||
expiredAt:
|
? null
|
||||||
json['expired_at'] == null
|
: DateTime.parse(json['expired_at'] as String),
|
||||||
? null
|
|
||||||
: DateTime.parse(json['expired_at'] as String),
|
|
||||||
subscriptionId: json['subscription_id'] as String?,
|
subscriptionId: json['subscription_id'] as String?,
|
||||||
subscription:
|
subscription: json['subscription'] == null
|
||||||
json['subscription'] == null
|
? null
|
||||||
? null
|
: SnWalletSubscription.fromJson(
|
||||||
: SnWalletSubscription.fromJson(
|
json['subscription'] as Map<String, dynamic>,
|
||||||
json['subscription'] as Map<String, dynamic>,
|
),
|
||||||
),
|
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnWalletGiftToJson(_SnWalletGift instance) =>
|
Map<String, dynamic> _$SnWalletGiftToJson(_SnWalletGift instance) =>
|
||||||
@@ -330,38 +310,39 @@ Map<String, dynamic> _$SnWalletGiftToJson(_SnWalletGift instance) =>
|
|||||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||||
};
|
};
|
||||||
|
|
||||||
_SnWalletFund _$SnWalletFundFromJson(
|
_SnWalletFund _$SnWalletFundFromJson(Map<String, dynamic> json) =>
|
||||||
Map<String, dynamic> json,
|
_SnWalletFund(
|
||||||
) => _SnWalletFund(
|
id: json['id'] as String,
|
||||||
id: json['id'] as String,
|
currency: json['currency'] as String,
|
||||||
currency: json['currency'] as String,
|
totalAmount: (json['total_amount'] as num).toDouble(),
|
||||||
totalAmount: (json['total_amount'] as num).toDouble(),
|
remainingAmount: (json['remaining_amount'] as num).toDouble(),
|
||||||
splitType: (json['split_type'] as num).toInt(),
|
amountOfSplits: (json['amount_of_splits'] as num).toInt(),
|
||||||
status: (json['status'] as num).toInt(),
|
splitType: (json['split_type'] as num).toInt(),
|
||||||
message: json['message'] as String?,
|
status: (json['status'] as num).toInt(),
|
||||||
creatorAccountId: json['creator_account_id'] as String,
|
message: json['message'] as String?,
|
||||||
creatorAccount:
|
creatorAccountId: json['creator_account_id'] as String,
|
||||||
json['creator_account'] == null
|
creatorAccount: json['creator_account'] == null
|
||||||
? null
|
? null
|
||||||
: SnAccount.fromJson(json['creator_account'] as Map<String, dynamic>),
|
: SnAccount.fromJson(json['creator_account'] as Map<String, dynamic>),
|
||||||
expiredAt: DateTime.parse(json['expired_at'] as String),
|
expiredAt: DateTime.parse(json['expired_at'] as String),
|
||||||
recipients:
|
recipients: (json['recipients'] as List<dynamic>)
|
||||||
(json['recipients'] as List<dynamic>)
|
|
||||||
.map((e) => SnWalletFundRecipient.fromJson(e as Map<String, dynamic>))
|
.map((e) => SnWalletFundRecipient.fromJson(e as Map<String, dynamic>))
|
||||||
.toList(),
|
.toList(),
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
isOpen: json['is_open'] as bool,
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
deletedAt:
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
json['deleted_at'] == null
|
deletedAt: json['deleted_at'] == null
|
||||||
? null
|
? null
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnWalletFundToJson(_SnWalletFund instance) =>
|
Map<String, dynamic> _$SnWalletFundToJson(_SnWalletFund instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'id': instance.id,
|
'id': instance.id,
|
||||||
'currency': instance.currency,
|
'currency': instance.currency,
|
||||||
'total_amount': instance.totalAmount,
|
'total_amount': instance.totalAmount,
|
||||||
|
'remaining_amount': instance.remainingAmount,
|
||||||
|
'amount_of_splits': instance.amountOfSplits,
|
||||||
'split_type': instance.splitType,
|
'split_type': instance.splitType,
|
||||||
'status': instance.status,
|
'status': instance.status,
|
||||||
'message': instance.message,
|
'message': instance.message,
|
||||||
@@ -369,6 +350,7 @@ Map<String, dynamic> _$SnWalletFundToJson(_SnWalletFund instance) =>
|
|||||||
'creator_account': instance.creatorAccount?.toJson(),
|
'creator_account': instance.creatorAccount?.toJson(),
|
||||||
'expired_at': instance.expiredAt.toIso8601String(),
|
'expired_at': instance.expiredAt.toIso8601String(),
|
||||||
'recipients': instance.recipients.map((e) => e.toJson()).toList(),
|
'recipients': instance.recipients.map((e) => e.toJson()).toList(),
|
||||||
|
'is_open': instance.isOpen,
|
||||||
'created_at': instance.createdAt.toIso8601String(),
|
'created_at': instance.createdAt.toIso8601String(),
|
||||||
'updated_at': instance.updatedAt.toIso8601String(),
|
'updated_at': instance.updatedAt.toIso8601String(),
|
||||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||||
@@ -380,24 +362,19 @@ _SnWalletFundRecipient _$SnWalletFundRecipientFromJson(
|
|||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
fundId: json['fund_id'] as String,
|
fundId: json['fund_id'] as String,
|
||||||
recipientAccountId: json['recipient_account_id'] as String,
|
recipientAccountId: json['recipient_account_id'] as String,
|
||||||
recipientAccount:
|
recipientAccount: json['recipient_account'] == null
|
||||||
json['recipient_account'] == null
|
? null
|
||||||
? null
|
: SnAccount.fromJson(json['recipient_account'] as Map<String, dynamic>),
|
||||||
: SnAccount.fromJson(
|
|
||||||
json['recipient_account'] as Map<String, dynamic>,
|
|
||||||
),
|
|
||||||
amount: (json['amount'] as num).toDouble(),
|
amount: (json['amount'] as num).toDouble(),
|
||||||
isReceived: json['is_received'] as bool,
|
isReceived: json['is_received'] as bool,
|
||||||
receivedAt:
|
receivedAt: json['received_at'] == null
|
||||||
json['received_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['received_at'] as String),
|
||||||
: DateTime.parse(json['received_at'] as String),
|
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnWalletFundRecipientToJson(
|
Map<String, dynamic> _$SnWalletFundRecipientToJson(
|
||||||
@@ -419,33 +396,29 @@ _SnLotteryTicket _$SnLotteryTicketFromJson(Map<String, dynamic> json) =>
|
|||||||
_SnLotteryTicket(
|
_SnLotteryTicket(
|
||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
account:
|
account: json['account'] == null
|
||||||
json['account'] == null
|
? null
|
||||||
? null
|
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
regionOneNumbers: (json['region_one_numbers'] as List<dynamic>)
|
||||||
regionOneNumbers:
|
.map((e) => (e as num).toInt())
|
||||||
(json['region_one_numbers'] as List<dynamic>)
|
.toList(),
|
||||||
.map((e) => (e as num).toInt())
|
|
||||||
.toList(),
|
|
||||||
regionTwoNumber: (json['region_two_number'] as num).toInt(),
|
regionTwoNumber: (json['region_two_number'] as num).toInt(),
|
||||||
multiplier: (json['multiplier'] as num).toInt(),
|
multiplier: (json['multiplier'] as num).toInt(),
|
||||||
drawStatus: (json['draw_status'] as num).toInt(),
|
drawStatus: (json['draw_status'] as num).toInt(),
|
||||||
drawDate:
|
drawDate: json['draw_date'] == null
|
||||||
json['draw_date'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['draw_date'] as String),
|
||||||
: DateTime.parse(json['draw_date'] as String),
|
|
||||||
matchedRegionOneNumbers:
|
matchedRegionOneNumbers:
|
||||||
(json['matched_region_one_numbers'] as List<dynamic>?)
|
(json['matched_region_one_numbers'] as List<dynamic>?)
|
||||||
?.map((e) => (e as num).toInt())
|
?.map((e) => (e as num).toInt())
|
||||||
.toList(),
|
.toList(),
|
||||||
matchedRegionTwoNumber:
|
matchedRegionTwoNumber: (json['matched_region_two_number'] as num?)
|
||||||
(json['matched_region_two_number'] as num?)?.toInt(),
|
?.toInt(),
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnLotteryTicketToJson(_SnLotteryTicket instance) =>
|
Map<String, dynamic> _$SnLotteryTicketToJson(_SnLotteryTicket instance) =>
|
||||||
@@ -465,26 +438,24 @@ Map<String, dynamic> _$SnLotteryTicketToJson(_SnLotteryTicket instance) =>
|
|||||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||||
};
|
};
|
||||||
|
|
||||||
_SnLotteryRecord _$SnLotteryRecordFromJson(Map<String, dynamic> json) =>
|
_SnLotteryRecord _$SnLotteryRecordFromJson(
|
||||||
_SnLotteryRecord(
|
Map<String, dynamic> json,
|
||||||
id: json['id'] as String,
|
) => _SnLotteryRecord(
|
||||||
drawDate: DateTime.parse(json['draw_date'] as String),
|
id: json['id'] as String,
|
||||||
winningRegionOneNumbers:
|
drawDate: DateTime.parse(json['draw_date'] as String),
|
||||||
(json['winning_region_one_numbers'] as List<dynamic>)
|
winningRegionOneNumbers: (json['winning_region_one_numbers'] as List<dynamic>)
|
||||||
.map((e) => (e as num).toInt())
|
.map((e) => (e as num).toInt())
|
||||||
.toList(),
|
.toList(),
|
||||||
winningRegionTwoNumber:
|
winningRegionTwoNumber: (json['winning_region_two_number'] as num).toInt(),
|
||||||
(json['winning_region_two_number'] as num).toInt(),
|
totalTickets: (json['total_tickets'] as num).toInt(),
|
||||||
totalTickets: (json['total_tickets'] as num).toInt(),
|
totalPrizesAwarded: (json['total_prizes_awarded'] as num).toInt(),
|
||||||
totalPrizesAwarded: (json['total_prizes_awarded'] as num).toInt(),
|
totalPrizeAmount: (json['total_prize_amount'] as num).toDouble(),
|
||||||
totalPrizeAmount: (json['total_prize_amount'] as num).toDouble(),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
deletedAt: json['deleted_at'] == null
|
||||||
deletedAt:
|
? null
|
||||||
json['deleted_at'] == null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
? null
|
);
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$SnLotteryRecordToJson(_SnLotteryRecord instance) =>
|
Map<String, dynamic> _$SnLotteryRecordToJson(_SnLotteryRecord instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
|
|||||||
@@ -17,14 +17,12 @@ _SnWebFeed _$SnWebFeedFromJson(Map<String, dynamic> json) => _SnWebFeed(
|
|||||||
url: json['url'] as String,
|
url: json['url'] as String,
|
||||||
title: json['title'] as String,
|
title: json['title'] as String,
|
||||||
description: json['description'] as String?,
|
description: json['description'] as String?,
|
||||||
preview:
|
preview: json['preview'] == null
|
||||||
json['preview'] == null
|
? null
|
||||||
? null
|
: SnScrappedLink.fromJson(json['preview'] as Map<String, dynamic>),
|
||||||
: SnScrappedLink.fromJson(json['preview'] as Map<String, dynamic>),
|
config: json['config'] == null
|
||||||
config:
|
? const SnWebFeedConfig()
|
||||||
json['config'] == null
|
: SnWebFeedConfig.fromJson(json['config'] as Map<String, dynamic>),
|
||||||
? const SnWebFeedConfig()
|
|
||||||
: SnWebFeedConfig.fromJson(json['config'] as Map<String, dynamic>),
|
|
||||||
publisherId: json['publisher_id'] as String,
|
publisherId: json['publisher_id'] as String,
|
||||||
articles:
|
articles:
|
||||||
(json['articles'] as List<dynamic>?)
|
(json['articles'] as List<dynamic>?)
|
||||||
@@ -33,10 +31,9 @@ _SnWebFeed _$SnWebFeedFromJson(Map<String, dynamic> json) => _SnWebFeed(
|
|||||||
const [],
|
const [],
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnWebFeedToJson(_SnWebFeed instance) =>
|
Map<String, dynamic> _$SnWebFeedToJson(_SnWebFeed instance) =>
|
||||||
@@ -61,28 +58,22 @@ _SnWebArticle _$SnWebArticleFromJson(Map<String, dynamic> json) =>
|
|||||||
url: json['url'] as String,
|
url: json['url'] as String,
|
||||||
author: json['author'] as String?,
|
author: json['author'] as String?,
|
||||||
meta: json['meta'] as Map<String, dynamic>?,
|
meta: json['meta'] as Map<String, dynamic>?,
|
||||||
preview:
|
preview: json['preview'] == null
|
||||||
json['preview'] == null
|
? null
|
||||||
? null
|
: SnScrappedLink.fromJson(json['preview'] as Map<String, dynamic>),
|
||||||
: SnScrappedLink.fromJson(
|
feed: json['feed'] == null
|
||||||
json['preview'] as Map<String, dynamic>,
|
? null
|
||||||
),
|
: SnWebFeed.fromJson(json['feed'] as Map<String, dynamic>),
|
||||||
feed:
|
|
||||||
json['feed'] == null
|
|
||||||
? null
|
|
||||||
: SnWebFeed.fromJson(json['feed'] as Map<String, dynamic>),
|
|
||||||
content: json['content'] as String?,
|
content: json['content'] as String?,
|
||||||
publishedAt:
|
publishedAt: json['published_at'] == null
|
||||||
json['published_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['published_at'] as String),
|
||||||
: DateTime.parse(json['published_at'] as String),
|
|
||||||
feedId: json['feed_id'] as String,
|
feedId: json['feed_id'] as String,
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt: json['deleted_at'] == null
|
||||||
json['deleted_at'] == null
|
? null
|
||||||
? null
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
: DateTime.parse(json['deleted_at'] as String),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnWebArticleToJson(_SnWebArticle instance) =>
|
Map<String, dynamic> _$SnWebArticleToJson(_SnWebArticle instance) =>
|
||||||
|
|||||||
@@ -330,13 +330,127 @@ class ServerState {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ServerStateNotifier extends StateNotifier<ServerState> {
|
class ServerStateNotifier extends Notifier<ServerState> {
|
||||||
final ActivityRpcServer server;
|
late final ActivityRpcServer server;
|
||||||
final Dio apiClient;
|
late final Dio apiClient;
|
||||||
Timer? _renewalTimer;
|
Timer? _renewalTimer;
|
||||||
|
|
||||||
ServerStateNotifier(this.apiClient, this.server)
|
@override
|
||||||
: super(ServerState(status: 'Server not started'));
|
ServerState build() {
|
||||||
|
apiClient = ref.watch(apiClientProvider);
|
||||||
|
server = ActivityRpcServer({});
|
||||||
|
_setupHandlers();
|
||||||
|
ref.onDispose(() {
|
||||||
|
_stopRenewal();
|
||||||
|
server.stop();
|
||||||
|
});
|
||||||
|
return ServerState(status: 'Server not started');
|
||||||
|
}
|
||||||
|
|
||||||
|
void _setupHandlers() {
|
||||||
|
server.updateHandlers({
|
||||||
|
'connection': (socket) {
|
||||||
|
final clientId =
|
||||||
|
socket is _WsSocketWrapper
|
||||||
|
? socket.clientId
|
||||||
|
: (socket as IpcSocketWrapper).clientId;
|
||||||
|
updateStatus('Client connected (ID: $clientId)');
|
||||||
|
socket.send({
|
||||||
|
'cmd': 'DISPATCH',
|
||||||
|
'data': {
|
||||||
|
'v': 1,
|
||||||
|
'config': {
|
||||||
|
'cdn_host': 'fake.cdn',
|
||||||
|
'api_endpoint': '//fake.api',
|
||||||
|
'environment': 'dev',
|
||||||
|
},
|
||||||
|
'user': {
|
||||||
|
'id': 'fake_user_id',
|
||||||
|
'username': 'FakeUser',
|
||||||
|
'discriminator': '0001',
|
||||||
|
'avatar': null,
|
||||||
|
'bot': false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'evt': 'READY',
|
||||||
|
'nonce': '12345',
|
||||||
|
});
|
||||||
|
},
|
||||||
|
'message': (socket, dynamic data) async {
|
||||||
|
if (data['cmd'] == 'SET_ACTIVITY') {
|
||||||
|
final activity = data['args']['activity'];
|
||||||
|
final appId = 'rpc:${socket.clientId}';
|
||||||
|
|
||||||
|
final currentId = currentActivityManualId;
|
||||||
|
if (currentId != null && currentId != appId) {
|
||||||
|
talker.info(
|
||||||
|
'Skipped the new SET_ACTIVITY command due to there is one existing...',
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
addActivity('Activity: ${activity['details'] ?? 'Untitled'}');
|
||||||
|
// https://discord.com/developers/docs/topics/rpc#setactivity-set-activity-argument-structure
|
||||||
|
final type = switch (activity['type']) {
|
||||||
|
0 => 1, // Discord Playing -> Playing
|
||||||
|
2 => 2, // Discord Music -> Listening
|
||||||
|
3 => 2, // Discord Watching -> Listening
|
||||||
|
_ => 1, // Discord Competing (or null) -> Playing
|
||||||
|
};
|
||||||
|
final title = activity['name'] ?? activity['assets']?['small_text'];
|
||||||
|
final subtitle =
|
||||||
|
activity['details'] ?? activity['assets']?['large_text'];
|
||||||
|
var imageSmall = activity['assets']?['small_image'];
|
||||||
|
var imageLarge = activity['assets']?['large_image'];
|
||||||
|
if (imageSmall != null && !imageSmall!.contains(':')) {
|
||||||
|
imageSmall = 'discord:$imageSmall';
|
||||||
|
}
|
||||||
|
if (imageLarge != null && !imageLarge!.contains(':')) {
|
||||||
|
imageLarge = 'discord:$imageLarge';
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
final activityData = {
|
||||||
|
'type': type,
|
||||||
|
'manual_id': appId,
|
||||||
|
'title': title,
|
||||||
|
'subtitle': subtitle,
|
||||||
|
'caption': activity['state'],
|
||||||
|
'title_url': activity['assets']?['small_text_url'],
|
||||||
|
'subtitle_url': activity['assets']?['large_text_url'],
|
||||||
|
'small_image': imageSmall,
|
||||||
|
'large_image': imageLarge,
|
||||||
|
'meta': activity,
|
||||||
|
'lease_minutes': kPresenceActivityLease,
|
||||||
|
};
|
||||||
|
|
||||||
|
await apiClient.post('/pass/activities', data: activityData);
|
||||||
|
setCurrentActivity(appId, activityData);
|
||||||
|
} catch (e) {
|
||||||
|
talker.log('Failed to set remote activity status: $e');
|
||||||
|
}
|
||||||
|
socket.send({
|
||||||
|
'cmd': 'SET_ACTIVITY',
|
||||||
|
'data': data['args']['activity'],
|
||||||
|
'evt': null,
|
||||||
|
'nonce': data['nonce'],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'close': (socket) async {
|
||||||
|
updateStatus('Client disconnected');
|
||||||
|
final currentId = currentActivityManualId;
|
||||||
|
try {
|
||||||
|
await apiClient.delete(
|
||||||
|
'/pass/activities',
|
||||||
|
queryParameters: {'manualId': currentId},
|
||||||
|
);
|
||||||
|
setCurrentActivity(null, null);
|
||||||
|
} catch (e) {
|
||||||
|
talker.log('Failed to unset remote activity status: $e');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
String? get currentActivityManualId => state.currentActivityManualId;
|
String? get currentActivityManualId => state.currentActivityManualId;
|
||||||
|
|
||||||
@@ -408,119 +522,8 @@ class ServerStateNotifier extends StateNotifier<ServerState> {
|
|||||||
const kPresenceActivityLease = 5;
|
const kPresenceActivityLease = 5;
|
||||||
|
|
||||||
// Providers
|
// Providers
|
||||||
final rpcServerStateProvider = StateNotifierProvider<
|
final rpcServerStateProvider =
|
||||||
ServerStateNotifier,
|
NotifierProvider<ServerStateNotifier, ServerState>(ServerStateNotifier.new);
|
||||||
ServerState
|
|
||||||
>((ref) {
|
|
||||||
final apiClient = ref.watch(apiClientProvider);
|
|
||||||
final server = ActivityRpcServer({});
|
|
||||||
final notifier = ServerStateNotifier(apiClient, server);
|
|
||||||
server.updateHandlers({
|
|
||||||
'connection': (socket) {
|
|
||||||
final clientId =
|
|
||||||
socket is _WsSocketWrapper
|
|
||||||
? socket.clientId
|
|
||||||
: (socket as IpcSocketWrapper).clientId;
|
|
||||||
notifier.updateStatus('Client connected (ID: $clientId)');
|
|
||||||
socket.send({
|
|
||||||
'cmd': 'DISPATCH',
|
|
||||||
'data': {
|
|
||||||
'v': 1,
|
|
||||||
'config': {
|
|
||||||
'cdn_host': 'fake.cdn',
|
|
||||||
'api_endpoint': '//fake.api',
|
|
||||||
'environment': 'dev',
|
|
||||||
},
|
|
||||||
'user': {
|
|
||||||
'id': 'fake_user_id',
|
|
||||||
'username': 'FakeUser',
|
|
||||||
'discriminator': '0001',
|
|
||||||
'avatar': null,
|
|
||||||
'bot': false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'evt': 'READY',
|
|
||||||
'nonce': '12345',
|
|
||||||
});
|
|
||||||
},
|
|
||||||
'message': (socket, dynamic data) async {
|
|
||||||
if (data['cmd'] == 'SET_ACTIVITY') {
|
|
||||||
final activity = data['args']['activity'];
|
|
||||||
final appId = 'rpc:${socket.clientId}';
|
|
||||||
|
|
||||||
final currentId = notifier.currentActivityManualId;
|
|
||||||
if (currentId != null && currentId != appId) {
|
|
||||||
talker.info(
|
|
||||||
'Skipped the new SET_ACTIVITY command due to there is one existing...',
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
notifier.addActivity('Activity: ${activity['details'] ?? 'Untitled'}');
|
|
||||||
// https://discord.com/developers/docs/topics/rpc#setactivity-set-activity-argument-structure
|
|
||||||
final type = switch (activity['type']) {
|
|
||||||
0 => 1, // Discord Playing -> Playing
|
|
||||||
2 => 2, // Discord Music -> Listening
|
|
||||||
3 => 2, // Discord Watching -> Listening
|
|
||||||
_ => 1, // Discord Competing (or null) -> Playing
|
|
||||||
};
|
|
||||||
final title = activity['name'] ?? activity['assets']?['small_text'];
|
|
||||||
final subtitle =
|
|
||||||
activity['details'] ?? activity['assets']?['large_text'];
|
|
||||||
var imageSmall = activity['assets']?['small_image'];
|
|
||||||
var imageLarge = activity['assets']?['large_image'];
|
|
||||||
if (imageSmall != null && !imageSmall!.contains(':')) {
|
|
||||||
imageSmall = 'discord:$imageSmall';
|
|
||||||
}
|
|
||||||
if (imageLarge != null && !imageLarge!.contains(':')) {
|
|
||||||
imageLarge = 'discord:$imageLarge';
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
final apiClient = ref.watch(apiClientProvider);
|
|
||||||
final activityData = {
|
|
||||||
'type': type,
|
|
||||||
'manual_id': appId,
|
|
||||||
'title': title,
|
|
||||||
'subtitle': subtitle,
|
|
||||||
'caption': activity['state'],
|
|
||||||
'title_url': activity['assets']?['small_text_url'],
|
|
||||||
'subtitle_url': activity['assets']?['large_text_url'],
|
|
||||||
'small_image': imageSmall,
|
|
||||||
'large_image': imageLarge,
|
|
||||||
'meta': activity,
|
|
||||||
'lease_minutes': kPresenceActivityLease,
|
|
||||||
};
|
|
||||||
|
|
||||||
await apiClient.post('/pass/activities', data: activityData);
|
|
||||||
notifier.setCurrentActivity(appId, activityData);
|
|
||||||
} catch (e) {
|
|
||||||
talker.log('Failed to set remote activity status: $e');
|
|
||||||
}
|
|
||||||
socket.send({
|
|
||||||
'cmd': 'SET_ACTIVITY',
|
|
||||||
'data': data['args']['activity'],
|
|
||||||
'evt': null,
|
|
||||||
'nonce': data['nonce'],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'close': (socket) async {
|
|
||||||
notifier.updateStatus('Client disconnected');
|
|
||||||
final currentId = notifier.currentActivityManualId;
|
|
||||||
try {
|
|
||||||
final apiClient = ref.watch(apiClientProvider);
|
|
||||||
await apiClient.delete(
|
|
||||||
'/pass/activities',
|
|
||||||
queryParameters: {'manualId': currentId},
|
|
||||||
);
|
|
||||||
notifier.setCurrentActivity(null, null);
|
|
||||||
} catch (e) {
|
|
||||||
talker.log('Failed to unset remote activity status: $e');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
return notifier;
|
|
||||||
});
|
|
||||||
|
|
||||||
final rpcServerProvider = Provider<ActivityRpcServer>((ref) {
|
final rpcServerProvider = Provider<ActivityRpcServer>((ref) {
|
||||||
final notifier = ref.watch(rpcServerStateProvider.notifier);
|
final notifier = ref.watch(rpcServerStateProvider.notifier);
|
||||||
|
|||||||
@@ -6,152 +6,83 @@ part of 'activity_rpc.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$presenceActivitiesHash() =>
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
r'3bfaa638eeb961ecd62a32d6a7760a6a7e7bf6f2';
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// Copied from Dart SDK
|
|
||||||
class _SystemHash {
|
|
||||||
_SystemHash._();
|
|
||||||
|
|
||||||
static int combine(int hash, int value) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + value);
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
|
||||||
return hash ^ (hash >> 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int finish(int hash) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = hash ^ (hash >> 11);
|
|
||||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [presenceActivities].
|
|
||||||
@ProviderFor(presenceActivities)
|
@ProviderFor(presenceActivities)
|
||||||
const presenceActivitiesProvider = PresenceActivitiesFamily();
|
const presenceActivitiesProvider = PresenceActivitiesFamily._();
|
||||||
|
|
||||||
/// See also [presenceActivities].
|
final class PresenceActivitiesProvider
|
||||||
class PresenceActivitiesFamily
|
extends
|
||||||
extends Family<AsyncValue<List<SnPresenceActivity>>> {
|
$FunctionalProvider<
|
||||||
/// See also [presenceActivities].
|
AsyncValue<List<SnPresenceActivity>>,
|
||||||
const PresenceActivitiesFamily();
|
List<SnPresenceActivity>,
|
||||||
|
FutureOr<List<SnPresenceActivity>>
|
||||||
|
>
|
||||||
|
with
|
||||||
|
$FutureModifier<List<SnPresenceActivity>>,
|
||||||
|
$FutureProvider<List<SnPresenceActivity>> {
|
||||||
|
const PresenceActivitiesProvider._({
|
||||||
|
required PresenceActivitiesFamily super.from,
|
||||||
|
required String super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'presenceActivitiesProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
/// See also [presenceActivities].
|
@override
|
||||||
PresenceActivitiesProvider call(String uname) {
|
String debugGetCreateSourceHash() => _$presenceActivitiesHash();
|
||||||
return PresenceActivitiesProvider(uname);
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return r'presenceActivitiesProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
@override
|
@override
|
||||||
PresenceActivitiesProvider getProviderOverride(
|
$FutureProviderElement<List<SnPresenceActivity>> $createElement(
|
||||||
covariant PresenceActivitiesProvider provider,
|
$ProviderPointer pointer,
|
||||||
) {
|
) => $FutureProviderElement(pointer);
|
||||||
return call(provider.uname);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
FutureOr<List<SnPresenceActivity>> create(Ref ref) {
|
||||||
|
final argument = this.argument as String;
|
||||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
return presenceActivities(ref, argument);
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
|
||||||
_allTransitiveDependencies;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get name => r'presenceActivitiesProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [presenceActivities].
|
|
||||||
class PresenceActivitiesProvider
|
|
||||||
extends AutoDisposeFutureProvider<List<SnPresenceActivity>> {
|
|
||||||
/// See also [presenceActivities].
|
|
||||||
PresenceActivitiesProvider(String uname)
|
|
||||||
: this._internal(
|
|
||||||
(ref) => presenceActivities(ref as PresenceActivitiesRef, uname),
|
|
||||||
from: presenceActivitiesProvider,
|
|
||||||
name: r'presenceActivitiesProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$presenceActivitiesHash,
|
|
||||||
dependencies: PresenceActivitiesFamily._dependencies,
|
|
||||||
allTransitiveDependencies:
|
|
||||||
PresenceActivitiesFamily._allTransitiveDependencies,
|
|
||||||
uname: uname,
|
|
||||||
);
|
|
||||||
|
|
||||||
PresenceActivitiesProvider._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<List<SnPresenceActivity>> Function(PresenceActivitiesRef provider)
|
|
||||||
create,
|
|
||||||
) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
|
||||||
override: PresenceActivitiesProvider._internal(
|
|
||||||
(ref) => create(ref as PresenceActivitiesRef),
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
uname: uname,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
AutoDisposeFutureProviderElement<List<SnPresenceActivity>> createElement() {
|
|
||||||
return _PresenceActivitiesProviderElement(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is PresenceActivitiesProvider && other.uname == uname;
|
return other is PresenceActivitiesProvider && other.argument == argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
return argument.hashCode;
|
||||||
hash = _SystemHash.combine(hash, uname.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
String _$presenceActivitiesHash() =>
|
||||||
// ignore: unused_element
|
r'3bfaa638eeb961ecd62a32d6a7760a6a7e7bf6f2';
|
||||||
mixin PresenceActivitiesRef
|
|
||||||
on AutoDisposeFutureProviderRef<List<SnPresenceActivity>> {
|
|
||||||
/// The parameter `uname` of this provider.
|
|
||||||
String get uname;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _PresenceActivitiesProviderElement
|
final class PresenceActivitiesFamily extends $Family
|
||||||
extends AutoDisposeFutureProviderElement<List<SnPresenceActivity>>
|
with $FunctionalFamilyOverride<FutureOr<List<SnPresenceActivity>>, String> {
|
||||||
with PresenceActivitiesRef {
|
const PresenceActivitiesFamily._()
|
||||||
_PresenceActivitiesProviderElement(super.provider);
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'presenceActivitiesProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
PresenceActivitiesProvider call(String uname) =>
|
||||||
|
PresenceActivitiesProvider._(argument: uname, from: this);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get uname => (origin as PresenceActivitiesProvider).uname;
|
String toString() => r'presenceActivitiesProvider';
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
|
|
||||||
@@ -212,8 +212,14 @@ class CallNotifier extends _$CallNotifier {
|
|||||||
String? _roomId;
|
String? _roomId;
|
||||||
String? get roomId => _roomId;
|
String? get roomId => _roomId;
|
||||||
|
|
||||||
Future<void> joinRoom(String roomId) async {
|
SnChatRoom? _chatRoom;
|
||||||
if (_roomId == roomId && _room != null) {
|
SnChatRoom? get chatRoom => _chatRoom;
|
||||||
|
|
||||||
|
Future<void> joinRoom(SnChatRoom room) async {
|
||||||
|
var roomId = room.id;
|
||||||
|
if (_roomId == roomId &&
|
||||||
|
_room != null &&
|
||||||
|
_room?.connectionState == lk.ConnectionState.connected) {
|
||||||
talker.info('[Call] Call skipped. Already has data');
|
talker.info('[Call] Call skipped. Already has data');
|
||||||
return;
|
return;
|
||||||
} else if (_room != null) {
|
} else if (_room != null) {
|
||||||
@@ -223,6 +229,7 @@ class CallNotifier extends _$CallNotifier {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
_roomId = roomId;
|
_roomId = roomId;
|
||||||
|
_chatRoom = room;
|
||||||
if (_room != null) {
|
if (_room != null) {
|
||||||
await _room!.disconnect();
|
await _room!.disconnect();
|
||||||
await _room!.dispose();
|
await _room!.dispose();
|
||||||
@@ -355,6 +362,7 @@ class CallNotifier extends _$CallNotifier {
|
|||||||
sourceId: source.id,
|
sourceId: source.id,
|
||||||
maxFrameRate: 30.0,
|
maxFrameRate: 30.0,
|
||||||
captureScreenAudio: true,
|
captureScreenAudio: true,
|
||||||
|
useiOSBroadcastExtension: true,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
await _localParticipant!.publishVideoTrack(track);
|
await _localParticipant!.publishVideoTrack(track);
|
||||||
|
|||||||
@@ -6,19 +6,58 @@ part of 'call.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$callNotifierHash() => r'a8ca3f625c0db3ad9992033ae70864ce15efc281';
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// See also [CallNotifier].
|
|
||||||
@ProviderFor(CallNotifier)
|
@ProviderFor(CallNotifier)
|
||||||
final callNotifierProvider = NotifierProvider<CallNotifier, CallState>.internal(
|
const callProvider = CallNotifierProvider._();
|
||||||
CallNotifier.new,
|
|
||||||
name: r'callNotifierProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$callNotifierHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef _$CallNotifier = Notifier<CallState>;
|
final class CallNotifierProvider
|
||||||
// ignore_for_file: type=lint
|
extends $NotifierProvider<CallNotifier, CallState> {
|
||||||
// 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
|
const CallNotifierProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'callProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$callNotifierHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
CallNotifier create() => CallNotifier();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(CallState value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<CallState>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$callNotifierHash() => r'ef4e3e9c9d411cf9dce1ceb456a3b866b2c87db3';
|
||||||
|
|
||||||
|
abstract class _$CallNotifier extends $Notifier<CallState> {
|
||||||
|
CallState build();
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final created = build();
|
||||||
|
final ref = this.ref as $Ref<CallState, CallState>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<CallState, CallState>,
|
||||||
|
CallState,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,163 +6,97 @@ part of 'chat_online_count.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$chatOnlineCountNotifierHash() =>
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
r'19af8fd0e9f62c65e12a68215406776085235fa3';
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// Copied from Dart SDK
|
|
||||||
class _SystemHash {
|
|
||||||
_SystemHash._();
|
|
||||||
|
|
||||||
static int combine(int hash, int value) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + value);
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
|
||||||
return hash ^ (hash >> 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int finish(int hash) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = hash ^ (hash >> 11);
|
|
||||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class _$ChatOnlineCountNotifier
|
|
||||||
extends BuildlessAutoDisposeAsyncNotifier<int> {
|
|
||||||
late final String chatroomId;
|
|
||||||
|
|
||||||
FutureOr<int> build(String chatroomId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [ChatOnlineCountNotifier].
|
|
||||||
@ProviderFor(ChatOnlineCountNotifier)
|
@ProviderFor(ChatOnlineCountNotifier)
|
||||||
const chatOnlineCountNotifierProvider = ChatOnlineCountNotifierFamily();
|
const chatOnlineCountProvider = ChatOnlineCountNotifierFamily._();
|
||||||
|
|
||||||
/// See also [ChatOnlineCountNotifier].
|
final class ChatOnlineCountNotifierProvider
|
||||||
class ChatOnlineCountNotifierFamily extends Family<AsyncValue<int>> {
|
extends $AsyncNotifierProvider<ChatOnlineCountNotifier, int> {
|
||||||
/// See also [ChatOnlineCountNotifier].
|
const ChatOnlineCountNotifierProvider._({
|
||||||
const ChatOnlineCountNotifierFamily();
|
required ChatOnlineCountNotifierFamily super.from,
|
||||||
|
required String super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'chatOnlineCountProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
/// See also [ChatOnlineCountNotifier].
|
@override
|
||||||
ChatOnlineCountNotifierProvider call(String chatroomId) {
|
String debugGetCreateSourceHash() => _$chatOnlineCountNotifierHash();
|
||||||
return ChatOnlineCountNotifierProvider(chatroomId);
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return r'chatOnlineCountProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
@override
|
@override
|
||||||
ChatOnlineCountNotifierProvider getProviderOverride(
|
ChatOnlineCountNotifier create() => ChatOnlineCountNotifier();
|
||||||
covariant ChatOnlineCountNotifierProvider provider,
|
|
||||||
) {
|
|
||||||
return call(provider.chatroomId);
|
|
||||||
}
|
|
||||||
|
|
||||||
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'chatOnlineCountNotifierProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [ChatOnlineCountNotifier].
|
|
||||||
class ChatOnlineCountNotifierProvider
|
|
||||||
extends AutoDisposeAsyncNotifierProviderImpl<ChatOnlineCountNotifier, int> {
|
|
||||||
/// See also [ChatOnlineCountNotifier].
|
|
||||||
ChatOnlineCountNotifierProvider(String chatroomId)
|
|
||||||
: this._internal(
|
|
||||||
() => ChatOnlineCountNotifier()..chatroomId = chatroomId,
|
|
||||||
from: chatOnlineCountNotifierProvider,
|
|
||||||
name: r'chatOnlineCountNotifierProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$chatOnlineCountNotifierHash,
|
|
||||||
dependencies: ChatOnlineCountNotifierFamily._dependencies,
|
|
||||||
allTransitiveDependencies:
|
|
||||||
ChatOnlineCountNotifierFamily._allTransitiveDependencies,
|
|
||||||
chatroomId: chatroomId,
|
|
||||||
);
|
|
||||||
|
|
||||||
ChatOnlineCountNotifierProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.chatroomId,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final String chatroomId;
|
|
||||||
|
|
||||||
@override
|
|
||||||
FutureOr<int> runNotifierBuild(covariant ChatOnlineCountNotifier notifier) {
|
|
||||||
return notifier.build(chatroomId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Override overrideWith(ChatOnlineCountNotifier Function() create) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
|
||||||
override: ChatOnlineCountNotifierProvider._internal(
|
|
||||||
() => create()..chatroomId = chatroomId,
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
chatroomId: chatroomId,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
AutoDisposeAsyncNotifierProviderElement<ChatOnlineCountNotifier, int>
|
|
||||||
createElement() {
|
|
||||||
return _ChatOnlineCountNotifierProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is ChatOnlineCountNotifierProvider &&
|
return other is ChatOnlineCountNotifierProvider &&
|
||||||
other.chatroomId == chatroomId;
|
other.argument == argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
return argument.hashCode;
|
||||||
hash = _SystemHash.combine(hash, chatroomId.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
String _$chatOnlineCountNotifierHash() =>
|
||||||
// ignore: unused_element
|
r'19af8fd0e9f62c65e12a68215406776085235fa3';
|
||||||
mixin ChatOnlineCountNotifierRef on AutoDisposeAsyncNotifierProviderRef<int> {
|
|
||||||
/// The parameter `chatroomId` of this provider.
|
|
||||||
String get chatroomId;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _ChatOnlineCountNotifierProviderElement
|
final class ChatOnlineCountNotifierFamily extends $Family
|
||||||
extends
|
with
|
||||||
AutoDisposeAsyncNotifierProviderElement<ChatOnlineCountNotifier, int>
|
$ClassFamilyOverride<
|
||||||
with ChatOnlineCountNotifierRef {
|
ChatOnlineCountNotifier,
|
||||||
_ChatOnlineCountNotifierProviderElement(super.provider);
|
AsyncValue<int>,
|
||||||
|
int,
|
||||||
|
FutureOr<int>,
|
||||||
|
String
|
||||||
|
> {
|
||||||
|
const ChatOnlineCountNotifierFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'chatOnlineCountProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
ChatOnlineCountNotifierProvider call(String chatroomId) =>
|
||||||
|
ChatOnlineCountNotifierProvider._(argument: chatroomId, from: this);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get chatroomId =>
|
String toString() => r'chatOnlineCountProvider';
|
||||||
(origin as ChatOnlineCountNotifierProvider).chatroomId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
abstract class _$ChatOnlineCountNotifier extends $AsyncNotifier<int> {
|
||||||
// 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
|
late final _$args = ref.$arg as String;
|
||||||
|
String get chatroomId => _$args;
|
||||||
|
|
||||||
|
FutureOr<int> build(String chatroomId);
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final created = build(_$args);
|
||||||
|
final ref = this.ref as $Ref<AsyncValue<int>, int>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<AsyncValue<int>, int>,
|
||||||
|
AsyncValue<int>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
452
lib/pods/chat/chat_room.dart
Normal file
452
lib/pods/chat/chat_room.dart
Normal file
@@ -0,0 +1,452 @@
|
|||||||
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:island/database/drift_db.dart';
|
||||||
|
import 'package:island/models/account.dart';
|
||||||
|
import 'package:island/models/chat.dart';
|
||||||
|
import 'package:island/models/file.dart';
|
||||||
|
import 'package:island/models/realm.dart';
|
||||||
|
import 'package:island/pods/database.dart';
|
||||||
|
import 'package:island/pods/network.dart';
|
||||||
|
import 'package:island/pods/userinfo.dart';
|
||||||
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||||
|
|
||||||
|
part 'chat_room.g.dart';
|
||||||
|
|
||||||
|
final chatSyncingProvider = NotifierProvider<ChatSyncingNotifier, bool>(
|
||||||
|
ChatSyncingNotifier.new,
|
||||||
|
);
|
||||||
|
|
||||||
|
class ChatSyncingNotifier extends Notifier<bool> {
|
||||||
|
@override
|
||||||
|
bool build() => false;
|
||||||
|
|
||||||
|
void set(bool value) => state = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
final flashingMessagesProvider =
|
||||||
|
NotifierProvider<FlashingMessagesNotifier, Set<String>>(
|
||||||
|
FlashingMessagesNotifier.new,
|
||||||
|
);
|
||||||
|
|
||||||
|
class FlashingMessagesNotifier extends Notifier<Set<String>> {
|
||||||
|
@override
|
||||||
|
Set<String> build() => {};
|
||||||
|
|
||||||
|
void update(Set<String> Function(Set<String>) cb) {
|
||||||
|
state = cb(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
void clear() => state = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
@riverpod
|
||||||
|
class ChatRoomJoinedNotifier extends _$ChatRoomJoinedNotifier {
|
||||||
|
@override
|
||||||
|
Future<List<SnChatRoom>> build() async {
|
||||||
|
final db = ref.watch(databaseProvider);
|
||||||
|
|
||||||
|
try {
|
||||||
|
final localRoomsData = await db.select(db.chatRooms).get();
|
||||||
|
final localRealmsData = await db.select(db.realms).get();
|
||||||
|
if (localRoomsData.isNotEmpty) {
|
||||||
|
final localRooms = await Future.wait(
|
||||||
|
localRoomsData.map((row) async {
|
||||||
|
final membersRows = await (db.select(
|
||||||
|
db.chatMembers,
|
||||||
|
)..where((m) => m.chatRoomId.equals(row.id))).get();
|
||||||
|
final members = membersRows.map((mRow) {
|
||||||
|
final account = SnAccount.fromJson(mRow.account);
|
||||||
|
return SnChatMember(
|
||||||
|
id: mRow.id,
|
||||||
|
chatRoomId: mRow.chatRoomId,
|
||||||
|
accountId: mRow.accountId,
|
||||||
|
account: account,
|
||||||
|
nick: mRow.nick,
|
||||||
|
notify: mRow.notify,
|
||||||
|
joinedAt: mRow.joinedAt,
|
||||||
|
breakUntil: mRow.breakUntil,
|
||||||
|
timeoutUntil: mRow.timeoutUntil,
|
||||||
|
status: null,
|
||||||
|
createdAt: mRow.createdAt,
|
||||||
|
updatedAt: mRow.updatedAt,
|
||||||
|
deletedAt: mRow.deletedAt,
|
||||||
|
chatRoom: null,
|
||||||
|
);
|
||||||
|
}).toList();
|
||||||
|
return SnChatRoom(
|
||||||
|
id: row.id,
|
||||||
|
name: row.name,
|
||||||
|
description: row.description,
|
||||||
|
type: row.type,
|
||||||
|
isPublic: row.isPublic!,
|
||||||
|
isCommunity: row.isCommunity!,
|
||||||
|
picture: row.picture != null
|
||||||
|
? SnCloudFile.fromJson(row.picture!)
|
||||||
|
: null,
|
||||||
|
background: row.background != null
|
||||||
|
? SnCloudFile.fromJson(row.background!)
|
||||||
|
: null,
|
||||||
|
realmId: row.realmId,
|
||||||
|
accountId: row.accountId,
|
||||||
|
realm: localRealmsData
|
||||||
|
.where((e) => e.id == row.realmId)
|
||||||
|
.map((e) => _buildRealmFromTableEntry(e))
|
||||||
|
.firstOrNull,
|
||||||
|
createdAt: row.createdAt,
|
||||||
|
updatedAt: row.updatedAt,
|
||||||
|
deletedAt: row.deletedAt,
|
||||||
|
members: members,
|
||||||
|
isPinned: row.isPinned ?? false,
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
|
// Background sync
|
||||||
|
Future(() async {
|
||||||
|
try {
|
||||||
|
final client = ref.read(apiClientProvider);
|
||||||
|
final resp = await client.get('/sphere/chat');
|
||||||
|
final remoteRooms = resp.data
|
||||||
|
.map((e) => SnChatRoom.fromJson(e))
|
||||||
|
.cast<SnChatRoom>()
|
||||||
|
.toList();
|
||||||
|
await db.saveChatRooms(remoteRooms, override: true);
|
||||||
|
// Update state with fresh data
|
||||||
|
state = AsyncData(await _buildRoomsFromDb(db));
|
||||||
|
} catch (_) {}
|
||||||
|
}).ignore();
|
||||||
|
|
||||||
|
return localRooms;
|
||||||
|
}
|
||||||
|
} catch (_) {}
|
||||||
|
|
||||||
|
// Fallback to API
|
||||||
|
final client = ref.watch(apiClientProvider);
|
||||||
|
final resp = await client.get('/sphere/chat');
|
||||||
|
final rooms = resp.data
|
||||||
|
.map((e) => SnChatRoom.fromJson(e))
|
||||||
|
.cast<SnChatRoom>()
|
||||||
|
.toList();
|
||||||
|
await db.saveChatRooms(rooms, override: true);
|
||||||
|
return rooms;
|
||||||
|
}
|
||||||
|
|
||||||
|
SnRealm _buildRealmFromTableEntry(Realm localRealm) {
|
||||||
|
return SnRealm(
|
||||||
|
id: localRealm.id,
|
||||||
|
slug: localRealm.slug,
|
||||||
|
name: localRealm.name ?? localRealm.slug,
|
||||||
|
description: localRealm.description ?? '',
|
||||||
|
verifiedAs: localRealm.verifiedAs,
|
||||||
|
verifiedAt: localRealm.verifiedAt,
|
||||||
|
isCommunity: localRealm.isCommunity,
|
||||||
|
isPublic: localRealm.isPublic,
|
||||||
|
picture: localRealm.picture != null
|
||||||
|
? SnCloudFile.fromJson(localRealm.picture!)
|
||||||
|
: null,
|
||||||
|
background: localRealm.background != null
|
||||||
|
? SnCloudFile.fromJson(localRealm.background!)
|
||||||
|
: null,
|
||||||
|
accountId: localRealm.accountId ?? '',
|
||||||
|
createdAt: localRealm.createdAt,
|
||||||
|
updatedAt: localRealm.updatedAt,
|
||||||
|
deletedAt: localRealm.deletedAt,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<List<SnChatRoom>> _buildRoomsFromDb(AppDatabase db) async {
|
||||||
|
final localRoomsData = await db.select(db.chatRooms).get();
|
||||||
|
return Future.wait(
|
||||||
|
localRoomsData.map((row) async {
|
||||||
|
final membersRows = await (db.select(
|
||||||
|
db.chatMembers,
|
||||||
|
)..where((m) => m.chatRoomId.equals(row.id))).get();
|
||||||
|
final members = membersRows.map((mRow) {
|
||||||
|
final account = SnAccount.fromJson(mRow.account);
|
||||||
|
return SnChatMember(
|
||||||
|
id: mRow.id,
|
||||||
|
chatRoomId: mRow.chatRoomId,
|
||||||
|
accountId: mRow.accountId,
|
||||||
|
account: account,
|
||||||
|
nick: mRow.nick,
|
||||||
|
notify: mRow.notify,
|
||||||
|
joinedAt: mRow.joinedAt,
|
||||||
|
breakUntil: mRow.breakUntil,
|
||||||
|
timeoutUntil: mRow.timeoutUntil,
|
||||||
|
status: null,
|
||||||
|
createdAt: mRow.createdAt,
|
||||||
|
updatedAt: mRow.updatedAt,
|
||||||
|
deletedAt: mRow.deletedAt,
|
||||||
|
chatRoom: null,
|
||||||
|
);
|
||||||
|
}).toList();
|
||||||
|
|
||||||
|
// Load realm if it exists
|
||||||
|
SnRealm? realm;
|
||||||
|
if (row.realmId != null) {
|
||||||
|
try {
|
||||||
|
final realmRow = await (db.select(
|
||||||
|
db.realms,
|
||||||
|
)..where((r) => r.id.equals(row.realmId!))).getSingleOrNull();
|
||||||
|
if (realmRow != null) {
|
||||||
|
realm = SnRealm(
|
||||||
|
id: realmRow.id,
|
||||||
|
slug: '', // Not stored in DB
|
||||||
|
name: realmRow.name ?? '',
|
||||||
|
description: realmRow.description ?? '',
|
||||||
|
verifiedAs: null, // Not stored in DB
|
||||||
|
verifiedAt: null, // Not stored in DB
|
||||||
|
isCommunity: false, // Not stored in DB
|
||||||
|
isPublic: true, // Not stored in DB
|
||||||
|
picture: realmRow.picture != null
|
||||||
|
? SnCloudFile.fromJson(realmRow.picture!)
|
||||||
|
: null,
|
||||||
|
background: realmRow.background != null
|
||||||
|
? SnCloudFile.fromJson(realmRow.background!)
|
||||||
|
: null,
|
||||||
|
accountId: realmRow.accountId ?? '',
|
||||||
|
createdAt: realmRow.createdAt,
|
||||||
|
updatedAt: realmRow.updatedAt,
|
||||||
|
deletedAt: realmRow.deletedAt,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} catch (_) {
|
||||||
|
// Realm not found, keep as null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return SnChatRoom(
|
||||||
|
id: row.id,
|
||||||
|
name: row.name,
|
||||||
|
description: row.description,
|
||||||
|
type: row.type,
|
||||||
|
isPublic: row.isPublic!,
|
||||||
|
isCommunity: row.isCommunity!,
|
||||||
|
picture: row.picture != null
|
||||||
|
? SnCloudFile.fromJson(row.picture!)
|
||||||
|
: null,
|
||||||
|
background: row.background != null
|
||||||
|
? SnCloudFile.fromJson(row.background!)
|
||||||
|
: null,
|
||||||
|
realmId: row.realmId,
|
||||||
|
accountId: row.accountId,
|
||||||
|
realm: realm,
|
||||||
|
createdAt: row.createdAt,
|
||||||
|
updatedAt: row.updatedAt,
|
||||||
|
deletedAt: row.deletedAt,
|
||||||
|
members: members,
|
||||||
|
isPinned: row.isPinned ?? false,
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@riverpod
|
||||||
|
class ChatRoomNotifier extends _$ChatRoomNotifier {
|
||||||
|
@override
|
||||||
|
Future<SnChatRoom?> build(String? identifier) async {
|
||||||
|
if (identifier == null) return null;
|
||||||
|
final db = ref.watch(databaseProvider);
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Try to get from local database first
|
||||||
|
final localRoomData = await (db.select(
|
||||||
|
db.chatRooms,
|
||||||
|
)..where((r) => r.id.equals(identifier))).getSingleOrNull();
|
||||||
|
|
||||||
|
if (localRoomData != null) {
|
||||||
|
// Fetch members for this room
|
||||||
|
final membersRows = await (db.select(
|
||||||
|
db.chatMembers,
|
||||||
|
)..where((m) => m.chatRoomId.equals(localRoomData.id))).get();
|
||||||
|
final members = membersRows.map((mRow) {
|
||||||
|
final account = SnAccount.fromJson(mRow.account);
|
||||||
|
return SnChatMember(
|
||||||
|
id: mRow.id,
|
||||||
|
chatRoomId: mRow.chatRoomId,
|
||||||
|
accountId: mRow.accountId,
|
||||||
|
account: account,
|
||||||
|
nick: mRow.nick,
|
||||||
|
notify: mRow.notify,
|
||||||
|
joinedAt: mRow.joinedAt,
|
||||||
|
breakUntil: mRow.breakUntil,
|
||||||
|
timeoutUntil: mRow.timeoutUntil,
|
||||||
|
status: null,
|
||||||
|
createdAt: mRow.createdAt,
|
||||||
|
updatedAt: mRow.updatedAt,
|
||||||
|
deletedAt: mRow.deletedAt,
|
||||||
|
chatRoom: null,
|
||||||
|
);
|
||||||
|
}).toList();
|
||||||
|
|
||||||
|
final localRoom = SnChatRoom(
|
||||||
|
id: localRoomData.id,
|
||||||
|
name: localRoomData.name,
|
||||||
|
description: localRoomData.description,
|
||||||
|
type: localRoomData.type,
|
||||||
|
isPublic: localRoomData.isPublic!,
|
||||||
|
isCommunity: localRoomData.isCommunity!,
|
||||||
|
picture: localRoomData.picture != null
|
||||||
|
? SnCloudFile.fromJson(localRoomData.picture!)
|
||||||
|
: null,
|
||||||
|
background: localRoomData.background != null
|
||||||
|
? SnCloudFile.fromJson(localRoomData.background!)
|
||||||
|
: null,
|
||||||
|
realmId: localRoomData.realmId,
|
||||||
|
accountId: localRoomData.accountId,
|
||||||
|
realm: null,
|
||||||
|
createdAt: localRoomData.createdAt,
|
||||||
|
updatedAt: localRoomData.updatedAt,
|
||||||
|
deletedAt: localRoomData.deletedAt,
|
||||||
|
members: members,
|
||||||
|
);
|
||||||
|
|
||||||
|
// Background sync
|
||||||
|
Future(() async {
|
||||||
|
try {
|
||||||
|
final client = ref.read(apiClientProvider);
|
||||||
|
final resp = await client.get('/sphere/chat/$identifier');
|
||||||
|
final remoteRoom = SnChatRoom.fromJson(resp.data);
|
||||||
|
// Update state with fresh data directly without saving to DB
|
||||||
|
// DB will be updated by ChatRoomJoinedNotifier's full sync
|
||||||
|
state = AsyncData(remoteRoom);
|
||||||
|
} catch (_) {}
|
||||||
|
}).ignore();
|
||||||
|
|
||||||
|
return localRoom;
|
||||||
|
}
|
||||||
|
} catch (_) {}
|
||||||
|
|
||||||
|
// Fallback to API
|
||||||
|
try {
|
||||||
|
final client = ref.watch(apiClientProvider);
|
||||||
|
final resp = await client.get('/sphere/chat/$identifier');
|
||||||
|
final room = SnChatRoom.fromJson(resp.data);
|
||||||
|
await db.saveChatRooms([room]);
|
||||||
|
return room;
|
||||||
|
} catch (err) {
|
||||||
|
if (err is DioException && err.response?.statusCode == 404) {
|
||||||
|
return null; // Chat room not found
|
||||||
|
}
|
||||||
|
rethrow; // Rethrow other errors
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@riverpod
|
||||||
|
class ChatRoomIdentityNotifier extends _$ChatRoomIdentityNotifier {
|
||||||
|
@override
|
||||||
|
Future<SnChatMember?> build(String? identifier) async {
|
||||||
|
if (identifier == null) return null;
|
||||||
|
final db = ref.watch(databaseProvider);
|
||||||
|
final userInfo = ref.watch(userInfoProvider);
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Try to get from local database first
|
||||||
|
if (userInfo.value != null) {
|
||||||
|
final localMemberData =
|
||||||
|
await (db.select(db.chatMembers)
|
||||||
|
..where((m) => m.chatRoomId.equals(identifier))
|
||||||
|
..where((m) => m.accountId.equals(userInfo.value!.id)))
|
||||||
|
.getSingleOrNull();
|
||||||
|
|
||||||
|
if (localMemberData != null) {
|
||||||
|
final account = SnAccount.fromJson(localMemberData.account);
|
||||||
|
final localMember = SnChatMember(
|
||||||
|
id: localMemberData.id,
|
||||||
|
chatRoomId: localMemberData.chatRoomId,
|
||||||
|
accountId: localMemberData.accountId,
|
||||||
|
account: account,
|
||||||
|
nick: localMemberData.nick,
|
||||||
|
notify: localMemberData.notify,
|
||||||
|
joinedAt: localMemberData.joinedAt,
|
||||||
|
breakUntil: localMemberData.breakUntil,
|
||||||
|
timeoutUntil: localMemberData.timeoutUntil,
|
||||||
|
status: null,
|
||||||
|
createdAt: localMemberData.createdAt,
|
||||||
|
updatedAt: localMemberData.updatedAt,
|
||||||
|
deletedAt: localMemberData.deletedAt,
|
||||||
|
chatRoom: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
// Background sync
|
||||||
|
Future(() async {
|
||||||
|
try {
|
||||||
|
final client = ref.read(apiClientProvider);
|
||||||
|
final resp = await client.get(
|
||||||
|
'/sphere/chat/$identifier/members/me',
|
||||||
|
);
|
||||||
|
final remoteMember = SnChatMember.fromJson(resp.data);
|
||||||
|
await db.saveMember(remoteMember);
|
||||||
|
// Update state with fresh data
|
||||||
|
if (userInfo.value != null) {
|
||||||
|
state = AsyncData(
|
||||||
|
await _buildMemberFromDb(db, identifier, userInfo.value!.id),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} catch (_) {}
|
||||||
|
}).ignore();
|
||||||
|
|
||||||
|
return localMember;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (_) {}
|
||||||
|
|
||||||
|
// Fallback to API
|
||||||
|
try {
|
||||||
|
final client = ref.watch(apiClientProvider);
|
||||||
|
final resp = await client.get('/sphere/chat/$identifier/members/me');
|
||||||
|
final member = SnChatMember.fromJson(resp.data);
|
||||||
|
await db.saveMember(member);
|
||||||
|
return member;
|
||||||
|
} catch (err) {
|
||||||
|
if (err is DioException && err.response?.statusCode == 404) {
|
||||||
|
return null; // Chat member not found
|
||||||
|
}
|
||||||
|
rethrow; // Rethrow other errors
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<SnChatMember?> _buildMemberFromDb(
|
||||||
|
AppDatabase db,
|
||||||
|
String identifier,
|
||||||
|
String accountId,
|
||||||
|
) async {
|
||||||
|
final localMemberData =
|
||||||
|
await (db.select(db.chatMembers)
|
||||||
|
..where((m) => m.chatRoomId.equals(identifier))
|
||||||
|
..where((m) => m.accountId.equals(accountId)))
|
||||||
|
.getSingleOrNull();
|
||||||
|
|
||||||
|
if (localMemberData == null) return null;
|
||||||
|
|
||||||
|
final account = SnAccount.fromJson(localMemberData.account);
|
||||||
|
return SnChatMember(
|
||||||
|
id: localMemberData.id,
|
||||||
|
chatRoomId: localMemberData.chatRoomId,
|
||||||
|
accountId: localMemberData.accountId,
|
||||||
|
account: account,
|
||||||
|
nick: localMemberData.nick,
|
||||||
|
notify: localMemberData.notify,
|
||||||
|
joinedAt: localMemberData.joinedAt,
|
||||||
|
breakUntil: localMemberData.breakUntil,
|
||||||
|
timeoutUntil: localMemberData.timeoutUntil,
|
||||||
|
status: null,
|
||||||
|
createdAt: localMemberData.createdAt,
|
||||||
|
updatedAt: localMemberData.updatedAt,
|
||||||
|
deletedAt: localMemberData.deletedAt,
|
||||||
|
chatRoom: null,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@riverpod
|
||||||
|
Future<List<SnChatMember>> chatroomInvites(Ref ref) async {
|
||||||
|
final client = ref.watch(apiClientProvider);
|
||||||
|
final resp = await client.get('/sphere/chat/invites');
|
||||||
|
return resp.data
|
||||||
|
.map((e) => SnChatMember.fromJson(e))
|
||||||
|
.cast<SnChatMember>()
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
282
lib/pods/chat/chat_room.g.dart
Normal file
282
lib/pods/chat/chat_room.g.dart
Normal file
@@ -0,0 +1,282 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'chat_room.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// RiverpodGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(ChatRoomJoinedNotifier)
|
||||||
|
const chatRoomJoinedProvider = ChatRoomJoinedNotifierProvider._();
|
||||||
|
|
||||||
|
final class ChatRoomJoinedNotifierProvider
|
||||||
|
extends $AsyncNotifierProvider<ChatRoomJoinedNotifier, List<SnChatRoom>> {
|
||||||
|
const ChatRoomJoinedNotifierProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'chatRoomJoinedProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$chatRoomJoinedNotifierHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
ChatRoomJoinedNotifier create() => ChatRoomJoinedNotifier();
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$chatRoomJoinedNotifierHash() =>
|
||||||
|
r'e69955be56ef2c04a8062a8a65925e0a23bfcbaa';
|
||||||
|
|
||||||
|
abstract class _$ChatRoomJoinedNotifier
|
||||||
|
extends $AsyncNotifier<List<SnChatRoom>> {
|
||||||
|
FutureOr<List<SnChatRoom>> build();
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final created = build();
|
||||||
|
final ref =
|
||||||
|
this.ref as $Ref<AsyncValue<List<SnChatRoom>>, List<SnChatRoom>>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<AsyncValue<List<SnChatRoom>>, List<SnChatRoom>>,
|
||||||
|
AsyncValue<List<SnChatRoom>>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ProviderFor(ChatRoomNotifier)
|
||||||
|
const chatRoomProvider = ChatRoomNotifierFamily._();
|
||||||
|
|
||||||
|
final class ChatRoomNotifierProvider
|
||||||
|
extends $AsyncNotifierProvider<ChatRoomNotifier, SnChatRoom?> {
|
||||||
|
const ChatRoomNotifierProvider._({
|
||||||
|
required ChatRoomNotifierFamily super.from,
|
||||||
|
required String? super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'chatRoomProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$chatRoomNotifierHash();
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return r'chatRoomProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
ChatRoomNotifier create() => ChatRoomNotifier();
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return other is ChatRoomNotifierProvider && other.argument == argument;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return argument.hashCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$chatRoomNotifierHash() => r'1e6391e2ab4eeb114fa001aaa6b06ab2bd646f38';
|
||||||
|
|
||||||
|
final class ChatRoomNotifierFamily extends $Family
|
||||||
|
with
|
||||||
|
$ClassFamilyOverride<
|
||||||
|
ChatRoomNotifier,
|
||||||
|
AsyncValue<SnChatRoom?>,
|
||||||
|
SnChatRoom?,
|
||||||
|
FutureOr<SnChatRoom?>,
|
||||||
|
String?
|
||||||
|
> {
|
||||||
|
const ChatRoomNotifierFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'chatRoomProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
ChatRoomNotifierProvider call(String? identifier) =>
|
||||||
|
ChatRoomNotifierProvider._(argument: identifier, from: this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => r'chatRoomProvider';
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class _$ChatRoomNotifier extends $AsyncNotifier<SnChatRoom?> {
|
||||||
|
late final _$args = ref.$arg as String?;
|
||||||
|
String? get identifier => _$args;
|
||||||
|
|
||||||
|
FutureOr<SnChatRoom?> build(String? identifier);
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final created = build(_$args);
|
||||||
|
final ref = this.ref as $Ref<AsyncValue<SnChatRoom?>, SnChatRoom?>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<AsyncValue<SnChatRoom?>, SnChatRoom?>,
|
||||||
|
AsyncValue<SnChatRoom?>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ProviderFor(ChatRoomIdentityNotifier)
|
||||||
|
const chatRoomIdentityProvider = ChatRoomIdentityNotifierFamily._();
|
||||||
|
|
||||||
|
final class ChatRoomIdentityNotifierProvider
|
||||||
|
extends $AsyncNotifierProvider<ChatRoomIdentityNotifier, SnChatMember?> {
|
||||||
|
const ChatRoomIdentityNotifierProvider._({
|
||||||
|
required ChatRoomIdentityNotifierFamily super.from,
|
||||||
|
required String? super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'chatRoomIdentityProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$chatRoomIdentityNotifierHash();
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return r'chatRoomIdentityProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
ChatRoomIdentityNotifier create() => ChatRoomIdentityNotifier();
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return other is ChatRoomIdentityNotifierProvider &&
|
||||||
|
other.argument == argument;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return argument.hashCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$chatRoomIdentityNotifierHash() =>
|
||||||
|
r'27c17d55366d39be81d7209837e5c01f80a68a24';
|
||||||
|
|
||||||
|
final class ChatRoomIdentityNotifierFamily extends $Family
|
||||||
|
with
|
||||||
|
$ClassFamilyOverride<
|
||||||
|
ChatRoomIdentityNotifier,
|
||||||
|
AsyncValue<SnChatMember?>,
|
||||||
|
SnChatMember?,
|
||||||
|
FutureOr<SnChatMember?>,
|
||||||
|
String?
|
||||||
|
> {
|
||||||
|
const ChatRoomIdentityNotifierFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'chatRoomIdentityProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
ChatRoomIdentityNotifierProvider call(String? identifier) =>
|
||||||
|
ChatRoomIdentityNotifierProvider._(argument: identifier, from: this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => r'chatRoomIdentityProvider';
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class _$ChatRoomIdentityNotifier
|
||||||
|
extends $AsyncNotifier<SnChatMember?> {
|
||||||
|
late final _$args = ref.$arg as String?;
|
||||||
|
String? get identifier => _$args;
|
||||||
|
|
||||||
|
FutureOr<SnChatMember?> build(String? identifier);
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final created = build(_$args);
|
||||||
|
final ref = this.ref as $Ref<AsyncValue<SnChatMember?>, SnChatMember?>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<AsyncValue<SnChatMember?>, SnChatMember?>,
|
||||||
|
AsyncValue<SnChatMember?>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ProviderFor(chatroomInvites)
|
||||||
|
const chatroomInvitesProvider = ChatroomInvitesProvider._();
|
||||||
|
|
||||||
|
final class ChatroomInvitesProvider
|
||||||
|
extends
|
||||||
|
$FunctionalProvider<
|
||||||
|
AsyncValue<List<SnChatMember>>,
|
||||||
|
List<SnChatMember>,
|
||||||
|
FutureOr<List<SnChatMember>>
|
||||||
|
>
|
||||||
|
with
|
||||||
|
$FutureModifier<List<SnChatMember>>,
|
||||||
|
$FutureProvider<List<SnChatMember>> {
|
||||||
|
const ChatroomInvitesProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'chatroomInvitesProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$chatroomInvitesHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$FutureProviderElement<List<SnChatMember>> $createElement(
|
||||||
|
$ProviderPointer pointer,
|
||||||
|
) => $FutureProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
FutureOr<List<SnChatMember>> create(Ref ref) {
|
||||||
|
return chatroomInvites(ref);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$chatroomInvitesHash() => r'5cd6391b09c5517ede19bacce43b45c8d71dd087';
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
import "package:hooks_riverpod/hooks_riverpod.dart";
|
|
||||||
|
|
||||||
final isSyncingProvider = StateProvider.autoDispose<bool>((ref) => false);
|
|
||||||
|
|
||||||
final flashingMessagesProvider = StateProvider<Set<String>>((ref) => {});
|
|
||||||
@@ -3,23 +3,32 @@ import "dart:convert";
|
|||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||||
import "package:island/models/chat.dart";
|
import "package:island/models/chat.dart";
|
||||||
|
import "package:island/pods/chat/chat_room.dart";
|
||||||
import "package:island/pods/lifecycle.dart";
|
import "package:island/pods/lifecycle.dart";
|
||||||
import "package:island/pods/chat/messages_notifier.dart";
|
import "package:island/pods/chat/messages_notifier.dart";
|
||||||
import "package:island/pods/websocket.dart";
|
import "package:island/pods/websocket.dart";
|
||||||
import "package:island/screens/chat/chat.dart";
|
|
||||||
import "package:island/widgets/chat/call_button.dart";
|
import "package:island/widgets/chat/call_button.dart";
|
||||||
import "package:riverpod_annotation/riverpod_annotation.dart";
|
import "package:riverpod_annotation/riverpod_annotation.dart";
|
||||||
|
|
||||||
part 'chat_subscribe.g.dart';
|
part 'chat_subscribe.g.dart';
|
||||||
|
|
||||||
final currentSubscribedChatIdProvider = StateProvider<String?>((ref) => null);
|
final currentSubscribedChatIdProvider =
|
||||||
|
NotifierProvider<CurrentSubscribedChatIdNotifier, String?>(
|
||||||
|
CurrentSubscribedChatIdNotifier.new,
|
||||||
|
);
|
||||||
|
|
||||||
|
class CurrentSubscribedChatIdNotifier extends Notifier<String?> {
|
||||||
|
@override
|
||||||
|
String? build() => null;
|
||||||
|
|
||||||
|
void set(String? value) => state = value;
|
||||||
|
}
|
||||||
|
|
||||||
@riverpod
|
@riverpod
|
||||||
class ChatSubscribeNotifier extends _$ChatSubscribeNotifier {
|
class ChatSubscribeNotifier extends _$ChatSubscribeNotifier {
|
||||||
late final String _roomId;
|
late SnChatRoom _chatRoom;
|
||||||
late final SnChatRoom _chatRoom;
|
late SnChatMember _chatIdentity;
|
||||||
late final SnChatMember _chatIdentity;
|
late MessagesNotifier _messagesNotifier;
|
||||||
late final MessagesNotifier _messagesNotifier;
|
|
||||||
|
|
||||||
final List<SnChatMember> _typingStatuses = [];
|
final List<SnChatMember> _typingStatuses = [];
|
||||||
Timer? _typingCleanupTimer;
|
Timer? _typingCleanupTimer;
|
||||||
@@ -29,11 +38,10 @@ class ChatSubscribeNotifier extends _$ChatSubscribeNotifier {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
List<SnChatMember> build(String roomId) {
|
List<SnChatMember> build(String roomId) {
|
||||||
_roomId = roomId;
|
|
||||||
final ws = ref.watch(websocketProvider);
|
final ws = ref.watch(websocketProvider);
|
||||||
final chatRoomAsync = ref.watch(chatroomProvider(roomId));
|
final chatRoomAsync = ref.watch(chatRoomProvider(roomId));
|
||||||
final chatIdentityAsync = ref.watch(chatroomIdentityProvider(roomId));
|
final chatIdentityAsync = ref.watch(chatRoomIdentityProvider(roomId));
|
||||||
_messagesNotifier = ref.watch(messagesNotifierProvider(roomId).notifier);
|
_messagesNotifier = ref.watch(messagesProvider(roomId).notifier);
|
||||||
|
|
||||||
if (chatRoomAsync.isLoading || chatIdentityAsync.isLoading) {
|
if (chatRoomAsync.isLoading || chatIdentityAsync.isLoading) {
|
||||||
return [];
|
return [];
|
||||||
@@ -59,7 +67,7 @@ class ChatSubscribeNotifier extends _$ChatSubscribeNotifier {
|
|||||||
);
|
);
|
||||||
|
|
||||||
Future.microtask(
|
Future.microtask(
|
||||||
() => ref.read(currentSubscribedChatIdProvider.notifier).state = roomId,
|
() => ref.read(currentSubscribedChatIdProvider.notifier).set(roomId),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Send initial read receipt
|
// Send initial read receipt
|
||||||
@@ -85,7 +93,6 @@ class ChatSubscribeNotifier extends _$ChatSubscribeNotifier {
|
|||||||
|
|
||||||
// Set up periodic subscribe timer (every 5 minutes)
|
// Set up periodic subscribe timer (every 5 minutes)
|
||||||
_periodicSubscribeTimer = Timer.periodic(const Duration(minutes: 5), (_) {
|
_periodicSubscribeTimer = Timer.periodic(const Duration(minutes: 5), (_) {
|
||||||
final wsState = ref.read(websocketStateProvider.notifier);
|
|
||||||
wsState.sendMessage(
|
wsState.sendMessage(
|
||||||
jsonEncode(
|
jsonEncode(
|
||||||
WebSocketPacket(
|
WebSocketPacket(
|
||||||
@@ -130,7 +137,7 @@ class ChatSubscribeNotifier extends _$ChatSubscribeNotifier {
|
|||||||
|
|
||||||
// Cleanup on dispose
|
// Cleanup on dispose
|
||||||
ref.onDispose(() {
|
ref.onDispose(() {
|
||||||
ref.read(currentSubscribedChatIdProvider.notifier).state = null;
|
ref.read(currentSubscribedChatIdProvider.notifier).set(null);
|
||||||
wsState.sendMessage(
|
wsState.sendMessage(
|
||||||
jsonEncode(
|
jsonEncode(
|
||||||
WebSocketPacket(
|
WebSocketPacket(
|
||||||
@@ -199,7 +206,7 @@ class ChatSubscribeNotifier extends _$ChatSubscribeNotifier {
|
|||||||
jsonEncode(
|
jsonEncode(
|
||||||
WebSocketPacket(
|
WebSocketPacket(
|
||||||
type: 'messages.read',
|
type: 'messages.read',
|
||||||
data: {'chat_room_id': _roomId},
|
data: {'chat_room_id': roomId},
|
||||||
endpoint: 'sphere',
|
endpoint: 'sphere',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -216,7 +223,7 @@ class ChatSubscribeNotifier extends _$ChatSubscribeNotifier {
|
|||||||
jsonEncode(
|
jsonEncode(
|
||||||
WebSocketPacket(
|
WebSocketPacket(
|
||||||
type: 'messages.typing',
|
type: 'messages.typing',
|
||||||
data: {'chat_room_id': _roomId},
|
data: {'chat_room_id': roomId},
|
||||||
endpoint: 'sphere',
|
endpoint: 'sphere',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -6,171 +6,104 @@ part of 'chat_subscribe.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$chatSubscribeNotifierHash() =>
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
r'c605e0c9c45df64e5ba7b65f8de9b47bde8e2b3b';
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// Copied from Dart SDK
|
|
||||||
class _SystemHash {
|
|
||||||
_SystemHash._();
|
|
||||||
|
|
||||||
static int combine(int hash, int value) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + value);
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
|
||||||
return hash ^ (hash >> 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int finish(int hash) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = hash ^ (hash >> 11);
|
|
||||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class _$ChatSubscribeNotifier
|
|
||||||
extends BuildlessAutoDisposeNotifier<List<SnChatMember>> {
|
|
||||||
late final String roomId;
|
|
||||||
|
|
||||||
List<SnChatMember> build(String roomId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [ChatSubscribeNotifier].
|
|
||||||
@ProviderFor(ChatSubscribeNotifier)
|
@ProviderFor(ChatSubscribeNotifier)
|
||||||
const chatSubscribeNotifierProvider = ChatSubscribeNotifierFamily();
|
const chatSubscribeProvider = ChatSubscribeNotifierFamily._();
|
||||||
|
|
||||||
/// See also [ChatSubscribeNotifier].
|
final class ChatSubscribeNotifierProvider
|
||||||
class ChatSubscribeNotifierFamily extends Family<List<SnChatMember>> {
|
extends $NotifierProvider<ChatSubscribeNotifier, List<SnChatMember>> {
|
||||||
/// See also [ChatSubscribeNotifier].
|
const ChatSubscribeNotifierProvider._({
|
||||||
const ChatSubscribeNotifierFamily();
|
required ChatSubscribeNotifierFamily super.from,
|
||||||
|
required String super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'chatSubscribeProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
/// See also [ChatSubscribeNotifier].
|
@override
|
||||||
ChatSubscribeNotifierProvider call(String roomId) {
|
String debugGetCreateSourceHash() => _$chatSubscribeNotifierHash();
|
||||||
return ChatSubscribeNotifierProvider(roomId);
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return r'chatSubscribeProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
@override
|
@override
|
||||||
ChatSubscribeNotifierProvider getProviderOverride(
|
ChatSubscribeNotifier create() => ChatSubscribeNotifier();
|
||||||
covariant ChatSubscribeNotifierProvider provider,
|
|
||||||
) {
|
|
||||||
return call(provider.roomId);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(List<SnChatMember> value) {
|
||||||
@override
|
return $ProviderOverride(
|
||||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
|
||||||
_allTransitiveDependencies;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get name => r'chatSubscribeNotifierProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [ChatSubscribeNotifier].
|
|
||||||
class ChatSubscribeNotifierProvider
|
|
||||||
extends
|
|
||||||
AutoDisposeNotifierProviderImpl<
|
|
||||||
ChatSubscribeNotifier,
|
|
||||||
List<SnChatMember>
|
|
||||||
> {
|
|
||||||
/// See also [ChatSubscribeNotifier].
|
|
||||||
ChatSubscribeNotifierProvider(String roomId)
|
|
||||||
: this._internal(
|
|
||||||
() => ChatSubscribeNotifier()..roomId = roomId,
|
|
||||||
from: chatSubscribeNotifierProvider,
|
|
||||||
name: r'chatSubscribeNotifierProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$chatSubscribeNotifierHash,
|
|
||||||
dependencies: ChatSubscribeNotifierFamily._dependencies,
|
|
||||||
allTransitiveDependencies:
|
|
||||||
ChatSubscribeNotifierFamily._allTransitiveDependencies,
|
|
||||||
roomId: roomId,
|
|
||||||
);
|
|
||||||
|
|
||||||
ChatSubscribeNotifierProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.roomId,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final String roomId;
|
|
||||||
|
|
||||||
@override
|
|
||||||
List<SnChatMember> runNotifierBuild(
|
|
||||||
covariant ChatSubscribeNotifier notifier,
|
|
||||||
) {
|
|
||||||
return notifier.build(roomId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Override overrideWith(ChatSubscribeNotifier Function() create) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
origin: this,
|
||||||
override: ChatSubscribeNotifierProvider._internal(
|
providerOverride: $SyncValueProvider<List<SnChatMember>>(value),
|
||||||
() => create()..roomId = roomId,
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
roomId: roomId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
AutoDisposeNotifierProviderElement<ChatSubscribeNotifier, List<SnChatMember>>
|
|
||||||
createElement() {
|
|
||||||
return _ChatSubscribeNotifierProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is ChatSubscribeNotifierProvider && other.roomId == roomId;
|
return other is ChatSubscribeNotifierProvider && other.argument == argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
return argument.hashCode;
|
||||||
hash = _SystemHash.combine(hash, roomId.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
String _$chatSubscribeNotifierHash() =>
|
||||||
// ignore: unused_element
|
r'1aa164429aaab1628b5edbae11e33b0860abdcdc';
|
||||||
mixin ChatSubscribeNotifierRef
|
|
||||||
on AutoDisposeNotifierProviderRef<List<SnChatMember>> {
|
|
||||||
/// The parameter `roomId` of this provider.
|
|
||||||
String get roomId;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _ChatSubscribeNotifierProviderElement
|
final class ChatSubscribeNotifierFamily extends $Family
|
||||||
extends
|
with
|
||||||
AutoDisposeNotifierProviderElement<
|
$ClassFamilyOverride<
|
||||||
ChatSubscribeNotifier,
|
ChatSubscribeNotifier,
|
||||||
List<SnChatMember>
|
List<SnChatMember>,
|
||||||
>
|
List<SnChatMember>,
|
||||||
with ChatSubscribeNotifierRef {
|
List<SnChatMember>,
|
||||||
_ChatSubscribeNotifierProviderElement(super.provider);
|
String
|
||||||
|
> {
|
||||||
|
const ChatSubscribeNotifierFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'chatSubscribeProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
ChatSubscribeNotifierProvider call(String roomId) =>
|
||||||
|
ChatSubscribeNotifierProvider._(argument: roomId, from: this);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get roomId => (origin as ChatSubscribeNotifierProvider).roomId;
|
String toString() => r'chatSubscribeProvider';
|
||||||
}
|
}
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
abstract class _$ChatSubscribeNotifier extends $Notifier<List<SnChatMember>> {
|
||||||
// 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
|
late final _$args = ref.$arg as String;
|
||||||
|
String get roomId => _$args;
|
||||||
|
|
||||||
|
List<SnChatMember> build(String roomId);
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final created = build(_$args);
|
||||||
|
final ref = this.ref as $Ref<List<SnChatMember>, List<SnChatMember>>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<List<SnChatMember>, List<SnChatMember>>,
|
||||||
|
List<SnChatMember>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
import 'dart:math' as math;
|
||||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||||
import 'package:island/models/chat.dart';
|
import 'package:island/models/chat.dart';
|
||||||
import 'package:island/pods/network.dart';
|
import 'package:island/pods/network.dart';
|
||||||
@@ -7,6 +9,58 @@ import 'package:island/pods/chat/chat_subscribe.dart';
|
|||||||
part 'chat_summary.g.dart';
|
part 'chat_summary.g.dart';
|
||||||
|
|
||||||
@riverpod
|
@riverpod
|
||||||
|
class ChatUnreadCountNotifier extends _$ChatUnreadCountNotifier {
|
||||||
|
StreamSubscription<WebSocketPacket>? _subscription;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<int> build() async {
|
||||||
|
// Subscribe to websocket events when this provider is built
|
||||||
|
_subscribeToWebSocket();
|
||||||
|
|
||||||
|
// Dispose the subscription when this provider is disposed
|
||||||
|
ref.onDispose(() {
|
||||||
|
_subscription?.cancel();
|
||||||
|
});
|
||||||
|
|
||||||
|
try {
|
||||||
|
final client = ref.read(apiClientProvider);
|
||||||
|
final response = await client.get('/sphere/chat/unread');
|
||||||
|
return (response.data as num).toInt();
|
||||||
|
} catch (_) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _subscribeToWebSocket() {
|
||||||
|
final webSocketService = ref.read(websocketProvider);
|
||||||
|
_subscription = webSocketService.dataStream.listen((packet) {
|
||||||
|
if (packet.type == 'messages.new' && packet.data != null) {
|
||||||
|
final message = SnChatMessage.fromJson(packet.data!);
|
||||||
|
final currentSubscribed = ref.read(currentSubscribedChatIdProvider);
|
||||||
|
// Only increment if the message is not from the currently subscribed chat
|
||||||
|
if (message.chatRoomId != currentSubscribed) {
|
||||||
|
_incrementCounter();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _incrementCounter() async {
|
||||||
|
final current = await future;
|
||||||
|
state = AsyncData(current + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> decrement(int count) async {
|
||||||
|
final current = await future;
|
||||||
|
state = AsyncData(math.max(current - count, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
void clear() async {
|
||||||
|
state = AsyncData(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Riverpod(keepAlive: true)
|
||||||
class ChatSummary extends _$ChatSummary {
|
class ChatSummary extends _$ChatSummary {
|
||||||
@override
|
@override
|
||||||
Future<Map<String, SnChatSummary>> build() async {
|
Future<Map<String, SnChatSummary>> build() async {
|
||||||
@@ -41,6 +95,14 @@ class ChatSummary extends _$ChatSummary {
|
|||||||
state.whenData((summaries) {
|
state.whenData((summaries) {
|
||||||
final summary = summaries[chatId];
|
final summary = summaries[chatId];
|
||||||
if (summary != null) {
|
if (summary != null) {
|
||||||
|
// Decrement global unread count
|
||||||
|
final unreadToDecrement = summary.unreadCount;
|
||||||
|
if (unreadToDecrement > 0) {
|
||||||
|
ref
|
||||||
|
.read(chatUnreadCountProvider.notifier)
|
||||||
|
.decrement(unreadToDecrement);
|
||||||
|
}
|
||||||
|
|
||||||
state = AsyncData({
|
state = AsyncData({
|
||||||
...summaries,
|
...summaries,
|
||||||
chatId: SnChatSummary(
|
chatId: SnChatSummary(
|
||||||
|
|||||||
@@ -6,22 +6,105 @@ part of 'chat_summary.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$chatSummaryHash() => r'33815a3bd81d20902b7063e8194fe336930df9b4';
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(ChatUnreadCountNotifier)
|
||||||
|
const chatUnreadCountProvider = ChatUnreadCountNotifierProvider._();
|
||||||
|
|
||||||
|
final class ChatUnreadCountNotifierProvider
|
||||||
|
extends $AsyncNotifierProvider<ChatUnreadCountNotifier, int> {
|
||||||
|
const ChatUnreadCountNotifierProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'chatUnreadCountProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$chatUnreadCountNotifierHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
ChatUnreadCountNotifier create() => ChatUnreadCountNotifier();
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$chatUnreadCountNotifierHash() =>
|
||||||
|
r'b8d93589dc37f772d4c3a07d9afd81c37026e57d';
|
||||||
|
|
||||||
|
abstract class _$ChatUnreadCountNotifier extends $AsyncNotifier<int> {
|
||||||
|
FutureOr<int> build();
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final created = build();
|
||||||
|
final ref = this.ref as $Ref<AsyncValue<int>, int>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<AsyncValue<int>, int>,
|
||||||
|
AsyncValue<int>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// See also [ChatSummary].
|
|
||||||
@ProviderFor(ChatSummary)
|
@ProviderFor(ChatSummary)
|
||||||
final chatSummaryProvider = AutoDisposeAsyncNotifierProvider<
|
const chatSummaryProvider = ChatSummaryProvider._();
|
||||||
ChatSummary,
|
|
||||||
Map<String, SnChatSummary>
|
|
||||||
>.internal(
|
|
||||||
ChatSummary.new,
|
|
||||||
name: r'chatSummaryProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$chatSummaryHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef _$ChatSummary = AutoDisposeAsyncNotifier<Map<String, SnChatSummary>>;
|
final class ChatSummaryProvider
|
||||||
// ignore_for_file: type=lint
|
extends $AsyncNotifierProvider<ChatSummary, Map<String, SnChatSummary>> {
|
||||||
// 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
|
const ChatSummaryProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'chatSummaryProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$chatSummaryHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
ChatSummary create() => ChatSummary();
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$chatSummaryHash() => r'dfa5e487586482ebdafef8d711f74db68ee86f84';
|
||||||
|
|
||||||
|
abstract class _$ChatSummary
|
||||||
|
extends $AsyncNotifier<Map<String, SnChatSummary>> {
|
||||||
|
FutureOr<Map<String, SnChatSummary>> build();
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final created = build();
|
||||||
|
final ref =
|
||||||
|
this.ref
|
||||||
|
as $Ref<
|
||||||
|
AsyncValue<Map<String, SnChatSummary>>,
|
||||||
|
Map<String, SnChatSummary>
|
||||||
|
>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<
|
||||||
|
AsyncValue<Map<String, SnChatSummary>>,
|
||||||
|
Map<String, SnChatSummary>
|
||||||
|
>,
|
||||||
|
AsyncValue<Map<String, SnChatSummary>>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,10 +6,12 @@ import "package:flutter/material.dart";
|
|||||||
import "package:hooks_riverpod/hooks_riverpod.dart";
|
import "package:hooks_riverpod/hooks_riverpod.dart";
|
||||||
import "package:island/database/drift_db.dart";
|
import "package:island/database/drift_db.dart";
|
||||||
import "package:island/database/message.dart";
|
import "package:island/database/message.dart";
|
||||||
|
import "package:island/models/account.dart";
|
||||||
import "package:island/models/chat.dart";
|
import "package:island/models/chat.dart";
|
||||||
import "package:island/models/file.dart";
|
import "package:island/models/file.dart";
|
||||||
import "package:island/models/poll.dart";
|
import "package:island/models/poll.dart";
|
||||||
import "package:island/models/wallet.dart";
|
import "package:island/models/wallet.dart";
|
||||||
|
import "package:island/pods/chat/chat_room.dart";
|
||||||
import "package:island/pods/database.dart";
|
import "package:island/pods/database.dart";
|
||||||
import "package:island/pods/lifecycle.dart";
|
import "package:island/pods/lifecycle.dart";
|
||||||
import "package:island/pods/network.dart";
|
import "package:island/pods/network.dart";
|
||||||
@@ -18,17 +20,16 @@ import "package:island/talker.dart";
|
|||||||
import "package:island/widgets/alert.dart";
|
import "package:island/widgets/alert.dart";
|
||||||
import "package:riverpod_annotation/riverpod_annotation.dart";
|
import "package:riverpod_annotation/riverpod_annotation.dart";
|
||||||
import "package:uuid/uuid.dart";
|
import "package:uuid/uuid.dart";
|
||||||
import "package:island/screens/chat/chat.dart";
|
import "package:island/screens/account/profile.dart";
|
||||||
import "package:island/pods/chat/chat_rooms.dart";
|
|
||||||
|
|
||||||
part 'messages_notifier.g.dart';
|
part 'messages_notifier.g.dart';
|
||||||
|
|
||||||
@riverpod
|
@riverpod
|
||||||
class MessagesNotifier extends _$MessagesNotifier {
|
class MessagesNotifier extends _$MessagesNotifier {
|
||||||
late final Dio _apiClient;
|
late Dio _apiClient;
|
||||||
late final AppDatabase _database;
|
late AppDatabase _database;
|
||||||
late final SnChatRoom _room;
|
late SnChatRoom _room;
|
||||||
late final SnChatMember _identity;
|
late SnChatMember _identity;
|
||||||
|
|
||||||
final Map<String, LocalChatMessage> _pendingMessages = {};
|
final Map<String, LocalChatMessage> _pendingMessages = {};
|
||||||
final Map<String, Map<int, double?>> _fileUploadProgress = {};
|
final Map<String, Map<int, double?>> _fileUploadProgress = {};
|
||||||
@@ -37,21 +38,31 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
bool? _withLinks;
|
bool? _withLinks;
|
||||||
bool? _withAttachments;
|
bool? _withAttachments;
|
||||||
|
|
||||||
late final String _roomId;
|
|
||||||
static const int _pageSize = 20;
|
static const int _pageSize = 20;
|
||||||
bool _hasMore = true;
|
bool _hasMore = true;
|
||||||
bool _isSyncing = false;
|
bool _isSyncing = false;
|
||||||
bool _isJumping = false;
|
bool _isJumping = false;
|
||||||
bool _isUpdatingState = false;
|
bool _isUpdatingState = false;
|
||||||
|
bool _allRemoteMessagesFetched = false;
|
||||||
DateTime? _lastPauseTime;
|
DateTime? _lastPauseTime;
|
||||||
|
|
||||||
|
late Future<SnAccount?> Function(String) _fetchAccount;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
FutureOr<List<LocalChatMessage>> build(String roomId) async {
|
FutureOr<List<LocalChatMessage>> build(String roomId) async {
|
||||||
_roomId = roomId;
|
|
||||||
_apiClient = ref.watch(apiClientProvider);
|
_apiClient = ref.watch(apiClientProvider);
|
||||||
_database = ref.watch(databaseProvider);
|
_database = ref.watch(databaseProvider);
|
||||||
final room = await ref.watch(chatroomProvider(roomId).future);
|
final room = await ref.watch(chatRoomProvider(roomId).future);
|
||||||
final identity = await ref.watch(chatroomIdentityProvider(roomId).future);
|
final identity = await ref.watch(chatRoomIdentityProvider(roomId).future);
|
||||||
|
|
||||||
|
// Initialize fetch account method for corrupted data recovery
|
||||||
|
_fetchAccount = (String accountId) async {
|
||||||
|
try {
|
||||||
|
return await ref.watch(accountProvider(accountId).future);
|
||||||
|
} catch (_) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
if (room == null) {
|
if (room == null) {
|
||||||
throw Exception('Room not found');
|
throw Exception('Room not found');
|
||||||
@@ -130,18 +141,27 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
|
|
||||||
if (searchQuery != null && searchQuery.isNotEmpty) {
|
if (searchQuery != null && searchQuery.isNotEmpty) {
|
||||||
dbMessages = await _database.searchMessages(
|
dbMessages = await _database.searchMessages(
|
||||||
_roomId,
|
roomId,
|
||||||
searchQuery,
|
searchQuery,
|
||||||
withAttachments: withAttachments,
|
withAttachments: withAttachments,
|
||||||
|
fetchAccount: _fetchAccount,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
final chatMessagesFromDb = await _database.getMessagesForRoom(
|
final chatMessagesFromDb = await _database.getMessagesForRoom(
|
||||||
_roomId,
|
roomId,
|
||||||
offset: offset,
|
offset: offset,
|
||||||
limit: take,
|
limit: take,
|
||||||
);
|
);
|
||||||
dbMessages =
|
dbMessages = await Future.wait(
|
||||||
chatMessagesFromDb.map(_database.companionToMessage).toList();
|
chatMessagesFromDb
|
||||||
|
.map(
|
||||||
|
(msg) => _database.companionToMessage(
|
||||||
|
msg,
|
||||||
|
fetchAccount: _fetchAccount,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.toList(),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<LocalChatMessage> filteredMessages = dbMessages;
|
List<LocalChatMessage> filteredMessages = dbMessages;
|
||||||
@@ -171,9 +191,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
|
|
||||||
if (offset == 0) {
|
if (offset == 0) {
|
||||||
final pendingForRoom =
|
final pendingForRoom =
|
||||||
_pendingMessages.values
|
_pendingMessages.values.where((msg) => msg.roomId == roomId).toList();
|
||||||
.where((msg) => msg.roomId == _roomId)
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
final allMessages = [...pendingForRoom, ...uniqueMessages];
|
final allMessages = [...pendingForRoom, ...uniqueMessages];
|
||||||
_sortMessages(allMessages); // Use the helper function
|
_sortMessages(allMessages); // Use the helper function
|
||||||
@@ -198,12 +216,18 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
}) async {
|
}) async {
|
||||||
talker.log('Getting all messages for jump from offset $offset, take $take');
|
talker.log('Getting all messages for jump from offset $offset, take $take');
|
||||||
final chatMessagesFromDb = await _database.getMessagesForRoom(
|
final chatMessagesFromDb = await _database.getMessagesForRoom(
|
||||||
_roomId,
|
roomId,
|
||||||
offset: offset,
|
offset: offset,
|
||||||
limit: take,
|
limit: take,
|
||||||
);
|
);
|
||||||
final dbMessages =
|
final dbMessages = await Future.wait(
|
||||||
chatMessagesFromDb.map(_database.companionToMessage).toList();
|
chatMessagesFromDb
|
||||||
|
.map(
|
||||||
|
(msg) =>
|
||||||
|
_database.companionToMessage(msg, fetchAccount: _fetchAccount),
|
||||||
|
)
|
||||||
|
.toList(),
|
||||||
|
);
|
||||||
|
|
||||||
// Always ensure unique messages to prevent duplicate keys
|
// Always ensure unique messages to prevent duplicate keys
|
||||||
final uniqueMessages = <LocalChatMessage>[];
|
final uniqueMessages = <LocalChatMessage>[];
|
||||||
@@ -216,9 +240,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
|
|
||||||
if (offset == 0) {
|
if (offset == 0) {
|
||||||
final pendingForRoom =
|
final pendingForRoom =
|
||||||
_pendingMessages.values
|
_pendingMessages.values.where((msg) => msg.roomId == roomId).toList();
|
||||||
.where((msg) => msg.roomId == _roomId)
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
final allMessages = [...pendingForRoom, ...uniqueMessages];
|
final allMessages = [...pendingForRoom, ...uniqueMessages];
|
||||||
_sortMessages(allMessages);
|
_sortMessages(allMessages);
|
||||||
@@ -243,18 +265,19 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
talker.log('Fetching messages from API, offset $offset, take $take');
|
talker.log('Fetching messages from API, offset $offset, take $take');
|
||||||
if (_totalCount == null) {
|
if (_totalCount == null) {
|
||||||
final response = await _apiClient.get(
|
final response = await _apiClient.get(
|
||||||
'/sphere/chat/$_roomId/messages',
|
'/sphere/chat/$roomId/messages',
|
||||||
queryParameters: {'offset': 0, 'take': 1},
|
queryParameters: {'offset': 0, 'take': 1},
|
||||||
);
|
);
|
||||||
_totalCount = int.parse(response.headers['x-total']?.firstOrNull ?? '0');
|
_totalCount = int.parse(response.headers['x-total']?.firstOrNull ?? '0');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (offset >= _totalCount!) {
|
if (offset >= _totalCount!) {
|
||||||
|
_allRemoteMessagesFetched = true;
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
final response = await _apiClient.get(
|
final response = await _apiClient.get(
|
||||||
'/sphere/chat/$_roomId/messages',
|
'/sphere/chat/$roomId/messages',
|
||||||
queryParameters: {'offset': offset, 'take': take},
|
queryParameters: {'offset': offset, 'take': take},
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -271,7 +294,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
}).toList();
|
}).toList();
|
||||||
|
|
||||||
for (final message in messages) {
|
for (final message in messages) {
|
||||||
await _database.saveMessage(_database.messageToCompanion(message));
|
await _database.saveMessageWithSender(message);
|
||||||
if (message.nonce != null) {
|
if (message.nonce != null) {
|
||||||
_pendingMessages.removeWhere(
|
_pendingMessages.removeWhere(
|
||||||
(_, pendingMsg) => pendingMsg.nonce == message.nonce,
|
(_, pendingMsg) => pendingMsg.nonce == message.nonce,
|
||||||
@@ -279,6 +302,11 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if we've fetched all remote messages
|
||||||
|
if (offset + messages.length >= _totalCount!) {
|
||||||
|
_allRemoteMessagesFetched = true;
|
||||||
|
}
|
||||||
|
|
||||||
return messages;
|
return messages;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -288,9 +316,10 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_isSyncing = true;
|
_isSyncing = true;
|
||||||
|
_allRemoteMessagesFetched = false;
|
||||||
|
|
||||||
talker.log('Starting message sync');
|
talker.log('Starting message sync');
|
||||||
Future.microtask(() => ref.read(isSyncingProvider.notifier).state = true);
|
Future.microtask(() => ref.read(chatSyncingProvider.notifier).set(true));
|
||||||
try {
|
try {
|
||||||
final dbMessages = await _database.getMessagesForRoom(
|
final dbMessages = await _database.getMessagesForRoom(
|
||||||
_room.id,
|
_room.id,
|
||||||
@@ -300,7 +329,10 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
final lastMessage =
|
final lastMessage =
|
||||||
dbMessages.isEmpty
|
dbMessages.isEmpty
|
||||||
? null
|
? null
|
||||||
: _database.companionToMessage(dbMessages.first);
|
: await _database.companionToMessage(
|
||||||
|
dbMessages.first,
|
||||||
|
fetchAccount: _fetchAccount,
|
||||||
|
);
|
||||||
|
|
||||||
if (lastMessage == null) {
|
if (lastMessage == null) {
|
||||||
talker.log('No local messages, fetching from network');
|
talker.log('No local messages, fetching from network');
|
||||||
@@ -312,19 +344,48 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final resp = await _apiClient.post(
|
// Sync with pagination support using timestamp-based cursor
|
||||||
'/sphere/chat/${_room.id}/sync',
|
int? totalMessages;
|
||||||
data: {
|
int syncedCount = 0;
|
||||||
'last_sync_timestamp':
|
int lastSyncTimestamp =
|
||||||
lastMessage.toRemoteMessage().updatedAt.millisecondsSinceEpoch,
|
lastMessage.toRemoteMessage().updatedAt.millisecondsSinceEpoch;
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
final response = MessageSyncResponse.fromJson(resp.data);
|
do {
|
||||||
talker.log('Sync response: ${response.messages.length} changes');
|
final resp = await _apiClient.post(
|
||||||
for (final message in response.messages) {
|
'/sphere/chat/${_room.id}/sync',
|
||||||
await receiveMessage(message);
|
data: {'last_sync_timestamp': lastSyncTimestamp},
|
||||||
}
|
);
|
||||||
|
|
||||||
|
// Read total count from header on first request
|
||||||
|
if (totalMessages == null) {
|
||||||
|
totalMessages = int.parse(
|
||||||
|
resp.headers['x-total']?.firstOrNull ?? '0',
|
||||||
|
);
|
||||||
|
talker.log('Total messages to sync: $totalMessages');
|
||||||
|
}
|
||||||
|
|
||||||
|
final response = MessageSyncResponse.fromJson(resp.data);
|
||||||
|
final messagesCount = response.messages.length;
|
||||||
|
talker.log(
|
||||||
|
'Sync page: synced=$syncedCount/$totalMessages, count=$messagesCount',
|
||||||
|
);
|
||||||
|
|
||||||
|
for (final message in response.messages) {
|
||||||
|
await receiveMessage(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
syncedCount += messagesCount;
|
||||||
|
|
||||||
|
// Update cursor to the last message's createdAt for next page
|
||||||
|
if (response.messages.isNotEmpty) {
|
||||||
|
lastSyncTimestamp =
|
||||||
|
response.messages.last.createdAt.millisecondsSinceEpoch;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Continue if there are more messages to fetch
|
||||||
|
} while (syncedCount < totalMessages);
|
||||||
|
|
||||||
|
talker.log('Sync complete: synced $syncedCount messages');
|
||||||
} catch (err, stackTrace) {
|
} catch (err, stackTrace) {
|
||||||
talker.log(
|
talker.log(
|
||||||
'Error syncing messages',
|
'Error syncing messages',
|
||||||
@@ -334,9 +395,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
showErrorAlert(err);
|
showErrorAlert(err);
|
||||||
} finally {
|
} finally {
|
||||||
talker.log('Finished message sync');
|
talker.log('Finished message sync');
|
||||||
Future.microtask(
|
Future.microtask(() => ref.read(chatSyncingProvider.notifier).set(false));
|
||||||
() => ref.read(isSyncingProvider.notifier).state = false,
|
|
||||||
);
|
|
||||||
_isSyncing = false;
|
_isSyncing = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -363,14 +422,35 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
withAttachments: _withAttachments,
|
withAttachments: _withAttachments,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (localMessages.isNotEmpty) {
|
// If we have local messages AND we've fetched all remote messages, return local
|
||||||
|
if (localMessages.isNotEmpty && _allRemoteMessagesFetched) {
|
||||||
return localMessages;
|
return localMessages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we haven't fetched all remote messages, check remote even if we have local
|
||||||
|
// OR if we have no local messages at all
|
||||||
if (_searchQuery == null || _searchQuery!.isEmpty) {
|
if (_searchQuery == null || _searchQuery!.isEmpty) {
|
||||||
return await _fetchAndCacheMessages(offset: offset, take: take);
|
final remoteMessages = await _fetchAndCacheMessages(
|
||||||
|
offset: offset,
|
||||||
|
take: take,
|
||||||
|
);
|
||||||
|
|
||||||
|
// If we got remote messages, re-fetch from cache to get merged result
|
||||||
|
if (remoteMessages.isNotEmpty) {
|
||||||
|
return await _getCachedMessages(
|
||||||
|
offset: offset,
|
||||||
|
take: take,
|
||||||
|
searchQuery: _searchQuery,
|
||||||
|
withLinks: _withLinks,
|
||||||
|
withAttachments: _withAttachments,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// No remote messages, return local (if any)
|
||||||
|
return localMessages;
|
||||||
} else {
|
} else {
|
||||||
return []; // If searching, and no local messages, don't fetch from network
|
// For search queries, return local only
|
||||||
|
return localMessages;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
final localMessages = await _getCachedMessages(
|
final localMessages = await _getCachedMessages(
|
||||||
@@ -390,6 +470,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
|
|
||||||
Future<void> loadInitial() async {
|
Future<void> loadInitial() async {
|
||||||
talker.log('Loading initial messages');
|
talker.log('Loading initial messages');
|
||||||
|
_allRemoteMessagesFetched = false;
|
||||||
if (_searchQuery == null || _searchQuery!.isEmpty) {
|
if (_searchQuery == null || _searchQuery!.isEmpty) {
|
||||||
syncMessages();
|
syncMessages();
|
||||||
}
|
}
|
||||||
@@ -411,6 +492,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
if (!_hasMore || state is AsyncLoading) return;
|
if (!_hasMore || state is AsyncLoading) return;
|
||||||
talker.log('Loading more messages');
|
talker.log('Loading more messages');
|
||||||
|
|
||||||
|
Future.microtask(() => ref.read(chatSyncingProvider.notifier).set(true));
|
||||||
try {
|
try {
|
||||||
final currentMessages = state.value ?? [];
|
final currentMessages = state.value ?? [];
|
||||||
final offset = currentMessages.length;
|
final offset = currentMessages.length;
|
||||||
@@ -432,6 +514,8 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
stackTrace: stackTrace,
|
stackTrace: stackTrace,
|
||||||
);
|
);
|
||||||
showErrorAlert(err);
|
showErrorAlert(err);
|
||||||
|
} finally {
|
||||||
|
Future.microtask(() => ref.read(chatSyncingProvider.notifier).set(false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -451,7 +535,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
|
|
||||||
final mockMessage = SnChatMessage(
|
final mockMessage = SnChatMessage(
|
||||||
id: 'pending_$nonce',
|
id: 'pending_$nonce',
|
||||||
chatRoomId: _roomId,
|
chatRoomId: roomId,
|
||||||
senderId: _identity.id,
|
senderId: _identity.id,
|
||||||
content: content,
|
content: content,
|
||||||
createdAt: DateTime.now(),
|
createdAt: DateTime.now(),
|
||||||
@@ -467,7 +551,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
|
|
||||||
_pendingMessages[localMessage.id] = localMessage;
|
_pendingMessages[localMessage.id] = localMessage;
|
||||||
_fileUploadProgress[localMessage.id] = {};
|
_fileUploadProgress[localMessage.id] = {};
|
||||||
await _database.saveMessage(_database.messageToCompanion(localMessage));
|
await _database.saveMessageWithSender(localMessage);
|
||||||
|
|
||||||
final currentMessages = state.value ?? [];
|
final currentMessages = state.value ?? [];
|
||||||
state = AsyncValue.data([localMessage, ...currentMessages]);
|
state = AsyncValue.data([localMessage, ...currentMessages]);
|
||||||
@@ -495,8 +579,8 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
|
|
||||||
final response = await _apiClient.request(
|
final response = await _apiClient.request(
|
||||||
editingTo == null
|
editingTo == null
|
||||||
? '/sphere/chat/$_roomId/messages'
|
? '/sphere/chat/$roomId/messages'
|
||||||
: '/sphere/chat/$_roomId/messages/${editingTo.id}',
|
: '/sphere/chat/$roomId/messages/${editingTo.id}',
|
||||||
data: {
|
data: {
|
||||||
'content': content,
|
'content': content,
|
||||||
'attachments_id': cloudAttachments.map((e) => e.id).toList(),
|
'attachments_id': cloudAttachments.map((e) => e.id).toList(),
|
||||||
@@ -518,7 +602,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
|
|
||||||
_pendingMessages.remove(localMessage.id);
|
_pendingMessages.remove(localMessage.id);
|
||||||
await _database.deleteMessage(localMessage.id);
|
await _database.deleteMessage(localMessage.id);
|
||||||
await _database.saveMessage(_database.messageToCompanion(updatedMessage));
|
await _database.saveMessageWithSender(updatedMessage);
|
||||||
|
|
||||||
final currentMessages = state.value ?? [];
|
final currentMessages = state.value ?? [];
|
||||||
if (editingTo != null) {
|
if (editingTo != null) {
|
||||||
@@ -600,7 +684,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
|
|
||||||
_pendingMessages.remove(pendingMessageId);
|
_pendingMessages.remove(pendingMessageId);
|
||||||
await _database.deleteMessage(pendingMessageId);
|
await _database.deleteMessage(pendingMessageId);
|
||||||
await _database.saveMessage(_database.messageToCompanion(updatedMessage));
|
await _database.saveMessageWithSender(updatedMessage);
|
||||||
|
|
||||||
final newMessages =
|
final newMessages =
|
||||||
(state.value ?? []).map((m) {
|
(state.value ?? []).map((m) {
|
||||||
@@ -636,7 +720,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> receiveMessage(SnChatMessage remoteMessage) async {
|
Future<void> receiveMessage(SnChatMessage remoteMessage) async {
|
||||||
if (remoteMessage.chatRoomId != _roomId) return;
|
if (remoteMessage.chatRoomId != roomId) return;
|
||||||
|
|
||||||
// Block message receiving during jumps to prevent list resets
|
// Block message receiving during jumps to prevent list resets
|
||||||
if (_isJumping) {
|
if (_isJumping) {
|
||||||
@@ -657,7 +741,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
await _database.saveMessage(_database.messageToCompanion(localMessage));
|
await _database.saveMessageWithSender(localMessage);
|
||||||
|
|
||||||
final currentMessages = state.value ?? [];
|
final currentMessages = state.value ?? [];
|
||||||
final existingIndex = currentMessages.indexWhere(
|
final existingIndex = currentMessages.indexWhere(
|
||||||
@@ -688,7 +772,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> receiveMessageUpdate(SnChatMessage remoteMessage) async {
|
Future<void> receiveMessageUpdate(SnChatMessage remoteMessage) async {
|
||||||
if (remoteMessage.chatRoomId != _roomId) return;
|
if (remoteMessage.chatRoomId != roomId) return;
|
||||||
|
|
||||||
// Block message updates during jumps to prevent list resets
|
// Block message updates during jumps to prevent list resets
|
||||||
if (_isJumping) {
|
if (_isJumping) {
|
||||||
@@ -754,7 +838,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
messageToUpdate.status,
|
messageToUpdate.status,
|
||||||
);
|
);
|
||||||
|
|
||||||
await _database.saveMessage(_database.messageToCompanion(deletedMessage));
|
await _database.saveMessageWithSender(deletedMessage);
|
||||||
|
|
||||||
if (messageIndex != -1) {
|
if (messageIndex != -1) {
|
||||||
final newList = [...currentMessages];
|
final newList = [...currentMessages];
|
||||||
@@ -788,7 +872,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await _apiClient.delete('/sphere/chat/$_roomId/messages/$messageId');
|
await _apiClient.delete('/sphere/chat/$roomId/messages/$messageId');
|
||||||
await receiveMessageDeletion(messageId);
|
await receiveMessageDeletion(messageId);
|
||||||
} catch (err, stackTrace) {
|
} catch (err, stackTrace) {
|
||||||
talker.log(
|
talker.log(
|
||||||
@@ -878,6 +962,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
_searchQuery = null;
|
_searchQuery = null;
|
||||||
_withLinks = null;
|
_withLinks = null;
|
||||||
_withAttachments = null;
|
_withAttachments = null;
|
||||||
|
_allRemoteMessagesFetched = false;
|
||||||
loadInitial();
|
loadInitial();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -888,11 +973,14 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
await (_database.select(_database.chatMessages)
|
await (_database.select(_database.chatMessages)
|
||||||
..where((tbl) => tbl.id.equals(messageId))).getSingleOrNull();
|
..where((tbl) => tbl.id.equals(messageId))).getSingleOrNull();
|
||||||
if (localMessage != null) {
|
if (localMessage != null) {
|
||||||
return _database.companionToMessage(localMessage);
|
return _database.companionToMessage(
|
||||||
|
localMessage,
|
||||||
|
fetchAccount: _fetchAccount,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
final response = await _apiClient.get(
|
final response = await _apiClient.get(
|
||||||
'/sphere/chat/$_roomId/messages/$messageId',
|
'/sphere/chat/$roomId/messages/$messageId',
|
||||||
);
|
);
|
||||||
final remoteMessage = SnChatMessage.fromJson(response.data);
|
final remoteMessage = SnChatMessage.fromJson(response.data);
|
||||||
final message = LocalChatMessage.fromRemoteMessage(
|
final message = LocalChatMessage.fromRemoteMessage(
|
||||||
@@ -900,7 +988,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
MessageStatus.sent,
|
MessageStatus.sent,
|
||||||
);
|
);
|
||||||
|
|
||||||
await _database.saveMessage(_database.messageToCompanion(message));
|
await _database.saveMessageWithSender(message);
|
||||||
return message;
|
return message;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e is DioException) return null;
|
if (e is DioException) return null;
|
||||||
@@ -949,7 +1037,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
final query = _database.customSelect(
|
final query = _database.customSelect(
|
||||||
'SELECT COUNT(*) as count FROM chat_messages WHERE room_id = ? AND created_at > ?',
|
'SELECT COUNT(*) as count FROM chat_messages WHERE room_id = ? AND created_at > ?',
|
||||||
variables: [
|
variables: [
|
||||||
Variable.withString(_roomId),
|
Variable.withString(roomId),
|
||||||
Variable.withDateTime(message.createdAt),
|
Variable.withDateTime(message.createdAt),
|
||||||
],
|
],
|
||||||
readsFrom: {_database.chatMessages},
|
readsFrom: {_database.chatMessages},
|
||||||
|
|||||||
@@ -6,174 +6,101 @@ part of 'messages_notifier.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$messagesNotifierHash() => r'c009eb8598e8b5fbcece2d0b5213b2e434edb3b2';
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// Copied from Dart SDK
|
|
||||||
class _SystemHash {
|
|
||||||
_SystemHash._();
|
|
||||||
|
|
||||||
static int combine(int hash, int value) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + value);
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
|
||||||
return hash ^ (hash >> 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int finish(int hash) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = hash ^ (hash >> 11);
|
|
||||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class _$MessagesNotifier
|
|
||||||
extends BuildlessAutoDisposeAsyncNotifier<List<LocalChatMessage>> {
|
|
||||||
late final String roomId;
|
|
||||||
|
|
||||||
FutureOr<List<LocalChatMessage>> build(String roomId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [MessagesNotifier].
|
|
||||||
@ProviderFor(MessagesNotifier)
|
@ProviderFor(MessagesNotifier)
|
||||||
const messagesNotifierProvider = MessagesNotifierFamily();
|
const messagesProvider = MessagesNotifierFamily._();
|
||||||
|
|
||||||
/// See also [MessagesNotifier].
|
final class MessagesNotifierProvider
|
||||||
class MessagesNotifierFamily
|
extends $AsyncNotifierProvider<MessagesNotifier, List<LocalChatMessage>> {
|
||||||
extends Family<AsyncValue<List<LocalChatMessage>>> {
|
const MessagesNotifierProvider._({
|
||||||
/// See also [MessagesNotifier].
|
required MessagesNotifierFamily super.from,
|
||||||
const MessagesNotifierFamily();
|
required String super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'messagesProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
/// See also [MessagesNotifier].
|
@override
|
||||||
MessagesNotifierProvider call(String roomId) {
|
String debugGetCreateSourceHash() => _$messagesNotifierHash();
|
||||||
return MessagesNotifierProvider(roomId);
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return r'messagesProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
@override
|
@override
|
||||||
MessagesNotifierProvider getProviderOverride(
|
MessagesNotifier create() => MessagesNotifier();
|
||||||
covariant MessagesNotifierProvider provider,
|
|
||||||
) {
|
|
||||||
return call(provider.roomId);
|
|
||||||
}
|
|
||||||
|
|
||||||
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'messagesNotifierProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [MessagesNotifier].
|
|
||||||
class MessagesNotifierProvider
|
|
||||||
extends
|
|
||||||
AutoDisposeAsyncNotifierProviderImpl<
|
|
||||||
MessagesNotifier,
|
|
||||||
List<LocalChatMessage>
|
|
||||||
> {
|
|
||||||
/// See also [MessagesNotifier].
|
|
||||||
MessagesNotifierProvider(String roomId)
|
|
||||||
: this._internal(
|
|
||||||
() => MessagesNotifier()..roomId = roomId,
|
|
||||||
from: messagesNotifierProvider,
|
|
||||||
name: r'messagesNotifierProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$messagesNotifierHash,
|
|
||||||
dependencies: MessagesNotifierFamily._dependencies,
|
|
||||||
allTransitiveDependencies:
|
|
||||||
MessagesNotifierFamily._allTransitiveDependencies,
|
|
||||||
roomId: roomId,
|
|
||||||
);
|
|
||||||
|
|
||||||
MessagesNotifierProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.roomId,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final String roomId;
|
|
||||||
|
|
||||||
@override
|
|
||||||
FutureOr<List<LocalChatMessage>> runNotifierBuild(
|
|
||||||
covariant MessagesNotifier notifier,
|
|
||||||
) {
|
|
||||||
return notifier.build(roomId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Override overrideWith(MessagesNotifier Function() create) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
|
||||||
override: MessagesNotifierProvider._internal(
|
|
||||||
() => create()..roomId = roomId,
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
roomId: roomId,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
AutoDisposeAsyncNotifierProviderElement<
|
|
||||||
MessagesNotifier,
|
|
||||||
List<LocalChatMessage>
|
|
||||||
>
|
|
||||||
createElement() {
|
|
||||||
return _MessagesNotifierProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is MessagesNotifierProvider && other.roomId == roomId;
|
return other is MessagesNotifierProvider && other.argument == argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
return argument.hashCode;
|
||||||
hash = _SystemHash.combine(hash, roomId.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
String _$messagesNotifierHash() => r'2f3f19cb99357184e82d66e74a31863fcfc48856';
|
||||||
// ignore: unused_element
|
|
||||||
mixin MessagesNotifierRef
|
|
||||||
on AutoDisposeAsyncNotifierProviderRef<List<LocalChatMessage>> {
|
|
||||||
/// The parameter `roomId` of this provider.
|
|
||||||
String get roomId;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _MessagesNotifierProviderElement
|
final class MessagesNotifierFamily extends $Family
|
||||||
extends
|
with
|
||||||
AutoDisposeAsyncNotifierProviderElement<
|
$ClassFamilyOverride<
|
||||||
MessagesNotifier,
|
MessagesNotifier,
|
||||||
List<LocalChatMessage>
|
AsyncValue<List<LocalChatMessage>>,
|
||||||
>
|
List<LocalChatMessage>,
|
||||||
with MessagesNotifierRef {
|
FutureOr<List<LocalChatMessage>>,
|
||||||
_MessagesNotifierProviderElement(super.provider);
|
String
|
||||||
|
> {
|
||||||
|
const MessagesNotifierFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'messagesProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
MessagesNotifierProvider call(String roomId) =>
|
||||||
|
MessagesNotifierProvider._(argument: roomId, from: this);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get roomId => (origin as MessagesNotifierProvider).roomId;
|
String toString() => r'messagesProvider';
|
||||||
}
|
}
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
abstract class _$MessagesNotifier
|
||||||
// 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
|
extends $AsyncNotifier<List<LocalChatMessage>> {
|
||||||
|
late final _$args = ref.$arg as String;
|
||||||
|
String get roomId => _$args;
|
||||||
|
|
||||||
|
FutureOr<List<LocalChatMessage>> build(String roomId);
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final created = build(_$args);
|
||||||
|
final ref =
|
||||||
|
this.ref
|
||||||
|
as $Ref<AsyncValue<List<LocalChatMessage>>, List<LocalChatMessage>>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<
|
||||||
|
AsyncValue<List<LocalChatMessage>>,
|
||||||
|
List<LocalChatMessage>
|
||||||
|
>,
|
||||||
|
AsyncValue<List<LocalChatMessage>>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -22,10 +22,9 @@ const kAppColorSchemeStoreKey = 'app_color_scheme';
|
|||||||
const kAppCustomColorsStoreKey = 'app_custom_colors';
|
const kAppCustomColorsStoreKey = 'app_custom_colors';
|
||||||
const kAppNotifyWithHaptic = 'app_notify_with_haptic';
|
const kAppNotifyWithHaptic = 'app_notify_with_haptic';
|
||||||
const kAppCustomFonts = 'app_custom_fonts';
|
const kAppCustomFonts = 'app_custom_fonts';
|
||||||
const kAppAutoTranslate = 'app_auto_translate';
|
|
||||||
const kAppDataSavingMode = 'app_data_saving_mode';
|
const kAppDataSavingMode = 'app_data_saving_mode';
|
||||||
const kAppSoundEffects = 'app_sound_effects';
|
const kAppSoundEffects = 'app_sound_effects';
|
||||||
const kAppAprilFoolFeatures = 'app_april_fool_features';
|
const kAppFestivalFeatures = 'app_feastival_features';
|
||||||
const kAppWindowSize = 'app_window_size';
|
const kAppWindowSize = 'app_window_size';
|
||||||
const kAppWindowOpacity = 'app_window_opacity';
|
const kAppWindowOpacity = 'app_window_opacity';
|
||||||
const kAppCardTransparent = 'app_card_transparent';
|
const kAppCardTransparent = 'app_card_transparent';
|
||||||
@@ -33,31 +32,21 @@ const kAppEnterToSend = 'app_enter_to_send';
|
|||||||
const kAppDefaultPoolId = 'app_default_pool_id';
|
const kAppDefaultPoolId = 'app_default_pool_id';
|
||||||
const kAppMessageDisplayStyle = 'app_message_display_style';
|
const kAppMessageDisplayStyle = 'app_message_display_style';
|
||||||
const kAppThemeMode = 'app_theme_mode';
|
const kAppThemeMode = 'app_theme_mode';
|
||||||
const kMaterialYouToggleStoreKey = 'app_theme_material_you';
|
|
||||||
const kAppDisableAnimation = 'app_disable_animation';
|
const kAppDisableAnimation = 'app_disable_animation';
|
||||||
const kAppFabPosition = 'app_fab_position';
|
const kAppFabPosition = 'app_fab_position';
|
||||||
|
const kAppGroupedChatList = 'app_grouped_chat_list';
|
||||||
const kFeaturedPostsCollapsedId =
|
const kFeaturedPostsCollapsedId =
|
||||||
'featured_posts_collapsed_id'; // Key for storing the ID of the collapsed featured post
|
'featured_posts_collapsed_id'; // Key for storing the ID of the collapsed featured post
|
||||||
|
const kAppFirstLaunchAt = 'app_first_launch_at';
|
||||||
|
const kAppAskedReview = 'app_asked_review';
|
||||||
|
const kAppDashSearchEngine = 'app_dash_search_engine';
|
||||||
|
const kAppDefaultScreen = 'app_default_screen';
|
||||||
|
|
||||||
const Map<String, FilterQuality> kImageQualityLevel = {
|
// Will be overrided by the ProviderScope
|
||||||
'settingsImageQualityLowest': FilterQuality.none,
|
|
||||||
'settingsImageQualityLow': FilterQuality.low,
|
|
||||||
'settingsImageQualityMedium': FilterQuality.medium,
|
|
||||||
'settingsImageQualityHigh': FilterQuality.high,
|
|
||||||
};
|
|
||||||
|
|
||||||
final sharedPreferencesProvider = Provider<SharedPreferences>((ref) {
|
final sharedPreferencesProvider = Provider<SharedPreferences>((ref) {
|
||||||
throw UnimplementedError();
|
throw UnimplementedError();
|
||||||
});
|
});
|
||||||
|
|
||||||
final imageQualityProvider = Provider<FilterQuality>((ref) {
|
|
||||||
final prefs = ref.watch(sharedPreferencesProvider);
|
|
||||||
return kImageQualityLevel.values.elementAtOrNull(
|
|
||||||
prefs.getInt('app_image_quality') ?? 3,
|
|
||||||
) ??
|
|
||||||
FilterQuality.high;
|
|
||||||
});
|
|
||||||
|
|
||||||
final serverUrlProvider = Provider<String>((ref) {
|
final serverUrlProvider = Provider<String>((ref) {
|
||||||
final prefs = ref.watch(sharedPreferencesProvider);
|
final prefs = ref.watch(sharedPreferencesProvider);
|
||||||
return prefs.getString(kNetworkServerStoreKey) ?? kNetworkServerDefault;
|
return prefs.getString(kNetworkServerStoreKey) ?? kNetworkServerDefault;
|
||||||
@@ -81,13 +70,13 @@ sealed class ThemeColors with _$ThemeColors {
|
|||||||
@freezed
|
@freezed
|
||||||
sealed class AppSettings with _$AppSettings {
|
sealed class AppSettings with _$AppSettings {
|
||||||
const factory AppSettings({
|
const factory AppSettings({
|
||||||
required bool autoTranslate,
|
|
||||||
required bool dataSavingMode,
|
required bool dataSavingMode,
|
||||||
required bool soundEffects,
|
required bool soundEffects,
|
||||||
required bool aprilFoolFeatures,
|
required bool festivalFeatures,
|
||||||
required bool enterToSend,
|
required bool enterToSend,
|
||||||
required bool appBarTransparent,
|
required bool appBarTransparent,
|
||||||
required bool showBackgroundImage,
|
required bool showBackgroundImage,
|
||||||
|
required bool notifyWithHaptic,
|
||||||
required String? customFonts,
|
required String? customFonts,
|
||||||
required int? appColorScheme, // The color stored via the int type
|
required int? appColorScheme, // The color stored via the int type
|
||||||
required ThemeColors? customColors,
|
required ThemeColors? customColors,
|
||||||
@@ -97,9 +86,13 @@ sealed class AppSettings with _$AppSettings {
|
|||||||
required String? defaultPoolId,
|
required String? defaultPoolId,
|
||||||
required String messageDisplayStyle,
|
required String messageDisplayStyle,
|
||||||
required String? themeMode,
|
required String? themeMode,
|
||||||
required bool useMaterial3,
|
|
||||||
required bool disableAnimation,
|
required bool disableAnimation,
|
||||||
required String fabPosition,
|
required String fabPosition,
|
||||||
|
required bool groupedChatList,
|
||||||
|
required String? firstLaunchAt,
|
||||||
|
required bool askedReview,
|
||||||
|
required String? dashSearchEngine,
|
||||||
|
required String? defaultScreen,
|
||||||
}) = _AppSettings;
|
}) = _AppSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,13 +102,13 @@ class AppSettingsNotifier extends _$AppSettingsNotifier {
|
|||||||
AppSettings build() {
|
AppSettings build() {
|
||||||
final prefs = ref.watch(sharedPreferencesProvider);
|
final prefs = ref.watch(sharedPreferencesProvider);
|
||||||
return AppSettings(
|
return AppSettings(
|
||||||
autoTranslate: prefs.getBool(kAppAutoTranslate) ?? false,
|
|
||||||
dataSavingMode: prefs.getBool(kAppDataSavingMode) ?? false,
|
dataSavingMode: prefs.getBool(kAppDataSavingMode) ?? false,
|
||||||
soundEffects: prefs.getBool(kAppSoundEffects) ?? true,
|
soundEffects: prefs.getBool(kAppSoundEffects) ?? true,
|
||||||
aprilFoolFeatures: prefs.getBool(kAppAprilFoolFeatures) ?? true,
|
festivalFeatures: prefs.getBool(kAppFestivalFeatures) ?? true,
|
||||||
enterToSend: prefs.getBool(kAppEnterToSend) ?? true,
|
enterToSend: prefs.getBool(kAppEnterToSend) ?? true,
|
||||||
appBarTransparent: prefs.getBool(kAppbarTransparentStoreKey) ?? false,
|
appBarTransparent: prefs.getBool(kAppbarTransparentStoreKey) ?? false,
|
||||||
showBackgroundImage: prefs.getBool(kAppShowBackgroundImage) ?? true,
|
showBackgroundImage: prefs.getBool(kAppShowBackgroundImage) ?? true,
|
||||||
|
notifyWithHaptic: prefs.getBool(kAppNotifyWithHaptic) ?? true,
|
||||||
customFonts: prefs.getString(kAppCustomFonts),
|
customFonts: prefs.getString(kAppCustomFonts),
|
||||||
appColorScheme: prefs.getInt(kAppColorSchemeStoreKey),
|
appColorScheme: prefs.getInt(kAppColorSchemeStoreKey),
|
||||||
customColors: _getThemeColorsFromPrefs(prefs),
|
customColors: _getThemeColorsFromPrefs(prefs),
|
||||||
@@ -125,9 +118,13 @@ class AppSettingsNotifier extends _$AppSettingsNotifier {
|
|||||||
defaultPoolId: prefs.getString(kAppDefaultPoolId),
|
defaultPoolId: prefs.getString(kAppDefaultPoolId),
|
||||||
messageDisplayStyle: prefs.getString(kAppMessageDisplayStyle) ?? 'bubble',
|
messageDisplayStyle: prefs.getString(kAppMessageDisplayStyle) ?? 'bubble',
|
||||||
themeMode: prefs.getString(kAppThemeMode) ?? 'system',
|
themeMode: prefs.getString(kAppThemeMode) ?? 'system',
|
||||||
useMaterial3: prefs.getBool(kMaterialYouToggleStoreKey) ?? true,
|
|
||||||
disableAnimation: prefs.getBool(kAppDisableAnimation) ?? false,
|
disableAnimation: prefs.getBool(kAppDisableAnimation) ?? false,
|
||||||
fabPosition: prefs.getString(kAppFabPosition) ?? 'center',
|
fabPosition: prefs.getString(kAppFabPosition) ?? 'center',
|
||||||
|
groupedChatList: prefs.getBool(kAppGroupedChatList) ?? false,
|
||||||
|
askedReview: prefs.getBool(kAppAskedReview) ?? false,
|
||||||
|
firstLaunchAt: prefs.getString(kAppFirstLaunchAt),
|
||||||
|
dashSearchEngine: prefs.getString(kAppDashSearchEngine),
|
||||||
|
defaultScreen: prefs.getString(kAppDefaultScreen),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,12 +167,6 @@ class AppSettingsNotifier extends _$AppSettingsNotifier {
|
|||||||
state = state.copyWith(defaultPoolId: value);
|
state = state.copyWith(defaultPoolId: value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setAutoTranslate(bool value) {
|
|
||||||
final prefs = ref.read(sharedPreferencesProvider);
|
|
||||||
prefs.setBool(kAppAutoTranslate, value);
|
|
||||||
state = state.copyWith(autoTranslate: value);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setDataSavingMode(bool value) {
|
void setDataSavingMode(bool value) {
|
||||||
final prefs = ref.read(sharedPreferencesProvider);
|
final prefs = ref.read(sharedPreferencesProvider);
|
||||||
prefs.setBool(kAppDataSavingMode, value);
|
prefs.setBool(kAppDataSavingMode, value);
|
||||||
@@ -188,10 +179,10 @@ class AppSettingsNotifier extends _$AppSettingsNotifier {
|
|||||||
state = state.copyWith(soundEffects: value);
|
state = state.copyWith(soundEffects: value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setAprilFoolFeatures(bool value) {
|
void setFeativalFeatures(bool value) {
|
||||||
final prefs = ref.read(sharedPreferencesProvider);
|
final prefs = ref.read(sharedPreferencesProvider);
|
||||||
prefs.setBool(kAppAprilFoolFeatures, value);
|
prefs.setBool(kAppFestivalFeatures, value);
|
||||||
state = state.copyWith(aprilFoolFeatures: value);
|
state = state.copyWith(festivalFeatures: value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setEnterToSend(bool value) {
|
void setEnterToSend(bool value) {
|
||||||
@@ -212,12 +203,24 @@ class AppSettingsNotifier extends _$AppSettingsNotifier {
|
|||||||
state = state.copyWith(showBackgroundImage: value);
|
state = state.copyWith(showBackgroundImage: value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setNotifyWithHaptic(bool value) {
|
||||||
|
final prefs = ref.read(sharedPreferencesProvider);
|
||||||
|
prefs.setBool(kAppNotifyWithHaptic, value);
|
||||||
|
state = state.copyWith(notifyWithHaptic: value);
|
||||||
|
}
|
||||||
|
|
||||||
void setCustomFonts(String? value) {
|
void setCustomFonts(String? value) {
|
||||||
final prefs = ref.read(sharedPreferencesProvider);
|
final prefs = ref.read(sharedPreferencesProvider);
|
||||||
prefs.setString(kAppCustomFonts, value ?? '');
|
prefs.setString(kAppCustomFonts, value ?? '');
|
||||||
state = state.copyWith(customFonts: value);
|
state = state.copyWith(customFonts: value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setDefaultScreen(String? value) {
|
||||||
|
final prefs = ref.read(sharedPreferencesProvider);
|
||||||
|
prefs.setString(kAppDefaultScreen, value ?? 'dashboard');
|
||||||
|
state = state.copyWith(defaultScreen: value);
|
||||||
|
}
|
||||||
|
|
||||||
void setAppColorScheme(int? value) {
|
void setAppColorScheme(int? value) {
|
||||||
final prefs = ref.read(sharedPreferencesProvider);
|
final prefs = ref.read(sharedPreferencesProvider);
|
||||||
prefs.setInt(kAppColorSchemeStoreKey, value ?? 0);
|
prefs.setInt(kAppColorSchemeStoreKey, value ?? 0);
|
||||||
@@ -263,12 +266,6 @@ class AppSettingsNotifier extends _$AppSettingsNotifier {
|
|||||||
state = state.copyWith(cardTransparency: value);
|
state = state.copyWith(cardTransparency: value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setUseMaterial3(bool value) {
|
|
||||||
final prefs = ref.read(sharedPreferencesProvider);
|
|
||||||
prefs.setBool(kMaterialYouToggleStoreKey, value);
|
|
||||||
state = state.copyWith(useMaterial3: value);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setCustomColors(ThemeColors? value) {
|
void setCustomColors(ThemeColors? value) {
|
||||||
final prefs = ref.read(sharedPreferencesProvider);
|
final prefs = ref.read(sharedPreferencesProvider);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
@@ -291,15 +288,50 @@ class AppSettingsNotifier extends _$AppSettingsNotifier {
|
|||||||
prefs.setString(kAppFabPosition, value);
|
prefs.setString(kAppFabPosition, value);
|
||||||
state = state.copyWith(fabPosition: value);
|
state = state.copyWith(fabPosition: value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setGroupedChatList(bool value) {
|
||||||
|
final prefs = ref.read(sharedPreferencesProvider);
|
||||||
|
prefs.setBool(kAppGroupedChatList, value);
|
||||||
|
state = state.copyWith(groupedChatList: value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setFirstLaunchAt(String? value) {
|
||||||
|
final prefs = ref.read(sharedPreferencesProvider);
|
||||||
|
if (value != null) {
|
||||||
|
prefs.setString(kAppFirstLaunchAt, value);
|
||||||
|
} else {
|
||||||
|
prefs.remove(kAppFirstLaunchAt);
|
||||||
|
}
|
||||||
|
state = state.copyWith(firstLaunchAt: value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setAskedReview(bool value) {
|
||||||
|
final prefs = ref.read(sharedPreferencesProvider);
|
||||||
|
prefs.setBool(kAppAskedReview, value);
|
||||||
|
state = state.copyWith(askedReview: value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setDashSearchEngine(String? value) {
|
||||||
|
final prefs = ref.read(sharedPreferencesProvider);
|
||||||
|
if (value != null) {
|
||||||
|
prefs.setString(kAppDashSearchEngine, value);
|
||||||
|
} else {
|
||||||
|
prefs.remove(kAppDashSearchEngine);
|
||||||
|
}
|
||||||
|
state = state.copyWith(dashSearchEngine: value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final updateInfoProvider =
|
final updateInfoProvider =
|
||||||
StateNotifierProvider<UpdateInfoNotifier, (String?, String?)>((ref) {
|
NotifierProvider<UpdateInfoNotifier, (String?, String?)>(
|
||||||
return UpdateInfoNotifier();
|
UpdateInfoNotifier.new,
|
||||||
});
|
);
|
||||||
|
|
||||||
class UpdateInfoNotifier extends StateNotifier<(String?, String?)> {
|
class UpdateInfoNotifier extends Notifier<(String?, String?)> {
|
||||||
UpdateInfoNotifier() : super((null, null));
|
@override
|
||||||
|
(String?, String?) build() {
|
||||||
|
return (null, null);
|
||||||
|
}
|
||||||
|
|
||||||
void setUpdate(String newVersion, String newChangelog) {
|
void setUpdate(String newVersion, String newChangelog) {
|
||||||
state = (newVersion, newChangelog);
|
state = (newVersion, newChangelog);
|
||||||
|
|||||||
@@ -286,11 +286,11 @@ as int?,
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$AppSettings {
|
mixin _$AppSettings {
|
||||||
|
|
||||||
bool get autoTranslate; bool get dataSavingMode; bool get soundEffects; bool get aprilFoolFeatures; bool get enterToSend; bool get appBarTransparent; bool get showBackgroundImage; String? get customFonts; int? get appColorScheme;// The color stored via the int type
|
bool get dataSavingMode; bool get soundEffects; bool get festivalFeatures; bool get enterToSend; bool get appBarTransparent; bool get showBackgroundImage; bool get notifyWithHaptic; String? get customFonts; int? get appColorScheme;// The color stored via the int type
|
||||||
ThemeColors? get customColors; Size? get windowSize;// The window size for desktop platforms
|
ThemeColors? get customColors; Size? get windowSize;// The window size for desktop platforms
|
||||||
double get windowOpacity;// The window opacity for desktop platforms
|
double get windowOpacity;// The window opacity for desktop platforms
|
||||||
double get cardTransparency;// The card background opacity
|
double get cardTransparency;// The card background opacity
|
||||||
String? get defaultPoolId; String get messageDisplayStyle; String? get themeMode; bool get useMaterial3; bool get disableAnimation; String get fabPosition;
|
String? get defaultPoolId; String get messageDisplayStyle; String? get themeMode; bool get disableAnimation; String get fabPosition; bool get groupedChatList; String? get firstLaunchAt; bool get askedReview; String? get dashSearchEngine; String? get defaultScreen;
|
||||||
/// Create a copy of AppSettings
|
/// Create a copy of AppSettings
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -301,16 +301,16 @@ $AppSettingsCopyWith<AppSettings> get copyWith => _$AppSettingsCopyWithImpl<AppS
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is AppSettings&&(identical(other.autoTranslate, autoTranslate) || other.autoTranslate == autoTranslate)&&(identical(other.dataSavingMode, dataSavingMode) || other.dataSavingMode == dataSavingMode)&&(identical(other.soundEffects, soundEffects) || other.soundEffects == soundEffects)&&(identical(other.aprilFoolFeatures, aprilFoolFeatures) || other.aprilFoolFeatures == aprilFoolFeatures)&&(identical(other.enterToSend, enterToSend) || other.enterToSend == enterToSend)&&(identical(other.appBarTransparent, appBarTransparent) || other.appBarTransparent == appBarTransparent)&&(identical(other.showBackgroundImage, showBackgroundImage) || other.showBackgroundImage == showBackgroundImage)&&(identical(other.customFonts, customFonts) || other.customFonts == customFonts)&&(identical(other.appColorScheme, appColorScheme) || other.appColorScheme == appColorScheme)&&(identical(other.customColors, customColors) || other.customColors == customColors)&&(identical(other.windowSize, windowSize) || other.windowSize == windowSize)&&(identical(other.windowOpacity, windowOpacity) || other.windowOpacity == windowOpacity)&&(identical(other.cardTransparency, cardTransparency) || other.cardTransparency == cardTransparency)&&(identical(other.defaultPoolId, defaultPoolId) || other.defaultPoolId == defaultPoolId)&&(identical(other.messageDisplayStyle, messageDisplayStyle) || other.messageDisplayStyle == messageDisplayStyle)&&(identical(other.themeMode, themeMode) || other.themeMode == themeMode)&&(identical(other.useMaterial3, useMaterial3) || other.useMaterial3 == useMaterial3)&&(identical(other.disableAnimation, disableAnimation) || other.disableAnimation == disableAnimation)&&(identical(other.fabPosition, fabPosition) || other.fabPosition == fabPosition));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is AppSettings&&(identical(other.dataSavingMode, dataSavingMode) || other.dataSavingMode == dataSavingMode)&&(identical(other.soundEffects, soundEffects) || other.soundEffects == soundEffects)&&(identical(other.festivalFeatures, festivalFeatures) || other.festivalFeatures == festivalFeatures)&&(identical(other.enterToSend, enterToSend) || other.enterToSend == enterToSend)&&(identical(other.appBarTransparent, appBarTransparent) || other.appBarTransparent == appBarTransparent)&&(identical(other.showBackgroundImage, showBackgroundImage) || other.showBackgroundImage == showBackgroundImage)&&(identical(other.notifyWithHaptic, notifyWithHaptic) || other.notifyWithHaptic == notifyWithHaptic)&&(identical(other.customFonts, customFonts) || other.customFonts == customFonts)&&(identical(other.appColorScheme, appColorScheme) || other.appColorScheme == appColorScheme)&&(identical(other.customColors, customColors) || other.customColors == customColors)&&(identical(other.windowSize, windowSize) || other.windowSize == windowSize)&&(identical(other.windowOpacity, windowOpacity) || other.windowOpacity == windowOpacity)&&(identical(other.cardTransparency, cardTransparency) || other.cardTransparency == cardTransparency)&&(identical(other.defaultPoolId, defaultPoolId) || other.defaultPoolId == defaultPoolId)&&(identical(other.messageDisplayStyle, messageDisplayStyle) || other.messageDisplayStyle == messageDisplayStyle)&&(identical(other.themeMode, themeMode) || other.themeMode == themeMode)&&(identical(other.disableAnimation, disableAnimation) || other.disableAnimation == disableAnimation)&&(identical(other.fabPosition, fabPosition) || other.fabPosition == fabPosition)&&(identical(other.groupedChatList, groupedChatList) || other.groupedChatList == groupedChatList)&&(identical(other.firstLaunchAt, firstLaunchAt) || other.firstLaunchAt == firstLaunchAt)&&(identical(other.askedReview, askedReview) || other.askedReview == askedReview)&&(identical(other.dashSearchEngine, dashSearchEngine) || other.dashSearchEngine == dashSearchEngine)&&(identical(other.defaultScreen, defaultScreen) || other.defaultScreen == defaultScreen));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hashAll([runtimeType,autoTranslate,dataSavingMode,soundEffects,aprilFoolFeatures,enterToSend,appBarTransparent,showBackgroundImage,customFonts,appColorScheme,customColors,windowSize,windowOpacity,cardTransparency,defaultPoolId,messageDisplayStyle,themeMode,useMaterial3,disableAnimation,fabPosition]);
|
int get hashCode => Object.hashAll([runtimeType,dataSavingMode,soundEffects,festivalFeatures,enterToSend,appBarTransparent,showBackgroundImage,notifyWithHaptic,customFonts,appColorScheme,customColors,windowSize,windowOpacity,cardTransparency,defaultPoolId,messageDisplayStyle,themeMode,disableAnimation,fabPosition,groupedChatList,firstLaunchAt,askedReview,dashSearchEngine,defaultScreen]);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'AppSettings(autoTranslate: $autoTranslate, dataSavingMode: $dataSavingMode, soundEffects: $soundEffects, aprilFoolFeatures: $aprilFoolFeatures, enterToSend: $enterToSend, appBarTransparent: $appBarTransparent, showBackgroundImage: $showBackgroundImage, customFonts: $customFonts, appColorScheme: $appColorScheme, customColors: $customColors, windowSize: $windowSize, windowOpacity: $windowOpacity, cardTransparency: $cardTransparency, defaultPoolId: $defaultPoolId, messageDisplayStyle: $messageDisplayStyle, themeMode: $themeMode, useMaterial3: $useMaterial3, disableAnimation: $disableAnimation, fabPosition: $fabPosition)';
|
return 'AppSettings(dataSavingMode: $dataSavingMode, soundEffects: $soundEffects, festivalFeatures: $festivalFeatures, enterToSend: $enterToSend, appBarTransparent: $appBarTransparent, showBackgroundImage: $showBackgroundImage, notifyWithHaptic: $notifyWithHaptic, customFonts: $customFonts, appColorScheme: $appColorScheme, customColors: $customColors, windowSize: $windowSize, windowOpacity: $windowOpacity, cardTransparency: $cardTransparency, defaultPoolId: $defaultPoolId, messageDisplayStyle: $messageDisplayStyle, themeMode: $themeMode, disableAnimation: $disableAnimation, fabPosition: $fabPosition, groupedChatList: $groupedChatList, firstLaunchAt: $firstLaunchAt, askedReview: $askedReview, dashSearchEngine: $dashSearchEngine, defaultScreen: $defaultScreen)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -321,7 +321,7 @@ abstract mixin class $AppSettingsCopyWith<$Res> {
|
|||||||
factory $AppSettingsCopyWith(AppSettings value, $Res Function(AppSettings) _then) = _$AppSettingsCopyWithImpl;
|
factory $AppSettingsCopyWith(AppSettings value, $Res Function(AppSettings) _then) = _$AppSettingsCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
bool autoTranslate, bool dataSavingMode, bool soundEffects, bool aprilFoolFeatures, bool enterToSend, bool appBarTransparent, bool showBackgroundImage, String? customFonts, int? appColorScheme, ThemeColors? customColors, Size? windowSize, double windowOpacity, double cardTransparency, String? defaultPoolId, String messageDisplayStyle, String? themeMode, bool useMaterial3, bool disableAnimation, String fabPosition
|
bool dataSavingMode, bool soundEffects, bool festivalFeatures, bool enterToSend, bool appBarTransparent, bool showBackgroundImage, bool notifyWithHaptic, String? customFonts, int? appColorScheme, ThemeColors? customColors, Size? windowSize, double windowOpacity, double cardTransparency, String? defaultPoolId, String messageDisplayStyle, String? themeMode, bool disableAnimation, String fabPosition, bool groupedChatList, String? firstLaunchAt, bool askedReview, String? dashSearchEngine, String? defaultScreen
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -338,15 +338,15 @@ class _$AppSettingsCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of AppSettings
|
/// Create a copy of AppSettings
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? autoTranslate = null,Object? dataSavingMode = null,Object? soundEffects = null,Object? aprilFoolFeatures = null,Object? enterToSend = null,Object? appBarTransparent = null,Object? showBackgroundImage = null,Object? customFonts = freezed,Object? appColorScheme = freezed,Object? customColors = freezed,Object? windowSize = freezed,Object? windowOpacity = null,Object? cardTransparency = null,Object? defaultPoolId = freezed,Object? messageDisplayStyle = null,Object? themeMode = freezed,Object? useMaterial3 = null,Object? disableAnimation = null,Object? fabPosition = null,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? dataSavingMode = null,Object? soundEffects = null,Object? festivalFeatures = null,Object? enterToSend = null,Object? appBarTransparent = null,Object? showBackgroundImage = null,Object? notifyWithHaptic = null,Object? customFonts = freezed,Object? appColorScheme = freezed,Object? customColors = freezed,Object? windowSize = freezed,Object? windowOpacity = null,Object? cardTransparency = null,Object? defaultPoolId = freezed,Object? messageDisplayStyle = null,Object? themeMode = freezed,Object? disableAnimation = null,Object? fabPosition = null,Object? groupedChatList = null,Object? firstLaunchAt = freezed,Object? askedReview = null,Object? dashSearchEngine = freezed,Object? defaultScreen = freezed,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
autoTranslate: null == autoTranslate ? _self.autoTranslate : autoTranslate // ignore: cast_nullable_to_non_nullable
|
dataSavingMode: null == dataSavingMode ? _self.dataSavingMode : dataSavingMode // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,dataSavingMode: null == dataSavingMode ? _self.dataSavingMode : dataSavingMode // ignore: cast_nullable_to_non_nullable
|
|
||||||
as bool,soundEffects: null == soundEffects ? _self.soundEffects : soundEffects // ignore: cast_nullable_to_non_nullable
|
as bool,soundEffects: null == soundEffects ? _self.soundEffects : soundEffects // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,aprilFoolFeatures: null == aprilFoolFeatures ? _self.aprilFoolFeatures : aprilFoolFeatures // ignore: cast_nullable_to_non_nullable
|
as bool,festivalFeatures: null == festivalFeatures ? _self.festivalFeatures : festivalFeatures // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,enterToSend: null == enterToSend ? _self.enterToSend : enterToSend // ignore: cast_nullable_to_non_nullable
|
as bool,enterToSend: null == enterToSend ? _self.enterToSend : enterToSend // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,appBarTransparent: null == appBarTransparent ? _self.appBarTransparent : appBarTransparent // ignore: cast_nullable_to_non_nullable
|
as bool,appBarTransparent: null == appBarTransparent ? _self.appBarTransparent : appBarTransparent // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,showBackgroundImage: null == showBackgroundImage ? _self.showBackgroundImage : showBackgroundImage // ignore: cast_nullable_to_non_nullable
|
as bool,showBackgroundImage: null == showBackgroundImage ? _self.showBackgroundImage : showBackgroundImage // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,notifyWithHaptic: null == notifyWithHaptic ? _self.notifyWithHaptic : notifyWithHaptic // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,customFonts: freezed == customFonts ? _self.customFonts : customFonts // ignore: cast_nullable_to_non_nullable
|
as bool,customFonts: freezed == customFonts ? _self.customFonts : customFonts // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,appColorScheme: freezed == appColorScheme ? _self.appColorScheme : appColorScheme // ignore: cast_nullable_to_non_nullable
|
as String?,appColorScheme: freezed == appColorScheme ? _self.appColorScheme : appColorScheme // ignore: cast_nullable_to_non_nullable
|
||||||
as int?,customColors: freezed == customColors ? _self.customColors : customColors // ignore: cast_nullable_to_non_nullable
|
as int?,customColors: freezed == customColors ? _self.customColors : customColors // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -356,10 +356,14 @@ as double,cardTransparency: null == cardTransparency ? _self.cardTransparency :
|
|||||||
as double,defaultPoolId: freezed == defaultPoolId ? _self.defaultPoolId : defaultPoolId // ignore: cast_nullable_to_non_nullable
|
as double,defaultPoolId: freezed == defaultPoolId ? _self.defaultPoolId : defaultPoolId // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,messageDisplayStyle: null == messageDisplayStyle ? _self.messageDisplayStyle : messageDisplayStyle // ignore: cast_nullable_to_non_nullable
|
as String?,messageDisplayStyle: null == messageDisplayStyle ? _self.messageDisplayStyle : messageDisplayStyle // ignore: cast_nullable_to_non_nullable
|
||||||
as String,themeMode: freezed == themeMode ? _self.themeMode : themeMode // ignore: cast_nullable_to_non_nullable
|
as String,themeMode: freezed == themeMode ? _self.themeMode : themeMode // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,useMaterial3: null == useMaterial3 ? _self.useMaterial3 : useMaterial3 // ignore: cast_nullable_to_non_nullable
|
as String?,disableAnimation: null == disableAnimation ? _self.disableAnimation : disableAnimation // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,disableAnimation: null == disableAnimation ? _self.disableAnimation : disableAnimation // ignore: cast_nullable_to_non_nullable
|
|
||||||
as bool,fabPosition: null == fabPosition ? _self.fabPosition : fabPosition // ignore: cast_nullable_to_non_nullable
|
as bool,fabPosition: null == fabPosition ? _self.fabPosition : fabPosition // ignore: cast_nullable_to_non_nullable
|
||||||
as String,
|
as String,groupedChatList: null == groupedChatList ? _self.groupedChatList : groupedChatList // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,firstLaunchAt: freezed == firstLaunchAt ? _self.firstLaunchAt : firstLaunchAt // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,askedReview: null == askedReview ? _self.askedReview : askedReview // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,dashSearchEngine: freezed == dashSearchEngine ? _self.dashSearchEngine : dashSearchEngine // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,defaultScreen: freezed == defaultScreen ? _self.defaultScreen : defaultScreen // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
/// Create a copy of AppSettings
|
/// Create a copy of AppSettings
|
||||||
@@ -453,10 +457,10 @@ return $default(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool autoTranslate, bool dataSavingMode, bool soundEffects, bool aprilFoolFeatures, bool enterToSend, bool appBarTransparent, bool showBackgroundImage, String? customFonts, int? appColorScheme, ThemeColors? customColors, Size? windowSize, double windowOpacity, double cardTransparency, String? defaultPoolId, String messageDisplayStyle, String? themeMode, bool useMaterial3, bool disableAnimation, String fabPosition)? $default,{required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool dataSavingMode, bool soundEffects, bool festivalFeatures, bool enterToSend, bool appBarTransparent, bool showBackgroundImage, bool notifyWithHaptic, String? customFonts, int? appColorScheme, ThemeColors? customColors, Size? windowSize, double windowOpacity, double cardTransparency, String? defaultPoolId, String messageDisplayStyle, String? themeMode, bool disableAnimation, String fabPosition, bool groupedChatList, String? firstLaunchAt, bool askedReview, String? dashSearchEngine, String? defaultScreen)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _AppSettings() when $default != null:
|
case _AppSettings() when $default != null:
|
||||||
return $default(_that.autoTranslate,_that.dataSavingMode,_that.soundEffects,_that.aprilFoolFeatures,_that.enterToSend,_that.appBarTransparent,_that.showBackgroundImage,_that.customFonts,_that.appColorScheme,_that.customColors,_that.windowSize,_that.windowOpacity,_that.cardTransparency,_that.defaultPoolId,_that.messageDisplayStyle,_that.themeMode,_that.useMaterial3,_that.disableAnimation,_that.fabPosition);case _:
|
return $default(_that.dataSavingMode,_that.soundEffects,_that.festivalFeatures,_that.enterToSend,_that.appBarTransparent,_that.showBackgroundImage,_that.notifyWithHaptic,_that.customFonts,_that.appColorScheme,_that.customColors,_that.windowSize,_that.windowOpacity,_that.cardTransparency,_that.defaultPoolId,_that.messageDisplayStyle,_that.themeMode,_that.disableAnimation,_that.fabPosition,_that.groupedChatList,_that.firstLaunchAt,_that.askedReview,_that.dashSearchEngine,_that.defaultScreen);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -474,10 +478,10 @@ return $default(_that.autoTranslate,_that.dataSavingMode,_that.soundEffects,_tha
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool autoTranslate, bool dataSavingMode, bool soundEffects, bool aprilFoolFeatures, bool enterToSend, bool appBarTransparent, bool showBackgroundImage, String? customFonts, int? appColorScheme, ThemeColors? customColors, Size? windowSize, double windowOpacity, double cardTransparency, String? defaultPoolId, String messageDisplayStyle, String? themeMode, bool useMaterial3, bool disableAnimation, String fabPosition) $default,) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool dataSavingMode, bool soundEffects, bool festivalFeatures, bool enterToSend, bool appBarTransparent, bool showBackgroundImage, bool notifyWithHaptic, String? customFonts, int? appColorScheme, ThemeColors? customColors, Size? windowSize, double windowOpacity, double cardTransparency, String? defaultPoolId, String messageDisplayStyle, String? themeMode, bool disableAnimation, String fabPosition, bool groupedChatList, String? firstLaunchAt, bool askedReview, String? dashSearchEngine, String? defaultScreen) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _AppSettings():
|
case _AppSettings():
|
||||||
return $default(_that.autoTranslate,_that.dataSavingMode,_that.soundEffects,_that.aprilFoolFeatures,_that.enterToSend,_that.appBarTransparent,_that.showBackgroundImage,_that.customFonts,_that.appColorScheme,_that.customColors,_that.windowSize,_that.windowOpacity,_that.cardTransparency,_that.defaultPoolId,_that.messageDisplayStyle,_that.themeMode,_that.useMaterial3,_that.disableAnimation,_that.fabPosition);}
|
return $default(_that.dataSavingMode,_that.soundEffects,_that.festivalFeatures,_that.enterToSend,_that.appBarTransparent,_that.showBackgroundImage,_that.notifyWithHaptic,_that.customFonts,_that.appColorScheme,_that.customColors,_that.windowSize,_that.windowOpacity,_that.cardTransparency,_that.defaultPoolId,_that.messageDisplayStyle,_that.themeMode,_that.disableAnimation,_that.fabPosition,_that.groupedChatList,_that.firstLaunchAt,_that.askedReview,_that.dashSearchEngine,_that.defaultScreen);}
|
||||||
}
|
}
|
||||||
/// A variant of `when` that fallback to returning `null`
|
/// A variant of `when` that fallback to returning `null`
|
||||||
///
|
///
|
||||||
@@ -491,10 +495,10 @@ return $default(_that.autoTranslate,_that.dataSavingMode,_that.soundEffects,_tha
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool autoTranslate, bool dataSavingMode, bool soundEffects, bool aprilFoolFeatures, bool enterToSend, bool appBarTransparent, bool showBackgroundImage, String? customFonts, int? appColorScheme, ThemeColors? customColors, Size? windowSize, double windowOpacity, double cardTransparency, String? defaultPoolId, String messageDisplayStyle, String? themeMode, bool useMaterial3, bool disableAnimation, String fabPosition)? $default,) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool dataSavingMode, bool soundEffects, bool festivalFeatures, bool enterToSend, bool appBarTransparent, bool showBackgroundImage, bool notifyWithHaptic, String? customFonts, int? appColorScheme, ThemeColors? customColors, Size? windowSize, double windowOpacity, double cardTransparency, String? defaultPoolId, String messageDisplayStyle, String? themeMode, bool disableAnimation, String fabPosition, bool groupedChatList, String? firstLaunchAt, bool askedReview, String? dashSearchEngine, String? defaultScreen)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _AppSettings() when $default != null:
|
case _AppSettings() when $default != null:
|
||||||
return $default(_that.autoTranslate,_that.dataSavingMode,_that.soundEffects,_that.aprilFoolFeatures,_that.enterToSend,_that.appBarTransparent,_that.showBackgroundImage,_that.customFonts,_that.appColorScheme,_that.customColors,_that.windowSize,_that.windowOpacity,_that.cardTransparency,_that.defaultPoolId,_that.messageDisplayStyle,_that.themeMode,_that.useMaterial3,_that.disableAnimation,_that.fabPosition);case _:
|
return $default(_that.dataSavingMode,_that.soundEffects,_that.festivalFeatures,_that.enterToSend,_that.appBarTransparent,_that.showBackgroundImage,_that.notifyWithHaptic,_that.customFonts,_that.appColorScheme,_that.customColors,_that.windowSize,_that.windowOpacity,_that.cardTransparency,_that.defaultPoolId,_that.messageDisplayStyle,_that.themeMode,_that.disableAnimation,_that.fabPosition,_that.groupedChatList,_that.firstLaunchAt,_that.askedReview,_that.dashSearchEngine,_that.defaultScreen);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -506,16 +510,16 @@ return $default(_that.autoTranslate,_that.dataSavingMode,_that.soundEffects,_tha
|
|||||||
|
|
||||||
|
|
||||||
class _AppSettings implements AppSettings {
|
class _AppSettings implements AppSettings {
|
||||||
const _AppSettings({required this.autoTranslate, required this.dataSavingMode, required this.soundEffects, required this.aprilFoolFeatures, required this.enterToSend, required this.appBarTransparent, required this.showBackgroundImage, required this.customFonts, required this.appColorScheme, required this.customColors, required this.windowSize, required this.windowOpacity, required this.cardTransparency, required this.defaultPoolId, required this.messageDisplayStyle, required this.themeMode, required this.useMaterial3, required this.disableAnimation, required this.fabPosition});
|
const _AppSettings({required this.dataSavingMode, required this.soundEffects, required this.festivalFeatures, required this.enterToSend, required this.appBarTransparent, required this.showBackgroundImage, required this.notifyWithHaptic, required this.customFonts, required this.appColorScheme, required this.customColors, required this.windowSize, required this.windowOpacity, required this.cardTransparency, required this.defaultPoolId, required this.messageDisplayStyle, required this.themeMode, required this.disableAnimation, required this.fabPosition, required this.groupedChatList, required this.firstLaunchAt, required this.askedReview, required this.dashSearchEngine, required this.defaultScreen});
|
||||||
|
|
||||||
|
|
||||||
@override final bool autoTranslate;
|
|
||||||
@override final bool dataSavingMode;
|
@override final bool dataSavingMode;
|
||||||
@override final bool soundEffects;
|
@override final bool soundEffects;
|
||||||
@override final bool aprilFoolFeatures;
|
@override final bool festivalFeatures;
|
||||||
@override final bool enterToSend;
|
@override final bool enterToSend;
|
||||||
@override final bool appBarTransparent;
|
@override final bool appBarTransparent;
|
||||||
@override final bool showBackgroundImage;
|
@override final bool showBackgroundImage;
|
||||||
|
@override final bool notifyWithHaptic;
|
||||||
@override final String? customFonts;
|
@override final String? customFonts;
|
||||||
@override final int? appColorScheme;
|
@override final int? appColorScheme;
|
||||||
// The color stored via the int type
|
// The color stored via the int type
|
||||||
@@ -529,9 +533,13 @@ class _AppSettings implements AppSettings {
|
|||||||
@override final String? defaultPoolId;
|
@override final String? defaultPoolId;
|
||||||
@override final String messageDisplayStyle;
|
@override final String messageDisplayStyle;
|
||||||
@override final String? themeMode;
|
@override final String? themeMode;
|
||||||
@override final bool useMaterial3;
|
|
||||||
@override final bool disableAnimation;
|
@override final bool disableAnimation;
|
||||||
@override final String fabPosition;
|
@override final String fabPosition;
|
||||||
|
@override final bool groupedChatList;
|
||||||
|
@override final String? firstLaunchAt;
|
||||||
|
@override final bool askedReview;
|
||||||
|
@override final String? dashSearchEngine;
|
||||||
|
@override final String? defaultScreen;
|
||||||
|
|
||||||
/// Create a copy of AppSettings
|
/// Create a copy of AppSettings
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@@ -543,16 +551,16 @@ _$AppSettingsCopyWith<_AppSettings> get copyWith => __$AppSettingsCopyWithImpl<_
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppSettings&&(identical(other.autoTranslate, autoTranslate) || other.autoTranslate == autoTranslate)&&(identical(other.dataSavingMode, dataSavingMode) || other.dataSavingMode == dataSavingMode)&&(identical(other.soundEffects, soundEffects) || other.soundEffects == soundEffects)&&(identical(other.aprilFoolFeatures, aprilFoolFeatures) || other.aprilFoolFeatures == aprilFoolFeatures)&&(identical(other.enterToSend, enterToSend) || other.enterToSend == enterToSend)&&(identical(other.appBarTransparent, appBarTransparent) || other.appBarTransparent == appBarTransparent)&&(identical(other.showBackgroundImage, showBackgroundImage) || other.showBackgroundImage == showBackgroundImage)&&(identical(other.customFonts, customFonts) || other.customFonts == customFonts)&&(identical(other.appColorScheme, appColorScheme) || other.appColorScheme == appColorScheme)&&(identical(other.customColors, customColors) || other.customColors == customColors)&&(identical(other.windowSize, windowSize) || other.windowSize == windowSize)&&(identical(other.windowOpacity, windowOpacity) || other.windowOpacity == windowOpacity)&&(identical(other.cardTransparency, cardTransparency) || other.cardTransparency == cardTransparency)&&(identical(other.defaultPoolId, defaultPoolId) || other.defaultPoolId == defaultPoolId)&&(identical(other.messageDisplayStyle, messageDisplayStyle) || other.messageDisplayStyle == messageDisplayStyle)&&(identical(other.themeMode, themeMode) || other.themeMode == themeMode)&&(identical(other.useMaterial3, useMaterial3) || other.useMaterial3 == useMaterial3)&&(identical(other.disableAnimation, disableAnimation) || other.disableAnimation == disableAnimation)&&(identical(other.fabPosition, fabPosition) || other.fabPosition == fabPosition));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppSettings&&(identical(other.dataSavingMode, dataSavingMode) || other.dataSavingMode == dataSavingMode)&&(identical(other.soundEffects, soundEffects) || other.soundEffects == soundEffects)&&(identical(other.festivalFeatures, festivalFeatures) || other.festivalFeatures == festivalFeatures)&&(identical(other.enterToSend, enterToSend) || other.enterToSend == enterToSend)&&(identical(other.appBarTransparent, appBarTransparent) || other.appBarTransparent == appBarTransparent)&&(identical(other.showBackgroundImage, showBackgroundImage) || other.showBackgroundImage == showBackgroundImage)&&(identical(other.notifyWithHaptic, notifyWithHaptic) || other.notifyWithHaptic == notifyWithHaptic)&&(identical(other.customFonts, customFonts) || other.customFonts == customFonts)&&(identical(other.appColorScheme, appColorScheme) || other.appColorScheme == appColorScheme)&&(identical(other.customColors, customColors) || other.customColors == customColors)&&(identical(other.windowSize, windowSize) || other.windowSize == windowSize)&&(identical(other.windowOpacity, windowOpacity) || other.windowOpacity == windowOpacity)&&(identical(other.cardTransparency, cardTransparency) || other.cardTransparency == cardTransparency)&&(identical(other.defaultPoolId, defaultPoolId) || other.defaultPoolId == defaultPoolId)&&(identical(other.messageDisplayStyle, messageDisplayStyle) || other.messageDisplayStyle == messageDisplayStyle)&&(identical(other.themeMode, themeMode) || other.themeMode == themeMode)&&(identical(other.disableAnimation, disableAnimation) || other.disableAnimation == disableAnimation)&&(identical(other.fabPosition, fabPosition) || other.fabPosition == fabPosition)&&(identical(other.groupedChatList, groupedChatList) || other.groupedChatList == groupedChatList)&&(identical(other.firstLaunchAt, firstLaunchAt) || other.firstLaunchAt == firstLaunchAt)&&(identical(other.askedReview, askedReview) || other.askedReview == askedReview)&&(identical(other.dashSearchEngine, dashSearchEngine) || other.dashSearchEngine == dashSearchEngine)&&(identical(other.defaultScreen, defaultScreen) || other.defaultScreen == defaultScreen));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hashAll([runtimeType,autoTranslate,dataSavingMode,soundEffects,aprilFoolFeatures,enterToSend,appBarTransparent,showBackgroundImage,customFonts,appColorScheme,customColors,windowSize,windowOpacity,cardTransparency,defaultPoolId,messageDisplayStyle,themeMode,useMaterial3,disableAnimation,fabPosition]);
|
int get hashCode => Object.hashAll([runtimeType,dataSavingMode,soundEffects,festivalFeatures,enterToSend,appBarTransparent,showBackgroundImage,notifyWithHaptic,customFonts,appColorScheme,customColors,windowSize,windowOpacity,cardTransparency,defaultPoolId,messageDisplayStyle,themeMode,disableAnimation,fabPosition,groupedChatList,firstLaunchAt,askedReview,dashSearchEngine,defaultScreen]);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'AppSettings(autoTranslate: $autoTranslate, dataSavingMode: $dataSavingMode, soundEffects: $soundEffects, aprilFoolFeatures: $aprilFoolFeatures, enterToSend: $enterToSend, appBarTransparent: $appBarTransparent, showBackgroundImage: $showBackgroundImage, customFonts: $customFonts, appColorScheme: $appColorScheme, customColors: $customColors, windowSize: $windowSize, windowOpacity: $windowOpacity, cardTransparency: $cardTransparency, defaultPoolId: $defaultPoolId, messageDisplayStyle: $messageDisplayStyle, themeMode: $themeMode, useMaterial3: $useMaterial3, disableAnimation: $disableAnimation, fabPosition: $fabPosition)';
|
return 'AppSettings(dataSavingMode: $dataSavingMode, soundEffects: $soundEffects, festivalFeatures: $festivalFeatures, enterToSend: $enterToSend, appBarTransparent: $appBarTransparent, showBackgroundImage: $showBackgroundImage, notifyWithHaptic: $notifyWithHaptic, customFonts: $customFonts, appColorScheme: $appColorScheme, customColors: $customColors, windowSize: $windowSize, windowOpacity: $windowOpacity, cardTransparency: $cardTransparency, defaultPoolId: $defaultPoolId, messageDisplayStyle: $messageDisplayStyle, themeMode: $themeMode, disableAnimation: $disableAnimation, fabPosition: $fabPosition, groupedChatList: $groupedChatList, firstLaunchAt: $firstLaunchAt, askedReview: $askedReview, dashSearchEngine: $dashSearchEngine, defaultScreen: $defaultScreen)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -563,7 +571,7 @@ abstract mixin class _$AppSettingsCopyWith<$Res> implements $AppSettingsCopyWith
|
|||||||
factory _$AppSettingsCopyWith(_AppSettings value, $Res Function(_AppSettings) _then) = __$AppSettingsCopyWithImpl;
|
factory _$AppSettingsCopyWith(_AppSettings value, $Res Function(_AppSettings) _then) = __$AppSettingsCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
bool autoTranslate, bool dataSavingMode, bool soundEffects, bool aprilFoolFeatures, bool enterToSend, bool appBarTransparent, bool showBackgroundImage, String? customFonts, int? appColorScheme, ThemeColors? customColors, Size? windowSize, double windowOpacity, double cardTransparency, String? defaultPoolId, String messageDisplayStyle, String? themeMode, bool useMaterial3, bool disableAnimation, String fabPosition
|
bool dataSavingMode, bool soundEffects, bool festivalFeatures, bool enterToSend, bool appBarTransparent, bool showBackgroundImage, bool notifyWithHaptic, String? customFonts, int? appColorScheme, ThemeColors? customColors, Size? windowSize, double windowOpacity, double cardTransparency, String? defaultPoolId, String messageDisplayStyle, String? themeMode, bool disableAnimation, String fabPosition, bool groupedChatList, String? firstLaunchAt, bool askedReview, String? dashSearchEngine, String? defaultScreen
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -580,15 +588,15 @@ class __$AppSettingsCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of AppSettings
|
/// Create a copy of AppSettings
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? autoTranslate = null,Object? dataSavingMode = null,Object? soundEffects = null,Object? aprilFoolFeatures = null,Object? enterToSend = null,Object? appBarTransparent = null,Object? showBackgroundImage = null,Object? customFonts = freezed,Object? appColorScheme = freezed,Object? customColors = freezed,Object? windowSize = freezed,Object? windowOpacity = null,Object? cardTransparency = null,Object? defaultPoolId = freezed,Object? messageDisplayStyle = null,Object? themeMode = freezed,Object? useMaterial3 = null,Object? disableAnimation = null,Object? fabPosition = null,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? dataSavingMode = null,Object? soundEffects = null,Object? festivalFeatures = null,Object? enterToSend = null,Object? appBarTransparent = null,Object? showBackgroundImage = null,Object? notifyWithHaptic = null,Object? customFonts = freezed,Object? appColorScheme = freezed,Object? customColors = freezed,Object? windowSize = freezed,Object? windowOpacity = null,Object? cardTransparency = null,Object? defaultPoolId = freezed,Object? messageDisplayStyle = null,Object? themeMode = freezed,Object? disableAnimation = null,Object? fabPosition = null,Object? groupedChatList = null,Object? firstLaunchAt = freezed,Object? askedReview = null,Object? dashSearchEngine = freezed,Object? defaultScreen = freezed,}) {
|
||||||
return _then(_AppSettings(
|
return _then(_AppSettings(
|
||||||
autoTranslate: null == autoTranslate ? _self.autoTranslate : autoTranslate // ignore: cast_nullable_to_non_nullable
|
dataSavingMode: null == dataSavingMode ? _self.dataSavingMode : dataSavingMode // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,dataSavingMode: null == dataSavingMode ? _self.dataSavingMode : dataSavingMode // ignore: cast_nullable_to_non_nullable
|
|
||||||
as bool,soundEffects: null == soundEffects ? _self.soundEffects : soundEffects // ignore: cast_nullable_to_non_nullable
|
as bool,soundEffects: null == soundEffects ? _self.soundEffects : soundEffects // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,aprilFoolFeatures: null == aprilFoolFeatures ? _self.aprilFoolFeatures : aprilFoolFeatures // ignore: cast_nullable_to_non_nullable
|
as bool,festivalFeatures: null == festivalFeatures ? _self.festivalFeatures : festivalFeatures // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,enterToSend: null == enterToSend ? _self.enterToSend : enterToSend // ignore: cast_nullable_to_non_nullable
|
as bool,enterToSend: null == enterToSend ? _self.enterToSend : enterToSend // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,appBarTransparent: null == appBarTransparent ? _self.appBarTransparent : appBarTransparent // ignore: cast_nullable_to_non_nullable
|
as bool,appBarTransparent: null == appBarTransparent ? _self.appBarTransparent : appBarTransparent // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,showBackgroundImage: null == showBackgroundImage ? _self.showBackgroundImage : showBackgroundImage // ignore: cast_nullable_to_non_nullable
|
as bool,showBackgroundImage: null == showBackgroundImage ? _self.showBackgroundImage : showBackgroundImage // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,notifyWithHaptic: null == notifyWithHaptic ? _self.notifyWithHaptic : notifyWithHaptic // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,customFonts: freezed == customFonts ? _self.customFonts : customFonts // ignore: cast_nullable_to_non_nullable
|
as bool,customFonts: freezed == customFonts ? _self.customFonts : customFonts // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,appColorScheme: freezed == appColorScheme ? _self.appColorScheme : appColorScheme // ignore: cast_nullable_to_non_nullable
|
as String?,appColorScheme: freezed == appColorScheme ? _self.appColorScheme : appColorScheme // ignore: cast_nullable_to_non_nullable
|
||||||
as int?,customColors: freezed == customColors ? _self.customColors : customColors // ignore: cast_nullable_to_non_nullable
|
as int?,customColors: freezed == customColors ? _self.customColors : customColors // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -598,10 +606,14 @@ as double,cardTransparency: null == cardTransparency ? _self.cardTransparency :
|
|||||||
as double,defaultPoolId: freezed == defaultPoolId ? _self.defaultPoolId : defaultPoolId // ignore: cast_nullable_to_non_nullable
|
as double,defaultPoolId: freezed == defaultPoolId ? _self.defaultPoolId : defaultPoolId // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,messageDisplayStyle: null == messageDisplayStyle ? _self.messageDisplayStyle : messageDisplayStyle // ignore: cast_nullable_to_non_nullable
|
as String?,messageDisplayStyle: null == messageDisplayStyle ? _self.messageDisplayStyle : messageDisplayStyle // ignore: cast_nullable_to_non_nullable
|
||||||
as String,themeMode: freezed == themeMode ? _self.themeMode : themeMode // ignore: cast_nullable_to_non_nullable
|
as String,themeMode: freezed == themeMode ? _self.themeMode : themeMode // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,useMaterial3: null == useMaterial3 ? _self.useMaterial3 : useMaterial3 // ignore: cast_nullable_to_non_nullable
|
as String?,disableAnimation: null == disableAnimation ? _self.disableAnimation : disableAnimation // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,disableAnimation: null == disableAnimation ? _self.disableAnimation : disableAnimation // ignore: cast_nullable_to_non_nullable
|
|
||||||
as bool,fabPosition: null == fabPosition ? _self.fabPosition : fabPosition // ignore: cast_nullable_to_non_nullable
|
as bool,fabPosition: null == fabPosition ? _self.fabPosition : fabPosition // ignore: cast_nullable_to_non_nullable
|
||||||
as String,
|
as String,groupedChatList: null == groupedChatList ? _self.groupedChatList : groupedChatList // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,firstLaunchAt: freezed == firstLaunchAt ? _self.firstLaunchAt : firstLaunchAt // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,askedReview: null == askedReview ? _self.askedReview : askedReview // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,dashSearchEngine: freezed == dashSearchEngine ? _self.dashSearchEngine : dashSearchEngine // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,defaultScreen: freezed == defaultScreen ? _self.defaultScreen : defaultScreen // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,23 +29,59 @@ Map<String, dynamic> _$ThemeColorsToJson(_ThemeColors instance) =>
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$appSettingsNotifierHash() =>
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
r'22b695f2023e3251db3296858acd701f7211d757';
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// See also [AppSettingsNotifier].
|
|
||||||
@ProviderFor(AppSettingsNotifier)
|
@ProviderFor(AppSettingsNotifier)
|
||||||
final appSettingsNotifierProvider =
|
const appSettingsProvider = AppSettingsNotifierProvider._();
|
||||||
AutoDisposeNotifierProvider<AppSettingsNotifier, AppSettings>.internal(
|
|
||||||
AppSettingsNotifier.new,
|
|
||||||
name: r'appSettingsNotifierProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$appSettingsNotifierHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef _$AppSettingsNotifier = AutoDisposeNotifier<AppSettings>;
|
final class AppSettingsNotifierProvider
|
||||||
// ignore_for_file: type=lint
|
extends $NotifierProvider<AppSettingsNotifier, AppSettings> {
|
||||||
// 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
|
const AppSettingsNotifierProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'appSettingsProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$appSettingsNotifierHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
AppSettingsNotifier create() => AppSettingsNotifier();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(AppSettings value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<AppSettings>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$appSettingsNotifierHash() =>
|
||||||
|
r'ef10d95a9f22e891ad6f5e0225e31508b3eb038e';
|
||||||
|
|
||||||
|
abstract class _$AppSettingsNotifier extends $Notifier<AppSettings> {
|
||||||
|
AppSettings build();
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final created = build();
|
||||||
|
final ref = this.ref as $Ref<AppSettings, AppSettings>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<AppSettings, AppSettings>,
|
||||||
|
AppSettings,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleValue(ref, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
185
lib/pods/drive/file_list.dart
Normal file
185
lib/pods/drive/file_list.dart
Normal file
@@ -0,0 +1,185 @@
|
|||||||
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:island/models/file.dart';
|
||||||
|
import 'package:island/models/file_list_item.dart';
|
||||||
|
import 'package:island/pods/network.dart';
|
||||||
|
import 'package:island/pods/paging.dart';
|
||||||
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||||
|
|
||||||
|
part 'file_list.g.dart';
|
||||||
|
|
||||||
|
@riverpod
|
||||||
|
Future<Map<String, dynamic>?> billingUsage(Ref ref) async {
|
||||||
|
final client = ref.read(apiClientProvider);
|
||||||
|
final response = await client.get('/drive/billing/usage');
|
||||||
|
return response.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
final indexedCloudFileListProvider = AsyncNotifierProvider.autoDispose(
|
||||||
|
IndexedCloudFileListNotifier.new,
|
||||||
|
);
|
||||||
|
|
||||||
|
class IndexedCloudFileListNotifier extends AsyncNotifier<List<FileListItem>>
|
||||||
|
with AsyncPaginationController<FileListItem> {
|
||||||
|
String _currentPath = '/';
|
||||||
|
String? _poolId;
|
||||||
|
String? _query;
|
||||||
|
String? _order;
|
||||||
|
bool _orderDesc = false;
|
||||||
|
|
||||||
|
void setPath(String path) {
|
||||||
|
_currentPath = path;
|
||||||
|
ref.invalidateSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
void setPool(String? poolId) {
|
||||||
|
_poolId = poolId;
|
||||||
|
ref.invalidateSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
void setQuery(String? query) {
|
||||||
|
_query = query;
|
||||||
|
ref.invalidateSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
void setOrder(String? order) {
|
||||||
|
_order = order;
|
||||||
|
ref.invalidateSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
void setOrderDesc(bool orderDesc) {
|
||||||
|
_orderDesc = orderDesc;
|
||||||
|
ref.invalidateSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<List<FileListItem>> fetch() async {
|
||||||
|
final client = ref.read(apiClientProvider);
|
||||||
|
|
||||||
|
final queryParameters = <String, String>{'path': _currentPath};
|
||||||
|
|
||||||
|
if (_poolId != null) {
|
||||||
|
queryParameters['pool'] = _poolId!;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_query != null) {
|
||||||
|
queryParameters['query'] = _query!;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_order != null) {
|
||||||
|
queryParameters['order'] = _order!;
|
||||||
|
}
|
||||||
|
|
||||||
|
queryParameters['orderDesc'] = _orderDesc.toString();
|
||||||
|
|
||||||
|
final response = await client.get(
|
||||||
|
'/drive/index/browse',
|
||||||
|
queryParameters: queryParameters,
|
||||||
|
);
|
||||||
|
|
||||||
|
final List<String> folders = (response.data['folders'] as List)
|
||||||
|
.map((e) => e as String)
|
||||||
|
.toList();
|
||||||
|
final List<SnCloudFileIndex> files = (response.data['files'] as List)
|
||||||
|
.map((e) => SnCloudFileIndex.fromJson(e as Map<String, dynamic>))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
final List<FileListItem> items = [
|
||||||
|
...folders.map((folderName) => FileListItem.folder(folderName)),
|
||||||
|
...files.map((file) => FileListItem.file(file)),
|
||||||
|
];
|
||||||
|
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final unindexedFileListProvider = AsyncNotifierProvider.autoDispose(
|
||||||
|
UnindexedFileListNotifier.new,
|
||||||
|
);
|
||||||
|
|
||||||
|
class UnindexedFileListNotifier extends AsyncNotifier<List<FileListItem>>
|
||||||
|
with AsyncPaginationController<FileListItem> {
|
||||||
|
String? _poolId;
|
||||||
|
bool _recycled = false;
|
||||||
|
String? _query;
|
||||||
|
String? _order;
|
||||||
|
bool _orderDesc = false;
|
||||||
|
|
||||||
|
void setPool(String? poolId) {
|
||||||
|
_poolId = poolId;
|
||||||
|
ref.invalidateSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
void setRecycled(bool recycled) {
|
||||||
|
_recycled = recycled;
|
||||||
|
ref.invalidateSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
void setQuery(String? query) {
|
||||||
|
_query = query;
|
||||||
|
ref.invalidateSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
void setOrder(String? order) {
|
||||||
|
_order = order;
|
||||||
|
ref.invalidateSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
void setOrderDesc(bool orderDesc) {
|
||||||
|
_orderDesc = orderDesc;
|
||||||
|
ref.invalidateSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
static const int pageSize = 20;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<List<FileListItem>> fetch() async {
|
||||||
|
final client = ref.read(apiClientProvider);
|
||||||
|
|
||||||
|
final queryParameters = <String, String>{
|
||||||
|
'take': pageSize.toString(),
|
||||||
|
'offset': fetchedCount.toString(),
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_poolId != null) {
|
||||||
|
queryParameters['pool'] = _poolId!;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_recycled) {
|
||||||
|
queryParameters['recycled'] = _recycled.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_query != null) {
|
||||||
|
queryParameters['query'] = _query!;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_order != null) {
|
||||||
|
queryParameters['order'] = _order!;
|
||||||
|
}
|
||||||
|
|
||||||
|
queryParameters['orderDesc'] = _orderDesc.toString();
|
||||||
|
|
||||||
|
final response = await client.get(
|
||||||
|
'/drive/index/unindexed',
|
||||||
|
queryParameters: queryParameters,
|
||||||
|
);
|
||||||
|
|
||||||
|
totalCount = int.tryParse(response.headers.value('x-total') ?? '0') ?? 0;
|
||||||
|
|
||||||
|
final List<SnCloudFile> files = (response.data as List)
|
||||||
|
.map((e) => SnCloudFile.fromJson(e as Map<String, dynamic>))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
final List<FileListItem> items = files
|
||||||
|
.map((file) => FileListItem.unindexedFile(file))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@riverpod
|
||||||
|
Future<Map<String, dynamic>?> billingQuota(Ref ref) async {
|
||||||
|
final client = ref.read(apiClientProvider);
|
||||||
|
final response = await client.get('/drive/billing/quota');
|
||||||
|
return response.data;
|
||||||
|
}
|
||||||
92
lib/pods/drive/file_list.g.dart
Normal file
92
lib/pods/drive/file_list.g.dart
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'file_list.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// RiverpodGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(billingUsage)
|
||||||
|
const billingUsageProvider = BillingUsageProvider._();
|
||||||
|
|
||||||
|
final class BillingUsageProvider
|
||||||
|
extends
|
||||||
|
$FunctionalProvider<
|
||||||
|
AsyncValue<Map<String, dynamic>?>,
|
||||||
|
Map<String, dynamic>?,
|
||||||
|
FutureOr<Map<String, dynamic>?>
|
||||||
|
>
|
||||||
|
with
|
||||||
|
$FutureModifier<Map<String, dynamic>?>,
|
||||||
|
$FutureProvider<Map<String, dynamic>?> {
|
||||||
|
const BillingUsageProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'billingUsageProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$billingUsageHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$FutureProviderElement<Map<String, dynamic>?> $createElement(
|
||||||
|
$ProviderPointer pointer,
|
||||||
|
) => $FutureProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
FutureOr<Map<String, dynamic>?> create(Ref ref) {
|
||||||
|
return billingUsage(ref);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$billingUsageHash() => r'58d8bc774868d60781574c85d6b25869a79c57aa';
|
||||||
|
|
||||||
|
@ProviderFor(billingQuota)
|
||||||
|
const billingQuotaProvider = BillingQuotaProvider._();
|
||||||
|
|
||||||
|
final class BillingQuotaProvider
|
||||||
|
extends
|
||||||
|
$FunctionalProvider<
|
||||||
|
AsyncValue<Map<String, dynamic>?>,
|
||||||
|
Map<String, dynamic>?,
|
||||||
|
FutureOr<Map<String, dynamic>?>
|
||||||
|
>
|
||||||
|
with
|
||||||
|
$FutureModifier<Map<String, dynamic>?>,
|
||||||
|
$FutureProvider<Map<String, dynamic>?> {
|
||||||
|
const BillingQuotaProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'billingQuotaProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$billingQuotaHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$FutureProviderElement<Map<String, dynamic>?> $createElement(
|
||||||
|
$ProviderPointer pointer,
|
||||||
|
) => $FutureProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
FutureOr<Map<String, dynamic>?> create(Ref ref) {
|
||||||
|
return billingQuota(ref);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$billingQuotaHash() => r'4ec5d728e439015800abb2d0d673b5a7329cc654';
|
||||||
@@ -13,7 +13,7 @@ final poolsProvider = FutureProvider<List<SnFilePool>>((ref) async {
|
|||||||
});
|
});
|
||||||
|
|
||||||
String? resolveDefaultPoolId(WidgetRef ref, List<SnFilePool> pools) {
|
String? resolveDefaultPoolId(WidgetRef ref, List<SnFilePool> pools) {
|
||||||
final settings = ref.watch(appSettingsNotifierProvider);
|
final settings = ref.watch(appSettingsProvider);
|
||||||
|
|
||||||
final configuredId = settings.defaultPoolId;
|
final configuredId = settings.defaultPoolId;
|
||||||
if (configuredId != null && pools.any((p) => p.id == configuredId)) {
|
if (configuredId != null && pools.any((p) => p.id == configuredId)) {
|
||||||
15
lib/pods/drive/file_references.dart
Normal file
15
lib/pods/drive/file_references.dart
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||||
|
import 'package:island/models/reference.dart';
|
||||||
|
import 'package:island/pods/network.dart';
|
||||||
|
|
||||||
|
part 'file_references.g.dart';
|
||||||
|
|
||||||
|
@riverpod
|
||||||
|
Future<List<Reference>> fileReferences(Ref ref, String fileId) async {
|
||||||
|
final client = ref.read(apiClientProvider);
|
||||||
|
final response = await client.get('/drive/files/$fileId/references');
|
||||||
|
final list = response.data as List<dynamic>;
|
||||||
|
return list
|
||||||
|
.map((json) => Reference.fromJson(json as Map<String, dynamic>))
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
85
lib/pods/drive/file_references.g.dart
Normal file
85
lib/pods/drive/file_references.g.dart
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'file_references.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// RiverpodGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(fileReferences)
|
||||||
|
const fileReferencesProvider = FileReferencesFamily._();
|
||||||
|
|
||||||
|
final class FileReferencesProvider
|
||||||
|
extends
|
||||||
|
$FunctionalProvider<
|
||||||
|
AsyncValue<List<Reference>>,
|
||||||
|
List<Reference>,
|
||||||
|
FutureOr<List<Reference>>
|
||||||
|
>
|
||||||
|
with $FutureModifier<List<Reference>>, $FutureProvider<List<Reference>> {
|
||||||
|
const FileReferencesProvider._({
|
||||||
|
required FileReferencesFamily super.from,
|
||||||
|
required String super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'fileReferencesProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$fileReferencesHash();
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return r'fileReferencesProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$FutureProviderElement<List<Reference>> $createElement(
|
||||||
|
$ProviderPointer pointer,
|
||||||
|
) => $FutureProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
FutureOr<List<Reference>> create(Ref ref) {
|
||||||
|
final argument = this.argument as String;
|
||||||
|
return fileReferences(ref, argument);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return other is FileReferencesProvider && other.argument == argument;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return argument.hashCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$fileReferencesHash() => r'd66c678c221f61978bdb242b98e6dbe31d0c204b';
|
||||||
|
|
||||||
|
final class FileReferencesFamily extends $Family
|
||||||
|
with $FunctionalFamilyOverride<FutureOr<List<Reference>>, String> {
|
||||||
|
const FileReferencesFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'fileReferencesProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
FileReferencesProvider call(String fileId) =>
|
||||||
|
FileReferencesProvider._(argument: fileId, from: this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => r'fileReferencesProvider';
|
||||||
|
}
|
||||||
@@ -9,18 +9,16 @@ import 'package:island/pods/websocket.dart';
|
|||||||
import 'package:island/services/file_uploader.dart';
|
import 'package:island/services/file_uploader.dart';
|
||||||
import 'package:island/talker.dart';
|
import 'package:island/talker.dart';
|
||||||
|
|
||||||
final uploadTasksProvider =
|
final uploadTasksProvider = NotifierProvider(UploadTasksNotifier.new);
|
||||||
StateNotifierProvider<UploadTasksNotifier, List<DriveTask>>(
|
|
||||||
(ref) => UploadTasksNotifier(ref),
|
|
||||||
);
|
|
||||||
|
|
||||||
class UploadTasksNotifier extends StateNotifier<List<DriveTask>> {
|
class UploadTasksNotifier extends Notifier<List<DriveTask>> {
|
||||||
final Ref ref;
|
|
||||||
StreamSubscription? _websocketSubscription;
|
StreamSubscription? _websocketSubscription;
|
||||||
final Map<String, Map<String, dynamic>> _pendingUploads = {};
|
final Map<String, Map<String, dynamic>> _pendingUploads = {};
|
||||||
|
|
||||||
UploadTasksNotifier(this.ref) : super([]) {
|
@override
|
||||||
|
List<DriveTask> build() {
|
||||||
_listenToWebSocket();
|
_listenToWebSocket();
|
||||||
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
void _listenToWebSocket() {
|
void _listenToWebSocket() {
|
||||||
@@ -258,6 +256,24 @@ class UploadTasksNotifier extends StateNotifier<List<DriveTask>> {
|
|||||||
}).toList();
|
}).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void updateDownloadProgress(
|
||||||
|
String taskId,
|
||||||
|
int downloadedBytes,
|
||||||
|
int totalBytes,
|
||||||
|
) {
|
||||||
|
state =
|
||||||
|
state.map((task) {
|
||||||
|
if (task.taskId == taskId) {
|
||||||
|
return task.copyWith(
|
||||||
|
fileSize: totalBytes,
|
||||||
|
uploadedBytes: downloadedBytes,
|
||||||
|
updatedAt: DateTime.now(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return task;
|
||||||
|
}).toList();
|
||||||
|
}
|
||||||
|
|
||||||
void removeTask(String taskId) {
|
void removeTask(String taskId) {
|
||||||
state = state.where((task) => task.taskId != taskId).toList();
|
state = state.where((task) => task.taskId != taskId).toList();
|
||||||
}
|
}
|
||||||
@@ -275,6 +291,10 @@ class UploadTasksNotifier extends StateNotifier<List<DriveTask>> {
|
|||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clearAllTasks() {
|
||||||
|
state = [];
|
||||||
|
}
|
||||||
|
|
||||||
DriveTask? getTask(String taskId) {
|
DriveTask? getTask(String taskId) {
|
||||||
return state.where((task) => task.taskId == taskId).firstOrNull;
|
return state.where((task) => task.taskId == taskId).firstOrNull;
|
||||||
}
|
}
|
||||||
@@ -291,10 +311,29 @@ class UploadTasksNotifier extends StateNotifier<List<DriveTask>> {
|
|||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
String addLocalDownloadTask(SnCloudFile item) {
|
||||||
|
final taskId =
|
||||||
|
'download-${item.id}-${DateTime.now().millisecondsSinceEpoch}';
|
||||||
|
final task = DriveTask(
|
||||||
|
id: taskId,
|
||||||
|
taskId: taskId,
|
||||||
|
fileName: item.name,
|
||||||
|
contentType: item.mimeType ?? '',
|
||||||
|
fileSize: 0,
|
||||||
|
uploadedBytes: 0,
|
||||||
|
totalChunks: 1,
|
||||||
|
uploadedChunks: 0,
|
||||||
|
status: DriveTaskStatus.inProgress,
|
||||||
|
createdAt: DateTime.now(),
|
||||||
|
updatedAt: DateTime.now(),
|
||||||
|
type: 'FileDownload',
|
||||||
|
);
|
||||||
|
state = [...state, task];
|
||||||
|
return taskId;
|
||||||
|
}
|
||||||
|
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_websocketSubscription?.cancel();
|
_websocketSubscription?.cancel();
|
||||||
super.dispose();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
||||||
import 'package:island/models/activity.dart';
|
import 'package:island/models/activity.dart';
|
||||||
import 'package:island/pods/network.dart';
|
import 'package:island/pods/network.dart';
|
||||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||||
|
|||||||
@@ -6,169 +6,99 @@ part of 'event_calendar.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$eventCalendarHash() => r'3a33581c28bcd44bc5eb3abdb770171b4d275a5d';
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
/// Copied from Dart SDK
|
|
||||||
class _SystemHash {
|
|
||||||
_SystemHash._();
|
|
||||||
|
|
||||||
static int combine(int hash, int value) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + value);
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
|
||||||
return hash ^ (hash >> 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int finish(int hash) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = hash ^ (hash >> 11);
|
|
||||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Provider for fetching event calendar data
|
/// Provider for fetching event calendar data
|
||||||
/// This can be used anywhere in the app where calendar data is needed
|
/// This can be used anywhere in the app where calendar data is needed
|
||||||
///
|
|
||||||
/// Copied from [eventCalendar].
|
|
||||||
@ProviderFor(eventCalendar)
|
@ProviderFor(eventCalendar)
|
||||||
const eventCalendarProvider = EventCalendarFamily();
|
const eventCalendarProvider = EventCalendarFamily._();
|
||||||
|
|
||||||
/// Provider for fetching event calendar data
|
/// Provider for fetching event calendar data
|
||||||
/// This can be used anywhere in the app where calendar data is needed
|
/// This can be used anywhere in the app where calendar data is needed
|
||||||
///
|
|
||||||
/// Copied from [eventCalendar].
|
final class EventCalendarProvider
|
||||||
class EventCalendarFamily
|
extends
|
||||||
extends Family<AsyncValue<List<SnEventCalendarEntry>>> {
|
$FunctionalProvider<
|
||||||
|
AsyncValue<List<SnEventCalendarEntry>>,
|
||||||
|
List<SnEventCalendarEntry>,
|
||||||
|
FutureOr<List<SnEventCalendarEntry>>
|
||||||
|
>
|
||||||
|
with
|
||||||
|
$FutureModifier<List<SnEventCalendarEntry>>,
|
||||||
|
$FutureProvider<List<SnEventCalendarEntry>> {
|
||||||
/// Provider for fetching event calendar data
|
/// Provider for fetching event calendar data
|
||||||
/// This can be used anywhere in the app where calendar data is needed
|
/// This can be used anywhere in the app where calendar data is needed
|
||||||
///
|
const EventCalendarProvider._({
|
||||||
/// Copied from [eventCalendar].
|
required EventCalendarFamily super.from,
|
||||||
const EventCalendarFamily();
|
required EventCalendarQuery super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'eventCalendarProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
/// Provider for fetching event calendar data
|
@override
|
||||||
/// This can be used anywhere in the app where calendar data is needed
|
String debugGetCreateSourceHash() => _$eventCalendarHash();
|
||||||
///
|
|
||||||
/// Copied from [eventCalendar].
|
@override
|
||||||
EventCalendarProvider call(EventCalendarQuery query) {
|
String toString() {
|
||||||
return EventCalendarProvider(query);
|
return r'eventCalendarProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
@override
|
@override
|
||||||
EventCalendarProvider getProviderOverride(
|
$FutureProviderElement<List<SnEventCalendarEntry>> $createElement(
|
||||||
covariant EventCalendarProvider provider,
|
$ProviderPointer pointer,
|
||||||
) {
|
) => $FutureProviderElement(pointer);
|
||||||
return call(provider.query);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
FutureOr<List<SnEventCalendarEntry>> create(Ref ref) {
|
||||||
|
final argument = this.argument as EventCalendarQuery;
|
||||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
return eventCalendar(ref, argument);
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
|
||||||
_allTransitiveDependencies;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get name => r'eventCalendarProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 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>> {
|
|
||||||
/// 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) => eventCalendar(ref as EventCalendarRef, query),
|
|
||||||
from: eventCalendarProvider,
|
|
||||||
name: r'eventCalendarProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$eventCalendarHash,
|
|
||||||
dependencies: EventCalendarFamily._dependencies,
|
|
||||||
allTransitiveDependencies:
|
|
||||||
EventCalendarFamily._allTransitiveDependencies,
|
|
||||||
query: query,
|
|
||||||
);
|
|
||||||
|
|
||||||
EventCalendarProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.query,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final EventCalendarQuery query;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Override overrideWith(
|
|
||||||
FutureOr<List<SnEventCalendarEntry>> Function(EventCalendarRef provider)
|
|
||||||
create,
|
|
||||||
) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
|
||||||
override: EventCalendarProvider._internal(
|
|
||||||
(ref) => create(ref as EventCalendarRef),
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
query: query,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
AutoDisposeFutureProviderElement<List<SnEventCalendarEntry>> createElement() {
|
|
||||||
return _EventCalendarProviderElement(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is EventCalendarProvider && other.query == query;
|
return other is EventCalendarProvider && other.argument == argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
return argument.hashCode;
|
||||||
hash = _SystemHash.combine(hash, query.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
String _$eventCalendarHash() => r'3a33581c28bcd44bc5eb3abdb770171b4d275a5d';
|
||||||
// ignore: unused_element
|
|
||||||
mixin EventCalendarRef
|
|
||||||
on AutoDisposeFutureProviderRef<List<SnEventCalendarEntry>> {
|
|
||||||
/// The parameter `query` of this provider.
|
|
||||||
EventCalendarQuery get query;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _EventCalendarProviderElement
|
/// Provider for fetching event calendar data
|
||||||
extends AutoDisposeFutureProviderElement<List<SnEventCalendarEntry>>
|
/// This can be used anywhere in the app where calendar data is needed
|
||||||
with EventCalendarRef {
|
|
||||||
_EventCalendarProviderElement(super.provider);
|
final class EventCalendarFamily extends $Family
|
||||||
|
with
|
||||||
|
$FunctionalFamilyOverride<
|
||||||
|
FutureOr<List<SnEventCalendarEntry>>,
|
||||||
|
EventCalendarQuery
|
||||||
|
> {
|
||||||
|
const EventCalendarFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'eventCalendarProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
/// Provider for fetching event calendar data
|
||||||
|
/// This can be used anywhere in the app where calendar data is needed
|
||||||
|
|
||||||
|
EventCalendarProvider call(EventCalendarQuery query) =>
|
||||||
|
EventCalendarProvider._(argument: query, from: this);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
EventCalendarQuery get query => (origin as EventCalendarProvider).query;
|
String toString() => r'eventCalendarProvider';
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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
|
|
||||||
|
|||||||
@@ -1,104 +0,0 @@
|
|||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
||||||
import 'package:island/models/file.dart';
|
|
||||||
import 'package:island/models/file_list_item.dart';
|
|
||||||
import 'package:island/pods/network.dart';
|
|
||||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
|
||||||
import 'package:riverpod_paging_utils/riverpod_paging_utils.dart';
|
|
||||||
|
|
||||||
part 'file_list.g.dart';
|
|
||||||
|
|
||||||
@riverpod
|
|
||||||
class CloudFileListNotifier extends _$CloudFileListNotifier
|
|
||||||
with CursorPagingNotifierMixin<FileListItem> {
|
|
||||||
String _currentPath = '/';
|
|
||||||
|
|
||||||
void setPath(String path) {
|
|
||||||
_currentPath = path;
|
|
||||||
ref.invalidateSelf();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Future<CursorPagingData<FileListItem>> build() => fetch(cursor: null);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Future<CursorPagingData<FileListItem>> fetch({
|
|
||||||
required String? cursor,
|
|
||||||
}) async {
|
|
||||||
final client = ref.read(apiClientProvider);
|
|
||||||
|
|
||||||
final response = await client.get(
|
|
||||||
'/drive/index/browse',
|
|
||||||
queryParameters: {'path': _currentPath},
|
|
||||||
);
|
|
||||||
|
|
||||||
final List<String> folders =
|
|
||||||
(response.data['folders'] as List).map((e) => e as String).toList();
|
|
||||||
final List<SnCloudFileIndex> files =
|
|
||||||
(response.data['files'] as List)
|
|
||||||
.map((e) => SnCloudFileIndex.fromJson(e as Map<String, dynamic>))
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
final List<FileListItem> items = [
|
|
||||||
...folders.map((folderName) => FileListItem.folder(folderName)),
|
|
||||||
...files.map((file) => FileListItem.file(file)),
|
|
||||||
];
|
|
||||||
|
|
||||||
// The new API returns all files in the path, no pagination
|
|
||||||
return CursorPagingData(items: items, hasMore: false, nextCursor: null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@riverpod
|
|
||||||
Future<Map<String, dynamic>?> billingUsage(Ref ref) async {
|
|
||||||
final client = ref.read(apiClientProvider);
|
|
||||||
final response = await client.get('/drive/billing/usage');
|
|
||||||
return response.data;
|
|
||||||
}
|
|
||||||
|
|
||||||
@riverpod
|
|
||||||
class UnindexedFileListNotifier extends _$UnindexedFileListNotifier
|
|
||||||
with CursorPagingNotifierMixin<FileListItem> {
|
|
||||||
@override
|
|
||||||
Future<CursorPagingData<FileListItem>> build() => fetch(cursor: null);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Future<CursorPagingData<FileListItem>> fetch({
|
|
||||||
required String? cursor,
|
|
||||||
}) async {
|
|
||||||
final client = ref.read(apiClientProvider);
|
|
||||||
|
|
||||||
final offset = cursor != null ? int.tryParse(cursor) ?? 0 : 0;
|
|
||||||
const take = 50; // Default page size
|
|
||||||
|
|
||||||
final response = await client.get(
|
|
||||||
'/drive/index/unindexed',
|
|
||||||
queryParameters: {'take': take.toString(), 'offset': offset.toString()},
|
|
||||||
);
|
|
||||||
|
|
||||||
final total = int.tryParse(response.headers.value('x-total') ?? '0') ?? 0;
|
|
||||||
|
|
||||||
final List<SnCloudFile> files =
|
|
||||||
(response.data as List)
|
|
||||||
.map((e) => SnCloudFile.fromJson(e as Map<String, dynamic>))
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
final List<FileListItem> items =
|
|
||||||
files.map((file) => FileListItem.unindexedFile(file)).toList();
|
|
||||||
|
|
||||||
final hasMore = offset + take < total;
|
|
||||||
final nextCursor = hasMore ? (offset + take).toString() : null;
|
|
||||||
|
|
||||||
return CursorPagingData(
|
|
||||||
items: items,
|
|
||||||
hasMore: hasMore,
|
|
||||||
nextCursor: nextCursor,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@riverpod
|
|
||||||
Future<Map<String, dynamic>?> billingQuota(Ref ref) async {
|
|
||||||
final client = ref.read(apiClientProvider);
|
|
||||||
final response = await client.get('/drive/billing/quota');
|
|
||||||
return response.data;
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user