diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 52bb68b..690dfe5 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -84,7 +84,7 @@ PODS: - Flutter - flutter_platform_alert (0.0.1): - Flutter - - flutter_secure_storage (3.3.1): + - flutter_secure_storage (6.0.0): - Flutter - flutter_timezone (0.0.1): - Flutter @@ -362,7 +362,7 @@ SPEC CHECKSUMS: flutter_inappwebview_ios: b89ba3482b96fb25e00c967aae065701b66e9b99 flutter_native_splash: c32d145d68aeda5502d5f543ee38c192065986cf flutter_platform_alert: bf3b5fcd4ac14bd637e20527e9c471633071afd3 - flutter_secure_storage: 50035aef357c5a8bdd67fd6bc81370d46efc4d16 + flutter_secure_storage: 1ed9476fba7e7a782b22888f956cce43e2c62f13 flutter_timezone: 7c838e17ffd4645d261e87037e5bebf6d38fe544 flutter_udid: f7c3884e6ec2951efe4f9de082257fc77c4d15e9 flutter_webrtc: fd0d3bdef8766a0736dbbe2e5b7e85f1f3c52117 diff --git a/lib/main.dart b/lib/main.dart index 99c445f..34b310a 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -18,7 +18,7 @@ import 'package:bitsdojo_window/bitsdojo_window.dart'; import 'package:island/pods/userinfo.dart'; import 'package:island/pods/websocket.dart'; import 'package:island/route.dart'; -import 'package:island/screens/tabs.dart'; + import 'package:island/services/notify.dart'; import 'package:island/services/timezone.dart'; import 'package:island/widgets/alert.dart'; @@ -125,7 +125,7 @@ void main() async { ); } -final appRouter = AppRouter(); +// Router will be provided through Riverpod final globalOverlay = GlobalKey(); @@ -141,7 +141,8 @@ class IslandApp extends HookConsumerWidget { var uri = notification.data['action_uri'] as String; if (uri.startsWith('/')) { // In-app routes - appRouter.pushPath(notification.data['action_uri']); + final router = ref.read(routerProvider); + router.go(notification.data['action_uri']); } else { // External links launchUrlString(uri); @@ -183,20 +184,13 @@ class IslandApp extends HookConsumerWidget { return null; }, []); + final router = ref.watch(routerProvider); + return MaterialApp.router( theme: theme?.light, darkTheme: theme?.dark, themeMode: ThemeMode.system, - routerConfig: appRouter.config( - navigatorObservers: - () => [ - TabNavigationObserver( - onChange: (route) { - ref.read(currentRouteProvider.notifier).state = route; - }, - ), - ], - ), + routerConfig: router, supportedLocales: context.supportedLocales, localizationsDelegates: [ ...context.localizationDelegates, @@ -211,7 +205,6 @@ class IslandApp extends HookConsumerWidget { OverlayEntry( builder: (_) => WindowScaffold( - router: appRouter, child: child ?? const SizedBox.shrink(), ), ), diff --git a/lib/models/activity.freezed.dart b/lib/models/activity.freezed.dart index 3a40705..4bcfcc5 100644 --- a/lib/models/activity.freezed.dart +++ b/lib/models/activity.freezed.dart @@ -26,7 +26,6 @@ $SnActivityCopyWith get copyWith => _$SnActivityCopyWithImpl toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnActivity&&(identical(other.id, id) || other.id == id)&&(identical(other.type, type) || other.type == type)&&(identical(other.resourceIdentifier, resourceIdentifier) || other.resourceIdentifier == resourceIdentifier)&&const DeepCollectionEquality().equals(other.data, data)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); @@ -41,7 +40,6 @@ String toString() { return 'SnActivity(id: $id, type: $type, resourceIdentifier: $resourceIdentifier, data: $data, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -52,9 +50,6 @@ $Res call({ String id, String type, String resourceIdentifier, dynamic data, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - - - } /// @nodoc class _$SnActivityCopyWithImpl<$Res> @@ -81,7 +76,6 @@ as DateTime?, } - /// @nodoc @JsonSerializable() @@ -122,7 +116,6 @@ String toString() { return 'SnActivity(id: $id, type: $type, resourceIdentifier: $resourceIdentifier, data: $data, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -133,9 +126,6 @@ $Res call({ String id, String type, String resourceIdentifier, dynamic data, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - - - } /// @nodoc class __$SnActivityCopyWithImpl<$Res> @@ -160,10 +150,8 @@ as DateTime?, )); } - } - /// @nodoc mixin _$SnCheckInResult { @@ -177,7 +165,6 @@ $SnCheckInResultCopyWith get copyWith => _$SnCheckInResultCopyW /// Serializes this SnCheckInResult to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnCheckInResult&&(identical(other.id, id) || other.id == id)&&(identical(other.level, level) || other.level == level)&&const DeepCollectionEquality().equals(other.tips, tips)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.account, account) || other.account == account)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); @@ -192,7 +179,6 @@ String toString() { return 'SnCheckInResult(id: $id, level: $level, tips: $tips, accountId: $accountId, account: $account, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -203,7 +189,6 @@ $Res call({ String id, int level, List tips, String accountId, SnAccount? account, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - $SnAccountCopyWith<$Res>? get account; } @@ -245,7 +230,6 @@ $SnAccountCopyWith<$Res>? get account { } } - /// @nodoc @JsonSerializable() @@ -293,7 +277,6 @@ String toString() { return 'SnCheckInResult(id: $id, level: $level, tips: $tips, accountId: $accountId, account: $account, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -304,7 +287,6 @@ $Res call({ String id, int level, List tips, String accountId, SnAccount? account, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - @override $SnAccountCopyWith<$Res>? get account; } @@ -347,7 +329,6 @@ $SnAccountCopyWith<$Res>? get account { } } - /// @nodoc mixin _$SnFortuneTip { @@ -361,7 +342,6 @@ $SnFortuneTipCopyWith get copyWith => _$SnFortuneTipCopyWithImpl toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnFortuneTip&&(identical(other.isPositive, isPositive) || other.isPositive == isPositive)&&(identical(other.title, title) || other.title == title)&&(identical(other.content, content) || other.content == content)); @@ -376,7 +356,6 @@ String toString() { return 'SnFortuneTip(isPositive: $isPositive, title: $title, content: $content)'; } - } /// @nodoc @@ -387,9 +366,6 @@ $Res call({ bool isPositive, String title, String content }); - - - } /// @nodoc class _$SnFortuneTipCopyWithImpl<$Res> @@ -412,7 +388,6 @@ as String, } - /// @nodoc @JsonSerializable() @@ -449,7 +424,6 @@ String toString() { return 'SnFortuneTip(isPositive: $isPositive, title: $title, content: $content)'; } - } /// @nodoc @@ -460,9 +434,6 @@ $Res call({ bool isPositive, String title, String content }); - - - } /// @nodoc class __$SnFortuneTipCopyWithImpl<$Res> @@ -483,10 +454,8 @@ as String, )); } - } - /// @nodoc mixin _$SnEventCalendarEntry { @@ -500,7 +469,6 @@ $SnEventCalendarEntryCopyWith get copyWith => _$SnEventCal /// Serializes this SnEventCalendarEntry to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnEventCalendarEntry&&(identical(other.date, date) || other.date == date)&&(identical(other.checkInResult, checkInResult) || other.checkInResult == checkInResult)&&const DeepCollectionEquality().equals(other.statuses, statuses)); @@ -515,7 +483,6 @@ String toString() { return 'SnEventCalendarEntry(date: $date, checkInResult: $checkInResult, statuses: $statuses)'; } - } /// @nodoc @@ -526,7 +493,6 @@ $Res call({ DateTime date, SnCheckInResult? checkInResult, List statuses }); - $SnCheckInResultCopyWith<$Res>? get checkInResult; } @@ -563,7 +529,6 @@ $SnCheckInResultCopyWith<$Res>? get checkInResult { } } - /// @nodoc @JsonSerializable() @@ -580,7 +545,6 @@ class _SnEventCalendarEntry implements SnEventCalendarEntry { return EqualUnmodifiableListView(_statuses); } - /// Create a copy of SnEventCalendarEntry /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @@ -606,7 +570,6 @@ String toString() { return 'SnEventCalendarEntry(date: $date, checkInResult: $checkInResult, statuses: $statuses)'; } - } /// @nodoc @@ -617,7 +580,6 @@ $Res call({ DateTime date, SnCheckInResult? checkInResult, List statuses }); - @override $SnCheckInResultCopyWith<$Res>? get checkInResult; } diff --git a/lib/models/auth.freezed.dart b/lib/models/auth.freezed.dart index 0fdeee2..946a71b 100644 --- a/lib/models/auth.freezed.dart +++ b/lib/models/auth.freezed.dart @@ -26,7 +26,6 @@ $AppTokenCopyWith get copyWith => _$AppTokenCopyWithImpl(thi /// Serializes this AppToken to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is AppToken&&(identical(other.token, token) || other.token == token)); @@ -41,7 +40,6 @@ String toString() { return 'AppToken(token: $token)'; } - } /// @nodoc @@ -52,9 +50,6 @@ $Res call({ String token }); - - - } /// @nodoc class _$AppTokenCopyWithImpl<$Res> @@ -75,7 +70,6 @@ as String, } - /// @nodoc @JsonSerializable() @@ -110,7 +104,6 @@ String toString() { return 'AppToken(token: $token)'; } - } /// @nodoc @@ -121,9 +114,6 @@ $Res call({ String token }); - - - } /// @nodoc class __$AppTokenCopyWithImpl<$Res> @@ -142,10 +132,8 @@ as String, )); } - } - /// @nodoc mixin _$SnAuthChallenge { @@ -159,7 +147,6 @@ $SnAuthChallengeCopyWith get copyWith => _$SnAuthChallengeCopyW /// Serializes this SnAuthChallenge to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAuthChallenge&&(identical(other.id, id) || other.id == id)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.stepRemain, stepRemain) || other.stepRemain == stepRemain)&&(identical(other.stepTotal, stepTotal) || other.stepTotal == stepTotal)&&(identical(other.failedAttempts, failedAttempts) || other.failedAttempts == failedAttempts)&&(identical(other.platform, platform) || other.platform == platform)&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other.blacklistFactors, blacklistFactors)&&const DeepCollectionEquality().equals(other.audiences, audiences)&&const DeepCollectionEquality().equals(other.scopes, scopes)&&(identical(other.ipAddress, ipAddress) || other.ipAddress == ipAddress)&&(identical(other.userAgent, userAgent) || other.userAgent == userAgent)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.nonce, nonce) || other.nonce == nonce)&&(identical(other.location, location) || other.location == location)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); @@ -174,7 +161,6 @@ String toString() { return 'SnAuthChallenge(id: $id, expiredAt: $expiredAt, stepRemain: $stepRemain, stepTotal: $stepTotal, failedAttempts: $failedAttempts, platform: $platform, type: $type, blacklistFactors: $blacklistFactors, audiences: $audiences, scopes: $scopes, ipAddress: $ipAddress, userAgent: $userAgent, deviceId: $deviceId, nonce: $nonce, location: $location, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -185,9 +171,6 @@ $Res call({ String id, DateTime expiredAt, int stepRemain, int stepTotal, int failedAttempts, int platform, int type, List blacklistFactors, List audiences, List scopes, String ipAddress, String userAgent, String deviceId, String? nonce, String? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - - - } /// @nodoc class _$SnAuthChallengeCopyWithImpl<$Res> @@ -226,7 +209,6 @@ as DateTime?, } - /// @nodoc @JsonSerializable() @@ -297,7 +279,6 @@ String toString() { return 'SnAuthChallenge(id: $id, expiredAt: $expiredAt, stepRemain: $stepRemain, stepTotal: $stepTotal, failedAttempts: $failedAttempts, platform: $platform, type: $type, blacklistFactors: $blacklistFactors, audiences: $audiences, scopes: $scopes, ipAddress: $ipAddress, userAgent: $userAgent, deviceId: $deviceId, nonce: $nonce, location: $location, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -308,9 +289,6 @@ $Res call({ String id, DateTime expiredAt, int stepRemain, int stepTotal, int failedAttempts, int platform, int type, List blacklistFactors, List audiences, List scopes, String ipAddress, String userAgent, String deviceId, String? nonce, String? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - - - } /// @nodoc class __$SnAuthChallengeCopyWithImpl<$Res> @@ -347,10 +325,8 @@ as DateTime?, )); } - } - /// @nodoc mixin _$SnAuthSession { @@ -364,7 +340,6 @@ $SnAuthSessionCopyWith get copyWith => _$SnAuthSessionCopyWithImp /// Serializes this SnAuthSession to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAuthSession&&(identical(other.id, id) || other.id == id)&&(identical(other.label, label) || other.label == label)&&(identical(other.lastGrantedAt, lastGrantedAt) || other.lastGrantedAt == lastGrantedAt)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.challengeId, challengeId) || other.challengeId == challengeId)&&(identical(other.challenge, challenge) || other.challenge == challenge)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); @@ -379,7 +354,6 @@ String toString() { return 'SnAuthSession(id: $id, label: $label, lastGrantedAt: $lastGrantedAt, expiredAt: $expiredAt, accountId: $accountId, challengeId: $challengeId, challenge: $challenge, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -390,7 +364,6 @@ $Res call({ String id, String? label, DateTime lastGrantedAt, DateTime expiredAt, String accountId, String challengeId, SnAuthChallenge challenge, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - $SnAuthChallengeCopyWith<$Res> get challenge; } @@ -431,7 +404,6 @@ $SnAuthChallengeCopyWith<$Res> get challenge { } } - /// @nodoc @JsonSerializable() @@ -475,7 +447,6 @@ String toString() { return 'SnAuthSession(id: $id, label: $label, lastGrantedAt: $lastGrantedAt, expiredAt: $expiredAt, accountId: $accountId, challengeId: $challengeId, challenge: $challenge, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -486,7 +457,6 @@ $Res call({ String id, String? label, DateTime lastGrantedAt, DateTime expiredAt, String accountId, String challengeId, SnAuthChallenge challenge, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - @override $SnAuthChallengeCopyWith<$Res> get challenge; } @@ -528,7 +498,6 @@ $SnAuthChallengeCopyWith<$Res> get challenge { } } - /// @nodoc mixin _$SnAuthFactor { @@ -542,7 +511,6 @@ $SnAuthFactorCopyWith get copyWith => _$SnAuthFactorCopyWithImpl toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAuthFactor&&(identical(other.id, id) || other.id == id)&&(identical(other.type, type) || other.type == type)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.enabledAt, enabledAt) || other.enabledAt == enabledAt)&&(identical(other.trustworthy, trustworthy) || other.trustworthy == trustworthy)&&const DeepCollectionEquality().equals(other.createdResponse, createdResponse)); @@ -557,7 +525,6 @@ String toString() { return 'SnAuthFactor(id: $id, type: $type, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, expiredAt: $expiredAt, enabledAt: $enabledAt, trustworthy: $trustworthy, createdResponse: $createdResponse)'; } - } /// @nodoc @@ -568,9 +535,6 @@ $Res call({ String id, int type, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, DateTime? expiredAt, DateTime? enabledAt, int trustworthy, Map? createdResponse }); - - - } /// @nodoc class _$SnAuthFactorCopyWithImpl<$Res> @@ -599,7 +563,6 @@ as Map?, } - /// @nodoc @JsonSerializable() @@ -624,7 +587,6 @@ class _SnAuthFactor implements SnAuthFactor { return EqualUnmodifiableMapView(value); } - /// Create a copy of SnAuthFactor /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @@ -650,7 +612,6 @@ String toString() { return 'SnAuthFactor(id: $id, type: $type, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, expiredAt: $expiredAt, enabledAt: $enabledAt, trustworthy: $trustworthy, createdResponse: $createdResponse)'; } - } /// @nodoc @@ -661,9 +622,6 @@ $Res call({ String id, int type, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, DateTime? expiredAt, DateTime? enabledAt, int trustworthy, Map? createdResponse }); - - - } /// @nodoc class __$SnAuthFactorCopyWithImpl<$Res> @@ -690,10 +648,8 @@ as Map?, )); } - } - /// @nodoc mixin _$SnAuthDevice { @@ -708,7 +664,6 @@ $SnAuthDeviceCopyWith get copyWith => _$SnAuthDeviceCopyWithImpl toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAuthDevice&&const DeepCollectionEquality().equals(other.label, label)&&(identical(other.userAgent, userAgent) || other.userAgent == userAgent)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.platform, platform) || other.platform == platform)&&const DeepCollectionEquality().equals(other.sessions, sessions)&&(identical(other.isCurrent, isCurrent) || other.isCurrent == isCurrent)); @@ -723,7 +678,6 @@ String toString() { return 'SnAuthDevice(label: $label, userAgent: $userAgent, deviceId: $deviceId, platform: $platform, sessions: $sessions, isCurrent: $isCurrent)'; } - } /// @nodoc @@ -734,9 +688,6 @@ $Res call({ dynamic label, String userAgent, String deviceId, int platform, List sessions, bool isCurrent }); - - - } /// @nodoc class _$SnAuthDeviceCopyWithImpl<$Res> @@ -762,7 +713,6 @@ as bool, } - /// @nodoc @JsonSerializable() @@ -809,7 +759,6 @@ String toString() { return 'SnAuthDevice(label: $label, userAgent: $userAgent, deviceId: $deviceId, platform: $platform, sessions: $sessions, isCurrent: $isCurrent)'; } - } /// @nodoc @@ -820,9 +769,6 @@ $Res call({ dynamic label, String userAgent, String deviceId, int platform, List sessions, bool isCurrent }); - - - } /// @nodoc class __$SnAuthDeviceCopyWithImpl<$Res> @@ -846,10 +792,8 @@ as bool, )); } - } - /// @nodoc mixin _$SnAccountConnection { @@ -863,7 +807,6 @@ $SnAccountConnectionCopyWith get copyWith => _$SnAccountCon /// Serializes this SnAccountConnection to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAccountConnection&&(identical(other.id, id) || other.id == id)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.provider, provider) || other.provider == provider)&&(identical(other.providedIdentifier, providedIdentifier) || other.providedIdentifier == providedIdentifier)&&const DeepCollectionEquality().equals(other.meta, meta)&&(identical(other.lastUsedAt, lastUsedAt) || other.lastUsedAt == lastUsedAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); @@ -878,7 +821,6 @@ String toString() { return 'SnAccountConnection(id: $id, accountId: $accountId, provider: $provider, providedIdentifier: $providedIdentifier, meta: $meta, lastUsedAt: $lastUsedAt, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -889,9 +831,6 @@ $Res call({ String id, String accountId, String provider, String providedIdentifier, Map meta, DateTime lastUsedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - - - } /// @nodoc class _$SnAccountConnectionCopyWithImpl<$Res> @@ -920,7 +859,6 @@ as DateTime?, } - /// @nodoc @JsonSerializable() @@ -969,7 +907,6 @@ String toString() { return 'SnAccountConnection(id: $id, accountId: $accountId, provider: $provider, providedIdentifier: $providedIdentifier, meta: $meta, lastUsedAt: $lastUsedAt, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -980,9 +917,6 @@ $Res call({ String id, String accountId, String provider, String providedIdentifier, Map meta, DateTime lastUsedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - - - } /// @nodoc class __$SnAccountConnectionCopyWithImpl<$Res> @@ -1009,7 +943,6 @@ as DateTime?, )); } - } // dart format on diff --git a/lib/models/chat.freezed.dart b/lib/models/chat.freezed.dart index 86597ae..4d69a75 100644 --- a/lib/models/chat.freezed.dart +++ b/lib/models/chat.freezed.dart @@ -26,7 +26,6 @@ $SnChatRoomCopyWith get copyWith => _$SnChatRoomCopyWithImpl toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnChatRoom&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.type, type) || other.type == type)&&(identical(other.isPublic, isPublic) || other.isPublic == isPublic)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.realmId, realmId) || other.realmId == realmId)&&(identical(other.realm, realm) || other.realm == realm)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other.members, members)); @@ -41,7 +40,6 @@ String toString() { return 'SnChatRoom(id: $id, name: $name, description: $description, type: $type, isPublic: $isPublic, picture: $picture, background: $background, realmId: $realmId, realm: $realm, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, members: $members)'; } - } /// @nodoc @@ -52,7 +50,6 @@ $Res call({ String id, String? name, String? description, int type, bool isPublic, SnCloudFile? picture, SnCloudFile? background, String? realmId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List? members }); - $SnCloudFileCopyWith<$Res>? get picture;$SnCloudFileCopyWith<$Res>? get background;$SnRealmCopyWith<$Res>? get realm; } @@ -123,7 +120,6 @@ $SnRealmCopyWith<$Res>? get realm { } } - /// @nodoc @JsonSerializable() @@ -152,7 +148,6 @@ class _SnChatRoom implements SnChatRoom { return EqualUnmodifiableListView(value); } - /// Create a copy of SnChatRoom /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @@ -178,7 +173,6 @@ String toString() { return 'SnChatRoom(id: $id, name: $name, description: $description, type: $type, isPublic: $isPublic, picture: $picture, background: $background, realmId: $realmId, realm: $realm, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, members: $members)'; } - } /// @nodoc @@ -189,7 +183,6 @@ $Res call({ String id, String? name, String? description, int type, bool isPublic, SnCloudFile? picture, SnCloudFile? background, String? realmId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List? members }); - @override $SnCloudFileCopyWith<$Res>? get picture;@override $SnCloudFileCopyWith<$Res>? get background;@override $SnRealmCopyWith<$Res>? get realm; } @@ -261,7 +254,6 @@ $SnRealmCopyWith<$Res>? get realm { } } - /// @nodoc mixin _$SnChatMessage { @@ -275,7 +267,6 @@ $SnChatMessageCopyWith get copyWith => _$SnChatMessageCopyWithImp /// Serializes this SnChatMessage to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnChatMessage&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.id, id) || other.id == id)&&(identical(other.type, type) || other.type == type)&&(identical(other.content, content) || other.content == content)&&(identical(other.nonce, nonce) || other.nonce == nonce)&&const DeepCollectionEquality().equals(other.meta, meta)&&const DeepCollectionEquality().equals(other.membersMetioned, membersMetioned)&&(identical(other.editedAt, editedAt) || other.editedAt == editedAt)&&const DeepCollectionEquality().equals(other.attachments, attachments)&&const DeepCollectionEquality().equals(other.reactions, reactions)&&(identical(other.repliedMessageId, repliedMessageId) || other.repliedMessageId == repliedMessageId)&&(identical(other.forwardedMessageId, forwardedMessageId) || other.forwardedMessageId == forwardedMessageId)&&(identical(other.senderId, senderId) || other.senderId == senderId)&&(identical(other.sender, sender) || other.sender == sender)&&(identical(other.chatRoomId, chatRoomId) || other.chatRoomId == chatRoomId)); @@ -290,7 +281,6 @@ String toString() { return 'SnChatMessage(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, type: $type, content: $content, nonce: $nonce, meta: $meta, membersMetioned: $membersMetioned, editedAt: $editedAt, attachments: $attachments, reactions: $reactions, repliedMessageId: $repliedMessageId, forwardedMessageId: $forwardedMessageId, senderId: $senderId, sender: $sender, chatRoomId: $chatRoomId)'; } - } /// @nodoc @@ -301,7 +291,6 @@ $Res call({ DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String type, String? content, String? nonce, Map meta, List membersMetioned, DateTime? editedAt, List attachments, List reactions, String? repliedMessageId, String? forwardedMessageId, String senderId, SnChatMember sender, String chatRoomId }); - $SnChatMemberCopyWith<$Res> get sender; } @@ -349,7 +338,6 @@ $SnChatMemberCopyWith<$Res> get sender { } } - /// @nodoc @JsonSerializable() @@ -424,7 +412,6 @@ String toString() { return 'SnChatMessage(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, type: $type, content: $content, nonce: $nonce, meta: $meta, membersMetioned: $membersMetioned, editedAt: $editedAt, attachments: $attachments, reactions: $reactions, repliedMessageId: $repliedMessageId, forwardedMessageId: $forwardedMessageId, senderId: $senderId, sender: $sender, chatRoomId: $chatRoomId)'; } - } /// @nodoc @@ -435,7 +422,6 @@ $Res call({ DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String type, String? content, String? nonce, Map meta, List membersMetioned, DateTime? editedAt, List attachments, List reactions, String? repliedMessageId, String? forwardedMessageId, String senderId, SnChatMember sender, String chatRoomId }); - @override $SnChatMemberCopyWith<$Res> get sender; } @@ -484,7 +470,6 @@ $SnChatMemberCopyWith<$Res> get sender { } } - /// @nodoc mixin _$SnChatReaction { @@ -498,7 +483,6 @@ $SnChatReactionCopyWith get copyWith => _$SnChatReactionCopyWith /// Serializes this SnChatReaction to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnChatReaction&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.id, id) || other.id == id)&&(identical(other.messageId, messageId) || other.messageId == messageId)&&(identical(other.senderId, senderId) || other.senderId == senderId)&&(identical(other.sender, sender) || other.sender == sender)&&(identical(other.symbol, symbol) || other.symbol == symbol)&&(identical(other.attitude, attitude) || other.attitude == attitude)); @@ -513,7 +497,6 @@ String toString() { return 'SnChatReaction(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, messageId: $messageId, senderId: $senderId, sender: $sender, symbol: $symbol, attitude: $attitude)'; } - } /// @nodoc @@ -524,7 +507,6 @@ $Res call({ DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String messageId, String senderId, SnChatMember sender, String symbol, int attitude }); - $SnChatMemberCopyWith<$Res> get sender; } @@ -564,7 +546,6 @@ $SnChatMemberCopyWith<$Res> get sender { } } - /// @nodoc @JsonSerializable() @@ -607,7 +588,6 @@ String toString() { return 'SnChatReaction(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, messageId: $messageId, senderId: $senderId, sender: $sender, symbol: $symbol, attitude: $attitude)'; } - } /// @nodoc @@ -618,7 +598,6 @@ $Res call({ DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String messageId, String senderId, SnChatMember sender, String symbol, int attitude }); - @override $SnChatMemberCopyWith<$Res> get sender; } @@ -659,7 +638,6 @@ $SnChatMemberCopyWith<$Res> get sender { } } - /// @nodoc mixin _$SnChatMember { @@ -674,7 +652,6 @@ $SnChatMemberCopyWith get copyWith => _$SnChatMemberCopyWithImpl toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnChatMember&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.id, id) || other.id == id)&&(identical(other.chatRoomId, chatRoomId) || other.chatRoomId == chatRoomId)&&(identical(other.chatRoom, chatRoom) || other.chatRoom == chatRoom)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.account, account) || other.account == account)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.role, role) || other.role == role)&&(identical(other.notify, notify) || other.notify == notify)&&(identical(other.joinedAt, joinedAt) || other.joinedAt == joinedAt)&&(identical(other.breakUntil, breakUntil) || other.breakUntil == breakUntil)&&(identical(other.timeoutUntil, timeoutUntil) || other.timeoutUntil == timeoutUntil)&&(identical(other.isBot, isBot) || other.isBot == isBot)&&(identical(other.lastTyped, lastTyped) || other.lastTyped == lastTyped)); @@ -689,7 +666,6 @@ String toString() { return 'SnChatMember(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, chatRoomId: $chatRoomId, chatRoom: $chatRoom, accountId: $accountId, account: $account, nick: $nick, role: $role, notify: $notify, joinedAt: $joinedAt, breakUntil: $breakUntil, timeoutUntil: $timeoutUntil, isBot: $isBot, lastTyped: $lastTyped)'; } - } /// @nodoc @@ -700,7 +676,6 @@ $Res call({ DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int role, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, bool isBot, DateTime? lastTyped }); - $SnChatRoomCopyWith<$Res>? get chatRoom;$SnAccountCopyWith<$Res> get account; } @@ -759,7 +734,6 @@ $SnAccountCopyWith<$Res> get account { } } - /// @nodoc @JsonSerializable() @@ -810,7 +784,6 @@ String toString() { return 'SnChatMember(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, chatRoomId: $chatRoomId, chatRoom: $chatRoom, accountId: $accountId, account: $account, nick: $nick, role: $role, notify: $notify, joinedAt: $joinedAt, breakUntil: $breakUntil, timeoutUntil: $timeoutUntil, isBot: $isBot, lastTyped: $lastTyped)'; } - } /// @nodoc @@ -821,7 +794,6 @@ $Res call({ DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int role, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, bool isBot, DateTime? lastTyped }); - @override $SnChatRoomCopyWith<$Res>? get chatRoom;@override $SnAccountCopyWith<$Res> get account; } @@ -881,7 +853,6 @@ $SnAccountCopyWith<$Res> get account { } } - /// @nodoc mixin _$SnChatSummary { @@ -895,7 +866,6 @@ $SnChatSummaryCopyWith get copyWith => _$SnChatSummaryCopyWithImp /// Serializes this SnChatSummary to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnChatSummary&&(identical(other.unreadCount, unreadCount) || other.unreadCount == unreadCount)&&(identical(other.lastMessage, lastMessage) || other.lastMessage == lastMessage)); @@ -910,7 +880,6 @@ String toString() { return 'SnChatSummary(unreadCount: $unreadCount, lastMessage: $lastMessage)'; } - } /// @nodoc @@ -921,7 +890,6 @@ $Res call({ int unreadCount, SnChatMessage lastMessage }); - $SnChatMessageCopyWith<$Res> get lastMessage; } @@ -954,7 +922,6 @@ $SnChatMessageCopyWith<$Res> get lastMessage { } } - /// @nodoc @JsonSerializable() @@ -990,7 +957,6 @@ String toString() { return 'SnChatSummary(unreadCount: $unreadCount, lastMessage: $lastMessage)'; } - } /// @nodoc @@ -1001,7 +967,6 @@ $Res call({ int unreadCount, SnChatMessage lastMessage }); - @override $SnChatMessageCopyWith<$Res> get lastMessage; } @@ -1035,7 +1000,6 @@ $SnChatMessageCopyWith<$Res> get lastMessage { } } - /// @nodoc mixin _$MessageChange { @@ -1049,7 +1013,6 @@ $MessageChangeCopyWith get copyWith => _$MessageChangeCopyWithImp /// Serializes this MessageChange to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is MessageChange&&(identical(other.messageId, messageId) || other.messageId == messageId)&&(identical(other.action, action) || other.action == action)&&(identical(other.message, message) || other.message == message)&&(identical(other.timestamp, timestamp) || other.timestamp == timestamp)); @@ -1064,7 +1027,6 @@ String toString() { return 'MessageChange(messageId: $messageId, action: $action, message: $message, timestamp: $timestamp)'; } - } /// @nodoc @@ -1075,7 +1037,6 @@ $Res call({ String messageId, String action, SnChatMessage? message, DateTime timestamp }); - $SnChatMessageCopyWith<$Res>? get message; } @@ -1113,7 +1074,6 @@ $SnChatMessageCopyWith<$Res>? get message { } } - /// @nodoc @JsonSerializable() @@ -1151,7 +1111,6 @@ String toString() { return 'MessageChange(messageId: $messageId, action: $action, message: $message, timestamp: $timestamp)'; } - } /// @nodoc @@ -1162,7 +1121,6 @@ $Res call({ String messageId, String action, SnChatMessage? message, DateTime timestamp }); - @override $SnChatMessageCopyWith<$Res>? get message; } @@ -1201,7 +1159,6 @@ $SnChatMessageCopyWith<$Res>? get message { } } - /// @nodoc mixin _$MessageSyncResponse { @@ -1215,7 +1172,6 @@ $MessageSyncResponseCopyWith get copyWith => _$MessageSyncR /// Serializes this MessageSyncResponse to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is MessageSyncResponse&&const DeepCollectionEquality().equals(other.changes, changes)&&(identical(other.currentTimestamp, currentTimestamp) || other.currentTimestamp == currentTimestamp)); @@ -1230,7 +1186,6 @@ String toString() { return 'MessageSyncResponse(changes: $changes, currentTimestamp: $currentTimestamp)'; } - } /// @nodoc @@ -1241,9 +1196,6 @@ $Res call({ List changes, DateTime currentTimestamp }); - - - } /// @nodoc class _$MessageSyncResponseCopyWithImpl<$Res> @@ -1265,7 +1217,6 @@ as DateTime, } - /// @nodoc @JsonSerializable() @@ -1307,7 +1258,6 @@ String toString() { return 'MessageSyncResponse(changes: $changes, currentTimestamp: $currentTimestamp)'; } - } /// @nodoc @@ -1318,9 +1268,6 @@ $Res call({ List changes, DateTime currentTimestamp }); - - - } /// @nodoc class __$MessageSyncResponseCopyWithImpl<$Res> @@ -1340,10 +1287,8 @@ as DateTime, )); } - } - /// @nodoc mixin _$ChatRealtimeJoinResponse { @@ -1357,7 +1302,6 @@ $ChatRealtimeJoinResponseCopyWith get copyWith => _$Ch /// Serializes this ChatRealtimeJoinResponse to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is ChatRealtimeJoinResponse&&(identical(other.provider, provider) || other.provider == provider)&&(identical(other.endpoint, endpoint) || other.endpoint == endpoint)&&(identical(other.token, token) || other.token == token)&&(identical(other.callId, callId) || other.callId == callId)&&(identical(other.roomName, roomName) || other.roomName == roomName)&&(identical(other.isAdmin, isAdmin) || other.isAdmin == isAdmin)&&const DeepCollectionEquality().equals(other.participants, participants)); @@ -1372,7 +1316,6 @@ String toString() { return 'ChatRealtimeJoinResponse(provider: $provider, endpoint: $endpoint, token: $token, callId: $callId, roomName: $roomName, isAdmin: $isAdmin, participants: $participants)'; } - } /// @nodoc @@ -1383,9 +1326,6 @@ $Res call({ String provider, String endpoint, String token, String callId, String roomName, bool isAdmin, List participants }); - - - } /// @nodoc class _$ChatRealtimeJoinResponseCopyWithImpl<$Res> @@ -1412,7 +1352,6 @@ as List, } - /// @nodoc @JsonSerializable() @@ -1433,7 +1372,6 @@ class _ChatRealtimeJoinResponse implements ChatRealtimeJoinResponse { return EqualUnmodifiableListView(_participants); } - /// Create a copy of ChatRealtimeJoinResponse /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @@ -1459,7 +1397,6 @@ String toString() { return 'ChatRealtimeJoinResponse(provider: $provider, endpoint: $endpoint, token: $token, callId: $callId, roomName: $roomName, isAdmin: $isAdmin, participants: $participants)'; } - } /// @nodoc @@ -1470,9 +1407,6 @@ $Res call({ String provider, String endpoint, String token, String callId, String roomName, bool isAdmin, List participants }); - - - } /// @nodoc class __$ChatRealtimeJoinResponseCopyWithImpl<$Res> @@ -1497,10 +1431,8 @@ as List, )); } - } - /// @nodoc mixin _$CallParticipant { @@ -1514,7 +1446,6 @@ $CallParticipantCopyWith get copyWith => _$CallParticipantCopyW /// Serializes this CallParticipant to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is CallParticipant&&(identical(other.identity, identity) || other.identity == identity)&&(identical(other.name, name) || other.name == name)&&(identical(other.joinedAt, joinedAt) || other.joinedAt == joinedAt)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.profile, profile) || other.profile == profile)); @@ -1529,7 +1460,6 @@ String toString() { return 'CallParticipant(identity: $identity, name: $name, joinedAt: $joinedAt, accountId: $accountId, profile: $profile)'; } - } /// @nodoc @@ -1540,7 +1470,6 @@ $Res call({ String identity, String name, DateTime joinedAt, String? accountId, SnChatMember? profile }); - $SnChatMemberCopyWith<$Res>? get profile; } @@ -1579,7 +1508,6 @@ $SnChatMemberCopyWith<$Res>? get profile { } } - /// @nodoc @JsonSerializable() @@ -1618,7 +1546,6 @@ String toString() { return 'CallParticipant(identity: $identity, name: $name, joinedAt: $joinedAt, accountId: $accountId, profile: $profile)'; } - } /// @nodoc @@ -1629,7 +1556,6 @@ $Res call({ String identity, String name, DateTime joinedAt, String? accountId, SnChatMember? profile }); - @override $SnChatMemberCopyWith<$Res>? get profile; } @@ -1669,7 +1595,6 @@ $SnChatMemberCopyWith<$Res>? get profile { } } - /// @nodoc mixin _$SnRealtimeCall { @@ -1683,7 +1608,6 @@ $SnRealtimeCallCopyWith get copyWith => _$SnRealtimeCallCopyWith /// Serializes this SnRealtimeCall to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnRealtimeCall&&(identical(other.id, id) || other.id == id)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.endedAt, endedAt) || other.endedAt == endedAt)&&(identical(other.senderId, senderId) || other.senderId == senderId)&&(identical(other.sender, sender) || other.sender == sender)&&(identical(other.roomId, roomId) || other.roomId == roomId)&&(identical(other.room, room) || other.room == room)&&const DeepCollectionEquality().equals(other.upstreamConfig, upstreamConfig)&&(identical(other.providerName, providerName) || other.providerName == providerName)&&(identical(other.sessionId, sessionId) || other.sessionId == sessionId)); @@ -1698,7 +1622,6 @@ String toString() { return 'SnRealtimeCall(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, endedAt: $endedAt, senderId: $senderId, sender: $sender, roomId: $roomId, room: $room, upstreamConfig: $upstreamConfig, providerName: $providerName, sessionId: $sessionId)'; } - } /// @nodoc @@ -1709,7 +1632,6 @@ $Res call({ String id, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, DateTime? endedAt, String senderId, SnChatMember sender, String roomId, SnChatRoom room, Map upstreamConfig, String? providerName, String? sessionId }); - $SnChatMemberCopyWith<$Res> get sender;$SnChatRoomCopyWith<$Res> get room; } @@ -1761,7 +1683,6 @@ $SnChatRoomCopyWith<$Res> get room { } } - /// @nodoc @JsonSerializable() @@ -1813,7 +1734,6 @@ String toString() { return 'SnRealtimeCall(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, endedAt: $endedAt, senderId: $senderId, sender: $sender, roomId: $roomId, room: $room, upstreamConfig: $upstreamConfig, providerName: $providerName, sessionId: $sessionId)'; } - } /// @nodoc @@ -1824,7 +1744,6 @@ $Res call({ String id, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, DateTime? endedAt, String senderId, SnChatMember sender, String roomId, SnChatRoom room, Map upstreamConfig, String? providerName, String? sessionId }); - @override $SnChatMemberCopyWith<$Res> get sender;@override $SnChatRoomCopyWith<$Res> get room; } diff --git a/lib/models/embed.freezed.dart b/lib/models/embed.freezed.dart index 42a0367..b016202 100644 --- a/lib/models/embed.freezed.dart +++ b/lib/models/embed.freezed.dart @@ -26,7 +26,6 @@ $SnEmbedLinkCopyWith get copyWith => _$SnEmbedLinkCopyWithImpl toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnEmbedLink&&(identical(other.type, type) || other.type == type)&&(identical(other.url, url) || other.url == url)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.imageUrl, imageUrl) || other.imageUrl == imageUrl)&&(identical(other.faviconUrl, faviconUrl) || other.faviconUrl == faviconUrl)&&(identical(other.siteName, siteName) || other.siteName == siteName)&&(identical(other.contentType, contentType) || other.contentType == contentType)&&(identical(other.author, author) || other.author == author)&&(identical(other.publishedDate, publishedDate) || other.publishedDate == publishedDate)); @@ -41,7 +40,6 @@ String toString() { return 'SnEmbedLink(type: $type, url: $url, title: $title, description: $description, imageUrl: $imageUrl, faviconUrl: $faviconUrl, siteName: $siteName, contentType: $contentType, author: $author, publishedDate: $publishedDate)'; } - } /// @nodoc @@ -52,9 +50,6 @@ $Res call({ @JsonKey(name: 'Type') String type,@JsonKey(name: 'Url') String url,@JsonKey(name: 'Title') String title,@JsonKey(name: 'Description') String? description,@JsonKey(name: 'ImageUrl') String? imageUrl,@JsonKey(name: 'FaviconUrl') String faviconUrl,@JsonKey(name: 'SiteName') String siteName,@JsonKey(name: 'ContentType') String? contentType,@JsonKey(name: 'Author') String? author,@JsonKey(name: 'PublishedDate') DateTime? publishedDate }); - - - } /// @nodoc class _$SnEmbedLinkCopyWithImpl<$Res> @@ -84,7 +79,6 @@ as DateTime?, } - /// @nodoc @JsonSerializable() @@ -128,7 +122,6 @@ String toString() { return 'SnEmbedLink(type: $type, url: $url, title: $title, description: $description, imageUrl: $imageUrl, faviconUrl: $faviconUrl, siteName: $siteName, contentType: $contentType, author: $author, publishedDate: $publishedDate)'; } - } /// @nodoc @@ -139,9 +132,6 @@ $Res call({ @JsonKey(name: 'Type') String type,@JsonKey(name: 'Url') String url,@JsonKey(name: 'Title') String title,@JsonKey(name: 'Description') String? description,@JsonKey(name: 'ImageUrl') String? imageUrl,@JsonKey(name: 'FaviconUrl') String faviconUrl,@JsonKey(name: 'SiteName') String siteName,@JsonKey(name: 'ContentType') String? contentType,@JsonKey(name: 'Author') String? author,@JsonKey(name: 'PublishedDate') DateTime? publishedDate }); - - - } /// @nodoc class __$SnEmbedLinkCopyWithImpl<$Res> @@ -169,10 +159,8 @@ as DateTime?, )); } - } - /// @nodoc mixin _$SnScrappedLink { @@ -186,7 +174,6 @@ $SnScrappedLinkCopyWith get copyWith => _$SnScrappedLinkCopyWith /// Serializes this SnScrappedLink to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnScrappedLink&&(identical(other.type, type) || other.type == type)&&(identical(other.url, url) || other.url == url)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.imageUrl, imageUrl) || other.imageUrl == imageUrl)&&(identical(other.faviconUrl, faviconUrl) || other.faviconUrl == faviconUrl)&&(identical(other.siteName, siteName) || other.siteName == siteName)&&(identical(other.contentType, contentType) || other.contentType == contentType)&&(identical(other.author, author) || other.author == author)&&(identical(other.publishedDate, publishedDate) || other.publishedDate == publishedDate)); @@ -201,7 +188,6 @@ String toString() { return 'SnScrappedLink(type: $type, url: $url, title: $title, description: $description, imageUrl: $imageUrl, faviconUrl: $faviconUrl, siteName: $siteName, contentType: $contentType, author: $author, publishedDate: $publishedDate)'; } - } /// @nodoc @@ -212,9 +198,6 @@ $Res call({ String type, String url, String title, String? description, String? imageUrl, String faviconUrl, String siteName, String? contentType, String? author, DateTime? publishedDate }); - - - } /// @nodoc class _$SnScrappedLinkCopyWithImpl<$Res> @@ -244,7 +227,6 @@ as DateTime?, } - /// @nodoc @JsonSerializable() @@ -288,7 +270,6 @@ String toString() { return 'SnScrappedLink(type: $type, url: $url, title: $title, description: $description, imageUrl: $imageUrl, faviconUrl: $faviconUrl, siteName: $siteName, contentType: $contentType, author: $author, publishedDate: $publishedDate)'; } - } /// @nodoc @@ -299,9 +280,6 @@ $Res call({ String type, String url, String title, String? description, String? imageUrl, String faviconUrl, String siteName, String? contentType, String? author, DateTime? publishedDate }); - - - } /// @nodoc class __$SnScrappedLinkCopyWithImpl<$Res> @@ -329,7 +307,6 @@ as DateTime?, )); } - } // dart format on diff --git a/lib/models/file.freezed.dart b/lib/models/file.freezed.dart index 4dcb7ad..ca74c3e 100644 --- a/lib/models/file.freezed.dart +++ b/lib/models/file.freezed.dart @@ -26,7 +26,6 @@ $UniversalFileCopyWith get copyWith => _$UniversalFileCopyWithImp /// Serializes this UniversalFile to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is UniversalFile&&const DeepCollectionEquality().equals(other.data, data)&&(identical(other.type, type) || other.type == type)); @@ -41,7 +40,6 @@ String toString() { return 'UniversalFile(data: $data, type: $type)'; } - } /// @nodoc @@ -52,9 +50,6 @@ $Res call({ dynamic data, UniversalFileType type }); - - - } /// @nodoc class _$UniversalFileCopyWithImpl<$Res> @@ -76,7 +71,6 @@ as UniversalFileType, } - /// @nodoc @JsonSerializable() @@ -112,7 +106,6 @@ String toString() { return 'UniversalFile(data: $data, type: $type)'; } - } /// @nodoc @@ -123,9 +116,6 @@ $Res call({ dynamic data, UniversalFileType type }); - - - } /// @nodoc class __$UniversalFileCopyWithImpl<$Res> @@ -145,10 +135,8 @@ as UniversalFileType, )); } - } - /// @nodoc mixin _$SnCloudFile { @@ -162,7 +150,6 @@ $SnCloudFileCopyWith get copyWith => _$SnCloudFileCopyWithImpl toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnCloudFile&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&const DeepCollectionEquality().equals(other.fileMeta, fileMeta)&&const DeepCollectionEquality().equals(other.userMeta, userMeta)&&(identical(other.mimeType, mimeType) || other.mimeType == mimeType)&&(identical(other.hash, hash) || other.hash == hash)&&(identical(other.size, size) || other.size == size)&&(identical(other.uploadedAt, uploadedAt) || other.uploadedAt == uploadedAt)&&(identical(other.uploadedTo, uploadedTo) || other.uploadedTo == uploadedTo)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); @@ -177,7 +164,6 @@ String toString() { return 'SnCloudFile(id: $id, name: $name, description: $description, fileMeta: $fileMeta, userMeta: $userMeta, mimeType: $mimeType, hash: $hash, size: $size, uploadedAt: $uploadedAt, uploadedTo: $uploadedTo, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -188,9 +174,6 @@ $Res call({ String id, String name, String? description, Map? fileMeta, Map? userMeta, String? mimeType, String? hash, int size, DateTime? uploadedAt, String? uploadedTo, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - - - } /// @nodoc class _$SnCloudFileCopyWithImpl<$Res> @@ -223,7 +206,6 @@ as DateTime?, } - /// @nodoc @JsonSerializable() @@ -286,7 +268,6 @@ String toString() { return 'SnCloudFile(id: $id, name: $name, description: $description, fileMeta: $fileMeta, userMeta: $userMeta, mimeType: $mimeType, hash: $hash, size: $size, uploadedAt: $uploadedAt, uploadedTo: $uploadedTo, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -297,9 +278,6 @@ $Res call({ String id, String name, String? description, Map? fileMeta, Map? userMeta, String? mimeType, String? hash, int size, DateTime? uploadedAt, String? uploadedTo, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - - - } /// @nodoc class __$SnCloudFileCopyWithImpl<$Res> @@ -330,7 +308,6 @@ as DateTime?, )); } - } // dart format on diff --git a/lib/models/post.freezed.dart b/lib/models/post.freezed.dart index 193127b..4d9694b 100644 --- a/lib/models/post.freezed.dart +++ b/lib/models/post.freezed.dart @@ -26,7 +26,6 @@ $SnPostCopyWith get copyWith => _$SnPostCopyWithImpl(this as SnP /// Serializes this SnPost to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnPost&&(identical(other.id, id) || other.id == id)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.language, language) || other.language == language)&&(identical(other.editedAt, editedAt) || other.editedAt == editedAt)&&(identical(other.publishedAt, publishedAt) || other.publishedAt == publishedAt)&&(identical(other.visibility, visibility) || other.visibility == visibility)&&(identical(other.content, content) || other.content == content)&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other.meta, meta)&&(identical(other.viewsUnique, viewsUnique) || other.viewsUnique == viewsUnique)&&(identical(other.viewsTotal, viewsTotal) || other.viewsTotal == viewsTotal)&&(identical(other.upvotes, upvotes) || other.upvotes == upvotes)&&(identical(other.downvotes, downvotes) || other.downvotes == downvotes)&&(identical(other.repliesCount, repliesCount) || other.repliesCount == repliesCount)&&(identical(other.threadedPostId, threadedPostId) || other.threadedPostId == threadedPostId)&&(identical(other.threadedPost, threadedPost) || other.threadedPost == threadedPost)&&(identical(other.repliedPostId, repliedPostId) || other.repliedPostId == repliedPostId)&&(identical(other.repliedPost, repliedPost) || other.repliedPost == repliedPost)&&(identical(other.forwardedPostId, forwardedPostId) || other.forwardedPostId == forwardedPostId)&&(identical(other.forwardedPost, forwardedPost) || other.forwardedPost == forwardedPost)&&const DeepCollectionEquality().equals(other.attachments, attachments)&&(identical(other.publisher, publisher) || other.publisher == publisher)&&const DeepCollectionEquality().equals(other.reactionsCount, reactionsCount)&&const DeepCollectionEquality().equals(other.reactions, reactions)&&const DeepCollectionEquality().equals(other.tags, tags)&&const DeepCollectionEquality().equals(other.categories, categories)&&const DeepCollectionEquality().equals(other.collections, collections)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.isTruncated, isTruncated) || other.isTruncated == isTruncated)); @@ -41,7 +40,6 @@ String toString() { return 'SnPost(id: $id, title: $title, description: $description, language: $language, editedAt: $editedAt, publishedAt: $publishedAt, visibility: $visibility, content: $content, type: $type, meta: $meta, viewsUnique: $viewsUnique, viewsTotal: $viewsTotal, upvotes: $upvotes, downvotes: $downvotes, repliesCount: $repliesCount, threadedPostId: $threadedPostId, threadedPost: $threadedPost, repliedPostId: $repliedPostId, repliedPost: $repliedPost, forwardedPostId: $forwardedPostId, forwardedPost: $forwardedPost, attachments: $attachments, publisher: $publisher, reactionsCount: $reactionsCount, reactions: $reactions, tags: $tags, categories: $categories, collections: $collections, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, isTruncated: $isTruncated)'; } - } /// @nodoc @@ -52,7 +50,6 @@ $Res call({ String id, String? title, String? description, String? language, DateTime? editedAt, DateTime? publishedAt, int visibility, String? content, int type, Map? meta, int viewsUnique, int viewsTotal, int upvotes, int downvotes, int repliesCount, String? threadedPostId, SnPost? threadedPost, String? repliedPostId, SnPost? repliedPost, String? forwardedPostId, SnPost? forwardedPost, List attachments, SnPublisher publisher, Map reactionsCount, List reactions, List tags, List categories, List collections, DateTime? createdAt, DateTime? updatedAt, DateTime? deletedAt, bool isTruncated }); - $SnPostCopyWith<$Res>? get threadedPost;$SnPostCopyWith<$Res>? get repliedPost;$SnPostCopyWith<$Res>? get forwardedPost;$SnPublisherCopyWith<$Res> get publisher; } @@ -151,7 +148,6 @@ $SnPublisherCopyWith<$Res> get publisher { } } - /// @nodoc @JsonSerializable() @@ -261,7 +257,6 @@ String toString() { return 'SnPost(id: $id, title: $title, description: $description, language: $language, editedAt: $editedAt, publishedAt: $publishedAt, visibility: $visibility, content: $content, type: $type, meta: $meta, viewsUnique: $viewsUnique, viewsTotal: $viewsTotal, upvotes: $upvotes, downvotes: $downvotes, repliesCount: $repliesCount, threadedPostId: $threadedPostId, threadedPost: $threadedPost, repliedPostId: $repliedPostId, repliedPost: $repliedPost, forwardedPostId: $forwardedPostId, forwardedPost: $forwardedPost, attachments: $attachments, publisher: $publisher, reactionsCount: $reactionsCount, reactions: $reactions, tags: $tags, categories: $categories, collections: $collections, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, isTruncated: $isTruncated)'; } - } /// @nodoc @@ -272,7 +267,6 @@ $Res call({ String id, String? title, String? description, String? language, DateTime? editedAt, DateTime? publishedAt, int visibility, String? content, int type, Map? meta, int viewsUnique, int viewsTotal, int upvotes, int downvotes, int repliesCount, String? threadedPostId, SnPost? threadedPost, String? repliedPostId, SnPost? repliedPost, String? forwardedPostId, SnPost? forwardedPost, List attachments, SnPublisher publisher, Map reactionsCount, List reactions, List tags, List categories, List collections, DateTime? createdAt, DateTime? updatedAt, DateTime? deletedAt, bool isTruncated }); - @override $SnPostCopyWith<$Res>? get threadedPost;@override $SnPostCopyWith<$Res>? get repliedPost;@override $SnPostCopyWith<$Res>? get forwardedPost;@override $SnPublisherCopyWith<$Res> get publisher; } @@ -372,7 +366,6 @@ $SnPublisherCopyWith<$Res> get publisher { } } - /// @nodoc mixin _$SnPublisher { @@ -386,7 +379,6 @@ $SnPublisherCopyWith get copyWith => _$SnPublisherCopyWithImpl toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnPublisher&&(identical(other.id, id) || other.id == id)&&(identical(other.type, type) || other.type == type)&&(identical(other.name, name) || other.name == name)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.bio, bio) || other.bio == bio)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.account, account) || other.account == account)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.realmId, realmId) || other.realmId == realmId)&&(identical(other.verification, verification) || other.verification == verification)); @@ -401,7 +393,6 @@ String toString() { return 'SnPublisher(id: $id, type: $type, name: $name, nick: $nick, bio: $bio, picture: $picture, background: $background, account: $account, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, realmId: $realmId, verification: $verification)'; } - } /// @nodoc @@ -412,7 +403,6 @@ $Res call({ String id, int type, String name, String nick, String bio, SnCloudFile? picture, SnCloudFile? background, SnAccount? account, String? accountId, DateTime? createdAt, DateTime? updatedAt, DateTime? deletedAt, String? realmId, SnVerificationMark? verification }); - $SnCloudFileCopyWith<$Res>? get picture;$SnCloudFileCopyWith<$Res>? get background;$SnAccountCopyWith<$Res>? get account;$SnVerificationMarkCopyWith<$Res>? get verification; } @@ -496,7 +486,6 @@ $SnVerificationMarkCopyWith<$Res>? get verification { } } - /// @nodoc @JsonSerializable() @@ -544,7 +533,6 @@ String toString() { return 'SnPublisher(id: $id, type: $type, name: $name, nick: $nick, bio: $bio, picture: $picture, background: $background, account: $account, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, realmId: $realmId, verification: $verification)'; } - } /// @nodoc @@ -555,7 +543,6 @@ $Res call({ String id, int type, String name, String nick, String bio, SnCloudFile? picture, SnCloudFile? background, SnAccount? account, String? accountId, DateTime? createdAt, DateTime? updatedAt, DateTime? deletedAt, String? realmId, SnVerificationMark? verification }); - @override $SnCloudFileCopyWith<$Res>? get picture;@override $SnCloudFileCopyWith<$Res>? get background;@override $SnAccountCopyWith<$Res>? get account;@override $SnVerificationMarkCopyWith<$Res>? get verification; } @@ -640,7 +627,6 @@ $SnVerificationMarkCopyWith<$Res>? get verification { } } - /// @nodoc mixin _$SnPublisherStats { @@ -654,7 +640,6 @@ $SnPublisherStatsCopyWith get copyWith => _$SnPublisherStatsCo /// Serializes this SnPublisherStats to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnPublisherStats&&(identical(other.postsCreated, postsCreated) || other.postsCreated == postsCreated)&&(identical(other.stickerPacksCreated, stickerPacksCreated) || other.stickerPacksCreated == stickerPacksCreated)&&(identical(other.stickersCreated, stickersCreated) || other.stickersCreated == stickersCreated)&&(identical(other.upvoteReceived, upvoteReceived) || other.upvoteReceived == upvoteReceived)&&(identical(other.downvoteReceived, downvoteReceived) || other.downvoteReceived == downvoteReceived)); @@ -669,7 +654,6 @@ String toString() { return 'SnPublisherStats(postsCreated: $postsCreated, stickerPacksCreated: $stickerPacksCreated, stickersCreated: $stickersCreated, upvoteReceived: $upvoteReceived, downvoteReceived: $downvoteReceived)'; } - } /// @nodoc @@ -680,9 +664,6 @@ $Res call({ int postsCreated, int stickerPacksCreated, int stickersCreated, int upvoteReceived, int downvoteReceived }); - - - } /// @nodoc class _$SnPublisherStatsCopyWithImpl<$Res> @@ -707,7 +688,6 @@ as int, } - /// @nodoc @JsonSerializable() @@ -746,7 +726,6 @@ String toString() { return 'SnPublisherStats(postsCreated: $postsCreated, stickerPacksCreated: $stickerPacksCreated, stickersCreated: $stickersCreated, upvoteReceived: $upvoteReceived, downvoteReceived: $downvoteReceived)'; } - } /// @nodoc @@ -757,9 +736,6 @@ $Res call({ int postsCreated, int stickerPacksCreated, int stickersCreated, int upvoteReceived, int downvoteReceived }); - - - } /// @nodoc class __$SnPublisherStatsCopyWithImpl<$Res> @@ -782,10 +758,8 @@ as int, )); } - } - /// @nodoc mixin _$SnSubscriptionStatus { @@ -799,7 +773,6 @@ $SnSubscriptionStatusCopyWith get copyWith => _$SnSubscrip /// Serializes this SnSubscriptionStatus to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnSubscriptionStatus&&(identical(other.isSubscribed, isSubscribed) || other.isSubscribed == isSubscribed)&&(identical(other.publisherId, publisherId) || other.publisherId == publisherId)&&(identical(other.publisherName, publisherName) || other.publisherName == publisherName)); @@ -814,7 +787,6 @@ String toString() { return 'SnSubscriptionStatus(isSubscribed: $isSubscribed, publisherId: $publisherId, publisherName: $publisherName)'; } - } /// @nodoc @@ -825,9 +797,6 @@ $Res call({ bool isSubscribed, String publisherId, String publisherName }); - - - } /// @nodoc class _$SnSubscriptionStatusCopyWithImpl<$Res> @@ -850,7 +819,6 @@ as String, } - /// @nodoc @JsonSerializable() @@ -887,7 +855,6 @@ String toString() { return 'SnSubscriptionStatus(isSubscribed: $isSubscribed, publisherId: $publisherId, publisherName: $publisherName)'; } - } /// @nodoc @@ -898,9 +865,6 @@ $Res call({ bool isSubscribed, String publisherId, String publisherName }); - - - } /// @nodoc class __$SnSubscriptionStatusCopyWithImpl<$Res> @@ -921,7 +885,6 @@ as String, )); } - } /// @nodoc @@ -934,14 +897,11 @@ mixin _$ReactInfo { @pragma('vm:prefer-inline') $ReactInfoCopyWith get copyWith => _$ReactInfoCopyWithImpl(this as ReactInfo, _$identity); - - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is ReactInfo&&(identical(other.icon, icon) || other.icon == icon)&&(identical(other.attitude, attitude) || other.attitude == attitude)); } - @override int get hashCode => Object.hash(runtimeType,icon,attitude); @@ -950,7 +910,6 @@ String toString() { return 'ReactInfo(icon: $icon, attitude: $attitude)'; } - } /// @nodoc @@ -961,9 +920,6 @@ $Res call({ String icon, int attitude }); - - - } /// @nodoc class _$ReactInfoCopyWithImpl<$Res> @@ -985,10 +941,8 @@ as int, } - /// @nodoc - class _ReactInfo implements ReactInfo { const _ReactInfo({required this.icon, required this.attitude}); @@ -1002,14 +956,11 @@ class _ReactInfo implements ReactInfo { @pragma('vm:prefer-inline') _$ReactInfoCopyWith<_ReactInfo> get copyWith => __$ReactInfoCopyWithImpl<_ReactInfo>(this, _$identity); - - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _ReactInfo&&(identical(other.icon, icon) || other.icon == icon)&&(identical(other.attitude, attitude) || other.attitude == attitude)); } - @override int get hashCode => Object.hash(runtimeType,icon,attitude); @@ -1018,7 +969,6 @@ String toString() { return 'ReactInfo(icon: $icon, attitude: $attitude)'; } - } /// @nodoc @@ -1029,9 +979,6 @@ $Res call({ String icon, int attitude }); - - - } /// @nodoc class __$ReactInfoCopyWithImpl<$Res> @@ -1051,7 +998,6 @@ as int, )); } - } // dart format on diff --git a/lib/models/realm.freezed.dart b/lib/models/realm.freezed.dart index 3b128db..8540423 100644 --- a/lib/models/realm.freezed.dart +++ b/lib/models/realm.freezed.dart @@ -26,7 +26,6 @@ $SnRealmCopyWith get copyWith => _$SnRealmCopyWithImpl(this as /// Serializes this SnRealm to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnRealm&&(identical(other.id, id) || other.id == id)&&(identical(other.slug, slug) || other.slug == slug)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.verifiedAs, verifiedAs) || other.verifiedAs == verifiedAs)&&(identical(other.verifiedAt, verifiedAt) || other.verifiedAt == verifiedAt)&&(identical(other.isCommunity, isCommunity) || other.isCommunity == isCommunity)&&(identical(other.isPublic, isPublic) || other.isPublic == isPublic)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); @@ -41,7 +40,6 @@ String toString() { return 'SnRealm(id: $id, slug: $slug, name: $name, description: $description, verifiedAs: $verifiedAs, verifiedAt: $verifiedAt, isCommunity: $isCommunity, isPublic: $isPublic, picture: $picture, background: $background, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -52,7 +50,6 @@ $Res call({ String id, String slug, String name, String description, String? verifiedAs, DateTime? verifiedAt, bool isCommunity, bool isPublic, SnCloudFile? picture, SnCloudFile? background, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - $SnCloudFileCopyWith<$Res>? get picture;$SnCloudFileCopyWith<$Res>? get background; } @@ -112,7 +109,6 @@ $SnCloudFileCopyWith<$Res>? get background { } } - /// @nodoc @JsonSerializable() @@ -160,7 +156,6 @@ String toString() { return 'SnRealm(id: $id, slug: $slug, name: $name, description: $description, verifiedAs: $verifiedAs, verifiedAt: $verifiedAt, isCommunity: $isCommunity, isPublic: $isPublic, picture: $picture, background: $background, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -171,7 +166,6 @@ $Res call({ String id, String slug, String name, String description, String? verifiedAs, DateTime? verifiedAt, bool isCommunity, bool isPublic, SnCloudFile? picture, SnCloudFile? background, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - @override $SnCloudFileCopyWith<$Res>? get picture;@override $SnCloudFileCopyWith<$Res>? get background; } @@ -232,7 +226,6 @@ $SnCloudFileCopyWith<$Res>? get background { } } - /// @nodoc mixin _$SnRealmMember { @@ -246,7 +239,6 @@ $SnRealmMemberCopyWith get copyWith => _$SnRealmMemberCopyWithImp /// Serializes this SnRealmMember to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnRealmMember&&(identical(other.realmId, realmId) || other.realmId == realmId)&&(identical(other.realm, realm) || other.realm == realm)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.account, account) || other.account == account)&&(identical(other.role, role) || other.role == role)&&(identical(other.joinedAt, joinedAt) || other.joinedAt == joinedAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); @@ -261,7 +253,6 @@ String toString() { return 'SnRealmMember(realmId: $realmId, realm: $realm, accountId: $accountId, account: $account, role: $role, joinedAt: $joinedAt, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -272,7 +263,6 @@ $Res call({ String realmId, SnRealm? realm, String accountId, SnAccount? account, int role, DateTime? joinedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - $SnRealmCopyWith<$Res>? get realm;$SnAccountCopyWith<$Res>? get account; } @@ -327,7 +317,6 @@ $SnAccountCopyWith<$Res>? get account { } } - /// @nodoc @JsonSerializable() @@ -370,7 +359,6 @@ String toString() { return 'SnRealmMember(realmId: $realmId, realm: $realm, accountId: $accountId, account: $account, role: $role, joinedAt: $joinedAt, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -381,7 +369,6 @@ $Res call({ String realmId, SnRealm? realm, String accountId, SnAccount? account, int role, DateTime? joinedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - @override $SnRealmCopyWith<$Res>? get realm;@override $SnAccountCopyWith<$Res>? get account; } diff --git a/lib/models/relationship.freezed.dart b/lib/models/relationship.freezed.dart index 3225593..edecf92 100644 --- a/lib/models/relationship.freezed.dart +++ b/lib/models/relationship.freezed.dart @@ -26,7 +26,6 @@ $SnRelationshipCopyWith get copyWith => _$SnRelationshipCopyWith /// Serializes this SnRelationship to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnRelationship&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.account, account) || other.account == account)&&(identical(other.relatedId, relatedId) || other.relatedId == relatedId)&&(identical(other.related, related) || other.related == related)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.status, status) || other.status == status)); @@ -41,7 +40,6 @@ String toString() { return 'SnRelationship(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, accountId: $accountId, account: $account, relatedId: $relatedId, related: $related, expiredAt: $expiredAt, status: $status)'; } - } /// @nodoc @@ -52,7 +50,6 @@ $Res call({ DateTime? createdAt, DateTime? updatedAt, DateTime? deletedAt, String accountId, SnAccount account, String relatedId, SnAccount related, DateTime? expiredAt, int status }); - $SnAccountCopyWith<$Res> get account;$SnAccountCopyWith<$Res> get related; } @@ -101,7 +98,6 @@ $SnAccountCopyWith<$Res> get related { } } - /// @nodoc @JsonSerializable() @@ -144,7 +140,6 @@ String toString() { return 'SnRelationship(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, accountId: $accountId, account: $account, relatedId: $relatedId, related: $related, expiredAt: $expiredAt, status: $status)'; } - } /// @nodoc @@ -155,7 +150,6 @@ $Res call({ DateTime? createdAt, DateTime? updatedAt, DateTime? deletedAt, String accountId, SnAccount account, String relatedId, SnAccount related, DateTime? expiredAt, int status }); - @override $SnAccountCopyWith<$Res> get account;@override $SnAccountCopyWith<$Res> get related; } diff --git a/lib/models/sticker.freezed.dart b/lib/models/sticker.freezed.dart index 70ca609..7958fa8 100644 --- a/lib/models/sticker.freezed.dart +++ b/lib/models/sticker.freezed.dart @@ -26,7 +26,6 @@ $SnStickerCopyWith get copyWith => _$SnStickerCopyWithImpl /// Serializes this SnSticker to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnSticker&&(identical(other.id, id) || other.id == id)&&(identical(other.slug, slug) || other.slug == slug)&&(identical(other.imageId, imageId) || other.imageId == imageId)&&(identical(other.image, image) || other.image == image)&&(identical(other.packId, packId) || other.packId == packId)&&(identical(other.pack, pack) || other.pack == pack)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); @@ -41,7 +40,6 @@ String toString() { return 'SnSticker(id: $id, slug: $slug, imageId: $imageId, image: $image, packId: $packId, pack: $pack, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -52,7 +50,6 @@ $Res call({ String id, String slug, String imageId, SnCloudFile image, String packId, SnStickerPack? pack, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - $SnCloudFileCopyWith<$Res> get image;$SnStickerPackCopyWith<$Res>? get pack; } @@ -104,7 +101,6 @@ $SnStickerPackCopyWith<$Res>? get pack { } } - /// @nodoc @JsonSerializable() @@ -147,7 +143,6 @@ String toString() { return 'SnSticker(id: $id, slug: $slug, imageId: $imageId, image: $image, packId: $packId, pack: $pack, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -158,7 +153,6 @@ $Res call({ String id, String slug, String imageId, SnCloudFile image, String packId, SnStickerPack? pack, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - @override $SnCloudFileCopyWith<$Res> get image;@override $SnStickerPackCopyWith<$Res>? get pack; } @@ -211,7 +205,6 @@ $SnStickerPackCopyWith<$Res>? get pack { } } - /// @nodoc mixin _$SnStickerPack { @@ -225,7 +218,6 @@ $SnStickerPackCopyWith get copyWith => _$SnStickerPackCopyWithImp /// Serializes this SnStickerPack to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnStickerPack&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.prefix, prefix) || other.prefix == prefix)&&(identical(other.publisherId, publisherId) || other.publisherId == publisherId)&&(identical(other.publisher, publisher) || other.publisher == publisher)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); @@ -240,7 +232,6 @@ String toString() { return 'SnStickerPack(id: $id, name: $name, description: $description, prefix: $prefix, publisherId: $publisherId, publisher: $publisher, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -251,7 +242,6 @@ $Res call({ String id, String name, String description, String prefix, String publisherId, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - $SnPublisherCopyWith<$Res>? get publisher; } @@ -294,7 +284,6 @@ $SnPublisherCopyWith<$Res>? get publisher { } } - /// @nodoc @JsonSerializable() @@ -337,7 +326,6 @@ String toString() { return 'SnStickerPack(id: $id, name: $name, description: $description, prefix: $prefix, publisherId: $publisherId, publisher: $publisher, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -348,7 +336,6 @@ $Res call({ String id, String name, String description, String prefix, String publisherId, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - @override $SnPublisherCopyWith<$Res>? get publisher; } diff --git a/lib/models/user.freezed.dart b/lib/models/user.freezed.dart index 9696eb7..39b71eb 100644 --- a/lib/models/user.freezed.dart +++ b/lib/models/user.freezed.dart @@ -26,7 +26,6 @@ $SnAccountCopyWith get copyWith => _$SnAccountCopyWithImpl /// Serializes this SnAccount to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAccount&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.language, language) || other.language == language)&&(identical(other.isSuperuser, isSuperuser) || other.isSuperuser == isSuperuser)&&(identical(other.profile, profile) || other.profile == profile)&&const DeepCollectionEquality().equals(other.badges, badges)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); @@ -41,7 +40,6 @@ String toString() { return 'SnAccount(id: $id, name: $name, nick: $nick, language: $language, isSuperuser: $isSuperuser, profile: $profile, badges: $badges, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -52,7 +50,6 @@ $Res call({ String id, String name, String nick, String language, bool isSuperuser, SnAccountProfile profile, List badges, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - $SnAccountProfileCopyWith<$Res> get profile; } @@ -93,7 +90,6 @@ $SnAccountProfileCopyWith<$Res> get profile { } } - /// @nodoc @JsonSerializable() @@ -143,7 +139,6 @@ String toString() { return 'SnAccount(id: $id, name: $name, nick: $nick, language: $language, isSuperuser: $isSuperuser, profile: $profile, badges: $badges, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -154,7 +149,6 @@ $Res call({ String id, String name, String nick, String language, bool isSuperuser, SnAccountProfile profile, List badges, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - @override $SnAccountProfileCopyWith<$Res> get profile; } @@ -196,7 +190,6 @@ $SnAccountProfileCopyWith<$Res> get profile { } } - /// @nodoc mixin _$SnAccountProfile { @@ -210,7 +203,6 @@ $SnAccountProfileCopyWith get copyWith => _$SnAccountProfileCo /// Serializes this SnAccountProfile to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAccountProfile&&(identical(other.id, id) || other.id == id)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.middleName, middleName) || other.middleName == middleName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.bio, bio) || other.bio == bio)&&(identical(other.gender, gender) || other.gender == gender)&&(identical(other.pronouns, pronouns) || other.pronouns == pronouns)&&(identical(other.location, location) || other.location == location)&&(identical(other.timeZone, timeZone) || other.timeZone == timeZone)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.lastSeenAt, lastSeenAt) || other.lastSeenAt == lastSeenAt)&&(identical(other.activeBadge, activeBadge) || other.activeBadge == activeBadge)&&(identical(other.experience, experience) || other.experience == experience)&&(identical(other.level, level) || other.level == level)&&(identical(other.levelingProgress, levelingProgress) || other.levelingProgress == levelingProgress)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.verification, verification) || other.verification == verification)&&(identical(other.stellarMembership, stellarMembership) || other.stellarMembership == stellarMembership)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); @@ -225,7 +217,6 @@ String toString() { return 'SnAccountProfile(id: $id, firstName: $firstName, middleName: $middleName, lastName: $lastName, bio: $bio, gender: $gender, pronouns: $pronouns, location: $location, timeZone: $timeZone, birthday: $birthday, lastSeenAt: $lastSeenAt, activeBadge: $activeBadge, experience: $experience, level: $level, levelingProgress: $levelingProgress, picture: $picture, background: $background, verification: $verification, stellarMembership: $stellarMembership, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -236,7 +227,6 @@ $Res call({ String id, String firstName, String middleName, String lastName, String bio, String gender, String pronouns, String location, String timeZone, DateTime? birthday, DateTime? lastSeenAt, SnAccountBadge? activeBadge, int experience, int level, double levelingProgress, SnCloudFile? picture, SnCloudFile? background, SnVerificationMark? verification, SnWalletSubscriptionRef? stellarMembership, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - $SnAccountBadgeCopyWith<$Res>? get activeBadge;$SnCloudFileCopyWith<$Res>? get picture;$SnCloudFileCopyWith<$Res>? get background;$SnVerificationMarkCopyWith<$Res>? get verification;$SnWalletSubscriptionRefCopyWith<$Res>? get stellarMembership; } @@ -340,7 +330,6 @@ $SnWalletSubscriptionRefCopyWith<$Res>? get stellarMembership { } } - /// @nodoc @JsonSerializable() @@ -396,7 +385,6 @@ String toString() { return 'SnAccountProfile(id: $id, firstName: $firstName, middleName: $middleName, lastName: $lastName, bio: $bio, gender: $gender, pronouns: $pronouns, location: $location, timeZone: $timeZone, birthday: $birthday, lastSeenAt: $lastSeenAt, activeBadge: $activeBadge, experience: $experience, level: $level, levelingProgress: $levelingProgress, picture: $picture, background: $background, verification: $verification, stellarMembership: $stellarMembership, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -407,7 +395,6 @@ $Res call({ String id, String firstName, String middleName, String lastName, String bio, String gender, String pronouns, String location, String timeZone, DateTime? birthday, DateTime? lastSeenAt, SnAccountBadge? activeBadge, int experience, int level, double levelingProgress, SnCloudFile? picture, SnCloudFile? background, SnVerificationMark? verification, SnWalletSubscriptionRef? stellarMembership, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - @override $SnAccountBadgeCopyWith<$Res>? get activeBadge;@override $SnCloudFileCopyWith<$Res>? get picture;@override $SnCloudFileCopyWith<$Res>? get background;@override $SnVerificationMarkCopyWith<$Res>? get verification;@override $SnWalletSubscriptionRefCopyWith<$Res>? get stellarMembership; } @@ -512,7 +499,6 @@ $SnWalletSubscriptionRefCopyWith<$Res>? get stellarMembership { } } - /// @nodoc mixin _$SnAccountStatus { @@ -526,7 +512,6 @@ $SnAccountStatusCopyWith get copyWith => _$SnAccountStatusCopyW /// Serializes this SnAccountStatus to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAccountStatus&&(identical(other.id, id) || other.id == id)&&(identical(other.attitude, attitude) || other.attitude == attitude)&&(identical(other.isOnline, isOnline) || other.isOnline == isOnline)&&(identical(other.isInvisible, isInvisible) || other.isInvisible == isInvisible)&&(identical(other.isNotDisturb, isNotDisturb) || other.isNotDisturb == isNotDisturb)&&(identical(other.isCustomized, isCustomized) || other.isCustomized == isCustomized)&&(identical(other.label, label) || other.label == label)&&(identical(other.clearedAt, clearedAt) || other.clearedAt == clearedAt)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); @@ -541,7 +526,6 @@ String toString() { return 'SnAccountStatus(id: $id, attitude: $attitude, isOnline: $isOnline, isInvisible: $isInvisible, isNotDisturb: $isNotDisturb, isCustomized: $isCustomized, label: $label, clearedAt: $clearedAt, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -552,9 +536,6 @@ $Res call({ String id, int attitude, bool isOnline, bool isInvisible, bool isNotDisturb, bool isCustomized, String label, DateTime? clearedAt, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - - - } /// @nodoc class _$SnAccountStatusCopyWithImpl<$Res> @@ -586,7 +567,6 @@ as DateTime?, } - /// @nodoc @JsonSerializable() @@ -632,7 +612,6 @@ String toString() { return 'SnAccountStatus(id: $id, attitude: $attitude, isOnline: $isOnline, isInvisible: $isInvisible, isNotDisturb: $isNotDisturb, isCustomized: $isCustomized, label: $label, clearedAt: $clearedAt, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -643,9 +622,6 @@ $Res call({ String id, int attitude, bool isOnline, bool isInvisible, bool isNotDisturb, bool isCustomized, String label, DateTime? clearedAt, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - - - } /// @nodoc class __$SnAccountStatusCopyWithImpl<$Res> @@ -675,10 +651,8 @@ as DateTime?, )); } - } - /// @nodoc mixin _$SnAccountBadge { @@ -692,7 +666,6 @@ $SnAccountBadgeCopyWith get copyWith => _$SnAccountBadgeCopyWith /// Serializes this SnAccountBadge to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAccountBadge&&(identical(other.id, id) || other.id == id)&&(identical(other.type, type) || other.type == type)&&(identical(other.label, label) || other.label == label)&&(identical(other.caption, caption) || other.caption == caption)&&const DeepCollectionEquality().equals(other.meta, meta)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.activatedAt, activatedAt) || other.activatedAt == activatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); @@ -707,7 +680,6 @@ String toString() { return 'SnAccountBadge(id: $id, type: $type, label: $label, caption: $caption, meta: $meta, expiredAt: $expiredAt, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, activatedAt: $activatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -718,9 +690,6 @@ $Res call({ String id, String type, String? label, String? caption, Map meta, DateTime? expiredAt, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? activatedAt, DateTime? deletedAt }); - - - } /// @nodoc class _$SnAccountBadgeCopyWithImpl<$Res> @@ -751,7 +720,6 @@ as DateTime?, } - /// @nodoc @JsonSerializable() @@ -802,7 +770,6 @@ String toString() { return 'SnAccountBadge(id: $id, type: $type, label: $label, caption: $caption, meta: $meta, expiredAt: $expiredAt, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, activatedAt: $activatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -813,9 +780,6 @@ $Res call({ String id, String type, String? label, String? caption, Map meta, DateTime? expiredAt, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? activatedAt, DateTime? deletedAt }); - - - } /// @nodoc class __$SnAccountBadgeCopyWithImpl<$Res> @@ -844,10 +808,8 @@ as DateTime?, )); } - } - /// @nodoc mixin _$SnContactMethod { @@ -861,7 +823,6 @@ $SnContactMethodCopyWith get copyWith => _$SnContactMethodCopyW /// Serializes this SnContactMethod to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnContactMethod&&(identical(other.id, id) || other.id == id)&&(identical(other.type, type) || other.type == type)&&(identical(other.verifiedAt, verifiedAt) || other.verifiedAt == verifiedAt)&&(identical(other.isPrimary, isPrimary) || other.isPrimary == isPrimary)&&(identical(other.content, content) || other.content == content)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); @@ -876,7 +837,6 @@ String toString() { return 'SnContactMethod(id: $id, type: $type, verifiedAt: $verifiedAt, isPrimary: $isPrimary, content: $content, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -887,9 +847,6 @@ $Res call({ String id, int type, DateTime? verifiedAt, bool isPrimary, String content, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - - - } /// @nodoc class _$SnContactMethodCopyWithImpl<$Res> @@ -918,7 +875,6 @@ as DateTime?, } - /// @nodoc @JsonSerializable() @@ -961,7 +917,6 @@ String toString() { return 'SnContactMethod(id: $id, type: $type, verifiedAt: $verifiedAt, isPrimary: $isPrimary, content: $content, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -972,9 +927,6 @@ $Res call({ String id, int type, DateTime? verifiedAt, bool isPrimary, String content, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - - - } /// @nodoc class __$SnContactMethodCopyWithImpl<$Res> @@ -1001,10 +953,8 @@ as DateTime?, )); } - } - /// @nodoc mixin _$SnNotification { @@ -1018,7 +968,6 @@ $SnNotificationCopyWith get copyWith => _$SnNotificationCopyWith /// Serializes this SnNotification to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnNotification&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.id, id) || other.id == id)&&(identical(other.topic, topic) || other.topic == topic)&&(identical(other.title, title) || other.title == title)&&(identical(other.subtitle, subtitle) || other.subtitle == subtitle)&&(identical(other.content, content) || other.content == content)&&const DeepCollectionEquality().equals(other.meta, meta)&&(identical(other.priority, priority) || other.priority == priority)&&(identical(other.viewedAt, viewedAt) || other.viewedAt == viewedAt)&&(identical(other.accountId, accountId) || other.accountId == accountId)); @@ -1033,7 +982,6 @@ String toString() { return 'SnNotification(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, topic: $topic, title: $title, subtitle: $subtitle, content: $content, meta: $meta, priority: $priority, viewedAt: $viewedAt, accountId: $accountId)'; } - } /// @nodoc @@ -1044,9 +992,6 @@ $Res call({ DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String topic, String title, String subtitle, String content, Map meta, int priority, DateTime? viewedAt, String accountId }); - - - } /// @nodoc class _$SnNotificationCopyWithImpl<$Res> @@ -1078,7 +1023,6 @@ as String, } - /// @nodoc @JsonSerializable() @@ -1130,7 +1074,6 @@ String toString() { return 'SnNotification(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, topic: $topic, title: $title, subtitle: $subtitle, content: $content, meta: $meta, priority: $priority, viewedAt: $viewedAt, accountId: $accountId)'; } - } /// @nodoc @@ -1141,9 +1084,6 @@ $Res call({ DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String topic, String title, String subtitle, String content, Map meta, int priority, DateTime? viewedAt, String accountId }); - - - } /// @nodoc class __$SnNotificationCopyWithImpl<$Res> @@ -1173,10 +1113,8 @@ as String, )); } - } - /// @nodoc mixin _$SnVerificationMark { @@ -1190,7 +1128,6 @@ $SnVerificationMarkCopyWith get copyWith => _$SnVerification /// Serializes this SnVerificationMark to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnVerificationMark&&(identical(other.type, type) || other.type == type)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.verifiedBy, verifiedBy) || other.verifiedBy == verifiedBy)); @@ -1205,7 +1142,6 @@ String toString() { return 'SnVerificationMark(type: $type, title: $title, description: $description, verifiedBy: $verifiedBy)'; } - } /// @nodoc @@ -1216,9 +1152,6 @@ $Res call({ int type, String? title, String? description, String? verifiedBy }); - - - } /// @nodoc class _$SnVerificationMarkCopyWithImpl<$Res> @@ -1242,7 +1175,6 @@ as String?, } - /// @nodoc @JsonSerializable() @@ -1280,7 +1212,6 @@ String toString() { return 'SnVerificationMark(type: $type, title: $title, description: $description, verifiedBy: $verifiedBy)'; } - } /// @nodoc @@ -1291,9 +1222,6 @@ $Res call({ int type, String? title, String? description, String? verifiedBy }); - - - } /// @nodoc class __$SnVerificationMarkCopyWithImpl<$Res> @@ -1315,7 +1243,6 @@ as String?, )); } - } // dart format on diff --git a/lib/models/wallet.freezed.dart b/lib/models/wallet.freezed.dart index 470e5fb..71592c2 100644 --- a/lib/models/wallet.freezed.dart +++ b/lib/models/wallet.freezed.dart @@ -26,7 +26,6 @@ $SnWalletCopyWith get copyWith => _$SnWalletCopyWithImpl(thi /// Serializes this SnWallet to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnWallet&&(identical(other.id, id) || other.id == id)&&const DeepCollectionEquality().equals(other.pockets, pockets)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.account, account) || other.account == account)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); @@ -41,7 +40,6 @@ String toString() { return 'SnWallet(id: $id, pockets: $pockets, accountId: $accountId, account: $account, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -52,7 +50,6 @@ $Res call({ String id, List pockets, String accountId, SnAccount? account, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - $SnAccountCopyWith<$Res>? get account; } @@ -93,7 +90,6 @@ $SnAccountCopyWith<$Res>? get account { } } - /// @nodoc @JsonSerializable() @@ -140,7 +136,6 @@ String toString() { return 'SnWallet(id: $id, pockets: $pockets, accountId: $accountId, account: $account, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -151,7 +146,6 @@ $Res call({ String id, List pockets, String accountId, SnAccount? account, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - @override $SnAccountCopyWith<$Res>? get account; } @@ -193,7 +187,6 @@ $SnAccountCopyWith<$Res>? get account { } } - /// @nodoc mixin _$SnWalletPocket { @@ -207,7 +200,6 @@ $SnWalletPocketCopyWith get copyWith => _$SnWalletPocketCopyWith /// Serializes this SnWalletPocket to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnWalletPocket&&(identical(other.id, id) || other.id == id)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.walletId, walletId) || other.walletId == walletId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); @@ -222,7 +214,6 @@ String toString() { return 'SnWalletPocket(id: $id, currency: $currency, amount: $amount, walletId: $walletId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -233,9 +224,6 @@ $Res call({ String id, String currency, double amount, String walletId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - - - } /// @nodoc class _$SnWalletPocketCopyWithImpl<$Res> @@ -262,7 +250,6 @@ as DateTime?, } - /// @nodoc @JsonSerializable() @@ -303,7 +290,6 @@ String toString() { return 'SnWalletPocket(id: $id, currency: $currency, amount: $amount, walletId: $walletId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -314,9 +300,6 @@ $Res call({ String id, String currency, double amount, String walletId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - - - } /// @nodoc class __$SnWalletPocketCopyWithImpl<$Res> @@ -341,10 +324,8 @@ as DateTime?, )); } - } - /// @nodoc mixin _$SnTransaction { @@ -358,7 +339,6 @@ $SnTransactionCopyWith get copyWith => _$SnTransactionCopyWithImp /// Serializes this SnTransaction to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnTransaction&&(identical(other.id, id) || other.id == id)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.remarks, remarks) || other.remarks == remarks)&&(identical(other.type, type) || other.type == type)&&(identical(other.payerWalletId, payerWalletId) || other.payerWalletId == payerWalletId)&&(identical(other.payerWallet, payerWallet) || other.payerWallet == payerWallet)&&(identical(other.payeeWalletId, payeeWalletId) || other.payeeWalletId == payeeWalletId)&&(identical(other.payeeWallet, payeeWallet) || other.payeeWallet == payeeWallet)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); @@ -373,7 +353,6 @@ String toString() { return 'SnTransaction(id: $id, currency: $currency, amount: $amount, remarks: $remarks, type: $type, payerWalletId: $payerWalletId, payerWallet: $payerWallet, payeeWalletId: $payeeWalletId, payeeWallet: $payeeWallet, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -384,7 +363,6 @@ $Res call({ String id, String currency, double amount, String? remarks, int type, String? payerWalletId, SnWallet? payerWallet, String? payeeWalletId, SnWallet? payeeWallet, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - $SnWalletCopyWith<$Res>? get payerWallet;$SnWalletCopyWith<$Res>? get payeeWallet; } @@ -442,7 +420,6 @@ $SnWalletCopyWith<$Res>? get payeeWallet { } } - /// @nodoc @JsonSerializable() @@ -488,7 +465,6 @@ String toString() { return 'SnTransaction(id: $id, currency: $currency, amount: $amount, remarks: $remarks, type: $type, payerWalletId: $payerWalletId, payerWallet: $payerWallet, payeeWalletId: $payeeWalletId, payeeWallet: $payeeWallet, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -499,7 +475,6 @@ $Res call({ String id, String currency, double amount, String? remarks, int type, String? payerWalletId, SnWallet? payerWallet, String? payeeWalletId, SnWallet? payeeWallet, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - @override $SnWalletCopyWith<$Res>? get payerWallet;@override $SnWalletCopyWith<$Res>? get payeeWallet; } @@ -558,7 +533,6 @@ $SnWalletCopyWith<$Res>? get payeeWallet { } } - /// @nodoc mixin _$SnWalletSubscription { @@ -572,7 +546,6 @@ $SnWalletSubscriptionCopyWith get copyWith => _$SnWalletSu /// Serializes this SnWalletSubscription to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnWalletSubscription&&(identical(other.id, id) || other.id == id)&&(identical(other.begunAt, begunAt) || other.begunAt == begunAt)&&(identical(other.endedAt, endedAt) || other.endedAt == endedAt)&&(identical(other.identifier, identifier) || other.identifier == identifier)&&(identical(other.isActive, isActive) || other.isActive == isActive)&&(identical(other.isFreeTrial, isFreeTrial) || other.isFreeTrial == isFreeTrial)&&(identical(other.status, status) || other.status == status)&&(identical(other.paymentMethod, paymentMethod) || other.paymentMethod == paymentMethod)&&const DeepCollectionEquality().equals(other.paymentDetails, paymentDetails)&&(identical(other.basePrice, basePrice) || other.basePrice == basePrice)&&(identical(other.couponId, couponId) || other.couponId == couponId)&&const DeepCollectionEquality().equals(other.coupon, coupon)&&(identical(other.renewalAt, renewalAt) || other.renewalAt == renewalAt)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.account, account) || other.account == account)&&(identical(other.isAvailable, isAvailable) || other.isAvailable == isAvailable)&&(identical(other.finalPrice, finalPrice) || other.finalPrice == finalPrice)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); @@ -587,7 +560,6 @@ String toString() { return 'SnWalletSubscription(id: $id, begunAt: $begunAt, endedAt: $endedAt, identifier: $identifier, isActive: $isActive, isFreeTrial: $isFreeTrial, status: $status, paymentMethod: $paymentMethod, paymentDetails: $paymentDetails, basePrice: $basePrice, couponId: $couponId, coupon: $coupon, renewalAt: $renewalAt, accountId: $accountId, account: $account, isAvailable: $isAvailable, finalPrice: $finalPrice, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -598,7 +570,6 @@ $Res call({ String id, DateTime begunAt, DateTime? endedAt, String identifier, bool isActive, bool isFreeTrial, int status, String? paymentMethod, Map? paymentDetails, double? basePrice, String? couponId, dynamic coupon, DateTime? renewalAt, String accountId, SnAccount? account, bool isAvailable, double? finalPrice, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - $SnAccountCopyWith<$Res>? get account; } @@ -652,7 +623,6 @@ $SnAccountCopyWith<$Res>? get account { } } - /// @nodoc @JsonSerializable() @@ -714,7 +684,6 @@ String toString() { return 'SnWalletSubscription(id: $id, begunAt: $begunAt, endedAt: $endedAt, identifier: $identifier, isActive: $isActive, isFreeTrial: $isFreeTrial, status: $status, paymentMethod: $paymentMethod, paymentDetails: $paymentDetails, basePrice: $basePrice, couponId: $couponId, coupon: $coupon, renewalAt: $renewalAt, accountId: $accountId, account: $account, isAvailable: $isAvailable, finalPrice: $finalPrice, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -725,7 +694,6 @@ $Res call({ String id, DateTime begunAt, DateTime? endedAt, String identifier, bool isActive, bool isFreeTrial, int status, String? paymentMethod, Map? paymentDetails, double? basePrice, String? couponId, dynamic coupon, DateTime? renewalAt, String accountId, SnAccount? account, bool isAvailable, double? finalPrice, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - @override $SnAccountCopyWith<$Res>? get account; } @@ -780,7 +748,6 @@ $SnAccountCopyWith<$Res>? get account { } } - /// @nodoc mixin _$SnWalletSubscriptionRef { @@ -794,7 +761,6 @@ $SnWalletSubscriptionRefCopyWith get copyWith => _$SnWa /// Serializes this SnWalletSubscriptionRef to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnWalletSubscriptionRef&&(identical(other.id, id) || other.id == id)&&(identical(other.isActive, isActive) || other.isActive == isActive)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.identifier, identifier) || other.identifier == identifier)); @@ -809,7 +775,6 @@ String toString() { return 'SnWalletSubscriptionRef(id: $id, isActive: $isActive, accountId: $accountId, createdAt: $createdAt, deletedAt: $deletedAt, updatedAt: $updatedAt, identifier: $identifier)'; } - } /// @nodoc @@ -820,9 +785,6 @@ $Res call({ String id, bool isActive, String accountId, DateTime createdAt, DateTime? deletedAt, DateTime updatedAt, String identifier }); - - - } /// @nodoc class _$SnWalletSubscriptionRefCopyWithImpl<$Res> @@ -849,7 +811,6 @@ as String, } - /// @nodoc @JsonSerializable() @@ -890,7 +851,6 @@ String toString() { return 'SnWalletSubscriptionRef(id: $id, isActive: $isActive, accountId: $accountId, createdAt: $createdAt, deletedAt: $deletedAt, updatedAt: $updatedAt, identifier: $identifier)'; } - } /// @nodoc @@ -901,9 +861,6 @@ $Res call({ String id, bool isActive, String accountId, DateTime createdAt, DateTime? deletedAt, DateTime updatedAt, String identifier }); - - - } /// @nodoc class __$SnWalletSubscriptionRefCopyWithImpl<$Res> @@ -928,10 +885,8 @@ as String, )); } - } - /// @nodoc mixin _$SnWalletOrder { @@ -945,7 +900,6 @@ $SnWalletOrderCopyWith get copyWith => _$SnWalletOrderCopyWithImp /// Serializes this SnWalletOrder to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SnWalletOrder&&(identical(other.id, id) || other.id == id)&&(identical(other.status, status) || other.status == status)&&(identical(other.currency, currency) || other.currency == currency)&&const DeepCollectionEquality().equals(other.remarks, remarks)&&(identical(other.appIdentifier, appIdentifier) || other.appIdentifier == appIdentifier)&&const DeepCollectionEquality().equals(other.meta, meta)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.payeeWalletId, payeeWalletId) || other.payeeWalletId == payeeWalletId)&&(identical(other.payeeWallet, payeeWallet) || other.payeeWallet == payeeWallet)&&(identical(other.transactionId, transactionId) || other.transactionId == transactionId)&&(identical(other.transaction, transaction) || other.transaction == transaction)&&(identical(other.issuerAppId, issuerAppId) || other.issuerAppId == issuerAppId)&&const DeepCollectionEquality().equals(other.issuerApp, issuerApp)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)); @@ -960,7 +914,6 @@ String toString() { return 'SnWalletOrder(id: $id, status: $status, currency: $currency, remarks: $remarks, appIdentifier: $appIdentifier, meta: $meta, amount: $amount, expiredAt: $expiredAt, payeeWalletId: $payeeWalletId, payeeWallet: $payeeWallet, transactionId: $transactionId, transaction: $transaction, issuerAppId: $issuerAppId, issuerApp: $issuerApp, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -971,7 +924,6 @@ $Res call({ String id, int status, String currency, dynamic remarks, String appIdentifier, Map meta, int amount, DateTime expiredAt, String? payeeWalletId, SnWallet? payeeWallet, String? transactionId, SnTransaction? transaction, String? issuerAppId, dynamic issuerApp, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - $SnWalletCopyWith<$Res>? get payeeWallet;$SnTransactionCopyWith<$Res>? get transaction; } @@ -1034,7 +986,6 @@ $SnTransactionCopyWith<$Res>? get transaction { } } - /// @nodoc @JsonSerializable() @@ -1091,7 +1042,6 @@ String toString() { return 'SnWalletOrder(id: $id, status: $status, currency: $currency, remarks: $remarks, appIdentifier: $appIdentifier, meta: $meta, amount: $amount, expiredAt: $expiredAt, payeeWalletId: $payeeWalletId, payeeWallet: $payeeWallet, transactionId: $transactionId, transaction: $transaction, issuerAppId: $issuerAppId, issuerApp: $issuerApp, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)'; } - } /// @nodoc @@ -1102,7 +1052,6 @@ $Res call({ String id, int status, String currency, dynamic remarks, String appIdentifier, Map meta, int amount, DateTime expiredAt, String? payeeWalletId, SnWallet? payeeWallet, String? transactionId, SnTransaction? transaction, String? issuerAppId, dynamic issuerApp, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt }); - @override $SnWalletCopyWith<$Res>? get payeeWallet;@override $SnTransactionCopyWith<$Res>? get transaction; } diff --git a/lib/pods/call.freezed.dart b/lib/pods/call.freezed.dart index c6a98cc..840c5c0 100644 --- a/lib/pods/call.freezed.dart +++ b/lib/pods/call.freezed.dart @@ -22,14 +22,11 @@ mixin _$CallState { @pragma('vm:prefer-inline') $CallStateCopyWith get copyWith => _$CallStateCopyWithImpl(this as CallState, _$identity); - - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is CallState&&(identical(other.isConnected, isConnected) || other.isConnected == isConnected)&&(identical(other.isMicrophoneEnabled, isMicrophoneEnabled) || other.isMicrophoneEnabled == isMicrophoneEnabled)&&(identical(other.isCameraEnabled, isCameraEnabled) || other.isCameraEnabled == isCameraEnabled)&&(identical(other.isScreenSharing, isScreenSharing) || other.isScreenSharing == isScreenSharing)&&(identical(other.duration, duration) || other.duration == duration)&&(identical(other.error, error) || other.error == error)); } - @override int get hashCode => Object.hash(runtimeType,isConnected,isMicrophoneEnabled,isCameraEnabled,isScreenSharing,duration,error); @@ -38,7 +35,6 @@ String toString() { return 'CallState(isConnected: $isConnected, isMicrophoneEnabled: $isMicrophoneEnabled, isCameraEnabled: $isCameraEnabled, isScreenSharing: $isScreenSharing, duration: $duration, error: $error)'; } - } /// @nodoc @@ -49,9 +45,6 @@ $Res call({ bool isConnected, bool isMicrophoneEnabled, bool isCameraEnabled, bool isScreenSharing, Duration duration, String? error }); - - - } /// @nodoc class _$CallStateCopyWithImpl<$Res> @@ -77,10 +70,8 @@ as String?, } - /// @nodoc - class _CallState implements CallState { const _CallState({required this.isConnected, required this.isMicrophoneEnabled, required this.isCameraEnabled, required this.isScreenSharing, this.duration = const Duration(seconds: 0), this.error}); @@ -98,14 +89,11 @@ class _CallState implements CallState { @pragma('vm:prefer-inline') _$CallStateCopyWith<_CallState> get copyWith => __$CallStateCopyWithImpl<_CallState>(this, _$identity); - - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _CallState&&(identical(other.isConnected, isConnected) || other.isConnected == isConnected)&&(identical(other.isMicrophoneEnabled, isMicrophoneEnabled) || other.isMicrophoneEnabled == isMicrophoneEnabled)&&(identical(other.isCameraEnabled, isCameraEnabled) || other.isCameraEnabled == isCameraEnabled)&&(identical(other.isScreenSharing, isScreenSharing) || other.isScreenSharing == isScreenSharing)&&(identical(other.duration, duration) || other.duration == duration)&&(identical(other.error, error) || other.error == error)); } - @override int get hashCode => Object.hash(runtimeType,isConnected,isMicrophoneEnabled,isCameraEnabled,isScreenSharing,duration,error); @@ -114,7 +102,6 @@ String toString() { return 'CallState(isConnected: $isConnected, isMicrophoneEnabled: $isMicrophoneEnabled, isCameraEnabled: $isCameraEnabled, isScreenSharing: $isScreenSharing, duration: $duration, error: $error)'; } - } /// @nodoc @@ -125,9 +112,6 @@ $Res call({ bool isConnected, bool isMicrophoneEnabled, bool isCameraEnabled, bool isScreenSharing, Duration duration, String? error }); - - - } /// @nodoc class __$CallStateCopyWithImpl<$Res> @@ -151,7 +135,6 @@ as String?, )); } - } /// @nodoc @@ -164,14 +147,11 @@ mixin _$CallParticipantLive { @pragma('vm:prefer-inline') $CallParticipantLiveCopyWith get copyWith => _$CallParticipantLiveCopyWithImpl(this as CallParticipantLive, _$identity); - - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is CallParticipantLive&&(identical(other.participant, participant) || other.participant == participant)&&(identical(other.remoteParticipant, remoteParticipant) || other.remoteParticipant == remoteParticipant)); } - @override int get hashCode => Object.hash(runtimeType,participant,remoteParticipant); @@ -180,7 +160,6 @@ String toString() { return 'CallParticipantLive(participant: $participant, remoteParticipant: $remoteParticipant)'; } - } /// @nodoc @@ -191,7 +170,6 @@ $Res call({ CallParticipant participant, Participant remoteParticipant }); - $CallParticipantCopyWith<$Res> get participant; } @@ -224,10 +202,8 @@ $CallParticipantCopyWith<$Res> get participant { } } - /// @nodoc - class _CallParticipantLive extends CallParticipantLive { const _CallParticipantLive({required this.participant, required this.remoteParticipant}): super._(); @@ -241,14 +217,11 @@ class _CallParticipantLive extends CallParticipantLive { @pragma('vm:prefer-inline') _$CallParticipantLiveCopyWith<_CallParticipantLive> get copyWith => __$CallParticipantLiveCopyWithImpl<_CallParticipantLive>(this, _$identity); - - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _CallParticipantLive&&(identical(other.participant, participant) || other.participant == participant)&&(identical(other.remoteParticipant, remoteParticipant) || other.remoteParticipant == remoteParticipant)); } - @override int get hashCode => Object.hash(runtimeType,participant,remoteParticipant); @@ -257,7 +230,6 @@ String toString() { return 'CallParticipantLive(participant: $participant, remoteParticipant: $remoteParticipant)'; } - } /// @nodoc @@ -268,7 +240,6 @@ $Res call({ CallParticipant participant, Participant remoteParticipant }); - @override $CallParticipantCopyWith<$Res> get participant; } diff --git a/lib/pods/config.freezed.dart b/lib/pods/config.freezed.dart index 74568f0..caeb637 100644 --- a/lib/pods/config.freezed.dart +++ b/lib/pods/config.freezed.dart @@ -23,14 +23,11 @@ mixin _$AppSettings { @pragma('vm:prefer-inline') $AppSettingsCopyWith get copyWith => _$AppSettingsCopyWithImpl(this as AppSettings, _$identity); - - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is AppSettings&&(identical(other.autoTranslate, autoTranslate) || other.autoTranslate == autoTranslate)&&(identical(other.soundEffects, soundEffects) || other.soundEffects == soundEffects)&&(identical(other.aprilFoolFeatures, aprilFoolFeatures) || other.aprilFoolFeatures == aprilFoolFeatures)&&(identical(other.enterToSend, enterToSend) || other.enterToSend == enterToSend)&&(identical(other.appBarTransparent, appBarTransparent) || other.appBarTransparent == appBarTransparent)&&(identical(other.customFonts, customFonts) || other.customFonts == customFonts)&&(identical(other.appColorScheme, appColorScheme) || other.appColorScheme == appColorScheme)&&(identical(other.windowSize, windowSize) || other.windowSize == windowSize)); } - @override int get hashCode => Object.hash(runtimeType,autoTranslate,soundEffects,aprilFoolFeatures,enterToSend,appBarTransparent,customFonts,appColorScheme,windowSize); @@ -39,7 +36,6 @@ String toString() { return 'AppSettings(autoTranslate: $autoTranslate, soundEffects: $soundEffects, aprilFoolFeatures: $aprilFoolFeatures, enterToSend: $enterToSend, appBarTransparent: $appBarTransparent, customFonts: $customFonts, appColorScheme: $appColorScheme, windowSize: $windowSize)'; } - } /// @nodoc @@ -50,9 +46,6 @@ $Res call({ bool autoTranslate, bool soundEffects, bool aprilFoolFeatures, bool enterToSend, bool appBarTransparent, String? customFonts, int? appColorScheme, Size? windowSize }); - - - } /// @nodoc class _$AppSettingsCopyWithImpl<$Res> @@ -80,10 +73,8 @@ as Size?, } - /// @nodoc - class _AppSettings implements AppSettings { const _AppSettings({required this.autoTranslate, required this.soundEffects, required this.aprilFoolFeatures, required this.enterToSend, required this.appBarTransparent, required this.customFonts, required this.appColorScheme, required this.windowSize}); @@ -104,14 +95,11 @@ class _AppSettings implements AppSettings { @pragma('vm:prefer-inline') _$AppSettingsCopyWith<_AppSettings> get copyWith => __$AppSettingsCopyWithImpl<_AppSettings>(this, _$identity); - - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppSettings&&(identical(other.autoTranslate, autoTranslate) || other.autoTranslate == autoTranslate)&&(identical(other.soundEffects, soundEffects) || other.soundEffects == soundEffects)&&(identical(other.aprilFoolFeatures, aprilFoolFeatures) || other.aprilFoolFeatures == aprilFoolFeatures)&&(identical(other.enterToSend, enterToSend) || other.enterToSend == enterToSend)&&(identical(other.appBarTransparent, appBarTransparent) || other.appBarTransparent == appBarTransparent)&&(identical(other.customFonts, customFonts) || other.customFonts == customFonts)&&(identical(other.appColorScheme, appColorScheme) || other.appColorScheme == appColorScheme)&&(identical(other.windowSize, windowSize) || other.windowSize == windowSize)); } - @override int get hashCode => Object.hash(runtimeType,autoTranslate,soundEffects,aprilFoolFeatures,enterToSend,appBarTransparent,customFonts,appColorScheme,windowSize); @@ -120,7 +108,6 @@ String toString() { return 'AppSettings(autoTranslate: $autoTranslate, soundEffects: $soundEffects, aprilFoolFeatures: $aprilFoolFeatures, enterToSend: $enterToSend, appBarTransparent: $appBarTransparent, customFonts: $customFonts, appColorScheme: $appColorScheme, windowSize: $windowSize)'; } - } /// @nodoc @@ -131,9 +118,6 @@ $Res call({ bool autoTranslate, bool soundEffects, bool aprilFoolFeatures, bool enterToSend, bool appBarTransparent, String? customFonts, int? appColorScheme, Size? windowSize }); - - - } /// @nodoc class __$AppSettingsCopyWithImpl<$Res> @@ -159,7 +143,6 @@ as Size?, )); } - } // dart format on diff --git a/lib/pods/websocket.freezed.dart b/lib/pods/websocket.freezed.dart index 2136507..f08dc03 100644 --- a/lib/pods/websocket.freezed.dart +++ b/lib/pods/websocket.freezed.dart @@ -15,9 +15,6 @@ T _$identity(T value) => value; /// @nodoc mixin _$WebSocketState implements DiagnosticableTreeMixin { - - - @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { properties @@ -30,7 +27,6 @@ bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is WebSocketState); } - @override int get hashCode => runtimeType.hashCode; @@ -39,7 +35,6 @@ String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { return 'WebSocketState()'; } - } /// @nodoc @@ -47,18 +42,12 @@ class $WebSocketStateCopyWith<$Res> { $WebSocketStateCopyWith(WebSocketState _, $Res Function(WebSocketState) __); } - /// @nodoc - class _Connected with DiagnosticableTreeMixin implements WebSocketState { const _Connected(); - - - - @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { properties @@ -71,7 +60,6 @@ bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _Connected); } - @override int get hashCode => runtimeType.hashCode; @@ -80,23 +68,14 @@ String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { return 'WebSocketState.connected()'; } - } - - - /// @nodoc - class _Connecting with DiagnosticableTreeMixin implements WebSocketState { const _Connecting(); - - - - @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { properties @@ -109,7 +88,6 @@ bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _Connecting); } - @override int get hashCode => runtimeType.hashCode; @@ -118,23 +96,14 @@ String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { return 'WebSocketState.connecting()'; } - } - - - /// @nodoc - class _Disconnected with DiagnosticableTreeMixin implements WebSocketState { const _Disconnected(); - - - - @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { properties @@ -147,7 +116,6 @@ bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _Disconnected); } - @override int get hashCode => runtimeType.hashCode; @@ -156,15 +124,10 @@ String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { return 'WebSocketState.disconnected()'; } - } - - - /// @nodoc - class _Error with DiagnosticableTreeMixin implements WebSocketState { const _Error(this.message); @@ -177,7 +140,6 @@ class _Error with DiagnosticableTreeMixin implements WebSocketState { @pragma('vm:prefer-inline') _$ErrorCopyWith<_Error> get copyWith => __$ErrorCopyWithImpl<_Error>(this, _$identity); - @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { properties @@ -190,7 +152,6 @@ bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _Error&&(identical(other.message, message) || other.message == message)); } - @override int get hashCode => Object.hash(runtimeType,message); @@ -199,7 +160,6 @@ String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { return 'WebSocketState.error(message: $message)'; } - } /// @nodoc @@ -210,9 +170,6 @@ $Res call({ String message }); - - - } /// @nodoc class __$ErrorCopyWithImpl<$Res> @@ -231,10 +188,8 @@ as String, )); } - } - /// @nodoc mixin _$WebSocketPacket implements DiagnosticableTreeMixin { @@ -269,7 +224,6 @@ String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { return 'WebSocketPacket(type: $type, data: $data, errorMessage: $errorMessage)'; } - } /// @nodoc @@ -280,9 +234,6 @@ $Res call({ String type, Map? data, String? errorMessage }); - - - } /// @nodoc class _$WebSocketPacketCopyWithImpl<$Res> @@ -305,7 +256,6 @@ as String?, } - /// @nodoc @JsonSerializable() @@ -356,7 +306,6 @@ String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { return 'WebSocketPacket(type: $type, data: $data, errorMessage: $errorMessage)'; } - } /// @nodoc @@ -367,9 +316,6 @@ $Res call({ String type, Map? data, String? errorMessage }); - - - } /// @nodoc class __$WebSocketPacketCopyWithImpl<$Res> @@ -390,7 +336,6 @@ as String?, )); } - } // dart format on diff --git a/lib/route.dart b/lib/route.dart index e6d51e1..55277ed 100644 --- a/lib/route.dart +++ b/lib/route.dart @@ -1,98 +1,322 @@ -import 'package:auto_route/auto_route.dart'; -import 'package:island/route.gr.dart'; +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:island/widgets/app_wrapper.dart'; +import 'package:island/screens/tabs.dart'; -@AutoRouterConfig(replaceInRouteName: 'Screen|Page,Route') -class AppRouter extends RootStackRouter { - @override - RouteType get defaultRouteType => RouteType.adaptive(); +import 'package:island/screens/explore.dart'; +import 'package:island/screens/account.dart'; +import 'package:island/screens/notification.dart'; +import 'package:island/screens/wallet.dart'; +import 'package:island/screens/account/relationship.dart'; +import 'package:island/screens/account/profile.dart'; +import 'package:island/screens/account/me/update.dart'; +import 'package:island/screens/account/leveling.dart'; +import 'package:island/screens/account/me/settings.dart'; +import 'package:island/screens/chat/chat.dart'; +import 'package:island/screens/chat/room.dart'; +import 'package:island/screens/chat/room_detail.dart'; +import 'package:island/screens/chat/call.dart'; +import 'package:island/screens/creators/hub.dart'; +import 'package:island/screens/creators/posts/list.dart'; +import 'package:island/screens/creators/stickers/stickers.dart'; +import 'package:island/screens/creators/stickers/pack_detail.dart'; +import 'package:island/screens/creators/publishers.dart'; +import 'package:island/screens/posts/compose.dart'; +import 'package:island/screens/posts/detail.dart'; +import 'package:island/screens/posts/pub_profile.dart'; +import 'package:island/screens/auth/login.dart'; +import 'package:island/screens/auth/create_account.dart'; +import 'package:island/screens/settings.dart'; +import 'package:island/screens/realm/realms.dart'; +import 'package:island/screens/realm/detail.dart'; +import 'package:island/screens/account/event_calendar.dart'; - @override - List get routes => [ - AutoRoute(path: '/', page: AppWrapper.page, children: _appRoutes), - ]; +// Shell route keys for nested navigation +final rootNavigatorKey = GlobalKey(); +final _shellNavigatorKey = GlobalKey(); +final _tabsShellKey = GlobalKey(); - List get _appRoutes => [ - // Standalone routes without bottom navigation - AutoRoute(page: PostComposeRoute.page, path: 'posts/compose'), - AutoRoute(page: PostEditRoute.page, path: 'posts/:id/edit'), - AutoRoute(page: CallRoute.page, path: 'chat/:id/call'), - AutoRoute(page: EventCalanderRoute.page, path: 'account/:name/calendar'), - - // Main tabs with bottom navigation and shell routes for desktop layout - AutoRoute( - page: TabsRoute.page, - path: '', - children: [ - AutoRoute( - page: ExploreShellRoute.page, - path: '', - children: [ - AutoRoute(page: ExploreRoute.page, path: ''), - AutoRoute(page: PostDetailRoute.page, path: 'posts/:id'), - AutoRoute( - page: PublisherProfileRoute.page, - path: 'publishers/:name', - ), - ], - ), - AutoRoute( - page: AccountShellRoute.page, - path: 'account', - children: [ - AutoRoute(page: AccountRoute.page, path: ''), - AutoRoute(page: NotificationRoute.page, path: 'notifications'), - AutoRoute(page: WalletRoute.page, path: 'wallet'), - AutoRoute(page: RelationshipRoute.page, path: 'relationships'), - AutoRoute(page: AccountProfileRoute.page, path: ':name'), - AutoRoute(page: UpdateProfileRoute.page, path: 'me/update'), - AutoRoute(page: LevelingRoute.page, path: 'me/leveling'), - AutoRoute(page: AccountSettingsRoute.page, path: 'settings'), - ], - ), - AutoRoute(page: RealmListRoute.page, path: 'realms'), - AutoRoute( - page: ChatShellRoute.page, - path: 'chat', - children: [ - AutoRoute(page: ChatListRoute.page, path: ''), - AutoRoute(page: ChatRoomRoute.page, path: ':id'), - AutoRoute(page: NewChatRoute.page, path: 'new'), - AutoRoute(page: EditChatRoute.page, path: ':id/edit'), - AutoRoute(page: ChatDetailRoute.page, path: ':id/detail'), - ], - ), - ], - ), - AutoRoute( - page: CreatorHubShellRoute.page, - path: 'creators', - children: [ - AutoRoute(page: CreatorHubRoute.page, path: ''), - AutoRoute(page: CreatorPostListRoute.page, path: ':name/posts'), - AutoRoute(page: StickersRoute.page, path: ':name/stickers'), - AutoRoute(page: NewStickerPacksRoute.page, path: ':name/stickers/new'), - AutoRoute( - page: EditStickerPacksRoute.page, - path: ':name/stickers/:packId/edit', - ), - AutoRoute( - page: StickerPackDetailRoute.page, - path: ':name/stickers/:packId', - ), - AutoRoute(page: NewStickersRoute.page, path: ':name/stickers/new'), - AutoRoute( - page: EditStickersRoute.page, - path: ':name/stickers/:id/edit', - ), - AutoRoute(page: NewPublisherRoute.page, path: 'new'), - AutoRoute(page: EditPublisherRoute.page, path: ':name/edit'), - ], - ), - AutoRoute(page: LoginRoute.page, path: 'auth/login'), - AutoRoute(page: CreateAccountRoute.page, path: 'auth/create-account'), - AutoRoute(page: SettingsRoute.page, path: 'settings'), - AutoRoute(page: NewRealmRoute.page, path: 'realms/new'), - AutoRoute(page: RealmDetailRoute.page, path: 'realms/:slug'), - AutoRoute(page: EditRealmRoute.page, path: 'realms/:slug/edit'), - ]; +// Provider for the router +final routerProvider = Provider((ref) { + return GoRouter( + navigatorKey: rootNavigatorKey, + initialLocation: '/', + routes: [ + ShellRoute( + navigatorKey: _shellNavigatorKey, + builder: (context, state, child) { + return AppWrapper(child: child); + }, + routes: [ + // Standalone routes without bottom navigation + GoRoute( + path: '/posts/compose', + builder: (context, state) => const PostComposeScreen(), + ), + GoRoute( + path: '/posts/:id/edit', + builder: (context, state) { + final id = state.pathParameters['id']!; + return PostEditScreen(id: id); + }, + ), + GoRoute( + path: '/chat/:id/call', + builder: (context, state) { + final id = state.pathParameters['id']!; + return CallScreen(roomId: id); + }, + ), + GoRoute( + path: '/account/:name/calendar', + builder: (context, state) { + final name = state.pathParameters['name']!; + return EventCalanderScreen(name: name); + }, + ), + GoRoute( + path: '/creators', + builder: (context, state) => const CreatorHubScreen(), + routes: [ + GoRoute( + path: ':name/posts', + builder: (context, state) { + final name = state.pathParameters['name']!; + return CreatorPostListScreen(pubName: name); + }, + ), + GoRoute( + path: ':name/stickers', + builder: (context, state) { + final name = state.pathParameters['name']!; + return StickersScreen(pubName: name); + }, + ), + GoRoute( + path: ':name/stickers/new', + builder: (context, state) { + final name = state.pathParameters['name']!; + return NewStickerPacksScreen(pubName: name); + }, + ), + GoRoute( + path: ':name/stickers/:packId/edit', + builder: (context, state) { + final name = state.pathParameters['name']!; + final packId = state.pathParameters['packId']!; + return EditStickerPacksScreen( + pubName: name, + packId: packId, + ); + }, + ), + GoRoute( + path: ':name/stickers/:packId', + builder: (context, state) { + final name = state.pathParameters['name']!; + final packId = state.pathParameters['packId']!; + return StickerPackDetailScreen(pubName: name, id: packId); + }, + ), + GoRoute( + path: ':name/stickers/:packId/new', + builder: (context, state) { + final packId = state.pathParameters['packId']!; + return NewStickersScreen(packId: packId); + }, + ), + GoRoute( + path: ':name/stickers/:packId/:id/edit', + builder: (context, state) { + final packId = state.pathParameters['packId']!; + final id = state.pathParameters['id']!; + return EditStickersScreen(id: id, packId: packId); + }, + ), + GoRoute( + path: 'new', + builder: (context, state) => const NewPublisherScreen(), + ), + GoRoute( + path: ':name/edit', + builder: (context, state) { + final name = state.pathParameters['name']!; + return EditPublisherScreen(name: name); + }, + ), + ], + ), + + // Auth routes + GoRoute( + path: '/auth/login', + builder: (context, state) => const LoginScreen(), + ), + GoRoute( + path: '/auth/create-account', + builder: (context, state) => const CreateAccountScreen(), + ), + + // Other routes + GoRoute( + path: '/settings', + builder: (context, state) => const SettingsScreen(), + ), + + // Main tabs with TabsScreen shell + ShellRoute( + navigatorKey: _tabsShellKey, + builder: (context, state, child) { + return TabsScreen(child: child); + }, + routes: [ + // Explore tab + GoRoute( + path: '/', + builder: (context, state) => const ExploreScreen(), + routes: [ + GoRoute( + path: 'posts/:id', + builder: (context, state) { + final id = state.pathParameters['id']!; + return PostDetailScreen(id: id); + }, + ), + GoRoute( + path: 'publishers/:name', + builder: (context, state) { + final name = state.pathParameters['name']!; + return PublisherProfileScreen(name: name); + }, + ), + ], + ), + + // Chat tab + GoRoute( + path: '/chat', + builder: (context, state) => const ChatListScreen(), + routes: [ + GoRoute( + path: ':id', + builder: (context, state) { + final id = state.pathParameters['id']!; + return ChatRoomScreen(id: id); + }, + ), + GoRoute( + path: 'new', + builder: (context, state) => const NewChatScreen(), + ), + GoRoute( + path: ':id/edit', + builder: (context, state) { + final id = state.pathParameters['id']!; + return EditChatScreen(id: id); + }, + ), + GoRoute( + path: ':id/detail', + builder: (context, state) { + final id = state.pathParameters['id']!; + return ChatDetailScreen(id: id); + }, + ), + ], + ), + + // Realms tab + GoRoute( + path: '/realms', + builder: (context, state) => const RealmListScreen(), + routes: [ + GoRoute( + path: 'new', + builder: (context, state) => const NewRealmScreen(), + ), + GoRoute( + path: ':slug', + builder: (context, state) { + final slug = state.pathParameters['slug']!; + return RealmDetailScreen(slug: slug); + }, + ), + GoRoute( + path: ':slug/edit', + builder: (context, state) { + final slug = state.pathParameters['slug']!; + return EditRealmScreen(slug: slug); + }, + ), + ], + ), + + // Account tab + GoRoute( + path: '/account', + builder: (context, state) => const AccountScreen(), + routes: [ + GoRoute( + path: 'notifications', + builder: (context, state) => const NotificationScreen(), + ), + GoRoute( + path: 'wallet', + builder: (context, state) => const WalletScreen(), + ), + GoRoute( + path: 'relationships', + builder: (context, state) => const RelationshipScreen(), + ), + GoRoute( + path: ':name', + builder: (context, state) { + final name = state.pathParameters['name']!; + return AccountProfileScreen(name: name); + }, + ), + GoRoute( + path: 'me/update', + builder: (context, state) => const UpdateProfileScreen(), + ), + GoRoute( + path: 'me/leveling', + builder: (context, state) => const LevelingScreen(), + ), + GoRoute( + path: 'settings', + builder: (context, state) => const AccountSettingsScreen(), + ), + ], + ), + ], + ), + ], + ), + ], + ); +}); + +// Navigation helper functions +class AppRouter { + static GoRouter of(BuildContext context) { + return GoRouter.of(context); + } + + static void go(BuildContext context, String path) { + context.go(path); + } + + static void push(BuildContext context, String path) { + context.push(path); + } + + static void pop(BuildContext context) { + context.pop(); + } + + static bool canPop(BuildContext context) { + return context.canPop(); + } } diff --git a/lib/route.gr.dart b/lib/route.gr.dart deleted file mode 100644 index f0392f5..0000000 --- a/lib/route.gr.dart +++ /dev/null @@ -1,1773 +0,0 @@ -// dart format width=80 -// GENERATED CODE - DO NOT MODIFY BY HAND - -// ************************************************************************** -// AutoRouterGenerator -// ************************************************************************** - -// ignore_for_file: type=lint -// coverage:ignore-file - -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:auto_route/auto_route.dart' as _i31; -import 'package:flutter/foundation.dart' as _i33; -import 'package:flutter/material.dart' as _i32; -import 'package:island/models/post.dart' as _i34; -import 'package:island/screens/account.dart' as _i2; -import 'package:island/screens/account/event_calendar.dart' as _i17; -import 'package:island/screens/account/leveling.dart' as _i19; -import 'package:island/screens/account/me/settings.dart' as _i3; -import 'package:island/screens/account/me/update.dart' as _i29; -import 'package:island/screens/account/profile.dart' as _i1; -import 'package:island/screens/account/relationship.dart' as _i26; -import 'package:island/screens/auth/create_account.dart' as _i10; -import 'package:island/screens/auth/login.dart' as _i20; -import 'package:island/screens/chat/call.dart' as _i6; -import 'package:island/screens/chat/chat.dart' as _i8; -import 'package:island/screens/chat/room.dart' as _i9; -import 'package:island/screens/chat/room_detail.dart' as _i7; -import 'package:island/screens/creators/hub.dart' as _i11; -import 'package:island/screens/creators/posts/list.dart' as _i12; -import 'package:island/screens/creators/publishers.dart' as _i13; -import 'package:island/screens/creators/stickers/pack_detail.dart' as _i16; -import 'package:island/screens/creators/stickers/stickers.dart' as _i15; -import 'package:island/screens/explore.dart' as _i18; -import 'package:island/screens/notification.dart' as _i21; -import 'package:island/screens/posts/compose.dart' as _i22; -import 'package:island/screens/posts/compose_article.dart' as _i5; -import 'package:island/screens/posts/detail.dart' as _i23; -import 'package:island/screens/posts/pub_profile.dart' as _i24; -import 'package:island/screens/realm/detail.dart' as _i25; -import 'package:island/screens/realm/realms.dart' as _i14; -import 'package:island/screens/settings.dart' as _i27; -import 'package:island/screens/tabs.dart' as _i28; -import 'package:island/screens/wallet.dart' as _i30; -import 'package:island/widgets/app_wrapper.dart' as _i4; - -/// generated route for -/// [_i1.AccountProfileScreen] -class AccountProfileRoute extends _i31.PageRouteInfo { - AccountProfileRoute({ - _i32.Key? key, - required String name, - List<_i31.PageRouteInfo>? children, - }) : super( - AccountProfileRoute.name, - args: AccountProfileRouteArgs(key: key, name: name), - rawPathParams: {'name': name}, - initialChildren: children, - ); - - static const String name = 'AccountProfileRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: - () => AccountProfileRouteArgs(name: pathParams.getString('name')), - ); - return _i1.AccountProfileScreen(key: args.key, name: args.name); - }, - ); -} - -class AccountProfileRouteArgs { - const AccountProfileRouteArgs({this.key, required this.name}); - - final _i32.Key? key; - - final String name; - - @override - String toString() { - return 'AccountProfileRouteArgs{key: $key, name: $name}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! AccountProfileRouteArgs) return false; - return key == other.key && name == other.name; - } - - @override - int get hashCode => key.hashCode ^ name.hashCode; -} - -/// generated route for -/// [_i2.AccountScreen] -class AccountRoute extends _i31.PageRouteInfo { - AccountRoute({ - _i33.Key? key, - bool isAside = false, - List<_i31.PageRouteInfo>? children, - }) : super( - AccountRoute.name, - args: AccountRouteArgs(key: key, isAside: isAside), - initialChildren: children, - ); - - static const String name = 'AccountRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final args = data.argsAs( - orElse: () => const AccountRouteArgs(), - ); - return _i2.AccountScreen(key: args.key, isAside: args.isAside); - }, - ); -} - -class AccountRouteArgs { - const AccountRouteArgs({this.key, this.isAside = false}); - - final _i33.Key? key; - - final bool isAside; - - @override - String toString() { - return 'AccountRouteArgs{key: $key, isAside: $isAside}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! AccountRouteArgs) return false; - return key == other.key && isAside == other.isAside; - } - - @override - int get hashCode => key.hashCode ^ isAside.hashCode; -} - -/// generated route for -/// [_i3.AccountSettingsScreen] -class AccountSettingsRoute extends _i31.PageRouteInfo { - const AccountSettingsRoute({List<_i31.PageRouteInfo>? children}) - : super(AccountSettingsRoute.name, initialChildren: children); - - static const String name = 'AccountSettingsRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - return const _i3.AccountSettingsScreen(); - }, - ); -} - -/// generated route for -/// [_i2.AccountShellScreen] -class AccountShellRoute extends _i31.PageRouteInfo { - const AccountShellRoute({List<_i31.PageRouteInfo>? children}) - : super(AccountShellRoute.name, initialChildren: children); - - static const String name = 'AccountShellRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - return const _i2.AccountShellScreen(); - }, - ); -} - -/// generated route for -/// [_i4.AppWrapper] -class AppWrapper extends _i31.PageRouteInfo { - const AppWrapper({List<_i31.PageRouteInfo>? children}) - : super(AppWrapper.name, initialChildren: children); - - static const String name = 'AppWrapper'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - return const _i4.AppWrapper(); - }, - ); -} - -/// generated route for -/// [_i5.ArticleComposeScreen] -class ArticleComposeRoute extends _i31.PageRouteInfo { - ArticleComposeRoute({ - _i32.Key? key, - _i34.SnPost? originalPost, - List<_i31.PageRouteInfo>? children, - }) : super( - ArticleComposeRoute.name, - args: ArticleComposeRouteArgs(key: key, originalPost: originalPost), - initialChildren: children, - ); - - static const String name = 'ArticleComposeRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final args = data.argsAs( - orElse: () => const ArticleComposeRouteArgs(), - ); - return _i5.ArticleComposeScreen( - key: args.key, - originalPost: args.originalPost, - ); - }, - ); -} - -class ArticleComposeRouteArgs { - const ArticleComposeRouteArgs({this.key, this.originalPost}); - - final _i32.Key? key; - - final _i34.SnPost? originalPost; - - @override - String toString() { - return 'ArticleComposeRouteArgs{key: $key, originalPost: $originalPost}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! ArticleComposeRouteArgs) return false; - return key == other.key && originalPost == other.originalPost; - } - - @override - int get hashCode => key.hashCode ^ originalPost.hashCode; -} - -/// generated route for -/// [_i5.ArticleEditScreen] -class ArticleEditRoute extends _i31.PageRouteInfo { - ArticleEditRoute({ - _i32.Key? key, - required String id, - List<_i31.PageRouteInfo>? children, - }) : super( - ArticleEditRoute.name, - args: ArticleEditRouteArgs(key: key, id: id), - rawPathParams: {'id': id}, - initialChildren: children, - ); - - static const String name = 'ArticleEditRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: () => ArticleEditRouteArgs(id: pathParams.getString('id')), - ); - return _i5.ArticleEditScreen(key: args.key, id: args.id); - }, - ); -} - -class ArticleEditRouteArgs { - const ArticleEditRouteArgs({this.key, required this.id}); - - final _i32.Key? key; - - final String id; - - @override - String toString() { - return 'ArticleEditRouteArgs{key: $key, id: $id}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! ArticleEditRouteArgs) return false; - return key == other.key && id == other.id; - } - - @override - int get hashCode => key.hashCode ^ id.hashCode; -} - -/// generated route for -/// [_i6.CallScreen] -class CallRoute extends _i31.PageRouteInfo { - CallRoute({ - _i32.Key? key, - required String roomId, - List<_i31.PageRouteInfo>? children, - }) : super( - CallRoute.name, - args: CallRouteArgs(key: key, roomId: roomId), - rawPathParams: {'id': roomId}, - initialChildren: children, - ); - - static const String name = 'CallRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: () => CallRouteArgs(roomId: pathParams.getString('id')), - ); - return _i6.CallScreen(key: args.key, roomId: args.roomId); - }, - ); -} - -class CallRouteArgs { - const CallRouteArgs({this.key, required this.roomId}); - - final _i32.Key? key; - - final String roomId; - - @override - String toString() { - return 'CallRouteArgs{key: $key, roomId: $roomId}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! CallRouteArgs) return false; - return key == other.key && roomId == other.roomId; - } - - @override - int get hashCode => key.hashCode ^ roomId.hashCode; -} - -/// generated route for -/// [_i7.ChatDetailScreen] -class ChatDetailRoute extends _i31.PageRouteInfo { - ChatDetailRoute({ - _i32.Key? key, - required String id, - List<_i31.PageRouteInfo>? children, - }) : super( - ChatDetailRoute.name, - args: ChatDetailRouteArgs(key: key, id: id), - rawPathParams: {'id': id}, - initialChildren: children, - ); - - static const String name = 'ChatDetailRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: () => ChatDetailRouteArgs(id: pathParams.getString('id')), - ); - return _i7.ChatDetailScreen(key: args.key, id: args.id); - }, - ); -} - -class ChatDetailRouteArgs { - const ChatDetailRouteArgs({this.key, required this.id}); - - final _i32.Key? key; - - final String id; - - @override - String toString() { - return 'ChatDetailRouteArgs{key: $key, id: $id}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! ChatDetailRouteArgs) return false; - return key == other.key && id == other.id; - } - - @override - int get hashCode => key.hashCode ^ id.hashCode; -} - -/// generated route for -/// [_i8.ChatListScreen] -class ChatListRoute extends _i31.PageRouteInfo { - ChatListRoute({ - _i32.Key? key, - bool isAside = false, - List<_i31.PageRouteInfo>? children, - }) : super( - ChatListRoute.name, - args: ChatListRouteArgs(key: key, isAside: isAside), - initialChildren: children, - ); - - static const String name = 'ChatListRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final args = data.argsAs( - orElse: () => const ChatListRouteArgs(), - ); - return _i8.ChatListScreen(key: args.key, isAside: args.isAside); - }, - ); -} - -class ChatListRouteArgs { - const ChatListRouteArgs({this.key, this.isAside = false}); - - final _i32.Key? key; - - final bool isAside; - - @override - String toString() { - return 'ChatListRouteArgs{key: $key, isAside: $isAside}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! ChatListRouteArgs) return false; - return key == other.key && isAside == other.isAside; - } - - @override - int get hashCode => key.hashCode ^ isAside.hashCode; -} - -/// generated route for -/// [_i9.ChatRoomScreen] -class ChatRoomRoute extends _i31.PageRouteInfo { - ChatRoomRoute({ - _i33.Key? key, - required String id, - List<_i31.PageRouteInfo>? children, - }) : super( - ChatRoomRoute.name, - args: ChatRoomRouteArgs(key: key, id: id), - rawPathParams: {'id': id}, - initialChildren: children, - ); - - static const String name = 'ChatRoomRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: () => ChatRoomRouteArgs(id: pathParams.getString('id')), - ); - return _i9.ChatRoomScreen(key: args.key, id: args.id); - }, - ); -} - -class ChatRoomRouteArgs { - const ChatRoomRouteArgs({this.key, required this.id}); - - final _i33.Key? key; - - final String id; - - @override - String toString() { - return 'ChatRoomRouteArgs{key: $key, id: $id}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! ChatRoomRouteArgs) return false; - return key == other.key && id == other.id; - } - - @override - int get hashCode => key.hashCode ^ id.hashCode; -} - -/// generated route for -/// [_i8.ChatShellScreen] -class ChatShellRoute extends _i31.PageRouteInfo { - const ChatShellRoute({List<_i31.PageRouteInfo>? children}) - : super(ChatShellRoute.name, initialChildren: children); - - static const String name = 'ChatShellRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - return const _i8.ChatShellScreen(); - }, - ); -} - -/// generated route for -/// [_i10.CreateAccountScreen] -class CreateAccountRoute extends _i31.PageRouteInfo { - const CreateAccountRoute({List<_i31.PageRouteInfo>? children}) - : super(CreateAccountRoute.name, initialChildren: children); - - static const String name = 'CreateAccountRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - return const _i10.CreateAccountScreen(); - }, - ); -} - -/// generated route for -/// [_i11.CreatorHubScreen] -class CreatorHubRoute extends _i31.PageRouteInfo { - CreatorHubRoute({ - _i32.Key? key, - bool isAside = false, - List<_i31.PageRouteInfo>? children, - }) : super( - CreatorHubRoute.name, - args: CreatorHubRouteArgs(key: key, isAside: isAside), - initialChildren: children, - ); - - static const String name = 'CreatorHubRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final args = data.argsAs( - orElse: () => const CreatorHubRouteArgs(), - ); - return _i11.CreatorHubScreen(key: args.key, isAside: args.isAside); - }, - ); -} - -class CreatorHubRouteArgs { - const CreatorHubRouteArgs({this.key, this.isAside = false}); - - final _i32.Key? key; - - final bool isAside; - - @override - String toString() { - return 'CreatorHubRouteArgs{key: $key, isAside: $isAside}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! CreatorHubRouteArgs) return false; - return key == other.key && isAside == other.isAside; - } - - @override - int get hashCode => key.hashCode ^ isAside.hashCode; -} - -/// generated route for -/// [_i11.CreatorHubShellScreen] -class CreatorHubShellRoute extends _i31.PageRouteInfo { - const CreatorHubShellRoute({List<_i31.PageRouteInfo>? children}) - : super(CreatorHubShellRoute.name, initialChildren: children); - - static const String name = 'CreatorHubShellRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - return const _i11.CreatorHubShellScreen(); - }, - ); -} - -/// generated route for -/// [_i12.CreatorPostListScreen] -class CreatorPostListRoute - extends _i31.PageRouteInfo { - CreatorPostListRoute({ - _i32.Key? key, - required String pubName, - List<_i31.PageRouteInfo>? children, - }) : super( - CreatorPostListRoute.name, - args: CreatorPostListRouteArgs(key: key, pubName: pubName), - rawPathParams: {'name': pubName}, - initialChildren: children, - ); - - static const String name = 'CreatorPostListRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: - () => - CreatorPostListRouteArgs(pubName: pathParams.getString('name')), - ); - return _i12.CreatorPostListScreen(key: args.key, pubName: args.pubName); - }, - ); -} - -class CreatorPostListRouteArgs { - const CreatorPostListRouteArgs({this.key, required this.pubName}); - - final _i32.Key? key; - - final String pubName; - - @override - String toString() { - return 'CreatorPostListRouteArgs{key: $key, pubName: $pubName}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! CreatorPostListRouteArgs) return false; - return key == other.key && pubName == other.pubName; - } - - @override - int get hashCode => key.hashCode ^ pubName.hashCode; -} - -/// generated route for -/// [_i8.EditChatScreen] -class EditChatRoute extends _i31.PageRouteInfo { - EditChatRoute({_i32.Key? key, String? id, List<_i31.PageRouteInfo>? children}) - : super( - EditChatRoute.name, - args: EditChatRouteArgs(key: key, id: id), - rawPathParams: {'id': id}, - initialChildren: children, - ); - - static const String name = 'EditChatRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: () => EditChatRouteArgs(id: pathParams.optString('id')), - ); - return _i8.EditChatScreen(key: args.key, id: args.id); - }, - ); -} - -class EditChatRouteArgs { - const EditChatRouteArgs({this.key, this.id}); - - final _i32.Key? key; - - final String? id; - - @override - String toString() { - return 'EditChatRouteArgs{key: $key, id: $id}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! EditChatRouteArgs) return false; - return key == other.key && id == other.id; - } - - @override - int get hashCode => key.hashCode ^ id.hashCode; -} - -/// generated route for -/// [_i13.EditPublisherScreen] -class EditPublisherRoute extends _i31.PageRouteInfo { - EditPublisherRoute({ - _i32.Key? key, - String? name, - List<_i31.PageRouteInfo>? children, - }) : super( - EditPublisherRoute.name, - args: EditPublisherRouteArgs(key: key, name: name), - rawPathParams: {'id': name}, - initialChildren: children, - ); - - static const String name = 'EditPublisherRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: () => EditPublisherRouteArgs(name: pathParams.optString('id')), - ); - return _i13.EditPublisherScreen(key: args.key, name: args.name); - }, - ); -} - -class EditPublisherRouteArgs { - const EditPublisherRouteArgs({this.key, this.name}); - - final _i32.Key? key; - - final String? name; - - @override - String toString() { - return 'EditPublisherRouteArgs{key: $key, name: $name}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! EditPublisherRouteArgs) return false; - return key == other.key && name == other.name; - } - - @override - int get hashCode => key.hashCode ^ name.hashCode; -} - -/// generated route for -/// [_i14.EditRealmScreen] -class EditRealmRoute extends _i31.PageRouteInfo { - EditRealmRoute({ - _i32.Key? key, - String? slug, - List<_i31.PageRouteInfo>? children, - }) : super( - EditRealmRoute.name, - args: EditRealmRouteArgs(key: key, slug: slug), - rawPathParams: {'slug': slug}, - initialChildren: children, - ); - - static const String name = 'EditRealmRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: () => EditRealmRouteArgs(slug: pathParams.optString('slug')), - ); - return _i14.EditRealmScreen(key: args.key, slug: args.slug); - }, - ); -} - -class EditRealmRouteArgs { - const EditRealmRouteArgs({this.key, this.slug}); - - final _i32.Key? key; - - final String? slug; - - @override - String toString() { - return 'EditRealmRouteArgs{key: $key, slug: $slug}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! EditRealmRouteArgs) return false; - return key == other.key && slug == other.slug; - } - - @override - int get hashCode => key.hashCode ^ slug.hashCode; -} - -/// generated route for -/// [_i15.EditStickerPacksScreen] -class EditStickerPacksRoute - extends _i31.PageRouteInfo { - EditStickerPacksRoute({ - _i32.Key? key, - required String pubName, - String? packId, - List<_i31.PageRouteInfo>? children, - }) : super( - EditStickerPacksRoute.name, - args: EditStickerPacksRouteArgs( - key: key, - pubName: pubName, - packId: packId, - ), - rawPathParams: {'name': pubName, 'packId': packId}, - initialChildren: children, - ); - - static const String name = 'EditStickerPacksRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: - () => EditStickerPacksRouteArgs( - pubName: pathParams.getString('name'), - packId: pathParams.optString('packId'), - ), - ); - return _i15.EditStickerPacksScreen( - key: args.key, - pubName: args.pubName, - packId: args.packId, - ); - }, - ); -} - -class EditStickerPacksRouteArgs { - const EditStickerPacksRouteArgs({ - this.key, - required this.pubName, - this.packId, - }); - - final _i32.Key? key; - - final String pubName; - - final String? packId; - - @override - String toString() { - return 'EditStickerPacksRouteArgs{key: $key, pubName: $pubName, packId: $packId}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! EditStickerPacksRouteArgs) return false; - return key == other.key && - pubName == other.pubName && - packId == other.packId; - } - - @override - int get hashCode => key.hashCode ^ pubName.hashCode ^ packId.hashCode; -} - -/// generated route for -/// [_i16.EditStickersScreen] -class EditStickersRoute extends _i31.PageRouteInfo { - EditStickersRoute({ - _i32.Key? key, - required String packId, - required String? id, - List<_i31.PageRouteInfo>? children, - }) : super( - EditStickersRoute.name, - args: EditStickersRouteArgs(key: key, packId: packId, id: id), - rawPathParams: {'packId': packId, 'id': id}, - initialChildren: children, - ); - - static const String name = 'EditStickersRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: - () => EditStickersRouteArgs( - packId: pathParams.getString('packId'), - id: pathParams.optString('id'), - ), - ); - return _i16.EditStickersScreen( - key: args.key, - packId: args.packId, - id: args.id, - ); - }, - ); -} - -class EditStickersRouteArgs { - const EditStickersRouteArgs({ - this.key, - required this.packId, - required this.id, - }); - - final _i32.Key? key; - - final String packId; - - final String? id; - - @override - String toString() { - return 'EditStickersRouteArgs{key: $key, packId: $packId, id: $id}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! EditStickersRouteArgs) return false; - return key == other.key && packId == other.packId && id == other.id; - } - - @override - int get hashCode => key.hashCode ^ packId.hashCode ^ id.hashCode; -} - -/// generated route for -/// [_i17.EventCalanderScreen] -class EventCalanderRoute extends _i31.PageRouteInfo { - EventCalanderRoute({ - _i32.Key? key, - required String name, - List<_i31.PageRouteInfo>? children, - }) : super( - EventCalanderRoute.name, - args: EventCalanderRouteArgs(key: key, name: name), - rawPathParams: {'name': name}, - initialChildren: children, - ); - - static const String name = 'EventCalanderRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: - () => EventCalanderRouteArgs(name: pathParams.getString('name')), - ); - return _i17.EventCalanderScreen(key: args.key, name: args.name); - }, - ); -} - -class EventCalanderRouteArgs { - const EventCalanderRouteArgs({this.key, required this.name}); - - final _i32.Key? key; - - final String name; - - @override - String toString() { - return 'EventCalanderRouteArgs{key: $key, name: $name}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! EventCalanderRouteArgs) return false; - return key == other.key && name == other.name; - } - - @override - int get hashCode => key.hashCode ^ name.hashCode; -} - -/// generated route for -/// [_i18.ExploreScreen] -class ExploreRoute extends _i31.PageRouteInfo { - ExploreRoute({ - _i32.Key? key, - bool isAside = false, - List<_i31.PageRouteInfo>? children, - }) : super( - ExploreRoute.name, - args: ExploreRouteArgs(key: key, isAside: isAside), - initialChildren: children, - ); - - static const String name = 'ExploreRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final args = data.argsAs( - orElse: () => const ExploreRouteArgs(), - ); - return _i18.ExploreScreen(key: args.key, isAside: args.isAside); - }, - ); -} - -class ExploreRouteArgs { - const ExploreRouteArgs({this.key, this.isAside = false}); - - final _i32.Key? key; - - final bool isAside; - - @override - String toString() { - return 'ExploreRouteArgs{key: $key, isAside: $isAside}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! ExploreRouteArgs) return false; - return key == other.key && isAside == other.isAside; - } - - @override - int get hashCode => key.hashCode ^ isAside.hashCode; -} - -/// generated route for -/// [_i18.ExploreShellScreen] -class ExploreShellRoute extends _i31.PageRouteInfo { - const ExploreShellRoute({List<_i31.PageRouteInfo>? children}) - : super(ExploreShellRoute.name, initialChildren: children); - - static const String name = 'ExploreShellRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - return const _i18.ExploreShellScreen(); - }, - ); -} - -/// generated route for -/// [_i19.LevelingScreen] -class LevelingRoute extends _i31.PageRouteInfo { - const LevelingRoute({List<_i31.PageRouteInfo>? children}) - : super(LevelingRoute.name, initialChildren: children); - - static const String name = 'LevelingRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - return const _i19.LevelingScreen(); - }, - ); -} - -/// generated route for -/// [_i20.LoginScreen] -class LoginRoute extends _i31.PageRouteInfo { - const LoginRoute({List<_i31.PageRouteInfo>? children}) - : super(LoginRoute.name, initialChildren: children); - - static const String name = 'LoginRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - return const _i20.LoginScreen(); - }, - ); -} - -/// generated route for -/// [_i8.NewChatScreen] -class NewChatRoute extends _i31.PageRouteInfo { - const NewChatRoute({List<_i31.PageRouteInfo>? children}) - : super(NewChatRoute.name, initialChildren: children); - - static const String name = 'NewChatRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - return const _i8.NewChatScreen(); - }, - ); -} - -/// generated route for -/// [_i13.NewPublisherScreen] -class NewPublisherRoute extends _i31.PageRouteInfo { - const NewPublisherRoute({List<_i31.PageRouteInfo>? children}) - : super(NewPublisherRoute.name, initialChildren: children); - - static const String name = 'NewPublisherRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - return const _i13.NewPublisherScreen(); - }, - ); -} - -/// generated route for -/// [_i14.NewRealmScreen] -class NewRealmRoute extends _i31.PageRouteInfo { - const NewRealmRoute({List<_i31.PageRouteInfo>? children}) - : super(NewRealmRoute.name, initialChildren: children); - - static const String name = 'NewRealmRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - return const _i14.NewRealmScreen(); - }, - ); -} - -/// generated route for -/// [_i15.NewStickerPacksScreen] -class NewStickerPacksRoute - extends _i31.PageRouteInfo { - NewStickerPacksRoute({ - _i32.Key? key, - required String pubName, - List<_i31.PageRouteInfo>? children, - }) : super( - NewStickerPacksRoute.name, - args: NewStickerPacksRouteArgs(key: key, pubName: pubName), - rawPathParams: {'name': pubName}, - initialChildren: children, - ); - - static const String name = 'NewStickerPacksRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: - () => - NewStickerPacksRouteArgs(pubName: pathParams.getString('name')), - ); - return _i15.NewStickerPacksScreen(key: args.key, pubName: args.pubName); - }, - ); -} - -class NewStickerPacksRouteArgs { - const NewStickerPacksRouteArgs({this.key, required this.pubName}); - - final _i32.Key? key; - - final String pubName; - - @override - String toString() { - return 'NewStickerPacksRouteArgs{key: $key, pubName: $pubName}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! NewStickerPacksRouteArgs) return false; - return key == other.key && pubName == other.pubName; - } - - @override - int get hashCode => key.hashCode ^ pubName.hashCode; -} - -/// generated route for -/// [_i16.NewStickersScreen] -class NewStickersRoute extends _i31.PageRouteInfo { - NewStickersRoute({ - _i32.Key? key, - required String packId, - List<_i31.PageRouteInfo>? children, - }) : super( - NewStickersRoute.name, - args: NewStickersRouteArgs(key: key, packId: packId), - rawPathParams: {'packId': packId}, - initialChildren: children, - ); - - static const String name = 'NewStickersRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: - () => NewStickersRouteArgs(packId: pathParams.getString('packId')), - ); - return _i16.NewStickersScreen(key: args.key, packId: args.packId); - }, - ); -} - -class NewStickersRouteArgs { - const NewStickersRouteArgs({this.key, required this.packId}); - - final _i32.Key? key; - - final String packId; - - @override - String toString() { - return 'NewStickersRouteArgs{key: $key, packId: $packId}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! NewStickersRouteArgs) return false; - return key == other.key && packId == other.packId; - } - - @override - int get hashCode => key.hashCode ^ packId.hashCode; -} - -/// generated route for -/// [_i21.NotificationScreen] -class NotificationRoute extends _i31.PageRouteInfo { - const NotificationRoute({List<_i31.PageRouteInfo>? children}) - : super(NotificationRoute.name, initialChildren: children); - - static const String name = 'NotificationRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - return const _i21.NotificationScreen(); - }, - ); -} - -/// generated route for -/// [_i22.PostComposeScreen] -class PostComposeRoute extends _i31.PageRouteInfo { - PostComposeRoute({ - _i32.Key? key, - _i34.SnPost? originalPost, - _i34.SnPost? repliedPost, - _i34.SnPost? forwardedPost, - int? type, - _i22.PostComposeInitialState? initialState, - List<_i31.PageRouteInfo>? children, - }) : super( - PostComposeRoute.name, - args: PostComposeRouteArgs( - key: key, - originalPost: originalPost, - repliedPost: repliedPost, - forwardedPost: forwardedPost, - type: type, - initialState: initialState, - ), - rawQueryParams: {'type': type}, - initialChildren: children, - ); - - static const String name = 'PostComposeRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final queryParams = data.queryParams; - final args = data.argsAs( - orElse: () => PostComposeRouteArgs(type: queryParams.optInt('type')), - ); - return _i22.PostComposeScreen( - key: args.key, - originalPost: args.originalPost, - repliedPost: args.repliedPost, - forwardedPost: args.forwardedPost, - type: args.type, - initialState: args.initialState, - ); - }, - ); -} - -class PostComposeRouteArgs { - const PostComposeRouteArgs({ - this.key, - this.originalPost, - this.repliedPost, - this.forwardedPost, - this.type, - this.initialState, - }); - - final _i32.Key? key; - - final _i34.SnPost? originalPost; - - final _i34.SnPost? repliedPost; - - final _i34.SnPost? forwardedPost; - - final int? type; - - final _i22.PostComposeInitialState? initialState; - - @override - String toString() { - return 'PostComposeRouteArgs{key: $key, originalPost: $originalPost, repliedPost: $repliedPost, forwardedPost: $forwardedPost, type: $type, initialState: $initialState}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! PostComposeRouteArgs) return false; - return key == other.key && - originalPost == other.originalPost && - repliedPost == other.repliedPost && - forwardedPost == other.forwardedPost && - type == other.type && - initialState == other.initialState; - } - - @override - int get hashCode => - key.hashCode ^ - originalPost.hashCode ^ - repliedPost.hashCode ^ - forwardedPost.hashCode ^ - type.hashCode ^ - initialState.hashCode; -} - -/// generated route for -/// [_i23.PostDetailScreen] -class PostDetailRoute extends _i31.PageRouteInfo { - PostDetailRoute({ - _i32.Key? key, - required String id, - List<_i31.PageRouteInfo>? children, - }) : super( - PostDetailRoute.name, - args: PostDetailRouteArgs(key: key, id: id), - rawPathParams: {'id': id}, - initialChildren: children, - ); - - static const String name = 'PostDetailRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: () => PostDetailRouteArgs(id: pathParams.getString('id')), - ); - return _i23.PostDetailScreen(key: args.key, id: args.id); - }, - ); -} - -class PostDetailRouteArgs { - const PostDetailRouteArgs({this.key, required this.id}); - - final _i32.Key? key; - - final String id; - - @override - String toString() { - return 'PostDetailRouteArgs{key: $key, id: $id}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! PostDetailRouteArgs) return false; - return key == other.key && id == other.id; - } - - @override - int get hashCode => key.hashCode ^ id.hashCode; -} - -/// generated route for -/// [_i22.PostEditScreen] -class PostEditRoute extends _i31.PageRouteInfo { - PostEditRoute({ - _i32.Key? key, - required String id, - List<_i31.PageRouteInfo>? children, - }) : super( - PostEditRoute.name, - args: PostEditRouteArgs(key: key, id: id), - rawPathParams: {'id': id}, - initialChildren: children, - ); - - static const String name = 'PostEditRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: () => PostEditRouteArgs(id: pathParams.getString('id')), - ); - return _i22.PostEditScreen(key: args.key, id: args.id); - }, - ); -} - -class PostEditRouteArgs { - const PostEditRouteArgs({this.key, required this.id}); - - final _i32.Key? key; - - final String id; - - @override - String toString() { - return 'PostEditRouteArgs{key: $key, id: $id}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! PostEditRouteArgs) return false; - return key == other.key && id == other.id; - } - - @override - int get hashCode => key.hashCode ^ id.hashCode; -} - -/// generated route for -/// [_i24.PublisherProfileScreen] -class PublisherProfileRoute - extends _i31.PageRouteInfo { - PublisherProfileRoute({ - _i32.Key? key, - required String name, - List<_i31.PageRouteInfo>? children, - }) : super( - PublisherProfileRoute.name, - args: PublisherProfileRouteArgs(key: key, name: name), - rawPathParams: {'name': name}, - initialChildren: children, - ); - - static const String name = 'PublisherProfileRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: - () => PublisherProfileRouteArgs(name: pathParams.getString('name')), - ); - return _i24.PublisherProfileScreen(key: args.key, name: args.name); - }, - ); -} - -class PublisherProfileRouteArgs { - const PublisherProfileRouteArgs({this.key, required this.name}); - - final _i32.Key? key; - - final String name; - - @override - String toString() { - return 'PublisherProfileRouteArgs{key: $key, name: $name}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! PublisherProfileRouteArgs) return false; - return key == other.key && name == other.name; - } - - @override - int get hashCode => key.hashCode ^ name.hashCode; -} - -/// generated route for -/// [_i25.RealmDetailScreen] -class RealmDetailRoute extends _i31.PageRouteInfo { - RealmDetailRoute({ - _i32.Key? key, - required String slug, - List<_i31.PageRouteInfo>? children, - }) : super( - RealmDetailRoute.name, - args: RealmDetailRouteArgs(key: key, slug: slug), - rawPathParams: {'slug': slug}, - initialChildren: children, - ); - - static const String name = 'RealmDetailRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: () => RealmDetailRouteArgs(slug: pathParams.getString('slug')), - ); - return _i25.RealmDetailScreen(key: args.key, slug: args.slug); - }, - ); -} - -class RealmDetailRouteArgs { - const RealmDetailRouteArgs({this.key, required this.slug}); - - final _i32.Key? key; - - final String slug; - - @override - String toString() { - return 'RealmDetailRouteArgs{key: $key, slug: $slug}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! RealmDetailRouteArgs) return false; - return key == other.key && slug == other.slug; - } - - @override - int get hashCode => key.hashCode ^ slug.hashCode; -} - -/// generated route for -/// [_i14.RealmListScreen] -class RealmListRoute extends _i31.PageRouteInfo { - const RealmListRoute({List<_i31.PageRouteInfo>? children}) - : super(RealmListRoute.name, initialChildren: children); - - static const String name = 'RealmListRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - return const _i14.RealmListScreen(); - }, - ); -} - -/// generated route for -/// [_i26.RelationshipScreen] -class RelationshipRoute extends _i31.PageRouteInfo { - const RelationshipRoute({List<_i31.PageRouteInfo>? children}) - : super(RelationshipRoute.name, initialChildren: children); - - static const String name = 'RelationshipRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - return const _i26.RelationshipScreen(); - }, - ); -} - -/// generated route for -/// [_i27.SettingsScreen] -class SettingsRoute extends _i31.PageRouteInfo { - const SettingsRoute({List<_i31.PageRouteInfo>? children}) - : super(SettingsRoute.name, initialChildren: children); - - static const String name = 'SettingsRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - return const _i27.SettingsScreen(); - }, - ); -} - -/// generated route for -/// [_i16.StickerPackDetailScreen] -class StickerPackDetailRoute - extends _i31.PageRouteInfo { - StickerPackDetailRoute({ - _i32.Key? key, - required String pubName, - required String id, - List<_i31.PageRouteInfo>? children, - }) : super( - StickerPackDetailRoute.name, - args: StickerPackDetailRouteArgs(key: key, pubName: pubName, id: id), - rawPathParams: {'name': pubName, 'packId': id}, - initialChildren: children, - ); - - static const String name = 'StickerPackDetailRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: - () => StickerPackDetailRouteArgs( - pubName: pathParams.getString('name'), - id: pathParams.getString('packId'), - ), - ); - return _i16.StickerPackDetailScreen( - key: args.key, - pubName: args.pubName, - id: args.id, - ); - }, - ); -} - -class StickerPackDetailRouteArgs { - const StickerPackDetailRouteArgs({ - this.key, - required this.pubName, - required this.id, - }); - - final _i32.Key? key; - - final String pubName; - - final String id; - - @override - String toString() { - return 'StickerPackDetailRouteArgs{key: $key, pubName: $pubName, id: $id}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! StickerPackDetailRouteArgs) return false; - return key == other.key && pubName == other.pubName && id == other.id; - } - - @override - int get hashCode => key.hashCode ^ pubName.hashCode ^ id.hashCode; -} - -/// generated route for -/// [_i15.StickersScreen] -class StickersRoute extends _i31.PageRouteInfo { - StickersRoute({ - _i32.Key? key, - required String pubName, - List<_i31.PageRouteInfo>? children, - }) : super( - StickersRoute.name, - args: StickersRouteArgs(key: key, pubName: pubName), - rawPathParams: {'name': pubName}, - initialChildren: children, - ); - - static const String name = 'StickersRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - final pathParams = data.inheritedPathParams; - final args = data.argsAs( - orElse: () => StickersRouteArgs(pubName: pathParams.getString('name')), - ); - return _i15.StickersScreen(key: args.key, pubName: args.pubName); - }, - ); -} - -class StickersRouteArgs { - const StickersRouteArgs({this.key, required this.pubName}); - - final _i32.Key? key; - - final String pubName; - - @override - String toString() { - return 'StickersRouteArgs{key: $key, pubName: $pubName}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! StickersRouteArgs) return false; - return key == other.key && pubName == other.pubName; - } - - @override - int get hashCode => key.hashCode ^ pubName.hashCode; -} - -/// generated route for -/// [_i28.TabsScreen] -class TabsRoute extends _i31.PageRouteInfo { - const TabsRoute({List<_i31.PageRouteInfo>? children}) - : super(TabsRoute.name, initialChildren: children); - - static const String name = 'TabsRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - return const _i28.TabsScreen(); - }, - ); -} - -/// generated route for -/// [_i29.UpdateProfileScreen] -class UpdateProfileRoute extends _i31.PageRouteInfo { - const UpdateProfileRoute({List<_i31.PageRouteInfo>? children}) - : super(UpdateProfileRoute.name, initialChildren: children); - - static const String name = 'UpdateProfileRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - return const _i29.UpdateProfileScreen(); - }, - ); -} - -/// generated route for -/// [_i30.WalletScreen] -class WalletRoute extends _i31.PageRouteInfo { - const WalletRoute({List<_i31.PageRouteInfo>? children}) - : super(WalletRoute.name, initialChildren: children); - - static const String name = 'WalletRoute'; - - static _i31.PageInfo page = _i31.PageInfo( - name, - builder: (data) { - return const _i30.WalletScreen(); - }, - ); -} diff --git a/lib/screens/account.dart b/lib/screens/account.dart index 7ab1acc..55a2bd4 100644 --- a/lib/screens/account.dart +++ b/lib/screens/account.dart @@ -1,14 +1,13 @@ -import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:flutter/services.dart'; import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:island/pods/message.dart'; import 'package:island/pods/network.dart'; import 'package:island/pods/userinfo.dart'; -import 'package:island/route.gr.dart'; import 'package:island/screens/notification.dart'; import 'package:island/services/responsive.dart'; import 'package:island/widgets/account/account_name.dart'; @@ -19,9 +18,9 @@ import 'package:island/widgets/content/cloud_files.dart'; import 'package:material_symbols_icons/symbols.dart'; import 'package:styled_widget/styled_widget.dart'; -@RoutePage() class AccountShellScreen extends HookConsumerWidget { - const AccountShellScreen({super.key}); + final Widget child; + const AccountShellScreen({super.key, required this.child}); @override Widget build(BuildContext context, WidgetRef ref) { @@ -34,17 +33,16 @@ class AccountShellScreen extends HookConsumerWidget { children: [ Flexible(flex: 2, child: AccountScreen(isAside: true)), VerticalDivider(width: 1), - Flexible(flex: 3, child: AutoRouter()), + Flexible(flex: 3, child: child), ], ), ); } - return AppBackground(isRoot: true, child: AutoRouter()); + return AppBackground(isRoot: true, child: child); } } -@RoutePage() class AccountScreen extends HookConsumerWidget { final bool isAside; const AccountScreen({super.key, this.isAside = false}); @@ -100,9 +98,7 @@ class AccountScreen extends HookConsumerWidget { radius: 24, ), onTap: () { - context.router.push( - AccountProfileRoute(name: user.value!.name), - ); + context.push('/account/${user.value!.name}'); }, ), Expanded( @@ -147,7 +143,7 @@ class AccountScreen extends HookConsumerWidget { progress: user.value!.profile.levelingProgress, ), onTap: () { - context.router.push(LevelingRoute()); + context.push('/account/leveling'); }, ).padding(horizontal: 12), Row( @@ -165,7 +161,7 @@ class AccountScreen extends HookConsumerWidget { ], ).padding(horizontal: 16, vertical: 12), onTap: () { - context.router.push(CreatorHubShellRoute()); + context.push('/creators'); }, ), ).height(140), @@ -204,7 +200,7 @@ class AccountScreen extends HookConsumerWidget { ], ), onTap: () { - context.router.push(NotificationRoute()); + context.push('/notification'); }, ), ListTile( @@ -214,7 +210,7 @@ class AccountScreen extends HookConsumerWidget { contentPadding: EdgeInsets.symmetric(horizontal: 24), title: Text('wallet').tr(), onTap: () { - context.router.push(WalletRoute()); + context.push('/wallet'); }, ), ListTile( @@ -224,7 +220,7 @@ class AccountScreen extends HookConsumerWidget { contentPadding: EdgeInsets.symmetric(horizontal: 24), title: Text('relationships').tr(), onTap: () { - context.router.push(RelationshipRoute()); + context.push('/account/relationship'); }, ), const Divider(height: 1).padding(vertical: 8), @@ -235,7 +231,7 @@ class AccountScreen extends HookConsumerWidget { contentPadding: EdgeInsets.symmetric(horizontal: 24), title: Text('appSettings').tr(), onTap: () { - context.router.push(SettingsRoute()); + context.push('/settings'); }, ), ListTile( @@ -245,7 +241,7 @@ class AccountScreen extends HookConsumerWidget { contentPadding: EdgeInsets.symmetric(horizontal: 24), title: Text('updateYourProfile').tr(), onTap: () { - context.router.push(UpdateProfileRoute()); + context.push('/account/me/update'); }, ), ListTile( @@ -255,7 +251,7 @@ class AccountScreen extends HookConsumerWidget { contentPadding: EdgeInsets.symmetric(horizontal: 24), title: Text('accountSettings').tr(), onTap: () { - context.router.push(AccountSettingsRoute()); + context.push('/account/me/settings'); }, ), if (kDebugMode) const Divider(height: 1).padding(vertical: 8), @@ -320,7 +316,7 @@ class _UnauthorizedAccountScreen extends StatelessWidget { child: Card( child: InkWell( onTap: () { - context.router.push(CreateAccountRoute()); + context.push('/auth/create'); }, child: Padding( padding: const EdgeInsets.all(16), @@ -342,7 +338,7 @@ class _UnauthorizedAccountScreen extends StatelessWidget { child: Card( child: InkWell( onTap: () { - context.router.push(LoginRoute()); + context.push('/auth/login'); }, child: Padding( padding: const EdgeInsets.all(16), @@ -361,7 +357,7 @@ class _UnauthorizedAccountScreen extends StatelessWidget { const Gap(8), TextButton( onPressed: () { - context.router.push(SettingsRoute()); + context.push('/settings'); }, child: Text('appSettings').tr(), ).center(), diff --git a/lib/screens/account/event_calendar.dart b/lib/screens/account/event_calendar.dart index 83093f4..0a91747 100644 --- a/lib/screens/account/event_calendar.dart +++ b/lib/screens/account/event_calendar.dart @@ -1,4 +1,3 @@ -import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; @@ -12,10 +11,9 @@ import 'package:island/widgets/account/event_calendar.dart'; import 'package:island/widgets/account/fortune_graph.dart'; import 'package:styled_widget/styled_widget.dart'; -@RoutePage() class EventCalanderScreen extends HookConsumerWidget { final String name; - const EventCalanderScreen({super.key, @PathParam("name") required this.name}); + const EventCalanderScreen({super.key, required this.name}); @override Widget build(BuildContext context, WidgetRef ref) { diff --git a/lib/screens/account/leveling.dart b/lib/screens/account/leveling.dart index ef3b285..9da4013 100644 --- a/lib/screens/account/leveling.dart +++ b/lib/screens/account/leveling.dart @@ -1,4 +1,3 @@ -import 'package:auto_route/auto_route.dart'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:gap/gap.dart'; @@ -31,7 +30,6 @@ Future accountStellarSubscription(Ref ref) async { } } -@RoutePage() class LevelingScreen extends HookConsumerWidget { const LevelingScreen({super.key}); diff --git a/lib/screens/account/me/settings.dart b/lib/screens/account/me/settings.dart index 4d1250a..232b45f 100644 --- a/lib/screens/account/me/settings.dart +++ b/lib/screens/account/me/settings.dart @@ -1,6 +1,5 @@ import 'dart:io'; -import 'package:auto_route/annotations.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; @@ -51,7 +50,6 @@ Future> accountConnections(Ref ref) async { .toList(); } -@RoutePage() class AccountSettingsScreen extends HookConsumerWidget { const AccountSettingsScreen({super.key}); diff --git a/lib/screens/account/me/update.dart b/lib/screens/account/me/update.dart index 2ebd5dd..91a2091 100644 --- a/lib/screens/account/me/update.dart +++ b/lib/screens/account/me/update.dart @@ -1,4 +1,3 @@ -import 'package:auto_route/auto_route.dart'; import 'package:croppy/croppy.dart' hide cropImage; import 'package:dropdown_button2/dropdown_button2.dart'; import 'package:easy_localization/easy_localization.dart'; @@ -20,7 +19,6 @@ import 'package:styled_widget/styled_widget.dart'; const kServerSupportedLanguages = {'en-US': 'en-us', 'zh-CN': 'zh-hans'}; -@RoutePage() class UpdateProfileScreen extends HookConsumerWidget { const UpdateProfileScreen({super.key}); diff --git a/lib/screens/account/profile.dart b/lib/screens/account/profile.dart index f97d8c0..6e71165 100644 --- a/lib/screens/account/profile.dart +++ b/lib/screens/account/profile.dart @@ -1,7 +1,7 @@ -import 'package:auto_route/auto_route.dart'; import 'package:dio/dio.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:island/models/chat.dart'; @@ -96,13 +96,9 @@ Future accountRelationship(Ref ref, String uname) async { } } -@RoutePage() class AccountProfileScreen extends HookConsumerWidget { final String name; - const AccountProfileScreen({ - super.key, - @PathParam("name") required this.name, - }); + const AccountProfileScreen({super.key, required this.name}); @override Widget build(BuildContext context, WidgetRef ref) { @@ -142,7 +138,7 @@ class AccountProfileScreen extends HookConsumerWidget { Future directMessageAction() async { if (!account.hasValue) return; if (accountChat.value != null) { - context.router.pushPath('/chat/${accountChat.value!.id}'); + context.push('/chat/${accountChat.value!.id}'); return; } showLoadingModal(context); @@ -153,7 +149,7 @@ class AccountProfileScreen extends HookConsumerWidget { data: {'related_user_id': account.value!.id}, ); final chat = SnChatRoom.fromJson(resp.data); - if (context.mounted) context.router.pushPath('/chat/${chat.id}'); + if (context.mounted) context.push('/chat/${chat.id}'); ref.invalidate(accountDirectChatProvider(name)); } catch (err) { showErrorAlert(err); diff --git a/lib/screens/account/relationship.dart b/lib/screens/account/relationship.dart index b3064b1..d077827 100644 --- a/lib/screens/account/relationship.dart +++ b/lib/screens/account/relationship.dart @@ -1,4 +1,3 @@ -import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -204,7 +203,6 @@ class RelationshipListTile extends StatelessWidget { } } -@RoutePage() class RelationshipScreen extends HookConsumerWidget { const RelationshipScreen({super.key}); diff --git a/lib/screens/auth/create_account.dart b/lib/screens/auth/create_account.dart index d6d41a0..a623c29 100644 --- a/lib/screens/auth/create_account.dart +++ b/lib/screens/auth/create_account.dart @@ -1,12 +1,11 @@ -import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:email_validator/email_validator.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:island/pods/network.dart'; -import 'package:island/route.gr.dart'; import 'package:island/screens/account/me/update.dart'; import 'package:island/widgets/alert.dart'; import 'package:island/widgets/app_scaffold.dart'; @@ -16,7 +15,6 @@ import 'package:url_launcher/url_launcher_string.dart'; import 'captcha.dart'; -@RoutePage() class CreateAccountScreen extends HookConsumerWidget { const CreateAccountScreen({super.key}); @@ -307,7 +305,7 @@ class _PostCreateModal extends HookConsumerWidget { TextButton( onPressed: () { Navigator.pop(context); - context.router.replace(LoginRoute()); + context.pushReplacement('/auth/login'); }, child: Text('login'.tr()), ), diff --git a/lib/screens/auth/login.dart b/lib/screens/auth/login.dart index 39d902c..bbf2432 100644 --- a/lib/screens/auth/login.dart +++ b/lib/screens/auth/login.dart @@ -3,7 +3,6 @@ import 'dart:io'; import 'dart:math' as math; import 'package:animations/animations.dart'; -import 'package:auto_route/auto_route.dart'; import 'package:device_info_plus/device_info_plus.dart'; import 'package:dio/dio.dart'; import 'package:easy_localization/easy_localization.dart'; @@ -43,7 +42,6 @@ final Map kFactorTypes = { 4: ('authFactorPin', 'authFactorPinDescription', Symbols.nest_secure_alarm), }; -@RoutePage() class LoginScreen extends HookConsumerWidget { const LoginScreen({super.key}); diff --git a/lib/screens/chat/call.dart b/lib/screens/chat/call.dart index 66706a7..cfa3b3b 100644 --- a/lib/screens/chat/call.dart +++ b/lib/screens/chat/call.dart @@ -1,4 +1,3 @@ -import 'package:auto_route/annotations.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; @@ -14,10 +13,9 @@ import 'package:livekit_client/livekit_client.dart'; import 'package:material_symbols_icons/symbols.dart'; import 'package:styled_widget/styled_widget.dart'; -@RoutePage() class CallScreen extends HookConsumerWidget { final String roomId; - const CallScreen({super.key, @PathParam('id') required this.roomId}); + const CallScreen({super.key, required this.roomId}); @override Widget build(BuildContext context, WidgetRef ref) { diff --git a/lib/screens/chat/chat.dart b/lib/screens/chat/chat.dart index 93a48f4..1f9262d 100644 --- a/lib/screens/chat/chat.dart +++ b/lib/screens/chat/chat.dart @@ -1,9 +1,9 @@ -import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; import 'package:croppy/croppy.dart' hide cropImage; import 'package:dio/dio.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -15,7 +15,6 @@ import 'package:island/pods/call.dart'; import 'package:island/pods/chat_summary.dart'; import 'package:island/pods/config.dart'; import 'package:island/pods/network.dart'; -import 'package:island/route.gr.dart'; import 'package:island/screens/realm/realms.dart'; import 'package:island/services/file.dart'; import 'package:island/services/responsive.dart'; @@ -173,9 +172,9 @@ Future> chatroomsJoined(Ref ref) async { .toList(); } -@RoutePage() class ChatShellScreen extends HookConsumerWidget { - const ChatShellScreen({super.key}); + final Widget child; + const ChatShellScreen({super.key, required this.child}); @override Widget build(BuildContext context, WidgetRef ref) { @@ -188,17 +187,16 @@ class ChatShellScreen extends HookConsumerWidget { children: [ Flexible(flex: 2, child: ChatListScreen(isAside: true)), VerticalDivider(width: 1), - Flexible(flex: 4, child: AutoRouter()), + Flexible(flex: 4, child: child), ], ), ); } - return AppBackground(isRoot: true, child: AutoRouter()); + return AppBackground(isRoot: true, child: child); } } -@RoutePage() class ChatListScreen extends HookConsumerWidget { final bool isAside; const ChatListScreen({super.key, this.isAside = false}); @@ -319,7 +317,7 @@ class ChatListScreen extends HookConsumerWidget { leading: const Icon(Symbols.add), onTap: () { Navigator.pop(context); - context.pushRoute(NewChatRoute()).then((value) { + context.push('/chat/new').then((value) { if (value != null) { ref.invalidate(chatroomsJoinedProvider); } @@ -400,16 +398,7 @@ class ChatListScreen extends HookConsumerWidget { room: item, isDirect: item.type == 1, onTap: () { - if (context.router.topRoute.name == - ChatRoomRoute.name) { - context.router.replace( - ChatRoomRoute(id: item.id), - ); - } else { - context.router.push( - ChatRoomRoute(id: item.id), - ); - } + context.push('/chat/${item.id}'); }, ); }, @@ -456,7 +445,6 @@ Future chatroomIdentity(Ref ref, String? identifier) async { return SnChatMember.fromJson(resp.data); } -@RoutePage() class NewChatScreen extends StatelessWidget { const NewChatScreen({super.key}); @@ -466,10 +454,9 @@ class NewChatScreen extends StatelessWidget { } } -@RoutePage() class EditChatScreen extends HookConsumerWidget { final String? id; - const EditChatScreen({super.key, @PathParam("id") this.id}); + const EditChatScreen({super.key, this.id}); @override Widget build(BuildContext context, WidgetRef ref) { @@ -579,7 +566,7 @@ class EditChatScreen extends HookConsumerWidget { options: Options(method: id == null ? 'POST' : 'PATCH'), ); if (context.mounted) { - context.maybePop(SnChatRoom.fromJson(resp.data)); + context.pop(SnChatRoom.fromJson(resp.data)); } } catch (err) { showErrorAlert(err); diff --git a/lib/screens/chat/room.dart b/lib/screens/chat/room.dart index 74f7882..9c8d7dc 100644 --- a/lib/screens/chat/room.dart +++ b/lib/screens/chat/room.dart @@ -1,10 +1,10 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; -import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:flutter/services.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:gap/gap.dart'; @@ -18,7 +18,6 @@ import 'package:island/pods/config.dart'; import 'package:island/pods/database.dart'; import 'package:island/pods/network.dart'; import 'package:island/pods/websocket.dart'; -import 'package:island/route.gr.dart'; import 'package:island/services/responsive.dart'; import 'package:island/widgets/alert.dart'; import 'package:island/widgets/app_scaffold.dart'; @@ -288,10 +287,9 @@ class MessagesNotifier extends _$MessagesNotifier { } } -@RoutePage() class ChatRoomScreen extends HookConsumerWidget { final String id; - const ChatRoomScreen({super.key, @PathParam("id") required this.id}); + const ChatRoomScreen({super.key, required this.id}); @override Widget build(BuildContext context, WidgetRef ref) { @@ -605,7 +603,7 @@ class ChatRoomScreen extends HookConsumerWidget { IconButton( icon: const Icon(Icons.more_vert), onPressed: () { - context.router.push(ChatDetailRoute(id: id)); + context.push('/chat/id/detail'); }, ), const Gap(8), diff --git a/lib/screens/chat/room_detail.dart b/lib/screens/chat/room_detail.dart index 393e516..7c812f5 100644 --- a/lib/screens/chat/room_detail.dart +++ b/lib/screens/chat/room_detail.dart @@ -1,14 +1,13 @@ -import 'package:auto_route/auto_route.dart'; import 'package:dio/dio.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:island/models/chat.dart'; import 'package:island/pods/network.dart'; -import 'package:island/route.gr.dart'; import 'package:island/screens/chat/chat.dart'; import 'package:island/widgets/account/account_picker.dart'; import 'package:island/widgets/alert.dart'; @@ -23,10 +22,9 @@ import 'package:styled_widget/styled_widget.dart'; part 'room_detail.freezed.dart'; part 'room_detail.g.dart'; -@RoutePage() class ChatDetailScreen extends HookConsumerWidget { final String id; - const ChatDetailScreen({super.key, @PathParam("id") required this.id}); + const ChatDetailScreen({super.key, required this.id}); @override Widget build(BuildContext context, WidgetRef ref) { @@ -391,7 +389,7 @@ class _ChatRoomActionMenu extends HookConsumerWidget { if ((chatIdentity.value?.role ?? 0) >= 50) PopupMenuItem( onTap: () { - context.router.replace(EditChatRoute(id: id)); + context.pushReplacement('/chat/$id/edit'); }, child: Row( children: [ @@ -426,9 +424,7 @@ class _ChatRoomActionMenu extends HookConsumerWidget { client.delete('/chat/$id'); ref.invalidate(chatroomsJoinedProvider); if (context.mounted) { - context.router.popUntil( - (route) => route is ChatRoomRoute, - ); + context.pop(); } } }); @@ -461,9 +457,7 @@ class _ChatRoomActionMenu extends HookConsumerWidget { client.delete('/chat/$id/members/me'); ref.invalidate(chatroomsJoinedProvider); if (context.mounted) { - context.router.popUntil( - (route) => route is ChatRoomRoute, - ); + context.pop(); } } }); diff --git a/lib/screens/chat/room_detail.freezed.dart b/lib/screens/chat/room_detail.freezed.dart index 9821362..0c0a9a7 100644 --- a/lib/screens/chat/room_detail.freezed.dart +++ b/lib/screens/chat/room_detail.freezed.dart @@ -22,14 +22,11 @@ mixin _$ChatRoomMemberState { @pragma('vm:prefer-inline') $ChatRoomMemberStateCopyWith get copyWith => _$ChatRoomMemberStateCopyWithImpl(this as ChatRoomMemberState, _$identity); - - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is ChatRoomMemberState&&const DeepCollectionEquality().equals(other.members, members)&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.total, total) || other.total == total)&&(identical(other.error, error) || other.error == error)); } - @override int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(members),isLoading,total,error); @@ -38,7 +35,6 @@ String toString() { return 'ChatRoomMemberState(members: $members, isLoading: $isLoading, total: $total, error: $error)'; } - } /// @nodoc @@ -49,9 +45,6 @@ $Res call({ List members, bool isLoading, int total, String? error }); - - - } /// @nodoc class _$ChatRoomMemberStateCopyWithImpl<$Res> @@ -75,10 +68,8 @@ as String?, } - /// @nodoc - class _ChatRoomMemberState implements ChatRoomMemberState { const _ChatRoomMemberState({required final List members, required this.isLoading, required this.total, this.error}): _members = members; @@ -100,14 +91,11 @@ class _ChatRoomMemberState implements ChatRoomMemberState { @pragma('vm:prefer-inline') _$ChatRoomMemberStateCopyWith<_ChatRoomMemberState> get copyWith => __$ChatRoomMemberStateCopyWithImpl<_ChatRoomMemberState>(this, _$identity); - - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _ChatRoomMemberState&&const DeepCollectionEquality().equals(other._members, _members)&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.total, total) || other.total == total)&&(identical(other.error, error) || other.error == error)); } - @override int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_members),isLoading,total,error); @@ -116,7 +104,6 @@ String toString() { return 'ChatRoomMemberState(members: $members, isLoading: $isLoading, total: $total, error: $error)'; } - } /// @nodoc @@ -127,9 +114,6 @@ $Res call({ List members, bool isLoading, int total, String? error }); - - - } /// @nodoc class __$ChatRoomMemberStateCopyWithImpl<$Res> @@ -151,7 +135,6 @@ as String?, )); } - } // dart format on diff --git a/lib/screens/creators/hub.dart b/lib/screens/creators/hub.dart index 8be92f3..61242ce 100644 --- a/lib/screens/creators/hub.dart +++ b/lib/screens/creators/hub.dart @@ -1,13 +1,12 @@ -import 'package:auto_route/auto_route.dart'; import 'package:dropdown_button2/dropdown_button2.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:island/models/post.dart'; import 'package:island/pods/network.dart'; -import 'package:island/route.gr.dart'; import 'package:island/screens/creators/publishers.dart'; import 'package:island/services/responsive.dart'; import 'package:island/widgets/alert.dart'; @@ -27,9 +26,9 @@ Future publisherStats(Ref ref, String? uname) async { return SnPublisherStats.fromJson(resp.data); } -@RoutePage() class CreatorHubShellScreen extends StatelessWidget { - const CreatorHubShellScreen({super.key}); + final Widget child; + const CreatorHubShellScreen({super.key, required this.child}); @override Widget build(BuildContext context) { @@ -39,15 +38,14 @@ class CreatorHubShellScreen extends StatelessWidget { children: [ SizedBox(width: 360, child: const CreatorHubScreen(isAside: true)), const VerticalDivider(width: 1), - Expanded(child: AutoRouter()), + Expanded(child: child), ], ); } - return AutoRouter(); + return child; } } -@RoutePage() class CreatorHubScreen extends HookConsumerWidget { final bool isAside; const CreatorHubScreen({super.key, this.isAside = false}); @@ -65,8 +63,8 @@ class CreatorHubScreen extends HookConsumerWidget { ); void updatePublisher() { - context.router - .push(EditPublisherRoute(name: currentPublisher.value!.name)) + context + .push('/creators/${currentPublisher.value!.name}/edit') .then((value) async { if (value == null) return; final data = await ref.refresh(publishersManagedProvider.future); @@ -223,7 +221,7 @@ class CreatorHubScreen extends HookConsumerWidget { subtitle: Text('createPublisherHint').tr(), trailing: const Icon(Symbols.chevron_right), onTap: () { - context.router.push(NewPublisherRoute()).then(( + context.push('/creators/publishers/new').then(( value, ) { if (value != null) { @@ -249,10 +247,8 @@ class CreatorHubScreen extends HookConsumerWidget { horizontal: 24, ), onTap: () { - context.router.push( - StickersRoute( - pubName: currentPublisher.value!.name, - ), + context.push( + '/creators/${currentPublisher.value!.name}/stickers', ); }, ), @@ -265,10 +261,8 @@ class CreatorHubScreen extends HookConsumerWidget { horizontal: 24, ), onTap: () { - context.router.push( - CreatorPostListRoute( - pubName: currentPublisher.value!.name, - ), + context.push( + '/creators/${currentPublisher.value!.name}/posts', ); }, ), diff --git a/lib/screens/creators/posts/list.dart b/lib/screens/creators/posts/list.dart index c7edcc5..1d1bf84 100644 --- a/lib/screens/creators/posts/list.dart +++ b/lib/screens/creators/posts/list.dart @@ -1,6 +1,6 @@ -import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:island/widgets/app_scaffold.dart'; @@ -8,13 +8,9 @@ import 'package:island/widgets/content/sheet.dart'; import 'package:island/widgets/post/post_list.dart'; import 'package:material_symbols_icons/symbols.dart'; -@RoutePage() class CreatorPostListScreen extends HookConsumerWidget { final String pubName; - const CreatorPostListScreen({ - super.key, - @PathParam('name') required this.pubName, - }); + const CreatorPostListScreen({super.key, required this.pubName}); @override Widget build(BuildContext context, WidgetRef ref) { @@ -34,7 +30,7 @@ class CreatorPostListScreen extends HookConsumerWidget { subtitle: Text('Create a regular post'), onTap: () async { Navigator.pop(context); - final result = await context.router.pushPath( + final result = await context.push( '/posts/compose?type=0', ); if (result == true) { @@ -48,7 +44,7 @@ class CreatorPostListScreen extends HookConsumerWidget { subtitle: Text('Create a detailed article'), onTap: () async { Navigator.pop(context); - final result = await context.router.pushPath( + final result = await context.push( '/posts/compose?type=1', ); if (result == true) { diff --git a/lib/screens/creators/publishers.dart b/lib/screens/creators/publishers.dart index 6a4617f..1a579fe 100644 --- a/lib/screens/creators/publishers.dart +++ b/lib/screens/creators/publishers.dart @@ -1,10 +1,10 @@ -import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; import 'package:croppy/croppy.dart' hide cropImage; import 'package:dio/dio.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; +import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:image_picker/image_picker.dart'; import 'package:island/models/file.dart'; @@ -44,7 +44,6 @@ Future publisher(Ref ref, String? identifier) async { return SnPublisher.fromJson(resp.data); } -@RoutePage() class NewPublisherScreen extends StatelessWidget { const NewPublisherScreen({super.key}); @@ -54,10 +53,9 @@ class NewPublisherScreen extends StatelessWidget { } } -@RoutePage() class EditPublisherScreen extends HookConsumerWidget { final String? name; - const EditPublisherScreen({super.key, @PathParam('id') this.name}); + const EditPublisherScreen({super.key, this.name}); @override Widget build(BuildContext context, WidgetRef ref) { @@ -177,7 +175,7 @@ class EditPublisherScreen extends HookConsumerWidget { options: Options(method: name == null ? 'POST' : 'PATCH'), ); if (context.mounted) { - context.maybePop(SnPublisher.fromJson(resp.data)); + context.pop(SnPublisher.fromJson(resp.data)); } } catch (err) { showErrorAlert(err); diff --git a/lib/screens/creators/stickers/pack_detail.dart b/lib/screens/creators/stickers/pack_detail.dart index 0d6f11b..1ceee60 100644 --- a/lib/screens/creators/stickers/pack_detail.dart +++ b/lib/screens/creators/stickers/pack_detail.dart @@ -1,7 +1,7 @@ -import 'package:auto_route/auto_route.dart'; import 'package:dio/dio.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:flutter/services.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; @@ -10,7 +10,6 @@ import 'package:google_fonts/google_fonts.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:island/models/sticker.dart'; import 'package:island/pods/network.dart'; -import 'package:island/route.gr.dart'; import 'package:island/screens/creators/stickers/stickers.dart'; import 'package:island/widgets/alert.dart'; import 'package:island/widgets/app_scaffold.dart'; @@ -34,14 +33,13 @@ Future> stickerPackContent(Ref ref, String packId) async { .toList(); } -@RoutePage() class StickerPackDetailScreen extends HookConsumerWidget { final String id; final String pubName; const StickerPackDetailScreen({ super.key, - @PathParam('name') required this.pubName, - @PathParam('packId') required this.id, + required this.pubName, + required this.id, }); @override @@ -76,7 +74,7 @@ class StickerPackDetailScreen extends HookConsumerWidget { IconButton( icon: const Icon(Symbols.add_circle), onPressed: () { - AutoRouter.of(context).push(NewStickersRoute(packId: id)).then(( + context.push('/creators/stickers/$id/new').then(( value, ) { if (value != null) { @@ -175,12 +173,9 @@ class StickerPackDetailScreen extends HookConsumerWidget { title: 'edit'.tr(), image: MenuImage.icon(Symbols.edit), callback: () { - context.router + context .push( - EditStickersRoute( - packId: id, - id: sticker.id, - ), + '/creators/stickers/$id/edit/${sticker.id}', ) .then((value) { if (value != null) { @@ -264,8 +259,8 @@ class _StickerPackActionMenu extends HookConsumerWidget { (context) => [ PopupMenuItem( onTap: () { - context.router.push( - EditStickerPacksRoute(pubName: pubName, packId: packId), + context.push( + '/creators/$pubName/stickers/$packId/edit', ); }, child: Row( @@ -299,7 +294,7 @@ class _StickerPackActionMenu extends HookConsumerWidget { final client = ref.watch(apiClientProvider); client.delete('/stickers/$packId'); ref.invalidate(stickerPacksNotifierProvider); - if (context.mounted) context.router.maybePop(true); + if (context.mounted) context.pop(true); } }); }, @@ -331,13 +326,9 @@ Future stickerPackSticker( return SnSticker.fromJson(resp.data); } -@RoutePage() class NewStickersScreen extends StatelessWidget { final String packId; - const NewStickersScreen({ - super.key, - @PathParam('packId') required this.packId, - }); + const NewStickersScreen({super.key, required this.packId}); @override Widget build(BuildContext context) { @@ -345,15 +336,10 @@ class NewStickersScreen extends StatelessWidget { } } -@RoutePage() class EditStickersScreen extends HookConsumerWidget { final String packId; final String? id; - const EditStickersScreen({ - super.key, - @PathParam("packId") required this.packId, - @PathParam("id") required this.id, - }); + const EditStickersScreen({super.key, required this.packId, required this.id}); @override Widget build(BuildContext context, WidgetRef ref) { diff --git a/lib/screens/creators/stickers/pack_detail.freezed.dart b/lib/screens/creators/stickers/pack_detail.freezed.dart index d59a860..0fab735 100644 --- a/lib/screens/creators/stickers/pack_detail.freezed.dart +++ b/lib/screens/creators/stickers/pack_detail.freezed.dart @@ -22,14 +22,11 @@ mixin _$StickerWithPackQuery { @pragma('vm:prefer-inline') $StickerWithPackQueryCopyWith get copyWith => _$StickerWithPackQueryCopyWithImpl(this as StickerWithPackQuery, _$identity); - - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is StickerWithPackQuery&&(identical(other.packId, packId) || other.packId == packId)&&(identical(other.id, id) || other.id == id)); } - @override int get hashCode => Object.hash(runtimeType,packId,id); @@ -38,7 +35,6 @@ String toString() { return 'StickerWithPackQuery(packId: $packId, id: $id)'; } - } /// @nodoc @@ -49,9 +45,6 @@ $Res call({ String packId, String id }); - - - } /// @nodoc class _$StickerWithPackQueryCopyWithImpl<$Res> @@ -73,10 +66,8 @@ as String, } - /// @nodoc - class _StickerWithPackQuery implements StickerWithPackQuery { const _StickerWithPackQuery({required this.packId, required this.id}); @@ -90,14 +81,11 @@ class _StickerWithPackQuery implements StickerWithPackQuery { @pragma('vm:prefer-inline') _$StickerWithPackQueryCopyWith<_StickerWithPackQuery> get copyWith => __$StickerWithPackQueryCopyWithImpl<_StickerWithPackQuery>(this, _$identity); - - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _StickerWithPackQuery&&(identical(other.packId, packId) || other.packId == packId)&&(identical(other.id, id) || other.id == id)); } - @override int get hashCode => Object.hash(runtimeType,packId,id); @@ -106,7 +94,6 @@ String toString() { return 'StickerWithPackQuery(packId: $packId, id: $id)'; } - } /// @nodoc @@ -117,9 +104,6 @@ $Res call({ String packId, String id }); - - - } /// @nodoc class __$StickerWithPackQueryCopyWithImpl<$Res> @@ -139,7 +123,6 @@ as String, )); } - } // dart format on diff --git a/lib/screens/creators/stickers/stickers.dart b/lib/screens/creators/stickers/stickers.dart index 8017f41..21ac345 100644 --- a/lib/screens/creators/stickers/stickers.dart +++ b/lib/screens/creators/stickers/stickers.dart @@ -1,13 +1,12 @@ -import 'package:auto_route/auto_route.dart'; import 'package:dio/dio.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:island/models/sticker.dart'; import 'package:island/pods/network.dart'; -import 'package:island/route.gr.dart'; import 'package:island/widgets/alert.dart'; import 'package:island/widgets/app_scaffold.dart'; import 'package:material_symbols_icons/symbols.dart'; @@ -17,10 +16,9 @@ import 'package:riverpod_paging_utils/riverpod_paging_utils.dart'; part 'stickers.g.dart'; -@RoutePage() class StickersScreen extends HookConsumerWidget { final String pubName; - const StickersScreen({super.key, @PathParam("name") required this.pubName}); + const StickersScreen({super.key, required this.pubName}); @override Widget build(BuildContext context, WidgetRef ref) { @@ -30,7 +28,7 @@ class StickersScreen extends HookConsumerWidget { actions: [ IconButton( onPressed: () { - context.router.push(NewStickerPacksRoute(pubName: pubName)).then(( + context.push('/creators/stickers/new?pubName=pubName').then(( value, ) { if (value != null) { @@ -73,8 +71,8 @@ class SliverStickerPacksList extends HookConsumerWidget { subtitle: Text(sticker.description), trailing: const Icon(Symbols.chevron_right), onTap: () { - context.router.push( - StickerPackDetailRoute(pubName: pubName, id: sticker.id), + context.push( + '/creators/$pubName/stickers/${sticker.id}', ); }, ); @@ -137,13 +135,9 @@ Future stickerPack(Ref ref, String? packId) async { return SnStickerPack.fromJson(resp.data); } -@RoutePage() class NewStickerPacksScreen extends HookConsumerWidget { final String pubName; - const NewStickerPacksScreen({ - super.key, - @PathParam("name") required this.pubName, - }); + const NewStickerPacksScreen({super.key, required this.pubName}); @override Widget build(BuildContext context, WidgetRef ref) { @@ -151,15 +145,10 @@ class NewStickerPacksScreen extends HookConsumerWidget { } } -@RoutePage() class EditStickerPacksScreen extends HookConsumerWidget { final String pubName; final String? packId; - const EditStickerPacksScreen({ - super.key, - @PathParam("name") required this.pubName, - @PathParam("packId") this.packId, - }); + const EditStickerPacksScreen({super.key, required this.pubName, this.packId}); @override Widget build(BuildContext context, WidgetRef ref) { @@ -200,7 +189,7 @@ class EditStickerPacksScreen extends HookConsumerWidget { ), ); if (!context.mounted) return; - context.router.maybePop(SnStickerPack.fromJson(resp.data)); + context.pop(SnStickerPack.fromJson(resp.data)); } catch (err) { showErrorAlert(err); } finally { diff --git a/lib/screens/explore.dart b/lib/screens/explore.dart index e251681..d44fa7d 100644 --- a/lib/screens/explore.dart +++ b/lib/screens/explore.dart @@ -1,12 +1,11 @@ -import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:island/models/activity.dart'; import 'package:island/pods/userinfo.dart'; -import 'package:island/route.gr.dart'; import 'package:island/services/responsive.dart'; import 'package:island/widgets/app_scaffold.dart'; import 'package:island/models/post.dart'; @@ -22,13 +21,13 @@ import 'package:styled_widget/styled_widget.dart'; part 'explore.g.dart'; -@RoutePage() -class ExploreShellScreen extends ConsumerWidget { - const ExploreShellScreen({super.key}); +class ExploreShellScreen extends HookConsumerWidget { + final Widget child; + const ExploreShellScreen({super.key, required this.child}); @override Widget build(BuildContext context, WidgetRef ref) { - final isWide = isWideScreen(context); + final isWide = MediaQuery.of(context).size.width > 640; if (isWide) { return AppBackground( @@ -37,17 +36,16 @@ class ExploreShellScreen extends ConsumerWidget { children: [ Flexible(flex: 2, child: ExploreScreen(isAside: true)), VerticalDivider(width: 1), - Flexible(flex: 3, child: AutoRouter()), + Flexible(flex: 3, child: child), ], ), ); } - return AppBackground(isRoot: true, child: AutoRouter()); + return AppBackground(isRoot: true, child: child); } } -@RoutePage() class ExploreScreen extends HookConsumerWidget { final bool isAside; const ExploreScreen({super.key, this.isAside = false}); @@ -126,7 +124,7 @@ class ExploreScreen extends HookConsumerWidget { floatingActionButton: FloatingActionButton( heroTag: Key("explore-page-fab"), onPressed: () { - context.router.push(PostComposeRoute()).then((value) { + context.push('/posts/compose').then((value) { if (value != null) { activitiesNotifier.forceRefresh(); } diff --git a/lib/screens/notification.dart b/lib/screens/notification.dart index 512584b..e7a6828 100644 --- a/lib/screens/notification.dart +++ b/lib/screens/notification.dart @@ -1,9 +1,9 @@ import 'dart:async'; import 'dart:math' as math; -import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:flutter/services.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:island/models/user.dart'; @@ -107,7 +107,6 @@ class NotificationListNotifier extends _$NotificationListNotifier } } -@RoutePage() class NotificationScreen extends HookConsumerWidget { const NotificationScreen({super.key}); @@ -198,7 +197,7 @@ class NotificationScreen extends HookConsumerWidget { return; } if (uri.scheme == 'solian') { - context.router.pushPath( + context.push( ['', uri.host, ...uri.pathSegments].join('/'), ); return; diff --git a/lib/screens/posts/compose.dart b/lib/screens/posts/compose.dart index ebbd926..efb0676 100644 --- a/lib/screens/posts/compose.dart +++ b/lib/screens/posts/compose.dart @@ -1,4 +1,3 @@ -import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; @@ -40,10 +39,9 @@ sealed class PostComposeInitialState with _$PostComposeInitialState { _$PostComposeInitialStateFromJson(json); } -@RoutePage() class PostEditScreen extends HookConsumerWidget { final String id; - const PostEditScreen({super.key, @PathParam('id') required this.id}); + const PostEditScreen({super.key, required this.id}); @override Widget build(BuildContext context, WidgetRef ref) { @@ -66,7 +64,6 @@ class PostEditScreen extends HookConsumerWidget { } } -@RoutePage() class PostComposeScreen extends HookConsumerWidget { final SnPost? originalPost; final SnPost? repliedPost; @@ -78,7 +75,7 @@ class PostComposeScreen extends HookConsumerWidget { this.originalPost, this.repliedPost, this.forwardedPost, - @QueryParam('type') this.type, + this.type, this.initialState, }); diff --git a/lib/screens/posts/compose.freezed.dart b/lib/screens/posts/compose.freezed.dart index 3987fb7..5cc3024 100644 --- a/lib/screens/posts/compose.freezed.dart +++ b/lib/screens/posts/compose.freezed.dart @@ -26,7 +26,6 @@ $PostComposeInitialStateCopyWith get copyWith => _$Post /// Serializes this PostComposeInitialState to a JSON map. Map toJson(); - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is PostComposeInitialState&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.content, content) || other.content == content)&&const DeepCollectionEquality().equals(other.attachments, attachments)&&(identical(other.visibility, visibility) || other.visibility == visibility)); @@ -41,7 +40,6 @@ String toString() { return 'PostComposeInitialState(title: $title, description: $description, content: $content, attachments: $attachments, visibility: $visibility)'; } - } /// @nodoc @@ -52,9 +50,6 @@ $Res call({ String? title, String? description, String? content, List attachments, int? visibility }); - - - } /// @nodoc class _$PostComposeInitialStateCopyWithImpl<$Res> @@ -79,7 +74,6 @@ as int?, } - /// @nodoc @JsonSerializable() @@ -124,7 +118,6 @@ String toString() { return 'PostComposeInitialState(title: $title, description: $description, content: $content, attachments: $attachments, visibility: $visibility)'; } - } /// @nodoc @@ -135,9 +128,6 @@ $Res call({ String? title, String? description, String? content, List attachments, int? visibility }); - - - } /// @nodoc class __$PostComposeInitialStateCopyWithImpl<$Res> @@ -160,7 +150,6 @@ as int?, )); } - } // dart format on diff --git a/lib/screens/posts/compose_article.dart b/lib/screens/posts/compose_article.dart index 421111d..7a9a8b0 100644 --- a/lib/screens/posts/compose_article.dart +++ b/lib/screens/posts/compose_article.dart @@ -1,6 +1,5 @@ import 'dart:async'; -import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -26,10 +25,9 @@ import 'package:island/widgets/post/draft_manager.dart'; import 'package:material_symbols_icons/symbols.dart'; import 'package:styled_widget/styled_widget.dart'; -@RoutePage() class ArticleEditScreen extends HookConsumerWidget { final String id; - const ArticleEditScreen({super.key, @PathParam('id') required this.id}); + const ArticleEditScreen({super.key, required this.id}); @override Widget build(BuildContext context, WidgetRef ref) { @@ -50,7 +48,6 @@ class ArticleEditScreen extends HookConsumerWidget { } } -@RoutePage() class ArticleComposeScreen extends HookConsumerWidget { final SnPost? originalPost; diff --git a/lib/screens/posts/detail.dart b/lib/screens/posts/detail.dart index 32b5e42..af51bee 100644 --- a/lib/screens/posts/detail.dart +++ b/lib/screens/posts/detail.dart @@ -1,4 +1,3 @@ -import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -22,10 +21,9 @@ Future post(Ref ref, String id) async { return SnPost.fromJson(resp.data); } -@RoutePage() class PostDetailScreen extends HookConsumerWidget { final String id; - const PostDetailScreen({super.key, @PathParam('id') required this.id}); + const PostDetailScreen({super.key, required this.id}); @override Widget build(BuildContext context, WidgetRef ref) { diff --git a/lib/screens/posts/pub_profile.dart b/lib/screens/posts/pub_profile.dart index 2f312fc..4a65dc6 100644 --- a/lib/screens/posts/pub_profile.dart +++ b/lib/screens/posts/pub_profile.dart @@ -1,6 +1,6 @@ -import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:flutter/services.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:gap/gap.dart'; @@ -67,12 +67,11 @@ Future publisherAppbarForcegroundColor(Ref ref, String pubName) async { return dominantColor.computeLuminance() > 0.5 ? Colors.black : Colors.white; } -@RoutePage() class PublisherProfileScreen extends HookConsumerWidget { final String name; const PublisherProfileScreen({ super.key, - @PathParam("name") required this.name, + required this.name, }); @override @@ -186,7 +185,7 @@ class PublisherProfileScreen extends HookConsumerWidget { ), onTap: () { Navigator.pop(context, true); - context.router.pushPath('/account/${data.name}'); + context.push('/account/${data.name}'); }, ), Expanded( diff --git a/lib/screens/realm/detail.dart b/lib/screens/realm/detail.dart index cd598a4..545bdf8 100644 --- a/lib/screens/realm/detail.dart +++ b/lib/screens/realm/detail.dart @@ -1,13 +1,12 @@ -import 'package:auto_route/auto_route.dart'; import 'package:dio/dio.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:gap/gap.dart'; +import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:island/models/realm.dart'; import 'package:island/pods/network.dart'; -import 'package:island/route.gr.dart'; import 'package:island/screens/realm/realms.dart'; import 'package:island/widgets/account/account_picker.dart'; import 'package:island/widgets/alert.dart'; @@ -27,10 +26,10 @@ Future realmIdentity(Ref ref, String realmSlug) async { return SnRealmMember.fromJson(response.data); } -@RoutePage() class RealmDetailScreen extends HookConsumerWidget { final String slug; - const RealmDetailScreen({super.key, @PathParam("slug") required this.slug}); + + const RealmDetailScreen({super.key, required this.slug}); @override Widget build(BuildContext context, WidgetRef ref) { @@ -129,7 +128,7 @@ class _RealmActionMenu extends HookConsumerWidget { if (isModerator) PopupMenuItem( onTap: () { - context.router.replace(EditRealmRoute(slug: realmSlug)); + context.pushReplacement('/realms/$realmSlug/edit'); }, child: Row( children: [ @@ -167,7 +166,7 @@ class _RealmActionMenu extends HookConsumerWidget { client.delete('/realms/$realmSlug'); ref.invalidate(realmsJoinedProvider); if (context.mounted) { - context.router.maybePop(true); + context.pop(true); } } }); @@ -201,7 +200,7 @@ class _RealmActionMenu extends HookConsumerWidget { ); ref.invalidate(realmsJoinedProvider); if (context.mounted) { - context.router.maybePop(true); + context.pop(true); } } }); @@ -239,7 +238,7 @@ class _RealmActionMenu extends HookConsumerWidget { client.delete('/realms/$realmSlug/members/me'); ref.invalidate(realmsJoinedProvider); if (context.mounted) { - context.router.maybePop(true); + context.pop(true); } } }); diff --git a/lib/screens/realm/realms.dart b/lib/screens/realm/realms.dart index a4ff123..ab1ae33 100644 --- a/lib/screens/realm/realms.dart +++ b/lib/screens/realm/realms.dart @@ -1,8 +1,8 @@ -import 'package:auto_route/auto_route.dart'; import 'package:croppy/croppy.dart' show CropAspectRatio; import 'package:dio/dio.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -11,7 +11,6 @@ import 'package:island/models/file.dart'; import 'package:island/models/realm.dart'; import 'package:island/pods/config.dart'; import 'package:island/pods/network.dart'; -import 'package:island/route.gr.dart'; import 'package:island/services/file.dart'; import 'package:island/services/responsive.dart'; import 'package:island/widgets/alert.dart'; @@ -33,7 +32,6 @@ Future> realmsJoined(Ref ref) async { return resp.data.map((e) => SnRealm.fromJson(e)).cast().toList(); } -@RoutePage() class RealmListScreen extends HookConsumerWidget { const RealmListScreen({super.key}); @@ -79,7 +77,7 @@ class RealmListScreen extends HookConsumerWidget { heroTag: Key("realms-page-fab"), child: const Icon(Symbols.add), onPressed: () { - context.router.push(NewRealmRoute()).then((value) { + context.push('/realms/new').then((value) { if (value != null) { ref.invalidate(realmsJoinedProvider); } @@ -106,9 +104,7 @@ class RealmListScreen extends HookConsumerWidget { title: Text(value[item].name), subtitle: Text(value[item].description), onTap: () { - context.router.push( - RealmDetailRoute(slug: value[item].slug), - ); + context.push('/realms/${value[item].slug}'); }, contentPadding: EdgeInsets.only( left: 16, @@ -143,7 +139,6 @@ Future realm(Ref ref, String? identifier) async { return SnRealm.fromJson(resp.data); } -@RoutePage() class NewRealmScreen extends StatelessWidget { const NewRealmScreen({super.key}); @@ -153,10 +148,9 @@ class NewRealmScreen extends StatelessWidget { } } -@RoutePage() class EditRealmScreen extends HookConsumerWidget { final String? slug; - const EditRealmScreen({super.key, @PathParam('slug') this.slug}); + const EditRealmScreen({super.key, this.slug}); @override Widget build(BuildContext context, WidgetRef ref) { @@ -262,7 +256,7 @@ class EditRealmScreen extends HookConsumerWidget { options: Options(method: slug == null ? 'POST' : 'PATCH'), ); if (context.mounted) { - context.maybePop(SnRealm.fromJson(resp.data)); + context.pop(SnRealm.fromJson(resp.data)); } } catch (err) { showErrorAlert(err); diff --git a/lib/screens/settings.dart b/lib/screens/settings.dart index ea76965..bbcf2b7 100644 --- a/lib/screens/settings.dart +++ b/lib/screens/settings.dart @@ -1,11 +1,11 @@ import 'dart:io'; -import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; import 'package:dropdown_button2/dropdown_button2.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:flutter/services.dart'; import 'package:flutter_colorpicker/flutter_colorpicker.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; @@ -21,7 +21,6 @@ import 'package:path_provider/path_provider.dart'; import 'package:styled_widget/styled_widget.dart'; import 'package:island/pods/config.dart'; -@RoutePage() class SettingsScreen extends HookConsumerWidget { const SettingsScreen({super.key}); @@ -590,7 +589,7 @@ class SettingsScreen extends HookConsumerWidget { if (isDesktop && event is KeyDownEvent && event.logicalKey == LogicalKeyboardKey.escape) { - context.router.pop(); + context.pop(); return KeyEventResult.handled; } return KeyEventResult.ignored; diff --git a/lib/screens/tabs.dart b/lib/screens/tabs.dart index ff74b5e..1f3a1ae 100644 --- a/lib/screens/tabs.dart +++ b/lib/screens/tabs.dart @@ -1,10 +1,9 @@ -import 'dart:developer'; import 'dart:ui'; -import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:island/route.gr.dart'; +import 'package:go_router/go_router.dart'; import 'package:island/screens/notification.dart'; import 'package:island/services/responsive.dart'; import 'package:island/widgets/navigation/conditional_bottom_nav.dart'; @@ -12,42 +11,22 @@ import 'package:material_symbols_icons/symbols.dart'; final currentRouteProvider = StateProvider((ref) => null); -class TabNavigationObserver extends AutoRouterObserver { - Function(String?) onChange; - TabNavigationObserver({required this.onChange}); - - @override - void didPush(Route route, Route? previousRoute) { - log('pushed ${previousRoute?.settings.name} -> ${route.settings.name}'); - if (route is DialogRoute) return; - final name = route.settings.name; - if (name == null) return; - if (name.contains('Shell')) return; - Future(() { - onChange(name); - }); - } - - @override - void didPop(Route route, Route? previousRoute) { - log('popped ${route.settings.name} -> ${previousRoute?.settings.name}'); - if (previousRoute is DialogRoute) return; - final name = previousRoute?.settings.name; - if (name == null) return; - if (name.contains('Shell')) return; - Future(() { - onChange(name); - }); - } -} - -@RoutePage() class TabsScreen extends HookConsumerWidget { - const TabsScreen({super.key}); + final Widget? child; + const TabsScreen({super.key, this.child}); @override Widget build(BuildContext context, WidgetRef ref) { - final useHorizontalLayout = isWideScreen(context); + // final useHorizontalLayout = isWideScreen(context); + final currentLocation = GoRouterState.of(context).uri.toString(); + + // Update the current route provider whenever the location changes + useEffect(() { + WidgetsBinding.instance.addPostFrameCallback((_) { + ref.read(currentRouteProvider.notifier).state = currentLocation; + }); + return null; + }, [currentLocation]); final notificationUnreadCount = ref.watch( notificationUnreadCountNotifierProvider, @@ -73,85 +52,89 @@ class TabsScreen extends HookConsumerWidget { ), ]; - final routes = [ - ExploreShellRoute(), - ChatShellRoute(), - RealmListRoute(), - AccountShellRoute(), + final routes = [ + '/', + '/chat', + '/realms', + '/account', ]; - return AutoTabsRouter.tabBar( - routes: routes, - scrollDirection: useHorizontalLayout ? Axis.vertical : Axis.horizontal, - physics: const NeverScrollableScrollPhysics(), - builder: (context, child, _) { - final tabsRouter = AutoTabsRouter.of(context); + int getCurrentIndex() { + if (currentLocation.startsWith('/chat')) return 1; + if (currentLocation.startsWith('/realms')) return 2; + if (currentLocation.startsWith('/account')) return 3; + return 0; // Default to explore + } - if (isWideScreen(context)) { - return Row( - children: [ - NavigationRail( - destinations: - destinations - .map( - (e) => NavigationRailDestination( - icon: e.icon, - label: Text(e.label), - ), - ) - .toList(), - selectedIndex: tabsRouter.activeIndex, - onDestinationSelected: tabsRouter.setActiveIndex, - ), - const VerticalDivider(width: 1), - Expanded(child: child), - ], - ); - } + void onDestinationSelected(int index) { + context.go(routes[index]); + } - return Stack( - children: [ - Positioned.fill(child: child), - Positioned( - left: 0, - right: 0, - bottom: 0, - child: ConditionalBottomNav( - child: ClipRRect( - child: BackdropFilter( - filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), - child: Container( - decoration: BoxDecoration( - color: Theme.of( - context, - ).colorScheme.surface.withOpacity(0.8), + final currentIndex = getCurrentIndex(); + + if (isWideScreen(context)) { + return Row( + children: [ + NavigationRail( + destinations: + destinations + .map( + (e) => NavigationRailDestination( + icon: e.icon, + label: Text(e.label), ), - child: MediaQuery.removePadding( - context: context, - removeTop: true, - child: NavigationBar( - backgroundColor: Colors.transparent, - shadowColor: Colors.transparent, - overlayColor: const WidgetStatePropertyAll( - Colors.transparent, - ), - surfaceTintColor: Colors.transparent, - height: 56, - labelBehavior: - NavigationDestinationLabelBehavior.alwaysHide, - selectedIndex: tabsRouter.activeIndex, - onDestinationSelected: tabsRouter.setActiveIndex, - destinations: destinations, - ), + ) + .toList(), + selectedIndex: currentIndex, + onDestinationSelected: onDestinationSelected, + ), + const VerticalDivider(width: 1), + Expanded(child: child ?? const SizedBox.shrink()), + ], + ); + } + + return Stack( + children: [ + Positioned.fill(child: child ?? const SizedBox.shrink()), + Positioned( + left: 0, + right: 0, + bottom: 0, + child: ConditionalBottomNav( + child: ClipRRect( + child: BackdropFilter( + filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), + child: Container( + decoration: BoxDecoration( + color: Theme.of( + context, + ).colorScheme.surface.withOpacity(0.8), + ), + child: MediaQuery.removePadding( + context: context, + removeTop: true, + child: NavigationBar( + backgroundColor: Colors.transparent, + shadowColor: Colors.transparent, + overlayColor: const WidgetStatePropertyAll( + Colors.transparent, ), + surfaceTintColor: Colors.transparent, + height: 56, + labelBehavior: + NavigationDestinationLabelBehavior.alwaysHide, + selectedIndex: currentIndex, + onDestinationSelected: onDestinationSelected, + destinations: destinations, ), ), ), ), ), - ], - ); - }, + ), + ), + ], ); } } diff --git a/lib/screens/wallet.dart b/lib/screens/wallet.dart index c8213cc..2a31f8b 100644 --- a/lib/screens/wallet.dart +++ b/lib/screens/wallet.dart @@ -1,4 +1,3 @@ -import 'package:auto_route/annotations.dart'; import 'package:dio/dio.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; @@ -72,7 +71,6 @@ class TransactionListNotifier extends _$TransactionListNotifier } } -@RoutePage() class WalletScreen extends HookConsumerWidget { const WalletScreen({super.key}); diff --git a/lib/services/notify.dart b/lib/services/notify.dart index cacab51..04f00ef 100644 --- a/lib/services/notify.dart +++ b/lib/services/notify.dart @@ -7,7 +7,9 @@ import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:go_router/go_router.dart'; import 'package:island/main.dart'; +import 'package:island/route.dart'; import 'package:island/models/user.dart'; import 'package:island/pods/websocket.dart'; import 'package:island/widgets/app_notification.dart'; @@ -30,7 +32,7 @@ StreamSubscription setupNotificationListener( var uri = notification.meta['action_uri'] as String; if (uri.startsWith('/')) { // In-app routes - appRouter.pushPath(notification.meta['action_uri']); + rootNavigatorKey.currentContext?.push(notification.meta['action_uri']); } else { // External URLs launchUrlString(uri); diff --git a/lib/services/tour.freezed.dart b/lib/services/tour.freezed.dart index f689f63..820babb 100644 --- a/lib/services/tour.freezed.dart +++ b/lib/services/tour.freezed.dart @@ -22,14 +22,11 @@ mixin _$Tour { @pragma('vm:prefer-inline') $TourCopyWith get copyWith => _$TourCopyWithImpl(this as Tour, _$identity); - - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is Tour&&(identical(other.id, id) || other.id == id)&&(identical(other.isStartup, isStartup) || other.isStartup == isStartup)); } - @override int get hashCode => Object.hash(runtimeType,id,isStartup); @@ -38,7 +35,6 @@ String toString() { return 'Tour(id: $id, isStartup: $isStartup)'; } - } /// @nodoc @@ -49,9 +45,6 @@ $Res call({ String id, bool isStartup }); - - - } /// @nodoc class _$TourCopyWithImpl<$Res> @@ -73,10 +66,8 @@ as bool, } - /// @nodoc - class _Tour extends Tour { const _Tour({required this.id, required this.isStartup}): super._(); @@ -90,14 +81,11 @@ class _Tour extends Tour { @pragma('vm:prefer-inline') _$TourCopyWith<_Tour> get copyWith => __$TourCopyWithImpl<_Tour>(this, _$identity); - - @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _Tour&&(identical(other.id, id) || other.id == id)&&(identical(other.isStartup, isStartup) || other.isStartup == isStartup)); } - @override int get hashCode => Object.hash(runtimeType,id,isStartup); @@ -106,7 +94,6 @@ String toString() { return 'Tour(id: $id, isStartup: $isStartup)'; } - } /// @nodoc @@ -117,9 +104,6 @@ $Res call({ String id, bool isStartup }); - - - } /// @nodoc class __$TourCopyWithImpl<$Res> @@ -139,7 +123,6 @@ as bool, )); } - } // dart format on diff --git a/lib/widgets/account/account_pfc.dart b/lib/widgets/account/account_pfc.dart index 5a1781c..0344531 100644 --- a/lib/widgets/account/account_pfc.dart +++ b/lib/widgets/account/account_pfc.dart @@ -1,8 +1,8 @@ import 'dart:math' as math; -import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:flutter_popup_card/flutter_popup_card.dart'; import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -105,7 +105,7 @@ class AccountProfileCard extends HookConsumerWidget { FilledButton.tonalIcon( onPressed: () { Navigator.pop(context); - context.router.pushPath('/account/${data.name}'); + context.push('/account/${data.name}'); }, icon: const Icon(Symbols.launch), label: Text('accountProfileView').tr(), diff --git a/lib/widgets/account/fortune_graph.dart b/lib/widgets/account/fortune_graph.dart index 26f9704..30f8989 100644 --- a/lib/widgets/account/fortune_graph.dart +++ b/lib/widgets/account/fortune_graph.dart @@ -1,7 +1,7 @@ -import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:fl_chart/fl_chart.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:island/models/activity.dart'; import 'package:styled_widget/styled_widget.dart'; @@ -66,7 +66,7 @@ class FortuneGraphWidget extends HookConsumerWidget { padding: EdgeInsets.zero, constraints: const BoxConstraints(), onPressed: () { - context.router.pushNamed( + context.pushNamed( '/account/$eventCalanderUser/calendar', ); }, diff --git a/lib/widgets/app_scaffold.dart b/lib/widgets/app_scaffold.dart index 8432ac1..29973c3 100644 --- a/lib/widgets/app_scaffold.dart +++ b/lib/widgets/app_scaffold.dart @@ -1,16 +1,14 @@ import 'dart:io'; - -import 'package:auto_route/auto_route.dart'; import 'package:bitsdojo_window/bitsdojo_window.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:island/pods/config.dart'; import 'package:island/pods/userinfo.dart'; import 'package:island/pods/websocket.dart'; -import 'package:island/route.dart'; import 'package:island/services/responsive.dart'; import 'package:material_symbols_icons/material_symbols_icons.dart'; import 'package:path_provider/path_provider.dart'; @@ -18,8 +16,7 @@ import 'package:styled_widget/styled_widget.dart'; class WindowScaffold extends HookConsumerWidget { final Widget child; - final AppRouter router; - const WindowScaffold({super.key, required this.child, required this.router}); + const WindowScaffold({super.key, required this.child}); @override Widget build(BuildContext context, WidgetRef ref) { @@ -238,7 +235,7 @@ class PageBackButton extends StatelessWidget { return IconButton( onPressed: () { onWillPop?.call(); - context.router.maybePop(); + context.pop(); }, icon: Icon( color: color, diff --git a/lib/widgets/app_wrapper.dart b/lib/widgets/app_wrapper.dart index 455e909..475179f 100644 --- a/lib/widgets/app_wrapper.dart +++ b/lib/widgets/app_wrapper.dart @@ -1,15 +1,13 @@ import 'dart:async'; - -import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:island/services/notify.dart'; import 'package:island/services/sharing_intent.dart'; -@RoutePage() class AppWrapper extends HookConsumerWidget { - const AppWrapper({super.key}); + final Widget child; + const AppWrapper({super.key, required this.child}); @override Widget build(BuildContext context, WidgetRef ref) { @@ -26,6 +24,6 @@ class AppWrapper extends HookConsumerWidget { }; }, const []); - return AutoRouter(); + return child; } } diff --git a/lib/widgets/chat/call_button.dart b/lib/widgets/chat/call_button.dart index b184422..a4d6add 100644 --- a/lib/widgets/chat/call_button.dart +++ b/lib/widgets/chat/call_button.dart @@ -1,12 +1,11 @@ -import 'package:auto_route/auto_route.dart'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:island/models/chat.dart'; import 'package:island/pods/call.dart'; import 'package:island/pods/network.dart'; -import 'package:island/route.gr.dart'; import 'package:island/widgets/alert.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; @@ -45,7 +44,7 @@ class AudioCallButton extends HookConsumerWidget { try { await apiClient.post('/chat/realtime/$roomId'); if (context.mounted) { - context.router.push(CallRoute(roomId: roomId)); + context.push('/chat/call/roomId'); } } catch (e) { showErrorAlert(e); @@ -97,7 +96,7 @@ class AudioCallButton extends HookConsumerWidget { tooltip: 'Join Ongoing Call', onPressed: () { if (context.mounted) { - context.router.push(CallRoute(roomId: roomId)); + context.push('/chat/call/roomId'); } }, ); diff --git a/lib/widgets/chat/call_overlay.dart b/lib/widgets/chat/call_overlay.dart index 3a9a066..5236c1b 100644 --- a/lib/widgets/chat/call_overlay.dart +++ b/lib/widgets/chat/call_overlay.dart @@ -1,10 +1,9 @@ -import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:island/pods/call.dart'; -import 'package:island/route.gr.dart'; import 'package:island/widgets/alert.dart'; import 'package:island/widgets/chat/call_participant_tile.dart'; import 'package:island/widgets/content/sheet.dart'; @@ -361,7 +360,7 @@ class CallOverlayBar extends HookConsumerWidget { ).padding(all: 16), ), onTap: () { - context.router.push(CallRoute(roomId: callNotifier.roomId!)); + context.push('/chat/call/callNotifier.roomId!'); }, ); } diff --git a/lib/widgets/check_in.dart b/lib/widgets/check_in.dart index b9cda18..10ba2cc 100644 --- a/lib/widgets/check_in.dart +++ b/lib/widgets/check_in.dart @@ -1,15 +1,14 @@ import 'dart:convert'; -import 'package:auto_route/auto_route.dart'; import 'package:dio/dio.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:island/models/activity.dart'; import 'package:island/pods/network.dart'; import 'package:island/pods/userinfo.dart'; -import 'package:island/route.gr.dart'; import 'package:island/screens/auth/captcha.dart'; import 'package:island/widgets/alert.dart'; import 'package:island/widgets/content/cloud_files.dart'; @@ -137,7 +136,7 @@ class CheckInWidget extends HookConsumerWidget { if (todayResult.valueOrNull == null) { checkIn(); } else { - context.router.push(EventCalanderRoute(name: 'me')); + context.push('/account/me/calendar'); } }, icon: AnimatedSwitcher( diff --git a/lib/widgets/content/markdown.dart b/lib/widgets/content/markdown.dart index dee1b63..8279ecc 100644 --- a/lib/widgets/content/markdown.dart +++ b/lib/widgets/content/markdown.dart @@ -1,6 +1,6 @@ -import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:flutter/services.dart'; import 'package:flutter_highlight/themes/a11y-dark.dart'; import 'package:flutter_highlight/themes/a11y-light.dart'; @@ -74,7 +74,7 @@ class MarkdownTextContent extends HookConsumerWidget { final url = Uri.tryParse(href); if (url != null) { if (url.scheme == 'solian') { - context.router.pushPath( + context.push( ['', url.host, ...url.pathSegments].join('/'), ); return; diff --git a/lib/widgets/navigation/conditional_bottom_nav.dart b/lib/widgets/navigation/conditional_bottom_nav.dart index 7013f67..f129e1a 100644 --- a/lib/widgets/navigation/conditional_bottom_nav.dart +++ b/lib/widgets/navigation/conditional_bottom_nav.dart @@ -1,26 +1,26 @@ import 'package:flutter/material.dart'; +import 'package:flutter_hooks/flutter_hooks.dart'; +import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:island/route.gr.dart'; -import 'package:island/screens/tabs.dart'; class ConditionalBottomNav extends HookConsumerWidget { final Widget child; - const ConditionalBottomNav({super.key, required this.child}); @override Widget build(BuildContext context, WidgetRef ref) { - final currentRouteName = ref.watch(currentRouteProvider); + final currentLocation = GoRouterState.of(context).uri.toString(); - const mainTabRoutes = { - ExploreRoute.name, - ChatListRoute.name, - RealmListRoute.name, - AccountRoute.name, - }; + // Force rebuild when route changes + useEffect(() { + // This effect will run whenever currentLocation changes + return null; + }, [currentLocation]); - debugPrint(currentRouteName); - final shouldShowBottomNav = mainTabRoutes.contains(currentRouteName); + // Use the same route logic as TabsScreen for consistency + const mainTabRoutes = ['/', '/chat', '/realms', '/account']; + + final shouldShowBottomNav = mainTabRoutes.contains(currentLocation); return shouldShowBottomNav ? child : const SizedBox.shrink(); } diff --git a/lib/widgets/post/post_item.dart b/lib/widgets/post/post_item.dart index 0ea64a9..7be669f 100644 --- a/lib/widgets/post/post_item.dart +++ b/lib/widgets/post/post_item.dart @@ -1,6 +1,6 @@ -import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:flutter/services.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:gap/gap.dart'; @@ -11,7 +11,6 @@ import 'package:island/models/post.dart'; import 'package:island/pods/config.dart'; import 'package:island/pods/network.dart'; import 'package:island/pods/userinfo.dart'; -import 'package:island/route.gr.dart'; import 'package:island/services/responsive.dart'; import 'package:island/services/time.dart'; import 'package:island/widgets/account/account_name.dart'; @@ -72,7 +71,7 @@ class PostItem extends HookConsumerWidget { title: 'edit'.tr(), image: MenuImage.icon(Symbols.edit), callback: () { - context.router.push(PostEditRoute(id: item.id)).then((value) { + context.push('/posts/item.id/edit').then((value) { if (value != null) { onRefresh?.call(); } @@ -117,14 +116,14 @@ class PostItem extends HookConsumerWidget { title: 'reply'.tr(), image: MenuImage.icon(Symbols.reply), callback: () { - context.router.push(PostComposeRoute(repliedPost: item)); + context.push('/posts/compose', extra: {'repliedPost': item}); }, ), MenuAction( title: 'forward'.tr(), image: MenuImage.icon(Symbols.forward), callback: () { - context.router.push(PostComposeRoute(forwardedPost: item)); + context.push('/posts/compose', extra: {'forwardedPost': item}); }, ), MenuSeparator(), @@ -168,9 +167,7 @@ class PostItem extends HookConsumerWidget { GestureDetector( child: ProfilePictureWidget(file: item.publisher.picture), onTap: () { - context.router.push( - PublisherProfileRoute(name: item.publisher.name), - ); + context.push('/publishers/${item.publisher.name}'); }, ), Expanded( @@ -286,7 +283,7 @@ class PostItem extends HookConsumerWidget { ), onTap: () { if (isOpenable) { - context.router.push(PostDetailRoute(id: item.id)); + context.push('/posts/item.id'); } }, ), @@ -487,9 +484,7 @@ Widget _buildReferencePost(BuildContext context, SnPost item) { ), ], ), - ).gestures( - onTap: () => context.router.push(PostDetailRoute(id: referencePost.id)), - ); + ).gestures(onTap: () => context.push('/posts/referencePost.id')); } class PostReactionList extends HookConsumerWidget { diff --git a/lib/widgets/post/post_item_creator.dart b/lib/widgets/post/post_item_creator.dart index 380cfd2..8295298 100644 --- a/lib/widgets/post/post_item_creator.dart +++ b/lib/widgets/post/post_item_creator.dart @@ -1,11 +1,10 @@ -import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:island/models/post.dart'; import 'package:island/pods/network.dart'; -import 'package:island/route.gr.dart'; import 'package:island/services/time.dart'; import 'package:island/widgets/alert.dart'; import 'package:island/widgets/content/cloud_file_collection.dart'; @@ -46,7 +45,7 @@ class PostItemCreator extends HookConsumerWidget { title: 'edit'.tr(), image: MenuImage.icon(Symbols.edit), callback: () { - context.router.push(PostEditRoute(id: item.id)).then((value) { + context.push('/posts/item.id/edit').then((value) { if (value != null) { onRefresh?.call(); } @@ -81,7 +80,7 @@ class PostItemCreator extends HookConsumerWidget { image: MenuImage.icon(Symbols.link), callback: () { // Copy post link to clipboard - context.router.push(PostDetailRoute(id: item.id)); + context.push('/posts/item.id'); }, ), ], @@ -95,7 +94,7 @@ class PostItemCreator extends HookConsumerWidget { borderRadius: BorderRadius.circular(12), onTap: () { if (isOpenable) { - context.router.pushPath('/posts/${item.id}'); + context.push('/posts/${item.id}'); } }, child: Padding( diff --git a/lib/widgets/post/publishers_modal.dart b/lib/widgets/post/publishers_modal.dart index 85e029e..692ccfd 100644 --- a/lib/widgets/post/publishers_modal.dart +++ b/lib/widgets/post/publishers_modal.dart @@ -1,11 +1,10 @@ import 'dart:math' as math; -import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:gap/gap.dart'; +import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:island/route.gr.dart'; import 'package:island/screens/creators/publishers.dart'; import 'package:island/widgets/content/cloud_files.dart'; import 'package:styled_widget/styled_widget.dart'; @@ -44,8 +43,7 @@ class PublisherModal extends HookConsumerWidget { const Gap(12), ElevatedButton( onPressed: () { - context.router - .push(NewPublisherRoute()) + context.push('/creators/publishers/new') .then((value) { if (value != null) { ref.invalidate( diff --git a/lib/widgets/share/share_sheet.dart b/lib/widgets/share/share_sheet.dart index ce7c377..23cfecc 100644 --- a/lib/widgets/share/share_sheet.dart +++ b/lib/widgets/share/share_sheet.dart @@ -1,12 +1,11 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:gap/gap.dart'; +import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:island/widgets/alert.dart'; import 'package:island/widgets/content/sheet.dart'; import 'package:material_symbols_icons/symbols.dart'; -import 'package:auto_route/auto_route.dart'; -import 'package:island/route.gr.dart'; import 'package:island/screens/posts/compose.dart'; import 'package:island/models/file.dart'; import 'package:island/pods/link_preview.dart'; @@ -178,10 +177,10 @@ class _ShareSheetState extends ConsumerState { ); // Navigate to compose screen - if (mounted) { - context.router.push(PostComposeRoute(initialState: initialState)); - Navigator.of(context).pop(); // Close the share sheet - } + if (mounted) { + context.push('/posts/compose', extra: initialState); + Navigator.of(context).pop(); // Close the share sheet + } } catch (e) { showErrorAlert(e); } finally { @@ -325,7 +324,7 @@ class _ShareSheetState extends ConsumerState { // Navigate to chat if requested if (shouldNavigate == true && mounted) { - context.router.pushPath('/chat/$chatRoom'); + context.push('/chat/${chatRoom.id}'); } } } catch (e) { diff --git a/pubspec.lock b/pubspec.lock index b799742..7d1709a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -74,7 +74,7 @@ packages: source: hosted version: "2.13.0" auto_route: - dependency: "direct main" + dependency: transitive description: name: auto_route sha256: b8c036fa613a98a759cf0fdcba26e62f4985dcbff01a5e760ab411e8554bbaf0 @@ -1037,6 +1037,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.3" + go_router: + dependency: "direct main" + description: + name: go_router + sha256: f02fd7d2a4dc512fec615529824fdd217fecb3a3d3de68360293a551f21634b3 + url: "https://pub.dev" + source: hosted + version: "14.8.1" google_fonts: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index ebbc8bd..993dece 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -37,7 +37,7 @@ dependencies: flutter_hooks: ^0.21.2 hooks_riverpod: ^2.6.1 bitsdojo_window: ^0.1.6 - auto_route: ^10.0.1 + go_router: ^14.6.2 styled_widget: ^0.4.1 shared_preferences: ^2.5.3 flutter_riverpod: ^2.6.1