mobile bluesky app made with flutter lazurite.stormlightlabs.org/
mobile bluesky flutter
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: add post interaction saved posts screen

+2021 -1566
+4
docs/TODO.md
··· 14 14 - Instead of tabs, navigating to a record through dev tools should instead show 15 15 - A drawer on Tablet 16 16 - Cards (stacked) on Mobile, with swipe to go back 17 + - Post interactions are off -> selecting a quoted post opens that user's profile. 18 + - Tapping a post doesn't doesn't go to the post 19 + - Tapping a user's avatar in a post doesn't go to their profile 20 + - We need to add a post screen that renders a thread 17 21 18 22 ## Enhancements 19 23
+561 -1557
lib/core/database/app_database.g.dart
··· 26 26 type: DriftSqlType.string, 27 27 requiredDuringInsert: true, 28 28 ); 29 - static const VerificationMeta _displayNameMeta = const VerificationMeta( 30 - 'displayName', 31 - ); 29 + static const VerificationMeta _displayNameMeta = const VerificationMeta('displayName'); 32 30 @override 33 31 late final GeneratedColumn<String> displayName = GeneratedColumn<String>( 34 32 'display_name', ··· 37 35 type: DriftSqlType.string, 38 36 requiredDuringInsert: false, 39 37 ); 40 - static const VerificationMeta _serviceMeta = const VerificationMeta( 41 - 'service', 42 - ); 38 + static const VerificationMeta _serviceMeta = const VerificationMeta('service'); 43 39 @override 44 40 late final GeneratedColumn<String> service = GeneratedColumn<String>( 45 41 'service', ··· 48 44 type: DriftSqlType.string, 49 45 requiredDuringInsert: false, 50 46 ); 51 - static const VerificationMeta _accessTokenMeta = const VerificationMeta( 52 - 'accessToken', 53 - ); 47 + static const VerificationMeta _accessTokenMeta = const VerificationMeta('accessToken'); 54 48 @override 55 49 late final GeneratedColumn<String> accessToken = GeneratedColumn<String>( 56 50 'access_token', ··· 59 53 type: DriftSqlType.string, 60 54 requiredDuringInsert: true, 61 55 ); 62 - static const VerificationMeta _refreshTokenMeta = const VerificationMeta( 63 - 'refreshToken', 64 - ); 56 + static const VerificationMeta _refreshTokenMeta = const VerificationMeta('refreshToken'); 65 57 @override 66 58 late final GeneratedColumn<String> refreshToken = GeneratedColumn<String>( 67 59 'refresh_token', ··· 70 62 type: DriftSqlType.string, 71 63 requiredDuringInsert: false, 72 64 ); 73 - static const VerificationMeta _dpopPublicKeyMeta = const VerificationMeta( 74 - 'dpopPublicKey', 75 - ); 65 + static const VerificationMeta _dpopPublicKeyMeta = const VerificationMeta('dpopPublicKey'); 76 66 @override 77 67 late final GeneratedColumn<String> dpopPublicKey = GeneratedColumn<String>( 78 68 'dpop_public_key', ··· 81 71 type: DriftSqlType.string, 82 72 requiredDuringInsert: false, 83 73 ); 84 - static const VerificationMeta _dpopPrivateKeyMeta = const VerificationMeta( 85 - 'dpopPrivateKey', 86 - ); 74 + static const VerificationMeta _dpopPrivateKeyMeta = const VerificationMeta('dpopPrivateKey'); 87 75 @override 88 76 late final GeneratedColumn<String> dpopPrivateKey = GeneratedColumn<String>( 89 77 'dpop_private_key', ··· 92 80 type: DriftSqlType.string, 93 81 requiredDuringInsert: false, 94 82 ); 95 - static const VerificationMeta _dpopNonceMeta = const VerificationMeta( 96 - 'dpopNonce', 97 - ); 83 + static const VerificationMeta _dpopNonceMeta = const VerificationMeta('dpopNonce'); 98 84 @override 99 85 late final GeneratedColumn<String> dpopNonce = GeneratedColumn<String>( 100 86 'dpop_nonce', ··· 103 89 type: DriftSqlType.string, 104 90 requiredDuringInsert: false, 105 91 ); 106 - static const VerificationMeta _expiresAtMeta = const VerificationMeta( 107 - 'expiresAt', 108 - ); 92 + static const VerificationMeta _expiresAtMeta = const VerificationMeta('expiresAt'); 109 93 @override 110 94 late final GeneratedColumn<DateTime> expiresAt = GeneratedColumn<DateTime>( 111 95 'expires_at', ··· 114 98 type: DriftSqlType.dateTime, 115 99 requiredDuringInsert: false, 116 100 ); 117 - static const VerificationMeta _createdAtMeta = const VerificationMeta( 118 - 'createdAt', 119 - ); 101 + static const VerificationMeta _createdAtMeta = const VerificationMeta('createdAt'); 120 102 @override 121 103 late final GeneratedColumn<DateTime> createdAt = GeneratedColumn<DateTime>( 122 104 'created_at', ··· 126 108 requiredDuringInsert: false, 127 109 defaultValue: currentDateAndTime, 128 110 ); 129 - static const VerificationMeta _updatedAtMeta = const VerificationMeta( 130 - 'updatedAt', 131 - ); 111 + static const VerificationMeta _updatedAtMeta = const VerificationMeta('updatedAt'); 132 112 @override 133 113 late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>( 134 114 'updated_at', ··· 159 139 String get actualTableName => $name; 160 140 static const String $name = 'accounts'; 161 141 @override 162 - VerificationContext validateIntegrity( 163 - Insertable<Account> instance, { 164 - bool isInserting = false, 165 - }) { 142 + VerificationContext validateIntegrity(Insertable<Account> instance, {bool isInserting = false}) { 166 143 final context = VerificationContext(); 167 144 final data = instance.toColumns(true); 168 145 if (data.containsKey('did')) { 169 - context.handle( 170 - _didMeta, 171 - did.isAcceptableOrUnknown(data['did']!, _didMeta), 172 - ); 146 + context.handle(_didMeta, did.isAcceptableOrUnknown(data['did']!, _didMeta)); 173 147 } else if (isInserting) { 174 148 context.missing(_didMeta); 175 149 } 176 150 if (data.containsKey('handle')) { 177 - context.handle( 178 - _handleMeta, 179 - handle.isAcceptableOrUnknown(data['handle']!, _handleMeta), 180 - ); 151 + context.handle(_handleMeta, handle.isAcceptableOrUnknown(data['handle']!, _handleMeta)); 181 152 } else if (isInserting) { 182 153 context.missing(_handleMeta); 183 154 } 184 155 if (data.containsKey('display_name')) { 185 - context.handle( 186 - _displayNameMeta, 187 - displayName.isAcceptableOrUnknown( 188 - data['display_name']!, 189 - _displayNameMeta, 190 - ), 191 - ); 156 + context.handle(_displayNameMeta, displayName.isAcceptableOrUnknown(data['display_name']!, _displayNameMeta)); 192 157 } 193 158 if (data.containsKey('service')) { 194 - context.handle( 195 - _serviceMeta, 196 - service.isAcceptableOrUnknown(data['service']!, _serviceMeta), 197 - ); 159 + context.handle(_serviceMeta, service.isAcceptableOrUnknown(data['service']!, _serviceMeta)); 198 160 } 199 161 if (data.containsKey('access_token')) { 200 - context.handle( 201 - _accessTokenMeta, 202 - accessToken.isAcceptableOrUnknown( 203 - data['access_token']!, 204 - _accessTokenMeta, 205 - ), 206 - ); 162 + context.handle(_accessTokenMeta, accessToken.isAcceptableOrUnknown(data['access_token']!, _accessTokenMeta)); 207 163 } else if (isInserting) { 208 164 context.missing(_accessTokenMeta); 209 165 } 210 166 if (data.containsKey('refresh_token')) { 211 - context.handle( 212 - _refreshTokenMeta, 213 - refreshToken.isAcceptableOrUnknown( 214 - data['refresh_token']!, 215 - _refreshTokenMeta, 216 - ), 217 - ); 167 + context.handle(_refreshTokenMeta, refreshToken.isAcceptableOrUnknown(data['refresh_token']!, _refreshTokenMeta)); 218 168 } 219 169 if (data.containsKey('dpop_public_key')) { 220 170 context.handle( 221 171 _dpopPublicKeyMeta, 222 - dpopPublicKey.isAcceptableOrUnknown( 223 - data['dpop_public_key']!, 224 - _dpopPublicKeyMeta, 225 - ), 172 + dpopPublicKey.isAcceptableOrUnknown(data['dpop_public_key']!, _dpopPublicKeyMeta), 226 173 ); 227 174 } 228 175 if (data.containsKey('dpop_private_key')) { 229 176 context.handle( 230 177 _dpopPrivateKeyMeta, 231 - dpopPrivateKey.isAcceptableOrUnknown( 232 - data['dpop_private_key']!, 233 - _dpopPrivateKeyMeta, 234 - ), 178 + dpopPrivateKey.isAcceptableOrUnknown(data['dpop_private_key']!, _dpopPrivateKeyMeta), 235 179 ); 236 180 } 237 181 if (data.containsKey('dpop_nonce')) { 238 - context.handle( 239 - _dpopNonceMeta, 240 - dpopNonce.isAcceptableOrUnknown(data['dpop_nonce']!, _dpopNonceMeta), 241 - ); 182 + context.handle(_dpopNonceMeta, dpopNonce.isAcceptableOrUnknown(data['dpop_nonce']!, _dpopNonceMeta)); 242 183 } 243 184 if (data.containsKey('expires_at')) { 244 - context.handle( 245 - _expiresAtMeta, 246 - expiresAt.isAcceptableOrUnknown(data['expires_at']!, _expiresAtMeta), 247 - ); 185 + context.handle(_expiresAtMeta, expiresAt.isAcceptableOrUnknown(data['expires_at']!, _expiresAtMeta)); 248 186 } 249 187 if (data.containsKey('created_at')) { 250 - context.handle( 251 - _createdAtMeta, 252 - createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), 253 - ); 188 + context.handle(_createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta)); 254 189 } 255 190 if (data.containsKey('updated_at')) { 256 - context.handle( 257 - _updatedAtMeta, 258 - updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), 259 - ); 191 + context.handle(_updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta)); 260 192 } 261 193 return context; 262 194 } ··· 267 199 Account map(Map<String, dynamic> data, {String? tablePrefix}) { 268 200 final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; 269 201 return Account( 270 - did: attachedDatabase.typeMapping.read( 271 - DriftSqlType.string, 272 - data['${effectivePrefix}did'], 273 - )!, 274 - handle: attachedDatabase.typeMapping.read( 275 - DriftSqlType.string, 276 - data['${effectivePrefix}handle'], 277 - )!, 278 - displayName: attachedDatabase.typeMapping.read( 279 - DriftSqlType.string, 280 - data['${effectivePrefix}display_name'], 281 - ), 282 - service: attachedDatabase.typeMapping.read( 283 - DriftSqlType.string, 284 - data['${effectivePrefix}service'], 285 - ), 286 - accessToken: attachedDatabase.typeMapping.read( 287 - DriftSqlType.string, 288 - data['${effectivePrefix}access_token'], 289 - )!, 290 - refreshToken: attachedDatabase.typeMapping.read( 291 - DriftSqlType.string, 292 - data['${effectivePrefix}refresh_token'], 293 - ), 294 - dpopPublicKey: attachedDatabase.typeMapping.read( 295 - DriftSqlType.string, 296 - data['${effectivePrefix}dpop_public_key'], 297 - ), 202 + did: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}did'])!, 203 + handle: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}handle'])!, 204 + displayName: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}display_name']), 205 + service: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}service']), 206 + accessToken: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}access_token'])!, 207 + refreshToken: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}refresh_token']), 208 + dpopPublicKey: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}dpop_public_key']), 298 209 dpopPrivateKey: attachedDatabase.typeMapping.read( 299 210 DriftSqlType.string, 300 211 data['${effectivePrefix}dpop_private_key'], 301 212 ), 302 - dpopNonce: attachedDatabase.typeMapping.read( 303 - DriftSqlType.string, 304 - data['${effectivePrefix}dpop_nonce'], 305 - ), 306 - expiresAt: attachedDatabase.typeMapping.read( 307 - DriftSqlType.dateTime, 308 - data['${effectivePrefix}expires_at'], 309 - ), 310 - createdAt: attachedDatabase.typeMapping.read( 311 - DriftSqlType.dateTime, 312 - data['${effectivePrefix}created_at'], 313 - )!, 314 - updatedAt: attachedDatabase.typeMapping.read( 315 - DriftSqlType.dateTime, 316 - data['${effectivePrefix}updated_at'], 317 - )!, 213 + dpopNonce: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}dpop_nonce']), 214 + expiresAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}expires_at']), 215 + createdAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!, 216 + updatedAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!, 318 217 ); 319 218 } 320 219 ··· 387 286 return AccountsCompanion( 388 287 did: Value(did), 389 288 handle: Value(handle), 390 - displayName: displayName == null && nullToAbsent 391 - ? const Value.absent() 392 - : Value(displayName), 393 - service: service == null && nullToAbsent 394 - ? const Value.absent() 395 - : Value(service), 289 + displayName: displayName == null && nullToAbsent ? const Value.absent() : Value(displayName), 290 + service: service == null && nullToAbsent ? const Value.absent() : Value(service), 396 291 accessToken: Value(accessToken), 397 - refreshToken: refreshToken == null && nullToAbsent 398 - ? const Value.absent() 399 - : Value(refreshToken), 400 - dpopPublicKey: dpopPublicKey == null && nullToAbsent 401 - ? const Value.absent() 402 - : Value(dpopPublicKey), 403 - dpopPrivateKey: dpopPrivateKey == null && nullToAbsent 404 - ? const Value.absent() 405 - : Value(dpopPrivateKey), 406 - dpopNonce: dpopNonce == null && nullToAbsent 407 - ? const Value.absent() 408 - : Value(dpopNonce), 409 - expiresAt: expiresAt == null && nullToAbsent 410 - ? const Value.absent() 411 - : Value(expiresAt), 292 + refreshToken: refreshToken == null && nullToAbsent ? const Value.absent() : Value(refreshToken), 293 + dpopPublicKey: dpopPublicKey == null && nullToAbsent ? const Value.absent() : Value(dpopPublicKey), 294 + dpopPrivateKey: dpopPrivateKey == null && nullToAbsent ? const Value.absent() : Value(dpopPrivateKey), 295 + dpopNonce: dpopNonce == null && nullToAbsent ? const Value.absent() : Value(dpopNonce), 296 + expiresAt: expiresAt == null && nullToAbsent ? const Value.absent() : Value(expiresAt), 412 297 createdAt: Value(createdAt), 413 298 updatedAt: Value(updatedAt), 414 299 ); 415 300 } 416 301 417 - factory Account.fromJson( 418 - Map<String, dynamic> json, { 419 - ValueSerializer? serializer, 420 - }) { 302 + factory Account.fromJson(Map<String, dynamic> json, {ValueSerializer? serializer}) { 421 303 serializer ??= driftRuntimeOptions.defaultSerializer; 422 304 return Account( 423 305 did: serializer.fromJson<String>(json['did']), ··· 473 355 service: service.present ? service.value : this.service, 474 356 accessToken: accessToken ?? this.accessToken, 475 357 refreshToken: refreshToken.present ? refreshToken.value : this.refreshToken, 476 - dpopPublicKey: dpopPublicKey.present 477 - ? dpopPublicKey.value 478 - : this.dpopPublicKey, 479 - dpopPrivateKey: dpopPrivateKey.present 480 - ? dpopPrivateKey.value 481 - : this.dpopPrivateKey, 358 + dpopPublicKey: dpopPublicKey.present ? dpopPublicKey.value : this.dpopPublicKey, 359 + dpopPrivateKey: dpopPrivateKey.present ? dpopPrivateKey.value : this.dpopPrivateKey, 482 360 dpopNonce: dpopNonce.present ? dpopNonce.value : this.dpopNonce, 483 361 expiresAt: expiresAt.present ? expiresAt.value : this.expiresAt, 484 362 createdAt: createdAt ?? this.createdAt, ··· 488 366 return Account( 489 367 did: data.did.present ? data.did.value : this.did, 490 368 handle: data.handle.present ? data.handle.value : this.handle, 491 - displayName: data.displayName.present 492 - ? data.displayName.value 493 - : this.displayName, 369 + displayName: data.displayName.present ? data.displayName.value : this.displayName, 494 370 service: data.service.present ? data.service.value : this.service, 495 - accessToken: data.accessToken.present 496 - ? data.accessToken.value 497 - : this.accessToken, 498 - refreshToken: data.refreshToken.present 499 - ? data.refreshToken.value 500 - : this.refreshToken, 501 - dpopPublicKey: data.dpopPublicKey.present 502 - ? data.dpopPublicKey.value 503 - : this.dpopPublicKey, 504 - dpopPrivateKey: data.dpopPrivateKey.present 505 - ? data.dpopPrivateKey.value 506 - : this.dpopPrivateKey, 371 + accessToken: data.accessToken.present ? data.accessToken.value : this.accessToken, 372 + refreshToken: data.refreshToken.present ? data.refreshToken.value : this.refreshToken, 373 + dpopPublicKey: data.dpopPublicKey.present ? data.dpopPublicKey.value : this.dpopPublicKey, 374 + dpopPrivateKey: data.dpopPrivateKey.present ? data.dpopPrivateKey.value : this.dpopPrivateKey, 507 375 dpopNonce: data.dpopNonce.present ? data.dpopNonce.value : this.dpopNonce, 508 376 expiresAt: data.expiresAt.present ? data.expiresAt.value : this.expiresAt, 509 377 createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, ··· 739 607 } 740 608 } 741 609 742 - class $CachedProfilesTable extends CachedProfiles 743 - with TableInfo<$CachedProfilesTable, CachedProfile> { 610 + class $CachedProfilesTable extends CachedProfiles with TableInfo<$CachedProfilesTable, CachedProfile> { 744 611 @override 745 612 final GeneratedDatabase attachedDatabase; 746 613 final String? _alias; ··· 763 630 type: DriftSqlType.string, 764 631 requiredDuringInsert: true, 765 632 ); 766 - static const VerificationMeta _payloadMeta = const VerificationMeta( 767 - 'payload', 768 - ); 633 + static const VerificationMeta _payloadMeta = const VerificationMeta('payload'); 769 634 @override 770 635 late final GeneratedColumn<String> payload = GeneratedColumn<String>( 771 636 'payload', ··· 774 639 type: DriftSqlType.string, 775 640 requiredDuringInsert: true, 776 641 ); 777 - static const VerificationMeta _fetchedAtMeta = const VerificationMeta( 778 - 'fetchedAt', 779 - ); 642 + static const VerificationMeta _fetchedAtMeta = const VerificationMeta('fetchedAt'); 780 643 @override 781 644 late final GeneratedColumn<DateTime> fetchedAt = GeneratedColumn<DateTime>( 782 645 'fetched_at', ··· 794 657 String get actualTableName => $name; 795 658 static const String $name = 'cached_profiles'; 796 659 @override 797 - VerificationContext validateIntegrity( 798 - Insertable<CachedProfile> instance, { 799 - bool isInserting = false, 800 - }) { 660 + VerificationContext validateIntegrity(Insertable<CachedProfile> instance, {bool isInserting = false}) { 801 661 final context = VerificationContext(); 802 662 final data = instance.toColumns(true); 803 663 if (data.containsKey('did')) { 804 - context.handle( 805 - _didMeta, 806 - did.isAcceptableOrUnknown(data['did']!, _didMeta), 807 - ); 664 + context.handle(_didMeta, did.isAcceptableOrUnknown(data['did']!, _didMeta)); 808 665 } else if (isInserting) { 809 666 context.missing(_didMeta); 810 667 } 811 668 if (data.containsKey('handle')) { 812 - context.handle( 813 - _handleMeta, 814 - handle.isAcceptableOrUnknown(data['handle']!, _handleMeta), 815 - ); 669 + context.handle(_handleMeta, handle.isAcceptableOrUnknown(data['handle']!, _handleMeta)); 816 670 } else if (isInserting) { 817 671 context.missing(_handleMeta); 818 672 } 819 673 if (data.containsKey('payload')) { 820 - context.handle( 821 - _payloadMeta, 822 - payload.isAcceptableOrUnknown(data['payload']!, _payloadMeta), 823 - ); 674 + context.handle(_payloadMeta, payload.isAcceptableOrUnknown(data['payload']!, _payloadMeta)); 824 675 } else if (isInserting) { 825 676 context.missing(_payloadMeta); 826 677 } 827 678 if (data.containsKey('fetched_at')) { 828 - context.handle( 829 - _fetchedAtMeta, 830 - fetchedAt.isAcceptableOrUnknown(data['fetched_at']!, _fetchedAtMeta), 831 - ); 679 + context.handle(_fetchedAtMeta, fetchedAt.isAcceptableOrUnknown(data['fetched_at']!, _fetchedAtMeta)); 832 680 } 833 681 return context; 834 682 } ··· 839 687 CachedProfile map(Map<String, dynamic> data, {String? tablePrefix}) { 840 688 final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; 841 689 return CachedProfile( 842 - did: attachedDatabase.typeMapping.read( 843 - DriftSqlType.string, 844 - data['${effectivePrefix}did'], 845 - )!, 846 - handle: attachedDatabase.typeMapping.read( 847 - DriftSqlType.string, 848 - data['${effectivePrefix}handle'], 849 - )!, 850 - payload: attachedDatabase.typeMapping.read( 851 - DriftSqlType.string, 852 - data['${effectivePrefix}payload'], 853 - )!, 854 - fetchedAt: attachedDatabase.typeMapping.read( 855 - DriftSqlType.dateTime, 856 - data['${effectivePrefix}fetched_at'], 857 - )!, 690 + did: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}did'])!, 691 + handle: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}handle'])!, 692 + payload: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}payload'])!, 693 + fetchedAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}fetched_at'])!, 858 694 ); 859 695 } 860 696 ··· 869 705 final String handle; 870 706 final String payload; 871 707 final DateTime fetchedAt; 872 - const CachedProfile({ 873 - required this.did, 874 - required this.handle, 875 - required this.payload, 876 - required this.fetchedAt, 877 - }); 708 + const CachedProfile({required this.did, required this.handle, required this.payload, required this.fetchedAt}); 878 709 @override 879 710 Map<String, Expression> toColumns(bool nullToAbsent) { 880 711 final map = <String, Expression>{}; ··· 894 725 ); 895 726 } 896 727 897 - factory CachedProfile.fromJson( 898 - Map<String, dynamic> json, { 899 - ValueSerializer? serializer, 900 - }) { 728 + factory CachedProfile.fromJson(Map<String, dynamic> json, {ValueSerializer? serializer}) { 901 729 serializer ??= driftRuntimeOptions.defaultSerializer; 902 730 return CachedProfile( 903 731 did: serializer.fromJson<String>(json['did']), ··· 917 745 }; 918 746 } 919 747 920 - CachedProfile copyWith({ 921 - String? did, 922 - String? handle, 923 - String? payload, 924 - DateTime? fetchedAt, 925 - }) => CachedProfile( 748 + CachedProfile copyWith({String? did, String? handle, String? payload, DateTime? fetchedAt}) => CachedProfile( 926 749 did: did ?? this.did, 927 750 handle: handle ?? this.handle, 928 751 payload: payload ?? this.payload, ··· 1048 871 } 1049 872 } 1050 873 1051 - class $CachedPostsTable extends CachedPosts 1052 - with TableInfo<$CachedPostsTable, CachedPost> { 874 + class $CachedPostsTable extends CachedPosts with TableInfo<$CachedPostsTable, CachedPost> { 1053 875 @override 1054 876 final GeneratedDatabase attachedDatabase; 1055 877 final String? _alias; ··· 1063 885 type: DriftSqlType.string, 1064 886 requiredDuringInsert: true, 1065 887 ); 1066 - static const VerificationMeta _authorDidMeta = const VerificationMeta( 1067 - 'authorDid', 1068 - ); 888 + static const VerificationMeta _authorDidMeta = const VerificationMeta('authorDid'); 1069 889 @override 1070 890 late final GeneratedColumn<String> authorDid = GeneratedColumn<String>( 1071 891 'author_did', ··· 1074 894 type: DriftSqlType.string, 1075 895 requiredDuringInsert: true, 1076 896 ); 1077 - static const VerificationMeta _payloadMeta = const VerificationMeta( 1078 - 'payload', 1079 - ); 897 + static const VerificationMeta _payloadMeta = const VerificationMeta('payload'); 1080 898 @override 1081 899 late final GeneratedColumn<String> payload = GeneratedColumn<String>( 1082 900 'payload', ··· 1085 903 type: DriftSqlType.string, 1086 904 requiredDuringInsert: true, 1087 905 ); 1088 - static const VerificationMeta _createdAtMeta = const VerificationMeta( 1089 - 'createdAt', 1090 - ); 906 + static const VerificationMeta _createdAtMeta = const VerificationMeta('createdAt'); 1091 907 @override 1092 908 late final GeneratedColumn<DateTime> createdAt = GeneratedColumn<DateTime>( 1093 909 'created_at', ··· 1096 912 type: DriftSqlType.dateTime, 1097 913 requiredDuringInsert: false, 1098 914 ); 1099 - static const VerificationMeta _fetchedAtMeta = const VerificationMeta( 1100 - 'fetchedAt', 1101 - ); 915 + static const VerificationMeta _fetchedAtMeta = const VerificationMeta('fetchedAt'); 1102 916 @override 1103 917 late final GeneratedColumn<DateTime> fetchedAt = GeneratedColumn<DateTime>( 1104 918 'fetched_at', ··· 1109 923 defaultValue: currentDateAndTime, 1110 924 ); 1111 925 @override 1112 - List<GeneratedColumn> get $columns => [ 1113 - uri, 1114 - authorDid, 1115 - payload, 1116 - createdAt, 1117 - fetchedAt, 1118 - ]; 926 + List<GeneratedColumn> get $columns => [uri, authorDid, payload, createdAt, fetchedAt]; 1119 927 @override 1120 928 String get aliasedName => _alias ?? actualTableName; 1121 929 @override 1122 930 String get actualTableName => $name; 1123 931 static const String $name = 'cached_posts'; 1124 932 @override 1125 - VerificationContext validateIntegrity( 1126 - Insertable<CachedPost> instance, { 1127 - bool isInserting = false, 1128 - }) { 933 + VerificationContext validateIntegrity(Insertable<CachedPost> instance, {bool isInserting = false}) { 1129 934 final context = VerificationContext(); 1130 935 final data = instance.toColumns(true); 1131 936 if (data.containsKey('uri')) { 1132 - context.handle( 1133 - _uriMeta, 1134 - uri.isAcceptableOrUnknown(data['uri']!, _uriMeta), 1135 - ); 937 + context.handle(_uriMeta, uri.isAcceptableOrUnknown(data['uri']!, _uriMeta)); 1136 938 } else if (isInserting) { 1137 939 context.missing(_uriMeta); 1138 940 } 1139 941 if (data.containsKey('author_did')) { 1140 - context.handle( 1141 - _authorDidMeta, 1142 - authorDid.isAcceptableOrUnknown(data['author_did']!, _authorDidMeta), 1143 - ); 942 + context.handle(_authorDidMeta, authorDid.isAcceptableOrUnknown(data['author_did']!, _authorDidMeta)); 1144 943 } else if (isInserting) { 1145 944 context.missing(_authorDidMeta); 1146 945 } 1147 946 if (data.containsKey('payload')) { 1148 - context.handle( 1149 - _payloadMeta, 1150 - payload.isAcceptableOrUnknown(data['payload']!, _payloadMeta), 1151 - ); 947 + context.handle(_payloadMeta, payload.isAcceptableOrUnknown(data['payload']!, _payloadMeta)); 1152 948 } else if (isInserting) { 1153 949 context.missing(_payloadMeta); 1154 950 } 1155 951 if (data.containsKey('created_at')) { 1156 - context.handle( 1157 - _createdAtMeta, 1158 - createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), 1159 - ); 952 + context.handle(_createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta)); 1160 953 } 1161 954 if (data.containsKey('fetched_at')) { 1162 - context.handle( 1163 - _fetchedAtMeta, 1164 - fetchedAt.isAcceptableOrUnknown(data['fetched_at']!, _fetchedAtMeta), 1165 - ); 955 + context.handle(_fetchedAtMeta, fetchedAt.isAcceptableOrUnknown(data['fetched_at']!, _fetchedAtMeta)); 1166 956 } 1167 957 return context; 1168 958 } ··· 1173 963 CachedPost map(Map<String, dynamic> data, {String? tablePrefix}) { 1174 964 final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; 1175 965 return CachedPost( 1176 - uri: attachedDatabase.typeMapping.read( 1177 - DriftSqlType.string, 1178 - data['${effectivePrefix}uri'], 1179 - )!, 1180 - authorDid: attachedDatabase.typeMapping.read( 1181 - DriftSqlType.string, 1182 - data['${effectivePrefix}author_did'], 1183 - )!, 1184 - payload: attachedDatabase.typeMapping.read( 1185 - DriftSqlType.string, 1186 - data['${effectivePrefix}payload'], 1187 - )!, 1188 - createdAt: attachedDatabase.typeMapping.read( 1189 - DriftSqlType.dateTime, 1190 - data['${effectivePrefix}created_at'], 1191 - ), 1192 - fetchedAt: attachedDatabase.typeMapping.read( 1193 - DriftSqlType.dateTime, 1194 - data['${effectivePrefix}fetched_at'], 1195 - )!, 966 + uri: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}uri'])!, 967 + authorDid: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}author_did'])!, 968 + payload: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}payload'])!, 969 + createdAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}created_at']), 970 + fetchedAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}fetched_at'])!, 1196 971 ); 1197 972 } 1198 973 ··· 1233 1008 uri: Value(uri), 1234 1009 authorDid: Value(authorDid), 1235 1010 payload: Value(payload), 1236 - createdAt: createdAt == null && nullToAbsent 1237 - ? const Value.absent() 1238 - : Value(createdAt), 1011 + createdAt: createdAt == null && nullToAbsent ? const Value.absent() : Value(createdAt), 1239 1012 fetchedAt: Value(fetchedAt), 1240 1013 ); 1241 1014 } 1242 1015 1243 - factory CachedPost.fromJson( 1244 - Map<String, dynamic> json, { 1245 - ValueSerializer? serializer, 1246 - }) { 1016 + factory CachedPost.fromJson(Map<String, dynamic> json, {ValueSerializer? serializer}) { 1247 1017 serializer ??= driftRuntimeOptions.defaultSerializer; 1248 1018 return CachedPost( 1249 1019 uri: serializer.fromJson<String>(json['uri']), ··· 1301 1071 } 1302 1072 1303 1073 @override 1304 - int get hashCode => 1305 - Object.hash(uri, authorDid, payload, createdAt, fetchedAt); 1074 + int get hashCode => Object.hash(uri, authorDid, payload, createdAt, fetchedAt); 1306 1075 @override 1307 1076 bool operator ==(Object other) => 1308 1077 identical(this, other) || ··· 1413 1182 } 1414 1183 } 1415 1184 1416 - class $SettingsTable extends Settings 1417 - with TableInfo<$SettingsTable, SettingsEntry> { 1185 + class $SettingsTable extends Settings with TableInfo<$SettingsTable, SettingsEntry> { 1418 1186 @override 1419 1187 final GeneratedDatabase attachedDatabase; 1420 1188 final String? _alias; ··· 1437 1205 type: DriftSqlType.string, 1438 1206 requiredDuringInsert: true, 1439 1207 ); 1440 - static const VerificationMeta _updatedAtMeta = const VerificationMeta( 1441 - 'updatedAt', 1442 - ); 1208 + static const VerificationMeta _updatedAtMeta = const VerificationMeta('updatedAt'); 1443 1209 @override 1444 1210 late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>( 1445 1211 'updated_at', ··· 1457 1223 String get actualTableName => $name; 1458 1224 static const String $name = 'settings'; 1459 1225 @override 1460 - VerificationContext validateIntegrity( 1461 - Insertable<SettingsEntry> instance, { 1462 - bool isInserting = false, 1463 - }) { 1226 + VerificationContext validateIntegrity(Insertable<SettingsEntry> instance, {bool isInserting = false}) { 1464 1227 final context = VerificationContext(); 1465 1228 final data = instance.toColumns(true); 1466 1229 if (data.containsKey('key')) { 1467 - context.handle( 1468 - _keyMeta, 1469 - key.isAcceptableOrUnknown(data['key']!, _keyMeta), 1470 - ); 1230 + context.handle(_keyMeta, key.isAcceptableOrUnknown(data['key']!, _keyMeta)); 1471 1231 } else if (isInserting) { 1472 1232 context.missing(_keyMeta); 1473 1233 } 1474 1234 if (data.containsKey('value')) { 1475 - context.handle( 1476 - _valueMeta, 1477 - value.isAcceptableOrUnknown(data['value']!, _valueMeta), 1478 - ); 1235 + context.handle(_valueMeta, value.isAcceptableOrUnknown(data['value']!, _valueMeta)); 1479 1236 } else if (isInserting) { 1480 1237 context.missing(_valueMeta); 1481 1238 } 1482 1239 if (data.containsKey('updated_at')) { 1483 - context.handle( 1484 - _updatedAtMeta, 1485 - updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), 1486 - ); 1240 + context.handle(_updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta)); 1487 1241 } 1488 1242 return context; 1489 1243 } ··· 1494 1248 SettingsEntry map(Map<String, dynamic> data, {String? tablePrefix}) { 1495 1249 final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; 1496 1250 return SettingsEntry( 1497 - key: attachedDatabase.typeMapping.read( 1498 - DriftSqlType.string, 1499 - data['${effectivePrefix}key'], 1500 - )!, 1501 - value: attachedDatabase.typeMapping.read( 1502 - DriftSqlType.string, 1503 - data['${effectivePrefix}value'], 1504 - )!, 1505 - updatedAt: attachedDatabase.typeMapping.read( 1506 - DriftSqlType.dateTime, 1507 - data['${effectivePrefix}updated_at'], 1508 - )!, 1251 + key: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}key'])!, 1252 + value: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}value'])!, 1253 + updatedAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!, 1509 1254 ); 1510 1255 } 1511 1256 ··· 1519 1264 final String key; 1520 1265 final String value; 1521 1266 final DateTime updatedAt; 1522 - const SettingsEntry({ 1523 - required this.key, 1524 - required this.value, 1525 - required this.updatedAt, 1526 - }); 1267 + const SettingsEntry({required this.key, required this.value, required this.updatedAt}); 1527 1268 @override 1528 1269 Map<String, Expression> toColumns(bool nullToAbsent) { 1529 1270 final map = <String, Expression>{}; ··· 1534 1275 } 1535 1276 1536 1277 SettingsCompanion toCompanion(bool nullToAbsent) { 1537 - return SettingsCompanion( 1538 - key: Value(key), 1539 - value: Value(value), 1540 - updatedAt: Value(updatedAt), 1541 - ); 1278 + return SettingsCompanion(key: Value(key), value: Value(value), updatedAt: Value(updatedAt)); 1542 1279 } 1543 1280 1544 - factory SettingsEntry.fromJson( 1545 - Map<String, dynamic> json, { 1546 - ValueSerializer? serializer, 1547 - }) { 1281 + factory SettingsEntry.fromJson(Map<String, dynamic> json, {ValueSerializer? serializer}) { 1548 1282 serializer ??= driftRuntimeOptions.defaultSerializer; 1549 1283 return SettingsEntry( 1550 1284 key: serializer.fromJson<String>(json['key']), ··· 1563 1297 } 1564 1298 1565 1299 SettingsEntry copyWith({String? key, String? value, DateTime? updatedAt}) => 1566 - SettingsEntry( 1567 - key: key ?? this.key, 1568 - value: value ?? this.value, 1569 - updatedAt: updatedAt ?? this.updatedAt, 1570 - ); 1300 + SettingsEntry(key: key ?? this.key, value: value ?? this.value, updatedAt: updatedAt ?? this.updatedAt); 1571 1301 SettingsEntry copyWithCompanion(SettingsCompanion data) { 1572 1302 return SettingsEntry( 1573 1303 key: data.key.present ? data.key.value : this.key, ··· 1673 1403 } 1674 1404 } 1675 1405 1676 - class $SavedFeedsTable extends SavedFeeds 1677 - with TableInfo<$SavedFeedsTable, SavedFeedEntry> { 1406 + class $SavedFeedsTable extends SavedFeeds with TableInfo<$SavedFeedsTable, SavedFeedEntry> { 1678 1407 @override 1679 1408 final GeneratedDatabase attachedDatabase; 1680 1409 final String? _alias; ··· 1688 1417 type: DriftSqlType.string, 1689 1418 requiredDuringInsert: true, 1690 1419 ); 1691 - static const VerificationMeta _accountDidMeta = const VerificationMeta( 1692 - 'accountDid', 1693 - ); 1420 + static const VerificationMeta _accountDidMeta = const VerificationMeta('accountDid'); 1694 1421 @override 1695 1422 late final GeneratedColumn<String> accountDid = GeneratedColumn<String>( 1696 1423 'account_did', ··· 1725 1452 false, 1726 1453 type: DriftSqlType.bool, 1727 1454 requiredDuringInsert: false, 1728 - defaultConstraints: GeneratedColumn.constraintIsAlways( 1729 - 'CHECK ("pinned" IN (0, 1))', 1730 - ), 1455 + defaultConstraints: GeneratedColumn.constraintIsAlways('CHECK ("pinned" IN (0, 1))'), 1731 1456 defaultValue: const Constant(false), 1732 1457 ); 1733 - static const VerificationMeta _sortOrderMeta = const VerificationMeta( 1734 - 'sortOrder', 1735 - ); 1458 + static const VerificationMeta _sortOrderMeta = const VerificationMeta('sortOrder'); 1736 1459 @override 1737 1460 late final GeneratedColumn<int> sortOrder = GeneratedColumn<int>( 1738 1461 'sort_order', ··· 1742 1465 requiredDuringInsert: false, 1743 1466 defaultValue: const Constant(0), 1744 1467 ); 1745 - static const VerificationMeta _updatedAtMeta = const VerificationMeta( 1746 - 'updatedAt', 1747 - ); 1468 + static const VerificationMeta _updatedAtMeta = const VerificationMeta('updatedAt'); 1748 1469 @override 1749 1470 late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>( 1750 1471 'updated_at', ··· 1755 1476 defaultValue: currentDateAndTime, 1756 1477 ); 1757 1478 @override 1758 - List<GeneratedColumn> get $columns => [ 1759 - id, 1760 - accountDid, 1761 - type, 1762 - value, 1763 - pinned, 1764 - sortOrder, 1765 - updatedAt, 1766 - ]; 1479 + List<GeneratedColumn> get $columns => [id, accountDid, type, value, pinned, sortOrder, updatedAt]; 1767 1480 @override 1768 1481 String get aliasedName => _alias ?? actualTableName; 1769 1482 @override 1770 1483 String get actualTableName => $name; 1771 1484 static const String $name = 'saved_feeds'; 1772 1485 @override 1773 - VerificationContext validateIntegrity( 1774 - Insertable<SavedFeedEntry> instance, { 1775 - bool isInserting = false, 1776 - }) { 1486 + VerificationContext validateIntegrity(Insertable<SavedFeedEntry> instance, {bool isInserting = false}) { 1777 1487 final context = VerificationContext(); 1778 1488 final data = instance.toColumns(true); 1779 1489 if (data.containsKey('id')) { ··· 1782 1492 context.missing(_idMeta); 1783 1493 } 1784 1494 if (data.containsKey('account_did')) { 1785 - context.handle( 1786 - _accountDidMeta, 1787 - accountDid.isAcceptableOrUnknown(data['account_did']!, _accountDidMeta), 1788 - ); 1495 + context.handle(_accountDidMeta, accountDid.isAcceptableOrUnknown(data['account_did']!, _accountDidMeta)); 1789 1496 } else if (isInserting) { 1790 1497 context.missing(_accountDidMeta); 1791 1498 } 1792 1499 if (data.containsKey('type')) { 1793 - context.handle( 1794 - _typeMeta, 1795 - type.isAcceptableOrUnknown(data['type']!, _typeMeta), 1796 - ); 1500 + context.handle(_typeMeta, type.isAcceptableOrUnknown(data['type']!, _typeMeta)); 1797 1501 } else if (isInserting) { 1798 1502 context.missing(_typeMeta); 1799 1503 } 1800 1504 if (data.containsKey('value')) { 1801 - context.handle( 1802 - _valueMeta, 1803 - value.isAcceptableOrUnknown(data['value']!, _valueMeta), 1804 - ); 1505 + context.handle(_valueMeta, value.isAcceptableOrUnknown(data['value']!, _valueMeta)); 1805 1506 } else if (isInserting) { 1806 1507 context.missing(_valueMeta); 1807 1508 } 1808 1509 if (data.containsKey('pinned')) { 1809 - context.handle( 1810 - _pinnedMeta, 1811 - pinned.isAcceptableOrUnknown(data['pinned']!, _pinnedMeta), 1812 - ); 1510 + context.handle(_pinnedMeta, pinned.isAcceptableOrUnknown(data['pinned']!, _pinnedMeta)); 1813 1511 } 1814 1512 if (data.containsKey('sort_order')) { 1815 - context.handle( 1816 - _sortOrderMeta, 1817 - sortOrder.isAcceptableOrUnknown(data['sort_order']!, _sortOrderMeta), 1818 - ); 1513 + context.handle(_sortOrderMeta, sortOrder.isAcceptableOrUnknown(data['sort_order']!, _sortOrderMeta)); 1819 1514 } 1820 1515 if (data.containsKey('updated_at')) { 1821 - context.handle( 1822 - _updatedAtMeta, 1823 - updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), 1824 - ); 1516 + context.handle(_updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta)); 1825 1517 } 1826 1518 return context; 1827 1519 } ··· 1832 1524 SavedFeedEntry map(Map<String, dynamic> data, {String? tablePrefix}) { 1833 1525 final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; 1834 1526 return SavedFeedEntry( 1835 - id: attachedDatabase.typeMapping.read( 1836 - DriftSqlType.string, 1837 - data['${effectivePrefix}id'], 1838 - )!, 1839 - accountDid: attachedDatabase.typeMapping.read( 1840 - DriftSqlType.string, 1841 - data['${effectivePrefix}account_did'], 1842 - )!, 1843 - type: attachedDatabase.typeMapping.read( 1844 - DriftSqlType.string, 1845 - data['${effectivePrefix}type'], 1846 - )!, 1847 - value: attachedDatabase.typeMapping.read( 1848 - DriftSqlType.string, 1849 - data['${effectivePrefix}value'], 1850 - )!, 1851 - pinned: attachedDatabase.typeMapping.read( 1852 - DriftSqlType.bool, 1853 - data['${effectivePrefix}pinned'], 1854 - )!, 1855 - sortOrder: attachedDatabase.typeMapping.read( 1856 - DriftSqlType.int, 1857 - data['${effectivePrefix}sort_order'], 1858 - )!, 1859 - updatedAt: attachedDatabase.typeMapping.read( 1860 - DriftSqlType.dateTime, 1861 - data['${effectivePrefix}updated_at'], 1862 - )!, 1527 + id: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}id'])!, 1528 + accountDid: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}account_did'])!, 1529 + type: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}type'])!, 1530 + value: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}value'])!, 1531 + pinned: attachedDatabase.typeMapping.read(DriftSqlType.bool, data['${effectivePrefix}pinned'])!, 1532 + sortOrder: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}sort_order'])!, 1533 + updatedAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!, 1863 1534 ); 1864 1535 } 1865 1536 ··· 1911 1582 ); 1912 1583 } 1913 1584 1914 - factory SavedFeedEntry.fromJson( 1915 - Map<String, dynamic> json, { 1916 - ValueSerializer? serializer, 1917 - }) { 1585 + factory SavedFeedEntry.fromJson(Map<String, dynamic> json, {ValueSerializer? serializer}) { 1918 1586 serializer ??= driftRuntimeOptions.defaultSerializer; 1919 1587 return SavedFeedEntry( 1920 1588 id: serializer.fromJson<String>(json['id']), ··· 1960 1628 SavedFeedEntry copyWithCompanion(SavedFeedsCompanion data) { 1961 1629 return SavedFeedEntry( 1962 1630 id: data.id.present ? data.id.value : this.id, 1963 - accountDid: data.accountDid.present 1964 - ? data.accountDid.value 1965 - : this.accountDid, 1631 + accountDid: data.accountDid.present ? data.accountDid.value : this.accountDid, 1966 1632 type: data.type.present ? data.type.value : this.type, 1967 1633 value: data.value.present ? data.value.value : this.value, 1968 1634 pinned: data.pinned.present ? data.pinned.value : this.pinned, ··· 1986 1652 } 1987 1653 1988 1654 @override 1989 - int get hashCode => 1990 - Object.hash(id, accountDid, type, value, pinned, sortOrder, updatedAt); 1655 + int get hashCode => Object.hash(id, accountDid, type, value, pinned, sortOrder, updatedAt); 1991 1656 @override 1992 1657 bool operator ==(Object other) => 1993 1658 identical(this, other) || ··· 2123 1788 } 2124 1789 } 2125 1790 2126 - class $SearchHistoryTable extends SearchHistory 2127 - with TableInfo<$SearchHistoryTable, SearchHistoryEntry> { 1791 + class $SearchHistoryTable extends SearchHistory with TableInfo<$SearchHistoryTable, SearchHistoryEntry> { 2128 1792 @override 2129 1793 final GeneratedDatabase attachedDatabase; 2130 1794 final String? _alias; ··· 2138 1802 hasAutoIncrement: true, 2139 1803 type: DriftSqlType.int, 2140 1804 requiredDuringInsert: false, 2141 - defaultConstraints: GeneratedColumn.constraintIsAlways( 2142 - 'PRIMARY KEY AUTOINCREMENT', 2143 - ), 1805 + defaultConstraints: GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT'), 2144 1806 ); 2145 1807 static const VerificationMeta _queryMeta = const VerificationMeta('query'); 2146 1808 @override ··· 2160 1822 type: DriftSqlType.string, 2161 1823 requiredDuringInsert: true, 2162 1824 ); 2163 - static const VerificationMeta _searchedAtMeta = const VerificationMeta( 2164 - 'searchedAt', 2165 - ); 1825 + static const VerificationMeta _searchedAtMeta = const VerificationMeta('searchedAt'); 2166 1826 @override 2167 1827 late final GeneratedColumn<DateTime> searchedAt = GeneratedColumn<DateTime>( 2168 1828 'searched_at', ··· 2172 1832 requiredDuringInsert: false, 2173 1833 defaultValue: currentDateAndTime, 2174 1834 ); 2175 - static const VerificationMeta _accountDidMeta = const VerificationMeta( 2176 - 'accountDid', 2177 - ); 1835 + static const VerificationMeta _accountDidMeta = const VerificationMeta('accountDid'); 2178 1836 @override 2179 1837 late final GeneratedColumn<String> accountDid = GeneratedColumn<String>( 2180 1838 'account_did', ··· 2184 1842 requiredDuringInsert: true, 2185 1843 ); 2186 1844 @override 2187 - List<GeneratedColumn> get $columns => [ 2188 - id, 2189 - query, 2190 - type, 2191 - searchedAt, 2192 - accountDid, 2193 - ]; 1845 + List<GeneratedColumn> get $columns => [id, query, type, searchedAt, accountDid]; 2194 1846 @override 2195 1847 String get aliasedName => _alias ?? actualTableName; 2196 1848 @override 2197 1849 String get actualTableName => $name; 2198 1850 static const String $name = 'search_history'; 2199 1851 @override 2200 - VerificationContext validateIntegrity( 2201 - Insertable<SearchHistoryEntry> instance, { 2202 - bool isInserting = false, 2203 - }) { 1852 + VerificationContext validateIntegrity(Insertable<SearchHistoryEntry> instance, {bool isInserting = false}) { 2204 1853 final context = VerificationContext(); 2205 1854 final data = instance.toColumns(true); 2206 1855 if (data.containsKey('id')) { 2207 1856 context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); 2208 1857 } 2209 1858 if (data.containsKey('query')) { 2210 - context.handle( 2211 - _queryMeta, 2212 - query.isAcceptableOrUnknown(data['query']!, _queryMeta), 2213 - ); 1859 + context.handle(_queryMeta, query.isAcceptableOrUnknown(data['query']!, _queryMeta)); 2214 1860 } else if (isInserting) { 2215 1861 context.missing(_queryMeta); 2216 1862 } 2217 1863 if (data.containsKey('type')) { 2218 - context.handle( 2219 - _typeMeta, 2220 - type.isAcceptableOrUnknown(data['type']!, _typeMeta), 2221 - ); 1864 + context.handle(_typeMeta, type.isAcceptableOrUnknown(data['type']!, _typeMeta)); 2222 1865 } else if (isInserting) { 2223 1866 context.missing(_typeMeta); 2224 1867 } 2225 1868 if (data.containsKey('searched_at')) { 2226 - context.handle( 2227 - _searchedAtMeta, 2228 - searchedAt.isAcceptableOrUnknown(data['searched_at']!, _searchedAtMeta), 2229 - ); 1869 + context.handle(_searchedAtMeta, searchedAt.isAcceptableOrUnknown(data['searched_at']!, _searchedAtMeta)); 2230 1870 } 2231 1871 if (data.containsKey('account_did')) { 2232 - context.handle( 2233 - _accountDidMeta, 2234 - accountDid.isAcceptableOrUnknown(data['account_did']!, _accountDidMeta), 2235 - ); 1872 + context.handle(_accountDidMeta, accountDid.isAcceptableOrUnknown(data['account_did']!, _accountDidMeta)); 2236 1873 } else if (isInserting) { 2237 1874 context.missing(_accountDidMeta); 2238 1875 } ··· 2245 1882 SearchHistoryEntry map(Map<String, dynamic> data, {String? tablePrefix}) { 2246 1883 final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; 2247 1884 return SearchHistoryEntry( 2248 - id: attachedDatabase.typeMapping.read( 2249 - DriftSqlType.int, 2250 - data['${effectivePrefix}id'], 2251 - )!, 2252 - query: attachedDatabase.typeMapping.read( 2253 - DriftSqlType.string, 2254 - data['${effectivePrefix}query'], 2255 - )!, 2256 - type: attachedDatabase.typeMapping.read( 2257 - DriftSqlType.string, 2258 - data['${effectivePrefix}type'], 2259 - )!, 2260 - searchedAt: attachedDatabase.typeMapping.read( 2261 - DriftSqlType.dateTime, 2262 - data['${effectivePrefix}searched_at'], 2263 - )!, 2264 - accountDid: attachedDatabase.typeMapping.read( 2265 - DriftSqlType.string, 2266 - data['${effectivePrefix}account_did'], 2267 - )!, 1885 + id: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}id'])!, 1886 + query: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}query'])!, 1887 + type: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}type'])!, 1888 + searchedAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}searched_at'])!, 1889 + accountDid: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}account_did'])!, 2268 1890 ); 2269 1891 } 2270 1892 ··· 2274 1896 } 2275 1897 } 2276 1898 2277 - class SearchHistoryEntry extends DataClass 2278 - implements Insertable<SearchHistoryEntry> { 1899 + class SearchHistoryEntry extends DataClass implements Insertable<SearchHistoryEntry> { 2279 1900 final int id; 2280 1901 final String query; 2281 1902 final String type; ··· 2309 1930 ); 2310 1931 } 2311 1932 2312 - factory SearchHistoryEntry.fromJson( 2313 - Map<String, dynamic> json, { 2314 - ValueSerializer? serializer, 2315 - }) { 1933 + factory SearchHistoryEntry.fromJson(Map<String, dynamic> json, {ValueSerializer? serializer}) { 2316 1934 serializer ??= driftRuntimeOptions.defaultSerializer; 2317 1935 return SearchHistoryEntry( 2318 1936 id: serializer.fromJson<int>(json['id']), ··· 2334 1952 }; 2335 1953 } 2336 1954 2337 - SearchHistoryEntry copyWith({ 2338 - int? id, 2339 - String? query, 2340 - String? type, 2341 - DateTime? searchedAt, 2342 - String? accountDid, 2343 - }) => SearchHistoryEntry( 2344 - id: id ?? this.id, 2345 - query: query ?? this.query, 2346 - type: type ?? this.type, 2347 - searchedAt: searchedAt ?? this.searchedAt, 2348 - accountDid: accountDid ?? this.accountDid, 2349 - ); 1955 + SearchHistoryEntry copyWith({int? id, String? query, String? type, DateTime? searchedAt, String? accountDid}) => 1956 + SearchHistoryEntry( 1957 + id: id ?? this.id, 1958 + query: query ?? this.query, 1959 + type: type ?? this.type, 1960 + searchedAt: searchedAt ?? this.searchedAt, 1961 + accountDid: accountDid ?? this.accountDid, 1962 + ); 2350 1963 SearchHistoryEntry copyWithCompanion(SearchHistoryCompanion data) { 2351 1964 return SearchHistoryEntry( 2352 1965 id: data.id.present ? data.id.value : this.id, 2353 1966 query: data.query.present ? data.query.value : this.query, 2354 1967 type: data.type.present ? data.type.value : this.type, 2355 - searchedAt: data.searchedAt.present 2356 - ? data.searchedAt.value 2357 - : this.searchedAt, 2358 - accountDid: data.accountDid.present 2359 - ? data.accountDid.value 2360 - : this.accountDid, 1968 + searchedAt: data.searchedAt.present ? data.searchedAt.value : this.searchedAt, 1969 + accountDid: data.accountDid.present ? data.accountDid.value : this.accountDid, 2361 1970 ); 2362 1971 } 2363 1972 ··· 2488 2097 hasAutoIncrement: true, 2489 2098 type: DriftSqlType.int, 2490 2099 requiredDuringInsert: false, 2491 - defaultConstraints: GeneratedColumn.constraintIsAlways( 2492 - 'PRIMARY KEY AUTOINCREMENT', 2493 - ), 2100 + defaultConstraints: GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT'), 2494 2101 ); 2495 - static const VerificationMeta _accountDidMeta = const VerificationMeta( 2496 - 'accountDid', 2497 - ); 2102 + static const VerificationMeta _accountDidMeta = const VerificationMeta('accountDid'); 2498 2103 @override 2499 2104 late final GeneratedColumn<String> accountDid = GeneratedColumn<String>( 2500 2105 'account_did', ··· 2503 2108 type: DriftSqlType.string, 2504 2109 requiredDuringInsert: true, 2505 2110 ); 2506 - static const VerificationMeta _contentMeta = const VerificationMeta( 2507 - 'content', 2508 - ); 2111 + static const VerificationMeta _contentMeta = const VerificationMeta('content'); 2509 2112 @override 2510 2113 late final GeneratedColumn<String> content = GeneratedColumn<String>( 2511 2114 'content', ··· 2514 2117 type: DriftSqlType.string, 2515 2118 requiredDuringInsert: true, 2516 2119 ); 2517 - static const VerificationMeta _replyUriMeta = const VerificationMeta( 2518 - 'replyUri', 2519 - ); 2120 + static const VerificationMeta _replyUriMeta = const VerificationMeta('replyUri'); 2520 2121 @override 2521 2122 late final GeneratedColumn<String> replyUri = GeneratedColumn<String>( 2522 2123 'reply_uri', ··· 2525 2126 type: DriftSqlType.string, 2526 2127 requiredDuringInsert: false, 2527 2128 ); 2528 - static const VerificationMeta _replyCidMeta = const VerificationMeta( 2529 - 'replyCid', 2530 - ); 2129 + static const VerificationMeta _replyCidMeta = const VerificationMeta('replyCid'); 2531 2130 @override 2532 2131 late final GeneratedColumn<String> replyCid = GeneratedColumn<String>( 2533 2132 'reply_cid', ··· 2536 2135 type: DriftSqlType.string, 2537 2136 requiredDuringInsert: false, 2538 2137 ); 2539 - static const VerificationMeta _rootUriMeta = const VerificationMeta( 2540 - 'rootUri', 2541 - ); 2138 + static const VerificationMeta _rootUriMeta = const VerificationMeta('rootUri'); 2542 2139 @override 2543 2140 late final GeneratedColumn<String> rootUri = GeneratedColumn<String>( 2544 2141 'root_uri', ··· 2547 2144 type: DriftSqlType.string, 2548 2145 requiredDuringInsert: false, 2549 2146 ); 2550 - static const VerificationMeta _rootCidMeta = const VerificationMeta( 2551 - 'rootCid', 2552 - ); 2147 + static const VerificationMeta _rootCidMeta = const VerificationMeta('rootCid'); 2553 2148 @override 2554 2149 late final GeneratedColumn<String> rootCid = GeneratedColumn<String>( 2555 2150 'root_cid', ··· 2558 2153 type: DriftSqlType.string, 2559 2154 requiredDuringInsert: false, 2560 2155 ); 2561 - static const VerificationMeta _embedJsonMeta = const VerificationMeta( 2562 - 'embedJson', 2563 - ); 2156 + static const VerificationMeta _embedJsonMeta = const VerificationMeta('embedJson'); 2564 2157 @override 2565 2158 late final GeneratedColumn<String> embedJson = GeneratedColumn<String>( 2566 2159 'embed_json', ··· 2569 2162 type: DriftSqlType.string, 2570 2163 requiredDuringInsert: false, 2571 2164 ); 2572 - static const VerificationMeta _mediaPathsMeta = const VerificationMeta( 2573 - 'mediaPaths', 2574 - ); 2165 + static const VerificationMeta _mediaPathsMeta = const VerificationMeta('mediaPaths'); 2575 2166 @override 2576 2167 late final GeneratedColumn<String> mediaPaths = GeneratedColumn<String>( 2577 2168 'media_paths', ··· 2580 2171 type: DriftSqlType.string, 2581 2172 requiredDuringInsert: false, 2582 2173 ); 2583 - static const VerificationMeta _createdAtMeta = const VerificationMeta( 2584 - 'createdAt', 2585 - ); 2174 + static const VerificationMeta _createdAtMeta = const VerificationMeta('createdAt'); 2586 2175 @override 2587 2176 late final GeneratedColumn<DateTime> createdAt = GeneratedColumn<DateTime>( 2588 2177 'created_at', ··· 2592 2181 requiredDuringInsert: false, 2593 2182 defaultValue: currentDateAndTime, 2594 2183 ); 2595 - static const VerificationMeta _updatedAtMeta = const VerificationMeta( 2596 - 'updatedAt', 2597 - ); 2184 + static const VerificationMeta _updatedAtMeta = const VerificationMeta('updatedAt'); 2598 2185 @override 2599 2186 late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>( 2600 2187 'updated_at', ··· 2604 2191 requiredDuringInsert: false, 2605 2192 defaultValue: currentDateAndTime, 2606 2193 ); 2607 - static const VerificationMeta _scheduledAtMeta = const VerificationMeta( 2608 - 'scheduledAt', 2609 - ); 2194 + static const VerificationMeta _scheduledAtMeta = const VerificationMeta('scheduledAt'); 2610 2195 @override 2611 2196 late final GeneratedColumn<DateTime> scheduledAt = GeneratedColumn<DateTime>( 2612 2197 'scheduled_at', ··· 2636 2221 String get actualTableName => $name; 2637 2222 static const String $name = 'drafts'; 2638 2223 @override 2639 - VerificationContext validateIntegrity( 2640 - Insertable<DraftEntry> instance, { 2641 - bool isInserting = false, 2642 - }) { 2224 + VerificationContext validateIntegrity(Insertable<DraftEntry> instance, {bool isInserting = false}) { 2643 2225 final context = VerificationContext(); 2644 2226 final data = instance.toColumns(true); 2645 2227 if (data.containsKey('id')) { 2646 2228 context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); 2647 2229 } 2648 2230 if (data.containsKey('account_did')) { 2649 - context.handle( 2650 - _accountDidMeta, 2651 - accountDid.isAcceptableOrUnknown(data['account_did']!, _accountDidMeta), 2652 - ); 2231 + context.handle(_accountDidMeta, accountDid.isAcceptableOrUnknown(data['account_did']!, _accountDidMeta)); 2653 2232 } else if (isInserting) { 2654 2233 context.missing(_accountDidMeta); 2655 2234 } 2656 2235 if (data.containsKey('content')) { 2657 - context.handle( 2658 - _contentMeta, 2659 - content.isAcceptableOrUnknown(data['content']!, _contentMeta), 2660 - ); 2236 + context.handle(_contentMeta, content.isAcceptableOrUnknown(data['content']!, _contentMeta)); 2661 2237 } else if (isInserting) { 2662 2238 context.missing(_contentMeta); 2663 2239 } 2664 2240 if (data.containsKey('reply_uri')) { 2665 - context.handle( 2666 - _replyUriMeta, 2667 - replyUri.isAcceptableOrUnknown(data['reply_uri']!, _replyUriMeta), 2668 - ); 2241 + context.handle(_replyUriMeta, replyUri.isAcceptableOrUnknown(data['reply_uri']!, _replyUriMeta)); 2669 2242 } 2670 2243 if (data.containsKey('reply_cid')) { 2671 - context.handle( 2672 - _replyCidMeta, 2673 - replyCid.isAcceptableOrUnknown(data['reply_cid']!, _replyCidMeta), 2674 - ); 2244 + context.handle(_replyCidMeta, replyCid.isAcceptableOrUnknown(data['reply_cid']!, _replyCidMeta)); 2675 2245 } 2676 2246 if (data.containsKey('root_uri')) { 2677 - context.handle( 2678 - _rootUriMeta, 2679 - rootUri.isAcceptableOrUnknown(data['root_uri']!, _rootUriMeta), 2680 - ); 2247 + context.handle(_rootUriMeta, rootUri.isAcceptableOrUnknown(data['root_uri']!, _rootUriMeta)); 2681 2248 } 2682 2249 if (data.containsKey('root_cid')) { 2683 - context.handle( 2684 - _rootCidMeta, 2685 - rootCid.isAcceptableOrUnknown(data['root_cid']!, _rootCidMeta), 2686 - ); 2250 + context.handle(_rootCidMeta, rootCid.isAcceptableOrUnknown(data['root_cid']!, _rootCidMeta)); 2687 2251 } 2688 2252 if (data.containsKey('embed_json')) { 2689 - context.handle( 2690 - _embedJsonMeta, 2691 - embedJson.isAcceptableOrUnknown(data['embed_json']!, _embedJsonMeta), 2692 - ); 2253 + context.handle(_embedJsonMeta, embedJson.isAcceptableOrUnknown(data['embed_json']!, _embedJsonMeta)); 2693 2254 } 2694 2255 if (data.containsKey('media_paths')) { 2695 - context.handle( 2696 - _mediaPathsMeta, 2697 - mediaPaths.isAcceptableOrUnknown(data['media_paths']!, _mediaPathsMeta), 2698 - ); 2256 + context.handle(_mediaPathsMeta, mediaPaths.isAcceptableOrUnknown(data['media_paths']!, _mediaPathsMeta)); 2699 2257 } 2700 2258 if (data.containsKey('created_at')) { 2701 - context.handle( 2702 - _createdAtMeta, 2703 - createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), 2704 - ); 2259 + context.handle(_createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta)); 2705 2260 } 2706 2261 if (data.containsKey('updated_at')) { 2707 - context.handle( 2708 - _updatedAtMeta, 2709 - updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), 2710 - ); 2262 + context.handle(_updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta)); 2711 2263 } 2712 2264 if (data.containsKey('scheduled_at')) { 2713 - context.handle( 2714 - _scheduledAtMeta, 2715 - scheduledAt.isAcceptableOrUnknown( 2716 - data['scheduled_at']!, 2717 - _scheduledAtMeta, 2718 - ), 2719 - ); 2265 + context.handle(_scheduledAtMeta, scheduledAt.isAcceptableOrUnknown(data['scheduled_at']!, _scheduledAtMeta)); 2720 2266 } 2721 2267 return context; 2722 2268 } ··· 2727 2273 DraftEntry map(Map<String, dynamic> data, {String? tablePrefix}) { 2728 2274 final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; 2729 2275 return DraftEntry( 2730 - id: attachedDatabase.typeMapping.read( 2731 - DriftSqlType.int, 2732 - data['${effectivePrefix}id'], 2733 - )!, 2734 - accountDid: attachedDatabase.typeMapping.read( 2735 - DriftSqlType.string, 2736 - data['${effectivePrefix}account_did'], 2737 - )!, 2738 - content: attachedDatabase.typeMapping.read( 2739 - DriftSqlType.string, 2740 - data['${effectivePrefix}content'], 2741 - )!, 2742 - replyUri: attachedDatabase.typeMapping.read( 2743 - DriftSqlType.string, 2744 - data['${effectivePrefix}reply_uri'], 2745 - ), 2746 - replyCid: attachedDatabase.typeMapping.read( 2747 - DriftSqlType.string, 2748 - data['${effectivePrefix}reply_cid'], 2749 - ), 2750 - rootUri: attachedDatabase.typeMapping.read( 2751 - DriftSqlType.string, 2752 - data['${effectivePrefix}root_uri'], 2753 - ), 2754 - rootCid: attachedDatabase.typeMapping.read( 2755 - DriftSqlType.string, 2756 - data['${effectivePrefix}root_cid'], 2757 - ), 2758 - embedJson: attachedDatabase.typeMapping.read( 2759 - DriftSqlType.string, 2760 - data['${effectivePrefix}embed_json'], 2761 - ), 2762 - mediaPaths: attachedDatabase.typeMapping.read( 2763 - DriftSqlType.string, 2764 - data['${effectivePrefix}media_paths'], 2765 - ), 2766 - createdAt: attachedDatabase.typeMapping.read( 2767 - DriftSqlType.dateTime, 2768 - data['${effectivePrefix}created_at'], 2769 - )!, 2770 - updatedAt: attachedDatabase.typeMapping.read( 2771 - DriftSqlType.dateTime, 2772 - data['${effectivePrefix}updated_at'], 2773 - )!, 2774 - scheduledAt: attachedDatabase.typeMapping.read( 2775 - DriftSqlType.dateTime, 2776 - data['${effectivePrefix}scheduled_at'], 2777 - ), 2276 + id: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}id'])!, 2277 + accountDid: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}account_did'])!, 2278 + content: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}content'])!, 2279 + replyUri: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}reply_uri']), 2280 + replyCid: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}reply_cid']), 2281 + rootUri: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}root_uri']), 2282 + rootCid: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}root_cid']), 2283 + embedJson: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}embed_json']), 2284 + mediaPaths: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}media_paths']), 2285 + createdAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!, 2286 + updatedAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!, 2287 + scheduledAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}scheduled_at']), 2778 2288 ); 2779 2289 } 2780 2290 ··· 2848 2358 id: Value(id), 2849 2359 accountDid: Value(accountDid), 2850 2360 content: Value(content), 2851 - replyUri: replyUri == null && nullToAbsent 2852 - ? const Value.absent() 2853 - : Value(replyUri), 2854 - replyCid: replyCid == null && nullToAbsent 2855 - ? const Value.absent() 2856 - : Value(replyCid), 2857 - rootUri: rootUri == null && nullToAbsent 2858 - ? const Value.absent() 2859 - : Value(rootUri), 2860 - rootCid: rootCid == null && nullToAbsent 2861 - ? const Value.absent() 2862 - : Value(rootCid), 2863 - embedJson: embedJson == null && nullToAbsent 2864 - ? const Value.absent() 2865 - : Value(embedJson), 2866 - mediaPaths: mediaPaths == null && nullToAbsent 2867 - ? const Value.absent() 2868 - : Value(mediaPaths), 2361 + replyUri: replyUri == null && nullToAbsent ? const Value.absent() : Value(replyUri), 2362 + replyCid: replyCid == null && nullToAbsent ? const Value.absent() : Value(replyCid), 2363 + rootUri: rootUri == null && nullToAbsent ? const Value.absent() : Value(rootUri), 2364 + rootCid: rootCid == null && nullToAbsent ? const Value.absent() : Value(rootCid), 2365 + embedJson: embedJson == null && nullToAbsent ? const Value.absent() : Value(embedJson), 2366 + mediaPaths: mediaPaths == null && nullToAbsent ? const Value.absent() : Value(mediaPaths), 2869 2367 createdAt: Value(createdAt), 2870 2368 updatedAt: Value(updatedAt), 2871 - scheduledAt: scheduledAt == null && nullToAbsent 2872 - ? const Value.absent() 2873 - : Value(scheduledAt), 2369 + scheduledAt: scheduledAt == null && nullToAbsent ? const Value.absent() : Value(scheduledAt), 2874 2370 ); 2875 2371 } 2876 2372 2877 - factory DraftEntry.fromJson( 2878 - Map<String, dynamic> json, { 2879 - ValueSerializer? serializer, 2880 - }) { 2373 + factory DraftEntry.fromJson(Map<String, dynamic> json, {ValueSerializer? serializer}) { 2881 2374 serializer ??= driftRuntimeOptions.defaultSerializer; 2882 2375 return DraftEntry( 2883 2376 id: serializer.fromJson<int>(json['id']), ··· 2943 2436 DraftEntry copyWithCompanion(DraftsCompanion data) { 2944 2437 return DraftEntry( 2945 2438 id: data.id.present ? data.id.value : this.id, 2946 - accountDid: data.accountDid.present 2947 - ? data.accountDid.value 2948 - : this.accountDid, 2439 + accountDid: data.accountDid.present ? data.accountDid.value : this.accountDid, 2949 2440 content: data.content.present ? data.content.value : this.content, 2950 2441 replyUri: data.replyUri.present ? data.replyUri.value : this.replyUri, 2951 2442 replyCid: data.replyCid.present ? data.replyCid.value : this.replyCid, 2952 2443 rootUri: data.rootUri.present ? data.rootUri.value : this.rootUri, 2953 2444 rootCid: data.rootCid.present ? data.rootCid.value : this.rootCid, 2954 2445 embedJson: data.embedJson.present ? data.embedJson.value : this.embedJson, 2955 - mediaPaths: data.mediaPaths.present 2956 - ? data.mediaPaths.value 2957 - : this.mediaPaths, 2446 + mediaPaths: data.mediaPaths.present ? data.mediaPaths.value : this.mediaPaths, 2958 2447 createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, 2959 2448 updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, 2960 - scheduledAt: data.scheduledAt.present 2961 - ? data.scheduledAt.value 2962 - : this.scheduledAt, 2449 + scheduledAt: data.scheduledAt.present ? data.scheduledAt.value : this.scheduledAt, 2963 2450 ); 2964 2451 } 2965 2452 ··· 3179 2666 } 3180 2667 } 3181 2668 3182 - class $SavedPostsTable extends SavedPosts 3183 - with TableInfo<$SavedPostsTable, SavedPostEntry> { 2669 + class $SavedPostsTable extends SavedPosts with TableInfo<$SavedPostsTable, SavedPostEntry> { 3184 2670 @override 3185 2671 final GeneratedDatabase attachedDatabase; 3186 2672 final String? _alias; ··· 3194 2680 hasAutoIncrement: true, 3195 2681 type: DriftSqlType.int, 3196 2682 requiredDuringInsert: false, 3197 - defaultConstraints: GeneratedColumn.constraintIsAlways( 3198 - 'PRIMARY KEY AUTOINCREMENT', 3199 - ), 2683 + defaultConstraints: GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT'), 3200 2684 ); 3201 - static const VerificationMeta _accountDidMeta = const VerificationMeta( 3202 - 'accountDid', 3203 - ); 2685 + static const VerificationMeta _accountDidMeta = const VerificationMeta('accountDid'); 3204 2686 @override 3205 2687 late final GeneratedColumn<String> accountDid = GeneratedColumn<String>( 3206 2688 'account_did', ··· 3209 2691 type: DriftSqlType.string, 3210 2692 requiredDuringInsert: true, 3211 2693 ); 3212 - static const VerificationMeta _postUriMeta = const VerificationMeta( 3213 - 'postUri', 3214 - ); 2694 + static const VerificationMeta _postUriMeta = const VerificationMeta('postUri'); 3215 2695 @override 3216 2696 late final GeneratedColumn<String> postUri = GeneratedColumn<String>( 3217 2697 'post_uri', ··· 3220 2700 type: DriftSqlType.string, 3221 2701 requiredDuringInsert: true, 3222 2702 ); 3223 - static const VerificationMeta _postJsonMeta = const VerificationMeta( 3224 - 'postJson', 3225 - ); 2703 + static const VerificationMeta _postJsonMeta = const VerificationMeta('postJson'); 3226 2704 @override 3227 2705 late final GeneratedColumn<String> postJson = GeneratedColumn<String>( 3228 2706 'post_json', ··· 3231 2709 type: DriftSqlType.string, 3232 2710 requiredDuringInsert: true, 3233 2711 ); 3234 - static const VerificationMeta _savedAtMeta = const VerificationMeta( 3235 - 'savedAt', 3236 - ); 2712 + static const VerificationMeta _savedAtMeta = const VerificationMeta('savedAt'); 3237 2713 @override 3238 2714 late final GeneratedColumn<DateTime> savedAt = GeneratedColumn<DateTime>( 3239 2715 'saved_at', ··· 3244 2720 defaultValue: currentDateAndTime, 3245 2721 ); 3246 2722 @override 3247 - List<GeneratedColumn> get $columns => [ 3248 - id, 3249 - accountDid, 3250 - postUri, 3251 - postJson, 3252 - savedAt, 3253 - ]; 2723 + List<GeneratedColumn> get $columns => [id, accountDid, postUri, postJson, savedAt]; 3254 2724 @override 3255 2725 String get aliasedName => _alias ?? actualTableName; 3256 2726 @override 3257 2727 String get actualTableName => $name; 3258 2728 static const String $name = 'saved_posts'; 3259 2729 @override 3260 - VerificationContext validateIntegrity( 3261 - Insertable<SavedPostEntry> instance, { 3262 - bool isInserting = false, 3263 - }) { 2730 + VerificationContext validateIntegrity(Insertable<SavedPostEntry> instance, {bool isInserting = false}) { 3264 2731 final context = VerificationContext(); 3265 2732 final data = instance.toColumns(true); 3266 2733 if (data.containsKey('id')) { 3267 2734 context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); 3268 2735 } 3269 2736 if (data.containsKey('account_did')) { 3270 - context.handle( 3271 - _accountDidMeta, 3272 - accountDid.isAcceptableOrUnknown(data['account_did']!, _accountDidMeta), 3273 - ); 2737 + context.handle(_accountDidMeta, accountDid.isAcceptableOrUnknown(data['account_did']!, _accountDidMeta)); 3274 2738 } else if (isInserting) { 3275 2739 context.missing(_accountDidMeta); 3276 2740 } 3277 2741 if (data.containsKey('post_uri')) { 3278 - context.handle( 3279 - _postUriMeta, 3280 - postUri.isAcceptableOrUnknown(data['post_uri']!, _postUriMeta), 3281 - ); 2742 + context.handle(_postUriMeta, postUri.isAcceptableOrUnknown(data['post_uri']!, _postUriMeta)); 3282 2743 } else if (isInserting) { 3283 2744 context.missing(_postUriMeta); 3284 2745 } 3285 2746 if (data.containsKey('post_json')) { 3286 - context.handle( 3287 - _postJsonMeta, 3288 - postJson.isAcceptableOrUnknown(data['post_json']!, _postJsonMeta), 3289 - ); 2747 + context.handle(_postJsonMeta, postJson.isAcceptableOrUnknown(data['post_json']!, _postJsonMeta)); 3290 2748 } else if (isInserting) { 3291 2749 context.missing(_postJsonMeta); 3292 2750 } 3293 2751 if (data.containsKey('saved_at')) { 3294 - context.handle( 3295 - _savedAtMeta, 3296 - savedAt.isAcceptableOrUnknown(data['saved_at']!, _savedAtMeta), 3297 - ); 2752 + context.handle(_savedAtMeta, savedAt.isAcceptableOrUnknown(data['saved_at']!, _savedAtMeta)); 3298 2753 } 3299 2754 return context; 3300 2755 } ··· 3305 2760 SavedPostEntry map(Map<String, dynamic> data, {String? tablePrefix}) { 3306 2761 final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; 3307 2762 return SavedPostEntry( 3308 - id: attachedDatabase.typeMapping.read( 3309 - DriftSqlType.int, 3310 - data['${effectivePrefix}id'], 3311 - )!, 3312 - accountDid: attachedDatabase.typeMapping.read( 3313 - DriftSqlType.string, 3314 - data['${effectivePrefix}account_did'], 3315 - )!, 3316 - postUri: attachedDatabase.typeMapping.read( 3317 - DriftSqlType.string, 3318 - data['${effectivePrefix}post_uri'], 3319 - )!, 3320 - postJson: attachedDatabase.typeMapping.read( 3321 - DriftSqlType.string, 3322 - data['${effectivePrefix}post_json'], 3323 - )!, 3324 - savedAt: attachedDatabase.typeMapping.read( 3325 - DriftSqlType.dateTime, 3326 - data['${effectivePrefix}saved_at'], 3327 - )!, 2763 + id: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}id'])!, 2764 + accountDid: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}account_did'])!, 2765 + postUri: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}post_uri'])!, 2766 + postJson: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}post_json'])!, 2767 + savedAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}saved_at'])!, 3328 2768 ); 3329 2769 } 3330 2770 ··· 3368 2808 ); 3369 2809 } 3370 2810 3371 - factory SavedPostEntry.fromJson( 3372 - Map<String, dynamic> json, { 3373 - ValueSerializer? serializer, 3374 - }) { 2811 + factory SavedPostEntry.fromJson(Map<String, dynamic> json, {ValueSerializer? serializer}) { 3375 2812 serializer ??= driftRuntimeOptions.defaultSerializer; 3376 2813 return SavedPostEntry( 3377 2814 id: serializer.fromJson<int>(json['id']), ··· 3393 2830 }; 3394 2831 } 3395 2832 3396 - SavedPostEntry copyWith({ 3397 - int? id, 3398 - String? accountDid, 3399 - String? postUri, 3400 - String? postJson, 3401 - DateTime? savedAt, 3402 - }) => SavedPostEntry( 3403 - id: id ?? this.id, 3404 - accountDid: accountDid ?? this.accountDid, 3405 - postUri: postUri ?? this.postUri, 3406 - postJson: postJson ?? this.postJson, 3407 - savedAt: savedAt ?? this.savedAt, 3408 - ); 2833 + SavedPostEntry copyWith({int? id, String? accountDid, String? postUri, String? postJson, DateTime? savedAt}) => 2834 + SavedPostEntry( 2835 + id: id ?? this.id, 2836 + accountDid: accountDid ?? this.accountDid, 2837 + postUri: postUri ?? this.postUri, 2838 + postJson: postJson ?? this.postJson, 2839 + savedAt: savedAt ?? this.savedAt, 2840 + ); 3409 2841 SavedPostEntry copyWithCompanion(SavedPostsCompanion data) { 3410 2842 return SavedPostEntry( 3411 2843 id: data.id.present ? data.id.value : this.id, 3412 - accountDid: data.accountDid.present 3413 - ? data.accountDid.value 3414 - : this.accountDid, 2844 + accountDid: data.accountDid.present ? data.accountDid.value : this.accountDid, 3415 2845 postUri: data.postUri.present ? data.postUri.value : this.postUri, 3416 2846 postJson: data.postJson.present ? data.postJson.value : this.postJson, 3417 2847 savedAt: data.savedAt.present ? data.savedAt.value : this.savedAt, ··· 3543 2973 late final $DraftsTable drafts = $DraftsTable(this); 3544 2974 late final $SavedPostsTable savedPosts = $SavedPostsTable(this); 3545 2975 @override 3546 - Iterable<TableInfo<Table, Object?>> get allTables => 3547 - allSchemaEntities.whereType<TableInfo<Table, Object?>>(); 2976 + Iterable<TableInfo<Table, Object?>> get allTables => allSchemaEntities.whereType<TableInfo<Table, Object?>>(); 3548 2977 @override 3549 2978 List<DatabaseSchemaEntity> get allSchemaEntities => [ 3550 2979 accounts, ··· 3591 3020 Value<int> rowid, 3592 3021 }); 3593 3022 3594 - class $$AccountsTableFilterComposer 3595 - extends Composer<_$AppDatabase, $AccountsTable> { 3023 + class $$AccountsTableFilterComposer extends Composer<_$AppDatabase, $AccountsTable> { 3596 3024 $$AccountsTableFilterComposer({ 3597 3025 required super.$db, 3598 3026 required super.$table, ··· 3600 3028 super.$addJoinBuilderToRootComposer, 3601 3029 super.$removeJoinBuilderFromRootComposer, 3602 3030 }); 3603 - ColumnFilters<String> get did => $composableBuilder( 3604 - column: $table.did, 3605 - builder: (column) => ColumnFilters(column), 3606 - ); 3031 + ColumnFilters<String> get did => $composableBuilder(column: $table.did, builder: (column) => ColumnFilters(column)); 3607 3032 3608 - ColumnFilters<String> get handle => $composableBuilder( 3609 - column: $table.handle, 3610 - builder: (column) => ColumnFilters(column), 3611 - ); 3033 + ColumnFilters<String> get handle => 3034 + $composableBuilder(column: $table.handle, builder: (column) => ColumnFilters(column)); 3612 3035 3613 - ColumnFilters<String> get displayName => $composableBuilder( 3614 - column: $table.displayName, 3615 - builder: (column) => ColumnFilters(column), 3616 - ); 3036 + ColumnFilters<String> get displayName => 3037 + $composableBuilder(column: $table.displayName, builder: (column) => ColumnFilters(column)); 3617 3038 3618 - ColumnFilters<String> get service => $composableBuilder( 3619 - column: $table.service, 3620 - builder: (column) => ColumnFilters(column), 3621 - ); 3039 + ColumnFilters<String> get service => 3040 + $composableBuilder(column: $table.service, builder: (column) => ColumnFilters(column)); 3622 3041 3623 - ColumnFilters<String> get accessToken => $composableBuilder( 3624 - column: $table.accessToken, 3625 - builder: (column) => ColumnFilters(column), 3626 - ); 3042 + ColumnFilters<String> get accessToken => 3043 + $composableBuilder(column: $table.accessToken, builder: (column) => ColumnFilters(column)); 3627 3044 3628 - ColumnFilters<String> get refreshToken => $composableBuilder( 3629 - column: $table.refreshToken, 3630 - builder: (column) => ColumnFilters(column), 3631 - ); 3045 + ColumnFilters<String> get refreshToken => 3046 + $composableBuilder(column: $table.refreshToken, builder: (column) => ColumnFilters(column)); 3632 3047 3633 - ColumnFilters<String> get dpopPublicKey => $composableBuilder( 3634 - column: $table.dpopPublicKey, 3635 - builder: (column) => ColumnFilters(column), 3636 - ); 3048 + ColumnFilters<String> get dpopPublicKey => 3049 + $composableBuilder(column: $table.dpopPublicKey, builder: (column) => ColumnFilters(column)); 3637 3050 3638 - ColumnFilters<String> get dpopPrivateKey => $composableBuilder( 3639 - column: $table.dpopPrivateKey, 3640 - builder: (column) => ColumnFilters(column), 3641 - ); 3051 + ColumnFilters<String> get dpopPrivateKey => 3052 + $composableBuilder(column: $table.dpopPrivateKey, builder: (column) => ColumnFilters(column)); 3642 3053 3643 - ColumnFilters<String> get dpopNonce => $composableBuilder( 3644 - column: $table.dpopNonce, 3645 - builder: (column) => ColumnFilters(column), 3646 - ); 3054 + ColumnFilters<String> get dpopNonce => 3055 + $composableBuilder(column: $table.dpopNonce, builder: (column) => ColumnFilters(column)); 3647 3056 3648 - ColumnFilters<DateTime> get expiresAt => $composableBuilder( 3649 - column: $table.expiresAt, 3650 - builder: (column) => ColumnFilters(column), 3651 - ); 3057 + ColumnFilters<DateTime> get expiresAt => 3058 + $composableBuilder(column: $table.expiresAt, builder: (column) => ColumnFilters(column)); 3652 3059 3653 - ColumnFilters<DateTime> get createdAt => $composableBuilder( 3654 - column: $table.createdAt, 3655 - builder: (column) => ColumnFilters(column), 3656 - ); 3060 + ColumnFilters<DateTime> get createdAt => 3061 + $composableBuilder(column: $table.createdAt, builder: (column) => ColumnFilters(column)); 3657 3062 3658 - ColumnFilters<DateTime> get updatedAt => $composableBuilder( 3659 - column: $table.updatedAt, 3660 - builder: (column) => ColumnFilters(column), 3661 - ); 3063 + ColumnFilters<DateTime> get updatedAt => 3064 + $composableBuilder(column: $table.updatedAt, builder: (column) => ColumnFilters(column)); 3662 3065 } 3663 3066 3664 - class $$AccountsTableOrderingComposer 3665 - extends Composer<_$AppDatabase, $AccountsTable> { 3067 + class $$AccountsTableOrderingComposer extends Composer<_$AppDatabase, $AccountsTable> { 3666 3068 $$AccountsTableOrderingComposer({ 3667 3069 required super.$db, 3668 3070 required super.$table, ··· 3670 3072 super.$addJoinBuilderToRootComposer, 3671 3073 super.$removeJoinBuilderFromRootComposer, 3672 3074 }); 3673 - ColumnOrderings<String> get did => $composableBuilder( 3674 - column: $table.did, 3675 - builder: (column) => ColumnOrderings(column), 3676 - ); 3075 + ColumnOrderings<String> get did => 3076 + $composableBuilder(column: $table.did, builder: (column) => ColumnOrderings(column)); 3677 3077 3678 - ColumnOrderings<String> get handle => $composableBuilder( 3679 - column: $table.handle, 3680 - builder: (column) => ColumnOrderings(column), 3681 - ); 3078 + ColumnOrderings<String> get handle => 3079 + $composableBuilder(column: $table.handle, builder: (column) => ColumnOrderings(column)); 3682 3080 3683 - ColumnOrderings<String> get displayName => $composableBuilder( 3684 - column: $table.displayName, 3685 - builder: (column) => ColumnOrderings(column), 3686 - ); 3081 + ColumnOrderings<String> get displayName => 3082 + $composableBuilder(column: $table.displayName, builder: (column) => ColumnOrderings(column)); 3687 3083 3688 - ColumnOrderings<String> get service => $composableBuilder( 3689 - column: $table.service, 3690 - builder: (column) => ColumnOrderings(column), 3691 - ); 3084 + ColumnOrderings<String> get service => 3085 + $composableBuilder(column: $table.service, builder: (column) => ColumnOrderings(column)); 3692 3086 3693 - ColumnOrderings<String> get accessToken => $composableBuilder( 3694 - column: $table.accessToken, 3695 - builder: (column) => ColumnOrderings(column), 3696 - ); 3087 + ColumnOrderings<String> get accessToken => 3088 + $composableBuilder(column: $table.accessToken, builder: (column) => ColumnOrderings(column)); 3697 3089 3698 - ColumnOrderings<String> get refreshToken => $composableBuilder( 3699 - column: $table.refreshToken, 3700 - builder: (column) => ColumnOrderings(column), 3701 - ); 3090 + ColumnOrderings<String> get refreshToken => 3091 + $composableBuilder(column: $table.refreshToken, builder: (column) => ColumnOrderings(column)); 3702 3092 3703 - ColumnOrderings<String> get dpopPublicKey => $composableBuilder( 3704 - column: $table.dpopPublicKey, 3705 - builder: (column) => ColumnOrderings(column), 3706 - ); 3093 + ColumnOrderings<String> get dpopPublicKey => 3094 + $composableBuilder(column: $table.dpopPublicKey, builder: (column) => ColumnOrderings(column)); 3707 3095 3708 - ColumnOrderings<String> get dpopPrivateKey => $composableBuilder( 3709 - column: $table.dpopPrivateKey, 3710 - builder: (column) => ColumnOrderings(column), 3711 - ); 3096 + ColumnOrderings<String> get dpopPrivateKey => 3097 + $composableBuilder(column: $table.dpopPrivateKey, builder: (column) => ColumnOrderings(column)); 3712 3098 3713 - ColumnOrderings<String> get dpopNonce => $composableBuilder( 3714 - column: $table.dpopNonce, 3715 - builder: (column) => ColumnOrderings(column), 3716 - ); 3099 + ColumnOrderings<String> get dpopNonce => 3100 + $composableBuilder(column: $table.dpopNonce, builder: (column) => ColumnOrderings(column)); 3717 3101 3718 - ColumnOrderings<DateTime> get expiresAt => $composableBuilder( 3719 - column: $table.expiresAt, 3720 - builder: (column) => ColumnOrderings(column), 3721 - ); 3102 + ColumnOrderings<DateTime> get expiresAt => 3103 + $composableBuilder(column: $table.expiresAt, builder: (column) => ColumnOrderings(column)); 3722 3104 3723 - ColumnOrderings<DateTime> get createdAt => $composableBuilder( 3724 - column: $table.createdAt, 3725 - builder: (column) => ColumnOrderings(column), 3726 - ); 3105 + ColumnOrderings<DateTime> get createdAt => 3106 + $composableBuilder(column: $table.createdAt, builder: (column) => ColumnOrderings(column)); 3727 3107 3728 - ColumnOrderings<DateTime> get updatedAt => $composableBuilder( 3729 - column: $table.updatedAt, 3730 - builder: (column) => ColumnOrderings(column), 3731 - ); 3108 + ColumnOrderings<DateTime> get updatedAt => 3109 + $composableBuilder(column: $table.updatedAt, builder: (column) => ColumnOrderings(column)); 3732 3110 } 3733 3111 3734 - class $$AccountsTableAnnotationComposer 3735 - extends Composer<_$AppDatabase, $AccountsTable> { 3112 + class $$AccountsTableAnnotationComposer extends Composer<_$AppDatabase, $AccountsTable> { 3736 3113 $$AccountsTableAnnotationComposer({ 3737 3114 required super.$db, 3738 3115 required super.$table, ··· 3740 3117 super.$addJoinBuilderToRootComposer, 3741 3118 super.$removeJoinBuilderFromRootComposer, 3742 3119 }); 3743 - GeneratedColumn<String> get did => 3744 - $composableBuilder(column: $table.did, builder: (column) => column); 3120 + GeneratedColumn<String> get did => $composableBuilder(column: $table.did, builder: (column) => column); 3745 3121 3746 - GeneratedColumn<String> get handle => 3747 - $composableBuilder(column: $table.handle, builder: (column) => column); 3122 + GeneratedColumn<String> get handle => $composableBuilder(column: $table.handle, builder: (column) => column); 3748 3123 3749 - GeneratedColumn<String> get displayName => $composableBuilder( 3750 - column: $table.displayName, 3751 - builder: (column) => column, 3752 - ); 3124 + GeneratedColumn<String> get displayName => 3125 + $composableBuilder(column: $table.displayName, builder: (column) => column); 3753 3126 3754 - GeneratedColumn<String> get service => 3755 - $composableBuilder(column: $table.service, builder: (column) => column); 3127 + GeneratedColumn<String> get service => $composableBuilder(column: $table.service, builder: (column) => column); 3756 3128 3757 - GeneratedColumn<String> get accessToken => $composableBuilder( 3758 - column: $table.accessToken, 3759 - builder: (column) => column, 3760 - ); 3129 + GeneratedColumn<String> get accessToken => 3130 + $composableBuilder(column: $table.accessToken, builder: (column) => column); 3761 3131 3762 - GeneratedColumn<String> get refreshToken => $composableBuilder( 3763 - column: $table.refreshToken, 3764 - builder: (column) => column, 3765 - ); 3132 + GeneratedColumn<String> get refreshToken => 3133 + $composableBuilder(column: $table.refreshToken, builder: (column) => column); 3766 3134 3767 - GeneratedColumn<String> get dpopPublicKey => $composableBuilder( 3768 - column: $table.dpopPublicKey, 3769 - builder: (column) => column, 3770 - ); 3135 + GeneratedColumn<String> get dpopPublicKey => 3136 + $composableBuilder(column: $table.dpopPublicKey, builder: (column) => column); 3771 3137 3772 - GeneratedColumn<String> get dpopPrivateKey => $composableBuilder( 3773 - column: $table.dpopPrivateKey, 3774 - builder: (column) => column, 3775 - ); 3138 + GeneratedColumn<String> get dpopPrivateKey => 3139 + $composableBuilder(column: $table.dpopPrivateKey, builder: (column) => column); 3776 3140 3777 - GeneratedColumn<String> get dpopNonce => 3778 - $composableBuilder(column: $table.dpopNonce, builder: (column) => column); 3141 + GeneratedColumn<String> get dpopNonce => $composableBuilder(column: $table.dpopNonce, builder: (column) => column); 3779 3142 3780 - GeneratedColumn<DateTime> get expiresAt => 3781 - $composableBuilder(column: $table.expiresAt, builder: (column) => column); 3143 + GeneratedColumn<DateTime> get expiresAt => $composableBuilder(column: $table.expiresAt, builder: (column) => column); 3782 3144 3783 - GeneratedColumn<DateTime> get createdAt => 3784 - $composableBuilder(column: $table.createdAt, builder: (column) => column); 3145 + GeneratedColumn<DateTime> get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); 3785 3146 3786 - GeneratedColumn<DateTime> get updatedAt => 3787 - $composableBuilder(column: $table.updatedAt, builder: (column) => column); 3147 + GeneratedColumn<DateTime> get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); 3788 3148 } 3789 3149 3790 3150 class $$AccountsTableTableManager ··· 3807 3167 TableManagerState( 3808 3168 db: db, 3809 3169 table: table, 3810 - createFilteringComposer: () => 3811 - $$AccountsTableFilterComposer($db: db, $table: table), 3812 - createOrderingComposer: () => 3813 - $$AccountsTableOrderingComposer($db: db, $table: table), 3814 - createComputedFieldComposer: () => 3815 - $$AccountsTableAnnotationComposer($db: db, $table: table), 3170 + createFilteringComposer: () => $$AccountsTableFilterComposer($db: db, $table: table), 3171 + createOrderingComposer: () => $$AccountsTableOrderingComposer($db: db, $table: table), 3172 + createComputedFieldComposer: () => $$AccountsTableAnnotationComposer($db: db, $table: table), 3816 3173 updateCompanionCallback: 3817 3174 ({ 3818 3175 Value<String> did = const Value.absent(), ··· 3873 3230 updatedAt: updatedAt, 3874 3231 rowid: rowid, 3875 3232 ), 3876 - withReferenceMapper: (p0) => p0 3877 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) 3878 - .toList(), 3233 + withReferenceMapper: (p0) => p0.map((e) => (e.readTable(table), BaseReferences(db, table, e))).toList(), 3879 3234 prefetchHooksCallback: null, 3880 3235 ), 3881 3236 ); ··· 3912 3267 Value<int> rowid, 3913 3268 }); 3914 3269 3915 - class $$CachedProfilesTableFilterComposer 3916 - extends Composer<_$AppDatabase, $CachedProfilesTable> { 3270 + class $$CachedProfilesTableFilterComposer extends Composer<_$AppDatabase, $CachedProfilesTable> { 3917 3271 $$CachedProfilesTableFilterComposer({ 3918 3272 required super.$db, 3919 3273 required super.$table, ··· 3921 3275 super.$addJoinBuilderToRootComposer, 3922 3276 super.$removeJoinBuilderFromRootComposer, 3923 3277 }); 3924 - ColumnFilters<String> get did => $composableBuilder( 3925 - column: $table.did, 3926 - builder: (column) => ColumnFilters(column), 3927 - ); 3278 + ColumnFilters<String> get did => $composableBuilder(column: $table.did, builder: (column) => ColumnFilters(column)); 3928 3279 3929 - ColumnFilters<String> get handle => $composableBuilder( 3930 - column: $table.handle, 3931 - builder: (column) => ColumnFilters(column), 3932 - ); 3280 + ColumnFilters<String> get handle => 3281 + $composableBuilder(column: $table.handle, builder: (column) => ColumnFilters(column)); 3933 3282 3934 - ColumnFilters<String> get payload => $composableBuilder( 3935 - column: $table.payload, 3936 - builder: (column) => ColumnFilters(column), 3937 - ); 3283 + ColumnFilters<String> get payload => 3284 + $composableBuilder(column: $table.payload, builder: (column) => ColumnFilters(column)); 3938 3285 3939 - ColumnFilters<DateTime> get fetchedAt => $composableBuilder( 3940 - column: $table.fetchedAt, 3941 - builder: (column) => ColumnFilters(column), 3942 - ); 3286 + ColumnFilters<DateTime> get fetchedAt => 3287 + $composableBuilder(column: $table.fetchedAt, builder: (column) => ColumnFilters(column)); 3943 3288 } 3944 3289 3945 - class $$CachedProfilesTableOrderingComposer 3946 - extends Composer<_$AppDatabase, $CachedProfilesTable> { 3290 + class $$CachedProfilesTableOrderingComposer extends Composer<_$AppDatabase, $CachedProfilesTable> { 3947 3291 $$CachedProfilesTableOrderingComposer({ 3948 3292 required super.$db, 3949 3293 required super.$table, ··· 3951 3295 super.$addJoinBuilderToRootComposer, 3952 3296 super.$removeJoinBuilderFromRootComposer, 3953 3297 }); 3954 - ColumnOrderings<String> get did => $composableBuilder( 3955 - column: $table.did, 3956 - builder: (column) => ColumnOrderings(column), 3957 - ); 3298 + ColumnOrderings<String> get did => 3299 + $composableBuilder(column: $table.did, builder: (column) => ColumnOrderings(column)); 3958 3300 3959 - ColumnOrderings<String> get handle => $composableBuilder( 3960 - column: $table.handle, 3961 - builder: (column) => ColumnOrderings(column), 3962 - ); 3301 + ColumnOrderings<String> get handle => 3302 + $composableBuilder(column: $table.handle, builder: (column) => ColumnOrderings(column)); 3963 3303 3964 - ColumnOrderings<String> get payload => $composableBuilder( 3965 - column: $table.payload, 3966 - builder: (column) => ColumnOrderings(column), 3967 - ); 3304 + ColumnOrderings<String> get payload => 3305 + $composableBuilder(column: $table.payload, builder: (column) => ColumnOrderings(column)); 3968 3306 3969 - ColumnOrderings<DateTime> get fetchedAt => $composableBuilder( 3970 - column: $table.fetchedAt, 3971 - builder: (column) => ColumnOrderings(column), 3972 - ); 3307 + ColumnOrderings<DateTime> get fetchedAt => 3308 + $composableBuilder(column: $table.fetchedAt, builder: (column) => ColumnOrderings(column)); 3973 3309 } 3974 3310 3975 - class $$CachedProfilesTableAnnotationComposer 3976 - extends Composer<_$AppDatabase, $CachedProfilesTable> { 3311 + class $$CachedProfilesTableAnnotationComposer extends Composer<_$AppDatabase, $CachedProfilesTable> { 3977 3312 $$CachedProfilesTableAnnotationComposer({ 3978 3313 required super.$db, 3979 3314 required super.$table, ··· 3981 3316 super.$addJoinBuilderToRootComposer, 3982 3317 super.$removeJoinBuilderFromRootComposer, 3983 3318 }); 3984 - GeneratedColumn<String> get did => 3985 - $composableBuilder(column: $table.did, builder: (column) => column); 3319 + GeneratedColumn<String> get did => $composableBuilder(column: $table.did, builder: (column) => column); 3986 3320 3987 - GeneratedColumn<String> get handle => 3988 - $composableBuilder(column: $table.handle, builder: (column) => column); 3321 + GeneratedColumn<String> get handle => $composableBuilder(column: $table.handle, builder: (column) => column); 3989 3322 3990 - GeneratedColumn<String> get payload => 3991 - $composableBuilder(column: $table.payload, builder: (column) => column); 3323 + GeneratedColumn<String> get payload => $composableBuilder(column: $table.payload, builder: (column) => column); 3992 3324 3993 - GeneratedColumn<DateTime> get fetchedAt => 3994 - $composableBuilder(column: $table.fetchedAt, builder: (column) => column); 3325 + GeneratedColumn<DateTime> get fetchedAt => $composableBuilder(column: $table.fetchedAt, builder: (column) => column); 3995 3326 } 3996 3327 3997 3328 class $$CachedProfilesTableTableManager ··· 4005 3336 $$CachedProfilesTableAnnotationComposer, 4006 3337 $$CachedProfilesTableCreateCompanionBuilder, 4007 3338 $$CachedProfilesTableUpdateCompanionBuilder, 4008 - ( 4009 - CachedProfile, 4010 - BaseReferences<_$AppDatabase, $CachedProfilesTable, CachedProfile>, 4011 - ), 3339 + (CachedProfile, BaseReferences<_$AppDatabase, $CachedProfilesTable, CachedProfile>), 4012 3340 CachedProfile, 4013 3341 PrefetchHooks Function() 4014 3342 > { 4015 - $$CachedProfilesTableTableManager( 4016 - _$AppDatabase db, 4017 - $CachedProfilesTable table, 4018 - ) : super( 3343 + $$CachedProfilesTableTableManager(_$AppDatabase db, $CachedProfilesTable table) 3344 + : super( 4019 3345 TableManagerState( 4020 3346 db: db, 4021 3347 table: table, 4022 - createFilteringComposer: () => 4023 - $$CachedProfilesTableFilterComposer($db: db, $table: table), 4024 - createOrderingComposer: () => 4025 - $$CachedProfilesTableOrderingComposer($db: db, $table: table), 4026 - createComputedFieldComposer: () => 4027 - $$CachedProfilesTableAnnotationComposer($db: db, $table: table), 3348 + createFilteringComposer: () => $$CachedProfilesTableFilterComposer($db: db, $table: table), 3349 + createOrderingComposer: () => $$CachedProfilesTableOrderingComposer($db: db, $table: table), 3350 + createComputedFieldComposer: () => $$CachedProfilesTableAnnotationComposer($db: db, $table: table), 4028 3351 updateCompanionCallback: 4029 3352 ({ 4030 3353 Value<String> did = const Value.absent(), ··· 4053 3376 fetchedAt: fetchedAt, 4054 3377 rowid: rowid, 4055 3378 ), 4056 - withReferenceMapper: (p0) => p0 4057 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) 4058 - .toList(), 3379 + withReferenceMapper: (p0) => p0.map((e) => (e.readTable(table), BaseReferences(db, table, e))).toList(), 4059 3380 prefetchHooksCallback: null, 4060 3381 ), 4061 3382 ); ··· 4071 3392 $$CachedProfilesTableAnnotationComposer, 4072 3393 $$CachedProfilesTableCreateCompanionBuilder, 4073 3394 $$CachedProfilesTableUpdateCompanionBuilder, 4074 - ( 4075 - CachedProfile, 4076 - BaseReferences<_$AppDatabase, $CachedProfilesTable, CachedProfile>, 4077 - ), 3395 + (CachedProfile, BaseReferences<_$AppDatabase, $CachedProfilesTable, CachedProfile>), 4078 3396 CachedProfile, 4079 3397 PrefetchHooks Function() 4080 3398 >; ··· 4097 3415 Value<int> rowid, 4098 3416 }); 4099 3417 4100 - class $$CachedPostsTableFilterComposer 4101 - extends Composer<_$AppDatabase, $CachedPostsTable> { 3418 + class $$CachedPostsTableFilterComposer extends Composer<_$AppDatabase, $CachedPostsTable> { 4102 3419 $$CachedPostsTableFilterComposer({ 4103 3420 required super.$db, 4104 3421 required super.$table, ··· 4106 3423 super.$addJoinBuilderToRootComposer, 4107 3424 super.$removeJoinBuilderFromRootComposer, 4108 3425 }); 4109 - ColumnFilters<String> get uri => $composableBuilder( 4110 - column: $table.uri, 4111 - builder: (column) => ColumnFilters(column), 4112 - ); 3426 + ColumnFilters<String> get uri => $composableBuilder(column: $table.uri, builder: (column) => ColumnFilters(column)); 4113 3427 4114 - ColumnFilters<String> get authorDid => $composableBuilder( 4115 - column: $table.authorDid, 4116 - builder: (column) => ColumnFilters(column), 4117 - ); 3428 + ColumnFilters<String> get authorDid => 3429 + $composableBuilder(column: $table.authorDid, builder: (column) => ColumnFilters(column)); 4118 3430 4119 - ColumnFilters<String> get payload => $composableBuilder( 4120 - column: $table.payload, 4121 - builder: (column) => ColumnFilters(column), 4122 - ); 3431 + ColumnFilters<String> get payload => 3432 + $composableBuilder(column: $table.payload, builder: (column) => ColumnFilters(column)); 4123 3433 4124 - ColumnFilters<DateTime> get createdAt => $composableBuilder( 4125 - column: $table.createdAt, 4126 - builder: (column) => ColumnFilters(column), 4127 - ); 3434 + ColumnFilters<DateTime> get createdAt => 3435 + $composableBuilder(column: $table.createdAt, builder: (column) => ColumnFilters(column)); 4128 3436 4129 - ColumnFilters<DateTime> get fetchedAt => $composableBuilder( 4130 - column: $table.fetchedAt, 4131 - builder: (column) => ColumnFilters(column), 4132 - ); 3437 + ColumnFilters<DateTime> get fetchedAt => 3438 + $composableBuilder(column: $table.fetchedAt, builder: (column) => ColumnFilters(column)); 4133 3439 } 4134 3440 4135 - class $$CachedPostsTableOrderingComposer 4136 - extends Composer<_$AppDatabase, $CachedPostsTable> { 3441 + class $$CachedPostsTableOrderingComposer extends Composer<_$AppDatabase, $CachedPostsTable> { 4137 3442 $$CachedPostsTableOrderingComposer({ 4138 3443 required super.$db, 4139 3444 required super.$table, ··· 4141 3446 super.$addJoinBuilderToRootComposer, 4142 3447 super.$removeJoinBuilderFromRootComposer, 4143 3448 }); 4144 - ColumnOrderings<String> get uri => $composableBuilder( 4145 - column: $table.uri, 4146 - builder: (column) => ColumnOrderings(column), 4147 - ); 3449 + ColumnOrderings<String> get uri => 3450 + $composableBuilder(column: $table.uri, builder: (column) => ColumnOrderings(column)); 4148 3451 4149 - ColumnOrderings<String> get authorDid => $composableBuilder( 4150 - column: $table.authorDid, 4151 - builder: (column) => ColumnOrderings(column), 4152 - ); 3452 + ColumnOrderings<String> get authorDid => 3453 + $composableBuilder(column: $table.authorDid, builder: (column) => ColumnOrderings(column)); 4153 3454 4154 - ColumnOrderings<String> get payload => $composableBuilder( 4155 - column: $table.payload, 4156 - builder: (column) => ColumnOrderings(column), 4157 - ); 3455 + ColumnOrderings<String> get payload => 3456 + $composableBuilder(column: $table.payload, builder: (column) => ColumnOrderings(column)); 4158 3457 4159 - ColumnOrderings<DateTime> get createdAt => $composableBuilder( 4160 - column: $table.createdAt, 4161 - builder: (column) => ColumnOrderings(column), 4162 - ); 3458 + ColumnOrderings<DateTime> get createdAt => 3459 + $composableBuilder(column: $table.createdAt, builder: (column) => ColumnOrderings(column)); 4163 3460 4164 - ColumnOrderings<DateTime> get fetchedAt => $composableBuilder( 4165 - column: $table.fetchedAt, 4166 - builder: (column) => ColumnOrderings(column), 4167 - ); 3461 + ColumnOrderings<DateTime> get fetchedAt => 3462 + $composableBuilder(column: $table.fetchedAt, builder: (column) => ColumnOrderings(column)); 4168 3463 } 4169 3464 4170 - class $$CachedPostsTableAnnotationComposer 4171 - extends Composer<_$AppDatabase, $CachedPostsTable> { 3465 + class $$CachedPostsTableAnnotationComposer extends Composer<_$AppDatabase, $CachedPostsTable> { 4172 3466 $$CachedPostsTableAnnotationComposer({ 4173 3467 required super.$db, 4174 3468 required super.$table, ··· 4176 3470 super.$addJoinBuilderToRootComposer, 4177 3471 super.$removeJoinBuilderFromRootComposer, 4178 3472 }); 4179 - GeneratedColumn<String> get uri => 4180 - $composableBuilder(column: $table.uri, builder: (column) => column); 3473 + GeneratedColumn<String> get uri => $composableBuilder(column: $table.uri, builder: (column) => column); 4181 3474 4182 - GeneratedColumn<String> get authorDid => 4183 - $composableBuilder(column: $table.authorDid, builder: (column) => column); 3475 + GeneratedColumn<String> get authorDid => $composableBuilder(column: $table.authorDid, builder: (column) => column); 4184 3476 4185 - GeneratedColumn<String> get payload => 4186 - $composableBuilder(column: $table.payload, builder: (column) => column); 3477 + GeneratedColumn<String> get payload => $composableBuilder(column: $table.payload, builder: (column) => column); 4187 3478 4188 - GeneratedColumn<DateTime> get createdAt => 4189 - $composableBuilder(column: $table.createdAt, builder: (column) => column); 3479 + GeneratedColumn<DateTime> get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); 4190 3480 4191 - GeneratedColumn<DateTime> get fetchedAt => 4192 - $composableBuilder(column: $table.fetchedAt, builder: (column) => column); 3481 + GeneratedColumn<DateTime> get fetchedAt => $composableBuilder(column: $table.fetchedAt, builder: (column) => column); 4193 3482 } 4194 3483 4195 3484 class $$CachedPostsTableTableManager ··· 4203 3492 $$CachedPostsTableAnnotationComposer, 4204 3493 $$CachedPostsTableCreateCompanionBuilder, 4205 3494 $$CachedPostsTableUpdateCompanionBuilder, 4206 - ( 4207 - CachedPost, 4208 - BaseReferences<_$AppDatabase, $CachedPostsTable, CachedPost>, 4209 - ), 3495 + (CachedPost, BaseReferences<_$AppDatabase, $CachedPostsTable, CachedPost>), 4210 3496 CachedPost, 4211 3497 PrefetchHooks Function() 4212 3498 > { ··· 4215 3501 TableManagerState( 4216 3502 db: db, 4217 3503 table: table, 4218 - createFilteringComposer: () => 4219 - $$CachedPostsTableFilterComposer($db: db, $table: table), 4220 - createOrderingComposer: () => 4221 - $$CachedPostsTableOrderingComposer($db: db, $table: table), 4222 - createComputedFieldComposer: () => 4223 - $$CachedPostsTableAnnotationComposer($db: db, $table: table), 3504 + createFilteringComposer: () => $$CachedPostsTableFilterComposer($db: db, $table: table), 3505 + createOrderingComposer: () => $$CachedPostsTableOrderingComposer($db: db, $table: table), 3506 + createComputedFieldComposer: () => $$CachedPostsTableAnnotationComposer($db: db, $table: table), 4224 3507 updateCompanionCallback: 4225 3508 ({ 4226 3509 Value<String> uri = const Value.absent(), ··· 4253 3536 fetchedAt: fetchedAt, 4254 3537 rowid: rowid, 4255 3538 ), 4256 - withReferenceMapper: (p0) => p0 4257 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) 4258 - .toList(), 3539 + withReferenceMapper: (p0) => p0.map((e) => (e.readTable(table), BaseReferences(db, table, e))).toList(), 4259 3540 prefetchHooksCallback: null, 4260 3541 ), 4261 3542 ); ··· 4271 3552 $$CachedPostsTableAnnotationComposer, 4272 3553 $$CachedPostsTableCreateCompanionBuilder, 4273 3554 $$CachedPostsTableUpdateCompanionBuilder, 4274 - ( 4275 - CachedPost, 4276 - BaseReferences<_$AppDatabase, $CachedPostsTable, CachedPost>, 4277 - ), 3555 + (CachedPost, BaseReferences<_$AppDatabase, $CachedPostsTable, CachedPost>), 4278 3556 CachedPost, 4279 3557 PrefetchHooks Function() 4280 3558 >; ··· 4286 3564 Value<int> rowid, 4287 3565 }); 4288 3566 typedef $$SettingsTableUpdateCompanionBuilder = 4289 - SettingsCompanion Function({ 4290 - Value<String> key, 4291 - Value<String> value, 4292 - Value<DateTime> updatedAt, 4293 - Value<int> rowid, 4294 - }); 3567 + SettingsCompanion Function({Value<String> key, Value<String> value, Value<DateTime> updatedAt, Value<int> rowid}); 4295 3568 4296 - class $$SettingsTableFilterComposer 4297 - extends Composer<_$AppDatabase, $SettingsTable> { 3569 + class $$SettingsTableFilterComposer extends Composer<_$AppDatabase, $SettingsTable> { 4298 3570 $$SettingsTableFilterComposer({ 4299 3571 required super.$db, 4300 3572 required super.$table, ··· 4302 3574 super.$addJoinBuilderToRootComposer, 4303 3575 super.$removeJoinBuilderFromRootComposer, 4304 3576 }); 4305 - ColumnFilters<String> get key => $composableBuilder( 4306 - column: $table.key, 4307 - builder: (column) => ColumnFilters(column), 4308 - ); 3577 + ColumnFilters<String> get key => $composableBuilder(column: $table.key, builder: (column) => ColumnFilters(column)); 4309 3578 4310 - ColumnFilters<String> get value => $composableBuilder( 4311 - column: $table.value, 4312 - builder: (column) => ColumnFilters(column), 4313 - ); 3579 + ColumnFilters<String> get value => 3580 + $composableBuilder(column: $table.value, builder: (column) => ColumnFilters(column)); 4314 3581 4315 - ColumnFilters<DateTime> get updatedAt => $composableBuilder( 4316 - column: $table.updatedAt, 4317 - builder: (column) => ColumnFilters(column), 4318 - ); 3582 + ColumnFilters<DateTime> get updatedAt => 3583 + $composableBuilder(column: $table.updatedAt, builder: (column) => ColumnFilters(column)); 4319 3584 } 4320 3585 4321 - class $$SettingsTableOrderingComposer 4322 - extends Composer<_$AppDatabase, $SettingsTable> { 3586 + class $$SettingsTableOrderingComposer extends Composer<_$AppDatabase, $SettingsTable> { 4323 3587 $$SettingsTableOrderingComposer({ 4324 3588 required super.$db, 4325 3589 required super.$table, ··· 4327 3591 super.$addJoinBuilderToRootComposer, 4328 3592 super.$removeJoinBuilderFromRootComposer, 4329 3593 }); 4330 - ColumnOrderings<String> get key => $composableBuilder( 4331 - column: $table.key, 4332 - builder: (column) => ColumnOrderings(column), 4333 - ); 3594 + ColumnOrderings<String> get key => 3595 + $composableBuilder(column: $table.key, builder: (column) => ColumnOrderings(column)); 4334 3596 4335 - ColumnOrderings<String> get value => $composableBuilder( 4336 - column: $table.value, 4337 - builder: (column) => ColumnOrderings(column), 4338 - ); 3597 + ColumnOrderings<String> get value => 3598 + $composableBuilder(column: $table.value, builder: (column) => ColumnOrderings(column)); 4339 3599 4340 - ColumnOrderings<DateTime> get updatedAt => $composableBuilder( 4341 - column: $table.updatedAt, 4342 - builder: (column) => ColumnOrderings(column), 4343 - ); 3600 + ColumnOrderings<DateTime> get updatedAt => 3601 + $composableBuilder(column: $table.updatedAt, builder: (column) => ColumnOrderings(column)); 4344 3602 } 4345 3603 4346 - class $$SettingsTableAnnotationComposer 4347 - extends Composer<_$AppDatabase, $SettingsTable> { 3604 + class $$SettingsTableAnnotationComposer extends Composer<_$AppDatabase, $SettingsTable> { 4348 3605 $$SettingsTableAnnotationComposer({ 4349 3606 required super.$db, 4350 3607 required super.$table, ··· 4352 3609 super.$addJoinBuilderToRootComposer, 4353 3610 super.$removeJoinBuilderFromRootComposer, 4354 3611 }); 4355 - GeneratedColumn<String> get key => 4356 - $composableBuilder(column: $table.key, builder: (column) => column); 3612 + GeneratedColumn<String> get key => $composableBuilder(column: $table.key, builder: (column) => column); 4357 3613 4358 - GeneratedColumn<String> get value => 4359 - $composableBuilder(column: $table.value, builder: (column) => column); 3614 + GeneratedColumn<String> get value => $composableBuilder(column: $table.value, builder: (column) => column); 4360 3615 4361 - GeneratedColumn<DateTime> get updatedAt => 4362 - $composableBuilder(column: $table.updatedAt, builder: (column) => column); 3616 + GeneratedColumn<DateTime> get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); 4363 3617 } 4364 3618 4365 3619 class $$SettingsTableTableManager ··· 4373 3627 $$SettingsTableAnnotationComposer, 4374 3628 $$SettingsTableCreateCompanionBuilder, 4375 3629 $$SettingsTableUpdateCompanionBuilder, 4376 - ( 4377 - SettingsEntry, 4378 - BaseReferences<_$AppDatabase, $SettingsTable, SettingsEntry>, 4379 - ), 3630 + (SettingsEntry, BaseReferences<_$AppDatabase, $SettingsTable, SettingsEntry>), 4380 3631 SettingsEntry, 4381 3632 PrefetchHooks Function() 4382 3633 > { ··· 4385 3636 TableManagerState( 4386 3637 db: db, 4387 3638 table: table, 4388 - createFilteringComposer: () => 4389 - $$SettingsTableFilterComposer($db: db, $table: table), 4390 - createOrderingComposer: () => 4391 - $$SettingsTableOrderingComposer($db: db, $table: table), 4392 - createComputedFieldComposer: () => 4393 - $$SettingsTableAnnotationComposer($db: db, $table: table), 3639 + createFilteringComposer: () => $$SettingsTableFilterComposer($db: db, $table: table), 3640 + createOrderingComposer: () => $$SettingsTableOrderingComposer($db: db, $table: table), 3641 + createComputedFieldComposer: () => $$SettingsTableAnnotationComposer($db: db, $table: table), 4394 3642 updateCompanionCallback: 4395 3643 ({ 4396 3644 Value<String> key = const Value.absent(), 4397 3645 Value<String> value = const Value.absent(), 4398 3646 Value<DateTime> updatedAt = const Value.absent(), 4399 3647 Value<int> rowid = const Value.absent(), 4400 - }) => SettingsCompanion( 4401 - key: key, 4402 - value: value, 4403 - updatedAt: updatedAt, 4404 - rowid: rowid, 4405 - ), 3648 + }) => SettingsCompanion(key: key, value: value, updatedAt: updatedAt, rowid: rowid), 4406 3649 createCompanionCallback: 4407 3650 ({ 4408 3651 required String key, 4409 3652 required String value, 4410 3653 Value<DateTime> updatedAt = const Value.absent(), 4411 3654 Value<int> rowid = const Value.absent(), 4412 - }) => SettingsCompanion.insert( 4413 - key: key, 4414 - value: value, 4415 - updatedAt: updatedAt, 4416 - rowid: rowid, 4417 - ), 4418 - withReferenceMapper: (p0) => p0 4419 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) 4420 - .toList(), 3655 + }) => SettingsCompanion.insert(key: key, value: value, updatedAt: updatedAt, rowid: rowid), 3656 + withReferenceMapper: (p0) => p0.map((e) => (e.readTable(table), BaseReferences(db, table, e))).toList(), 4421 3657 prefetchHooksCallback: null, 4422 3658 ), 4423 3659 ); ··· 4433 3669 $$SettingsTableAnnotationComposer, 4434 3670 $$SettingsTableCreateCompanionBuilder, 4435 3671 $$SettingsTableUpdateCompanionBuilder, 4436 - ( 4437 - SettingsEntry, 4438 - BaseReferences<_$AppDatabase, $SettingsTable, SettingsEntry>, 4439 - ), 3672 + (SettingsEntry, BaseReferences<_$AppDatabase, $SettingsTable, SettingsEntry>), 4440 3673 SettingsEntry, 4441 3674 PrefetchHooks Function() 4442 3675 >; ··· 4463 3696 Value<int> rowid, 4464 3697 }); 4465 3698 4466 - class $$SavedFeedsTableFilterComposer 4467 - extends Composer<_$AppDatabase, $SavedFeedsTable> { 3699 + class $$SavedFeedsTableFilterComposer extends Composer<_$AppDatabase, $SavedFeedsTable> { 4468 3700 $$SavedFeedsTableFilterComposer({ 4469 3701 required super.$db, 4470 3702 required super.$table, ··· 4472 3704 super.$addJoinBuilderToRootComposer, 4473 3705 super.$removeJoinBuilderFromRootComposer, 4474 3706 }); 4475 - ColumnFilters<String> get id => $composableBuilder( 4476 - column: $table.id, 4477 - builder: (column) => ColumnFilters(column), 4478 - ); 3707 + ColumnFilters<String> get id => $composableBuilder(column: $table.id, builder: (column) => ColumnFilters(column)); 4479 3708 4480 - ColumnFilters<String> get accountDid => $composableBuilder( 4481 - column: $table.accountDid, 4482 - builder: (column) => ColumnFilters(column), 4483 - ); 3709 + ColumnFilters<String> get accountDid => 3710 + $composableBuilder(column: $table.accountDid, builder: (column) => ColumnFilters(column)); 4484 3711 4485 - ColumnFilters<String> get type => $composableBuilder( 4486 - column: $table.type, 4487 - builder: (column) => ColumnFilters(column), 4488 - ); 3712 + ColumnFilters<String> get type => $composableBuilder(column: $table.type, builder: (column) => ColumnFilters(column)); 4489 3713 4490 - ColumnFilters<String> get value => $composableBuilder( 4491 - column: $table.value, 4492 - builder: (column) => ColumnFilters(column), 4493 - ); 3714 + ColumnFilters<String> get value => 3715 + $composableBuilder(column: $table.value, builder: (column) => ColumnFilters(column)); 4494 3716 4495 - ColumnFilters<bool> get pinned => $composableBuilder( 4496 - column: $table.pinned, 4497 - builder: (column) => ColumnFilters(column), 4498 - ); 3717 + ColumnFilters<bool> get pinned => 3718 + $composableBuilder(column: $table.pinned, builder: (column) => ColumnFilters(column)); 4499 3719 4500 - ColumnFilters<int> get sortOrder => $composableBuilder( 4501 - column: $table.sortOrder, 4502 - builder: (column) => ColumnFilters(column), 4503 - ); 3720 + ColumnFilters<int> get sortOrder => 3721 + $composableBuilder(column: $table.sortOrder, builder: (column) => ColumnFilters(column)); 4504 3722 4505 - ColumnFilters<DateTime> get updatedAt => $composableBuilder( 4506 - column: $table.updatedAt, 4507 - builder: (column) => ColumnFilters(column), 4508 - ); 3723 + ColumnFilters<DateTime> get updatedAt => 3724 + $composableBuilder(column: $table.updatedAt, builder: (column) => ColumnFilters(column)); 4509 3725 } 4510 3726 4511 - class $$SavedFeedsTableOrderingComposer 4512 - extends Composer<_$AppDatabase, $SavedFeedsTable> { 3727 + class $$SavedFeedsTableOrderingComposer extends Composer<_$AppDatabase, $SavedFeedsTable> { 4513 3728 $$SavedFeedsTableOrderingComposer({ 4514 3729 required super.$db, 4515 3730 required super.$table, ··· 4517 3732 super.$addJoinBuilderToRootComposer, 4518 3733 super.$removeJoinBuilderFromRootComposer, 4519 3734 }); 4520 - ColumnOrderings<String> get id => $composableBuilder( 4521 - column: $table.id, 4522 - builder: (column) => ColumnOrderings(column), 4523 - ); 3735 + ColumnOrderings<String> get id => $composableBuilder(column: $table.id, builder: (column) => ColumnOrderings(column)); 4524 3736 4525 - ColumnOrderings<String> get accountDid => $composableBuilder( 4526 - column: $table.accountDid, 4527 - builder: (column) => ColumnOrderings(column), 4528 - ); 3737 + ColumnOrderings<String> get accountDid => 3738 + $composableBuilder(column: $table.accountDid, builder: (column) => ColumnOrderings(column)); 4529 3739 4530 - ColumnOrderings<String> get type => $composableBuilder( 4531 - column: $table.type, 4532 - builder: (column) => ColumnOrderings(column), 4533 - ); 3740 + ColumnOrderings<String> get type => 3741 + $composableBuilder(column: $table.type, builder: (column) => ColumnOrderings(column)); 4534 3742 4535 - ColumnOrderings<String> get value => $composableBuilder( 4536 - column: $table.value, 4537 - builder: (column) => ColumnOrderings(column), 4538 - ); 3743 + ColumnOrderings<String> get value => 3744 + $composableBuilder(column: $table.value, builder: (column) => ColumnOrderings(column)); 4539 3745 4540 - ColumnOrderings<bool> get pinned => $composableBuilder( 4541 - column: $table.pinned, 4542 - builder: (column) => ColumnOrderings(column), 4543 - ); 3746 + ColumnOrderings<bool> get pinned => 3747 + $composableBuilder(column: $table.pinned, builder: (column) => ColumnOrderings(column)); 4544 3748 4545 - ColumnOrderings<int> get sortOrder => $composableBuilder( 4546 - column: $table.sortOrder, 4547 - builder: (column) => ColumnOrderings(column), 4548 - ); 3749 + ColumnOrderings<int> get sortOrder => 3750 + $composableBuilder(column: $table.sortOrder, builder: (column) => ColumnOrderings(column)); 4549 3751 4550 - ColumnOrderings<DateTime> get updatedAt => $composableBuilder( 4551 - column: $table.updatedAt, 4552 - builder: (column) => ColumnOrderings(column), 4553 - ); 3752 + ColumnOrderings<DateTime> get updatedAt => 3753 + $composableBuilder(column: $table.updatedAt, builder: (column) => ColumnOrderings(column)); 4554 3754 } 4555 3755 4556 - class $$SavedFeedsTableAnnotationComposer 4557 - extends Composer<_$AppDatabase, $SavedFeedsTable> { 3756 + class $$SavedFeedsTableAnnotationComposer extends Composer<_$AppDatabase, $SavedFeedsTable> { 4558 3757 $$SavedFeedsTableAnnotationComposer({ 4559 3758 required super.$db, 4560 3759 required super.$table, ··· 4562 3761 super.$addJoinBuilderToRootComposer, 4563 3762 super.$removeJoinBuilderFromRootComposer, 4564 3763 }); 4565 - GeneratedColumn<String> get id => 4566 - $composableBuilder(column: $table.id, builder: (column) => column); 3764 + GeneratedColumn<String> get id => $composableBuilder(column: $table.id, builder: (column) => column); 4567 3765 4568 - GeneratedColumn<String> get accountDid => $composableBuilder( 4569 - column: $table.accountDid, 4570 - builder: (column) => column, 4571 - ); 3766 + GeneratedColumn<String> get accountDid => $composableBuilder(column: $table.accountDid, builder: (column) => column); 4572 3767 4573 - GeneratedColumn<String> get type => 4574 - $composableBuilder(column: $table.type, builder: (column) => column); 3768 + GeneratedColumn<String> get type => $composableBuilder(column: $table.type, builder: (column) => column); 4575 3769 4576 - GeneratedColumn<String> get value => 4577 - $composableBuilder(column: $table.value, builder: (column) => column); 3770 + GeneratedColumn<String> get value => $composableBuilder(column: $table.value, builder: (column) => column); 4578 3771 4579 - GeneratedColumn<bool> get pinned => 4580 - $composableBuilder(column: $table.pinned, builder: (column) => column); 3772 + GeneratedColumn<bool> get pinned => $composableBuilder(column: $table.pinned, builder: (column) => column); 4581 3773 4582 - GeneratedColumn<int> get sortOrder => 4583 - $composableBuilder(column: $table.sortOrder, builder: (column) => column); 3774 + GeneratedColumn<int> get sortOrder => $composableBuilder(column: $table.sortOrder, builder: (column) => column); 4584 3775 4585 - GeneratedColumn<DateTime> get updatedAt => 4586 - $composableBuilder(column: $table.updatedAt, builder: (column) => column); 3776 + GeneratedColumn<DateTime> get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); 4587 3777 } 4588 3778 4589 3779 class $$SavedFeedsTableTableManager ··· 4597 3787 $$SavedFeedsTableAnnotationComposer, 4598 3788 $$SavedFeedsTableCreateCompanionBuilder, 4599 3789 $$SavedFeedsTableUpdateCompanionBuilder, 4600 - ( 4601 - SavedFeedEntry, 4602 - BaseReferences<_$AppDatabase, $SavedFeedsTable, SavedFeedEntry>, 4603 - ), 3790 + (SavedFeedEntry, BaseReferences<_$AppDatabase, $SavedFeedsTable, SavedFeedEntry>), 4604 3791 SavedFeedEntry, 4605 3792 PrefetchHooks Function() 4606 3793 > { ··· 4609 3796 TableManagerState( 4610 3797 db: db, 4611 3798 table: table, 4612 - createFilteringComposer: () => 4613 - $$SavedFeedsTableFilterComposer($db: db, $table: table), 4614 - createOrderingComposer: () => 4615 - $$SavedFeedsTableOrderingComposer($db: db, $table: table), 4616 - createComputedFieldComposer: () => 4617 - $$SavedFeedsTableAnnotationComposer($db: db, $table: table), 3799 + createFilteringComposer: () => $$SavedFeedsTableFilterComposer($db: db, $table: table), 3800 + createOrderingComposer: () => $$SavedFeedsTableOrderingComposer($db: db, $table: table), 3801 + createComputedFieldComposer: () => $$SavedFeedsTableAnnotationComposer($db: db, $table: table), 4618 3802 updateCompanionCallback: 4619 3803 ({ 4620 3804 Value<String> id = const Value.absent(), ··· 4655 3839 updatedAt: updatedAt, 4656 3840 rowid: rowid, 4657 3841 ), 4658 - withReferenceMapper: (p0) => p0 4659 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) 4660 - .toList(), 3842 + withReferenceMapper: (p0) => p0.map((e) => (e.readTable(table), BaseReferences(db, table, e))).toList(), 4661 3843 prefetchHooksCallback: null, 4662 3844 ), 4663 3845 ); ··· 4673 3855 $$SavedFeedsTableAnnotationComposer, 4674 3856 $$SavedFeedsTableCreateCompanionBuilder, 4675 3857 $$SavedFeedsTableUpdateCompanionBuilder, 4676 - ( 4677 - SavedFeedEntry, 4678 - BaseReferences<_$AppDatabase, $SavedFeedsTable, SavedFeedEntry>, 4679 - ), 3858 + (SavedFeedEntry, BaseReferences<_$AppDatabase, $SavedFeedsTable, SavedFeedEntry>), 4680 3859 SavedFeedEntry, 4681 3860 PrefetchHooks Function() 4682 3861 >; ··· 4697 3876 Value<String> accountDid, 4698 3877 }); 4699 3878 4700 - class $$SearchHistoryTableFilterComposer 4701 - extends Composer<_$AppDatabase, $SearchHistoryTable> { 3879 + class $$SearchHistoryTableFilterComposer extends Composer<_$AppDatabase, $SearchHistoryTable> { 4702 3880 $$SearchHistoryTableFilterComposer({ 4703 3881 required super.$db, 4704 3882 required super.$table, ··· 4706 3884 super.$addJoinBuilderToRootComposer, 4707 3885 super.$removeJoinBuilderFromRootComposer, 4708 3886 }); 4709 - ColumnFilters<int> get id => $composableBuilder( 4710 - column: $table.id, 4711 - builder: (column) => ColumnFilters(column), 4712 - ); 3887 + ColumnFilters<int> get id => $composableBuilder(column: $table.id, builder: (column) => ColumnFilters(column)); 4713 3888 4714 - ColumnFilters<String> get query => $composableBuilder( 4715 - column: $table.query, 4716 - builder: (column) => ColumnFilters(column), 4717 - ); 3889 + ColumnFilters<String> get query => 3890 + $composableBuilder(column: $table.query, builder: (column) => ColumnFilters(column)); 4718 3891 4719 - ColumnFilters<String> get type => $composableBuilder( 4720 - column: $table.type, 4721 - builder: (column) => ColumnFilters(column), 4722 - ); 3892 + ColumnFilters<String> get type => $composableBuilder(column: $table.type, builder: (column) => ColumnFilters(column)); 4723 3893 4724 - ColumnFilters<DateTime> get searchedAt => $composableBuilder( 4725 - column: $table.searchedAt, 4726 - builder: (column) => ColumnFilters(column), 4727 - ); 3894 + ColumnFilters<DateTime> get searchedAt => 3895 + $composableBuilder(column: $table.searchedAt, builder: (column) => ColumnFilters(column)); 4728 3896 4729 - ColumnFilters<String> get accountDid => $composableBuilder( 4730 - column: $table.accountDid, 4731 - builder: (column) => ColumnFilters(column), 4732 - ); 3897 + ColumnFilters<String> get accountDid => 3898 + $composableBuilder(column: $table.accountDid, builder: (column) => ColumnFilters(column)); 4733 3899 } 4734 3900 4735 - class $$SearchHistoryTableOrderingComposer 4736 - extends Composer<_$AppDatabase, $SearchHistoryTable> { 3901 + class $$SearchHistoryTableOrderingComposer extends Composer<_$AppDatabase, $SearchHistoryTable> { 4737 3902 $$SearchHistoryTableOrderingComposer({ 4738 3903 required super.$db, 4739 3904 required super.$table, ··· 4741 3906 super.$addJoinBuilderToRootComposer, 4742 3907 super.$removeJoinBuilderFromRootComposer, 4743 3908 }); 4744 - ColumnOrderings<int> get id => $composableBuilder( 4745 - column: $table.id, 4746 - builder: (column) => ColumnOrderings(column), 4747 - ); 3909 + ColumnOrderings<int> get id => $composableBuilder(column: $table.id, builder: (column) => ColumnOrderings(column)); 4748 3910 4749 - ColumnOrderings<String> get query => $composableBuilder( 4750 - column: $table.query, 4751 - builder: (column) => ColumnOrderings(column), 4752 - ); 3911 + ColumnOrderings<String> get query => 3912 + $composableBuilder(column: $table.query, builder: (column) => ColumnOrderings(column)); 4753 3913 4754 - ColumnOrderings<String> get type => $composableBuilder( 4755 - column: $table.type, 4756 - builder: (column) => ColumnOrderings(column), 4757 - ); 3914 + ColumnOrderings<String> get type => 3915 + $composableBuilder(column: $table.type, builder: (column) => ColumnOrderings(column)); 4758 3916 4759 - ColumnOrderings<DateTime> get searchedAt => $composableBuilder( 4760 - column: $table.searchedAt, 4761 - builder: (column) => ColumnOrderings(column), 4762 - ); 3917 + ColumnOrderings<DateTime> get searchedAt => 3918 + $composableBuilder(column: $table.searchedAt, builder: (column) => ColumnOrderings(column)); 4763 3919 4764 - ColumnOrderings<String> get accountDid => $composableBuilder( 4765 - column: $table.accountDid, 4766 - builder: (column) => ColumnOrderings(column), 4767 - ); 3920 + ColumnOrderings<String> get accountDid => 3921 + $composableBuilder(column: $table.accountDid, builder: (column) => ColumnOrderings(column)); 4768 3922 } 4769 3923 4770 - class $$SearchHistoryTableAnnotationComposer 4771 - extends Composer<_$AppDatabase, $SearchHistoryTable> { 3924 + class $$SearchHistoryTableAnnotationComposer extends Composer<_$AppDatabase, $SearchHistoryTable> { 4772 3925 $$SearchHistoryTableAnnotationComposer({ 4773 3926 required super.$db, 4774 3927 required super.$table, ··· 4776 3929 super.$addJoinBuilderToRootComposer, 4777 3930 super.$removeJoinBuilderFromRootComposer, 4778 3931 }); 4779 - GeneratedColumn<int> get id => 4780 - $composableBuilder(column: $table.id, builder: (column) => column); 3932 + GeneratedColumn<int> get id => $composableBuilder(column: $table.id, builder: (column) => column); 4781 3933 4782 - GeneratedColumn<String> get query => 4783 - $composableBuilder(column: $table.query, builder: (column) => column); 3934 + GeneratedColumn<String> get query => $composableBuilder(column: $table.query, builder: (column) => column); 4784 3935 4785 - GeneratedColumn<String> get type => 4786 - $composableBuilder(column: $table.type, builder: (column) => column); 3936 + GeneratedColumn<String> get type => $composableBuilder(column: $table.type, builder: (column) => column); 4787 3937 4788 - GeneratedColumn<DateTime> get searchedAt => $composableBuilder( 4789 - column: $table.searchedAt, 4790 - builder: (column) => column, 4791 - ); 3938 + GeneratedColumn<DateTime> get searchedAt => 3939 + $composableBuilder(column: $table.searchedAt, builder: (column) => column); 4792 3940 4793 - GeneratedColumn<String> get accountDid => $composableBuilder( 4794 - column: $table.accountDid, 4795 - builder: (column) => column, 4796 - ); 3941 + GeneratedColumn<String> get accountDid => $composableBuilder(column: $table.accountDid, builder: (column) => column); 4797 3942 } 4798 3943 4799 3944 class $$SearchHistoryTableTableManager ··· 4807 3952 $$SearchHistoryTableAnnotationComposer, 4808 3953 $$SearchHistoryTableCreateCompanionBuilder, 4809 3954 $$SearchHistoryTableUpdateCompanionBuilder, 4810 - ( 4811 - SearchHistoryEntry, 4812 - BaseReferences< 4813 - _$AppDatabase, 4814 - $SearchHistoryTable, 4815 - SearchHistoryEntry 4816 - >, 4817 - ), 3955 + (SearchHistoryEntry, BaseReferences<_$AppDatabase, $SearchHistoryTable, SearchHistoryEntry>), 4818 3956 SearchHistoryEntry, 4819 3957 PrefetchHooks Function() 4820 3958 > { ··· 4823 3961 TableManagerState( 4824 3962 db: db, 4825 3963 table: table, 4826 - createFilteringComposer: () => 4827 - $$SearchHistoryTableFilterComposer($db: db, $table: table), 4828 - createOrderingComposer: () => 4829 - $$SearchHistoryTableOrderingComposer($db: db, $table: table), 4830 - createComputedFieldComposer: () => 4831 - $$SearchHistoryTableAnnotationComposer($db: db, $table: table), 3964 + createFilteringComposer: () => $$SearchHistoryTableFilterComposer($db: db, $table: table), 3965 + createOrderingComposer: () => $$SearchHistoryTableOrderingComposer($db: db, $table: table), 3966 + createComputedFieldComposer: () => $$SearchHistoryTableAnnotationComposer($db: db, $table: table), 4832 3967 updateCompanionCallback: 4833 3968 ({ 4834 3969 Value<int> id = const Value.absent(), ··· 4857 3992 searchedAt: searchedAt, 4858 3993 accountDid: accountDid, 4859 3994 ), 4860 - withReferenceMapper: (p0) => p0 4861 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) 4862 - .toList(), 3995 + withReferenceMapper: (p0) => p0.map((e) => (e.readTable(table), BaseReferences(db, table, e))).toList(), 4863 3996 prefetchHooksCallback: null, 4864 3997 ), 4865 3998 ); ··· 4875 4008 $$SearchHistoryTableAnnotationComposer, 4876 4009 $$SearchHistoryTableCreateCompanionBuilder, 4877 4010 $$SearchHistoryTableUpdateCompanionBuilder, 4878 - ( 4879 - SearchHistoryEntry, 4880 - BaseReferences<_$AppDatabase, $SearchHistoryTable, SearchHistoryEntry>, 4881 - ), 4011 + (SearchHistoryEntry, BaseReferences<_$AppDatabase, $SearchHistoryTable, SearchHistoryEntry>), 4882 4012 SearchHistoryEntry, 4883 4013 PrefetchHooks Function() 4884 4014 >; ··· 4913 4043 Value<DateTime?> scheduledAt, 4914 4044 }); 4915 4045 4916 - class $$DraftsTableFilterComposer 4917 - extends Composer<_$AppDatabase, $DraftsTable> { 4046 + class $$DraftsTableFilterComposer extends Composer<_$AppDatabase, $DraftsTable> { 4918 4047 $$DraftsTableFilterComposer({ 4919 4048 required super.$db, 4920 4049 required super.$table, ··· 4922 4051 super.$addJoinBuilderToRootComposer, 4923 4052 super.$removeJoinBuilderFromRootComposer, 4924 4053 }); 4925 - ColumnFilters<int> get id => $composableBuilder( 4926 - column: $table.id, 4927 - builder: (column) => ColumnFilters(column), 4928 - ); 4054 + ColumnFilters<int> get id => $composableBuilder(column: $table.id, builder: (column) => ColumnFilters(column)); 4929 4055 4930 - ColumnFilters<String> get accountDid => $composableBuilder( 4931 - column: $table.accountDid, 4932 - builder: (column) => ColumnFilters(column), 4933 - ); 4056 + ColumnFilters<String> get accountDid => 4057 + $composableBuilder(column: $table.accountDid, builder: (column) => ColumnFilters(column)); 4934 4058 4935 - ColumnFilters<String> get content => $composableBuilder( 4936 - column: $table.content, 4937 - builder: (column) => ColumnFilters(column), 4938 - ); 4059 + ColumnFilters<String> get content => 4060 + $composableBuilder(column: $table.content, builder: (column) => ColumnFilters(column)); 4939 4061 4940 - ColumnFilters<String> get replyUri => $composableBuilder( 4941 - column: $table.replyUri, 4942 - builder: (column) => ColumnFilters(column), 4943 - ); 4062 + ColumnFilters<String> get replyUri => 4063 + $composableBuilder(column: $table.replyUri, builder: (column) => ColumnFilters(column)); 4944 4064 4945 - ColumnFilters<String> get replyCid => $composableBuilder( 4946 - column: $table.replyCid, 4947 - builder: (column) => ColumnFilters(column), 4948 - ); 4065 + ColumnFilters<String> get replyCid => 4066 + $composableBuilder(column: $table.replyCid, builder: (column) => ColumnFilters(column)); 4949 4067 4950 - ColumnFilters<String> get rootUri => $composableBuilder( 4951 - column: $table.rootUri, 4952 - builder: (column) => ColumnFilters(column), 4953 - ); 4068 + ColumnFilters<String> get rootUri => 4069 + $composableBuilder(column: $table.rootUri, builder: (column) => ColumnFilters(column)); 4954 4070 4955 - ColumnFilters<String> get rootCid => $composableBuilder( 4956 - column: $table.rootCid, 4957 - builder: (column) => ColumnFilters(column), 4958 - ); 4071 + ColumnFilters<String> get rootCid => 4072 + $composableBuilder(column: $table.rootCid, builder: (column) => ColumnFilters(column)); 4959 4073 4960 - ColumnFilters<String> get embedJson => $composableBuilder( 4961 - column: $table.embedJson, 4962 - builder: (column) => ColumnFilters(column), 4963 - ); 4074 + ColumnFilters<String> get embedJson => 4075 + $composableBuilder(column: $table.embedJson, builder: (column) => ColumnFilters(column)); 4964 4076 4965 - ColumnFilters<String> get mediaPaths => $composableBuilder( 4966 - column: $table.mediaPaths, 4967 - builder: (column) => ColumnFilters(column), 4968 - ); 4077 + ColumnFilters<String> get mediaPaths => 4078 + $composableBuilder(column: $table.mediaPaths, builder: (column) => ColumnFilters(column)); 4969 4079 4970 - ColumnFilters<DateTime> get createdAt => $composableBuilder( 4971 - column: $table.createdAt, 4972 - builder: (column) => ColumnFilters(column), 4973 - ); 4080 + ColumnFilters<DateTime> get createdAt => 4081 + $composableBuilder(column: $table.createdAt, builder: (column) => ColumnFilters(column)); 4974 4082 4975 - ColumnFilters<DateTime> get updatedAt => $composableBuilder( 4976 - column: $table.updatedAt, 4977 - builder: (column) => ColumnFilters(column), 4978 - ); 4083 + ColumnFilters<DateTime> get updatedAt => 4084 + $composableBuilder(column: $table.updatedAt, builder: (column) => ColumnFilters(column)); 4979 4085 4980 - ColumnFilters<DateTime> get scheduledAt => $composableBuilder( 4981 - column: $table.scheduledAt, 4982 - builder: (column) => ColumnFilters(column), 4983 - ); 4086 + ColumnFilters<DateTime> get scheduledAt => 4087 + $composableBuilder(column: $table.scheduledAt, builder: (column) => ColumnFilters(column)); 4984 4088 } 4985 4089 4986 - class $$DraftsTableOrderingComposer 4987 - extends Composer<_$AppDatabase, $DraftsTable> { 4090 + class $$DraftsTableOrderingComposer extends Composer<_$AppDatabase, $DraftsTable> { 4988 4091 $$DraftsTableOrderingComposer({ 4989 4092 required super.$db, 4990 4093 required super.$table, ··· 4992 4095 super.$addJoinBuilderToRootComposer, 4993 4096 super.$removeJoinBuilderFromRootComposer, 4994 4097 }); 4995 - ColumnOrderings<int> get id => $composableBuilder( 4996 - column: $table.id, 4997 - builder: (column) => ColumnOrderings(column), 4998 - ); 4098 + ColumnOrderings<int> get id => $composableBuilder(column: $table.id, builder: (column) => ColumnOrderings(column)); 4999 4099 5000 - ColumnOrderings<String> get accountDid => $composableBuilder( 5001 - column: $table.accountDid, 5002 - builder: (column) => ColumnOrderings(column), 5003 - ); 4100 + ColumnOrderings<String> get accountDid => 4101 + $composableBuilder(column: $table.accountDid, builder: (column) => ColumnOrderings(column)); 5004 4102 5005 - ColumnOrderings<String> get content => $composableBuilder( 5006 - column: $table.content, 5007 - builder: (column) => ColumnOrderings(column), 5008 - ); 4103 + ColumnOrderings<String> get content => 4104 + $composableBuilder(column: $table.content, builder: (column) => ColumnOrderings(column)); 5009 4105 5010 - ColumnOrderings<String> get replyUri => $composableBuilder( 5011 - column: $table.replyUri, 5012 - builder: (column) => ColumnOrderings(column), 5013 - ); 4106 + ColumnOrderings<String> get replyUri => 4107 + $composableBuilder(column: $table.replyUri, builder: (column) => ColumnOrderings(column)); 5014 4108 5015 - ColumnOrderings<String> get replyCid => $composableBuilder( 5016 - column: $table.replyCid, 5017 - builder: (column) => ColumnOrderings(column), 5018 - ); 4109 + ColumnOrderings<String> get replyCid => 4110 + $composableBuilder(column: $table.replyCid, builder: (column) => ColumnOrderings(column)); 5019 4111 5020 - ColumnOrderings<String> get rootUri => $composableBuilder( 5021 - column: $table.rootUri, 5022 - builder: (column) => ColumnOrderings(column), 5023 - ); 4112 + ColumnOrderings<String> get rootUri => 4113 + $composableBuilder(column: $table.rootUri, builder: (column) => ColumnOrderings(column)); 5024 4114 5025 - ColumnOrderings<String> get rootCid => $composableBuilder( 5026 - column: $table.rootCid, 5027 - builder: (column) => ColumnOrderings(column), 5028 - ); 4115 + ColumnOrderings<String> get rootCid => 4116 + $composableBuilder(column: $table.rootCid, builder: (column) => ColumnOrderings(column)); 5029 4117 5030 - ColumnOrderings<String> get embedJson => $composableBuilder( 5031 - column: $table.embedJson, 5032 - builder: (column) => ColumnOrderings(column), 5033 - ); 4118 + ColumnOrderings<String> get embedJson => 4119 + $composableBuilder(column: $table.embedJson, builder: (column) => ColumnOrderings(column)); 5034 4120 5035 - ColumnOrderings<String> get mediaPaths => $composableBuilder( 5036 - column: $table.mediaPaths, 5037 - builder: (column) => ColumnOrderings(column), 5038 - ); 4121 + ColumnOrderings<String> get mediaPaths => 4122 + $composableBuilder(column: $table.mediaPaths, builder: (column) => ColumnOrderings(column)); 5039 4123 5040 - ColumnOrderings<DateTime> get createdAt => $composableBuilder( 5041 - column: $table.createdAt, 5042 - builder: (column) => ColumnOrderings(column), 5043 - ); 4124 + ColumnOrderings<DateTime> get createdAt => 4125 + $composableBuilder(column: $table.createdAt, builder: (column) => ColumnOrderings(column)); 5044 4126 5045 - ColumnOrderings<DateTime> get updatedAt => $composableBuilder( 5046 - column: $table.updatedAt, 5047 - builder: (column) => ColumnOrderings(column), 5048 - ); 4127 + ColumnOrderings<DateTime> get updatedAt => 4128 + $composableBuilder(column: $table.updatedAt, builder: (column) => ColumnOrderings(column)); 5049 4129 5050 - ColumnOrderings<DateTime> get scheduledAt => $composableBuilder( 5051 - column: $table.scheduledAt, 5052 - builder: (column) => ColumnOrderings(column), 5053 - ); 4130 + ColumnOrderings<DateTime> get scheduledAt => 4131 + $composableBuilder(column: $table.scheduledAt, builder: (column) => ColumnOrderings(column)); 5054 4132 } 5055 4133 5056 - class $$DraftsTableAnnotationComposer 5057 - extends Composer<_$AppDatabase, $DraftsTable> { 4134 + class $$DraftsTableAnnotationComposer extends Composer<_$AppDatabase, $DraftsTable> { 5058 4135 $$DraftsTableAnnotationComposer({ 5059 4136 required super.$db, 5060 4137 required super.$table, ··· 5062 4139 super.$addJoinBuilderToRootComposer, 5063 4140 super.$removeJoinBuilderFromRootComposer, 5064 4141 }); 5065 - GeneratedColumn<int> get id => 5066 - $composableBuilder(column: $table.id, builder: (column) => column); 4142 + GeneratedColumn<int> get id => $composableBuilder(column: $table.id, builder: (column) => column); 5067 4143 5068 - GeneratedColumn<String> get accountDid => $composableBuilder( 5069 - column: $table.accountDid, 5070 - builder: (column) => column, 5071 - ); 4144 + GeneratedColumn<String> get accountDid => $composableBuilder(column: $table.accountDid, builder: (column) => column); 5072 4145 5073 - GeneratedColumn<String> get content => 5074 - $composableBuilder(column: $table.content, builder: (column) => column); 4146 + GeneratedColumn<String> get content => $composableBuilder(column: $table.content, builder: (column) => column); 5075 4147 5076 - GeneratedColumn<String> get replyUri => 5077 - $composableBuilder(column: $table.replyUri, builder: (column) => column); 4148 + GeneratedColumn<String> get replyUri => $composableBuilder(column: $table.replyUri, builder: (column) => column); 5078 4149 5079 - GeneratedColumn<String> get replyCid => 5080 - $composableBuilder(column: $table.replyCid, builder: (column) => column); 4150 + GeneratedColumn<String> get replyCid => $composableBuilder(column: $table.replyCid, builder: (column) => column); 5081 4151 5082 - GeneratedColumn<String> get rootUri => 5083 - $composableBuilder(column: $table.rootUri, builder: (column) => column); 4152 + GeneratedColumn<String> get rootUri => $composableBuilder(column: $table.rootUri, builder: (column) => column); 5084 4153 5085 - GeneratedColumn<String> get rootCid => 5086 - $composableBuilder(column: $table.rootCid, builder: (column) => column); 4154 + GeneratedColumn<String> get rootCid => $composableBuilder(column: $table.rootCid, builder: (column) => column); 5087 4155 5088 - GeneratedColumn<String> get embedJson => 5089 - $composableBuilder(column: $table.embedJson, builder: (column) => column); 4156 + GeneratedColumn<String> get embedJson => $composableBuilder(column: $table.embedJson, builder: (column) => column); 5090 4157 5091 - GeneratedColumn<String> get mediaPaths => $composableBuilder( 5092 - column: $table.mediaPaths, 5093 - builder: (column) => column, 5094 - ); 4158 + GeneratedColumn<String> get mediaPaths => $composableBuilder(column: $table.mediaPaths, builder: (column) => column); 5095 4159 5096 - GeneratedColumn<DateTime> get createdAt => 5097 - $composableBuilder(column: $table.createdAt, builder: (column) => column); 4160 + GeneratedColumn<DateTime> get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); 5098 4161 5099 - GeneratedColumn<DateTime> get updatedAt => 5100 - $composableBuilder(column: $table.updatedAt, builder: (column) => column); 4162 + GeneratedColumn<DateTime> get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); 5101 4163 5102 - GeneratedColumn<DateTime> get scheduledAt => $composableBuilder( 5103 - column: $table.scheduledAt, 5104 - builder: (column) => column, 5105 - ); 4164 + GeneratedColumn<DateTime> get scheduledAt => 4165 + $composableBuilder(column: $table.scheduledAt, builder: (column) => column); 5106 4166 } 5107 4167 5108 4168 class $$DraftsTableTableManager ··· 5125 4185 TableManagerState( 5126 4186 db: db, 5127 4187 table: table, 5128 - createFilteringComposer: () => 5129 - $$DraftsTableFilterComposer($db: db, $table: table), 5130 - createOrderingComposer: () => 5131 - $$DraftsTableOrderingComposer($db: db, $table: table), 5132 - createComputedFieldComposer: () => 5133 - $$DraftsTableAnnotationComposer($db: db, $table: table), 4188 + createFilteringComposer: () => $$DraftsTableFilterComposer($db: db, $table: table), 4189 + createOrderingComposer: () => $$DraftsTableOrderingComposer($db: db, $table: table), 4190 + createComputedFieldComposer: () => $$DraftsTableAnnotationComposer($db: db, $table: table), 5134 4191 updateCompanionCallback: 5135 4192 ({ 5136 4193 Value<int> id = const Value.absent(), ··· 5187 4244 updatedAt: updatedAt, 5188 4245 scheduledAt: scheduledAt, 5189 4246 ), 5190 - withReferenceMapper: (p0) => p0 5191 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) 5192 - .toList(), 4247 + withReferenceMapper: (p0) => p0.map((e) => (e.readTable(table), BaseReferences(db, table, e))).toList(), 5193 4248 prefetchHooksCallback: null, 5194 4249 ), 5195 4250 ); ··· 5226 4281 Value<DateTime> savedAt, 5227 4282 }); 5228 4283 5229 - class $$SavedPostsTableFilterComposer 5230 - extends Composer<_$AppDatabase, $SavedPostsTable> { 4284 + class $$SavedPostsTableFilterComposer extends Composer<_$AppDatabase, $SavedPostsTable> { 5231 4285 $$SavedPostsTableFilterComposer({ 5232 4286 required super.$db, 5233 4287 required super.$table, ··· 5235 4289 super.$addJoinBuilderToRootComposer, 5236 4290 super.$removeJoinBuilderFromRootComposer, 5237 4291 }); 5238 - ColumnFilters<int> get id => $composableBuilder( 5239 - column: $table.id, 5240 - builder: (column) => ColumnFilters(column), 5241 - ); 4292 + ColumnFilters<int> get id => $composableBuilder(column: $table.id, builder: (column) => ColumnFilters(column)); 5242 4293 5243 - ColumnFilters<String> get accountDid => $composableBuilder( 5244 - column: $table.accountDid, 5245 - builder: (column) => ColumnFilters(column), 5246 - ); 4294 + ColumnFilters<String> get accountDid => 4295 + $composableBuilder(column: $table.accountDid, builder: (column) => ColumnFilters(column)); 5247 4296 5248 - ColumnFilters<String> get postUri => $composableBuilder( 5249 - column: $table.postUri, 5250 - builder: (column) => ColumnFilters(column), 5251 - ); 4297 + ColumnFilters<String> get postUri => 4298 + $composableBuilder(column: $table.postUri, builder: (column) => ColumnFilters(column)); 5252 4299 5253 - ColumnFilters<String> get postJson => $composableBuilder( 5254 - column: $table.postJson, 5255 - builder: (column) => ColumnFilters(column), 5256 - ); 4300 + ColumnFilters<String> get postJson => 4301 + $composableBuilder(column: $table.postJson, builder: (column) => ColumnFilters(column)); 5257 4302 5258 - ColumnFilters<DateTime> get savedAt => $composableBuilder( 5259 - column: $table.savedAt, 5260 - builder: (column) => ColumnFilters(column), 5261 - ); 4303 + ColumnFilters<DateTime> get savedAt => 4304 + $composableBuilder(column: $table.savedAt, builder: (column) => ColumnFilters(column)); 5262 4305 } 5263 4306 5264 - class $$SavedPostsTableOrderingComposer 5265 - extends Composer<_$AppDatabase, $SavedPostsTable> { 4307 + class $$SavedPostsTableOrderingComposer extends Composer<_$AppDatabase, $SavedPostsTable> { 5266 4308 $$SavedPostsTableOrderingComposer({ 5267 4309 required super.$db, 5268 4310 required super.$table, ··· 5270 4312 super.$addJoinBuilderToRootComposer, 5271 4313 super.$removeJoinBuilderFromRootComposer, 5272 4314 }); 5273 - ColumnOrderings<int> get id => $composableBuilder( 5274 - column: $table.id, 5275 - builder: (column) => ColumnOrderings(column), 5276 - ); 4315 + ColumnOrderings<int> get id => $composableBuilder(column: $table.id, builder: (column) => ColumnOrderings(column)); 5277 4316 5278 - ColumnOrderings<String> get accountDid => $composableBuilder( 5279 - column: $table.accountDid, 5280 - builder: (column) => ColumnOrderings(column), 5281 - ); 4317 + ColumnOrderings<String> get accountDid => 4318 + $composableBuilder(column: $table.accountDid, builder: (column) => ColumnOrderings(column)); 5282 4319 5283 - ColumnOrderings<String> get postUri => $composableBuilder( 5284 - column: $table.postUri, 5285 - builder: (column) => ColumnOrderings(column), 5286 - ); 4320 + ColumnOrderings<String> get postUri => 4321 + $composableBuilder(column: $table.postUri, builder: (column) => ColumnOrderings(column)); 5287 4322 5288 - ColumnOrderings<String> get postJson => $composableBuilder( 5289 - column: $table.postJson, 5290 - builder: (column) => ColumnOrderings(column), 5291 - ); 4323 + ColumnOrderings<String> get postJson => 4324 + $composableBuilder(column: $table.postJson, builder: (column) => ColumnOrderings(column)); 5292 4325 5293 - ColumnOrderings<DateTime> get savedAt => $composableBuilder( 5294 - column: $table.savedAt, 5295 - builder: (column) => ColumnOrderings(column), 5296 - ); 4326 + ColumnOrderings<DateTime> get savedAt => 4327 + $composableBuilder(column: $table.savedAt, builder: (column) => ColumnOrderings(column)); 5297 4328 } 5298 4329 5299 - class $$SavedPostsTableAnnotationComposer 5300 - extends Composer<_$AppDatabase, $SavedPostsTable> { 4330 + class $$SavedPostsTableAnnotationComposer extends Composer<_$AppDatabase, $SavedPostsTable> { 5301 4331 $$SavedPostsTableAnnotationComposer({ 5302 4332 required super.$db, 5303 4333 required super.$table, ··· 5305 4335 super.$addJoinBuilderToRootComposer, 5306 4336 super.$removeJoinBuilderFromRootComposer, 5307 4337 }); 5308 - GeneratedColumn<int> get id => 5309 - $composableBuilder(column: $table.id, builder: (column) => column); 4338 + GeneratedColumn<int> get id => $composableBuilder(column: $table.id, builder: (column) => column); 5310 4339 5311 - GeneratedColumn<String> get accountDid => $composableBuilder( 5312 - column: $table.accountDid, 5313 - builder: (column) => column, 5314 - ); 4340 + GeneratedColumn<String> get accountDid => $composableBuilder(column: $table.accountDid, builder: (column) => column); 5315 4341 5316 - GeneratedColumn<String> get postUri => 5317 - $composableBuilder(column: $table.postUri, builder: (column) => column); 4342 + GeneratedColumn<String> get postUri => $composableBuilder(column: $table.postUri, builder: (column) => column); 5318 4343 5319 - GeneratedColumn<String> get postJson => 5320 - $composableBuilder(column: $table.postJson, builder: (column) => column); 4344 + GeneratedColumn<String> get postJson => $composableBuilder(column: $table.postJson, builder: (column) => column); 5321 4345 5322 - GeneratedColumn<DateTime> get savedAt => 5323 - $composableBuilder(column: $table.savedAt, builder: (column) => column); 4346 + GeneratedColumn<DateTime> get savedAt => $composableBuilder(column: $table.savedAt, builder: (column) => column); 5324 4347 } 5325 4348 5326 4349 class $$SavedPostsTableTableManager ··· 5334 4357 $$SavedPostsTableAnnotationComposer, 5335 4358 $$SavedPostsTableCreateCompanionBuilder, 5336 4359 $$SavedPostsTableUpdateCompanionBuilder, 5337 - ( 5338 - SavedPostEntry, 5339 - BaseReferences<_$AppDatabase, $SavedPostsTable, SavedPostEntry>, 5340 - ), 4360 + (SavedPostEntry, BaseReferences<_$AppDatabase, $SavedPostsTable, SavedPostEntry>), 5341 4361 SavedPostEntry, 5342 4362 PrefetchHooks Function() 5343 4363 > { ··· 5346 4366 TableManagerState( 5347 4367 db: db, 5348 4368 table: table, 5349 - createFilteringComposer: () => 5350 - $$SavedPostsTableFilterComposer($db: db, $table: table), 5351 - createOrderingComposer: () => 5352 - $$SavedPostsTableOrderingComposer($db: db, $table: table), 5353 - createComputedFieldComposer: () => 5354 - $$SavedPostsTableAnnotationComposer($db: db, $table: table), 4369 + createFilteringComposer: () => $$SavedPostsTableFilterComposer($db: db, $table: table), 4370 + createOrderingComposer: () => $$SavedPostsTableOrderingComposer($db: db, $table: table), 4371 + createComputedFieldComposer: () => $$SavedPostsTableAnnotationComposer($db: db, $table: table), 5355 4372 updateCompanionCallback: 5356 4373 ({ 5357 4374 Value<int> id = const Value.absent(), ··· 5380 4397 postJson: postJson, 5381 4398 savedAt: savedAt, 5382 4399 ), 5383 - withReferenceMapper: (p0) => p0 5384 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) 5385 - .toList(), 4400 + withReferenceMapper: (p0) => p0.map((e) => (e.readTable(table), BaseReferences(db, table, e))).toList(), 5386 4401 prefetchHooksCallback: null, 5387 4402 ), 5388 4403 ); ··· 5398 4413 $$SavedPostsTableAnnotationComposer, 5399 4414 $$SavedPostsTableCreateCompanionBuilder, 5400 4415 $$SavedPostsTableUpdateCompanionBuilder, 5401 - ( 5402 - SavedPostEntry, 5403 - BaseReferences<_$AppDatabase, $SavedPostsTable, SavedPostEntry>, 5404 - ), 4416 + (SavedPostEntry, BaseReferences<_$AppDatabase, $SavedPostsTable, SavedPostEntry>), 5405 4417 SavedPostEntry, 5406 4418 PrefetchHooks Function() 5407 4419 >; ··· 5409 4421 class $AppDatabaseManager { 5410 4422 final _$AppDatabase _db; 5411 4423 $AppDatabaseManager(this._db); 5412 - $$AccountsTableTableManager get accounts => 5413 - $$AccountsTableTableManager(_db, _db.accounts); 5414 - $$CachedProfilesTableTableManager get cachedProfiles => 5415 - $$CachedProfilesTableTableManager(_db, _db.cachedProfiles); 5416 - $$CachedPostsTableTableManager get cachedPosts => 5417 - $$CachedPostsTableTableManager(_db, _db.cachedPosts); 5418 - $$SettingsTableTableManager get settings => 5419 - $$SettingsTableTableManager(_db, _db.settings); 5420 - $$SavedFeedsTableTableManager get savedFeeds => 5421 - $$SavedFeedsTableTableManager(_db, _db.savedFeeds); 5422 - $$SearchHistoryTableTableManager get searchHistory => 5423 - $$SearchHistoryTableTableManager(_db, _db.searchHistory); 5424 - $$DraftsTableTableManager get drafts => 5425 - $$DraftsTableTableManager(_db, _db.drafts); 5426 - $$SavedPostsTableTableManager get savedPosts => 5427 - $$SavedPostsTableTableManager(_db, _db.savedPosts); 4424 + $$AccountsTableTableManager get accounts => $$AccountsTableTableManager(_db, _db.accounts); 4425 + $$CachedProfilesTableTableManager get cachedProfiles => $$CachedProfilesTableTableManager(_db, _db.cachedProfiles); 4426 + $$CachedPostsTableTableManager get cachedPosts => $$CachedPostsTableTableManager(_db, _db.cachedPosts); 4427 + $$SettingsTableTableManager get settings => $$SettingsTableTableManager(_db, _db.settings); 4428 + $$SavedFeedsTableTableManager get savedFeeds => $$SavedFeedsTableTableManager(_db, _db.savedFeeds); 4429 + $$SearchHistoryTableTableManager get searchHistory => $$SearchHistoryTableTableManager(_db, _db.searchHistory); 4430 + $$DraftsTableTableManager get drafts => $$DraftsTableTableManager(_db, _db.drafts); 4431 + $$SavedPostsTableTableManager get savedPosts => $$SavedPostsTableTableManager(_db, _db.savedPosts); 5428 4432 }
+8
lib/core/router/app_router.dart
··· 21 21 import 'package:lazurite/features/notifications/data/notification_repository.dart'; 22 22 import 'package:lazurite/features/notifications/presentation/notifications_screen.dart'; 23 23 import 'package:lazurite/features/profile/presentation/profile_screen.dart'; 24 + import 'package:lazurite/features/feed/presentation/saved_posts_screen.dart'; 24 25 import 'package:lazurite/features/search/presentation/search_screen.dart'; 25 26 import 'package:lazurite/features/settings/presentation/about_screen.dart'; 26 27 import 'package:lazurite/features/settings/presentation/settings_screen.dart'; ··· 73 74 replyRootUri: args?.replyRootUri, 74 75 replyRootCid: args?.replyRootCid, 75 76 replyAuthorHandle: args?.replyAuthorHandle, 77 + quoteUri: args?.quoteUri, 78 + quoteCid: args?.quoteCid, 79 + quoteAuthorHandle: args?.quoteAuthorHandle, 76 80 draftId: args?.draftId, 77 81 ), 78 82 ); 79 83 }, 84 + ), 85 + GoRoute( 86 + path: '/saved', 87 + builder: (context, state) => SavedPostsScreen(accountDid: context.read<String>()), 80 88 ), 81 89 StatefulShellRoute.indexedStack( 82 90 builder: (context, state, navigationShell) {
+16 -1
lib/features/compose/bloc/compose_bloc.dart
··· 51 51 on<PostSubmitted>(_onPostSubmitted); 52 52 on<ReplyContextSet>(_onReplyContextSet); 53 53 on<ReplyContextCleared>(_onReplyContextCleared); 54 + on<QuoteContextSet>(_onQuoteContextSet); 55 + on<QuoteContextCleared>(_onQuoteContextCleared); 54 56 } 55 57 56 58 final ComposeRepository _composeRepository; ··· 346 348 emit(state.copyWith(replyParentUri: null, replyParentCid: null, replyRootUri: null, replyRootCid: null)); 347 349 } 348 350 351 + Future<void> _onQuoteContextSet(QuoteContextSet event, Emitter<ComposeState> emit) async { 352 + emit(state.copyWith(quoteUri: event.quoteUri, quoteCid: event.quoteCid)); 353 + } 354 + 355 + Future<void> _onQuoteContextCleared(QuoteContextCleared event, Emitter<ComposeState> emit) async { 356 + emit(state.copyWith(quoteUri: null, quoteCid: null)); 357 + } 358 + 349 359 Future<void> _onPostSubmitted(PostSubmitted event, Emitter<ComposeState> emit) async { 350 360 if (!state.canSubmit || state.isOverLimit) return; 351 361 ··· 442 452 }; 443 453 } else if (state.videoAttachment?.isReady == true) { 444 454 final blob = state.videoAttachment!.blob!; 445 - embed = {'\$type': 'app.bsky.embed.video', 'video': blob.toJson(), 'alt': state.videoAttachment!.altText}; 455 + embed = {r'$type': 'app.bsky.embed.video', 'video': blob.toJson(), 'alt': state.videoAttachment!.altText}; 456 + } else if (state.quoteUri != null && state.quoteCid != null) { 457 + embed = { 458 + r'$type': 'app.bsky.embed.record', 459 + 'record': {'uri': state.quoteUri, 'cid': state.quoteCid}, 460 + }; 446 461 } 447 462 448 463 Map<String, dynamic>? reply;
+14
lib/features/compose/bloc/compose_event.dart
··· 131 131 class ReplyContextCleared extends ComposeEvent { 132 132 const ReplyContextCleared(); 133 133 } 134 + 135 + class QuoteContextSet extends ComposeEvent { 136 + const QuoteContextSet({required this.quoteUri, required this.quoteCid}); 137 + 138 + final String quoteUri; 139 + final String quoteCid; 140 + 141 + @override 142 + List<Object?> get props => [quoteUri, quoteCid]; 143 + } 144 + 145 + class QuoteContextCleared extends ComposeEvent { 146 + const QuoteContextCleared(); 147 + }
+15
lib/features/compose/bloc/compose_state.dart
··· 73 73 this.replyParentCid, 74 74 this.replyRootUri, 75 75 this.replyRootCid, 76 + this.quoteUri, 77 + this.quoteCid, 76 78 this.errorMessage, 77 79 this.drafts = const [], 78 80 this.isSavingDraft = false, ··· 95 97 String? replyParentCid, 96 98 String? replyRootUri, 97 99 String? replyRootCid, 100 + String? quoteUri, 101 + String? quoteCid, 98 102 VideoAttachment? videoAttachment, 99 103 }) : this._( 100 104 status: ComposeStatus.ready, ··· 109 113 replyParentCid: replyParentCid, 110 114 replyRootUri: replyRootUri, 111 115 replyRootCid: replyRootCid, 116 + quoteUri: quoteUri, 117 + quoteCid: quoteCid, 112 118 videoAttachment: videoAttachment, 113 119 canSubmit: !isOverLimit && !isEmpty, 114 120 ); ··· 125 131 final String? replyParentCid; 126 132 final String? replyRootUri; 127 133 final String? replyRootCid; 134 + final String? quoteUri; 135 + final String? quoteCid; 128 136 final String? errorMessage; 129 137 final List<DraftEntry> drafts; 130 138 final bool isSavingDraft; ··· 142 150 bool get canAddVideo => mediaAttachments.isEmpty && videoAttachment == null; 143 151 bool get hasScheduledTime => scheduledAt != null; 144 152 bool get isReply => replyParentUri != null; 153 + bool get isQuote => quoteUri != null; 145 154 146 155 ComposeState copyWith({ 147 156 ComposeStatus? status, ··· 156 165 Object? replyParentCid = const _Undefined(), 157 166 Object? replyRootUri = const _Undefined(), 158 167 Object? replyRootCid = const _Undefined(), 168 + Object? quoteUri = const _Undefined(), 169 + Object? quoteCid = const _Undefined(), 159 170 Object? errorMessage = const _Undefined(), 160 171 List<DraftEntry>? drafts, 161 172 bool? isSavingDraft, ··· 176 187 replyParentCid: replyParentCid is _Undefined ? this.replyParentCid : replyParentCid as String?, 177 188 replyRootUri: replyRootUri is _Undefined ? this.replyRootUri : replyRootUri as String?, 178 189 replyRootCid: replyRootCid is _Undefined ? this.replyRootCid : replyRootCid as String?, 190 + quoteUri: quoteUri is _Undefined ? this.quoteUri : quoteUri as String?, 191 + quoteCid: quoteCid is _Undefined ? this.quoteCid : quoteCid as String?, 179 192 errorMessage: errorMessage is _Undefined ? this.errorMessage : errorMessage as String?, 180 193 drafts: drafts ?? this.drafts, 181 194 isSavingDraft: isSavingDraft ?? this.isSavingDraft, ··· 199 212 replyParentCid, 200 213 replyRootUri, 201 214 replyRootCid, 215 + quoteUri, 216 + quoteCid, 202 217 errorMessage, 203 218 drafts, 204 219 isSavingDraft,
+6
lib/features/compose/presentation/compose_route_args.dart
··· 5 5 this.replyRootUri, 6 6 this.replyRootCid, 7 7 this.replyAuthorHandle, 8 + this.quoteUri, 9 + this.quoteCid, 10 + this.quoteAuthorHandle, 8 11 this.draftId, 9 12 }); 10 13 ··· 13 16 final String? replyRootUri; 14 17 final String? replyRootCid; 15 18 final String? replyAuthorHandle; 19 + final String? quoteUri; 20 + final String? quoteCid; 21 + final String? quoteAuthorHandle; 16 22 final int? draftId; 17 23 }
+10
lib/features/compose/presentation/compose_screen.dart
··· 17 17 this.replyRootUri, 18 18 this.replyRootCid, 19 19 this.replyAuthorHandle, 20 + this.quoteUri, 21 + this.quoteCid, 22 + this.quoteAuthorHandle, 20 23 this.draftId, 21 24 }); 22 25 ··· 25 28 final String? replyRootUri; 26 29 final String? replyRootCid; 27 30 final String? replyAuthorHandle; 31 + final String? quoteUri; 32 + final String? quoteCid; 33 + final String? quoteAuthorHandle; 28 34 final int? draftId; 29 35 30 36 @override ··· 53 59 rootCid: widget.replyRootCid ?? widget.replyParentCid!, 54 60 ), 55 61 ); 62 + } 63 + 64 + if (widget.quoteUri != null && widget.quoteCid != null) { 65 + context.read<ComposeBloc>().add(QuoteContextSet(quoteUri: widget.quoteUri!, quoteCid: widget.quoteCid!)); 56 66 } 57 67 58 68 _textController.addListener(_onTextChanged);
+4 -2
lib/features/feed/presentation/home_feed_screen.dart
··· 4 4 import 'package:flutter/material.dart'; 5 5 import 'package:flutter_bloc/flutter_bloc.dart'; 6 6 import 'package:go_router/go_router.dart'; 7 + import 'package:lazurite/features/auth/bloc/auth_bloc.dart'; 7 8 import 'package:lazurite/features/feed/cubit/feed_preferences_cubit.dart'; 8 9 import 'package:lazurite/features/feed/data/feed_repository.dart'; 9 - import 'package:lazurite/features/feed/presentation/widgets/post_card.dart'; 10 + import 'package:lazurite/features/feed/presentation/widgets/post_card_with_actions.dart'; 10 11 11 12 class HomeFeedScreen extends StatefulWidget { 12 13 const HomeFeedScreen({super.key}); ··· 348 349 ); 349 350 } 350 351 351 - return PostCard(feedViewPost: _posts[index]); 352 + final accountDid = context.read<AuthBloc>().state.tokens?.did ?? ''; 353 + return PostCardWithActions(feedViewPost: _posts[index], accountDid: accountDid); 352 354 }, 353 355 ), 354 356 );
+246
lib/features/feed/presentation/saved_posts_screen.dart
··· 1 + import 'package:flutter/material.dart'; 2 + import 'package:flutter_bloc/flutter_bloc.dart'; 3 + import 'package:go_router/go_router.dart'; 4 + import 'package:lazurite/core/database/app_database.dart'; 5 + import 'package:lazurite/core/logging/app_logger.dart'; 6 + import 'package:lazurite/features/feed/cubit/saved_posts_cubit.dart'; 7 + import 'package:share_plus/share_plus.dart'; 8 + 9 + class SavedPostsScreen extends StatelessWidget { 10 + const SavedPostsScreen({super.key, required this.accountDid}); 11 + 12 + final String accountDid; 13 + 14 + @override 15 + Widget build(BuildContext context) { 16 + return BlocProvider( 17 + create: (context) => 18 + SavedPostsCubit(database: context.read<AppDatabase>(), accountDid: accountDid)..loadSavedPosts(), 19 + child: const _SavedPostsContent(), 20 + ); 21 + } 22 + } 23 + 24 + class _SavedPostsContent extends StatelessWidget { 25 + const _SavedPostsContent(); 26 + 27 + @override 28 + Widget build(BuildContext context) { 29 + return Scaffold( 30 + appBar: AppBar( 31 + title: const Text('Saved Posts'), 32 + actions: [ 33 + BlocBuilder<SavedPostsCubit, SavedPostsState>( 34 + builder: (context, state) { 35 + if (state.savedPosts.isEmpty) return const SizedBox.shrink(); 36 + return IconButton( 37 + icon: const Icon(Icons.delete_sweep_outlined), 38 + onPressed: () => _confirmClearAll(context), 39 + tooltip: 'Clear all saved posts', 40 + ); 41 + }, 42 + ), 43 + ], 44 + ), 45 + body: BlocBuilder<SavedPostsCubit, SavedPostsState>( 46 + builder: (context, state) { 47 + if (state.status == SavedPostsStatus.loading) { 48 + return const Center(child: CircularProgressIndicator()); 49 + } 50 + 51 + if (state.status == SavedPostsStatus.error) { 52 + return Center( 53 + child: Column( 54 + mainAxisAlignment: MainAxisAlignment.center, 55 + children: [ 56 + const Icon(Icons.error_outline, size: 48, color: Colors.grey), 57 + const SizedBox(height: 16), 58 + Text(state.error ?? 'Failed to load saved posts'), 59 + const SizedBox(height: 16), 60 + FilledButton( 61 + onPressed: () => context.read<SavedPostsCubit>().loadSavedPosts(), 62 + child: const Text('Retry'), 63 + ), 64 + ], 65 + ), 66 + ); 67 + } 68 + 69 + if (state.savedPosts.isEmpty) { 70 + return Center( 71 + child: Column( 72 + mainAxisAlignment: MainAxisAlignment.center, 73 + children: [ 74 + Icon(Icons.bookmark_outline, size: 64, color: Theme.of(context).colorScheme.outline), 75 + const SizedBox(height: 16), 76 + Text( 77 + 'No saved posts', 78 + style: Theme.of( 79 + context, 80 + ).textTheme.headlineSmall?.copyWith(color: Theme.of(context).colorScheme.onSurfaceVariant), 81 + ), 82 + const SizedBox(height: 8), 83 + Text( 84 + 'Posts you save will appear here', 85 + style: Theme.of( 86 + context, 87 + ).textTheme.bodyMedium?.copyWith(color: Theme.of(context).colorScheme.onSurfaceVariant), 88 + ), 89 + ], 90 + ), 91 + ); 92 + } 93 + 94 + return RefreshIndicator( 95 + onRefresh: () => context.read<SavedPostsCubit>().loadSavedPosts(), 96 + child: ListView.builder( 97 + itemCount: state.savedPosts.length, 98 + itemBuilder: (context, index) { 99 + final savedPost = state.savedPosts[index]; 100 + return _SavedPostCard( 101 + savedPost: savedPost, 102 + onUnsave: () => context.read<SavedPostsCubit>().unsavePostById(savedPost.id), 103 + ); 104 + }, 105 + ), 106 + ); 107 + }, 108 + ), 109 + ); 110 + } 111 + 112 + void _confirmClearAll(BuildContext context) { 113 + showDialog<void>( 114 + context: context, 115 + builder: (context) => AlertDialog( 116 + title: const Text('Clear All Saved Posts?'), 117 + content: const Text('This will remove all your saved posts. This action cannot be undone.'), 118 + actions: [ 119 + TextButton(onPressed: () => Navigator.pop(context), child: const Text('Cancel')), 120 + FilledButton( 121 + onPressed: () { 122 + Navigator.pop(context); 123 + context.read<SavedPostsCubit>().clearAllSaved(); 124 + }, 125 + style: FilledButton.styleFrom( 126 + backgroundColor: Theme.of(context).colorScheme.error, 127 + foregroundColor: Theme.of(context).colorScheme.onError, 128 + ), 129 + child: const Text('Clear All'), 130 + ), 131 + ], 132 + ), 133 + ); 134 + } 135 + } 136 + 137 + class _SavedPostCard extends StatelessWidget { 138 + const _SavedPostCard({required this.savedPost, required this.onUnsave}); 139 + 140 + final SavedPostEntry savedPost; 141 + final VoidCallback onUnsave; 142 + 143 + @override 144 + Widget build(BuildContext context) { 145 + return Dismissible( 146 + key: ValueKey(savedPost.id), 147 + direction: DismissDirection.endToStart, 148 + background: Container( 149 + alignment: Alignment.centerRight, 150 + padding: const EdgeInsets.only(right: 16), 151 + color: Theme.of(context).colorScheme.error, 152 + child: Icon(Icons.delete, color: Theme.of(context).colorScheme.onError), 153 + ), 154 + onDismissed: (_) => onUnsave(), 155 + child: Card( 156 + margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), 157 + child: ListTile( 158 + leading: const Icon(Icons.bookmark), 159 + title: const Text('Saved Post'), 160 + subtitle: Text('Saved on ${_formatDate(savedPost.savedAt)}', style: Theme.of(context).textTheme.bodySmall), 161 + trailing: Row( 162 + mainAxisSize: MainAxisSize.min, 163 + children: [ 164 + IconButton( 165 + icon: const Icon(Icons.open_in_new), 166 + onPressed: () => _openPost(context), 167 + tooltip: 'Open post', 168 + ), 169 + IconButton( 170 + icon: const Icon(Icons.share_outlined), 171 + onPressed: () => _sharePost(context), 172 + tooltip: 'Share', 173 + ), 174 + IconButton( 175 + icon: const Icon(Icons.delete_outline), 176 + onPressed: () => _confirmUnsave(context), 177 + tooltip: 'Remove', 178 + ), 179 + ], 180 + ), 181 + ), 182 + ), 183 + ); 184 + } 185 + 186 + void _openPost(BuildContext context) => context.push('/post/${Uri.encodeComponent(savedPost.postUri)}'); 187 + 188 + void _sharePost(BuildContext context) { 189 + final bskyUrl = _convertAtUriToBskyUrl(savedPost.postUri); 190 + Share.share(bskyUrl); 191 + } 192 + 193 + void _confirmUnsave(BuildContext context) { 194 + showDialog<void>( 195 + context: context, 196 + builder: (context) => AlertDialog( 197 + title: const Text('Remove Saved Post?'), 198 + content: const Text('This will remove the post from your saved list.'), 199 + actions: [ 200 + TextButton(onPressed: () => Navigator.pop(context), child: const Text('Cancel')), 201 + FilledButton( 202 + onPressed: () { 203 + Navigator.pop(context); 204 + onUnsave(); 205 + }, 206 + child: const Text('Remove'), 207 + ), 208 + ], 209 + ), 210 + ); 211 + } 212 + 213 + String _formatDate(DateTime date) { 214 + final now = DateTime.now(); 215 + final difference = now.difference(date); 216 + 217 + if (difference.inMinutes < 1) { 218 + return 'just now'; 219 + } 220 + if (difference.inHours < 1) { 221 + return '${difference.inMinutes}m ago'; 222 + } 223 + if (difference.inDays < 1) { 224 + return '${difference.inHours}h ago'; 225 + } 226 + if (difference.inDays < 7) { 227 + return '${difference.inDays}d ago'; 228 + } 229 + return '${date.month}/${date.day}/${date.year}'; 230 + } 231 + 232 + String _convertAtUriToBskyUrl(String atUri) { 233 + try { 234 + final uri = Uri.parse(atUri); 235 + final parts = uri.pathSegments; 236 + if (parts.length >= 2) { 237 + final did = uri.host; 238 + final rkey = parts.last; 239 + return 'https://bsky.app/profile/$did/post/$rkey'; 240 + } 241 + } catch (_) { 242 + log.d('failed to convert atUri to bskyUrl'); 243 + } 244 + return atUri; 245 + } 246 + }
+229
lib/features/feed/presentation/widgets/post_action_bar.dart
··· 1 + import 'package:flutter/material.dart'; 2 + import 'package:flutter/services.dart'; 3 + import 'package:lazurite/core/logging/app_logger.dart'; 4 + import 'package:share_plus/share_plus.dart'; 5 + 6 + class PostActionBar extends StatelessWidget { 7 + const PostActionBar({ 8 + super.key, 9 + required this.replyCount, 10 + required this.repostCount, 11 + required this.likeCount, 12 + required this.isLiked, 13 + required this.isReposted, 14 + required this.isSaved, 15 + required this.postUri, 16 + this.postCid, 17 + this.onReply, 18 + this.onRepost, 19 + this.onQuote, 20 + this.onLike, 21 + this.onShare, 22 + this.onSave, 23 + this.onMore, 24 + this.isLoadingLike = false, 25 + this.isLoadingRepost = false, 26 + }); 27 + 28 + final int replyCount; 29 + final int repostCount; 30 + final int likeCount; 31 + final bool isLiked; 32 + final bool isReposted; 33 + final bool isSaved; 34 + final String postUri; 35 + final String? postCid; 36 + final VoidCallback? onReply; 37 + final VoidCallback? onRepost; 38 + final VoidCallback? onQuote; 39 + final VoidCallback? onLike; 40 + final VoidCallback? onShare; 41 + final VoidCallback? onSave; 42 + final VoidCallback? onMore; 43 + final bool isLoadingLike; 44 + final bool isLoadingRepost; 45 + 46 + @override 47 + Widget build(BuildContext context) { 48 + return Row( 49 + mainAxisAlignment: MainAxisAlignment.spaceAround, 50 + children: [ 51 + _ActionButton( 52 + icon: Icons.chat_bubble_outline, 53 + activeIcon: Icons.chat_bubble, 54 + count: replyCount, 55 + onTap: onReply, 56 + color: Theme.of(context).colorScheme.onSurfaceVariant, 57 + ), 58 + _ActionButton( 59 + icon: Icons.repeat, 60 + activeIcon: Icons.repeat, 61 + count: repostCount, 62 + isActive: isReposted, 63 + isLoading: isLoadingRepost, 64 + onTap: onRepost, 65 + activeColor: Colors.green, 66 + onLongPress: onRepost != null ? () => _showRepostOptions(context) : null, 67 + ), 68 + _ActionButton( 69 + icon: Icons.favorite_outline, 70 + activeIcon: Icons.favorite, 71 + count: likeCount, 72 + isActive: isLiked, 73 + isLoading: isLoadingLike, 74 + onTap: onLike, 75 + activeColor: Colors.pink, 76 + ), 77 + _ActionButton( 78 + icon: isSaved ? Icons.bookmark : Icons.bookmark_outline, 79 + activeIcon: Icons.bookmark, 80 + count: 0, 81 + isActive: isSaved, 82 + onTap: onSave, 83 + color: Theme.of(context).colorScheme.onSurfaceVariant, 84 + activeColor: Theme.of(context).colorScheme.primary, 85 + ), 86 + _ActionButton( 87 + icon: Icons.share_outlined, 88 + activeIcon: Icons.share, 89 + count: 0, 90 + onTap: onShare ?? () => _defaultShare(context), 91 + color: Theme.of(context).colorScheme.onSurfaceVariant, 92 + ), 93 + if (onMore != null) 94 + _ActionButton( 95 + icon: Icons.more_vert, 96 + activeIcon: Icons.more_vert, 97 + count: 0, 98 + onTap: onMore, 99 + color: Theme.of(context).colorScheme.onSurfaceVariant, 100 + ), 101 + ], 102 + ); 103 + } 104 + 105 + void _showRepostOptions(BuildContext context) { 106 + HapticFeedback.mediumImpact(); 107 + showModalBottomSheet<void>( 108 + context: context, 109 + builder: (context) => SafeArea( 110 + child: Column( 111 + mainAxisSize: MainAxisSize.min, 112 + children: [ 113 + ListTile( 114 + leading: Icon(isReposted ? Icons.repeat : Icons.repeat, color: isReposted ? Colors.green : null), 115 + title: Text(isReposted ? 'Unrepost' : 'Repost'), 116 + subtitle: Text(isReposted ? 'Remove this repost' : 'Share this post'), 117 + onTap: () { 118 + Navigator.pop(context); 119 + onRepost?.call(); 120 + }, 121 + ), 122 + if (!isReposted) 123 + ListTile( 124 + leading: const Icon(Icons.format_quote), 125 + title: const Text('Quote Post'), 126 + subtitle: const Text('Quote this post with your own text'), 127 + onTap: () { 128 + Navigator.pop(context); 129 + onQuote?.call(); 130 + }, 131 + ), 132 + ], 133 + ), 134 + ), 135 + ); 136 + } 137 + 138 + Future<void> _defaultShare(BuildContext context) async { 139 + final url = _convertAtUriToBskyUrl(postUri); 140 + await Share.share(url); 141 + } 142 + 143 + String _convertAtUriToBskyUrl(String atUri) { 144 + try { 145 + final uri = Uri.parse(atUri); 146 + final parts = uri.pathSegments; 147 + if (parts.length >= 2) { 148 + final did = uri.host; 149 + final rkey = parts.last; 150 + return 'https://bsky.app/profile/$did/post/$rkey'; 151 + } 152 + } catch (_) { 153 + log.d('failed to convert atUri to bskyUrl'); 154 + } 155 + return atUri; 156 + } 157 + } 158 + 159 + class _ActionButton extends StatelessWidget { 160 + const _ActionButton({ 161 + required this.icon, 162 + required this.activeIcon, 163 + required this.count, 164 + this.isActive = false, 165 + this.isLoading = false, 166 + this.onTap, 167 + this.onLongPress, 168 + this.color, 169 + this.activeColor, 170 + }); 171 + 172 + final IconData icon; 173 + final IconData activeIcon; 174 + final int count; 175 + final bool isActive; 176 + final bool isLoading; 177 + final VoidCallback? onTap; 178 + final VoidCallback? onLongPress; 179 + final Color? color; 180 + final Color? activeColor; 181 + 182 + @override 183 + Widget build(BuildContext context) { 184 + final defaultColor = color ?? Theme.of(context).colorScheme.onSurfaceVariant; 185 + final iconColor = isActive ? (activeColor ?? defaultColor) : defaultColor; 186 + 187 + Widget button = InkWell( 188 + onTap: isLoading ? null : onTap, 189 + onLongPress: onLongPress, 190 + borderRadius: BorderRadius.circular(999), 191 + child: Padding( 192 + padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), 193 + child: Row( 194 + mainAxisSize: MainAxisSize.min, 195 + children: [ 196 + if (isLoading) 197 + SizedBox(width: 18, height: 18, child: CircularProgressIndicator(strokeWidth: 2, color: iconColor)) 198 + else 199 + Icon(isActive ? activeIcon : icon, size: 18, color: iconColor), 200 + if (count > 0) ...[ 201 + const SizedBox(width: 4), 202 + Text(_formatCount(count), style: Theme.of(context).textTheme.bodySmall?.copyWith(color: iconColor)), 203 + ], 204 + ], 205 + ), 206 + ), 207 + ); 208 + 209 + if (onTap != null && !isLoading) { 210 + button = GestureDetector( 211 + onTap: onTap, 212 + onLongPress: onLongPress, 213 + child: AnimatedScale(scale: isActive ? 1.0 : 1.0, duration: const Duration(milliseconds: 100), child: button), 214 + ); 215 + } 216 + 217 + return button; 218 + } 219 + 220 + String _formatCount(int count) { 221 + if (count >= 1000000) { 222 + return '${(count / 1000000).toStringAsFixed(1)}M'; 223 + } 224 + if (count >= 1000) { 225 + return '${(count / 1000).toStringAsFixed(1)}K'; 226 + } 227 + return '$count'; 228 + } 229 + }
+3 -2
lib/features/feed/presentation/widgets/post_card.dart
··· 13 13 import 'package:url_launcher/url_launcher.dart'; 14 14 15 15 class PostCard extends StatelessWidget { 16 - const PostCard({super.key, required this.feedViewPost}); 16 + const PostCard({super.key, required this.feedViewPost, this.actionBar}); 17 17 18 18 final FeedViewPost feedViewPost; 19 + final Widget? actionBar; 19 20 20 21 @override 21 22 Widget build(BuildContext context) { ··· 40 41 ], 41 42 if (embed != null) ...[const SizedBox(height: 12), embed], 42 43 const SizedBox(height: 12), 43 - _buildActions(context), 44 + actionBar ?? _buildActions(context), 44 45 ], 45 46 ), 46 47 ),
+259
lib/features/feed/presentation/widgets/post_card_with_actions.dart
··· 1 + import 'dart:async'; 2 + import 'dart:convert'; 3 + 4 + import 'package:bluesky/app_bsky_feed_defs.dart'; 5 + import 'package:flutter/material.dart'; 6 + import 'package:flutter/services.dart'; 7 + import 'package:flutter_bloc/flutter_bloc.dart'; 8 + import 'package:go_router/go_router.dart'; 9 + import 'package:lazurite/core/logging/app_logger.dart'; 10 + import 'package:lazurite/features/feed/cubit/post_action_cubit.dart'; 11 + import 'package:lazurite/features/feed/cubit/saved_posts_cubit.dart'; 12 + import 'package:lazurite/features/feed/data/post_action_repository.dart'; 13 + import 'package:lazurite/features/feed/presentation/widgets/post_action_bar.dart'; 14 + import 'package:lazurite/features/feed/presentation/widgets/post_card.dart'; 15 + import 'package:lazurite/features/profile/cubit/profile_action_cubit.dart'; 16 + import 'package:lazurite/features/profile/data/profile_action_repository.dart'; 17 + import 'package:lazurite/features/profile/presentation/widgets/report_dialog.dart'; 18 + 19 + class PostCardWithActions extends StatelessWidget { 20 + const PostCardWithActions({super.key, required this.feedViewPost, required this.accountDid}); 21 + 22 + final FeedViewPost feedViewPost; 23 + final String accountDid; 24 + 25 + @override 26 + Widget build(BuildContext context) { 27 + final post = feedViewPost.post; 28 + final viewer = post.viewer; 29 + 30 + return BlocProvider( 31 + create: (_) => PostActionCubit( 32 + postActionRepository: context.read<PostActionRepository>(), 33 + postUri: post.uri.toString(), 34 + postCid: post.cid, 35 + isLiked: viewer?.like != null, 36 + isReposted: viewer?.repost != null, 37 + likeCount: post.likeCount ?? 0, 38 + repostCount: post.repostCount ?? 0, 39 + likeUri: viewer?.like?.toString(), 40 + repostUri: viewer?.repost?.toString(), 41 + ), 42 + child: _PostCardWithActionsContent(feedViewPost: feedViewPost, accountDid: accountDid), 43 + ); 44 + } 45 + } 46 + 47 + class _PostCardWithActionsContent extends StatelessWidget { 48 + const _PostCardWithActionsContent({required this.feedViewPost, required this.accountDid}); 49 + 50 + final FeedViewPost feedViewPost; 51 + final String accountDid; 52 + 53 + @override 54 + Widget build(BuildContext context) { 55 + return BlocListener<PostActionCubit, PostActionState>( 56 + listenWhen: (previous, current) => previous.error != current.error && current.error != null, 57 + listener: (context, state) { 58 + if (state.error != null) { 59 + ScaffoldMessenger.of( 60 + context, 61 + ).showSnackBar(SnackBar(content: Text(state.error!), behavior: SnackBarBehavior.floating)); 62 + context.read<PostActionCubit>().clearError(); 63 + } 64 + }, 65 + child: PostCard(feedViewPost: feedViewPost, actionBar: _buildActionBar(context)), 66 + ); 67 + } 68 + 69 + Widget _buildActionBar(BuildContext context) { 70 + final post = feedViewPost.post; 71 + 72 + return BlocBuilder<PostActionCubit, PostActionState>( 73 + builder: (context, postActionState) { 74 + return BlocBuilder<SavedPostsCubit, SavedPostsState>( 75 + builder: (context, savedState) { 76 + return PostActionBar( 77 + replyCount: post.replyCount ?? 0, 78 + repostCount: postActionState.repostCount, 79 + likeCount: postActionState.likeCount, 80 + isLiked: postActionState.isLiked, 81 + isReposted: postActionState.isReposted, 82 + isSaved: savedState.isSaved(post.uri.toString()), 83 + postUri: post.uri.toString(), 84 + postCid: post.cid, 85 + isLoadingLike: postActionState.isLoadingLike, 86 + isLoadingRepost: postActionState.isLoadingRepost, 87 + onReply: () => _onReply(context), 88 + onRepost: () => context.read<PostActionCubit>().toggleRepost(), 89 + onQuote: () => _onQuote(context), 90 + onLike: () => context.read<PostActionCubit>().toggleLike(), 91 + onSave: () { 92 + unawaited(_onToggleSave(context)); 93 + }, 94 + onMore: () => _showMoreOptions(context), 95 + ); 96 + }, 97 + ); 98 + }, 99 + ); 100 + } 101 + 102 + void _onReply(BuildContext context) { 103 + HapticFeedback.selectionClick(); 104 + final post = feedViewPost.post; 105 + final reply = feedViewPost.reply; 106 + 107 + String rootUri; 108 + String rootCid; 109 + 110 + if (reply != null && reply.root.isPostView) { 111 + rootUri = reply.root.postView!.uri.toString(); 112 + rootCid = reply.root.postView!.cid; 113 + } else { 114 + rootUri = post.uri.toString(); 115 + rootCid = post.cid; 116 + } 117 + 118 + context.push( 119 + '/compose', 120 + extra: { 121 + 'replyParentUri': post.uri.toString(), 122 + 'replyParentCid': post.cid, 123 + 'replyRootUri': rootUri, 124 + 'replyRootCid': rootCid, 125 + 'replyAuthorHandle': post.author.handle, 126 + }, 127 + ); 128 + } 129 + 130 + void _onQuote(BuildContext context) { 131 + HapticFeedback.selectionClick(); 132 + final post = feedViewPost.post; 133 + 134 + context.push( 135 + '/compose', 136 + extra: {'quoteUri': post.uri.toString(), 'quoteCid': post.cid, 'quoteAuthorHandle': post.author.handle}, 137 + ); 138 + } 139 + 140 + Future<void> _onToggleSave(BuildContext context) async { 141 + final cubit = context.read<SavedPostsCubit>(); 142 + final post = feedViewPost.post; 143 + 144 + await HapticFeedback.lightImpact(); 145 + await cubit.toggleSave(postUri: post.uri.toString(), postJson: jsonEncode(post.toJson())); 146 + } 147 + 148 + void _showMoreOptions(BuildContext context) { 149 + HapticFeedback.mediumImpact(); 150 + final post = feedViewPost.post; 151 + final postUri = post.uri.toString(); 152 + final bskyUrl = _convertAtUriToBskyUrl(postUri); 153 + 154 + showModalBottomSheet<void>( 155 + context: context, 156 + builder: (context) => SafeArea( 157 + child: Column( 158 + mainAxisSize: MainAxisSize.min, 159 + children: [ 160 + ListTile( 161 + leading: const Icon(Icons.copy), 162 + title: const Text('Copy Link'), 163 + onTap: () { 164 + Navigator.pop(context); 165 + _copyToClipboard(context, bskyUrl); 166 + }, 167 + ), 168 + ListTile( 169 + leading: const Icon(Icons.person_outline), 170 + title: Text('View @${post.author.handle}'), 171 + onTap: () { 172 + Navigator.pop(context); 173 + context.push('/profile/view?actor=${Uri.encodeQueryComponent(post.author.did)}'); 174 + }, 175 + ), 176 + ListTile( 177 + leading: const Icon(Icons.report_outlined, color: Colors.orange), 178 + title: const Text('Report Post', style: TextStyle(color: Colors.orange)), 179 + onTap: () { 180 + Navigator.pop(context); 181 + _showReportDialog(context); 182 + }, 183 + ), 184 + if (post.author.did == accountDid) 185 + ListTile( 186 + leading: Icon(Icons.delete_outline, color: Theme.of(context).colorScheme.error), 187 + title: Text('Delete Post', style: TextStyle(color: Theme.of(context).colorScheme.error)), 188 + onTap: () { 189 + Navigator.pop(context); 190 + _confirmDelete(context); 191 + }, 192 + ), 193 + ], 194 + ), 195 + ), 196 + ); 197 + } 198 + 199 + void _showReportDialog(BuildContext context) { 200 + final post = feedViewPost.post; 201 + 202 + showDialog<void>( 203 + context: context, 204 + builder: (dialogContext) => BlocProvider( 205 + create: (_) => ProfileActionCubit( 206 + profileActionRepository: context.read<ProfileActionRepository>(), 207 + actorDid: post.author.did, 208 + ), 209 + child: ReportDialog.post(postUri: post.uri, cid: post.cid, authorHandle: post.author.handle), 210 + ), 211 + ); 212 + } 213 + 214 + void _confirmDelete(BuildContext context) { 215 + showDialog<void>( 216 + context: context, 217 + builder: (context) => AlertDialog( 218 + title: const Text('Delete Post?'), 219 + content: const Text('This action cannot be undone.'), 220 + actions: [ 221 + TextButton(onPressed: () => Navigator.pop(context), child: const Text('Cancel')), 222 + FilledButton( 223 + onPressed: () { 224 + Navigator.pop(context); 225 + context.read<PostActionCubit>().deletePost(); 226 + }, 227 + style: FilledButton.styleFrom( 228 + backgroundColor: Theme.of(context).colorScheme.error, 229 + foregroundColor: Theme.of(context).colorScheme.onError, 230 + ), 231 + child: const Text('Delete'), 232 + ), 233 + ], 234 + ), 235 + ); 236 + } 237 + 238 + void _copyToClipboard(BuildContext context, String text) { 239 + Clipboard.setData(ClipboardData(text: text)); 240 + ScaffoldMessenger.of( 241 + context, 242 + ).showSnackBar(const SnackBar(content: Text('Link copied to clipboard'), behavior: SnackBarBehavior.floating)); 243 + } 244 + 245 + String _convertAtUriToBskyUrl(String atUri) { 246 + try { 247 + final uri = Uri.parse(atUri); 248 + final parts = uri.pathSegments; 249 + if (parts.length >= 2) { 250 + final did = uri.host; 251 + final rkey = parts.last; 252 + return 'https://bsky.app/profile/$did/post/$rkey'; 253 + } 254 + } catch (_) { 255 + log.d('failed to convert atUri to bskyUrl'); 256 + } 257 + return atUri; 258 + } 259 + }
+87 -4
lib/features/profile/presentation/profile_screen.dart
··· 1 1 import 'package:bluesky/app_bsky_actor_defs.dart'; 2 2 import 'package:flutter/material.dart'; 3 + import 'package:flutter/services.dart'; 3 4 import 'package:flutter_bloc/flutter_bloc.dart'; 4 5 import 'package:go_router/go_router.dart'; 5 6 import 'package:intl/intl.dart'; 6 7 import 'package:lazurite/features/auth/bloc/auth_bloc.dart'; 7 8 import 'package:lazurite/features/feed/bloc/feed_bloc.dart'; 8 - import 'package:lazurite/features/feed/presentation/widgets/post_card.dart'; 9 + import 'package:lazurite/features/feed/presentation/widgets/post_card_with_actions.dart'; 9 10 import 'package:lazurite/features/profile/bloc/profile_bloc.dart'; 11 + import 'package:lazurite/features/profile/cubit/profile_action_cubit.dart'; 12 + import 'package:lazurite/features/profile/data/profile_action_repository.dart'; 13 + import 'package:lazurite/features/profile/presentation/widgets/profile_action_buttons.dart'; 14 + import 'package:share_plus/share_plus.dart'; 10 15 import 'package:url_launcher/url_launcher.dart'; 11 16 12 17 class ProfileScreen extends StatefulWidget { ··· 86 91 return BlocBuilder<FeedBloc, FeedState>( 87 92 builder: (context, feedState) { 88 93 final profile = profileState.profile; 94 + final isOwnProfile = profile?.did == _resolvedActor; 89 95 90 96 return NestedScrollView( 91 97 headerSliverBuilder: (context, innerBoxIsScrolled) { ··· 115 121 child: Center(child: CircularProgressIndicator()), 116 122 ), 117 123 ProfileStatus.error => _buildProfileError(context, profileState.errorMessage), 118 - _ => _buildProfileSummary(context, profile), 124 + _ => _buildProfileSummary(context, profile, isOwnProfile), 119 125 }, 120 126 ), 121 127 SliverPersistentHeader( ··· 179 185 ); 180 186 } 181 187 182 - Widget _buildProfileSummary(BuildContext context, ProfileViewDetailed? profile) { 188 + Widget _buildProfileSummary(BuildContext context, ProfileViewDetailed? profile, bool isOwnProfile) { 183 189 if (profile == null) { 184 190 return const SizedBox.shrink(); 185 191 } ··· 233 239 _buildStat(context, profile.postsCount ?? 0, 'Posts'), 234 240 ], 235 241 ), 242 + if (!isOwnProfile) ...[const SizedBox(height: 16), _buildProfileActions(context, profile)], 236 243 ], 237 244 ), 238 245 ); ··· 310 317 ); 311 318 } 312 319 320 + Widget _buildProfileActions(BuildContext context, ProfileViewDetailed profile) { 321 + final viewer = profile.viewer; 322 + 323 + return BlocProvider( 324 + create: (context) => ProfileActionCubit( 325 + profileActionRepository: context.read<ProfileActionRepository>(), 326 + actorDid: profile.did, 327 + isFollowing: viewer?.following != null, 328 + isMuted: viewer?.muted ?? false, 329 + isBlocked: viewer?.blocking != null, 330 + isBlockedBy: viewer?.blockedBy ?? false, 331 + followUri: viewer?.following?.toString(), 332 + blockUri: viewer?.blocking?.toString(), 333 + ), 334 + child: BlocConsumer<ProfileActionCubit, ProfileActionState>( 335 + listener: (context, state) { 336 + if (state.error != null) { 337 + ScaffoldMessenger.of( 338 + context, 339 + ).showSnackBar(SnackBar(content: Text(state.error!), behavior: SnackBarBehavior.floating)); 340 + context.read<ProfileActionCubit>().clearError(); 341 + } 342 + }, 343 + builder: (context, state) => ProfileActionButtons( 344 + isFollowing: state.isFollowing, 345 + isMuted: state.isMuted, 346 + isBlocked: state.isBlocked, 347 + isBlockedBy: state.isBlockedBy, 348 + isLoadingFollow: state.isLoadingFollow, 349 + isLoadingMute: state.isLoadingMute, 350 + isLoadingBlock: state.isLoadingBlock, 351 + onFollow: () => context.read<ProfileActionCubit>().toggleFollow(), 352 + onUnfollow: () => context.read<ProfileActionCubit>().toggleFollow(), 353 + onMute: () => context.read<ProfileActionCubit>().toggleMute(), 354 + onUnmute: () => context.read<ProfileActionCubit>().toggleMute(), 355 + onBlock: () => context.read<ProfileActionCubit>().toggleBlock(), 356 + onUnblock: () => context.read<ProfileActionCubit>().toggleBlock(), 357 + onMore: () => _showProfileMoreOptions(context, profile), 358 + ), 359 + ), 360 + ); 361 + } 362 + 363 + void _showProfileMoreOptions(BuildContext context, ProfileViewDetailed profile) { 364 + showModalBottomSheet<void>( 365 + context: context, 366 + builder: (sheetContext) => SafeArea( 367 + child: Column( 368 + mainAxisSize: MainAxisSize.min, 369 + children: [ 370 + ListTile( 371 + leading: const Icon(Icons.copy), 372 + title: const Text('Copy DID'), 373 + onTap: () { 374 + Clipboard.setData(ClipboardData(text: profile.did)); 375 + Navigator.pop(sheetContext); 376 + ScaffoldMessenger.of(context).showSnackBar( 377 + const SnackBar(content: Text('DID copied to clipboard'), behavior: SnackBarBehavior.floating), 378 + ); 379 + }, 380 + ), 381 + ListTile( 382 + leading: const Icon(Icons.share_outlined), 383 + title: const Text('Share Profile'), 384 + onTap: () { 385 + Navigator.pop(sheetContext); 386 + final url = 'https://bsky.app/profile/${profile.handle}'; 387 + Share.share(url); 388 + }, 389 + ), 390 + ], 391 + ), 392 + ), 393 + ); 394 + } 395 + 313 396 Widget _buildFeedList(FeedState feedState, FeedFilter tabFilter) { 314 397 if (feedState.isLoading && feedState.filter == tabFilter) { 315 398 return const Center(child: CircularProgressIndicator()); ··· 350 433 ); 351 434 } 352 435 353 - return PostCard(feedViewPost: feedState.posts[index]); 436 + return PostCardWithActions(feedViewPost: feedState.posts[index], accountDid: _resolvedActor ?? ''); 354 437 }, 355 438 ), 356 439 ),
+287
lib/features/profile/presentation/widgets/profile_action_buttons.dart
··· 1 + import 'package:flutter/material.dart'; 2 + import 'package:flutter/services.dart'; 3 + 4 + class ProfileActionButtons extends StatelessWidget { 5 + const ProfileActionButtons({ 6 + super.key, 7 + required this.isFollowing, 8 + required this.isMuted, 9 + required this.isBlocked, 10 + required this.isBlockedBy, 11 + required this.isLoadingFollow, 12 + required this.isLoadingMute, 13 + required this.isLoadingBlock, 14 + this.onFollow, 15 + this.onUnfollow, 16 + this.onMute, 17 + this.onUnmute, 18 + this.onBlock, 19 + this.onUnblock, 20 + this.onMore, 21 + }); 22 + 23 + final bool isFollowing; 24 + final bool isMuted; 25 + final bool isBlocked; 26 + final bool isBlockedBy; 27 + final bool isLoadingFollow; 28 + final bool isLoadingMute; 29 + final bool isLoadingBlock; 30 + final VoidCallback? onFollow; 31 + final VoidCallback? onUnfollow; 32 + final VoidCallback? onMute; 33 + final VoidCallback? onUnmute; 34 + final VoidCallback? onBlock; 35 + final VoidCallback? onUnblock; 36 + final VoidCallback? onMore; 37 + 38 + @override 39 + Widget build(BuildContext context) { 40 + if (isBlockedBy) { 41 + return const SizedBox.shrink(); 42 + } 43 + 44 + return Row( 45 + mainAxisSize: MainAxisSize.min, 46 + children: [_buildFollowButton(context), const SizedBox(width: 8), _buildMoreButton(context)], 47 + ); 48 + } 49 + 50 + Widget _buildFollowButton(BuildContext context) { 51 + if (isBlocked) { 52 + return _ActionButton( 53 + label: 'Unblock', 54 + onPressed: onUnblock != null ? () => _confirmUnblock(context) : null, 55 + isLoading: isLoadingBlock, 56 + foregroundColor: Theme.of(context).colorScheme.onError, 57 + backgroundColor: Theme.of(context).colorScheme.error, 58 + ); 59 + } 60 + 61 + if (isFollowing) { 62 + return _ActionButton( 63 + label: 'Following', 64 + onPressed: onUnfollow != null ? () => _confirmUnfollow(context) : null, 65 + isLoading: isLoadingFollow, 66 + isSecondary: true, 67 + ); 68 + } 69 + 70 + return _ActionButton(label: 'Follow', onPressed: onFollow, isLoading: isLoadingFollow); 71 + } 72 + 73 + Widget _buildMoreButton(BuildContext context) { 74 + final List<PopupMenuEntry<void>> menuItems = []; 75 + 76 + if (!isBlocked) { 77 + if (isMuted) { 78 + menuItems.add( 79 + PopupMenuItem( 80 + child: const Row(children: [Icon(Icons.volume_up_outlined), SizedBox(width: 8), Text('Unmute')]), 81 + onTap: () => _confirmUnmute(context), 82 + ), 83 + ); 84 + } else { 85 + menuItems.add( 86 + PopupMenuItem( 87 + child: const Row(children: [Icon(Icons.volume_off_outlined), SizedBox(width: 8), Text('Mute')]), 88 + onTap: () => _confirmMute(context), 89 + ), 90 + ); 91 + } 92 + 93 + menuItems.add( 94 + PopupMenuItem( 95 + child: const Row( 96 + children: [ 97 + Icon(Icons.block_outlined, color: Colors.red), 98 + SizedBox(width: 8), 99 + Text('Block', style: TextStyle(color: Colors.red)), 100 + ], 101 + ), 102 + onTap: () => _confirmBlock(context), 103 + ), 104 + ); 105 + } 106 + 107 + menuItems.addAll([ 108 + const PopupMenuDivider(), 109 + PopupMenuItem( 110 + onTap: onMore, 111 + child: const Row( 112 + children: [ 113 + Icon(Icons.report_outlined, color: Colors.orange), 114 + SizedBox(width: 8), 115 + Text('Report', style: TextStyle(color: Colors.orange)), 116 + ], 117 + ), 118 + ), 119 + ]); 120 + 121 + return PopupMenuButton<void>(icon: const Icon(Icons.more_vert), itemBuilder: (_) => menuItems); 122 + } 123 + 124 + void _confirmUnfollow(BuildContext context) { 125 + HapticFeedback.mediumImpact(); 126 + showDialog<void>( 127 + context: context, 128 + builder: (context) => AlertDialog( 129 + title: const Text('Unfollow?'), 130 + content: const Text('You will no longer see their posts in your feed.'), 131 + actions: [ 132 + TextButton(onPressed: () => Navigator.pop(context), child: const Text('Cancel')), 133 + FilledButton( 134 + onPressed: () { 135 + Navigator.pop(context); 136 + onUnfollow?.call(); 137 + }, 138 + child: const Text('Unfollow'), 139 + ), 140 + ], 141 + ), 142 + ); 143 + } 144 + 145 + void _confirmMute(BuildContext context) { 146 + HapticFeedback.mediumImpact(); 147 + showDialog<void>( 148 + context: context, 149 + builder: (context) => AlertDialog( 150 + title: const Text('Mute Account?'), 151 + content: const Text('You will no longer see their posts or receive notifications from them.'), 152 + actions: [ 153 + TextButton(onPressed: () => Navigator.pop(context), child: const Text('Cancel')), 154 + FilledButton( 155 + onPressed: () { 156 + Navigator.pop(context); 157 + onMute?.call(); 158 + }, 159 + child: const Text('Mute'), 160 + ), 161 + ], 162 + ), 163 + ); 164 + } 165 + 166 + void _confirmUnmute(BuildContext context) { 167 + HapticFeedback.mediumImpact(); 168 + showDialog<void>( 169 + context: context, 170 + builder: (context) => AlertDialog( 171 + title: const Text('Unmute Account?'), 172 + content: const Text('You will see their posts and receive notifications again.'), 173 + actions: [ 174 + TextButton(onPressed: () => Navigator.pop(context), child: const Text('Cancel')), 175 + FilledButton( 176 + onPressed: () { 177 + Navigator.pop(context); 178 + onUnmute?.call(); 179 + }, 180 + child: const Text('Unmute'), 181 + ), 182 + ], 183 + ), 184 + ); 185 + } 186 + 187 + void _confirmBlock(BuildContext context) { 188 + HapticFeedback.heavyImpact(); 189 + showDialog<void>( 190 + context: context, 191 + builder: (context) => AlertDialog( 192 + title: Row( 193 + children: [ 194 + Icon(Icons.block, color: Theme.of(context).colorScheme.error), 195 + const SizedBox(width: 8), 196 + const Text('Block Account?'), 197 + ], 198 + ), 199 + content: const Text( 200 + 'They will not be able to see your posts or interact with you. They will not be notified that you blocked them.', 201 + ), 202 + actions: [ 203 + TextButton(onPressed: () => Navigator.pop(context), child: const Text('Cancel')), 204 + FilledButton( 205 + onPressed: () { 206 + Navigator.pop(context); 207 + onBlock?.call(); 208 + }, 209 + style: FilledButton.styleFrom( 210 + backgroundColor: Theme.of(context).colorScheme.error, 211 + foregroundColor: Theme.of(context).colorScheme.onError, 212 + ), 213 + child: const Text('Block'), 214 + ), 215 + ], 216 + ), 217 + ); 218 + } 219 + 220 + void _confirmUnblock(BuildContext context) { 221 + HapticFeedback.mediumImpact(); 222 + showDialog<void>( 223 + context: context, 224 + builder: (context) => AlertDialog( 225 + title: const Text('Unblock Account?'), 226 + content: const Text('They will be able to see your posts and interact with you again.'), 227 + actions: [ 228 + TextButton(onPressed: () => Navigator.pop(context), child: const Text('Cancel')), 229 + FilledButton( 230 + onPressed: () { 231 + Navigator.pop(context); 232 + onUnblock?.call(); 233 + }, 234 + child: const Text('Unblock'), 235 + ), 236 + ], 237 + ), 238 + ); 239 + } 240 + } 241 + 242 + class _ActionButton extends StatelessWidget { 243 + const _ActionButton({ 244 + required this.label, 245 + this.onPressed, 246 + this.isLoading = false, 247 + this.isSecondary = false, 248 + this.foregroundColor, 249 + this.backgroundColor, 250 + }); 251 + 252 + final String label; 253 + final VoidCallback? onPressed; 254 + final bool isLoading; 255 + final bool isSecondary; 256 + final Color? foregroundColor; 257 + final Color? backgroundColor; 258 + 259 + @override 260 + Widget build(BuildContext context) { 261 + final theme = Theme.of(context); 262 + 263 + if (isSecondary) { 264 + return OutlinedButton(onPressed: isLoading ? null : onPressed, child: _buildChild(theme)); 265 + } 266 + 267 + return FilledButton( 268 + onPressed: isLoading ? null : onPressed, 269 + style: FilledButton.styleFrom(foregroundColor: foregroundColor, backgroundColor: backgroundColor), 270 + child: _buildChild(theme), 271 + ); 272 + } 273 + 274 + Widget _buildChild(ThemeData theme) { 275 + if (isLoading) { 276 + return SizedBox( 277 + width: 16, 278 + height: 16, 279 + child: CircularProgressIndicator( 280 + strokeWidth: 2, 281 + color: isSecondary ? theme.colorScheme.primary : (foregroundColor ?? theme.colorScheme.onPrimary), 282 + ), 283 + ); 284 + } 285 + return Text(label); 286 + } 287 + }
+256
lib/features/profile/presentation/widgets/report_dialog.dart
··· 1 + import 'package:atproto/com_atproto_moderation_defs.dart'; 2 + import 'package:atproto_core/atproto_core.dart'; 3 + import 'package:flutter/material.dart'; 4 + import 'package:flutter/services.dart'; 5 + import 'package:flutter_bloc/flutter_bloc.dart'; 6 + import 'package:lazurite/features/profile/cubit/profile_action_cubit.dart'; 7 + 8 + enum _ReportType { post, actor } 9 + 10 + class ReportDialog extends StatefulWidget { 11 + const ReportDialog.post({super.key, required this.postUri, required this.cid, required this.authorHandle}) 12 + : actorDid = null, 13 + _type = _ReportType.post; 14 + 15 + const ReportDialog.actor({super.key, required String did, required this.authorHandle}) 16 + : postUri = null, 17 + cid = null, 18 + actorDid = did, 19 + _type = _ReportType.actor; 20 + 21 + final AtUri? postUri; 22 + final String? cid; 23 + final String? actorDid; 24 + final String authorHandle; 25 + final _ReportType _type; 26 + 27 + @override 28 + State<ReportDialog> createState() => _ReportDialogState(); 29 + } 30 + 31 + class _ReportDialogState extends State<ReportDialog> { 32 + final _reasonController = TextEditingController(); 33 + ReasonType? _selectedReason; 34 + bool _isSubmitting = false; 35 + 36 + static const _reasonOptions = [ 37 + ( 38 + type: ReasonType.knownValue(data: KnownReasonType.comAtprotoModerationDefsReasonSpam), 39 + label: 'Spam', 40 + description: 'Spam or unsolicited content', 41 + ), 42 + ( 43 + type: ReasonType.knownValue(data: KnownReasonType.comAtprotoModerationDefsReasonViolation), 44 + label: 'Violation', 45 + description: 'Violates community guidelines', 46 + ), 47 + ( 48 + type: ReasonType.knownValue(data: KnownReasonType.comAtprotoModerationDefsReasonMisleading), 49 + label: 'Misleading', 50 + description: 'Misleading or deceptive content', 51 + ), 52 + ( 53 + type: ReasonType.knownValue(data: KnownReasonType.comAtprotoModerationDefsReasonSexual), 54 + label: 'Sexual Content', 55 + description: 'Unwanted sexual content', 56 + ), 57 + ( 58 + type: ReasonType.knownValue(data: KnownReasonType.comAtprotoModerationDefsReasonRude), 59 + label: 'Harassment', 60 + description: 'Harassment or rude behaviour', 61 + ), 62 + ( 63 + type: ReasonType.knownValue(data: KnownReasonType.comAtprotoModerationDefsReasonOther), 64 + label: 'Other', 65 + description: 'Other reason (requires explanation)', 66 + ), 67 + ]; 68 + 69 + @override 70 + void dispose() { 71 + _reasonController.dispose(); 72 + super.dispose(); 73 + } 74 + 75 + @override 76 + Widget build(BuildContext context) { 77 + final title = widget._type == _ReportType.post ? 'Report Post' : 'Report Account'; 78 + final target = widget.authorHandle; 79 + 80 + return AlertDialog( 81 + title: Text('$title by @$target'), 82 + content: SizedBox( 83 + width: double.maxFinite, 84 + child: Column( 85 + mainAxisSize: MainAxisSize.min, 86 + crossAxisAlignment: CrossAxisAlignment.start, 87 + children: [ 88 + Text('Reason', style: Theme.of(context).textTheme.titleSmall?.copyWith(fontWeight: FontWeight.w600)), 89 + const SizedBox(height: 8), 90 + ..._reasonOptions.map((option) => _buildReasonOption(option)), 91 + if (_requiresExplanation) ...[ 92 + const SizedBox(height: 16), 93 + Text( 94 + 'Explanation (required)', 95 + style: Theme.of(context).textTheme.titleSmall?.copyWith(fontWeight: FontWeight.w600), 96 + ), 97 + const SizedBox(height: 8), 98 + TextField( 99 + controller: _reasonController, 100 + maxLines: 3, 101 + maxLength: 2000, 102 + decoration: const InputDecoration( 103 + hintText: 'Please explain why you are reporting this...', 104 + border: OutlineInputBorder(), 105 + ), 106 + ), 107 + ], 108 + ], 109 + ), 110 + ), 111 + actions: [ 112 + TextButton(onPressed: _isSubmitting ? null : () => Navigator.pop(context), child: const Text('Cancel')), 113 + FilledButton( 114 + onPressed: _canSubmit ? _submit : null, 115 + child: _isSubmitting 116 + ? const SizedBox(width: 16, height: 16, child: CircularProgressIndicator(strokeWidth: 2)) 117 + : const Text('Submit Report'), 118 + ), 119 + ], 120 + ); 121 + } 122 + 123 + Widget _buildReasonOption(({ReasonType type, String label, String description}) option) { 124 + final isSelected = _selectedReason == option.type; 125 + final theme = Theme.of(context); 126 + 127 + return InkWell( 128 + onTap: _isSubmitting 129 + ? null 130 + : () { 131 + HapticFeedback.selectionClick(); 132 + setState(() { 133 + _selectedReason = option.type; 134 + }); 135 + }, 136 + child: Padding( 137 + padding: const EdgeInsets.symmetric(vertical: 8), 138 + child: Row( 139 + crossAxisAlignment: CrossAxisAlignment.start, 140 + children: [ 141 + Container( 142 + width: 20, 143 + height: 20, 144 + decoration: BoxDecoration( 145 + shape: BoxShape.circle, 146 + border: Border.all(color: isSelected ? theme.colorScheme.primary : theme.colorScheme.outline, width: 2), 147 + ), 148 + child: isSelected 149 + ? Center( 150 + child: Container( 151 + width: 10, 152 + height: 10, 153 + decoration: BoxDecoration(shape: BoxShape.circle, color: theme.colorScheme.primary), 154 + ), 155 + ) 156 + : null, 157 + ), 158 + const SizedBox(width: 12), 159 + Expanded( 160 + child: Column( 161 + crossAxisAlignment: CrossAxisAlignment.start, 162 + children: [ 163 + Text(option.label, style: theme.textTheme.bodyMedium?.copyWith(fontWeight: FontWeight.w500)), 164 + Text( 165 + option.description, 166 + style: theme.textTheme.bodySmall?.copyWith(color: theme.colorScheme.onSurfaceVariant), 167 + ), 168 + ], 169 + ), 170 + ), 171 + ], 172 + ), 173 + ), 174 + ); 175 + } 176 + 177 + bool get _requiresExplanation { 178 + if (_selectedReason == null) return false; 179 + if (_selectedReason!.isNotKnownValue) return false; 180 + return _selectedReason!.knownValue == KnownReasonType.comAtprotoModerationDefsReasonOther; 181 + } 182 + 183 + bool get _canSubmit { 184 + if (_selectedReason == null) return false; 185 + if (_requiresExplanation && _reasonController.text.trim().isEmpty) return false; 186 + return !_isSubmitting; 187 + } 188 + 189 + Future<void> _submit() async { 190 + if (!_canSubmit) return; 191 + 192 + setState(() { 193 + _isSubmitting = true; 194 + }); 195 + 196 + final cubit = context.read<ProfileActionCubit>(); 197 + final reason = _reasonController.text.trim().isNotEmpty ? _reasonController.text.trim() : null; 198 + 199 + String? reportId; 200 + 201 + if (widget._type == _ReportType.post && widget.postUri != null && widget.cid != null) { 202 + reportId = await cubit.reportPost( 203 + postUri: widget.postUri!, 204 + cid: widget.cid!, 205 + reasonType: _selectedReason!, 206 + reason: reason, 207 + ); 208 + } else if (widget._type == _ReportType.actor) { 209 + reportId = await cubit.reportActor(reasonType: _selectedReason!, reason: reason); 210 + } 211 + 212 + if (mounted) { 213 + Navigator.pop(context); 214 + 215 + if (reportId != null) { 216 + _showSuccessDialog(reportId); 217 + } else { 218 + _showErrorDialog(); 219 + } 220 + } 221 + } 222 + 223 + void _showSuccessDialog(String reportId) { 224 + showDialog<void>( 225 + context: context, 226 + builder: (context) => AlertDialog( 227 + title: const Row( 228 + children: [ 229 + Icon(Icons.check_circle, color: Colors.green), 230 + SizedBox(width: 8), 231 + Text('Report Submitted'), 232 + ], 233 + ), 234 + content: Text('Thank you. Your report (ID: $reportId) has been submitted.'), 235 + actions: [FilledButton(onPressed: () => Navigator.pop(context), child: const Text('OK'))], 236 + ), 237 + ); 238 + } 239 + 240 + void _showErrorDialog() { 241 + showDialog<void>( 242 + context: context, 243 + builder: (context) => AlertDialog( 244 + title: const Row( 245 + children: [ 246 + Icon(Icons.error_outline, color: Colors.red), 247 + SizedBox(width: 8), 248 + Text('Report Failed'), 249 + ], 250 + ), 251 + content: const Text('Unable to submit your report. Please try again later.'), 252 + actions: [FilledButton(onPressed: () => Navigator.pop(context), child: const Text('OK'))], 253 + ), 254 + ); 255 + } 256 + }
+6
lib/features/settings/presentation/settings_screen.dart
··· 53 53 subtitle: 'Manage pinned and saved feeds', 54 54 onTap: () => context.push('/feeds'), 55 55 ), 56 + _SettingsTile( 57 + icon: Icons.bookmark_outline, 58 + title: 'Saved Posts', 59 + subtitle: 'View your saved posts', 60 + onTap: () => context.push('/saved'), 61 + ), 56 62 _SettingsTile(icon: Icons.person_outline, title: 'Edit Profile', subtitle: 'Name, bio, avatar', onTap: () {}), 57 63 _SettingsTile(icon: Icons.lock_outline, title: 'Privacy', subtitle: 'Visibility settings', onTap: () {}), 58 64 const SizedBox(height: 24),
+10
lib/main.dart
··· 21 21 import 'package:lazurite/features/search/bloc/search_bloc.dart'; 22 22 import 'package:lazurite/features/search/data/search_repository.dart'; 23 23 import 'package:lazurite/features/settings/bloc/settings_cubit.dart'; 24 + import 'package:lazurite/features/feed/cubit/saved_posts_cubit.dart'; 25 + import 'package:lazurite/features/feed/data/post_action_repository.dart'; 26 + import 'package:lazurite/features/profile/data/profile_action_repository.dart'; 24 27 import 'package:lazurite/features/settings/bloc/settings_state.dart'; 25 28 26 29 Future<void> main() async { ··· 119 122 120 123 final feedRepository = FeedRepository(bluesky: bluesky); 121 124 final searchRepository = SearchRepository(bluesky: bluesky); 125 + final postActionRepository = PostActionRepository(bluesky: bluesky); 126 + final profileActionRepository = ProfileActionRepository(bluesky: bluesky); 122 127 final accountDid = authState.tokens?.did ?? ''; 123 128 124 129 return MultiBlocProvider( ··· 141 146 create: (_) => 142 147 SearchBloc(searchRepository: searchRepository, database: widget.database, accountDid: accountDid), 143 148 ), 149 + BlocProvider( 150 + create: (_) => SavedPostsCubit(database: widget.database, accountDid: accountDid), 151 + ), 144 152 RepositoryProvider.value(value: feedRepository), 145 153 RepositoryProvider.value(value: searchRepository), 154 + RepositoryProvider.value(value: postActionRepository), 155 + RepositoryProvider.value(value: profileActionRepository), 146 156 RepositoryProvider.value(value: bluesky), 147 157 RepositoryProvider.value(value: widget.database), 148 158 RepositoryProvider.value(value: accountDid),