♻️ Refactor router, moved from auto_router to go_router

This commit is contained in:
2025-06-26 14:13:44 +08:00
parent 825e6b5b6d
commit f2829b2012
67 changed files with 587 additions and 2876 deletions

View File

@ -22,14 +22,11 @@ mixin _$CallState {
@pragma('vm:prefer-inline')
$CallStateCopyWith<CallState> get copyWith => _$CallStateCopyWithImpl<CallState>(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<CallParticipantLive> get copyWith => _$CallParticipantLiveCopyWithImpl<CallParticipantLive>(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;
}

View File

@ -23,14 +23,11 @@ mixin _$AppSettings {
@pragma('vm:prefer-inline')
$AppSettingsCopyWith<AppSettings> get copyWith => _$AppSettingsCopyWithImpl<AppSettings>(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

View File

@ -15,9 +15,6 @@ T _$identity<T>(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<String, dynamic>? 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<String, dynamic>? data, String? errorMessage
});
}
/// @nodoc
class __$WebSocketPacketCopyWithImpl<$Res>
@ -390,7 +336,6 @@ as String?,
));
}
}
// dart format on