diff --git a/.agents/architecture.md b/.agents/architecture.md index 969c68c6..a9b1fd09 100644 --- a/.agents/architecture.md +++ b/.agents/architecture.md @@ -1147,22 +1147,6 @@ NDK version stands in for the hook's cache. `com.follow.clash.core.mobile.**`, the classes gobind's C glue looks up by name. - The CI `android` job compiles `:core` without Flutter, so it passes `-Ptarget-platform=android-arm64` to build one ABI. -#### Android Crash Symbols - -Crashlytics NDK symbolicates a native crash only from libraries that still carry their symbols, and AGP strips every -`.so` it packages, so the Android build keeps symbols until `:app`'s own strip step and the APK does not grow: - -- `bindCore` drops `-s` and `-w` from `go_ldflags`, and gomobile strips nothing itself; the desktop Cores stay - stripped because nothing consumes their symbols. -- `:core` sets `packaging.jniLibs.keepDebugSymbols` so its own strip task leaves `libclash.so` intact on the way into - `:app`'s merged native libs, which is where the Crashlytics plugin reads it. -- `:app` turns on `nativeSymbolUploadEnabled` and finalizes `assembleRelease` and `bundleRelease` with - `uploadCrashlyticsSymbolFileRelease` only when release signing is configured, the same condition that marks a real - release build; the checked-in `google-services.json` is a placeholder, so a local upload is noise at best, and CI - supplies both files together. The Crashlytics plugin wires the R8 mapping upload itself but leaves the native symbol - upload to the caller, so nothing else triggers it. `generateCrashlyticsSymbolFileRelease` runs `dump_syms` over the - Go Core for every ABI, which is the other reason it stays off for unsigned builds. - ## Local Plugins - `setup`: build-time harness for Go core artifacts and the Rust helper, driven by a Dart build hook; no runtime Dart API. diff --git a/.agents/rules.md b/.agents/rules.md index c05b6a22..f880fdb6 100644 --- a/.agents/rules.md +++ b/.agents/rules.md @@ -260,15 +260,10 @@ leaving a repo-wide policy as a comment reaches only the reader of that one file failure (user stop, low memory, signal, package change), never create one, and its timestamp is consumed through `handledExitAt` so the same exit cannot be counted twice. - `BootGuard` is an Android-only mechanism and gates itself: on every other platform `evaluate`, `markRunning` and - `markClosed` return without touching preferences. The desktop has neither of the two attribution sources — no - `ApplicationExitInfo` equivalent and no Crashlytics toggle — so a bare sentinel there would read a window closed on - the disclaimer dialog, or a session ended by shutdown, as a failed launch. Keep the platform check inside the guard; - callers in `bootstrap.dart` and `SystemAction` stay unconditional. -- `FirebaseCrashlytics.didCrashOnPreviousExecution()` corroborates a failure and must not trigger one. Its marker file is - cleared by a background initialization that `dataCollectionArbiter` blocks while collection is disabled, which is the - default here, so one real crash makes it return true on every later launch. That latch is what made the app clear the - selected profile on every cold start; it is also why the probe is only read when `crashlytics` is enabled, keeping - Firebase uninitialized until the user consents. + `markClosed` return without touching preferences. The desktop has no `ApplicationExitInfo` equivalent to attribute an + exit, so a bare sentinel there would read a window closed on the disclaimer dialog, or a session ended by shutdown, + as a failed launch. Keep the platform check inside the guard; callers in `bootstrap.dart` and `SystemAction` stay + unconditional. - Recovery is graded: the first failed launch only skips `initStatus`, and `currentProfileId` is cleared only from `crashRecoveryClearThreshold` consecutive failures on. Do not let a single interrupted launch write to the config. - Desktop process ownership belongs to `DesktopCoreLifecycle`; do not start/kill `FlClashCore` from providers, widgets, diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ae796a0a..419fdff7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -371,7 +371,6 @@ jobs: if: startsWith(matrix.platform,'android') run: | echo "${{ secrets.KEYSTORE }}" | base64 --decode > android/app/keystore.jks - echo "${{ secrets.SERVICE_JSON }}" | base64 --decode > android/app/google-services.json { echo "keyAlias=${{ secrets.KEY_ALIAS }}" echo "storePassword=${{ secrets.STORE_PASSWORD }}" diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 54f13556..80cfed83 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -1,12 +1,9 @@ -import com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsExtension import org.jetbrains.kotlin.gradle.dsl.JvmTarget import java.util.Properties plugins { id("com.android.application") id("dev.flutter.flutter-gradle-plugin") - id("com.google.gms.google-services") - id("com.google.firebase.crashlytics") } val localProperties = Properties().apply { @@ -80,10 +77,6 @@ android { getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro", ) - - configure { - nativeSymbolUploadEnabled = hasReleaseSigning - } } } @@ -103,13 +96,6 @@ flutter { source = "../.." } -// The Crashlytics plugin finalizes R8 with the mapping upload but leaves the native symbol upload to the caller. -if (hasReleaseSigning) { - tasks.matching { it.name == "assembleRelease" || it.name == "bundleRelease" }.configureEach { - finalizedBy("uploadCrashlyticsSymbolFileRelease") - } -} - dependencies { implementation(project(":service")) implementation(project(":common")) @@ -119,9 +105,6 @@ dependencies { implementation(libs.smali.dexlib2) { exclude(group = "com.google.guava", module = "guava") } - implementation(platform(libs.firebase.bom)) - implementation(libs.firebase.crashlytics.ndk) - implementation(libs.firebase.analytics) testImplementation(libs.junit) testImplementation(libs.kotlinx.coroutines.test) } diff --git a/android/app/google-services.json b/android/app/google-services.json deleted file mode 100644 index ec7efbe1..00000000 --- a/android/app/google-services.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "project_info": { - "project_number": "000000000000", - "project_id": "dev" - }, - "client": [ - { - "client_info": { - "mobilesdk_app_id": "1:000000000000:android:0000000000000000", - "android_client_info": { - "package_name": "com.follow.clash" - } - }, - "oauth_client": [], - "api_key": [ - { - "current_key": "0" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [] - } - } - }, - { - "client_info": { - "mobilesdk_app_id": "1:000000000000:android:0000000000000000", - "android_client_info": { - "package_name": "com.follow.clash.debug" - } - }, - "oauth_client": [], - "api_key": [ - { - "current_key": "0" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [] - } - } - }, - { - "client_info": { - "mobilesdk_app_id": "1:000000000000:android:0000000000000000", - "android_client_info": { - "package_name": "com.follow.clash.dev" - } - }, - "oauth_client": [], - "api_key": [ - { - "current_key": "0" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [] - } - } - } - ] -} \ No newline at end of file diff --git a/android/app/src/main/kotlin/com/follow/clash/ServiceStateHost.kt b/android/app/src/main/kotlin/com/follow/clash/ServiceStateHost.kt index 11c7288e..7239248b 100644 --- a/android/app/src/main/kotlin/com/follow/clash/ServiceStateHost.kt +++ b/android/app/src/main/kotlin/com/follow/clash/ServiceStateHost.kt @@ -35,8 +35,6 @@ internal interface ServiceStateHost { fun showToast(message: String) - fun setCrashlytics(enabled: Boolean) - fun updateNotificationParams(params: NotificationParams) fun loadSharedState(): SharedState @@ -102,8 +100,6 @@ internal object AndroidServiceStateHost : ServiceStateHost { override fun showToast(message: String) = GlobalState.application.showToast(message) - override fun setCrashlytics(enabled: Boolean) = GlobalState.setCrashlytics(enabled) - override fun updateNotificationParams(params: NotificationParams) = ServiceConfig.updateNotificationParams(params) diff --git a/android/app/src/main/kotlin/com/follow/clash/ServiceStateMachine.kt b/android/app/src/main/kotlin/com/follow/clash/ServiceStateMachine.kt index b3ce5c9d..840a3943 100644 --- a/android/app/src/main/kotlin/com/follow/clash/ServiceStateMachine.kt +++ b/android/app/src/main/kotlin/com/follow/clash/ServiceStateMachine.kt @@ -182,7 +182,6 @@ internal class ServiceStateMachine(private val host: ServiceStateHost) { } private fun applySharedState() { - host.setCrashlytics(sharedState.crashlytics) host.updateNotificationParams(notificationParams(sharedState)) } diff --git a/android/app/src/main/kotlin/com/follow/clash/models/State.kt b/android/app/src/main/kotlin/com/follow/clash/models/State.kt index cae2b392..cc112b58 100644 --- a/android/app/src/main/kotlin/com/follow/clash/models/State.kt +++ b/android/app/src/main/kotlin/com/follow/clash/models/State.kt @@ -8,7 +8,6 @@ data class SharedState( val stopTip: String = "Stopping VPN...", val localNetworkTip: String = "Local network permission denied: using the gvisor stack, LAN is unreachable.", - val crashlytics: Boolean = true, val currentProfileName: String = "FlClash", val stopText: String = "Stop", val onlyStatisticsProxy: Boolean = false, diff --git a/android/app/src/main/kotlin/com/follow/clash/plugins/AppPlugin.kt b/android/app/src/main/kotlin/com/follow/clash/plugins/AppPlugin.kt index da994038..4df33b72 100644 --- a/android/app/src/main/kotlin/com/follow/clash/plugins/AppPlugin.kt +++ b/android/app/src/main/kotlin/com/follow/clash/plugins/AppPlugin.kt @@ -199,10 +199,6 @@ class AppPlugin : FlutterPlugin, MethodChannel.MethodCallHandler, ActivityAware result.success(openAppSettings()) } - "didCrashOnPreviousExecution" -> reply(result) { - GlobalState.didCrashOnPreviousExecution() - } - "getLastExitInfo" -> reply(result) { GlobalState.lastExitInfo() } diff --git a/android/common/build.gradle.kts b/android/common/build.gradle.kts index 352920b3..32d4f5b0 100644 --- a/android/common/build.gradle.kts +++ b/android/common/build.gradle.kts @@ -32,8 +32,5 @@ kotlin { dependencies { implementation(libs.androidx.core) implementation(libs.gson) - implementation(platform(libs.firebase.bom)) - implementation(libs.firebase.crashlytics.ndk) - implementation(libs.firebase.analytics) testImplementation(libs.junit) } diff --git a/android/common/src/main/java/com/follow/clash/common/GlobalState.kt b/android/common/src/main/java/com/follow/clash/common/GlobalState.kt index 8e1f00f2..318b6ee3 100644 --- a/android/common/src/main/java/com/follow/clash/common/GlobalState.kt +++ b/android/common/src/main/java/com/follow/clash/common/GlobalState.kt @@ -4,8 +4,6 @@ import android.app.ActivityManager import android.app.Application import android.os.Build import android.util.Log -import com.google.firebase.FirebaseApp -import com.google.firebase.crashlytics.FirebaseCrashlytics import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.SupervisorJob @@ -36,19 +34,6 @@ object GlobalState : CoroutineScope by CoroutineScope(SupervisorJob() + Dispatch Log.d("FlClash", text) } - fun setCrashlytics(enable: Boolean) { - FirebaseApp.initializeApp(application) - FirebaseCrashlytics.getInstance().isCrashlyticsCollectionEnabled = enable - if (enable) { - log("Crashlytics enabled") - } - } - - fun didCrashOnPreviousExecution(): Boolean { - FirebaseApp.initializeApp(application) - return FirebaseCrashlytics.getInstance().didCrashOnPreviousExecution() - } - fun lastExitInfo(): Map? { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) return null val manager = application.getSystemService(ActivityManager::class.java) ?: return null diff --git a/android/core/build.gradle.kts b/android/core/build.gradle.kts index d1f64f94..edc4cd78 100644 --- a/android/core/build.gradle.kts +++ b/android/core/build.gradle.kts @@ -20,13 +20,6 @@ android { consumerProguardFiles("consumer-rules.pro") } - // :app strips what it packages; Crashlytics symbolication needs the unstripped libraries to reach its merge. - packaging { - jniLibs { - keepDebugSymbols += "**/*.so" - } - } - compileOptions { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 @@ -249,10 +242,9 @@ val bindCore = targets.set(gomobileTargets) androidApi.set(libs.versions.minSdk.get().toInt()) tags.set(buildConfig.map { it["tags"].orEmpty() }) - // Crashlytics symbolicates native crashes from the unstripped library :app merges, so the Core keeps its symbols. ldflags.set( buildConfig.map { config -> - val flags = config["go_ldflags"].orEmpty().split(" ").filter { it.isNotEmpty() && it != "-s" && it != "-w" } + val flags = config["go_ldflags"].orEmpty().split(" ").filter { it.isNotEmpty() } val version = config["core_version"].orEmpty() (flags + listOfNotNull(version.takeIf { it.isNotEmpty() }?.let { "-X=github.com/metacubex/mihomo/constant.Version=$it" })) .joinToString(" ") diff --git a/android/gradle/libs.versions.toml b/android/gradle/libs.versions.toml index 905a04a9..2fa9e7a8 100644 --- a/android/gradle/libs.versions.toml +++ b/android/gradle/libs.versions.toml @@ -1,5 +1,4 @@ [versions] -firebaseBom = "34.19.0" minSdk = "24" targetSdk = "37" compileSdk = "37" @@ -14,9 +13,6 @@ kotlinxCoroutines = "1.11.0" [libraries] androidx-core = { module = "androidx.core:core-ktx", version.ref = "coreKtx" } core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "coreSplashscreen" } -firebase-analytics = { module = "com.google.firebase:firebase-analytics" } -firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebaseBom" } -firebase-crashlytics-ndk = { module = "com.google.firebase:firebase-crashlytics-ndk" } gson = { module = "com.google.code.gson:gson", version.ref = "gson" } junit = { module = "junit:junit", version.ref = "junit" } kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinxCoroutines" } diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts index c4f8f103..90e45d70 100644 --- a/android/settings.gradle.kts +++ b/android/settings.gradle.kts @@ -21,8 +21,6 @@ plugins { id("dev.flutter.flutter-plugin-loader") version "1.0.0" id("com.android.application") version "9.4.1" apply false id("org.jetbrains.kotlin.android") version "2.4.20" apply false - id("com.google.gms.google-services") version "4.5.0" apply false - id("com.google.firebase.crashlytics") version "3.0.8" apply false } include(":app") diff --git a/android/tests/app/ServiceStateMachineTest.kt b/android/tests/app/ServiceStateMachineTest.kt index 53995119..ba2b0ef5 100644 --- a/android/tests/app/ServiceStateMachineTest.kt +++ b/android/tests/app/ServiceStateMachineTest.kt @@ -108,7 +108,6 @@ private class FakeHost(override val scope: CoroutineScope) : ServiceStateHost { val toasts = mutableListOf() val logs = mutableListOf() val notificationParams = mutableListOf() - val crashlytics = mutableListOf() var setupCalls = 0 var startCalls = 0 var stopCalls = 0 @@ -124,10 +123,6 @@ private class FakeHost(override val scope: CoroutineScope) : ServiceStateHost { toasts += message } - override fun setCrashlytics(enabled: Boolean) { - crashlytics += enabled - } - override fun updateNotificationParams(params: NotificationParams) { notificationParams += params } @@ -761,20 +756,18 @@ class ServiceStateMachineTest { } @Test - fun `syncSharedState pushes crashlytics and the notification straight through`() = runTest { + fun `syncSharedState pushes the notification straight through`() = runTest { val host = FakeHost(backgroundScope) val machine = ServiceStateMachine(host) machine.syncSharedState( SharedState( - crashlytics = false, currentProfileName = "Work", stopText = "Disconnect", onlyStatisticsProxy = true, ), ) - assertEquals(listOf(false), host.crashlytics) assertEquals(listOf(NotificationParams("Work", "Disconnect", true)), host.notificationParams) } diff --git a/android/tests/app/SharedStateTest.kt b/android/tests/app/SharedStateTest.kt index 05b5861d..fb257086 100644 --- a/android/tests/app/SharedStateTest.kt +++ b/android/tests/app/SharedStateTest.kt @@ -45,7 +45,6 @@ class SharedStateTest { { "startTip": "Starting", "stopTip": "Stopping", - "crashlytics": false, "currentProfileName": "Work", "stopText": "Halt", "onlyStatisticsProxy": true, @@ -78,7 +77,6 @@ class SharedStateTest { assertEquals("Starting", state.startTip) assertEquals("Work", state.currentProfileName) - assertEquals(false, state.crashlytics) assertEquals(true, state.onlyStatisticsProxy) assertEquals(false, state.showStopAction) assertEquals(7890, state.vpnOptions?.port) @@ -97,7 +95,6 @@ class SharedStateTest { assertEquals("FlClash", defaults.currentProfileName) assertEquals("Stop", defaults.stopText) - assertEquals(true, defaults.crashlytics) assertEquals(false, defaults.onlyStatisticsProxy) assertEquals(true, defaults.showStopAction) assertNull(defaults.vpnOptions) @@ -114,7 +111,6 @@ class SharedStateTest { assertNotNull(state) assertEquals("Starting VPN...", state.startTip) assertEquals("FlClash", state.currentProfileName) - assertEquals(true, state.crashlytics) assertNull(state.vpnOptions) assertNull(state.setupParams) } diff --git a/lib/bootstrap.dart b/lib/bootstrap.dart index 830f500f..5b548828 100644 --- a/lib/bootstrap.dart +++ b/lib/bootstrap.dart @@ -104,7 +104,6 @@ class Bootstrap { var config = await migration.run(); _bootDecision = await bootGuard.evaluate( profileId: config.currentProfileId, - crashlyticsEnabled: config.appSettingProps.crashlytics, ); if (_bootDecision.recovery == BootRecovery.clearProfile) { config = config.copyWith(currentProfileId: null); @@ -180,7 +179,6 @@ class Bootstrap { return; } await _showCrashRecoveryTip(); - await _showCrashlyticsTip(); await _container.read(coreActionProvider.notifier).startCore(); if (!_bootDecision.isDegraded) { await _container.read(setupActionProvider.notifier).initStatus(); @@ -237,23 +235,6 @@ class Bootstrap { await _container.read(systemActionProvider.notifier).handleExit(false); } - Future _showCrashlyticsTip() async { - if (!system.isAndroid) return; - if (_container.read( - appSettingProvider.select((state) => state.crashlyticsTip), - )) { - return; - } - await dialogs.showMessage( - title: currentAppLocalizations.dataCollectionTip, - cancelable: false, - message: TextSpan(text: currentAppLocalizations.dataCollectionContent), - ); - _container - .read(appSettingProvider.notifier) - .update((state) => state.copyWith(crashlyticsTip: true)); - } - /// Android's exit only finishes the activity, so Dart keeps running after /// [SystemAction.handleExit] returns and must not go on to start the app. Future _handlerDisclaimer() async { diff --git a/lib/common/boot_guard.dart b/lib/common/boot_guard.dart index c24ab643..dae7cb0c 100644 --- a/lib/common/boot_guard.dart +++ b/lib/common/boot_guard.dart @@ -11,7 +11,6 @@ class BootGuard { final Future Function() _readRecord; final Future Function(BootRecord record) _writeRecord; final Future Function() _readExitInfo; - final Future Function() _readCrashReport; final int Function() _now; BootDecision _decision = const BootDecision(); @@ -21,34 +20,24 @@ class BootGuard { Future Function()? readRecord, Future Function(BootRecord record)? writeRecord, Future Function()? readExitInfo, - Future Function()? readCrashReport, int Function()? now, }) : _supported = supported ?? system.isAndroid, _readRecord = readRecord ?? preferences.getBootRecord, _writeRecord = writeRecord ?? preferences.saveBootRecord, _readExitInfo = readExitInfo ?? system.lastExitInfo, - _readCrashReport = readCrashReport ?? system.didCrashOnPreviousExecution, _now = now ?? _currentMilliseconds; static int _currentMilliseconds() => DateTime.now().millisecondsSinceEpoch; BootDecision get decision => _decision; - Future evaluate({ - required int? profileId, - required bool crashlyticsEnabled, - }) async { + Future evaluate({required int? profileId}) async { if (!_supported) { return _decision; } final record = await _readRecord(); final exitInfo = await _readExitInfo(); - final crashReported = crashlyticsEnabled && await _readCrashReport(); - final decision = resolveBootDecision( - record: record, - exitInfo: exitInfo, - crashReported: crashReported, - ); + final decision = resolveBootDecision(record: record, exitInfo: exitInfo); if (decision.isDegraded) { commonPrint.log( 'Previous launch did not finish: $decision', diff --git a/lib/common/boot_record.dart b/lib/common/boot_record.dart index f1a50024..66baeba5 100644 --- a/lib/common/boot_record.dart +++ b/lib/common/boot_record.dart @@ -197,7 +197,6 @@ class BootDecision { BootDecision resolveBootDecision({ required BootRecord? record, required AppExitInfo? exitInfo, - required bool crashReported, }) { if (record == null || record.stage != BootStage.starting) { return const BootDecision(); @@ -219,7 +218,7 @@ BootDecision resolveBootDecision({ : BootRecovery.skipAutoSetup, failureCount: failureCount, failedProfileId: record.profileId, - crashConfirmed: (reason?.isCrash ?? false) || crashReported, + crashConfirmed: reason?.isCrash ?? false, exitReason: reason, ); } diff --git a/lib/common/system.dart b/lib/common/system.dart index 291efdae..f0aad9f3 100644 --- a/lib/common/system.dart +++ b/lib/common/system.dart @@ -60,11 +60,6 @@ class System { }; } - Future didCrashOnPreviousExecution() async { - if (!isAndroid) return false; - return await app?.didCrashOnPreviousExecution() ?? false; - } - Future lastExitInfo() async { if (!isAndroid) return null; return app?.getLastExitInfo(); diff --git a/lib/models/config.dart b/lib/models/config.dart index 4cfdbffc..0b040dbb 100644 --- a/lib/models/config.dart +++ b/lib/models/config.dart @@ -242,8 +242,6 @@ abstract class AppSettingProps with _$AppSettingProps { @JsonKey(readValue: _readSidebarExpanded) bool sidebarExpanded, @Default(0) int acceptedDisclaimerVersion, - @Default(false) bool crashlyticsTip, - @Default(false) bool crashlytics, @Default(true) bool minimizeOnExit, @Default(false) bool hidden, @Default(false) bool developerMode, diff --git a/lib/models/generated/config.freezed.dart b/lib/models/generated/config.freezed.dart index dbc323dd..180bf10f 100644 --- a/lib/models/generated/config.freezed.dart +++ b/lib/models/generated/config.freezed.dart @@ -289,7 +289,7 @@ as String, /// @nodoc mixin _$AppSettingProps { - String? get locale;@JsonKey(fromJson: dashboardWidgetsFromJson) List get dashboardWidgets; bool get onlyStatisticsProxy; bool get showNotificationStopAction; bool get autoLaunch; bool get silentLaunch; bool get autoRun; bool get openLogs; bool get closeConnections; String get testUrl;@JsonKey(readValue: _readTabAnimation) TabAnimation get tabAnimation; bool get floatingNavigationBar; bool get autoCheckUpdate;@JsonKey(readValue: _readSidebarExpanded) bool get sidebarExpanded; int get acceptedDisclaimerVersion; bool get crashlyticsTip; bool get crashlytics; bool get minimizeOnExit; bool get hidden; bool get developerMode; RestoreStrategy get restoreStrategy; bool get showTrayTitle; bool get checkCertificate;@JsonKey(readValue: _readUserAgents) List get userAgents; List get filters; bool get hideIp; bool get editorLineWrap; EditorFontSize get editorFontSize; List get serviceOrder; List get disabledServices; Map> get tableColumnWidths; + String? get locale;@JsonKey(fromJson: dashboardWidgetsFromJson) List get dashboardWidgets; bool get onlyStatisticsProxy; bool get showNotificationStopAction; bool get autoLaunch; bool get silentLaunch; bool get autoRun; bool get openLogs; bool get closeConnections; String get testUrl;@JsonKey(readValue: _readTabAnimation) TabAnimation get tabAnimation; bool get floatingNavigationBar; bool get autoCheckUpdate;@JsonKey(readValue: _readSidebarExpanded) bool get sidebarExpanded; int get acceptedDisclaimerVersion; bool get minimizeOnExit; bool get hidden; bool get developerMode; RestoreStrategy get restoreStrategy; bool get showTrayTitle; bool get checkCertificate;@JsonKey(readValue: _readUserAgents) List get userAgents; List get filters; bool get hideIp; bool get editorLineWrap; EditorFontSize get editorFontSize; List get serviceOrder; List get disabledServices; Map> get tableColumnWidths; /// Create a copy of AppSettingProps /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @@ -303,20 +303,20 @@ $AppSettingPropsCopyWith get copyWith => _$AppSettingPropsCopyW @override bool operator ==(Object other) { final _this = this as AppSettingProps; - return identical(this, other) || (other.runtimeType == runtimeType&&other is AppSettingProps&&(identical(other.locale, _this.locale) || other.locale == _this.locale)&&const DeepCollectionEquality().equals(other.dashboardWidgets, _this.dashboardWidgets)&&(identical(other.onlyStatisticsProxy, _this.onlyStatisticsProxy) || other.onlyStatisticsProxy == _this.onlyStatisticsProxy)&&(identical(other.showNotificationStopAction, _this.showNotificationStopAction) || other.showNotificationStopAction == _this.showNotificationStopAction)&&(identical(other.autoLaunch, _this.autoLaunch) || other.autoLaunch == _this.autoLaunch)&&(identical(other.silentLaunch, _this.silentLaunch) || other.silentLaunch == _this.silentLaunch)&&(identical(other.autoRun, _this.autoRun) || other.autoRun == _this.autoRun)&&(identical(other.openLogs, _this.openLogs) || other.openLogs == _this.openLogs)&&(identical(other.closeConnections, _this.closeConnections) || other.closeConnections == _this.closeConnections)&&(identical(other.testUrl, _this.testUrl) || other.testUrl == _this.testUrl)&&(identical(other.tabAnimation, _this.tabAnimation) || other.tabAnimation == _this.tabAnimation)&&(identical(other.floatingNavigationBar, _this.floatingNavigationBar) || other.floatingNavigationBar == _this.floatingNavigationBar)&&(identical(other.autoCheckUpdate, _this.autoCheckUpdate) || other.autoCheckUpdate == _this.autoCheckUpdate)&&(identical(other.sidebarExpanded, _this.sidebarExpanded) || other.sidebarExpanded == _this.sidebarExpanded)&&(identical(other.acceptedDisclaimerVersion, _this.acceptedDisclaimerVersion) || other.acceptedDisclaimerVersion == _this.acceptedDisclaimerVersion)&&(identical(other.crashlyticsTip, _this.crashlyticsTip) || other.crashlyticsTip == _this.crashlyticsTip)&&(identical(other.crashlytics, _this.crashlytics) || other.crashlytics == _this.crashlytics)&&(identical(other.minimizeOnExit, _this.minimizeOnExit) || other.minimizeOnExit == _this.minimizeOnExit)&&(identical(other.hidden, _this.hidden) || other.hidden == _this.hidden)&&(identical(other.developerMode, _this.developerMode) || other.developerMode == _this.developerMode)&&(identical(other.restoreStrategy, _this.restoreStrategy) || other.restoreStrategy == _this.restoreStrategy)&&(identical(other.showTrayTitle, _this.showTrayTitle) || other.showTrayTitle == _this.showTrayTitle)&&(identical(other.checkCertificate, _this.checkCertificate) || other.checkCertificate == _this.checkCertificate)&&const DeepCollectionEquality().equals(other.userAgents, _this.userAgents)&&const DeepCollectionEquality().equals(other.filters, _this.filters)&&(identical(other.hideIp, _this.hideIp) || other.hideIp == _this.hideIp)&&(identical(other.editorLineWrap, _this.editorLineWrap) || other.editorLineWrap == _this.editorLineWrap)&&(identical(other.editorFontSize, _this.editorFontSize) || other.editorFontSize == _this.editorFontSize)&&const DeepCollectionEquality().equals(other.serviceOrder, _this.serviceOrder)&&const DeepCollectionEquality().equals(other.disabledServices, _this.disabledServices)&&const DeepCollectionEquality().equals(other.tableColumnWidths, _this.tableColumnWidths)); + return identical(this, other) || (other.runtimeType == runtimeType&&other is AppSettingProps&&(identical(other.locale, _this.locale) || other.locale == _this.locale)&&const DeepCollectionEquality().equals(other.dashboardWidgets, _this.dashboardWidgets)&&(identical(other.onlyStatisticsProxy, _this.onlyStatisticsProxy) || other.onlyStatisticsProxy == _this.onlyStatisticsProxy)&&(identical(other.showNotificationStopAction, _this.showNotificationStopAction) || other.showNotificationStopAction == _this.showNotificationStopAction)&&(identical(other.autoLaunch, _this.autoLaunch) || other.autoLaunch == _this.autoLaunch)&&(identical(other.silentLaunch, _this.silentLaunch) || other.silentLaunch == _this.silentLaunch)&&(identical(other.autoRun, _this.autoRun) || other.autoRun == _this.autoRun)&&(identical(other.openLogs, _this.openLogs) || other.openLogs == _this.openLogs)&&(identical(other.closeConnections, _this.closeConnections) || other.closeConnections == _this.closeConnections)&&(identical(other.testUrl, _this.testUrl) || other.testUrl == _this.testUrl)&&(identical(other.tabAnimation, _this.tabAnimation) || other.tabAnimation == _this.tabAnimation)&&(identical(other.floatingNavigationBar, _this.floatingNavigationBar) || other.floatingNavigationBar == _this.floatingNavigationBar)&&(identical(other.autoCheckUpdate, _this.autoCheckUpdate) || other.autoCheckUpdate == _this.autoCheckUpdate)&&(identical(other.sidebarExpanded, _this.sidebarExpanded) || other.sidebarExpanded == _this.sidebarExpanded)&&(identical(other.acceptedDisclaimerVersion, _this.acceptedDisclaimerVersion) || other.acceptedDisclaimerVersion == _this.acceptedDisclaimerVersion)&&(identical(other.minimizeOnExit, _this.minimizeOnExit) || other.minimizeOnExit == _this.minimizeOnExit)&&(identical(other.hidden, _this.hidden) || other.hidden == _this.hidden)&&(identical(other.developerMode, _this.developerMode) || other.developerMode == _this.developerMode)&&(identical(other.restoreStrategy, _this.restoreStrategy) || other.restoreStrategy == _this.restoreStrategy)&&(identical(other.showTrayTitle, _this.showTrayTitle) || other.showTrayTitle == _this.showTrayTitle)&&(identical(other.checkCertificate, _this.checkCertificate) || other.checkCertificate == _this.checkCertificate)&&const DeepCollectionEquality().equals(other.userAgents, _this.userAgents)&&const DeepCollectionEquality().equals(other.filters, _this.filters)&&(identical(other.hideIp, _this.hideIp) || other.hideIp == _this.hideIp)&&(identical(other.editorLineWrap, _this.editorLineWrap) || other.editorLineWrap == _this.editorLineWrap)&&(identical(other.editorFontSize, _this.editorFontSize) || other.editorFontSize == _this.editorFontSize)&&const DeepCollectionEquality().equals(other.serviceOrder, _this.serviceOrder)&&const DeepCollectionEquality().equals(other.disabledServices, _this.disabledServices)&&const DeepCollectionEquality().equals(other.tableColumnWidths, _this.tableColumnWidths)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode { final _this = this as AppSettingProps; - return Object.hashAll([runtimeType,_this.locale,const DeepCollectionEquality().hash(_this.dashboardWidgets),_this.onlyStatisticsProxy,_this.showNotificationStopAction,_this.autoLaunch,_this.silentLaunch,_this.autoRun,_this.openLogs,_this.closeConnections,_this.testUrl,_this.tabAnimation,_this.floatingNavigationBar,_this.autoCheckUpdate,_this.sidebarExpanded,_this.acceptedDisclaimerVersion,_this.crashlyticsTip,_this.crashlytics,_this.minimizeOnExit,_this.hidden,_this.developerMode,_this.restoreStrategy,_this.showTrayTitle,_this.checkCertificate,const DeepCollectionEquality().hash(_this.userAgents),const DeepCollectionEquality().hash(_this.filters),_this.hideIp,_this.editorLineWrap,_this.editorFontSize,const DeepCollectionEquality().hash(_this.serviceOrder),const DeepCollectionEquality().hash(_this.disabledServices),const DeepCollectionEquality().hash(_this.tableColumnWidths)]); + return Object.hashAll([runtimeType,_this.locale,const DeepCollectionEquality().hash(_this.dashboardWidgets),_this.onlyStatisticsProxy,_this.showNotificationStopAction,_this.autoLaunch,_this.silentLaunch,_this.autoRun,_this.openLogs,_this.closeConnections,_this.testUrl,_this.tabAnimation,_this.floatingNavigationBar,_this.autoCheckUpdate,_this.sidebarExpanded,_this.acceptedDisclaimerVersion,_this.minimizeOnExit,_this.hidden,_this.developerMode,_this.restoreStrategy,_this.showTrayTitle,_this.checkCertificate,const DeepCollectionEquality().hash(_this.userAgents),const DeepCollectionEquality().hash(_this.filters),_this.hideIp,_this.editorLineWrap,_this.editorFontSize,const DeepCollectionEquality().hash(_this.serviceOrder),const DeepCollectionEquality().hash(_this.disabledServices),const DeepCollectionEquality().hash(_this.tableColumnWidths)]); } @override String toString() { final _this = this as AppSettingProps; - return 'AppSettingProps(locale: ${_this.locale}, dashboardWidgets: ${_this.dashboardWidgets}, onlyStatisticsProxy: ${_this.onlyStatisticsProxy}, showNotificationStopAction: ${_this.showNotificationStopAction}, autoLaunch: ${_this.autoLaunch}, silentLaunch: ${_this.silentLaunch}, autoRun: ${_this.autoRun}, openLogs: ${_this.openLogs}, closeConnections: ${_this.closeConnections}, testUrl: ${_this.testUrl}, tabAnimation: ${_this.tabAnimation}, floatingNavigationBar: ${_this.floatingNavigationBar}, autoCheckUpdate: ${_this.autoCheckUpdate}, sidebarExpanded: ${_this.sidebarExpanded}, acceptedDisclaimerVersion: ${_this.acceptedDisclaimerVersion}, crashlyticsTip: ${_this.crashlyticsTip}, crashlytics: ${_this.crashlytics}, minimizeOnExit: ${_this.minimizeOnExit}, hidden: ${_this.hidden}, developerMode: ${_this.developerMode}, restoreStrategy: ${_this.restoreStrategy}, showTrayTitle: ${_this.showTrayTitle}, checkCertificate: ${_this.checkCertificate}, userAgents: ${_this.userAgents}, filters: ${_this.filters}, hideIp: ${_this.hideIp}, editorLineWrap: ${_this.editorLineWrap}, editorFontSize: ${_this.editorFontSize}, serviceOrder: ${_this.serviceOrder}, disabledServices: ${_this.disabledServices}, tableColumnWidths: ${_this.tableColumnWidths})'; + return 'AppSettingProps(locale: ${_this.locale}, dashboardWidgets: ${_this.dashboardWidgets}, onlyStatisticsProxy: ${_this.onlyStatisticsProxy}, showNotificationStopAction: ${_this.showNotificationStopAction}, autoLaunch: ${_this.autoLaunch}, silentLaunch: ${_this.silentLaunch}, autoRun: ${_this.autoRun}, openLogs: ${_this.openLogs}, closeConnections: ${_this.closeConnections}, testUrl: ${_this.testUrl}, tabAnimation: ${_this.tabAnimation}, floatingNavigationBar: ${_this.floatingNavigationBar}, autoCheckUpdate: ${_this.autoCheckUpdate}, sidebarExpanded: ${_this.sidebarExpanded}, acceptedDisclaimerVersion: ${_this.acceptedDisclaimerVersion}, minimizeOnExit: ${_this.minimizeOnExit}, hidden: ${_this.hidden}, developerMode: ${_this.developerMode}, restoreStrategy: ${_this.restoreStrategy}, showTrayTitle: ${_this.showTrayTitle}, checkCertificate: ${_this.checkCertificate}, userAgents: ${_this.userAgents}, filters: ${_this.filters}, hideIp: ${_this.hideIp}, editorLineWrap: ${_this.editorLineWrap}, editorFontSize: ${_this.editorFontSize}, serviceOrder: ${_this.serviceOrder}, disabledServices: ${_this.disabledServices}, tableColumnWidths: ${_this.tableColumnWidths})'; } @@ -327,7 +327,7 @@ abstract mixin class $AppSettingPropsCopyWith<$Res> { factory $AppSettingPropsCopyWith(AppSettingProps value, $Res Function(AppSettingProps) _then) = _$AppSettingPropsCopyWithImpl; @useResult $Res call({ - String? locale,@JsonKey(fromJson: dashboardWidgetsFromJson) List dashboardWidgets, bool onlyStatisticsProxy, bool showNotificationStopAction, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl,@JsonKey(readValue: _readTabAnimation) TabAnimation tabAnimation, bool floatingNavigationBar, bool autoCheckUpdate,@JsonKey(readValue: _readSidebarExpanded) bool sidebarExpanded, int acceptedDisclaimerVersion, bool crashlyticsTip, bool crashlytics, bool minimizeOnExit, bool hidden, bool developerMode, RestoreStrategy restoreStrategy, bool showTrayTitle, bool checkCertificate,@JsonKey(readValue: _readUserAgents) List userAgents, List filters, bool hideIp, bool editorLineWrap, EditorFontSize editorFontSize, List serviceOrder, List disabledServices, Map> tableColumnWidths + String? locale,@JsonKey(fromJson: dashboardWidgetsFromJson) List dashboardWidgets, bool onlyStatisticsProxy, bool showNotificationStopAction, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl,@JsonKey(readValue: _readTabAnimation) TabAnimation tabAnimation, bool floatingNavigationBar, bool autoCheckUpdate,@JsonKey(readValue: _readSidebarExpanded) bool sidebarExpanded, int acceptedDisclaimerVersion, bool minimizeOnExit, bool hidden, bool developerMode, RestoreStrategy restoreStrategy, bool showTrayTitle, bool checkCertificate,@JsonKey(readValue: _readUserAgents) List userAgents, List filters, bool hideIp, bool editorLineWrap, EditorFontSize editorFontSize, List serviceOrder, List disabledServices, Map> tableColumnWidths }); @@ -344,7 +344,7 @@ class _$AppSettingPropsCopyWithImpl<$Res> /// Create a copy of AppSettingProps /// with the given fields replaced by the non-null parameter values. -@pragma('vm:prefer-inline') @override $Res call({Object? locale = freezed,Object? dashboardWidgets = null,Object? onlyStatisticsProxy = null,Object? showNotificationStopAction = null,Object? autoLaunch = null,Object? silentLaunch = null,Object? autoRun = null,Object? openLogs = null,Object? closeConnections = null,Object? testUrl = null,Object? tabAnimation = null,Object? floatingNavigationBar = null,Object? autoCheckUpdate = null,Object? sidebarExpanded = null,Object? acceptedDisclaimerVersion = null,Object? crashlyticsTip = null,Object? crashlytics = null,Object? minimizeOnExit = null,Object? hidden = null,Object? developerMode = null,Object? restoreStrategy = null,Object? showTrayTitle = null,Object? checkCertificate = null,Object? userAgents = null,Object? filters = null,Object? hideIp = null,Object? editorLineWrap = null,Object? editorFontSize = null,Object? serviceOrder = null,Object? disabledServices = null,Object? tableColumnWidths = null,}) { +@pragma('vm:prefer-inline') @override $Res call({Object? locale = freezed,Object? dashboardWidgets = null,Object? onlyStatisticsProxy = null,Object? showNotificationStopAction = null,Object? autoLaunch = null,Object? silentLaunch = null,Object? autoRun = null,Object? openLogs = null,Object? closeConnections = null,Object? testUrl = null,Object? tabAnimation = null,Object? floatingNavigationBar = null,Object? autoCheckUpdate = null,Object? sidebarExpanded = null,Object? acceptedDisclaimerVersion = null,Object? minimizeOnExit = null,Object? hidden = null,Object? developerMode = null,Object? restoreStrategy = null,Object? showTrayTitle = null,Object? checkCertificate = null,Object? userAgents = null,Object? filters = null,Object? hideIp = null,Object? editorLineWrap = null,Object? editorFontSize = null,Object? serviceOrder = null,Object? disabledServices = null,Object? tableColumnWidths = null,}) { return _then(AppSettingProps( locale: freezed == locale ? _self.locale : locale // ignore: cast_nullable_to_non_nullable as String?,dashboardWidgets: null == dashboardWidgets ? _self.dashboardWidgets : dashboardWidgets // ignore: cast_nullable_to_non_nullable @@ -361,9 +361,7 @@ as TabAnimation,floatingNavigationBar: null == floatingNavigationBar ? _self.flo as bool,autoCheckUpdate: null == autoCheckUpdate ? _self.autoCheckUpdate : autoCheckUpdate // ignore: cast_nullable_to_non_nullable as bool,sidebarExpanded: null == sidebarExpanded ? _self.sidebarExpanded : sidebarExpanded // ignore: cast_nullable_to_non_nullable as bool,acceptedDisclaimerVersion: null == acceptedDisclaimerVersion ? _self.acceptedDisclaimerVersion : acceptedDisclaimerVersion // ignore: cast_nullable_to_non_nullable -as int,crashlyticsTip: null == crashlyticsTip ? _self.crashlyticsTip : crashlyticsTip // ignore: cast_nullable_to_non_nullable -as bool,crashlytics: null == crashlytics ? _self.crashlytics : crashlytics // ignore: cast_nullable_to_non_nullable -as bool,minimizeOnExit: null == minimizeOnExit ? _self.minimizeOnExit : minimizeOnExit // ignore: cast_nullable_to_non_nullable +as int,minimizeOnExit: null == minimizeOnExit ? _self.minimizeOnExit : minimizeOnExit // ignore: cast_nullable_to_non_nullable as bool,hidden: null == hidden ? _self.hidden : hidden // ignore: cast_nullable_to_non_nullable as bool,developerMode: null == developerMode ? _self.developerMode : developerMode // ignore: cast_nullable_to_non_nullable as bool,restoreStrategy: null == restoreStrategy ? _self.restoreStrategy : restoreStrategy // ignore: cast_nullable_to_non_nullable @@ -462,10 +460,10 @@ return $default(_that);case _: /// } /// ``` -@optionalTypeArgs TResult maybeWhen(TResult Function( String? locale, @JsonKey(fromJson: dashboardWidgetsFromJson) List dashboardWidgets, bool onlyStatisticsProxy, bool showNotificationStopAction, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl, @JsonKey(readValue: _readTabAnimation) TabAnimation tabAnimation, bool floatingNavigationBar, bool autoCheckUpdate, @JsonKey(readValue: _readSidebarExpanded) bool sidebarExpanded, int acceptedDisclaimerVersion, bool crashlyticsTip, bool crashlytics, bool minimizeOnExit, bool hidden, bool developerMode, RestoreStrategy restoreStrategy, bool showTrayTitle, bool checkCertificate, @JsonKey(readValue: _readUserAgents) List userAgents, List filters, bool hideIp, bool editorLineWrap, EditorFontSize editorFontSize, List serviceOrder, List disabledServices, Map> tableColumnWidths)? $default,{required TResult orElse(),}) {final _that = this; +@optionalTypeArgs TResult maybeWhen(TResult Function( String? locale, @JsonKey(fromJson: dashboardWidgetsFromJson) List dashboardWidgets, bool onlyStatisticsProxy, bool showNotificationStopAction, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl, @JsonKey(readValue: _readTabAnimation) TabAnimation tabAnimation, bool floatingNavigationBar, bool autoCheckUpdate, @JsonKey(readValue: _readSidebarExpanded) bool sidebarExpanded, int acceptedDisclaimerVersion, bool minimizeOnExit, bool hidden, bool developerMode, RestoreStrategy restoreStrategy, bool showTrayTitle, bool checkCertificate, @JsonKey(readValue: _readUserAgents) List userAgents, List filters, bool hideIp, bool editorLineWrap, EditorFontSize editorFontSize, List serviceOrder, List disabledServices, Map> tableColumnWidths)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _AppSettingProps() when $default != null: -return $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_that.showNotificationStopAction,_that.autoLaunch,_that.silentLaunch,_that.autoRun,_that.openLogs,_that.closeConnections,_that.testUrl,_that.tabAnimation,_that.floatingNavigationBar,_that.autoCheckUpdate,_that.sidebarExpanded,_that.acceptedDisclaimerVersion,_that.crashlyticsTip,_that.crashlytics,_that.minimizeOnExit,_that.hidden,_that.developerMode,_that.restoreStrategy,_that.showTrayTitle,_that.checkCertificate,_that.userAgents,_that.filters,_that.hideIp,_that.editorLineWrap,_that.editorFontSize,_that.serviceOrder,_that.disabledServices,_that.tableColumnWidths);case _: +return $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_that.showNotificationStopAction,_that.autoLaunch,_that.silentLaunch,_that.autoRun,_that.openLogs,_that.closeConnections,_that.testUrl,_that.tabAnimation,_that.floatingNavigationBar,_that.autoCheckUpdate,_that.sidebarExpanded,_that.acceptedDisclaimerVersion,_that.minimizeOnExit,_that.hidden,_that.developerMode,_that.restoreStrategy,_that.showTrayTitle,_that.checkCertificate,_that.userAgents,_that.filters,_that.hideIp,_that.editorLineWrap,_that.editorFontSize,_that.serviceOrder,_that.disabledServices,_that.tableColumnWidths);case _: return orElse(); } @@ -483,10 +481,10 @@ return $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_t /// } /// ``` -@optionalTypeArgs TResult when(TResult Function( String? locale, @JsonKey(fromJson: dashboardWidgetsFromJson) List dashboardWidgets, bool onlyStatisticsProxy, bool showNotificationStopAction, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl, @JsonKey(readValue: _readTabAnimation) TabAnimation tabAnimation, bool floatingNavigationBar, bool autoCheckUpdate, @JsonKey(readValue: _readSidebarExpanded) bool sidebarExpanded, int acceptedDisclaimerVersion, bool crashlyticsTip, bool crashlytics, bool minimizeOnExit, bool hidden, bool developerMode, RestoreStrategy restoreStrategy, bool showTrayTitle, bool checkCertificate, @JsonKey(readValue: _readUserAgents) List userAgents, List filters, bool hideIp, bool editorLineWrap, EditorFontSize editorFontSize, List serviceOrder, List disabledServices, Map> tableColumnWidths) $default,) {final _that = this; +@optionalTypeArgs TResult when(TResult Function( String? locale, @JsonKey(fromJson: dashboardWidgetsFromJson) List dashboardWidgets, bool onlyStatisticsProxy, bool showNotificationStopAction, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl, @JsonKey(readValue: _readTabAnimation) TabAnimation tabAnimation, bool floatingNavigationBar, bool autoCheckUpdate, @JsonKey(readValue: _readSidebarExpanded) bool sidebarExpanded, int acceptedDisclaimerVersion, bool minimizeOnExit, bool hidden, bool developerMode, RestoreStrategy restoreStrategy, bool showTrayTitle, bool checkCertificate, @JsonKey(readValue: _readUserAgents) List userAgents, List filters, bool hideIp, bool editorLineWrap, EditorFontSize editorFontSize, List serviceOrder, List disabledServices, Map> tableColumnWidths) $default,) {final _that = this; switch (_that) { case _AppSettingProps(): -return $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_that.showNotificationStopAction,_that.autoLaunch,_that.silentLaunch,_that.autoRun,_that.openLogs,_that.closeConnections,_that.testUrl,_that.tabAnimation,_that.floatingNavigationBar,_that.autoCheckUpdate,_that.sidebarExpanded,_that.acceptedDisclaimerVersion,_that.crashlyticsTip,_that.crashlytics,_that.minimizeOnExit,_that.hidden,_that.developerMode,_that.restoreStrategy,_that.showTrayTitle,_that.checkCertificate,_that.userAgents,_that.filters,_that.hideIp,_that.editorLineWrap,_that.editorFontSize,_that.serviceOrder,_that.disabledServices,_that.tableColumnWidths);case _: +return $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_that.showNotificationStopAction,_that.autoLaunch,_that.silentLaunch,_that.autoRun,_that.openLogs,_that.closeConnections,_that.testUrl,_that.tabAnimation,_that.floatingNavigationBar,_that.autoCheckUpdate,_that.sidebarExpanded,_that.acceptedDisclaimerVersion,_that.minimizeOnExit,_that.hidden,_that.developerMode,_that.restoreStrategy,_that.showTrayTitle,_that.checkCertificate,_that.userAgents,_that.filters,_that.hideIp,_that.editorLineWrap,_that.editorFontSize,_that.serviceOrder,_that.disabledServices,_that.tableColumnWidths);case _: throw StateError('Unexpected subclass'); } @@ -503,10 +501,10 @@ return $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_t /// } /// ``` -@optionalTypeArgs TResult? whenOrNull(TResult? Function( String? locale, @JsonKey(fromJson: dashboardWidgetsFromJson) List dashboardWidgets, bool onlyStatisticsProxy, bool showNotificationStopAction, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl, @JsonKey(readValue: _readTabAnimation) TabAnimation tabAnimation, bool floatingNavigationBar, bool autoCheckUpdate, @JsonKey(readValue: _readSidebarExpanded) bool sidebarExpanded, int acceptedDisclaimerVersion, bool crashlyticsTip, bool crashlytics, bool minimizeOnExit, bool hidden, bool developerMode, RestoreStrategy restoreStrategy, bool showTrayTitle, bool checkCertificate, @JsonKey(readValue: _readUserAgents) List userAgents, List filters, bool hideIp, bool editorLineWrap, EditorFontSize editorFontSize, List serviceOrder, List disabledServices, Map> tableColumnWidths)? $default,) {final _that = this; +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String? locale, @JsonKey(fromJson: dashboardWidgetsFromJson) List dashboardWidgets, bool onlyStatisticsProxy, bool showNotificationStopAction, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl, @JsonKey(readValue: _readTabAnimation) TabAnimation tabAnimation, bool floatingNavigationBar, bool autoCheckUpdate, @JsonKey(readValue: _readSidebarExpanded) bool sidebarExpanded, int acceptedDisclaimerVersion, bool minimizeOnExit, bool hidden, bool developerMode, RestoreStrategy restoreStrategy, bool showTrayTitle, bool checkCertificate, @JsonKey(readValue: _readUserAgents) List userAgents, List filters, bool hideIp, bool editorLineWrap, EditorFontSize editorFontSize, List serviceOrder, List disabledServices, Map> tableColumnWidths)? $default,) {final _that = this; switch (_that) { case _AppSettingProps() when $default != null: -return $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_that.showNotificationStopAction,_that.autoLaunch,_that.silentLaunch,_that.autoRun,_that.openLogs,_that.closeConnections,_that.testUrl,_that.tabAnimation,_that.floatingNavigationBar,_that.autoCheckUpdate,_that.sidebarExpanded,_that.acceptedDisclaimerVersion,_that.crashlyticsTip,_that.crashlytics,_that.minimizeOnExit,_that.hidden,_that.developerMode,_that.restoreStrategy,_that.showTrayTitle,_that.checkCertificate,_that.userAgents,_that.filters,_that.hideIp,_that.editorLineWrap,_that.editorFontSize,_that.serviceOrder,_that.disabledServices,_that.tableColumnWidths);case _: +return $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_that.showNotificationStopAction,_that.autoLaunch,_that.silentLaunch,_that.autoRun,_that.openLogs,_that.closeConnections,_that.testUrl,_that.tabAnimation,_that.floatingNavigationBar,_that.autoCheckUpdate,_that.sidebarExpanded,_that.acceptedDisclaimerVersion,_that.minimizeOnExit,_that.hidden,_that.developerMode,_that.restoreStrategy,_that.showTrayTitle,_that.checkCertificate,_that.userAgents,_that.filters,_that.hideIp,_that.editorLineWrap,_that.editorFontSize,_that.serviceOrder,_that.disabledServices,_that.tableColumnWidths);case _: return null; } @@ -518,7 +516,7 @@ return $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_t @JsonSerializable() class _AppSettingProps implements AppSettingProps { - const _AppSettingProps({this.locale, @JsonKey(fromJson: dashboardWidgetsFromJson) List dashboardWidgets = defaultDashboardWidgets, this.onlyStatisticsProxy = false, this.showNotificationStopAction = true, this.autoLaunch = false, this.silentLaunch = false, this.autoRun = false, this.openLogs = false, this.closeConnections = true, this.testUrl = defaultTestUrl, @JsonKey(readValue: _readTabAnimation) this.tabAnimation = TabAnimation.slide, this.floatingNavigationBar = true, this.autoCheckUpdate = true, @JsonKey(readValue: _readSidebarExpanded) this.sidebarExpanded = true, this.acceptedDisclaimerVersion = 0, this.crashlyticsTip = false, this.crashlytics = false, this.minimizeOnExit = true, this.hidden = false, this.developerMode = false, this.restoreStrategy = RestoreStrategy.compatible, this.showTrayTitle = true, this.checkCertificate = true, @JsonKey(readValue: _readUserAgents) List userAgents = defaultUserAgents, List filters = defaultFilters, this.hideIp = false, this.editorLineWrap = false, this.editorFontSize = EditorFontSize.standard, List serviceOrder = const [], List disabledServices = const [], Map> tableColumnWidths = const {}}): _dashboardWidgets = dashboardWidgets,_userAgents = userAgents,_filters = filters,_serviceOrder = serviceOrder,_disabledServices = disabledServices,_tableColumnWidths = tableColumnWidths; + const _AppSettingProps({this.locale, @JsonKey(fromJson: dashboardWidgetsFromJson) List dashboardWidgets = defaultDashboardWidgets, this.onlyStatisticsProxy = false, this.showNotificationStopAction = true, this.autoLaunch = false, this.silentLaunch = false, this.autoRun = false, this.openLogs = false, this.closeConnections = true, this.testUrl = defaultTestUrl, @JsonKey(readValue: _readTabAnimation) this.tabAnimation = TabAnimation.slide, this.floatingNavigationBar = true, this.autoCheckUpdate = true, @JsonKey(readValue: _readSidebarExpanded) this.sidebarExpanded = true, this.acceptedDisclaimerVersion = 0, this.minimizeOnExit = true, this.hidden = false, this.developerMode = false, this.restoreStrategy = RestoreStrategy.compatible, this.showTrayTitle = true, this.checkCertificate = true, @JsonKey(readValue: _readUserAgents) List userAgents = defaultUserAgents, List filters = defaultFilters, this.hideIp = false, this.editorLineWrap = false, this.editorFontSize = EditorFontSize.standard, List serviceOrder = const [], List disabledServices = const [], Map> tableColumnWidths = const {}}): _dashboardWidgets = dashboardWidgets,_userAgents = userAgents,_filters = filters,_serviceOrder = serviceOrder,_disabledServices = disabledServices,_tableColumnWidths = tableColumnWidths; factory _AppSettingProps.fromJson(Map json) => _$AppSettingPropsFromJson(json); @override final String? locale; @@ -542,8 +540,6 @@ class _AppSettingProps implements AppSettingProps { @override@JsonKey() final bool autoCheckUpdate; @override@JsonKey(readValue: _readSidebarExpanded) final bool sidebarExpanded; @override@JsonKey() final int acceptedDisclaimerVersion; -@override@JsonKey() final bool crashlyticsTip; -@override@JsonKey() final bool crashlytics; @override@JsonKey() final bool minimizeOnExit; @override@JsonKey() final bool hidden; @override@JsonKey() final bool developerMode; @@ -602,18 +598,18 @@ Map toJson() { @override bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppSettingProps&&(identical(other.locale, locale) || other.locale == locale)&&const DeepCollectionEquality().equals(other.dashboardWidgets, _dashboardWidgets)&&(identical(other.onlyStatisticsProxy, onlyStatisticsProxy) || other.onlyStatisticsProxy == onlyStatisticsProxy)&&(identical(other.showNotificationStopAction, showNotificationStopAction) || other.showNotificationStopAction == showNotificationStopAction)&&(identical(other.autoLaunch, autoLaunch) || other.autoLaunch == autoLaunch)&&(identical(other.silentLaunch, silentLaunch) || other.silentLaunch == silentLaunch)&&(identical(other.autoRun, autoRun) || other.autoRun == autoRun)&&(identical(other.openLogs, openLogs) || other.openLogs == openLogs)&&(identical(other.closeConnections, closeConnections) || other.closeConnections == closeConnections)&&(identical(other.testUrl, testUrl) || other.testUrl == testUrl)&&(identical(other.tabAnimation, tabAnimation) || other.tabAnimation == tabAnimation)&&(identical(other.floatingNavigationBar, floatingNavigationBar) || other.floatingNavigationBar == floatingNavigationBar)&&(identical(other.autoCheckUpdate, autoCheckUpdate) || other.autoCheckUpdate == autoCheckUpdate)&&(identical(other.sidebarExpanded, sidebarExpanded) || other.sidebarExpanded == sidebarExpanded)&&(identical(other.acceptedDisclaimerVersion, acceptedDisclaimerVersion) || other.acceptedDisclaimerVersion == acceptedDisclaimerVersion)&&(identical(other.crashlyticsTip, crashlyticsTip) || other.crashlyticsTip == crashlyticsTip)&&(identical(other.crashlytics, crashlytics) || other.crashlytics == crashlytics)&&(identical(other.minimizeOnExit, minimizeOnExit) || other.minimizeOnExit == minimizeOnExit)&&(identical(other.hidden, hidden) || other.hidden == hidden)&&(identical(other.developerMode, developerMode) || other.developerMode == developerMode)&&(identical(other.restoreStrategy, restoreStrategy) || other.restoreStrategy == restoreStrategy)&&(identical(other.showTrayTitle, showTrayTitle) || other.showTrayTitle == showTrayTitle)&&(identical(other.checkCertificate, checkCertificate) || other.checkCertificate == checkCertificate)&&const DeepCollectionEquality().equals(other.userAgents, _userAgents)&&const DeepCollectionEquality().equals(other.filters, _filters)&&(identical(other.hideIp, hideIp) || other.hideIp == hideIp)&&(identical(other.editorLineWrap, editorLineWrap) || other.editorLineWrap == editorLineWrap)&&(identical(other.editorFontSize, editorFontSize) || other.editorFontSize == editorFontSize)&&const DeepCollectionEquality().equals(other.serviceOrder, _serviceOrder)&&const DeepCollectionEquality().equals(other.disabledServices, _disabledServices)&&const DeepCollectionEquality().equals(other.tableColumnWidths, _tableColumnWidths)); + return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppSettingProps&&(identical(other.locale, locale) || other.locale == locale)&&const DeepCollectionEquality().equals(other.dashboardWidgets, _dashboardWidgets)&&(identical(other.onlyStatisticsProxy, onlyStatisticsProxy) || other.onlyStatisticsProxy == onlyStatisticsProxy)&&(identical(other.showNotificationStopAction, showNotificationStopAction) || other.showNotificationStopAction == showNotificationStopAction)&&(identical(other.autoLaunch, autoLaunch) || other.autoLaunch == autoLaunch)&&(identical(other.silentLaunch, silentLaunch) || other.silentLaunch == silentLaunch)&&(identical(other.autoRun, autoRun) || other.autoRun == autoRun)&&(identical(other.openLogs, openLogs) || other.openLogs == openLogs)&&(identical(other.closeConnections, closeConnections) || other.closeConnections == closeConnections)&&(identical(other.testUrl, testUrl) || other.testUrl == testUrl)&&(identical(other.tabAnimation, tabAnimation) || other.tabAnimation == tabAnimation)&&(identical(other.floatingNavigationBar, floatingNavigationBar) || other.floatingNavigationBar == floatingNavigationBar)&&(identical(other.autoCheckUpdate, autoCheckUpdate) || other.autoCheckUpdate == autoCheckUpdate)&&(identical(other.sidebarExpanded, sidebarExpanded) || other.sidebarExpanded == sidebarExpanded)&&(identical(other.acceptedDisclaimerVersion, acceptedDisclaimerVersion) || other.acceptedDisclaimerVersion == acceptedDisclaimerVersion)&&(identical(other.minimizeOnExit, minimizeOnExit) || other.minimizeOnExit == minimizeOnExit)&&(identical(other.hidden, hidden) || other.hidden == hidden)&&(identical(other.developerMode, developerMode) || other.developerMode == developerMode)&&(identical(other.restoreStrategy, restoreStrategy) || other.restoreStrategy == restoreStrategy)&&(identical(other.showTrayTitle, showTrayTitle) || other.showTrayTitle == showTrayTitle)&&(identical(other.checkCertificate, checkCertificate) || other.checkCertificate == checkCertificate)&&const DeepCollectionEquality().equals(other.userAgents, _userAgents)&&const DeepCollectionEquality().equals(other.filters, _filters)&&(identical(other.hideIp, hideIp) || other.hideIp == hideIp)&&(identical(other.editorLineWrap, editorLineWrap) || other.editorLineWrap == editorLineWrap)&&(identical(other.editorFontSize, editorFontSize) || other.editorFontSize == editorFontSize)&&const DeepCollectionEquality().equals(other.serviceOrder, _serviceOrder)&&const DeepCollectionEquality().equals(other.disabledServices, _disabledServices)&&const DeepCollectionEquality().equals(other.tableColumnWidths, _tableColumnWidths)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode { - return Object.hashAll([runtimeType,locale,const DeepCollectionEquality().hash(_dashboardWidgets),onlyStatisticsProxy,showNotificationStopAction,autoLaunch,silentLaunch,autoRun,openLogs,closeConnections,testUrl,tabAnimation,floatingNavigationBar,autoCheckUpdate,sidebarExpanded,acceptedDisclaimerVersion,crashlyticsTip,crashlytics,minimizeOnExit,hidden,developerMode,restoreStrategy,showTrayTitle,checkCertificate,const DeepCollectionEquality().hash(_userAgents),const DeepCollectionEquality().hash(_filters),hideIp,editorLineWrap,editorFontSize,const DeepCollectionEquality().hash(_serviceOrder),const DeepCollectionEquality().hash(_disabledServices),const DeepCollectionEquality().hash(_tableColumnWidths)]); + return Object.hashAll([runtimeType,locale,const DeepCollectionEquality().hash(_dashboardWidgets),onlyStatisticsProxy,showNotificationStopAction,autoLaunch,silentLaunch,autoRun,openLogs,closeConnections,testUrl,tabAnimation,floatingNavigationBar,autoCheckUpdate,sidebarExpanded,acceptedDisclaimerVersion,minimizeOnExit,hidden,developerMode,restoreStrategy,showTrayTitle,checkCertificate,const DeepCollectionEquality().hash(_userAgents),const DeepCollectionEquality().hash(_filters),hideIp,editorLineWrap,editorFontSize,const DeepCollectionEquality().hash(_serviceOrder),const DeepCollectionEquality().hash(_disabledServices),const DeepCollectionEquality().hash(_tableColumnWidths)]); } @override String toString() { - return 'AppSettingProps(locale: $locale, dashboardWidgets: $dashboardWidgets, onlyStatisticsProxy: $onlyStatisticsProxy, showNotificationStopAction: $showNotificationStopAction, autoLaunch: $autoLaunch, silentLaunch: $silentLaunch, autoRun: $autoRun, openLogs: $openLogs, closeConnections: $closeConnections, testUrl: $testUrl, tabAnimation: $tabAnimation, floatingNavigationBar: $floatingNavigationBar, autoCheckUpdate: $autoCheckUpdate, sidebarExpanded: $sidebarExpanded, acceptedDisclaimerVersion: $acceptedDisclaimerVersion, crashlyticsTip: $crashlyticsTip, crashlytics: $crashlytics, minimizeOnExit: $minimizeOnExit, hidden: $hidden, developerMode: $developerMode, restoreStrategy: $restoreStrategy, showTrayTitle: $showTrayTitle, checkCertificate: $checkCertificate, userAgents: $userAgents, filters: $filters, hideIp: $hideIp, editorLineWrap: $editorLineWrap, editorFontSize: $editorFontSize, serviceOrder: $serviceOrder, disabledServices: $disabledServices, tableColumnWidths: $tableColumnWidths)'; + return 'AppSettingProps(locale: $locale, dashboardWidgets: $dashboardWidgets, onlyStatisticsProxy: $onlyStatisticsProxy, showNotificationStopAction: $showNotificationStopAction, autoLaunch: $autoLaunch, silentLaunch: $silentLaunch, autoRun: $autoRun, openLogs: $openLogs, closeConnections: $closeConnections, testUrl: $testUrl, tabAnimation: $tabAnimation, floatingNavigationBar: $floatingNavigationBar, autoCheckUpdate: $autoCheckUpdate, sidebarExpanded: $sidebarExpanded, acceptedDisclaimerVersion: $acceptedDisclaimerVersion, minimizeOnExit: $minimizeOnExit, hidden: $hidden, developerMode: $developerMode, restoreStrategy: $restoreStrategy, showTrayTitle: $showTrayTitle, checkCertificate: $checkCertificate, userAgents: $userAgents, filters: $filters, hideIp: $hideIp, editorLineWrap: $editorLineWrap, editorFontSize: $editorFontSize, serviceOrder: $serviceOrder, disabledServices: $disabledServices, tableColumnWidths: $tableColumnWidths)'; } @@ -624,7 +620,7 @@ abstract mixin class _$AppSettingPropsCopyWith<$Res> implements $AppSettingProps factory _$AppSettingPropsCopyWith(_AppSettingProps value, $Res Function(_AppSettingProps) _then) = __$AppSettingPropsCopyWithImpl; @override @useResult $Res call({ - String? locale,@JsonKey(fromJson: dashboardWidgetsFromJson) List dashboardWidgets, bool onlyStatisticsProxy, bool showNotificationStopAction, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl,@JsonKey(readValue: _readTabAnimation) TabAnimation tabAnimation, bool floatingNavigationBar, bool autoCheckUpdate,@JsonKey(readValue: _readSidebarExpanded) bool sidebarExpanded, int acceptedDisclaimerVersion, bool crashlyticsTip, bool crashlytics, bool minimizeOnExit, bool hidden, bool developerMode, RestoreStrategy restoreStrategy, bool showTrayTitle, bool checkCertificate,@JsonKey(readValue: _readUserAgents) List userAgents, List filters, bool hideIp, bool editorLineWrap, EditorFontSize editorFontSize, List serviceOrder, List disabledServices, Map> tableColumnWidths + String? locale,@JsonKey(fromJson: dashboardWidgetsFromJson) List dashboardWidgets, bool onlyStatisticsProxy, bool showNotificationStopAction, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl,@JsonKey(readValue: _readTabAnimation) TabAnimation tabAnimation, bool floatingNavigationBar, bool autoCheckUpdate,@JsonKey(readValue: _readSidebarExpanded) bool sidebarExpanded, int acceptedDisclaimerVersion, bool minimizeOnExit, bool hidden, bool developerMode, RestoreStrategy restoreStrategy, bool showTrayTitle, bool checkCertificate,@JsonKey(readValue: _readUserAgents) List userAgents, List filters, bool hideIp, bool editorLineWrap, EditorFontSize editorFontSize, List serviceOrder, List disabledServices, Map> tableColumnWidths }); @@ -641,7 +637,7 @@ class __$AppSettingPropsCopyWithImpl<$Res> /// Create a copy of AppSettingProps /// with the given fields replaced by the non-null parameter values. -@override @pragma('vm:prefer-inline') $Res call({Object? locale = freezed,Object? dashboardWidgets = null,Object? onlyStatisticsProxy = null,Object? showNotificationStopAction = null,Object? autoLaunch = null,Object? silentLaunch = null,Object? autoRun = null,Object? openLogs = null,Object? closeConnections = null,Object? testUrl = null,Object? tabAnimation = null,Object? floatingNavigationBar = null,Object? autoCheckUpdate = null,Object? sidebarExpanded = null,Object? acceptedDisclaimerVersion = null,Object? crashlyticsTip = null,Object? crashlytics = null,Object? minimizeOnExit = null,Object? hidden = null,Object? developerMode = null,Object? restoreStrategy = null,Object? showTrayTitle = null,Object? checkCertificate = null,Object? userAgents = null,Object? filters = null,Object? hideIp = null,Object? editorLineWrap = null,Object? editorFontSize = null,Object? serviceOrder = null,Object? disabledServices = null,Object? tableColumnWidths = null,}) { +@override @pragma('vm:prefer-inline') $Res call({Object? locale = freezed,Object? dashboardWidgets = null,Object? onlyStatisticsProxy = null,Object? showNotificationStopAction = null,Object? autoLaunch = null,Object? silentLaunch = null,Object? autoRun = null,Object? openLogs = null,Object? closeConnections = null,Object? testUrl = null,Object? tabAnimation = null,Object? floatingNavigationBar = null,Object? autoCheckUpdate = null,Object? sidebarExpanded = null,Object? acceptedDisclaimerVersion = null,Object? minimizeOnExit = null,Object? hidden = null,Object? developerMode = null,Object? restoreStrategy = null,Object? showTrayTitle = null,Object? checkCertificate = null,Object? userAgents = null,Object? filters = null,Object? hideIp = null,Object? editorLineWrap = null,Object? editorFontSize = null,Object? serviceOrder = null,Object? disabledServices = null,Object? tableColumnWidths = null,}) { return _then(_AppSettingProps( locale: freezed == locale ? _self.locale : locale // ignore: cast_nullable_to_non_nullable as String?,dashboardWidgets: null == dashboardWidgets ? _self._dashboardWidgets : dashboardWidgets // ignore: cast_nullable_to_non_nullable @@ -658,9 +654,7 @@ as TabAnimation,floatingNavigationBar: null == floatingNavigationBar ? _self.flo as bool,autoCheckUpdate: null == autoCheckUpdate ? _self.autoCheckUpdate : autoCheckUpdate // ignore: cast_nullable_to_non_nullable as bool,sidebarExpanded: null == sidebarExpanded ? _self.sidebarExpanded : sidebarExpanded // ignore: cast_nullable_to_non_nullable as bool,acceptedDisclaimerVersion: null == acceptedDisclaimerVersion ? _self.acceptedDisclaimerVersion : acceptedDisclaimerVersion // ignore: cast_nullable_to_non_nullable -as int,crashlyticsTip: null == crashlyticsTip ? _self.crashlyticsTip : crashlyticsTip // ignore: cast_nullable_to_non_nullable -as bool,crashlytics: null == crashlytics ? _self.crashlytics : crashlytics // ignore: cast_nullable_to_non_nullable -as bool,minimizeOnExit: null == minimizeOnExit ? _self.minimizeOnExit : minimizeOnExit // ignore: cast_nullable_to_non_nullable +as int,minimizeOnExit: null == minimizeOnExit ? _self.minimizeOnExit : minimizeOnExit // ignore: cast_nullable_to_non_nullable as bool,hidden: null == hidden ? _self.hidden : hidden // ignore: cast_nullable_to_non_nullable as bool,developerMode: null == developerMode ? _self.developerMode : developerMode // ignore: cast_nullable_to_non_nullable as bool,restoreStrategy: null == restoreStrategy ? _self.restoreStrategy : restoreStrategy // ignore: cast_nullable_to_non_nullable diff --git a/lib/models/generated/config.g.dart b/lib/models/generated/config.g.dart index 8da21784..f0d8236a 100644 --- a/lib/models/generated/config.g.dart +++ b/lib/models/generated/config.g.dart @@ -42,8 +42,6 @@ _AppSettingProps _$AppSettingPropsFromJson( _readSidebarExpanded(json, 'sidebarExpanded') as bool? ?? true, acceptedDisclaimerVersion: (json['acceptedDisclaimerVersion'] as num?)?.toInt() ?? 0, - crashlyticsTip: json['crashlyticsTip'] as bool? ?? false, - crashlytics: json['crashlytics'] as bool? ?? false, minimizeOnExit: json['minimizeOnExit'] as bool? ?? true, hidden: json['hidden'] as bool? ?? false, developerMode: json['developerMode'] as bool? ?? false, @@ -108,8 +106,6 @@ Map _$AppSettingPropsToJson(_AppSettingProps instance) => 'autoCheckUpdate': instance.autoCheckUpdate, 'sidebarExpanded': instance.sidebarExpanded, 'acceptedDisclaimerVersion': instance.acceptedDisclaimerVersion, - 'crashlyticsTip': instance.crashlyticsTip, - 'crashlytics': instance.crashlytics, 'minimizeOnExit': instance.minimizeOnExit, 'hidden': instance.hidden, 'developerMode': instance.developerMode, @@ -406,6 +402,7 @@ const _$ColorStyleEnumMap = { const _$LiquidGlassModeEnumMap = { LiquidGlassMode.none: 'none', LiquidGlassMode.standard: 'standard', + LiquidGlassMode.ultra: 'ultra', }; _Config _$ConfigFromJson(Map json) => _Config( diff --git a/lib/models/generated/state.freezed.dart b/lib/models/generated/state.freezed.dart index f4f781fc..d2f82db5 100644 --- a/lib/models/generated/state.freezed.dart +++ b/lib/models/generated/state.freezed.dart @@ -5287,7 +5287,7 @@ as String?, /// @nodoc mixin _$SharedState { - SetupParams? get setupParams; VpnOptions? get vpnOptions; String get stopTip; String get startTip; String get localNetworkTip; String get currentProfileName; String get stopText; bool get onlyStatisticsProxy; bool get showStopAction; bool get crashlytics; + SetupParams? get setupParams; VpnOptions? get vpnOptions; String get stopTip; String get startTip; String get localNetworkTip; String get currentProfileName; String get stopText; bool get onlyStatisticsProxy; bool get showStopAction; /// Create a copy of SharedState /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @@ -5301,20 +5301,20 @@ $SharedStateCopyWith get copyWith => _$SharedStateCopyWithImpl { factory $SharedStateCopyWith(SharedState value, $Res Function(SharedState) _then) = _$SharedStateCopyWithImpl; @useResult $Res call({ - SetupParams? setupParams, VpnOptions? vpnOptions, String stopTip, String startTip, String localNetworkTip, String currentProfileName, String stopText, bool onlyStatisticsProxy, bool showStopAction, bool crashlytics + SetupParams? setupParams, VpnOptions? vpnOptions, String stopTip, String startTip, String localNetworkTip, String currentProfileName, String stopText, bool onlyStatisticsProxy, bool showStopAction }); @@ -5342,7 +5342,7 @@ class _$SharedStateCopyWithImpl<$Res> /// Create a copy of SharedState /// with the given fields replaced by the non-null parameter values. -@pragma('vm:prefer-inline') @override $Res call({Object? setupParams = freezed,Object? vpnOptions = freezed,Object? stopTip = null,Object? startTip = null,Object? localNetworkTip = null,Object? currentProfileName = null,Object? stopText = null,Object? onlyStatisticsProxy = null,Object? showStopAction = null,Object? crashlytics = null,}) { +@pragma('vm:prefer-inline') @override $Res call({Object? setupParams = freezed,Object? vpnOptions = freezed,Object? stopTip = null,Object? startTip = null,Object? localNetworkTip = null,Object? currentProfileName = null,Object? stopText = null,Object? onlyStatisticsProxy = null,Object? showStopAction = null,}) { return _then(SharedState( setupParams: freezed == setupParams ? _self.setupParams : setupParams // ignore: cast_nullable_to_non_nullable as SetupParams?,vpnOptions: freezed == vpnOptions ? _self.vpnOptions : vpnOptions // ignore: cast_nullable_to_non_nullable @@ -5353,7 +5353,6 @@ as String,currentProfileName: null == currentProfileName ? _self.currentProfileN as String,stopText: null == stopText ? _self.stopText : stopText // ignore: cast_nullable_to_non_nullable as String,onlyStatisticsProxy: null == onlyStatisticsProxy ? _self.onlyStatisticsProxy : onlyStatisticsProxy // ignore: cast_nullable_to_non_nullable as bool,showStopAction: null == showStopAction ? _self.showStopAction : showStopAction // ignore: cast_nullable_to_non_nullable -as bool,crashlytics: null == crashlytics ? _self.crashlytics : crashlytics // ignore: cast_nullable_to_non_nullable as bool, )); } @@ -5463,10 +5462,10 @@ return $default(_that);case _: /// } /// ``` -@optionalTypeArgs TResult maybeWhen(TResult Function( SetupParams? setupParams, VpnOptions? vpnOptions, String stopTip, String startTip, String localNetworkTip, String currentProfileName, String stopText, bool onlyStatisticsProxy, bool showStopAction, bool crashlytics)? $default,{required TResult orElse(),}) {final _that = this; +@optionalTypeArgs TResult maybeWhen(TResult Function( SetupParams? setupParams, VpnOptions? vpnOptions, String stopTip, String startTip, String localNetworkTip, String currentProfileName, String stopText, bool onlyStatisticsProxy, bool showStopAction)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _SharedState() when $default != null: -return $default(_that.setupParams,_that.vpnOptions,_that.stopTip,_that.startTip,_that.localNetworkTip,_that.currentProfileName,_that.stopText,_that.onlyStatisticsProxy,_that.showStopAction,_that.crashlytics);case _: +return $default(_that.setupParams,_that.vpnOptions,_that.stopTip,_that.startTip,_that.localNetworkTip,_that.currentProfileName,_that.stopText,_that.onlyStatisticsProxy,_that.showStopAction);case _: return orElse(); } @@ -5484,10 +5483,10 @@ return $default(_that.setupParams,_that.vpnOptions,_that.stopTip,_that.startTip, /// } /// ``` -@optionalTypeArgs TResult when(TResult Function( SetupParams? setupParams, VpnOptions? vpnOptions, String stopTip, String startTip, String localNetworkTip, String currentProfileName, String stopText, bool onlyStatisticsProxy, bool showStopAction, bool crashlytics) $default,) {final _that = this; +@optionalTypeArgs TResult when(TResult Function( SetupParams? setupParams, VpnOptions? vpnOptions, String stopTip, String startTip, String localNetworkTip, String currentProfileName, String stopText, bool onlyStatisticsProxy, bool showStopAction) $default,) {final _that = this; switch (_that) { case _SharedState(): -return $default(_that.setupParams,_that.vpnOptions,_that.stopTip,_that.startTip,_that.localNetworkTip,_that.currentProfileName,_that.stopText,_that.onlyStatisticsProxy,_that.showStopAction,_that.crashlytics);case _: +return $default(_that.setupParams,_that.vpnOptions,_that.stopTip,_that.startTip,_that.localNetworkTip,_that.currentProfileName,_that.stopText,_that.onlyStatisticsProxy,_that.showStopAction);case _: throw StateError('Unexpected subclass'); } @@ -5504,10 +5503,10 @@ return $default(_that.setupParams,_that.vpnOptions,_that.stopTip,_that.startTip, /// } /// ``` -@optionalTypeArgs TResult? whenOrNull(TResult? Function( SetupParams? setupParams, VpnOptions? vpnOptions, String stopTip, String startTip, String localNetworkTip, String currentProfileName, String stopText, bool onlyStatisticsProxy, bool showStopAction, bool crashlytics)? $default,) {final _that = this; +@optionalTypeArgs TResult? whenOrNull(TResult? Function( SetupParams? setupParams, VpnOptions? vpnOptions, String stopTip, String startTip, String localNetworkTip, String currentProfileName, String stopText, bool onlyStatisticsProxy, bool showStopAction)? $default,) {final _that = this; switch (_that) { case _SharedState() when $default != null: -return $default(_that.setupParams,_that.vpnOptions,_that.stopTip,_that.startTip,_that.localNetworkTip,_that.currentProfileName,_that.stopText,_that.onlyStatisticsProxy,_that.showStopAction,_that.crashlytics);case _: +return $default(_that.setupParams,_that.vpnOptions,_that.stopTip,_that.startTip,_that.localNetworkTip,_that.currentProfileName,_that.stopText,_that.onlyStatisticsProxy,_that.showStopAction);case _: return null; } @@ -5519,7 +5518,7 @@ return $default(_that.setupParams,_that.vpnOptions,_that.stopTip,_that.startTip, @JsonSerializable() class _SharedState implements SharedState { - const _SharedState({this.setupParams, this.vpnOptions, required this.stopTip, required this.startTip, required this.localNetworkTip, required this.currentProfileName, required this.stopText, required this.onlyStatisticsProxy, this.showStopAction = true, required this.crashlytics}); + const _SharedState({this.setupParams, this.vpnOptions, required this.stopTip, required this.startTip, required this.localNetworkTip, required this.currentProfileName, required this.stopText, required this.onlyStatisticsProxy, this.showStopAction = true}); factory _SharedState.fromJson(Map json) => _$SharedStateFromJson(json); @override final SetupParams? setupParams; @@ -5531,7 +5530,6 @@ class _SharedState implements SharedState { @override final String stopText; @override final bool onlyStatisticsProxy; @override@JsonKey() final bool showStopAction; -@override final bool crashlytics; /// Create a copy of SharedState /// with the given fields replaced by the non-null parameter values. @@ -5546,18 +5544,18 @@ Map toJson() { @override bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is _SharedState&&(identical(other.setupParams, setupParams) || other.setupParams == setupParams)&&(identical(other.vpnOptions, vpnOptions) || other.vpnOptions == vpnOptions)&&(identical(other.stopTip, stopTip) || other.stopTip == stopTip)&&(identical(other.startTip, startTip) || other.startTip == startTip)&&(identical(other.localNetworkTip, localNetworkTip) || other.localNetworkTip == localNetworkTip)&&(identical(other.currentProfileName, currentProfileName) || other.currentProfileName == currentProfileName)&&(identical(other.stopText, stopText) || other.stopText == stopText)&&(identical(other.onlyStatisticsProxy, onlyStatisticsProxy) || other.onlyStatisticsProxy == onlyStatisticsProxy)&&(identical(other.showStopAction, showStopAction) || other.showStopAction == showStopAction)&&(identical(other.crashlytics, crashlytics) || other.crashlytics == crashlytics)); + return identical(this, other) || (other.runtimeType == runtimeType&&other is _SharedState&&(identical(other.setupParams, setupParams) || other.setupParams == setupParams)&&(identical(other.vpnOptions, vpnOptions) || other.vpnOptions == vpnOptions)&&(identical(other.stopTip, stopTip) || other.stopTip == stopTip)&&(identical(other.startTip, startTip) || other.startTip == startTip)&&(identical(other.localNetworkTip, localNetworkTip) || other.localNetworkTip == localNetworkTip)&&(identical(other.currentProfileName, currentProfileName) || other.currentProfileName == currentProfileName)&&(identical(other.stopText, stopText) || other.stopText == stopText)&&(identical(other.onlyStatisticsProxy, onlyStatisticsProxy) || other.onlyStatisticsProxy == onlyStatisticsProxy)&&(identical(other.showStopAction, showStopAction) || other.showStopAction == showStopAction)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode { - return Object.hash(runtimeType,setupParams,vpnOptions,stopTip,startTip,localNetworkTip,currentProfileName,stopText,onlyStatisticsProxy,showStopAction,crashlytics); + return Object.hash(runtimeType,setupParams,vpnOptions,stopTip,startTip,localNetworkTip,currentProfileName,stopText,onlyStatisticsProxy,showStopAction); } @override String toString() { - return 'SharedState(setupParams: $setupParams, vpnOptions: $vpnOptions, stopTip: $stopTip, startTip: $startTip, localNetworkTip: $localNetworkTip, currentProfileName: $currentProfileName, stopText: $stopText, onlyStatisticsProxy: $onlyStatisticsProxy, showStopAction: $showStopAction, crashlytics: $crashlytics)'; + return 'SharedState(setupParams: $setupParams, vpnOptions: $vpnOptions, stopTip: $stopTip, startTip: $startTip, localNetworkTip: $localNetworkTip, currentProfileName: $currentProfileName, stopText: $stopText, onlyStatisticsProxy: $onlyStatisticsProxy, showStopAction: $showStopAction)'; } @@ -5568,7 +5566,7 @@ abstract mixin class _$SharedStateCopyWith<$Res> implements $SharedStateCopyWith factory _$SharedStateCopyWith(_SharedState value, $Res Function(_SharedState) _then) = __$SharedStateCopyWithImpl; @override @useResult $Res call({ - SetupParams? setupParams, VpnOptions? vpnOptions, String stopTip, String startTip, String localNetworkTip, String currentProfileName, String stopText, bool onlyStatisticsProxy, bool showStopAction, bool crashlytics + SetupParams? setupParams, VpnOptions? vpnOptions, String stopTip, String startTip, String localNetworkTip, String currentProfileName, String stopText, bool onlyStatisticsProxy, bool showStopAction }); @@ -5585,7 +5583,7 @@ class __$SharedStateCopyWithImpl<$Res> /// Create a copy of SharedState /// with the given fields replaced by the non-null parameter values. -@override @pragma('vm:prefer-inline') $Res call({Object? setupParams = freezed,Object? vpnOptions = freezed,Object? stopTip = null,Object? startTip = null,Object? localNetworkTip = null,Object? currentProfileName = null,Object? stopText = null,Object? onlyStatisticsProxy = null,Object? showStopAction = null,Object? crashlytics = null,}) { +@override @pragma('vm:prefer-inline') $Res call({Object? setupParams = freezed,Object? vpnOptions = freezed,Object? stopTip = null,Object? startTip = null,Object? localNetworkTip = null,Object? currentProfileName = null,Object? stopText = null,Object? onlyStatisticsProxy = null,Object? showStopAction = null,}) { return _then(_SharedState( setupParams: freezed == setupParams ? _self.setupParams : setupParams // ignore: cast_nullable_to_non_nullable as SetupParams?,vpnOptions: freezed == vpnOptions ? _self.vpnOptions : vpnOptions // ignore: cast_nullable_to_non_nullable @@ -5596,7 +5594,6 @@ as String,currentProfileName: null == currentProfileName ? _self.currentProfileN as String,stopText: null == stopText ? _self.stopText : stopText // ignore: cast_nullable_to_non_nullable as String,onlyStatisticsProxy: null == onlyStatisticsProxy ? _self.onlyStatisticsProxy : onlyStatisticsProxy // ignore: cast_nullable_to_non_nullable as bool,showStopAction: null == showStopAction ? _self.showStopAction : showStopAction // ignore: cast_nullable_to_non_nullable -as bool,crashlytics: null == crashlytics ? _self.crashlytics : crashlytics // ignore: cast_nullable_to_non_nullable as bool, )); } diff --git a/lib/models/generated/state.g.dart b/lib/models/generated/state.g.dart index 049cbfd2..d65df5a6 100644 --- a/lib/models/generated/state.g.dart +++ b/lib/models/generated/state.g.dart @@ -20,7 +20,6 @@ _SharedState _$SharedStateFromJson(Map json) => _SharedState( stopText: json['stopText'] as String, onlyStatisticsProxy: json['onlyStatisticsProxy'] as bool, showStopAction: json['showStopAction'] as bool? ?? true, - crashlytics: json['crashlytics'] as bool, ); Map _$SharedStateToJson(_SharedState instance) => @@ -34,5 +33,4 @@ Map _$SharedStateToJson(_SharedState instance) => 'stopText': instance.stopText, 'onlyStatisticsProxy': instance.onlyStatisticsProxy, 'showStopAction': instance.showStopAction, - 'crashlytics': instance.crashlytics, }; diff --git a/lib/models/state.dart b/lib/models/state.dart index e025b32d..9d2f7676 100644 --- a/lib/models/state.dart +++ b/lib/models/state.dart @@ -189,7 +189,6 @@ abstract class SharedState with _$SharedState { required String stopText, required bool onlyStatisticsProxy, @Default(true) bool showStopAction, - required bool crashlytics, }) = _SharedState; factory SharedState.fromJson(Map json) => diff --git a/lib/plugins/app.dart b/lib/plugins/app.dart index 9b57cbcf..5c099b70 100644 --- a/lib/plugins/app.dart +++ b/lib/plugins/app.dart @@ -147,22 +147,6 @@ class App { return methodChannel.invokeMethod('openAppSettings'); } - Future didCrashOnPreviousExecution() async { - try { - final value = await methodChannel - .invokeMethod('didCrashOnPreviousExecution') - .timeout(_platformProbeTimeout); - return value ?? false; - } catch (error) { - commonPrint.log( - 'Failed to read the previous-execution crash flag: ' - '${compactError(error)}', - logLevel: LogLevel.warning, - ); - return false; - } - } - Future getLastExitInfo() async { try { final raw = await methodChannel diff --git a/lib/providers/generated/state.g.dart b/lib/providers/generated/state.g.dart index 5d25fee6..4dc7036f 100644 --- a/lib/providers/generated/state.g.dart +++ b/lib/providers/generated/state.g.dart @@ -437,7 +437,7 @@ final class SharedStateProvider } } -String _$sharedStateHash() => r'1aeb51f6a7b6082f5df2a1942f45ec6c2abce606'; +String _$sharedStateHash() => r'c78c01097468ec6de887e0c94a9d5432403730a1'; @ProviderFor(vpnRouteAddress) final vpnRouteAddressProvider = VpnRouteAddressProvider._(); @@ -2157,6 +2157,48 @@ final class ProxiesTabControllerStateProvider String _$proxiesTabControllerStateHash() => r'548db61efef2c47c2694c855436276fcd3529956'; +@ProviderFor(currentGroupDelayTesting) +final currentGroupDelayTestingProvider = CurrentGroupDelayTestingProvider._(); + +final class CurrentGroupDelayTestingProvider + extends $FunctionalProvider + with $Provider { + CurrentGroupDelayTestingProvider._() + : super( + from: null, + argument: null, + retry: null, + name: r'currentGroupDelayTestingProvider', + isAutoDispose: true, + dependencies: null, + $allTransitiveDependencies: null, + ); + + @override + String debugGetCreateSourceHash() => _$currentGroupDelayTestingHash(); + + @$internal + @override + $ProviderElement $createElement($ProviderPointer pointer) => + $ProviderElement(pointer); + + @override + bool create(Ref ref) { + return currentGroupDelayTesting(ref); + } + + /// {@macro riverpod.override_with_value} + Override overrideWithValue(bool value) { + return $ProviderOverride( + origin: this, + providerOverride: $SyncValueProvider(value), + ); + } +} + +String _$currentGroupDelayTestingHash() => + r'8eff21356efb7ad6b208b0badfc9081d94aa2fb4'; + @ProviderFor(realTestUrl) final realTestUrlProvider = RealTestUrlFamily._(); diff --git a/lib/providers/state/system.dart b/lib/providers/state/system.dart index e8d5a6a6..0a3f8b1c 100644 --- a/lib/providers/state/system.dart +++ b/lib/providers/state/system.dart @@ -182,7 +182,6 @@ SharedState sharedState(Ref ref) { (state) => ( onlyStatisticsProxy: state.onlyStatisticsProxy, showStopAction: state.showNotificationStopAction, - crashlytics: state.crashlytics, testUrl: state.testUrl, checkCertificate: state.checkCertificate, ), @@ -191,14 +190,12 @@ SharedState sharedState(Ref ref) { final currentProfileName = currentProfile.label; final selectedMap = currentProfile.selectedMap; final onlyStatisticsProxy = appSetting.onlyStatisticsProxy; - final crashlytics = appSetting.crashlytics; final testUrl = appSetting.testUrl; return SharedState( currentProfileName: currentProfileName, onlyStatisticsProxy: onlyStatisticsProxy, showStopAction: appSetting.showStopAction, stopText: currentAppLocalizations.stop, - crashlytics: crashlytics, stopTip: currentAppLocalizations.stopVpn, startTip: currentAppLocalizations.startVpn, localNetworkTip: currentAppLocalizations.localNetworkDeniedTip, diff --git a/lib/views/config/general.dart b/lib/views/config/general.dart index cbb8348a..03d52600 100644 --- a/lib/views/config/general.dart +++ b/lib/views/config/general.dart @@ -417,12 +417,6 @@ class GeneralView extends ConsumerWidget { select: (state) => state.openLogs, update: (state, value) => state.copyWith(openLogs: value), ), - if (system.isAndroid) - _appSettingToggle( - title: (l) => l.crashlytics, - select: (state) => state.crashlytics, - update: (state, value) => state.copyWith(crashlytics: value), - ), ]; } @@ -482,10 +476,7 @@ class GeneralView extends ConsumerWidget { generateSection( title: appLocalizations.logsAndDiagnostics, items: _logItems(), - footer: [ - appLocalizations.logcatDesc, - if (system.isAndroid) appLocalizations.crashlyticsTip, - ].join('\n'), + footer: appLocalizations.logcatDesc, ), ], ), diff --git a/lib/views/disclaimer.dart b/lib/views/disclaimer.dart index ec537476..e0595c49 100644 --- a/lib/views/disclaimer.dart +++ b/lib/views/disclaimer.dart @@ -20,12 +20,9 @@ class DisclaimerView extends StatelessWidget { const DisclaimerView({super.key, this.requireConsent = false}); - static const _googlePrivacyUrl = 'https://policies.google.com/privacy'; - static const _firebasePrivacyUrl = - 'https://firebase.google.com/support/privacy'; static const _maxContentWidth = 720.0; - List<({String title, String content})> _leadingTerms(AppLocalizations l) => [ + List<({String title, String content})> _terms(AppLocalizations l) => [ ( title: l.disclaimerSoftwareTitle, content: @@ -42,9 +39,7 @@ class DisclaimerView extends StatelessWidget { ), (title: l.disclaimerWarrantyTitle, content: l.disclaimerWarrantyContent), (title: l.disclaimerLiabilityTitle, content: l.disclaimerLiabilityContent), - ]; - - List<({String title, String content})> _trailingTerms(AppLocalizations l) => [ + (title: l.disclaimerPrivacyTitle, content: l.disclaimerPrivacyContent), (title: l.disclaimerLicenseTitle, content: l.disclaimerLicenseContent), (title: l.disclaimerChangesTitle, content: l.disclaimerChangesContent), (title: l.disclaimerAcceptTitle, content: l.disclaimerAcceptContent), @@ -132,55 +127,14 @@ class DisclaimerView extends StatelessWidget { } List _buildTerms(AppLocalizations appLocalizations) { - final leadingTerms = _leadingTerms(appLocalizations); - final trailingTerms = _trailingTerms(appLocalizations); - final privacyIndex = leadingTerms.length + 1; return [ _DisclaimerIntro(text: appLocalizations.disclaimerDesc), - for (final (index, term) in leadingTerms.indexed) + for (final (index, term) in _terms(appLocalizations).indexed) _DisclaimerTerm( index: index + 1, title: term.title, content: term.content, ), - _DisclaimerTerm( - index: privacyIndex, - title: appLocalizations.disclaimerPrivacyTitle, - content: appLocalizations.disclaimerPrivacyContent, - children: [ - _DataServiceCard( - glyph: AppGlyphs.error, - title: appLocalizations.disclaimerCrashlyticsTitle, - content: appLocalizations.disclaimerCrashlyticsContent, - ), - _DataServiceCard( - glyph: AppGlyphs.dataUsage, - title: appLocalizations.disclaimerAnalyticsTitle, - content: appLocalizations.disclaimerAnalyticsContent, - ), - _TermParagraphs(appLocalizations.disclaimerDataProcessingContent), - Wrap( - spacing: 8, - runSpacing: 8, - children: [ - _PolicyLink( - label: appLocalizations.disclaimerGooglePrivacy, - url: _googlePrivacyUrl, - ), - _PolicyLink( - label: appLocalizations.disclaimerFirebasePrivacy, - url: _firebasePrivacyUrl, - ), - ], - ), - ], - ), - for (final (index, term) in trailingTerms.indexed) - _DisclaimerTerm( - index: privacyIndex + index + 1, - title: term.title, - content: term.content, - ), ]; } } @@ -224,13 +178,11 @@ class _DisclaimerTerm extends StatelessWidget { final int index; final String title; final String content; - final List children; const _DisclaimerTerm({ required this.index, required this.title, required this.content, - this.children = const [], }); static const _badgeSize = 28.0; @@ -270,8 +222,6 @@ class _DisclaimerTerm extends StatelessWidget { ), const SizedBox(height: 12), _TermParagraphs(content), - for (final child in children) - Padding(padding: const EdgeInsets.only(top: 12), child: child), ], ), ); @@ -302,94 +252,6 @@ class _TermParagraphs extends StatelessWidget { } } -class _DataServiceCard extends StatelessWidget { - final Glyph glyph; - final String title; - final String content; - - const _DataServiceCard({ - required this.glyph, - required this.title, - required this.content, - }); - - @override - Widget build(BuildContext context) { - final colorScheme = context.colorScheme; - final level = context.raisedSurfaceLevel; - return DecoratedBox( - decoration: ShapeDecoration( - color: level.colorOf(colorScheme), - shape: AppShape.xl, - ), - child: Padding( - padding: const EdgeInsets.all(16), - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Row( - children: [ - GlyphIcon(glyph, size: 20, color: colorScheme.primary), - const SizedBox(width: 10), - Expanded( - child: Text( - title, - style: AppTextStyle.subheadline.of( - context, - emphasized: true, - ), - ), - ), - const SizedBox(width: 8), - DecoratedBox( - decoration: ShapeDecoration( - color: level.next.colorOf(colorScheme), - shape: AppShape.full, - ), - child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: 10, - vertical: 2, - ), - child: Text( - context.appLocalizations.disclaimerAndroidOnly, - style: AppTextStyle.caption2 - .of(context, emphasized: true) - .copyWith(color: colorScheme.onSurfaceVariant), - ), - ), - ), - ], - ), - const SizedBox(height: 12), - _TermParagraphs(content), - ], - ), - ), - ); - } -} - -class _PolicyLink extends StatelessWidget { - final String label; - final String url; - - const _PolicyLink({required this.label, required this.url}); - - @override - Widget build(BuildContext context) { - return ElasticButton( - child: TextButton.icon( - onPressed: () { - dialogs.openUrl(url); - }, - icon: const GlyphIcon(AppGlyphs.openExternal, size: 18), - label: Text(label), - ), - ); - } -} - class _ConsentLayout extends StatelessWidget { final double maxWidth; final double gutter; diff --git a/test/common/boot_guard_test.dart b/test/common/boot_guard_test.dart index 369426a4..b520b6b4 100644 --- a/test/common/boot_guard_test.dart +++ b/test/common/boot_guard_test.dart @@ -18,19 +18,13 @@ BootGuard _guard( _RecordStore store, { bool supported = true, AppExitInfo? exitInfo, - bool crashReported = false, int now = 5000, - void Function()? onCrashProbe, }) { return BootGuard( supported: supported, readRecord: store.read, writeRecord: store.write, readExitInfo: () async => exitInfo, - readCrashReport: () async { - onCrashProbe?.call(); - return crashReported; - }, now: () => now, ); } @@ -42,10 +36,7 @@ void main() { final store = _RecordStore(); final guard = _guard(store); - final decision = await guard.evaluate( - profileId: 7, - crashlyticsEnabled: false, - ); + final decision = await guard.evaluate(profileId: 7); expect(decision.recovery, BootRecovery.none); expect(store.record?.stage, BootStage.starting); @@ -55,21 +46,6 @@ void main() { }, ); - test( - 'the Crashlytics probe stays out of the path unless it is enabled', - () async { - final store = _RecordStore(); - var probes = 0; - final guard = _guard(store, onCrashProbe: () => probes++); - - await guard.evaluate(profileId: 7, crashlyticsEnabled: false); - expect(probes, 0); - - await guard.evaluate(profileId: 7, crashlyticsEnabled: true); - expect(probes, 1); - }, - ); - test('an interrupted launch is carried into the next boot record', () async { final store = _RecordStore() ..record = const BootRecord( @@ -79,10 +55,7 @@ void main() { ); final guard = _guard(store); - final decision = await guard.evaluate( - profileId: 7, - crashlyticsEnabled: false, - ); + final decision = await guard.evaluate(profileId: 7); expect(decision.recovery, BootRecovery.skipAutoSetup); expect(store.record?.failureCount, 1); @@ -100,10 +73,7 @@ void main() { ); final guard = _guard(store); - final decision = await guard.evaluate( - profileId: 7, - crashlyticsEnabled: false, - ); + final decision = await guard.evaluate(profileId: 7); expect(decision.recovery, BootRecovery.clearProfile); expect(store.record?.profileId, isNull); @@ -121,7 +91,7 @@ void main() { ), ); - await guard.evaluate(profileId: 7, crashlyticsEnabled: false); + await guard.evaluate(profileId: 7); expect(store.record?.handledExitAt, 4000); @@ -133,10 +103,7 @@ void main() { ), now: 6000, ); - final decision = await next.evaluate( - profileId: 7, - crashlyticsEnabled: false, - ); + final decision = await next.evaluate(profileId: 7); expect(decision.recovery, BootRecovery.skipAutoSetup); expect(store.record?.handledExitAt, 4000); @@ -145,7 +112,7 @@ void main() { test('a completed launch resets the failure count', () async { final store = _RecordStore(); final guard = _guard(store); - await guard.evaluate(profileId: 7, crashlyticsEnabled: false); + await guard.evaluate(profileId: 7); await guard.markRunning(); @@ -161,7 +128,7 @@ void main() { startedAt: 1000, ); final guard = _guard(store); - await guard.evaluate(profileId: 7, crashlyticsEnabled: false); + await guard.evaluate(profileId: 7); await guard.markRunning(); @@ -208,24 +175,14 @@ void main() { startedAt: 1000, failureCount: 1, ); - var probes = 0; - final guard = _guard( - store, - supported: false, - crashReported: true, - onCrashProbe: () => probes++, - ); + final guard = _guard(store, supported: false); - final decision = await guard.evaluate( - profileId: 7, - crashlyticsEnabled: true, - ); + final decision = await guard.evaluate(profileId: 7); await guard.markRunning(); await guard.markClosed(); expect(decision.recovery, BootRecovery.none); expect(guard.decision.recovery, BootRecovery.none); - expect(probes, 0); expect(store.writes, 0); expect(store.record?.stage, BootStage.starting); }); diff --git a/test/common/boot_record_test.dart b/test/common/boot_record_test.dart index cde1aedf..099895dc 100644 --- a/test/common/boot_record_test.dart +++ b/test/common/boot_record_test.dart @@ -94,7 +94,6 @@ void main() { final decision = resolveBootDecision( record: const BootRecord(stage: BootStage.running, profileId: 7), exitInfo: _exit(AppExitReason.crash), - crashReported: true, ); expect(decision.recovery, BootRecovery.none); @@ -102,21 +101,13 @@ void main() { }); test('does nothing on a first launch', () { - final decision = resolveBootDecision( - record: null, - exitInfo: null, - crashReported: true, - ); + final decision = resolveBootDecision(record: null, exitInfo: null); expect(decision.recovery, BootRecovery.none); }); test('skips automatic setup after one interrupted launch', () { - final decision = resolveBootDecision( - record: _starting(), - exitInfo: null, - crashReported: false, - ); + final decision = resolveBootDecision(record: _starting(), exitInfo: null); expect(decision.recovery, BootRecovery.skipAutoSetup); expect(decision.failureCount, 1); @@ -128,7 +119,6 @@ void main() { final decision = resolveBootDecision( record: _starting(failureCount: 1), exitInfo: _exit(AppExitReason.crashNative), - crashReported: false, ); expect(decision.recovery, BootRecovery.clearProfile); @@ -141,7 +131,6 @@ void main() { final decision = resolveBootDecision( record: _starting(failureCount: 3, profileId: null), exitInfo: null, - crashReported: false, ); expect(decision.recovery, BootRecovery.skipAutoSetup); @@ -159,7 +148,6 @@ void main() { final decision = resolveBootDecision( record: _starting(failureCount: 1), exitInfo: _exit(reason), - crashReported: true, ); expect(decision.recovery, BootRecovery.none, reason: reason.name); @@ -171,7 +159,6 @@ void main() { final decision = resolveBootDecision( record: _starting(handledExitAt: _startedAt + 600), exitInfo: _exit(AppExitReason.userRequested), - crashReported: false, ); expect(decision.recovery, BootRecovery.skipAutoSetup); @@ -182,28 +169,10 @@ void main() { final decision = resolveBootDecision( record: _starting(), exitInfo: _exit(AppExitReason.userRequested, timestamp: _startedAt - 1), - crashReported: false, ); expect(decision.recovery, BootRecovery.skipAutoSetup); expect(decision.exitReason, isNull); }); - - test('a reported crash confirms an interruption it cannot cause', () { - final skipped = resolveBootDecision( - record: _starting(), - exitInfo: null, - crashReported: true, - ); - final clean = resolveBootDecision( - record: const BootRecord(), - exitInfo: null, - crashReported: true, - ); - - expect(skipped.crashConfirmed, isTrue); - expect(skipped.recovery, BootRecovery.skipAutoSetup); - expect(clean.recovery, BootRecovery.none); - }); }); } diff --git a/test/common/preferences_test.dart b/test/common/preferences_test.dart index 4148d56a..1827d5c2 100644 --- a/test/common/preferences_test.dart +++ b/test/common/preferences_test.dart @@ -16,7 +16,6 @@ const _sharedState = SharedState( currentProfileName: 'profile', stopText: 'stopped', onlyStatisticsProxy: true, - crashlytics: false, ); void main() { diff --git a/test/plugins/app_test.dart b/test/plugins/app_test.dart index 98ae8379..bc590381 100644 --- a/test/plugins/app_test.dart +++ b/test/plugins/app_test.dart @@ -22,28 +22,6 @@ void main() { App().clearPackageIconCache(); }); - test('reads previous execution crash state from Android', () async { - MethodCall? receivedCall; - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger - .setMockMethodCallHandler(channel, (call) async { - receivedCall = call; - return true; - }); - - final didCrash = await App().didCrashOnPreviousExecution(); - - expect(didCrash, isTrue); - expect(receivedCall, isNotNull); - expect(receivedCall!.method, 'didCrashOnPreviousExecution'); - }); - - test('uses false when Android returns no crash state', () async { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger - .setMockMethodCallHandler(channel, (_) async => null); - - expect(await App().didCrashOnPreviousExecution(), isFalse); - }); - test('requests every package icon from Android only once', () async { var iconCallCount = 0; TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger @@ -141,15 +119,6 @@ void main() { expect(iconCallCount, 2); }); - test('uses false when crash detection is unavailable', () async { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger - .setMockMethodCallHandler(channel, (_) async { - throw PlatformException(code: 'unavailable'); - }); - - expect(await App().didCrashOnPreviousExecution(), isFalse); - }); - test('reads the last process exit info from Android', () async { MethodCall? receivedCall; TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger diff --git a/test/plugins/service_test.dart b/test/plugins/service_test.dart index 6d091442..90aeccb5 100644 --- a/test/plugins/service_test.dart +++ b/test/plugins/service_test.dart @@ -145,7 +145,6 @@ void main() { currentProfileName: 'profile', stopText: 'stop', onlyStatisticsProxy: false, - crashlytics: false, ), ), isEmpty, @@ -161,7 +160,6 @@ void main() { currentProfileName: 'profile', stopText: 'stop', onlyStatisticsProxy: true, - crashlytics: false, ); expect(await Service().syncState(state), 'ok');